• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getUserAvatar函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getUserAvatar函数的典型用法代码示例。如果您正苦于以下问题:PHP getUserAvatar函数的具体用法?PHP getUserAvatar怎么用?PHP getUserAvatar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getUserAvatar函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getUserList

 function getUserList($cols = null, $where = "", $orderBy = "", $limit = null)
 {
     if ($cols == null || count($cols) == 0) {
         $cols = array("userid", "privilegeid", "accessid", "name", "email", "address", "region", "country", "zipcode", "mobile", "avatar", "avatar_type");
     }
     $sql = _db(true)->_selectQ(_dbTable("users", true), $cols)->_where(array("blocked" => 'false'));
     if (isset($_SESSION["SESS_PRIVILEGE_ID"]) && $_SESSION["SESS_PRIVILEGE_ID"] > ROLE_PRIME) {
         //$sql=$sql->_where(" (site='".SITENAME."' OR site='*')");
         $sql1 = _db(true)->_selectQ(_dbTable("access", true), "id")->_where(array("blocked" => 'false'))->_where(" (FIND_IN_SET('" . SITENAME . "',sites) OR sites='*')");
         $sql = $sql->_query("accessid", $sql1);
     }
     if (strlen($where) > 0) {
         $sql = $sql->_where(" ({$where})");
     }
     if (strlen($orderBy) > 0) {
         $sql = $sql->_orderBy($orderBy);
     }
     if (is_array($limit)) {
         $sql = $sql->_limit($limit);
     } elseif (strlen($limit) > 0) {
         $sql = $sql->_limit($limit);
     }
     $res = _dbQuery($sql, true);
     $data = [];
     if ($res) {
         $data = _dbData($res, true);
         _dbFree($res, true);
         foreach ($data as $a => $row) {
             $data[$a]['avatarlink'] = getUserAvatar($row);
         }
     }
     return $data;
 }
开发者ID:logiks,项目名称:logiks-core,代码行数:33,代码来源:Site.php


示例2: getUserInfo

 function getUserInfo($userid = null)
 {
     if ($userid == null) {
         $userid = $_SESSION['SESS_USER_ID'];
     }
     if (isset($_SESSION["USERINFO"][$userid])) {
         return $_SESSION["USERINFO"][$userid];
     }
     $sql = _db(true)->_selectQ(_dbTable("users", true), "*")->_where(array("blocked" => 'false', "userid" => $userid));
     $res = _dbQuery($sql, true);
     $data = [];
     if ($res) {
         $data = _dbData($res, true);
         _dbFree($res, true);
         if (isset($data[0])) {
             $data = $data[0];
         }
     }
     $data['avatarlink'] = getUserAvatar($data);
     $_SESSION["USERINFO"][$userid] = $data;
     return $data;
 }
开发者ID:logiks,项目名称:logiks-core,代码行数:22,代码来源:User.php


示例3: checkLogin

 public function checkLogin()
 {
     $is_bind = I("post.is_bind", 0, 'int');
     $pwd = I('post.pwd');
     $username = I('post.username');
     if (checkEmail($username) == 'true') {
         $info = M("user")->field("id,nickname")->where("email = '" . $username . "'  AND pwd = '" . md5($pwd) . "'")->find();
     } else {
         $info = M("user")->field("id,nickname")->where("name = '" . $username . "'  AND pwd = '" . md5($pwd) . "'")->find();
     }
     if (empty($info)) {
         echo json_encode(array("error" => "您输入的用户名/邮箱/密码无效。"));
         exit;
     } else {
         $userid = $info['id'];
     }
     $nickname = $info['nickname'];
     $tip = "登录成功!";
     if ($is_bind == 1) {
         //若是绑定
         $openid = getSessionCookie("openid");
         if ($openid) {
             $field = getSessionCookie("field");
             $userinfo = M("user")->field('id,name')->where("" . $field . "= '" . $openid . "'")->find();
             if (!$userinfo) {
                 //没有的话绑定账号,送积分和发广告,有绑定的话直接登录
                 // 绑定账号
                 M('user')->where("id = " . $userid . "")->save(array($field => $openid));
                 emptySessionCookie('type');
                 emptySessionCookie('openid');
             }
         }
     }
     setSessionCookie("userid", $userid);
     setSessionCookie("username", getNickname($username, $nickname));
     echo json_encode(array("username" => $username, "userid" => $userid, "avatar" => getUserAvatar($userid), "tip" => $tip, "error" => ""));
 }
开发者ID:jl9n,项目名称:thinkphpdemo,代码行数:37,代码来源:AjaxController.class.php


示例4: getIMG

            $caption = getIMG(url() . "images/emoticons/poll.png") . " " . sprintf(_UPD_POLL, $user, "");
            break;
        case updTypeAnnouncement:
            $markAsReadOp = "ma";
            $clubname = "[" . _UNKNOWN . "]";
            $result = sql_query("SELECT `cluName` FROM `clubs` " . "WHERE `cluid` = '" . $data["updUser"] . "' LIMIT 1");
            if (mysql_num_rows($result) > 0) {
                $clubname = mysql_result($result, 0);
            }
            $result = sql_query("SELECT `jouTitle`,LEFT(`jouEntry`,500) AS `jouText`,`jouAnnCreator` FROM `journals` " . "WHERE `jouid` = '" . $data["updObj"] . "'");
            if (mysql_num_rows($result) > 0) {
                $title = mysql_result($result, 0, 0);
                $body = mysql_result($result, 0, 1);
                $author = mysql_result($result, 0, 2);
                $url = url("announcement/" . $data["updUser"] . "/" . $data["updObj"]);
                $avatar = getUserAvatar("", $author, true);
            }
            $club = '<a href="' . url("club/" . $data["updUser"]) . '">' . $clubname . '</a>';
            $caption = getIMG(url() . "images/emoticons/club2.png") . " " . sprintf(_UPD_ANNOUNCEMENT, $club, "");
            break;
    }
    $jouDivId = "id_jou" . $key;
    ?>
				<div id="<?php 
    echo $jouDivId;
    ?>
">
					<div class="mar_left" style="margin-bottom : 0.2em;">
						<?php 
    echo $caption;
    ?>
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_updates.php


示例5: getMember

function getMember($mysqli, $userId)
{
    if (doesuserExist($mysqli, $userId)) {
        if ($stmt = $mysqli->prepare("SELECT id, username, email, firstName, lastName, dt, graduation_year FROM members WHERE id = ? LIMIT 1")) {
            $stmt->bind_param("i", $userId);
            $stmt->execute();
            $stmt->store_result();
            $stmt->bind_result($id, $username, $email, $firstName, $lastName, $date, $graduationYear);
            $stmt->fetch();
            return array("id" => $id, "username" => $username, "email" => $email, "firstName" => $firstName, "lastName" => $lastName, "date" => date("l, F jS", strtotime($date)), "image" => getUserAvatar($mysqli, $userId), "graduationYear" => $graduationYear);
        } else {
            return "Faulty MYSQL Statement";
        }
    } else {
        return "User does not exist";
    }
}
开发者ID:DXPower,项目名称:Afterschool,代码行数:17,代码来源:functions.php


示例6: nl2br

            echo '<div style="display:block;min-height:60px;margin-left:70px;padding-bottom:20px;cursor: text;" id="' . $row->cmtid . '-edit">' . nl2br($row->cmttext) . '</div>';
            echo '<div class="date">' . sprintf(JText::_('COM_DATSOGALLERY_ON'), $row->cmtname, strftime($ad_datef, (int) $row->cmtdate)) . '</div>';
            if (array_intersect($is_admin, $userGroups)) {
                echo '<div class="control"><a class="btn-delete">' . JText::_('COM_DATSOGALLERY_DELETE') . '</a> | ' . $action . ' | <a class="btn-spam">Spam</a></div>';
            }
            echo "</li>\n";
        }
        echo "</ul>\n";
    } else {
        echo '<div id="nocom"></div>';
    }
    if ($ad_anoncomment || $user->id) {
        if ($ad_js || $ad_cb) {
            $avatar = $user->id ? getUserAvatar($user->id) : getUserAvatar(0);
        } elseif ($ad_kunena) {
            $avatar = $user->id ? getUserAvatar($user->id) : getUserAvatar(0);
        } else {
            $avatar = getGravatar($user->email);
        }
        $brd = $ad_showsend2friend && $user->id ? '' : ' style="border-bottom: 1px solid #DCDCDC"';
        ?>
<div class="dg_body_background_comment"<?php 
        echo $brd;
        ?>
>
  <div class="imgblock" style="position:relative;float:right"><?php 
        echo $avatar;
        ?>
</div>
  <p>
    <label for="cmtname"><?php 
开发者ID:j0rg3m414,项目名称:centerar,代码行数:31,代码来源:datso.image.php


示例7: getUserAvatar

?>
	<div class="sep largetext"><?php 
echo _PROFILE;
?>
</div>
	<div class="container2 notsowide">
		<table cellspacing="0" cellpadding="4" border="0" width="100%">
		<tr>
			<td align="right" class="nowrap"><?php 
echo _AVATAR;
?>
:</td>
			<td width="100%">
				<div id="avatar_current">
					<?php 
echo getUserAvatar("", $_auth["useid"]);
?>
					<?php 
$script = "make_invisible('avatar_current'); " . "make_visible('avatar_hint'); " . "make_visible('avatar_choose'); " . "return false;";
?>
					&nbsp;<a href="" onclick="<?php 
echo $script;
?>
">
						<?php 
echo getIMG(urlf() . "images/emoticons/edit.png", "") . " " . _CHANGE;
?>
</a>
				</div>
				<div id="avatar_choose" style="display: none">
					<?php 
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_profile.php


示例8: while

    $togo = $friendLimit;
    while ($rowData = mysql_fetch_assoc($result)) {
        if ($togo <= 0) {
            break;
        }
        $togo--;
        ?>
					<div class="<?php 
        echo $odd ? "f_left" : "f_right";
        ?>
 mar_right mar_bottom">
						<?php 
        if (!$odd) {
            echo getUserLink($rowData["useid"]) . " &nbsp; ";
        }
        echo getUserAvatar("", $rowData["useid"], false, true);
        if ($odd) {
            echo " &nbsp; " . getUserLink($rowData["useid"]);
        }
        ?>
					</div>
					<?php 
        $odd = !$odd;
        if ($odd) {
            echo '<div class="clear">&nbsp;</div>';
        }
    }
    ?>
				<?php 
    iefixEnd();
    ?>
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_club.php


示例9: isLoggedIn

<?php

$whereGuest = isLoggedIn() ? "" : " AND `useGuestAccess` = '1' ";
$result = sql_query("SELECT `useid`,`useUsername` FROM `users`, `useExtData` " . "WHERE `useUsername` = '" . addslashes($_cmd[1]) . "' AND `useid` = `useEid` {$whereGuest} LIMIT 1");
if (!($useData = mysql_fetch_assoc($result))) {
    include INCLUDES . "p_notfound.php";
    return;
}
$useUsername = strtolower($useData["useUsername"]);
$_pollUser = $useData["useid"];
$_documentTitle = $useData["useUsername"] . ": " . _FAVOURITES;
?>
<div class="header">
	<div class="f_right mar_left a_center normaltext">
		<?php 
echo getUserAvatar("", $useData["useid"], true);
?>
	</div>
	<div class="f_left header_title">
		<?php 
echo $useData["useUsername"];
?>
		<div class="subheader"><?php 
echo _FAVOURITES;
?>
</div>
	</div>	
	<?php 
$active = 2;
include INCLUDES . "mod_usermenu.php";
?>
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_favourites.php


示例10: foreach

			</script>
	</head>
	<body>
		<h1><?php 
echo $schoolName;
?>
</h1>
		<h4><?php 
echo $schoolLocation;
?>
</h4>
		<h2>Members</h2>
		<ul>
			<?php 
foreach ($members as $i => $member) {
    $image = getUserAvatar($mysqli, $member["id"]);
    $member = array_merge($member, array("image" => $image));
    $members[$i] = $member;
    ?>
				
				<li>
					<a href="user.php?id=<?php 
    echo $member["id"];
    ?>
">
						<img id="user_profile" width="50" height="50" src="<?php 
    echo $member["image"];
    ?>
" />
						<?php 
    echo $member["firstName"] . " " . $member["lastName"];
开发者ID:DXPower,项目名称:Afterschool,代码行数:31,代码来源:school.php


示例11: commentAdd

function commentAdd()
{
    $db = JFactory::getDBO();
    $user = JFactory::getUser();
    $post = JRequest::get('post');
    $post = array_map('addslashes', $post);
    $cmtip = getIpAddress();
    jimport('joomla.mail.helper');
    require JPATH_COMPONENT_ADMINISTRATOR . DS . 'config.datsogallery.php';
    if ($post) {
        if (refererCheck()) {
            echo '<li class="dg_body_error_message"><div>' . refererCheck() . '</div></li>';
        } elseif (blacklistCheck($cmtip)) {
            echo '<li class="dg_body_error_message"><div>' . blacklistCheck($cmtip) . '</div></li>';
        } elseif (empty($post['cmtname'])) {
            echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_ENTER_NAME') . '</div></li>';
        } elseif (empty($post['cmtmail'])) {
            echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_ENTER_EMAIL') . '</div></li>';
        } elseif (JMailHelper::isEmailAddress($post['cmtmail']) == false) {
            echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_INVALID_EMAIL') . '</div></li>';
        } elseif (empty($post['cmttext'])) {
            echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_ENTER_COMMENT') . '</div></li>';
        } elseif (empty($post['dgcaptchaval'])) {
            echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_ENTER_CODE') . '</div></li>';
        } else {
            if (!$user->id && strlen($post['cmtname']) < 4) {
                echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_NAME_IS_TOO_SHORT') . '</div></li>';
            } elseif (empty($_SESSION['CAPTCHA']) || strtolower($post['dgcaptchaval']) != $_SESSION['CAPTCHA']) {
                echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_SECURITY_NOT_VALUE') . '</div></li>';
            } else {
                $db->setQuery("INSERT INTO #__datsogallery_comments SET cmtpic='" . $post['cmtpic'] . "', cmtip='" . $cmtip . "', cmtname='" . $post['cmtname'] . "', cmtmail='" . $post['cmtmail'] . "', cmttext='" . $post['cmttext'] . "', cmtdate ='" . time() . "', published = 1");
                $db->query();
                echo "<li class=\"pane\">\n";
                echo "<div class=\"imgblock\">";
                if ($ad_js || $ad_cb || $ad_kunena) {
                    $avatar = $user->id ? getUserAvatar($user->id) : getUserAvatar(0);
                } else {
                    $avatar = getGravatar($post['cmtmail']);
                }
                echo $avatar;
                echo "</div>";
                echo '<div style="display:block;min-height:60px;margin-left:70px;padding-bottom:20px">' . stripslashes(nl2br($post['cmttext'])) . '</div>';
                echo '<div class="date">' . sprintf(JText::_('COM_DATSOGALLERY_ON'), $post['cmtname'], strftime($ad_datef, time())) . '</div>';
                echo "</li>\n";
                $db->setQuery('SELECT notify' . ' FROM #__datsogallery' . ' WHERE id = ' . $post['cmtpic']);
                $unotify = $db->loadResult();
                if ($ad_comment_notify && $unotify != 0) {
                    commentNotify($post['cmtpic'], $post['cmtname'], $post['cmtmail'], stripslashes(dgwordlimiter($post['cmttext'], $ad_comment_wl)));
                }
            }
        }
        exit;
    }
}
开发者ID:j0rg3m414,项目名称:centerar,代码行数:54,代码来源:datso.functions.php


示例12: showComment


//.........这里部分代码省略.........
:
			</div>
			<div class="reminder">
				<?php 
            echo formatText($parData["comComment"], $parData["comNoEmoticons"], $parData["comNoBBCode"]);
            ?>
			</div>
			<?php 
        }
    } elseif ($showParent && isset($comData["pmsid"])) {
        $result = sql_query("SELECT * FROM `pms` WHERE `pmsid` = '" . $comData["comObj"] . "' LIMIT 1");
        if ($parData = mysql_fetch_assoc($result)) {
            if ($parData["pmsCreator"] == $_auth["useid"] || $parData["pmsPmUser"] == $_auth["useid"]) {
                ?>
				<div class="caption reminder_cap">
					<?php 
                echo sprintf(_WROTE, getUserLink($parData["pmsCreator"]));
                ?>
:
				</div>
				<div class="reminder">
					<?php 
                echo formatText($parData["pmsComment"], $parData["pmsNoEmoticons"], $parData["pmsNoBBCode"]);
                ?>
				</div>
				<?php 
            }
        }
    }
    if ($comData["comCreator"] != 0) {
        ?>
		<div class="f_right mar_left a_center" style="position: relative; top: -3px; left: 3px">
			<?php 
        echo getUserAvatar("", $comData["comCreator"], true);
        ?>
		</div>
		<?php 
    }
    if (isset($comData["comSubject"])) {
        if (!isset($comData["comSubjectDateHide"])) {
            ?>
<div class="smalltext mar_bottom"><?php 
            // Show IPs to moderators+ (as an acronym).
            if (atLeastModerator() && isset($comData["comSubmitIp"]) && isset($comData["comEditIp"])) {
                ?>
				<acronym style="cursor: help" title="Submitted from <?php 
                echo getDotDecIp($comData["comSubmitIp"]);
                ?>
, last edited from <?php 
                echo getDotDecIp($comData["comEditIp"]);
                ?>
">
				<?php 
            }
            printf(_COMMENT_POSTED_ON, gmdate($_auth["useDateFormat"], applyTimezone(strtotime($comData["comSubmitDate"]))));
            // Close the acronym opened above.
            if (atLeastModerator() && isset($comData["comSubmitIp"]) && isset($comData["comEditIp"])) {
                ?>
				</acronym>
				<?php 
            }
            ?>
</div><?php 
        }
        ?>
		<div class="largetext mar_bottom"><b><?php 
开发者ID:brocococonut,项目名称:yGallery,代码行数:67,代码来源:comments.php


示例13: isset

echo _FAVOURITES;
?>
:</div>
	<?php 
$offset = isset($_GET["offset"]) ? intval($_GET["offset"]) : 0;
$limit = 30;
$whereGuest = isLoggedIn() ? "" : " AND `useGuestAccess` = '1' ";
$friendQuery = sql_query("SELECT SQL_CALC_FOUND_ROWS * FROM `favourites` " . "WHERE `favObj`='" . $objData['objid'] . "' {$whereGuest} ORDER BY `favSubmitDate` DESC LIMIT {$offset}, {$limit}");
$cntResult = sql_query("SELECT FOUND_ROWS()");
$totalCount = mysql_result($cntResult, 0);
?>
	<div class="container2">
	<?php 
navControls($offset, $limit, $totalCount);
?>
	<div class="clear">&nbsp;</div>
	<?php 
while ($rowData = mysql_fetch_assoc($friendQuery)) {
    ?>
		<div class="f_left a_center mar_right mar_bottom" style="height: 100px">
			<?php 
    echo getUserAvatar("", $rowData["favCreator"], true);
    ?>
		</div>
		<?php 
}
?>
	<div class="clear">&nbsp;</div>
	</div>
</div>
开发者ID:brocococonut,项目名称:yGallery,代码行数:30,代码来源:p_favs.php


示例14: fmtCallbackUsericon

function fmtCallbackUsericon($sender)
{
    global $__maxIcons;
    if ($__maxIcons <= 0) {
        return '[' . _BBCODE_ICON . '=' . $sender[1] . ']';
    }
    $__maxIcons--;
    $size = 100;
    // default value
    fmtParseParams($sender[1], $name, $size);
    if ($size < 40) {
        $size = 40;
    }
    // minimum value
    if ($size > 100) {
        $size = 100;
    }
    // maximum value
    return getUserAvatar($name, 0, false, false, $size);
}
开发者ID:brocococonut,项目名称:yGallery,代码行数:20,代码来源:formatting.php


示例15: getMitgliederliste

    function getMitgliederliste(array $params)
    {
        // Rückgabe-Variable definieren
        $html = '';
        // Modul für DB-Zugriff einbinden
        require_once 'konfiguration.php';
        // Verbindung zur Datenbank herstellen
        // am System mit Host, Benutzernamen und Password anmelden
        @mysql_connect(MYSQL_HOST, MYSQL_BENUTZER, MYSQL_KENNWORT) or die('Could not connect to mysql server.');
        @mysql_select_db(MYSQL_DATENBANK) or die('Could not select database.');
        mysql_set_charset('utf8');
        // SQL-Befehl zurechtfuddeln,
        // die aktuellen Mitglieder werden ermittelt
        $sql = sprintf('
				SELECT
					`mitglieder`.*
				FROM
					`mitglieder`
				WHERE
					`mitglieder`.`status` = "%s" AND (`mitglieder`.`id` < 9996 OR `mitglieder`.`id` > 9999)
				ORDER BY
					%s ASC
			', $params['Mitgliedsstatus'], $params['Sortierung']);
        // zuvor definierte SQL-Anweisung ausführen
        // Anzahl der Datensätze sollte größer als 0 sein um TRUE zurückzugeben
        $db_erg = mysql_query($sql);
        // Zählervariable initialisieren
        $i = 0;
        // es sind Datensätze vorhanden
        if (mysql_num_rows($db_erg) > 0) {
            // Überschrift für den Mitgliedsstatus ermitteln
            $tabellenkopf = getMitgliedsstatus($params['Mitgliedsstatus']);
            // erste Zeile festlegen für die entsprechende Mitgliedsgruppe
            $html = sprintf('<tr><th colspan="6" bgcolor="#ccccff" style="border: 1px solid #8080ff; font-size: 11pt; color: navy;"><a name="%s">%s</a></th></tr>', $params['Mitgliedsstatus'], $tabellenkopf);
            // Tabellenüberschriften
            $html .= '<tr><td colspan="6" height="5"></td></tr>';
            $html .= '<tr>';
            $html .= '<th width="85" bgcolor="#666666" style="border-bottom: 1px solid #ffffff;">&nbsp;</th>';
            $html .= '<th align="left" width="210" bgcolor="#666666" style="color: #ffffff; border-bottom: 1px solid #ffffff;">Name</th>';
            $html .= '<th align="left" width="140" bgcolor="#666666" style="color: #ffffff; border-bottom: 1px solid #ffffff;">Funktion</th>';
            $html .= '<th align="left" width="120" bgcolor="#666666" style="color: #ffffff; border-bottom: 1px solid #ffffff;">Telefon</th>';
            $html .= '<th align="left" width="250" bgcolor="#666666" style="color: #ffffff; border-bottom: 1px solid #ffffff;">eMail</th>';
            $html .= '<th align="left" width="65" bgcolor="#666666" style="color: #ffffff; border-bottom: 1px solid #ffffff;">&nbsp;</th>';
            $html .= '</tr>';
            while ($zeile = mysql_fetch_object($db_erg)) {
                // Hintergrundfarbe für gerade/ungerade Zeilen festlegen
                $bgColor = $i % 2 ? '#eeeeee' : '#cccccc';
                // Avatar des aktuellen Mitglieds ermitteln
                $avatar = getUserAvatar($zeile->id, $zeile->anrede);
                // Name kürzen falls nötig
                if (substr($zeile->nachname, strlen($zeile->nachname) - 2, 1) == ' ' || substr($zeile->nachname, strlen($zeile->nachname) - 3, 1) == ' ') {
                    // Name einkürzen, bsp: aus Koch C wird Koch
                    $zeile->nachname = substr($zeile->nachname, 0, strlen($zeile->nachname) - 2);
                    // führende und endende Leerzeichen entfernen falls vorhanden
                    $zeile->nachname = trim($zeile->nachname);
                }
                // eine neue Zeile für die Tabelle anlegen inkl. Hintergrundfarbe
                $html .= sprintf('<tr bgcolor="%s" id="o%s">', $bgColor, $zeile->id);
                $html .= sprintf('<td valign="top" align="center"><img src="%s" height="100" width="75" vspace="3" style="border: 1px solid #999999;" /></td>', $avatar);
                $html .= sprintf('<td valign="top" align="left"><strong>%s %s</strong><br /><br />%s<br />%s %s</td>', nl2br($zeile->vorname), nl2br($zeile->nachname), $zeile->strasse, $zeile->plz, $zeile->ort);
                $html .= sprintf('<td valign="top" align="left">%s</td>', nl2br($zeile->funktion));
                $html .= sprintf('<td valign="top" align="left">%s<br />%s</td>', nl2br($zeile->telefon1), nl2br($zeile->mobil1));
                // es wird geprüft, ob eine gültige eMail-Adresse eingetragen ist
                if (!empty($zeile->email)) {
                    // eMail-Adresse zurückgeben
                    $html .= sprintf('
							<td valign="top" align="left">
								<a href="mailto:%s" class="mitgliederliste"><img src="./img/email_icon.png" border="0" align="left" /> %s</a>
							</td>', $zeile->email, nl2br($zeile->email));
                } else {
                    // keine eMail-Adresse hinterlegt
                    $html .= '<td></td>';
                }
                // Felder hinzufügen für Bearbeiten, Löschen und PDF-Druck
                $html .= sprintf('
						<td valign="top" align="left" nowrap>
							<a href="mitglieder_edit.php?acb_nr=%s"><img src="./img/edit_icon.gif" border="0" vspace="3" title="bearbeiten" /></a>
							<a onClick="mitglied_zurueckholen(\'%s\');" style="cursor: pointer;"><img src="./img/1468798748_Up.png" border="0" vspace="5" title="zur&uuml;ckholen" /></a>
							<a href="pdf_mitglied.php?acb_nr=%s" target="_blank"><img src="./img/pdf_icon_16x19.png" border="0" vspace="3" title="PDF drucken" height="18" /></a>
						</td>', $zeile->id, $zeile->id, $zeile->id);
                // Ende der Zeile
                $html .= '</tr>';
                // Zähler erhöhen
                $i++;
            }
        }
        // Verbindung zur Datenbank schließen
        mysql_free_result($db_erg);
        // Rückgabe der Vorstandsmitglieder
        return $html;
    }
开发者ID:angstmann82,项目名称:flybook,代码行数:91,代码来源:mitglieder_old.php


示例16: sql_query

    if (!isset($donations[$useid]["total"])) {
        $donations[$useid]["total"] = 0;
    }
    if (!isset($donations[$useid]["lastmonth"])) {
        $donations[$useid]["lastmonth"] = 0;
    }
    $donations[$useid]["total"] += $donData["donAmtSum"];
}
$result = sql_query("SELECT `donCreator`,SUM(`donAmt`) AS `donAmtSum`,MAX(`donDate`) AS `donDateLatest` " . "FROM `donations` " . "WHERE `donCreator` <> '0' AND `donDate` > CURDATE() - INTERVAL 1 MONTH " . "GROUP BY `donCreator` " . "ORDER BY `donDateLatest` DESC");
while ($donData = mysql_fetch_assoc($result)) {
    $useid = $donData["donCreator"];
    $donations[$useid]["lastmonth"] += $donData["donAmtSum"];
}
?>
	<table border="0" cellpadding="4" cellspacing="0"><tr>
	<?php 
$cols = 0;
foreach ($donations as $donCreator => $donAmount) {
    echo "<td>" . getUserAvatar("", $donCreator, false, true) . "</td>" . '<td style="padding-right: 30px">' . getUserLink($donCreator) . '<div class="mar_left error">' . sprintf("%01.2f", $donAmount["total"]) . ' <span class="normaltext">/ ' . sprintf("%01.2f", $donAmount["lastmonth"]) . '</span>' . "</div></td>";
    $cols++;
    if ($cols >= 4) {
        $cols = 0;
        echo "</tr><tr>";
    }
}
?>
	</tr></table>
</div>

</div>
开发者ID:brocococonut,项目名称:yGallery,代码行数:30,代码来源:p_donations.php


示例17: cs_user

 $data['thread_desc']['country'] = $data['thread']['users_country'];
 $data['thread_desc']['users_link'] = cs_user($data['thread']['users_id'], $data['thread']['users_nick'], $data['thread']['users_active'], $data['thread']['users_delete']);
 $key = array_search($userid, $mods);
 if (!empty($key)) {
     $data['if']['moderator'] = true;
     $f_user = "users_id = '" . $userid . "'";
     $boardmod = cs_sql_select(__FILE__, 'boardmods', 'categories_id, users_id', $f_user);
     $f_cat = "categories_id = '" . $boardmod['categories_id'] . "'";
     $bm_cat = cs_sql_select(__FILE__, 'categories', 'categories_id, categories_name', $f_cat);
     $data['thread_desc']['boardmod'] = $bm_cat['categories_name'];
 } else {
     $data['if']['no_moderator'] = true;
     $data['thread_desc']['users_rank'] = getUserRank($count_com[$userid], $ranks);
     $data['thread_desc']['users_title'] = getRankTitle($count_com[$userid], $ranks);
 }
 $data['thread_desc']['avatar'] = getUserAvatar($data['thread']['users_avatar']);
 $content = cs_secure($data['thread']['users_place']);
 $hidden = explode(',', $data['thread']['users_hidden']);
 if (in_array('users_place', $hidden)) {
     $content = ($account['access_users'] > 4 or $data['thread']['users_id'] == $account['users_id']) ? cs_html_italic(1) . $content . cs_html_italic(0) : '';
 }
 $data['thread_desc']['place'] = empty($content) ? '' : $cs_lang['place'] . ': ' . $content;
 $data['thread_desc']['posts'] = $count_com[$userid];
 $data['thread_desc']['date'] = cs_date('unix', $data['thread']['threads_time'], 1);
 $data['thread_desc']['text'] = cs_secure($data['thread']['threads_text'], 1, 1);
 //Files Start
 if (!empty($loop_files)) {
     $data['if']['thread_desc_files'] = true;
     $check_files = 0;
     for ($run = 0; $run < $loop_files; $run++) {
         if ($cs_thread_files[$run]['comments_id'] == 0) {
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:thread.php


示例18: getUserAvatar

				   value="" />
			<button id="search" 
					type="button">   
				Search
			</button>
			<button id="create"
					type="button"
					onclick="createSchool(this.form.school.value, this.form.location.value);">
				Create 
			</button>
		</form>
		<ul id="search_results">

		</ul>
		<img width="250" height="250" src="<?php 
echo getUserAvatar($mysqli, $_SESSION['user_id']);
?>
" /> 
		<p>It looks like you aren't setup yet!</p>
		<form id="user_setup_form">
			<p>Upload a profile picture</p>
			<img id="preview" width="0" height="0" />
			<input id="image"
				   name="image" 
				   type="file"
				   accept="image/*"
				   onchange="loadFile(event);"
				   />
		    <script>
		        var loadFile = function(event) {
		          console.log(event);
开发者ID:DXPower,项目名称:Afterschool,代码行数:31,代码来源:landing.php


示例19: ob_start

ob_start();
?>
<div style="padding-top: 8px; margin-left: 10px">
<?php 
// Make a list of the users that made updates.
$where = "`updObj` = `objid` AND `useid` = `objCreator` " . "AND `updCreator` = '{$creator}' " . ($isExtras ? "AND `updType` = '" . updTypeArtExtra . "' " : "") . "AND `objDeleted` = '0' AND `objPending` = '0'";
applyObjFilters($where);
//$result = sql_query( "SELECT `useid`,`useUsername`,MAX(`objSubmitDate`) AS `MaxSubmitDate` ".
$result = sql_query("SELECT `useid`,`useUsername`,MAX(`objLastEdit`) AS `MaxSubmitDate` " . "FROM `" . ($isExtras ? "updates" : "updatesArt") . "`,{$_objects},`users` WHERE {$where} " . "GROUP BY `useid` ORDER BY `MaxSubmitDate` DESC LIMIT 11");
$artist = isset($_GET["artist"]) ? addslashes($_GET["artist"]) : "";
while ($rowData = mysql_fetch_assoc($result)) {
    if ($artist == "") {
        $artist = $rowData["useUsername"];
    }
    echo '<div class="mar_bottom">' . getUserAvatar("", $rowData["useid"], true, true, 100, url("updates/" . ($isExtras ? "extras" : "art"), array("artist" => $rowData["useUsername"]))) . "</div>";
}
?>
</div>
<?php 
$artistsList = ob_get_contents();
ob_end_clean();
$where = "`updCreator` = '{$creator}' AND `useUsername` = '{$artist}' " . "AND `useid` = `objCreator` " . ($isExtras ? "AND `updType` = '" . updTypeArtExtra . "' " : "") . "AND `updObj` = `objid` AND `objDeleted` = '0' AND `objPending` = '0'";
applyObjFilters($where);
$result = sql_query("SELECT `" . ($isExtras ? "updates" : "updatesArt") . "`.*, {$_objects}.* " . "FROM `" . ($isExtras ? "updates" : "updatesArt") . "`,{$_objects},`users` " . "WHERE {$where} ORDER BY `objLastEdit` DESC LIMIT 12");
$upd_art = array();
while ($row = mysql_fetch_assoc($result)) {
    if ($isExtras) {
        $upd_art["upd_" . $row["updType"] . "_" . $row["updObj"] . "_" . $row["updUser"]] = $row;
    } else {
        $upd_art["artupd_" . $row["updObj"]] = $row;
开发者ID:brocococonut,项目名称:yGallery,代码行数:30,代码来源:mod_artview1.php



注:本文中的getUserAvatar函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getUserByEmail函数代码示例发布时间:2022-05-15
下一篇:
PHP getUserAttributeValues函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap