示例#1
0
 } else {
     $tc2 = $tccell2;
     $tc2l = $tccell2l;
     $tc2r = $tccell2r;
     $tc1 = $tccell1;
 }
 if ($item['hidden']) {
     $item['name'] = "<img src='images/dot4.gif' align='absmiddle'> " . $item['name'];
 }
 /*
 		if ($item['uname']) {
 			$item['name']	= "<a href=\"profile.php?id=". $item['uid'] ."\" class=\"fonts\"><font ". getnamecolor($item['usex'], $item['upow']) .">". $item['uname'] ."'s</font></a> ". $item['name'];
 		}
 */
 if ($item['uname']) {
     $item['uname'] = "<nobr><a href=\"profile.php?id=" . $item['uid'] . "\" class=\"fonts\"><font " . getnamecolor($item['usex'], $item['upow']) . ">" . $item['uname'] . "</font></a></nobr>";
 } else {
     $item['uname'] = "";
 }
 if ($item['desc']) {
     $item['name'] .= " <span class=\"fonts\" style=\"color: #88f;\">- " . $item['desc'] . "</span>";
 }
 $typerow[$item['type']] .= "<tr>\r\n\t\t\t\t{$tccell1s}><a href=\"?cat={$cat}&id=" . $item['id'] . ($_GET['type'] ? "&type=" . $_GET['type'] : "") . "\">Edit</a></td>\r\n\t\t\t\t{$tc2}>" . $item['uname'] . "</td>{$tc2l}>" . $item['name'] . "</td>";
 $val = 0;
 foreach ($stats as $n => $stat) {
     $num = $stype[$n] == "m" ? vsprintf('%1.2fx', $item[$stat] / 100) : $item[$stat];
     if ($item[$stat] > 0 && $stype[$n] != "m") {
         $num = "+" . $num;
     }
     if ($item[$stat] == 0 && $stype[$n] != "m") {
         $num = "";
示例#2
0
文件: del.php 项目: StapleButter/jul
} else {
    $sortorder = "ASC";
}
if ($sqlquery) {
    $sqlquery = "WHERE " . $sqlquery;
}
$sqlquery .= " ORDER BY `{$sortfield}` {$sortorder}";
/*  if(!$p) $p=0;
  if ($ip) $q = "lastip = '$ip'";
	else $q = "posts=$p";
*/
$users = mysql_query("SELECT * FROM `users` {$sqlquery}");
$usercount = mysql_num_rows($users);
print "\n\t<form action=del.php method=post>\n    {$tblstart}\n\t<tr><td class='tbl tdbgc font center' colspan=8><b>{$usercount} user(s) found.</b></td></tr>\n\t<tr>\n\t{$tccellh}>&nbsp;</td>\n\t{$tccellh}>Name</td>\n\t{$tccellh}>Posts</td>\n\t{$tccellh}>Regdate</td>\n\t{$tccellh}>Last post</td>\n\t{$tccellh} width=200>Last activity</td>\n\t{$tccellh}>Last URL</td>\n\t{$tccellh}>IP\n  ";
while ($user = mysql_fetch_array($users)) {
    $namecolor = getnamecolor($user[sex], $user[powerlevel]);
    $lastpost = '-';
    if ($user['lastposttime']) {
        $lastpost = date($dateshort, $user['lastposttime'] - $tzoff);
    } else {
        $lastpost = '-';
    }
    if ($user['lastactivity'] != $user['regdate']) {
        $lastactivity = date($dateformat, $user['lastactivity'] - $tzoff);
    } else {
        $lastactivity = '-';
    }
    if ($user['regdate']) {
        $regdate = date($dateshort, $user['regdate'] - $tzoff);
    } else {
        $regdate = '-';
示例#3
0
function getuserlink(&$u, $substitutions = null, $urlclass = '')
{
    if ($substitutions === true) {
        global $herpderpwelp;
        if (!$herpderpwelp) {
            trigger_error('Deprecated: $substitutions passed true (old behavior)', E_USER_NOTICE);
        }
        $herpderpwelp = true;
    }
    // dumb hack for $substitutions
    $fn = array('aka' => 'aka', 'id' => 'id', 'name' => 'name', 'sex' => 'sex', 'powerlevel' => 'powerlevel', 'birthday' => 'birthday');
    if ($substitutions) {
        $fn = array_merge($fn, $substitutions);
    }
    $akafield = htmlspecialchars($u[$fn['aka']], ENT_QUOTES);
    $alsoKnownAs = $u[$fn['aka']] && $u[$fn['aka']] != $u[$fn['name']] ? " title='Also known as: {$akafield}'" : '';
    $u[$fn['name']] = htmlspecialchars($u[$fn['name']], ENT_QUOTES);
    global $tzoff;
    $birthday = date('m-d', $u[$fn['birthday']]) == date('m-d', ctime() + $tzoff);
    $rsex = $birthday ? 255 : $u[$fn['sex']];
    $namecolor = getnamecolor($rsex, $u[$fn['powerlevel']], false);
    if ($urlclass) {
        $class = " class='{$urlclass}'";
    } else {
        $class = '';
    }
    return "<a style='color:#{$namecolor};'{$class} href='profile.php?id=" . $u[$fn['id']] . "'{$alsoKnownAs}>" . $u[$fn['name']] . "</a>";
}
示例#4
0
    $pmsgs = $sql->query("SELECT p.*,t.title,u1.name AS name1,u2.name AS name2,u1.sex AS sex1,u2.sex AS sex2,u1.powerlevel pow1,u2.powerlevel pow2 FROM pmsgs p,pmsgs_text t,users u1,users u2 WHERE ip LIKE '{$ip}' AND p.userfrom=u1.id AND p.userto=u2.id AND p.id=pid {$mgroup} {$msort}");
    print "\n\t\t  {$tblend}<br>{$tblstart}\n\t\t  {$tccellh} colspan=7><b>Users: " . mysql_num_rows($users) . "</b><tr>\n\t\t  {$tccellc}>id</td>\n\t\t  {$tccellc}>Name</td>\n\t\t  {$tccellc}>Registered on</td>\n\t\t  {$tccellc}>Last post</td>\n\t\t  {$tccellc}>Last activity</td>\n\t\t  {$tccellc}>Posts</td>\n\t\t  {$tccellc}>Last IP</td>\n\t\t";
    for ($c = 0; $c < 500 && ($user = $sql->fetch($users)); $c++) {
        if ($users['id'] != 428) {
            print "\n\t\t    <tr>\n\t\t    {$tccell2}>{$user['id']}</td>\n\t\t    {$tccell1}><a href=profile.php?id={$user['id']}><font " . getnamecolor($user['sex'], $user['powerlevel']) . ">{$user['name']}</font></a></td>\n\t\t    {$tccell1}>" . @date($dateformat, $user['regdate']) . "</td>\n\t\t    {$tccell1}>" . date($dateformat, $user['lastposttime']) . "</td>\n\t\t    {$tccell1}>" . date($dateformat, $user['lastactivity']) . "</td>\n\t\t    {$tccell1}>{$user['posts']}</td>\n\t\t    {$tccell2}>{$user['lastip']}</td>\n\t\t  ";
        }
    }
    if ($post = $sql->fetch($users)) {
        print "<tr>{$tccell2} colspan=7>Too many results!";
    }
    print "\n\t\t  {$tblend}<br>{$tblstart}\n\t\t  {$tccellh} colspan=5><b>Posts: " . mysql_num_rows($posts) . "</b><tr>\n\t\t  {$tccellc}>id</td>\n\t\t  {$tccellc}>Posted by</td>\n\t\t  {$tccellc}>Thread</td>\n\t\t  {$tccellc}>Date</td>\n\t\t  {$tccellc}>IP</td>\n\t\t";
    for ($c = 0; $c < 500 && ($post = $sql->fetch($posts)); $c++) {
        if ($post['user'] != 428) {
            print "\n\t\t    <tr>\n\t\t    {$tccell2}>{$post['id']}</td>\n\t\t    {$tccell1}><a href=profile.php?id={$post['user']}><font " . getnamecolor($post['sex'], $post['powerlevel']) . ">{$post['name']}</font></a></td>\n\t\t    {$tccell1}><a href=thread.php?id={$post['thread']}>{$post['title']}</a></td>\n\t\t    {$tccell1}><nobr>" . date($dateformat, $post['date']) . "</nobr></td>\n\t\t    {$tccell2}>{$post['ip']}</td>\n\t\t  ";
        }
    }
    if ($post = $sql->fetch($posts)) {
        print "<tr>{$tccell2} colspan=5>Too many results!";
    }
    print "\n\t\t  {$tblend}<br>{$tblstart}\n\t\t  {$tccellh} colspan=6><b>Private messages: " . mysql_num_rows($pmsgs) . "</b><tr>\n\t\t  {$tccellc}>id</td>\n\t\t  {$tccellc}>Sent by</td>\n\t\t  {$tccellc}>Sent to</td>\n\t\t  {$tccellc}>Title</td>\n\t\t  {$tccellc}>Date</td>\n\t\t  {$tccellc}>IP</td>\n\t\t";
    for ($c = 0; $c < 500 && ($pmsg = $sql->fetch($pmsgs)); $c++) {
        if ($pmsg['userfrom'] != 428 && $pmsg['userto'] != 428) {
            print "\n\t\t    <tr>\n\t\t    {$tccell2}>{$pmsg['id']}</td>\n\t\t    {$tccell1}><a href=profile.php?id={$pmsg['userfrom']}><font " . getnamecolor($pmsg['sex1'], $pmsg['pow1']) . ">{$pmsg['name1']}</font></a></td>\n\t\t    {$tccell1}><a href=profile.php?id={$pmsg['userto']}><font " . getnamecolor($pmsg['sex2'], $pmsg['pow2']) . ">{$pmsg['name2']}</font></a></td>\n\t\t    {$tccell1}><a href=showprivate.php?id={$pmsg['id']}>{$pmsg['title']}</a></td>\n\t\t    {$tccell1}><nobr>" . date($dateformat, $pmsg['date']) . "</nobr></td>\n\t\t    {$tccell2}>{$pmsg['ip']}</td>\n\t\t  ";
        }
    }
    if ($pmsg = $sql->fetch($pmsgs)) {
        print "<tr>{$tccell2} colspan=6>Too many results!";
    }
}
print $tblend . $footer;
printtimedif($startingtime);
示例#5
0
if (!isset($_GET['preview']) && count($forums)) {
    $forumlist .= "<tr><td class='tbl tdbgc center font' colspan=5><b><i>These forums are not associated with a valid category ID</i></b></td></tr>";
    foreach ($forums as $forum) {
        $m = 0;
        foreach ($mods as $modplace => $mod) {
            if ($mod['forum'] != $forum['id']) {
                continue;
            }
            $namecolor = getnamecolor($mod['sex'], $mod['powerlevel']);
            $modlist .= ($m++ ? ', ' : '') . "<a href=profile.php?id={$mod['id']}><font {$namecolor}>{$mod['name']}</font></a>";
            unset($mods[$modplace]);
        }
        if ($m) {
            $modlist = "{$smallfont}(moderated by: {$modlist})</font>";
        }
        $namecolor = getnamecolor($forum['sex'], $forum['powerlevel']);
        if ($forum['numposts']) {
            $forumlastpost = "<nobr>" . date($dateformat, $forum['lastpostdate'] + $tzoff);
            $by = "{$smallfont}<br>by <a href=profile.php?id={$forum['uid']}><font {$namecolor}>{$forum['name']}</font></a>" . ($forum['lastpostid'] ? " <a href='thread.php?pid=" . $forum['lastpostid'] . "#" . $forum['lastpostid'] . "'>" . $statusicons['getlast'] . "</a>" : "") . "</nobr></font>";
        } else {
            $forumlastpost = getblankdate();
            $by = '';
        }
        if ($forum['lastpostdate'] > $category['lastpostdate']) {
            $category['lastpostdate'] = $forum['lastpostdate'];
            $category['l'] = $forumlastpost . $by;
        }
        if ($forum['hidden']) {
            $hidden = " <small><i>(hidden)</i></small>";
        } else {
            $hidden = "";
示例#6
0
    $poststable .= "<tr>\r\n\t\t\t{$tccell1}>{$ms['id']}</td>\r\n\t\t\t{$tccell2}>{$forumlink}</td>\r\n\t\t\t{$tccell2}>{$threadlink}</td>\r\n\t\t\t{$tccell1}>{$userlink}</td>\r\n\t\t\t{$tccell1}>{$timestamp}</td>\r\n\t\t</td>";
}
$tmp1 = $tmp2 = 0;
$milestones = $sql->query("SELECT t.*,u1.name AS name1,u1.sex AS sex1,u1.powerlevel AS power1,u2.name AS name2,u2.sex AS sex2,u2.powerlevel AS power2, f.minpower as mpl, f.title as forumtitle " . "FROM threads t,forums f,users u1,users u2 " . "WHERE (t.id % {$threads} = 0 OR t.id = 1) " . "AND f.id=t.forum " . "AND u1.id=t.user " . "AND u2.id=t.lastposter " . "ORDER BY t.id ASC");
$threadstable = "<tr>{$tccellh} colspan=7 style=\"font-weight:bold;\">Thread Milestones</td></tr><tr>\r\n\t\t\t{$tccellh} width=30></td>\r\n\t\t\t{$tccellh} colspan=2> Thread</td>\r\n\t\t\t{$tccellh} width=20%>Started by</td>\r\n\t\t\t{$tccellh} width=60> Replies</td>\r\n\t\t\t{$tccellh} width=60> Views</td>\r\n\t\t\t{$tccellh} width=180> Last post</td>\r\n    </tr>";
while ($ms = $sql->fetch($milestones)) {
    $tmp2 = $ms['id'];
    while (($tmp2 -= $threads) > $tmp1) {
        $threadstable .= "<tr>\r\n\t\t\t\t{$tccell1}>{$tmp2}</td>\r\n\t\t\t\t{$tccell1} width=40px>&nbsp;</td>\r\n\t\t\t\t{$tccell2l}><i>(thread deleted)</i></td>\r\n\t\t\t\t{$tccell2}>????</td>\r\n\t\t\t\t{$tccell1}>????</td>\r\n\t\t\t\t{$tccell1}>????</td>\r\n\t\t\t\t{$tccell1}>????{$smallfont}<br>by ????</td>\r\n\t\t\t</td>";
    }
    $tmp1 = $ms['id'];
    if ($ms['mpl'] && $ms['mpl'] > $loguser['powerlevel']) {
        $threadlink = "<i>(restricted)</i>";
        $userlink = "????";
        $tpic = "&nbsp;";
        $replies = "????";
        $views = "????";
        $lastpost = "????{$smallfont}<br>by ????";
    } else {
        $threadlink = "<a href='thread.php?id={$ms['id']}'>{$ms['title']}</a>";
        $threadlink .= '<br><span class="fonts" style="position: relative; top: -1px;">&nbsp;&nbsp;&nbsp;' . "In <a href='forum.php?id={$ms['forum']}'>" . $ms['forumtitle'] . "</a>" . '</span>';
        $userlink = "<a href='profile.php?id={$ms['user']}'><font " . getnamecolor($ms['sex1'], $ms['power1']) . ">{$ms['name1']}</font></a>";
        $lastpost = date($dateformat, $ms['lastpostdate'] + $tzoff) . "\r\n        {$smallfont}<br>by <a href='profile.php?id={$ms['user']}'><font " . getnamecolor($ms['sex2'], $ms['power2']) . ">{$ms['name2']}</font></a>\r\n\t\t\t\t<a href='thread.php?id={$ms['id']}&end=1'>{$statusicons['getlast']}</a>\r\n      ";
        $replies = $ms['replies'];
        $views = $ms['views'];
        $tpic = $ms['icon'] ? "<img src='{$ms['icon']}'>" : "&nbsp;";
    }
    $threadstable .= "<tr>\r\n\t\t\t{$tccell1}>{$ms['id']}</td>\r\n\t\t\t{$tccell1} width=40px style=\"max-width:40px;max-height:30px;overflow:hidden;\">{$tpic}</td>\r\n\t\t\t{$tccell2l}>{$threadlink}</td>\r\n\t\t\t{$tccell2}>{$userlink}</td>\r\n\t\t\t{$tccell1}>{$replies}</td>\r\n\t\t\t{$tccell1}>{$views}</td>\r\n\t\t\t{$tccell1}>{$lastpost}</td>\r\n\t\t</td>";
}
print "\r\n\t\t{$header}\r\n\t\t\t<br>\r\n\t\t\t<table class='table' cellspacing='0'>\r\n\t\t\t{$poststable}\r\n\t\t\t{$tblend}\r\n\t\t\t<br>\r\n\t\t\t{$tblstart}\r\n\t\t\t{$threadstable}\r\n\t\t\t{$tblend}\r\n    {$footer}";
printtimedif($startingtime);
示例#7
0
if ($forum['minpowerreply'] > $power && $forum['minpowerreply'] > 0) {
    $restricted = true;
}
$header = "{$header}\n\t\t{$fonttag}<a href=index.php>{$boardname}</a> - <a href=forum.php?id={$forumid}>{$forum['title']}</a> - {$thread['title']}<form action=newreply.php name=replier method=post autocomplete=\"off\"> {$tblstart}";
// Post preview
if (($power >= $forum['minpowerreply'] || $forum['minpowerreply'] < 1) && $id > 0) {
    $postlist = "<tr>{$tccellh} colspan=2 style=\"font-weight:bold;\">Thread history</tr><tr>{$tccellh} width=150>User</td>{$tccellh} width=*>Post</tr>";
    $qppp = $ppp + 1;
    $posts = $sql->query("SELECT name,posts,sex,powerlevel,user,text,options,num FROM users u,posts p,posts_text WHERE thread={$id} AND p.id=pid AND user=u.id ORDER BY p.id DESC LIMIT {$qppp}");
    $i = 0;
    while ($post = $sql->fetch($posts)) {
        $bg = $i++ & 1 ? 'tdbg2' : 'tdbg1';
        if ($ppp-- > 0) {
            $postnum = $post['num'] ? "{$post['num']}/" : '';
            $tcellbg = "<td class='tbl {$bg} font' valign=top>";
            $namecolor = getnamecolor($post['sex'], $post['powerlevel']);
            $postlist .= "<tr>\n\t\t\t\t\t{$tcellbg}<a href=profile.php?id={$post['user']}><font {$namecolor}>{$post['name']}</font></a>{$smallfont}<br>\n\t\t\t\t\tPosts: {$postnum}{$post['posts']}</td>\n\t\t\t\t\t{$tcellbg}" . doreplace2(dofilters($post['text']), $post['options']) . "</tr>\n\t\t\t\t";
        } else {
            $tcellbg = "<td bgcolor={$tablebg1} valign=top colspan=2";
            $postlist .= "<tr>{$tccellh} colspan=2>This is a long thread. Click <a href=thread.php?id={$id}>here</a> to view it.</td></tr>";
        }
    }
}
if (!filter_string($_POST['action']) && !$thread['closed'] && !($banned && $log) && ($power >= $forum['minpowerreply'] || $forum['minpowerreply'] < 1) && $id > 0) {
    print $header;
    print "";
    if ($log) {
        $username = $loguser['name'];
        $passhint = 'Alternate Login:'******'altlogin').style.cssText=''; this.style.cssText='display:none'\">Use an alternate login</a>\n\t\t\t\t<span id=\"altlogin\" style=\"display:none\">";
    } else {
示例#8
0
    $picture = "<img src=\"{$user['picture']}\">";
}
if ($user['moodurl']) {
    $moodavatar = " | <a href='avatar.php?id={$id}' class=\"popout\" target=\"_blank\">Preview mood avatar</a>";
}
$icqicon = "<a href=http://wwp.icq.com/{$user['icq']}#pager><img src=http://wwp.icq.com/scripts/online.dll?icq={$user['icq']}&img=5 border=0></a>";
if (!$user['icq']) {
    $user['icq'] = "";
    $icqicon = "";
}
$tccellha = "<td bgcolor={$tableheadbg}";
$tccellhb = "><center>{$fonthead}";
// Todo: This is a clear hack. Remove it.
$birthday = date('m-d', $user['birthday']) == date('m-d', ctime() + $tzoff);
$rsex = $birthday ? 255 : $user['sex'];
$namecolor = getnamecolor($rsex, $user['powerlevel'], false);
$tzoffset = $user['timezone'];
$tzoffrel = $tzoffset - $loguser['timezone'];
$tzdate = date($dateformat, ctime() + $tzoffset * 3600);
if ($user[birthday]) {
    $birthday = date("l, F j, Y", $user[birthday]);
    $age = "(" . floor((ctime() - $user[birthday]) / 86400 / 365.2425) . " years old)";
}
// RPG fun shit
$exp = calcexp($user['posts'], (ctime() - $user['regdate']) / 86400);
$lvl = calclvl($exp);
$expleft = calcexpleft($exp);
$expstatus = "Level: {$lvl}<br>EXP: {$exp} (for next level: {$expleft})";
if ($user['posts'] > 0) {
    $expstatus .= "<br>Gain: " . calcexpgainpost($user['posts'], (ctime() - $user['regdate']) / 86400) . " EXP per post, " . calcexpgaintime($user[posts], (ctime() - $user[regdate]) / 86400) . " seconds to gain 1 EXP when idle";
}
示例#9
0
文件: acs.php 项目: StapleButter/jul
            print "<tr>{$tccellc} colspan=4><img src='images/_.gif' height='4' width='1'></td></tr>";
        }
        $rr = $r;
        $b = $slashb = '';
        $td = $tccell1;
        if ($r > $rcount) {
            $td = $tccell2;
        }
        if (!strcasecmp($user['name'], $n)) {
            $td = $tccellc;
            $b = '<b>';
            $slashb = '</b>';
        }
        $tdl = str_replace(' center', '', $td);
        if ($view == 0 or $view == 1 and ($r <= $rcount or !strcasecmp($user['name'], $n))) {
            print "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t{$td}>{$b}{$r}{$slashb}</td>\r\n\t\t\t\t\t{$tdl}><a href=profile.php?id={$user['id']}><font " . getnamecolor($user['sex'], $user['powerlevel']) . ">" . (!$_GET['dur'] ? $user['name'] : "DU" . str_repeat("R", mt_rand(1, 25))) . "</font></a></td>\r\n\t\t\t\t\t{$td}>{$b}{$user['cnt']}{$slashb}</td>\r\n\t\t\t\t\t{$tdl}><img src=images/{$numdir}" . "bar-on.gif width=" . $user[cnt] * 100 / $max . "% height=8></td>\r\n\t\t\t\t\t</tr>";
        }
    }
} else {
    // Ranked yesterday:
    //		$usersy=mysql_query("SELECT users.id,users.name,users.sex,users.powerlevel,COUNT(posts.id) AS cnt FROM users,posts WHERE posts.user=users.id AND posts.date>".($dd-86400)." AND posts.date<$dd GROUP BY users.id ORDER BY cnt DESC");
    //		$i=0;
    //		while($user=mysql_fetch_array($usersy) and $r <= $rcount ) {
    //			$i++;
    //			if($rp!=$user['cnt']) $r=$i;
    //			$rp=$user['cnt'];
    //			if($r<=5) $ranky[$user['id']]=$r;
    //		}
    $i = 0;
    $rp = 0;
    $r = 0;
示例#10
0
             $ppost[text] = "<center><b>" . stripslashes($subject) . "</b></center><hr>" . stripslashes($message);
             if ($isadmin) {
                 $ip = $userip;
             }
             $annclist = "\r\n\t\t  <body onload=window.document.REPLIER.message.focus()>\r\n\t\t  {$tccellh}>Announcement preview\r\n\t\t  {$tblend}{$tblstart}\r\n\t\t  " . threadpost($ppost, 1) . "\r\n\t\t  {$tblend}<br>{$tblstart}\r\n\t\t  <FORM ACTION=announcement.php NAME=REPLIER METHOD=POST>\r\n\t\t  {$tccellh} width=150>&nbsp</td>{$tccellh}>&nbsp<tr>\r\n\t\t  {$tccell1}><b>Announcement title:</td>{$tccell2l}>{$inpt}=subject SIZE=70 MAXLENGTH=100 VALUE=\"" . stripslashes($subject) . "\"><tr>\r\n\t\t  {$tccell1}><b>Announcement:</td>\t{$tccell2l}>{$txta}=message ROWS=10 COLS={$numcols}>" . stripslashes($message) . "</TEXTAREA><tr>\r\n\t\t  {$tccell1}>&nbsp</td>{$tccell2l}>\r\n\t\t  {$inps}=submit VALUE=\"Submit announcement\">\r\n\t\t  {$inps}=preview VALUE=\"Preview announcement\">\r\n\t\t  {$inph}=action VALUE=postannc>\r\n\t\t  {$inph}=f VALUE={$f}>\r\n\t\t  </td></FORM>\r\n\t    ";
         }
     } else {
         $annclist = "\r\n\t    {$tccell1}>Couldn't enter the announcement. You haven't entered the right username or password.\r\n\t    " . redirect('announcement.php', 'return to the announcements', 0);
     }
 }
 if ($_POST[action] == 'editannc') {
     print $tblstart;
     $numposts = $loguser[posts];
     $numdays = (ctime() - $loguser[regdate]) / 86400;
     $message = doreplace($message, $numposts, $numdays, $loguser[name]);
     $namecolor = getnamecolor($loguser['sex'], $loguser['powerlevel']);
     $edited = "<a href=profile.php?id={$loguser['id']}><font {$namecolor}>{$loguser['name']}</font></a>";
     if ($submit) {
         $headid = @mysql_result(mysql_query("SELECT id FROM postlayouts WHERE text='{$head}' LIMIT 1"), 0, 'id');
         $signid = @mysql_result(mysql_query("SELECT id FROM postlayouts WHERE text='{$sign}' LIMIT 1"), 0, 'id');
         if ($headid) {
             $head = '';
         } else {
             $headid = 0;
         }
         if ($signid) {
             $sign = '';
         } else {
             $signid = 0;
         }
         mysql_query("UPDATE announcements SET title='{$subject}', text='{$message}', headtext='{$head}', signtext='{$sign}', edited='{$edited}', editdate='" . ctime() . "',headid={$headid},signid={$signid} WHERE id={$id}");
示例#11
0
<?php

$windowtitle = ($_GET['bio'] ? "Bio" : "Layout") . " size comparison";
require 'lib/function.php';
require 'lib/layout.php';
print "\n\t{$header}\n\t{$fonttag}\n\t\tShow: <a href=\"?\">layout sizes</a> - <a href=\"?bio=1\">bio sizes</a>\t\n\t<br>{$tblstart}\n\t{$tccellh}>&nbsp;</td>\n\t{$tccellh} colspan=2>User</td>\n\t" . ($_GET['bio'] ? "{$tccellh}>Bio</td>" : "{$tccellh}>Header</td>\n\t{$tccellh}>Signature</td>\n\t{$tccellh}>Total</td>");
$users = mysql_query('SELECT id,name, minipic, powerlevel, sex, ' . ($_GET['bio'] ? "LENGTH(bio) AS tsize, bio as postheader" : "LENGTH(postheader) AS hsize,LENGTH(signature) AS ssize,LENGTH(postheader)+LENGTH(signature) AS tsize, postheader") . ' FROM users ORDER BY tsize DESC');
for ($i = 1; $u = mysql_fetch_array($users); $i++) {
    if (!$u['tsize']) {
        break;
    }
    if ($last['tsize'] != $u['tsize']) {
        $r = $i;
    }
    $last = $u;
    $max = max($u['tsize'], $max);
    if (strpos($u['postheader'], "<style>.loclass") !== false) {
        $lm = true;
    } else {
        $lm = false;
    }
    print "<tr>\n\t{$tccell2}>" . ($lm ? "<img src=\"images/smilies/denied.gif\" title=\"Say no to the layout maker!\" align=absmiddle> {$r} <img src=\"images/smilies/denied.gif\" title=\"Say no to the layout maker!\" align=absmiddle>" : "{$r}") . "</td>\n\t{$tccell2} width=16>" . ($u['minipic'] ? "<img src=\"" . htmlspecialchars($u['minipic']) . "\" width=16 height=16>" : "") . "</td>\n\t{$tccell1}><a href=profile.php?id={$u['id']}><font " . getnamecolor($u[sex], $u[powerlevel]) . ">{$u['name']}</font></a></td>\n\t" . (!$_GET['bio'] ? "{$tccell2} width=100>" . number_format($u[hsize]) . "</td>\n\t{$tccell2} width=100>" . number_format($u[ssize]) . "</td>" : "") . "\n\t{$tccell1} width=100><b>" . number_format($u[tsize]) . "</b><br><img src=images/minibar.png width=\"" . number_format($u['tsize'] / $max * 200) . "\" align=left height=3></td></tr>";
}
print $tblend . $footer;
printtimedif($startingtime);
示例#12
0
if ($log && !$_GET['raw']) {
    $headlinks .= ' - <a href=index.php?action=markallforumsread>Mark all posts read</a>';
    $header = makeheader($header1, $headlinks, $header2);
    $forumread = $sql->getresultsbykey("SELECT forum,readdate FROM forumread WHERE user={$loguserid}", 'forum', 'readdate');
}
$_counter = 1;
while ($in = $sql->fetch($data, MYSQL_ASSOC)) {
    if (!$_GET['raw']) {
        if ($log && $in['date'] > max($forumread[$in['fid']], $in['treadtime'])) {
            $newpost = $statusicons['new'] . "&nbsp";
        } else {
            $newpost = "";
        }
        $output .= "<tr>\r\n\t\t\t\t\t{$tccell2}>" . $in['id'] . "</td>\r\n\t\t\t\t\t{$tccell2}><a href='forum.php?id=" . $in['fid'] . "'>" . $in['ftitle'] . "</a></td>\r\n\t\t\t\t\t{$tccell1l}>{$newpost}<a href='thread.php?pid=" . $in['id'] . "&r=1#" . $in['id'] . "'>" . $in['title'] . "</a></td>\r\n\t\t\t\t\t{$tccell1}><a href='profile.php?id=" . $in['user'] . "'><font " . getnamecolor($in['usex'], $in['upowerlevel']) . ">" . $in['uname'] . "</font></a></td>\r\n\t\t\t\t\t{$tccell2}>" . timeunits(ctime() - $in['date']) . "</td>\r\n\t\t\t\t</tr>\n";
    } else {
        $in['ucolor'] = str_replace('color=', '', getnamecolor($in['usex'], $in['upowerlevel']));
        $in['title'] = str_replace("\\", "\\\\", $in['title']);
        $temp = array();
        foreach ($outarray as $outkey) {
            $temp[] = '"' . $outkey . "\":\"" . htmlspecialchars($in[$outkey]) . '"';
        }
        $temp = "{" . implode(",", $temp) . "}" . ($_counter == $_count ? "" : ",");
        $output .= $temp;
    }
    $_counter++;
}
if (!$_GET['raw']) {
    /* Doesn't work, as far as I'm aware?
    		if ($_GET['fungies']) {
    			$jscripts	= '<script type="text/javascript" src="/js/jquery.min.js"></script><script type="text/javascript" src="/js/latestposts.js"></script>';
    		} */