当前位置: 首页>>代码示例>>PHP>>正文


PHP GetAvatar函数代码示例

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


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

示例1: foreach

	</div>
	<div class="main-box home-box-list">
		<?php 
foreach ($TopicsArray as $Topic) {
    ?>
		<div class="post-list">
			<div class="item-avatar">
				<a href="<?php 
    echo $Config['WebsitePath'];
    ?>
/u/<?php 
    echo $Topic['UserName'];
    ?>
" target="_blank">
						<?php 
    echo GetAvatar($Topic['UserID'], $Topic['UserName'], 'middle');
    ?>
					</a>
			</div>
			<div class="item-content">
				<h2>
					<a href="<?php 
    echo $Config['WebsitePath'];
    ?>
/t/<?php 
    echo $Topic['ID'];
    ?>
" target="_blank"><?php 
    echo $Topic['Topic'];
    ?>
</a>
开发者ID:godfly,项目名称:Carbon-Forum,代码行数:31,代码来源:favorite_tags.php

示例2: foreach

    ?>
</a></li>
	</ul>
<?php 
}
foreach ($PostsArray as $key => $Post) {
    ?>
<div class="card carbonforum-card">
	<div class="card-header">
		<div class="carbonforum-avatar">
			<a href="<?php 
    echo $Config['WebsitePath'] . '/u/' . urlencode($Post['UserName']);
    ?>
">
				<?php 
    echo GetAvatar($Post['UserID'], $Post['UserName'], 'small');
    ?>
			</a>
		</div>
		<div class="carbonforum-name"><?php 
    echo $Post['UserName'];
    ?>
</div>
		<div class="carbonforum-date"><?php 
    echo FormatTime($Post['PostTime']);
    ?>
</div>
	</div>
	<div class="card-header">
		<a href="<?php 
    echo $Config['WebsitePath'];
开发者ID:richardcj,项目名称:Carbon-Forum,代码行数:31,代码来源:favorite_users.php

示例3: urlencode

        ?>
"><?php 
        echo $Lang['Log_Out'];
        ?>
</a></span></div>
	<div class="sider-box-content">
		<div class="User-Pannel-Avatar">
			<a href="<?php 
        echo $Config['WebsitePath'];
        ?>
/u/<?php 
        echo urlencode($CurUserName);
        ?>
">
				<?php 
        echo GetAvatar($CurUserID, $CurUserName, 'large');
        ?>
			</a>
		</div>
		<div class="User-Pannel">
			<div class="User-Pannel-Name">
				<a href="<?php 
        echo $Config['WebsitePath'];
        ?>
/u/<?php 
        echo urlencode($CurUserName);
        ?>
"><?php 
        echo $CurUserName;
        ?>
</a>
开发者ID:richardcj,项目名称:Carbon-Forum,代码行数:31,代码来源:sider.php

示例4: urlencode

</a>
	</li>
	<li class="divider"><?php 
    echo $Lang['User_Panel'];
    ?>
</li>
	<li>
		<a href="<?php 
    echo $Config['WebsitePath'];
    ?>
/u/<?php 
    echo urlencode($CurUserName);
    ?>
">
			<?php 
    echo GetAvatar($CurUserID, $CurUserName, 'small');
    ?>
&nbsp;&nbsp;<span style="line-height:24px;vertical-align: top;font-size:20px;font-weight:bold;"><?php 
    echo $CurUserName;
    ?>
</span>
		</a>
	</li>
	<li>
		<a class="icon message" href="<?php 
    echo $Config['WebsitePath'];
    ?>
/notifications" data-refresh="true">
			<?php 
    echo $Lang['Notifications'];
    ?>
开发者ID:MrMoDoor,项目名称:Carbon-Forum,代码行数:31,代码来源:sider.php

示例5: ShowGalaxyRows


//.........这里部分代码省略.........
        }
        //Controllo se il giocatore � Inattivo
        if ($GalaxyRowPlayer['onlinetime'] < time() - 60 * 60 * 24 * 7) {
            //Inattivo da 7 Giorni
            $parse['player_name'] = "<font color=#999999>" . $GalaxyRowPlayer['username'] . "&nbsp; ( i )</font>";
        }
        if ($GalaxyRowPlayer['onlinetime'] < time() - 60 * 60 * 24 * 28) {
            //Inattivo da 28 Giorni
            $parse['player_name'] = "<font color=#666666>" . $GalaxyRowPlayer['username'] . "&nbsp; ( i I )</font>";
        }
        $parse['player_id'] = $GalaxyRowPlayer['id'];
        //Alliance
        $Alliance = false;
        if ($GalaxyRowPlayer["ally_id"] > 0) {
            $Alliance = true;
            $GalaxyRowAlly = doquery("SELECT * FROM {{table}} WHERE `id` = '" . $GalaxyRowPlayer["ally_id"] . "' ;", 'alliance', true);
            $parse['ally_name'] = $GalaxyRowAlly["ally_name"];
            $parse['ally_tag'] = $GalaxyRowAlly["ally_tag"];
            $parse['ally_id'] = $GalaxyRowAlly["id"];
            $parse['aly_members'] = $GalaxyRowAlly["ally_members"];
        }
        //Planet Number and Name
        $parse['pos'] = $Planet;
        $parse['planet_name_short'] = $GalaxyRowPlanet['name'];
        $parse['planet_name'] = $GalaxyRowPlanet['name'];
        //Debris field.
        $parse['df_metal'] = $GalaxyRowPlanet['debris_m'];
        $parse['df_crystal'] = $GalaxyRowPlanet['debris_c'];
        $parse['df_recs'] = ceil(($parse['df_metal'] + $parse['df_crystal']) / $pricelist[209]['capacity']);
        //Planet Type
        $pt = PlanetType($GalaxyRowPlanet['image']);
        $parse['micro_planet_img'] = "img/planets/micro/" . $pt['type'] . "_" . $pt['subtype'] . "_1.gif";
        //Player Stuff
        $parse['avatar_small'] = '<img src=' . GetAvatar($GalaxyRowPlayer['email'], 50) . ' alt=Player&nbsp;avatar border=0 />';
        //Visualizzo il Rank del Player :
        $Rank = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '" . $GalaxyRowPlayer['id'] . "';", 'statpoints');
        $parse['rank'] = $Rank['total_rank'];
        //$parse['rank'] = "PRIMOOO";
        //Tooltip height
        $parse['tooltip_height'] = 75 + 31 * $Planet;
        //PlanetIMG
        if ($noplanet) {
            $parse['td_microplanet'] = "";
            $parse['td_microplanet_class'] = 'microplanet1';
            $parse['td_microplanet_extra'] = '';
            $parse['td_microplanet_style'] = '';
            $parse['td_playername'] = "";
        } else {
            if ($CanPhalanx && $GalaxyRowPlayer['id'] != $user['id']) {
                //$parse['phalanx'] = "<li><a href=# onclick=loadpage(\'./?page=phalanx\',\'".$lang['Phalanx']."\',\'fleet1\');>".$lang['Phalanx']."</a></li>";
                $parse['phalanx'] = "<li><a href=# onclick=mrbox(\\'./?page=phalanx\\');>" . $lang['Phalanx'] . "</a></li>";
                //(url,width,margintop,title,method)
            } else {
                $parse['phalanx'] = "";
            }
            $parse['td_microplanet'] = parsetemplate(gettemplate('galaxy/microplanet'), $parse);
            $parse['td_microplanet_class'] = 'TTgalaxy microplanet';
            $parse['td_microplanet_extra'] = 'rel="#planet{pos}"';
            $parse['td_microplanet_style'] = 'background:url(' . GAME_SKIN . '/' . $parse['micro_planet_img'] . ') no-repeat top center;';
            $parse['td_playername'] = parsetemplate(gettemplate('galaxy/playername'), $parse);
        }
        //Alliance?
        if ($Alliance) {
            $parse['td_alliance'] = parsetemplate(gettemplate('galaxy/alliance'), $parse);
        }
        //Moon?
开发者ID:sonicmaster,项目名称:RPG,代码行数:67,代码来源:ShowGalaxyRows.php

示例6: foreach

<?php 
    foreach ($PostsArray as $key => $Post) {
        $PostFloor = ($Page - 1) * $Config['PostsPerPage'] + $key;
        ?>
	<div class="comment-item">
		<a name="Post<?php 
        echo $Post['ID'];
        ?>
"></a>
		<div class="comment-avatar">
			<a href="<?php 
        echo $Config['WebsitePath'] . '/u/' . urlencode($Post['UserName']);
        ?>
">
			<?php 
        echo GetAvatar($Post['UserID'], $Post['UserName'], 'middle');
        ?>
			</a>
		</div>
		<div class="comment-data">
			<div class="comment-content">
				<div>
					<div class="float-left text-bold fs14"><a href="<?php 
        echo $Config['WebsitePath'] . '/u/' . urlencode($Post['UserName']);
        ?>
"><?php 
        echo $Post['UserName'];
        ?>
</a></div>
					<span class="float-right grey fs12">
						<?php 
开发者ID:richardcj,项目名称:Carbon-Forum,代码行数:31,代码来源:topic.php

示例7: welive_call


//.........这里部分代码省略.........
                         $guest = APP::$DB->getOne("SELECT ipzone, fromurl, grade, fullname, address, phone, email, remark FROM " . TABLE_PREFIX . "guest WHERE gid = '{$gid}'");
                         if (!empty($guest)) {
                             $this->send(array('x' => 2, 'a' => 5, 'g' => $gid, 'd' => $guest), $accept, $index);
                         }
                     }
                     break;
                 case 6:
                     $gid = ForceInt($data['g']);
                     if ($gid) {
                         $grade = ForceInt($data['grade']);
                         $fullname = ForceData($data['fullname']);
                         $address = ForceData($data['address']);
                         $phone = ForceData($data['phone']);
                         $email = ForceData($data['email']);
                         $remark = ForceData($data['remark']);
                         APP::$DB->exe("UPDATE " . TABLE_PREFIX . "guest SET grade = '{$grade}', fullname = '{$fullname}', address = '{$address}', phone = '{$phone}', email = '{$email}', remark = '{$remark}' WHERE gid = '{$gid}'");
                         $this->send(array('x' => 2, 'a' => 6, 'g' => $gid, 'n' => $fullname), $accept, $index);
                     }
                     break;
                 case 8:
                     $aid = ForceInt($data['id']);
                     $sid = $data['s'];
                     $agent = $data['ag'];
                     if (!$aid or !IsAlnum($sid) or !IsAlnum($agent)) {
                         $this->close($accept, $index, 0);
                         return false;
                     }
                     $sql = "SELECT a.aid, a.type, a.username, a.fullname, a.fullname_en, a.post, a.post_en, a.lastip AS ip FROM " . TABLE_PREFIX . "session s LEFT JOIN " . TABLE_PREFIX . "admin a ON a.aid = s.aid WHERE s.sid    = '{$sid}' AND s.aid = '{$aid}' AND s.agent = '{$agent}' AND a.activated = 1";
                     $admin = APP::$DB->getOne($sql);
                     if (!$admin or !$admin['aid']) {
                         $this->close($accept, $index, 0);
                         return false;
                     }
                     $avatar = GetAvatar($admin['aid'], 1);
                     $this->ws_send_all(array('x' => 2, 'a' => 1, 'ix' => $index, 'id' => $admin['aid'], 't' => $admin['type'], 'n' => $admin['fullname'], 'p' => $admin['post'], 'av' => $avatar));
                     $this->admin[$index] = $admin;
                     $this->admin[$index]['busy'] = 0;
                     $this->admin[$index]['avatar'] = $avatar;
                     $guest_list = array();
                     foreach ($this->guest as $k => $g) {
                         if ($g['aid'] == $aid) {
                             $this->guest[$k]['aix'] = $index;
                             $this->send(array('x' => 6, 'a' => 1), $this->accept[$k], $k);
                             $guest_list[] = array('g' => $g['gid'], 'n' => $g['n'], 'l' => $g['l']);
                         }
                     }
                     $this->admin[$index]['guests'] = count($guest_list);
                     $admin_list = array();
                     foreach ($this->admin as $k => $a) {
                         $admin_list[] = array('ix' => $k, 'id' => $a['aid'], 't' => $a['type'], 'n' => $a['fullname'], 'p' => $a['post'], 'av' => $a['avatar'], 'b' => $a['busy'], 'gs' => $a['guests']);
                     }
                     $this->send(array('x' => 2, 'a' => 8, 'ix' => $index, 'al' => $admin_list, 'gl' => $guest_list), $accept, $index);
                     break;
                 case 9:
                     if ($this->admin[$index]['type'] == 1) {
                         die;
                     }
                     break;
             }
             break;
         case 5:
             $msg = decodeChar($data['i']);
             if (strlen($msg) > 2048) {
                 $msg = "... too long ...";
             }
             if (array_key_exists($index, $this->guest)) {
开发者ID:noikiy,项目名称:meilala,代码行数:67,代码来源:class.Websocket+-+副本.php

示例8: foreach

		<div class="sider-box-title"><?php 
echo $Lang['My_Following_Users'];
?>
</div>
		<div class="sider-box-content btn">
			<?php 
foreach ($UsersFollowing as $User) {
    ?>
			<a href="<?php 
    echo $Config['WebsitePath'];
    ?>
/u/<?php 
    echo urlencode($User['Title']);
    ?>
" target="_blank"><?php 
    echo GetAvatar($User['FavoriteID'], $User['Title'], 'small');
    ?>
&nbsp;&nbsp;<?php 
    echo $User['Title'];
    ?>
</a>
			<?php 
}
?>
		</div>
	</div>
	<?php 
include $TemplatePath . 'sider.php';
?>
</div>
<!-- main-sider end -->
开发者ID:godfly,项目名称:Carbon-Forum,代码行数:31,代码来源:favorite_users.php

示例9: index

    public function index()
    {
        $NumPerPage = 10;
        $page = ForceIntFrom('p', 1);
        $start = $NumPerPage * ($page - 1);
        SubMenu('客服列表', array(array('客服列表', 'users', 1), array('添加客服', 'users/add')));
        $getusers = APP::$DB->query("SELECT * FROM " . TABLE_PREFIX . "admin ORDER BY activated ASC, aid DESC LIMIT {$start},{$NumPerPage}");
        $maxrows = APP::$DB->getOne("SELECT COUNT(aid) AS value FROM " . TABLE_PREFIX . "admin");
        echo '<form method="post" action="' . BURL('users/updateusers') . '" name="usersform">
		<input type="hidden" name="p" value="' . $page . '">';
        TableHeader('共有 ' . $maxrows['value'] . ' 位客服人员');
        TableRow(array('ID', '用户名', '类型', '状态', 'Email', '登录', '昵称 (中)', '职位 (中)', '昵称 (EN)', '职位 (EN)', '注册日期', '最后登陆 (IP)', '<input type="checkbox" id="checkAll" for="deleteaids[]"> <label for="checkAll">删除</label>'), 'tr0');
        while ($user = APP::$DB->fetch($getusers)) {
            TableRow(array($user['aid'], '<a title="编辑" href="' . BURL('users/edit?aid=' . $user['aid']) . '"><img src="' . GetAvatar($user['aid']) . '" class="avatar wh30">' . Iif($user['activated'] == 1, $user['username'], "<font class=red><s>{$user['username']}</s></font>") . '</a>', Iif($user['type'], '<font class=red>管理员</font>', '客服人员'), Iif($user['activated'], '正常', '<font class=red>已禁止</font>'), Iif($user['aid'] == $this->admin['aid'], $user['email'], '<a href="mailto:' . $user['email'] . '">' . $user['email'] . '</a>'), $user['logins'], $user['fullname'], $user['post'], $user['fullname_en'], $user['post_en'], DisplayDate($user['first']), Iif($user['last'] == 0, '<span class="red">从未登陆</span>', DisplayDate($user['last'], '', 1) . " ({$user['lastip']})"), Iif($user['aid'] != $this->admin['aid'], '<input type="checkbox" name="deleteaids[]" value="' . $user['aid'] . '">')));
        }
        $totalpages = ceil($maxrows['value'] / $NumPerPage);
        if ($totalpages > 1) {
            TableRow(GetPageList(BURL('users'), $totalpages, $page));
        }
        TableFooter();
        PrintSubmit('删除客服', '', 1, '确定删除所选客服吗?');
    }
开发者ID:tecshuttle,项目名称:51qsk,代码行数:22,代码来源:users.php

示例10: s_header_menu

    protected function s_header_menu($path = '', $blank = 0)
    {
        if ($blank) {
            $blank = ' target="_blank"';
        } else {
            $blank = '';
        }
        $isAdmin = $this->CheckAccess();
        return '<div id="header">
	<div class="logo" ><img src="' . SYSDIR . 'public/img/logo.gif"></div>
	<div id="ajax-loader"></div>
	<div id="topbar">
		<div id="topmenu">
			<dl class="first"></dl>
			<dl>
				<dt><a href="' . Iif($isAdmin, BURL('messages'), BURL('mymessages')) . '"' . $blank . '>记录</a></dt>
				<dd>
					<div>
						<li class="first last"><a href="' . Iif($isAdmin, BURL('messages'), BURL('mymessages')) . '"' . $blank . '>对话记录列表</a></li>
					</div>
				</dd>
			</dl>
			<dl>
				<dt><a href="' . Iif($isAdmin, BURL('phrases'), BURL('myphrases')) . '"' . $blank . '>短语</a></dt>
				<dd>
					<div>
						<li class="first"><a href="' . Iif($isAdmin, BURL('phrases/add'), BURL('myphrases/add')) . '"' . $blank . '>添加常用短语</a></li>
						<li class="last"><a href="' . Iif($isAdmin, BURL('phrases'), BURL('myphrases')) . '"' . $blank . '>常用短语列表</a></li>
					</div>
				</dd>
			</dl>
			<dl>
				<dt><a href="' . Iif($isAdmin, BURL('users/edit?aid=' . $this->admin['aid']), BURL('myprofile')) . '"' . $blank . '>我的</a></dt>
				<dd>
					<div>
						<li class="first"><a href="' . Iif($isAdmin, BURL('users/edit?aid=' . $this->admin['aid']), BURL('myprofile')) . '"' . $blank . '>编辑我的资料</a></li>
						<li class="last"><a href="' . BURL('avatar') . '"' . $blank . '>上传头像</a></li>
					</div>
				</dd>
			</dl>
			<dl class="last"></dl>
		</div>
		<div id="topuser">
			' . Iif($blank, '<div class="open"><a class="link-btn2 set_busy">挂起</a><a class="link-btn3 set_serving" title="解除挂起进入服务状态, 接受新客人加入.">解除挂起</a></div>') . '
			' . Iif($isAdmin, '<div class="open"><a class="link-btn2 reset_socket" title="重启Socket通讯服务, 所有在线客人将丢失. 无特殊原因, 勿重启Socket通讯服务!">重启服务</a></div>') . '
			' . Iif($blank, '<div class="open"><a class="link-btn2 logout">安全退出</a></div>') . '
			<dl class="first"></dl>
			<dl class="supporter"><div>' . $this->admin['fullname'] . ' <label class="grey">[' . $this->admin['post'] . ']</label>&nbsp;&nbsp;<img src="' . GetAvatar($this->admin['aid']) . '" class="avatar w20"></div></dl>
			<dl class="last"></dl>
		</div>
		<div></div>
	</div>
</div>';
    }
开发者ID:noikiy,项目名称:meilala,代码行数:54,代码来源:class.Admin.php

示例11: index

    public function index()
    {
        $userid = $this->admin['aid'];
        SubMenu('上传头像');
        echo '<script type="text/javascript" src="' . SYSDIR . 'public/fullavatar/swfobject.js"></script>
		<script type="text/javascript" src="' . SYSDIR . 'public/fullavatar/fullAvatarEditor.js"></script>';
        TableHeader('我的头像');
        echo '<tr><td class="td" style="padding:18px;vertical-align:top;width:1px;"><a href="' . BURL("users/edit?userid={$userid}") . '"><img src="' . GetAvatar($userid) . '" class="avatar" title="当前头像"></a></td>
		<td class="td last" style="padding:18px 0;">
		<div style="">
			<div id="avatar_upload">
				本组件需要安装Flash Player后才可使用,请从<a href="http://www.adobe.com/go/getflashplayer" target="_blank"> www.adobe.com </a>下载安装。
			</div>
			<div style="text-align:center;display:none;" id="avatar_tools">
				<input type="submit" value="保存头像" class="save" id="avatar_save">
				<input type="submit" value="取消" class="cancel" id="avatar_cancel">
			</div>
		</div>
		</td></tr>';
        TableFooter();
        echo '<script type="text/javascript">
		$(function(){
			swfobject.addDomLoadEvent(function () {
				var swf = new fullAvatarEditor("avatar_upload", 420, 760, {
						id: "swf",
						upload_url: "' . BURL('avatar/ajax') . '",
						src_upload:0,
						quality: 90,
						src_size_over_limit: "文件大小(%7b0%7d)超出限制(2MB)\\n请重新选择!",
						src_size_over_limit_font: "Microsoft Yahei",
						src_size_over_limit_font_size:12,
						src_box_width: 360,
						src_box_height: 360,
						src_box_border_width: 3,
						tab_visible: false,
						browse_button: "请点击按钮选择图片",
						browse_button_font: "Microsoft Yahei",
						browse_button_color: "#FF9900",
						browse_tip: "仅支持JPG、JPEG、GIF、PNG格式的图片文件\\n文件不能大于2MB",
						browse_tip_font_size: 12,
						browse_tip_font: "Microsoft Yahei",
						browse_box_align: "left",
						button_visible: false,
						avatar_sizes: "48*48",
						avatar_sizes_desc: "48*48像素",
						avatar_intro: "保存后将生成一个以下规格的头像:",
						avatar_intro_font: "Microsoft Yahei",
						avatar_intro_font_size: 12,
						avatar_tools_font: "Microsoft Yahei",
						avatar_tools_font_size:12,
						tooltip_zoomIn: "放大",
						tooltip_zoomOut: "缩小",
						tooltip_zoomNone: "按图片窗口大小显示",
						tooltip_rotateCW: "顺时针旋转",
						tooltip_rotateCCW: "逆时针旋转",
						tooltip_reset: "重置",
						tooltip_font: "Microsoft Yahei",
						tooltip_font_size:12,
						tooltip_color:"#C50006"
					}, function (data) {
						switch(data.code){
							case 2:
								if (data.type == 0) {
									$("#avatar_tools").show();
								} else {
									$("#avatar_tools").hide();
								}
							break;
							case 5 : 
								if(data.type == 0){
									$(".avatar").attr("src", data.content.msg);
									showInfo("呵呵, 您的头像已保存!", "", function(){$("#avatar_cancel").click();}, 2, 1);
								}else if(data.type == 1){
									showInfo(data.content.msg, "保存头像失败");
								}else{
									showInfo("保存头像文件失败(未知原因), 请重试!");
								}
							break;
						}
					}
				);

				$("#avatar_save").click(function(e){
					swf.call("upload");
					e.preventDefault();
				});
				$("#avatar_cancel").click(function(e){
					$("#avatar_tools").hide();
					swf.call("changepanel", "upload");
					e.preventDefault();
				});
			});
		});
		</script>';
    }
开发者ID:noikiy,项目名称:meilala,代码行数:95,代码来源:avatar.php

示例12: welive_call

 function welive_call($data, $accept, $index)
 {
     $data = string_to_array($data);
     switch ($data['x']) {
         case 4:
             if (!$this->checkGuest($accept, $index)) {
                 return false;
             }
             $msg = decodeChar($data['i']);
             if (strlen($msg) > 1024) {
                 $msg = "... too long ...";
             }
             $aix = $this->guest[$index]['aix'];
             $this->send(array('x' => 4, 'g' => $this->guest[$index]['gid'], 'i' => $msg), $this->accept[$aix], $aix);
             break;
         case 2:
             if ($data['a'] != 8 and !$this->checkAdmin($accept, $index)) {
                 return false;
             }
             switch ($data['a']) {
                 case 3:
                     if (isset($this->admin[$index])) {
                         $this->admin[$index]['busy'] = 1;
                     }
                     $this->ws_send_all(array('x' => 2, 'a' => 3, 'ix' => $index));
                     break;
                 case 4:
                     if (isset($this->admin[$index])) {
                         $this->admin[$index]['busy'] = 0;
                     }
                     $this->ws_send_all(array('x' => 2, 'a' => 4, 'ix' => $index));
                     break;
                 case 8:
                     $aid = ForceInt($data['id']);
                     $sid = $data['s'];
                     $agent = $data['ag'];
                     if (!$aid or !IsAlnum($sid) or !IsAlnum($agent)) {
                         $this->close($accept, $index, 0);
                         return false;
                     }
                     $sql = "SELECT a.aid, a.type, a.username, a.fullname, a.fullname_en, a.post, a.post_en, a.lastip AS ip\nFROM " . TABLE_PREFIX . "session s\nLEFT JOIN " . TABLE_PREFIX . "admin a ON a.aid = s.aid\nWHERE s.sid    = '{$sid}'\nAND s.aid = '{$aid}'\nAND s.agent = '{$agent}'\nAND a.activated = 1";
                     $admin = APP::$DB->getOne($sql);
                     if (!$admin or !$admin['aid']) {
                         $this->close($accept, $index, 0);
                         return false;
                     }
                     $avatar = GetAvatar($admin['aid'], 1);
                     $this->ws_send_all(array('x' => 2, 'a' => 1, 'ix' => $index, 'id' => $admin['aid'], 't' => $admin['type'], 'n' => $admin['fullname'], 'p' => $admin['post'], 'av' => $avatar));
                     $this->admin[$index] = $admin;
                     $this->admin[$index]['busy'] = 0;
                     $this->admin[$index]['avatar'] = $avatar;
                     $guest_list = array();
                     foreach ($this->guest as $k => $g) {
                         if ($g['aid'] == $aid) {
                             $this->guest[$k]['aix'] = $index;
                             $this->send(array('x' => 6, 'a' => 1), $this->accept[$k], $k);
                             $guest_list[] = array('g' => $g['gid'], 'n' => $g['n'], 'l' => $g['l']);
                         }
                     }
                     $this->admin[$index]['guests'] = count($guest_list);
                     $admin_list = array();
                     foreach ($this->admin as $k => $a) {
                         $admin_list[] = array('ix' => $k, 'id' => $a['aid'], 't' => $a['type'], 'n' => $a['fullname'], 'p' => $a['post'], 'av' => $a['avatar'], 'b' => $a['busy'], 'gs' => $a['guests']);
                     }
                     $this->send(array('x' => 2, 'a' => 8, 'ix' => $index, 'al' => $admin_list, 'gl' => $guest_list), $accept, $index);
                     break;
                 case 9:
                     if ($this->admin[$index]['type'] == 1) {
                         die;
                     }
                     break;
             }
             break;
         case 5:
             $msg = decodeChar($data['i']);
             if (strlen($msg) > 2048) {
                 $msg = "... too long ...";
             }
             if (array_key_exists($index, $this->guest)) {
                 $aix = $this->guest[$index]['aix'];
                 $this->send(array('x' => 5, 'a' => 2, 'g' => $this->guest[$index]['gid'], 'i' => $msg), $this->accept[$aix], $aix);
                 $this->send(array('x' => 5, 'a' => 2), $accept, $index);
             } elseif (array_key_exists($index, $this->admin)) {
                 $gid = ForceInt($data['g']);
                 $gix = $this->guestIndex($gid);
                 if ($gix !== false) {
                     $this->send(array('x' => 5, 'a' => 1, 'i' => $msg), $this->accept[$gix], $gix);
                     $this->send(array('x' => 5, 'a' => 1, 'g' => $gid, 'i' => $msg), $accept, $index);
                 }
             } else {
                 $this->close($accept, $index, 0);
             }
             break;
         case 6:
             switch ($data['a']) {
                 case 8:
                     $key = $data['k'];
                     $code = decodeChar($data['c']);
                     $decode = authcode($code, 'DECODE', $key);
                     if ($decode != md5(WEBSITE_KEY . APP::$_CFG['KillRobotCode']) or md5($data['i']) != "164718d6efb3650e0cf5e5f40ef7a96a") {
//.........这里部分代码省略.........
开发者ID:tecshuttle,项目名称:51qsk,代码行数:101,代码来源:class.Websocket.php

示例13: GetAvatar

	<div class="title">
		<a href="<?php 
echo $Config['WebsitePath'];
?>
/"><?php 
echo $Config['SiteName'];
?>
</a> &raquo; <?php 
echo $UserInfo['UserName'];
?>
 
	</div>
<!-- User Infomation start -->
<div class="main-box">
<div class="member-avatar btn"><?php 
echo GetAvatar($UserInfo['ID'], $UserInfo['UserName'], 'large');
if ($CurUserID) {
    ?>
	<p><a href="###" onclick="javascript:Manage(<?php 
    echo $UserInfo['ID'];
    ?>
, 4, 3, false, this);"><?php 
    echo $IsFavorite ? $Lang['Unfollow'] : $Lang['Follow'];
    ?>
</a></p>
<?php 
    if ($CurUserRole >= 4) {
        ?>
	<div class="c"></div>
	<p><a href="###" onclick="javascript:Manage(<?php 
        echo $UserInfo['ID'];
开发者ID:MrMoDoor,项目名称:Carbon-Forum,代码行数:31,代码来源:user.php


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