本文整理汇总了PHP中getAvatar函数的典型用法代码示例。如果您正苦于以下问题:PHP getAvatar函数的具体用法?PHP getAvatar怎么用?PHP getAvatar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAvatar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: refreshProfile
function refreshProfile()
{
$t = getTwitter();
$user = $t->veverify();
$time = $_SERVER['REQUEST_TIME'] + 3600 * 24 * 365;
setcookie('friends_count', $user->friends_count, $time, '/');
setcookie('statuses_count', $user->statuses_count, $time, '/');
setcookie('followers_count', $user->followers_count, $time, '/');
setcookie('imgurl', getAvatar($user->profile_image_url), $time, '/');
setcookie('name', $user->screen_name, $time, '/');
setcookie('listed_count', $user->listed_count, $time, '/');
}
示例2: getAction
public function getAction()
{
if (empty($_SERVER['HTTP_X_REQUESTED_WITH'])) {
error404();
}
$model = new ChatModel();
$dialog = '';
$userList = '';
$lastMessageID = getSession('chat_lmid', false);
$chatList = $model->getChatMessages('chat', 'ASC', $lastMessageID);
if ($chatList) {
foreach ($chatList as $value) {
$msg = ' ' . $value['message'];
if (strpos($msg, Request::getParam('user')->nickname) !== false) {
$color = ' chat_your_msg';
} else {
$color = false;
}
$dialog .= '<div class="chat_message' . $color . '">' . '<div class="chat_img"><a href="' . url($value['uid']) . '" target="_blank"><img src="' . getAvatar($value['uid'], 's') . '"></a></div>' . '<div class="chat_text">' . '<div><span class="chat_nickname" onclick="chatNickname(\'' . $value['uName'] . '\');">' . $value['uName'] . '</span> <span class="chat_time">' . printTime($value['time']) . '</span></div>' . '<div>' . $value['message'] . '</div>' . '</div>' . '</div>';
setSession('chat_lmid', $value['id']);
}
}
unset($chatList);
/*
if (time()%5 == 0 OR getSession('chat_ses') == 0) {
$listUserOnline = $model->getUserOnline();
$countUser = 0;
while ($list = mysqli_fetch_object($listUserOnline)) {
$userList .= '<li><a href="' . url($list->id) . '" target="_blank"><span>' . $list->nickname . '</span><span class="level-icon">' . $list->level . '</span></a></li>';
$countUser++;
}
$response['userList'] = $userList;
$response['countUser'] = $countUser;
}
*/
$response['error'] = 0;
if ($dialog) {
$response['target_a']['#dialog'] = $dialog;
}
setSession('chat_ses', 1);
echo json_encode($response);
exit;
}
示例3: readerWall
function readerWall($db, $options)
{
$html = "";
$time = Typecho_Date::gmtTime() - 31536000;
$result = $db->fetchAll($db->select('author, mail, url, count(author) as cnt')->from('table.comments')->where('status = ?', 'approved')->where('created >= ?', $time)->where('ownerId <> authorId')->group('author')->limit(3)->order('cnt', Typecho_Db::SORT_DESC));
if (!empty($result)) {
$html = "<div class=\"dearreaders\"><h3>评论先锋队</h3><div>";
if (isset($result[1])) {
$html .= "<a rel=\"external nofollow\" href=\"" . (empty($result[1]['url']) ? "#" : $result[1]['url']) . "\" target=\"_blank\"><img alt=\"\" src=\"" . getAvatar(60, $result[1]["mail"]) . "\" class=\"lazy avatar\" height=\"60\" width=\"60\" /><b class=\"name\">" . htmlspecialchars($result[1]["author"]) . "</b><i class=\"count\">2nd</i></a>";
}
$html .= "<a rel=\"external nofollow\" href=\"" . (empty($result[0]['url']) ? "#" : $result[0]['url']) . "\" target=\"_blank\"><img alt=\"\" src=\"" . getAvatar(80, $result[0]["mail"]) . "\" class=\"lazy avatar\" height=\"80\" width=\"80\" /><b class=\"name\">" . htmlspecialchars($result[0]["author"]) . "</b><i class=\"count\">1st</i></a>";
if (isset($result[2])) {
$html .= "<a rel=\"external nofollow\" href=\"" . (empty($result[2]['url']) ? "#" : $result[2]['url']) . "\" target=\"_blank\"><img alt=\"\" src=\"" . getAvatar(60, $result[2]["mail"]) . "\" class=\"lazy avatar\" height=\"60\" width=\"60\" /><b class=\"name\">" . htmlspecialchars($result[2]["author"]) . "</b><i class=\"count\">3rd</i></a>";
}
$html .= "</div></div>";
}
return $html;
}
示例4: formatConversation
function formatConversation($status_id)
{
global $t;
global $user_id;
global $reply_to_id;
$status = $t->showStatus($status_id);
if (!isset($status->user)) {
return "";
}
$user = $status->user;
if ($reply_to_id == "") {
$reply_to_id = $user->id;
}
$date = format_time($status->created_at);
$text = formatEntities($status->entities, isset($status->extended_entities) ? $status->extended_entities : null, $status->text);
$end = !isset($status->in_reply_to_user_id) || $user_id != $status->in_reply_to_user_id && $reply_to_id != $status->in_reply_to_user_id;
$html = '<li class="round">
<span class="status_author">
<a href="user.php?id=' . $user->screen_name . '" target="_blank"><img src="' . getAvatar($user->profile_image_url) . '" style="height: 30px; width: 30px;"></a>
</span>
<span class="status_body">
<span class="status_id">' . $status_id . '</span>
<span class="status_word" style="font-size: 12px;"><a class="user_name" href="user.php?id=' . $user->screen_name . '" id="' . $user->screen_name . '">' . ($_COOKIE['shownick'] == 'true' ? $user->name : $user->screen_name) . '</a> <span class="tweet">' . $text['text'] . '</span></span>' . '<span class="extended_entities">' . $text['extended'] . '</span>' . '<span class="status_info" style="font-size: 11px; margin: 0px;">';
if ($end && isset($status->in_reply_to_user_id)) {
$html .= '<span class="in_reply_to"> <a class="ajax_reply" href="ajax/status.php?id=' . $status->in_reply_to_status_id_str . '&uid=' . $user->id . '">in reply to ' . $status->in_reply_to_screen_name . '</a></span>';
}
$html .= '<span class="source">via ' . $status->source . '</span>
<span class="date"><a href="status.php?id=' . $status->id_str . '" id="' . $date . '" target="_blank">' . date('Y-m-d H:i:s', $date) . '</a></span>
</span>
</span>
</li>';
if (!$end) {
$html .= formatConversation($status->in_reply_to_status_id_str);
}
return $html;
}
示例5: getGuestDetails
if ($guestsMode && $fetchid >= 10000000) {
$sql = getGuestDetails($fetchid);
}
$query = mysql_query($sql);
if (defined('DEV_MODE') && DEV_MODE == '1') {
echo mysql_error();
}
$chat = mysql_fetch_array($query);
if ($time - processTime($chat['lastactivity']) < ONLINE_TIMEOUT && $chat['status'] != 'invisible' && $chat['status'] != 'offline') {
if ($chat['status'] != 'busy' && $chat['status'] != 'away') {
$chat['status'] = 'available';
}
} else {
$chat['status'] = 'offline';
}
if ($chat['message'] == null) {
$chat['message'] = $status[$chat['status']];
}
$link = getLink($chat['link']);
$avatar = getAvatar($chat['avatar']);
if (function_exists('processName')) {
$chat['username'] = processName($chat['username']);
}
$response = array('id' => $chat['userid'], 'n' => $chat['username'], 's' => $chat['status'], 'm' => $chat['message'], 'a' => $avatar, 'l' => $link);
header('Content-type: application/json; charset=utf-8');
if (!empty($_GET['callback'])) {
echo $_GET['callback'] . '(' . json_encode($response) . ')';
} else {
echo json_encode($response);
}
exit;
示例6: invite
function invite()
{
global $userid;
global $avchat_language;
global $language;
global $embed;
global $embedcss;
global $lightboxWindows;
global $guestsMode;
global $cookiePrefix;
global $chromeReorderFix;
if ($lightboxWindows == '1') {
$embed = 'web';
$embedcss = 'embed';
}
$status['available'] = $language[30];
$status['busy'] = $language[31];
$status['offline'] = $language[32];
$status['invisible'] = $language[33];
$status['away'] = $language[34];
$id = $_GET['roomid'];
if (empty($id)) {
exit;
}
$time = getTimeStamp();
$buddyList = array();
$onlineCacheKey = 'all_online';
if ($userid > 10000000) {
$onlineCacheKey .= 'guest';
}
if ($onlineUsers = getCache($cookiePrefix . $onlineCacheKey, 30)) {
$buddyList = unserialize($onlineUsers);
} else {
$sql = getFriendsList($userid, $time);
if ($guestsMode) {
$sql = getGuestsList($userid, $time, $sql);
}
$query = mysqli_query($GLOBALS['dbh'], $sql);
if (defined('DEV_MODE') && DEV_MODE == '1') {
echo mysqli_error($GLOBALS['dbh']);
}
while ($chat = mysqli_fetch_assoc($query)) {
if ($time - processTime($chat['lastactivity']) < ONLINE_TIMEOUT && $chat['status'] != 'invisible' && $chat['status'] != 'offline' || $chat['isdevice'] == 1) {
if ($chat['status'] != 'busy' && $chat['status'] != 'away') {
$chat['status'] = 'available';
}
} else {
$chat['status'] = 'offline';
}
$avatar = getAvatar($chat['avatar']);
if (!empty($chat['username'])) {
if (function_exists('processName')) {
$chat['username'] = processName($chat['username']);
}
if ($chat['userid'] != $userid) {
$buddyList[$chromeReorderFix . $chat['userid']] = array('id' => $chat['userid'], 'n' => $chat['username'], 'a' => $avatar, 's' => $chat['status']);
}
}
}
}
if (DISPLAY_ALL_USERS == 0 && MEMCACHE != 0) {
$tempBuddyList = array();
if ($onlineFrnds = getCache($cookiePrefix . 'friend_ids_of_' . $userid, 30)) {
$friendIds = unserialize($onlineFrnds);
} else {
$sql = getFriendsIds($userid);
$res = mysqli_query($GLOBALS['dbh'], $sql);
$result = mysqli_fetch_assoc($res);
if (!empty($result['friends'])) {
$friendIds = explode(',', $result['friends']);
}
setCache($cookiePrefix . 'friend_ids_of_' . $userid, serialize($friendIds), 30);
}
foreach ($friendIds as $friendId) {
$friendId = $chromeReorderFix . $friendId;
if (isset($buddyList[$friendId])) {
$tempBuddyList[$friendId] = $buddyList[$friendId];
}
}
$buddyList = $tempBuddyList;
}
if (function_exists('hooks_forcefriends') && is_array(hooks_forcefriends())) {
$buddyList = array_merge(hooks_forcefriends(), $buddyList);
}
$s['available'] = '';
$s['away'] = '';
$s['busy'] = '';
$s['offline'] = '';
foreach ($buddyList as $buddy) {
$s[$buddy['s']] .= '<div class="invite_1"><div class="invite_2" onclick="javascript:document.getElementById(\'check_' . $buddy['id'] . '\').checked = document.getElementById(\'check_' . $buddy['id'] . '\').checked?false:true;"><img height=30 width=30 src="' . $buddy['a'] . '"></div><div class="invite_3" onclick="javascript:document.getElementById(\'check_' . $buddy['id'] . '\').checked = document.getElementById(\'check_' . $buddy['id'] . '\').checked?false:true;"><span class="invite_name">' . $buddy['n'] . '</span><br/><span class="invite_5">' . $status[$buddy['s']] . '</span></div><input type="checkbox" name="invite[]" value="' . $buddy['id'] . '" id="check_' . $buddy['id'] . '" class="invite_4"></div>';
}
$inviteContent = '';
$invitehide = '';
$inviteContent = $s['available'] . "" . $s['away'] . "" . $s['offline'];
if (empty($inviteContent)) {
$inviteContent = $avchat_language[25];
$invitehide = 'style="display:none;"';
}
echo <<<EOD
<!DOCTYPE html>
//.........这里部分代码省略.........
示例7: getBuddyList
function getBuddyList()
{
global $response;
global $userid;
global $db;
global $status;
global $hideOffline;
global $plugins;
global $guestsMode;
$time = getTimeStamp();
$buddyList = array();
if (empty($_SESSION['cometchat']['cometchat_buddytime']) || $_REQUEST['initialize'] == 1 || $_REQUEST['f'] == 1 || !empty($_SESSION['cometchat']['cometchat_buddytime']) && $time - $_SESSION['cometchat']['cometchat_buddytime'] >= REFRESH_BUDDYLIST) {
if ($_REQUEST['initialize'] == 1 && !empty($_SESSION['cometchat']['cometchat_buddyblh']) && $time - $_SESSION['cometchat']['cometchat_buddytime'] < REFRESH_BUDDYLIST) {
$response['buddylist'] = $_SESSION['cometchat']['cometchat_buddyresult'];
$response['blh'] = $_SESSION['cometchat']['cometchat_buddyblh'];
} else {
$blockList = array();
if (in_array('block', $plugins)) {
$sql = "(select toid as id from cometchat_block where fromid = '" . mysql_real_escape_string($userid) . "') union (select fromid as id from cometchat_block where toid = '" . mysql_real_escape_string($userid) . "') ";
$query = mysql_query($sql);
while ($user = mysql_fetch_array($query)) {
array_push($blockList, $user['id']);
}
}
$sql = getFriendsList($userid, $time);
if ($guestsMode) {
$sql = getGuestsList($userid, $time, $sql);
}
$query = mysql_query($sql);
if (defined('DEV_MODE') && DEV_MODE == '1') {
echo mysql_error();
}
while ($chat = mysql_fetch_array($query)) {
if (!in_array($chat['userid'], $blockList)) {
if ($time - processTime($chat['lastactivity']) < ONLINE_TIMEOUT && $chat['status'] != 'invisible' && $chat['status'] != 'offline') {
if ($chat['status'] != 'busy' && $chat['status'] != 'away') {
$chat['status'] = 'available';
}
} else {
$chat['status'] = 'offline';
}
if ($chat['message'] == null) {
$chat['message'] = $status[$chat['status']];
}
$link = getLink($chat['link']);
$avatar = getAvatar($chat['avatar']);
if (function_exists('processName')) {
$chat['username'] = processName($chat['username']);
}
if (empty($chat['grp'])) {
$chat['grp'] = '';
}
if (!empty($chat['username']) && ($hideOffline == 0 || $hideOffline == 1 && $chat['status'] != 'offline')) {
$buddyList[] = array('id' => $chat['userid'], 'n' => $chat['username'], 's' => $chat['status'], 'm' => $chat['message'], 'g' => $chat['grp'], 'a' => $avatar, 'l' => $link);
}
}
}
if (function_exists('hooks_forcefriends') && is_array(hooks_forcefriends())) {
$buddyList = array_merge(hooks_forcefriends(), $buddyList);
}
$buddyOrder = array();
$buddyGroup = array();
$buddyStatus = array();
$buddyName = array();
$buddyGuest = array();
foreach ($buddyList as $key => $row) {
if (empty($row['g'])) {
$row['g'] = '';
}
$buddyGroup[$key] = strtolower($row['g']);
$buddyStatus[$key] = strtolower($row['s']);
$buddyName[$key] = strtolower($row['n']);
if ($row['g'] == '') {
$buddyOrder[$key] = 1;
} else {
$buddyOrder[$key] = 0;
}
$buddyGuest[$key] = 0;
if ($row['id'] > 10000000) {
$buddyGuest[$key] = 1;
}
}
array_multisort($buddyOrder, SORT_ASC, $buddyGroup, SORT_STRING, $buddyStatus, SORT_STRING, $buddyGuest, SORT_ASC, $buddyName, SORT_STRING, $buddyList);
$_SESSION['cometchat']['cometchat_buddytime'] = $time;
$blh = md5(serialize($buddyList));
if (empty($_REQUEST['blh']) || !empty($_REQUEST['blh']) && $blh != $_REQUEST['blh']) {
$response['buddylist'] = $buddyList;
$response['blh'] = $blh;
}
$_SESSION['cometchat']['cometchat_buddyresult'] = $buddyList;
$_SESSION['cometchat']['cometchat_buddyblh'] = $blh;
}
}
}
示例8: define
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
define('BLOB_WEB_PAGE_TO_ROOT', '../');
require_once BLOB_WEB_PAGE_TO_ROOT . 'blob/includes/blobPage.inc.php';
blobPageStartup(array('authenticated'));
$page = blobPageNewGrab();
blobDatabaseConnect();
$user = blobCurrentUser();
$user_id = blobGetUserID($user);
if (isset($_GET['user'])) {
$page['title'] .= $page['title_separator'] . 'Follow User';
$page['page_id'] = 'followuser';
$user = $_GET['user'];
$user = mysql_real_escape_string($user);
// Check if the user exists
if (!blobExistUser($user)) {
blobMessagePush("'" . $user . "' does not exist!");
blobRedirect('follow.php');
}
$fullName = blobGetUserFullName($user);
$avatar = getAvatar($user);
$followHTML = blobFollowUser($user);
$profilepage = BLOB_WEB_PAGE_TO_ROOT . 'profile/view.php?user=' . $user;
$page['body'] .= "\r\n<div class=\"body_padded\">\r\n\t<h2>Following User: {$user}</h2>\r\n\r\n\t<div class=\"vulnerable_code_area\">\r\n\t\t<div style=\"float: left; padding-right: 10px; border-right: 2px solid #C0C0C0;\">\r\n\t\t\t<img src=\"{$avatar}\" width=\"100\" />\r\n\t\t</div>\r\n\t\t<div style=\"margin-left: 120px;\">\r\n\t\t\t" . blobInternalLinkUrlGet($profilepage, $fullName) . "\r\n\t\t\t<br /><br />\r\n\t\t\t{$followHTML}\r\n\t\t\t<br /><br />\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<br />\r\n\t<b>View user's profile:</b> " . blobInternalLinkUrlGet($profilepage, $fullName) . "\r\n\t<br /><br /><br />\r\n\r\n</div>\r\n";
} else {
$page['title'] .= $page['title_separator'] . 'User List';
$page['page_id'] = 'othersprofile';
$page['body'] .= "\r\n<div class=\"body_padded\">\r\n\t<h2>User List</h2>\r\n\r\n\t" . blobUserList() . "\r\n\t<br /> <br />\r\n\r\n</div>\r\n";
}
blobHtmlEcho($page);
示例9: while
<div class="box_right">
<?php
if ($this->rightList->num_rows > 0) {
while ($list = mysqli_fetch_object($this->rightList)) {
$count = false;
if ($list->uid1 == Request::getParam('user')->id) {
$user = $list->uid2;
if ($list->countMsg1 > 0) {
$count = '<div class="mail_count">+' . $list->countMsg1 . '</div>';
}
} else {
$user = $list->uid1;
if ($list->countMsg2 > 0) {
$count = '<div class="mail_count">+' . $list->countMsg2 . '</div>';
}
}
echo '<div class="mail_box mail_link">' . '<a href="{URL:mail' . $user . '}"></a>' . $count . '<div class="mail_image"><img src="' . getAvatar($user, 's') . '"></div>' . '<div class="mail_name">' . $list->nickname . '</div>' . '<div class="mail_msg"><span class="mail_time">' . printTime($list->time) . '</span></div>' . '</div>';
}
} else {
echo '{L:INDEX_NO_DIALOGS}';
}
?>
</div>
示例10: getBuddyList
function getBuddyList()
{
global $response;
global $userid;
global $db;
global $status;
global $hideOffline;
global $plugins;
global $guestsMode;
global $cookiePrefix;
global $chromeReorderFix;
$time = getTimeStamp();
$buddyList = array();
if (empty($_SESSION['cometchat']['cometchat_buddytime']) || $_REQUEST['initialize'] == 1 || $_REQUEST['f'] == 1 || !empty($_SESSION['cometchat']['cometchat_buddytime']) && ($time - $_SESSION['cometchat']['cometchat_buddytime'] >= REFRESH_BUDDYLIST || MEMCACHE != 0)) {
if ($_REQUEST['initialize'] == 1 && !empty($_SESSION['cometchat']['cometchat_buddyblh']) && $time - $_SESSION['cometchat']['cometchat_buddytime'] < REFRESH_BUDDYLIST) {
$response['buddylist'] = $_SESSION['cometchat']['cometchat_buddyresult'];
$response['blh'] = $_SESSION['cometchat']['cometchat_buddyblh'];
} else {
$onlineCacheKey = 'all_online';
if ($userid > 10000000) {
$onlineCacheKey .= 'guest';
}
if ($onlineUsers = getCache($cookiePrefix . $onlineCacheKey, 30)) {
$buddyList = unserialize($onlineUsers);
} else {
$sql = getFriendsList($userid, $time);
if ($guestsMode) {
$sql = getGuestsList($userid, $time, $sql);
}
$query = mysqli_query($GLOBALS['dbh'], $sql);
if (defined('DEV_MODE') && DEV_MODE == '1') {
echo mysqli_error($GLOBALS['dbh']);
}
while ($chat = mysqli_fetch_assoc($query)) {
if (($time - processTime($chat['lastactivity']) < ONLINE_TIMEOUT || $chat['isdevice'] == 1) && $chat['status'] != 'invisible' && $chat['status'] != 'offline') {
if ($chat['status'] != 'busy' && $chat['status'] != 'away' || $chat['isdevice'] == 1) {
$chat['status'] = 'available';
}
} else {
$chat['status'] = 'offline';
}
if ($chat['message'] == null) {
$chat['message'] = $status[$chat['status']];
}
$link = fetchLink($chat['link']);
$avatar = getAvatar($chat['userid']);
if (function_exists('processName')) {
$chat['username'] = processName($chat['username']);
}
if (empty($chat['grp'])) {
$chat['grp'] = '';
}
if (!empty($chat['username']) && ($hideOffline == 0 || $hideOffline == 1 && $chat['status'] != 'offline')) {
$buddyList[$chromeReorderFix . $chat['userid']] = array('id' => $chat['userid'], 'n' => $chat['username'], 'l' => $link, 'a' => $avatar, 'd' => $chat['isdevice'], 's' => $chat['status'], 'm' => $chat['message'], 'g' => $chat['grp']);
}
}
setCache($cookiePrefix . $onlineCacheKey, serialize($buddyList), 30);
}
if (DISPLAY_ALL_USERS == 0 && MEMCACHE != 0) {
$tempBuddyList = array();
$friendIds = array();
if ($onlineFrnds = getCache($cookiePrefix . 'friend_ids_of_' . $userid, 30)) {
$friendIds = unserialize($onlineFrnds);
} else {
$sql = getFriendsIds($userid);
$res = mysqli_query($GLOBALS['dbh'], $sql);
$result = mysqli_fetch_assoc($res);
if (!empty($result['myfrndids'])) {
$friendIds = explode(',', $result['myfrndids']);
}
setCache($cookiePrefix . 'friend_ids_of_' . $userid, serialize($friendIds), 30);
}
foreach ($friendIds as $friendId) {
$friendId = $chromeReorderFix . $friendId;
if (isset($buddyList[$friendId])) {
$tempBuddyList[$friendId] = $buddyList[$friendId];
}
}
$buddyList = $tempBuddyList;
}
$blockList = array();
if (in_array('block', $plugins)) {
$blockId = array();
if ($blockedUsers = getCache($cookiePrefix . 'blocked_id_of_' . $userid, 30)) {
$blockId = unserialize($blockedUsers);
} else {
$sql = "select group_concat(blockedid) blockedids from (select fromid as blockedid from cometchat_block where toid = '" . mysqli_real_escape_string($GLOBALS['dbh'], $userid) . "' UNION select toid as blockedid from cometchat_block where fromid = '" . mysqli_real_escape_string($GLOBALS['dbh'], $userid) . "') as blocked";
$query = mysqli_query($GLOBALS['dbh'], $sql);
$blockIds = mysqli_fetch_assoc($query);
if (!empty($blockIds['blockedids'])) {
$blockId = explode(',', $blockIds['blockedids']);
}
setCache($cookiePrefix . 'blocked_id_of_' . $userid, serialize($blockId), 3600);
}
foreach ($blockId as $bid) {
array_push($blockList, $bid);
if (isset($buddyList[$chromeReorderFix . $bid])) {
unset($buddyList[$chromeReorderFix . $bid]);
}
}
//.........这里部分代码省略.........
示例11: redirect
<?php
require '../../global.php';
//验证是否登入
if (!checkLogin()) {
redirect('../error.php?code=' . $errorcode['noLogin']);
}
$avatar = '../../' . getAvatar(session('member_id'), 'l');
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>设置头像</title>
<?php
include 'sysapp/global_css.php';
?>
<link rel="stylesheet" href="../../img/ui/sys.css">
<script>
function avatar_success(){
window.parent.HROS.navbar.getAvatar();
alert('头像保存成功');
location.reload();
}
</script>
</head>
<body>
<div style="width:530px;margin:0 auto">
<embed src="../../libs/avatar_face/face.swf" quality="high" wmode="opaque" FlashVars="defaultImg=<?php
echo $avatar;
示例12: ProfileModel
$pageLocalModel = new ProfileModel();
$stamina = 0;
$uid = Request::getParam('user')->id;
$pageLocalModel->checkStamina($uid);
$stamina = $pageLocalModel->getStamina($uid);
$staminaMax = $pageLocalModel->getStaminaMax($uid);
$staminaPercent = $stamina * 100 / $staminaMax;
$staminaPercent = $staminaPercent < 0 ? 0 : $staminaPercent;
?>
<a href="{URL:/main}"><div class="logo"></div></a>
<?php
if (Request::getParam('user')->id) {
echo '<div class="profile_bar">';
echo '<div class="nav_profile">';
echo '<img class="avatar" src="' . getAvatar(Request::getParam('user')->id) . '" alt="Avatar" />';
echo '<div class="nav_profile_name"><a href="' . url(Request::getParam('user')->id) . '">' . Request::getParam('user')->nickname . '</a></div>';
echo '<div class="stamina-bar"><div class="full" style="width:' . $staminaPercent . '%"></div></div>';
echo '</div>';
echo '<ul class="nav_personal">';
echo '<li class="friends-icon"><a href="' . url('friends') . '" title="{L:FRIENDS}">' . (Request::getParam('countRequests') > 0 ? '(+' . Request::getParam('countRequests') . ')' : '') . '</a></li>';
echo '<li class="mail-icon"><a href="' . url('mail') . '" title="{L:MAIL}">' . (Request::getParam('countMsg') > 0 ? '(+' . Request::getParam('countMsg') . ')' : '') . '</a></li>';
echo '<li class="settings-icon"><a href="' . url('settings') . '" title="{L:SETTINGS}"></a></li>';
echo '<li class="exit-icon"><a href="' . url('profile', 'exit') . '" title="{L:EXIT}"></a></li>';
echo '</ul>';
echo '</div>';
echo '<div class="nav_menu">';
if (Request::getRole() == 'moder' or Request::getRole() == 'admin') {
echo '<a class="admin-panel" href="{URL:admin}">{L:ADMIN_PANEL}</a>';
}
echo '<a class="matches" href="{URL:matches}">{L:MENU_MATCHES}' . (Request::getParam('countChallenges') > 0 ? ' (+' . Request::getParam('countChallenges') . ')' : '') . '</a>';
示例13: unban
function unban()
{
global $userid;
global $chatrooms_language;
global $language;
global $embed;
global $embedcss;
global $guestsMode;
global $basedata;
global $chromeReorderFix;
$status['available'] = $language[30];
$status['busy'] = $language[31];
$status['offline'] = $language[32];
$status['invisible'] = $language[33];
$status['away'] = $language[34];
$id = $_GET['roomid'];
$inviteid = $_GET['inviteid'];
$roomname = $_GET['roomname'];
$popoutmode = $_GET['popoutmode'];
$time = getTimeStamp();
$buddyList = array();
$sql = "select DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " link, " . DB_AVATARFIELD . " avatar, cometchat_status.lastactivity lastactivity, cometchat_status.status, cometchat_status.message from " . TABLE_PREFIX . DB_USERTABLE . " left join cometchat_status on " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = cometchat_status.userid right join cometchat_chatrooms_users on " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " =cometchat_chatrooms_users.userid " . DB_AVATARTABLE . " where " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " <> '" . mysqli_real_escape_string($GLOBALS['dbh'], $userid) . "' and cometchat_chatrooms_users.chatroomid = '" . mysqli_real_escape_string($GLOBALS['dbh'], $id) . "' and cometchat_chatrooms_users.isbanned ='1' order by username asc";
if ($guestsMode) {
$sql = getChatroomBannedGuests($id, $time, $sql);
}
$query = mysqli_query($GLOBALS['dbh'], $sql);
if (defined('DEV_MODE') && DEV_MODE == '1') {
echo mysqli_error($GLOBALS['dbh']);
}
while ($chat = mysqli_fetch_assoc($query)) {
$avatar = getAvatar($chat['avatar']);
if (!empty($chat['username'])) {
if (function_exists('processName')) {
$chat['username'] = processName($chat['username']);
}
$buddyList[$chromeReorderFix . $chat['userid']] = array('id' => $chat['userid'], 'n' => $chat['username'], 'a' => $avatar);
}
}
$s['count'] = '';
foreach ($buddyList as $buddy) {
$s['count'] .= '<div class="invite_1"><div class="invite_2" onclick="javascript:document.getElementById(\'check_' . $buddy['id'] . '\').checked = document.getElementById(\'check_' . $buddy['id'] . '\').checked?false:true;"><img height=30 width=30 src="' . $buddy['a'] . '" /></div><div class="invite_3" onclick="javascript:document.getElementById(\'check_' . $buddy['id'] . '\').checked = document.getElementById(\'check_' . $buddy['id'] . '\').checked?false:true;"><span class="invite_name">' . $buddy['n'] . '</span><br/></div><input type="checkbox" name="unban[]" value="' . $buddy['id'] . '" id="check_' . $buddy['id'] . '" class="invite_4" /></div>';
}
if ($s['count'] == '') {
$s['count'] = $chatrooms_language[44];
}
echo <<<EOD
<!DOCTYPE html>
<html>
\t<head>
\t\t<title>{$chatrooms_language[21]}</title>
\t\t<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
\t\t<link type="text/css" rel="stylesheet" media="all" href="../../css.php?type=module&name=chatrooms" />
\t</head>
\t<body>
\t\t<form method="post" action="chatrooms.php?action=unbanusers&embed={$embed}&basedata={$basedata}&popoutmode={&popoutmode}">
\t\t\t<div class="container">
\t\t\t\t<div class="container_title {$embedcss}">{$chatrooms_language[21]}</div>
\t\t\t\t<div class="container_body {$embedcss}">
\t\t\t\t\t{$s['count']}
\t\t\t\t\t<div style="clear:both"></div>
\t\t\t\t</div>
\t\t\t\t<div class="container_sub {$embedcss}">
\t\t\t\t\t<input type=submit value="Unban Users" class="invitebutton" />
\t\t\t\t</div>
\t\t\t</div>
\t\t\t<input type="hidden" name="roomid" value="{$id}" />
\t\t\t<input type="hidden" name="inviteid" value="{$inviteid}" />
\t\t\t<input type="hidden" name="roomname" value="{$roomname}" />
\t\t</form>
\t</body>
</html>
EOD;
}
示例14: get_chatAction
public function get_chatAction()
{
if (empty($_SERVER['HTTP_X_REQUESTED_WITH'])) {
error404();
}
$model = new ProfileModel();
$dialog = '';
$mid = post('mid', 'int');
$sesMID = getSession('match_' . $mid, false);
if ($mid == $sesMID) {
$lastMessageID = getSession('match_chat_lid' . $sesMID, false);
$listMessage = $model->getChatMessages($sesMID, $lastMessageID);
while ($list = mysqli_fetch_object($listMessage)) {
$value = (array) $list;
$dialog .= '<div class="chat_message">' . '<div class="chat_img"><a href="' . url($value['uid']) . '" target="_blank"><img src="' . getAvatar($value['uid'], 's') . '"></a></div>' . '<div class="chat_text">' . '<div><span class="chat_nickname" onclick="chatNickname(\'' . $value['uName'] . '\');">' . $value['uName'] . '</span> <span class="chat_time">' . printTime($value['time']) . '</span></div>' . '<div>' . $value['message'] . '</div>' . '</div>' . '</div>';
setSession('match_chat_lid' . $sesMID, $list->id);
}
unset($list);
$response['error'] = 0;
$response['target_a']['#dialog'] = $dialog;
}
echo json_encode($response);
exit;
}
示例15: __
</div>
<div id="sidebar">
<div id="ultimos-usuarios">
<h3><?php
echo __('Últimos en llegar a Voota');
?>
</h3>
<ol>
<?php
foreach ($lastUsers as $user) {
?>
<li>
<?php
echo getAvatar($user, 19, 19);
echo link_to(fullName($user), '@usuario?username=' . $user->getProfile()->getVanity());
?>
</li>
<?php
}
?>
</ol>
</div>
<div id="rss">
<img src="/images/rss.png" alt="RSS" />
<a href="<?php
echo url_for($sf_request->getAttribute('rssFeed'));
?>
"><?php