📄 showuser.php
字号:
<?php
include'include/begin.php';
include language();
$pagename_m = $_pagename[17];
$tpl_html = 'showuser';
include'include/main.php';
userp1();
if (!$userp1[9]) {
echoerror(56);
}
if (!$_GET["username"]) {
$_GET["username"] = $username;
}
if (!$_GET["username"]) {
echoerror(46);
}
unset($grouplist, $addresslist);
$result = mysql_query("select * from {$db_prefix}members where username='$_GET[username]'", $myconn);
if (!$row = mysql_fetch_array($result)) {
echoerror(46);
}
$a = $row['a'];
$b = $row['b'];
$c = $row['c'];
$up_num = $row['up_num'];
$postnum = $row['postnum'];
$result = mysql_query("select address from {$db_prefix}address where username='$_GET[username]'", $myconn);
$userrow = mysql_fetch_array($result);
$userrow = explode("|", $userrow["address"]);
$email = $userp1[22] || !$userrow[0]?$row["email"]: "--";
@array_shift($userrow);
for($n = 0;$n < 4;$n++) {
$userrows = explode(",", $userrow[$n]);
if (!$userrows[1]) {
continue;
}
$addresslist .= $userp1[22] || !$userrows[2]?$messagemode[$userrows[0]] . ":" . htmlspecialchars($userrows[1]) . "<br />": null;
}
$sex = $row['sex']?$_p_main[10]: $_p_main[11];
$userrow = explode('|', $row['face']);
if ($userrow[0] == 1) {
$face = '<img src="' . $imagedir . '/face/face' . $userrow[1] . '.gif" />';
} else if ($userrow[0] == 2) {
$face = '<img src="' . $imagedir . '/uploadface/' . $userrow[2] . '" />';
} else {
$face = 'no';
}
if ($row['signa']!='') {
$signatext = htmlspecialchars($row['signa']);
if ($signa) {
$signatext = signa($signatext);
}
} else {
$signatext = '';
}
if (SERVER_GHO) $signatext = str_replace('WEBURL', SERVER_NAME, $signatext);
$userrank = rank($row['postnum'], $row['a'], $row['b'], $row['c']);
$rankname = rankname($userrank);
$su_option[0] = $userp2[6]?'': 'display: none;';
$su_option[1] = $userp1[7]?'' : 'display: none;';
$su_option[2] = ($userp2[1] && !$row['admin'] && !$row['forums']) || ($userp2[11] && ($row['admin'] || $row['forums']))?'' : 'display: none;';
$adminlist .= $row['admin'] > 0?$sysgroupname[$row['admin']] . ' ': '';
$adminlist .= $row['forums']?$sysgroupname[11] . ' ': '';
$signa = nl2br(htmlspecialchars($row['signa']));
$regdate = echodate($row['regdate']);
$lastip = $row['lastip'];
$ch = number_format(($time - $row['regdate']) / (3600 * 24));
$lasttime = echotime($row["lasttime"]);
if ($row['groups']) {
$group = explode('|', $row['groups']);
while (list(, $val) = each($group)) {
if ($val) {
$groups = explode(',', $val);
$grouplist .= $groupname[$groups[0]]?$groupname[$groups[0]] . ':' . htmlspecialchars($groups[1]) . '<br />': '';
}
}
}
if ($row['honor']) {
$honor = explode('|', $row['honor']);
while (list(, $val) = each($honor)) {
if (isset($honors[$val])) {
$honorlist .= tpl_fun_jjx1(array('imagedir' => $imagedir, 'hid' => $val, 'honorm' => $honors[$val]));
}
}
}
$url_username = urlencode($row['username']);
include_once'./cache/template/m_' . $style_id . '_' . $tpl_html . '.php';
function signa($content)
{
$content = preg_replace("/\[color=([^\[\<]+?)\]/i", "<font color='\\1'>", $content);
$content = str_replace("[/color]", "</font>",$content);
$content = preg_replace("/\[img\](.+?)\[\/img\]/eis", "wkpic('\\1')", $content);
$searcharray = array("/\[url=([^\[]*)\](.+?)\[\/url\]/eis", "/\[url\]([^\[]*)\[\/url\]/eis");
$replacearray = array("wkurl('\\1','\\2')", "wkurl('\\1')");
$content = preg_replace($searcharray, $replacearray, $content);
$content = str_replace("[u]", "<u>", $content);
$content = str_replace("[/u]", "</u>", $content);
$content = str_replace("[b]", "<b>" , $content);
$content = str_replace("[/b]", "</b>", $content);
$content = str_replace("[i]", "<i>", $content);
$content = str_replace("[/i]", "</i>", $content);
return $content;
}
function wkpic($url)
{
return '<img src="' . $url . '" onload="javascript:MyImage(this);"/>';
}
function wkurl($url, $name = false)
{
$url = str_replace('\"', '"', $url);
if ($name!=false) {
$url = '<a href="' . $url . '" target="_blank">' . $name . '</a>';
} else {
$url = '<a href="' . $url . '" target="_blank">' . $url . '</a>';
}
return $url;
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -