Ejemplo n.º 1
0
function postcode($post, $set)
{
    global $tzoff, $smallfont, $ip, $quote, $edit, $dateshort, $dateformat, $tlayout, $textcolor, $numdir, $numfil, $tblstart, $hacks, $x_hacks, $loguser;
    $tblend = "</table>";
    $exp = calcexp($post[posts], (ctime() - $post[regdate]) / 86400);
    $lvl = calclvl($exp);
    $expleft = calcexpleft($exp);
    $reinf = syndrome($post[act]);
    $sincelastpost = "";
    $lastactivity = "";
    $since = 'Since: ' . @date($dateshort, $post[regdate] + $tzoff);
    $postdate = date($dateformat, $post[date] + $tzoff);
    if ($set[threadlink]) {
        $threadlink = ", in {$set['threadlink']}";
    }
    /* if($post[edited]){
    			$set[edited].="<hr>$smallfont$post[edited]";
    		}*/
    $sidebars = array(1, 16, 18, 19, 387);
    return "\r\n\t\t{$tblstart}\r\n\t\t{$set['tdbg']} style='width: 20% !important;' rowspan='2'>\r\n\t\t\t{$set['userlink']}{$smallfont}<br>\r\n\t\t\t<center>{$set['userpic']}</center><br>\r\n\t\t\t{$post['title']}<br><br>\r\n\t\t</td>\r\n\r\n\t\t{$set['tdbg']} height=1>\r\n\t\t<table class='fonts' style='clear: both; width: 100%;'>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>Posted on {$postdate}{$threadline}{$post['edited']}</td>\r\n\t\t\t\t<td style='float: right;'>{$quote}{$edit}{$ip}</td>\r\n\t\t\t</tr>\r\n\t\t</table><tr>\r\n\t\t{$set['tdbg']} style='overflow: visible; width: 70%;' height=220 id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td></tr>\r\n\t\t{$tblend}\r\n\t\t<br>";
    if (!$set['picture']) {
        $set['picture'] = "images/_.gif";
    }
    if ($_GET['z']) {
        print_r($st['eq']);
    }
}
Ejemplo n.º 2
0
function getstats($u, $items = 0, $class = 0)
{
    $stat = array('HP', 'MP', 'Atk', 'Def', 'Int', 'MDf', 'Dex', 'Lck', 'Spd');
    $p = $u[posts];
    $d = (ctime() - $u[regdate]) / 86400;
    for ($i = 0; $i < 9; $i++) {
        $m[$i] = 1;
    }
    for ($i = 1; $i < 7; $i++) {
        $item = $items[$u['eq' . $i]];
        for ($k = 0; $k < 9; $k++) {
            $is = $item['s' . $stat[$k]];
            if (substr($item[stype], $k, 1) == 'm') {
                $m[$k] *= $is / 100;
            } else {
                $a[$k] += $is;
            }
        }
    }
    for ($i = 0; $i < 9; $i++) {
        $stats[$stat[$i]] = max(1, floor(basestat($p, $d, $i) * $m[$i]) + $a[$i]);
    }
    // after calculating stats with items
    for ($k = 0; $k < 9; $k++) {
        if (isset($class[$stat[$k]])) {
            //$stats[$stat[$k]]	= ceil($stats[$stat[$k]] * ($class[$stat[$k]] != 0 ? $class[$stat[$k]] : -1));		// 0 can be 0, anything else will result in 1 because of max(1)
            $stats[$stat[$k]] = ceil($stats[$stat[$k]] * $class[$stat[$k]]);
        }
    }
    $stats[GP] = coins($p, $d) - $u[spent];
    $stats[exp] = calcexp($p, $d);
    $stats[lvl] = calclvl($stats[exp]);
    return $stats;
}
Ejemplo n.º 3
0
function MailifyPage($pagehash, $oldpagehash = false)
{
    global $SERVER_ADMIN, $ArchivePageStore;
    $from = isset($SERVER_ADMIN) ? $SERVER_ADMIN : 'foo@bar';
    $head = "From {$from}  " . ctime(time()) . "\r\n";
    $head .= "Subject: " . encode_pagename_for_wikizip($pagehash['pagename']) . "\r\n";
    $head .= "From: {$from} (PhpWiki)\r\n";
    $head .= "Date: " . rfc1123date($pagehash['lastmodified']) . "\r\n";
    $head .= "Mime-Version: 1.0 (Produced by PhpWiki 1.1.x)\r\n";
    if (is_array($oldpagehash)) {
        return $head . MimeMultipart(array(MimeifyPage($oldpagehash), MimeifyPage($pagehash)));
    }
    return $head . MimeifyPage($pagehash);
}
Ejemplo n.º 4
0
                    $sql->query("INSERT INTO `ipbans` SET `ip` = '" . $_SERVER['REMOTE_ADDR'] . "', `date` = '" . ctime() . "', `reason` = 'Send e-mail for password recovery'");
                    @xk_ircsend("102|" . xk(7) . "Auto-IP banned " . xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) . " for this.");
                    @xk_ircsend("1|" . xk(7) . "Auto-IP banned " . xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) . " for repeated failed logins.");
                }
                $msg = "Couldn't login.  Either you didn't enter an existing username, or you haven't entered the right password for the username.";
            }
        }
    }
    $txt .= "{$tccell1}>{$msg}<br>" . redirect('index.php', 'the board', 0);
} elseif ($_POST['action'] == 'logout') {
    setcookie('loguserid', '', time() - 3600, "/", $_SERVER['SERVER_NAME'], false, true);
    setcookie('logverify', '', time() - 3600, "/", $_SERVER['SERVER_NAME'], false, true);
    // May as well unset this as well
    setcookie('logpassword', '', time() - 3600, "/", $_SERVER['SERVER_NAME'], false, true);
    $txt .= "{$tccell1}> You are now logged out.<br>" . redirect('index.php', 'the board', 0);
} elseif (!$_POST['action']) {
    $ipaddr = explode('.', $_SERVER['REMOTE_ADDR']);
    for ($i = 4; $i > 0; --$i) {
        $verifyoptext[$i] = "(" . implode('.', $ipaddr) . ")";
        $ipaddr[$i - 1] = 'xxx';
    }
    $txt .= "<body onload=window.document.REPLIER.username.focus()>\n\t\t<FORM ACTION=login.php NAME=REPLIER METHOD=POST><tr>\n\t\t{$tccellh} width=150>&nbsp;</td>{$tccellh} width=40%>&nbsp</td>{$tccellh} width=150>&nbsp;</td>{$tccellh} width=40%>&nbsp;</td></tr><tr>\n\t\t{$tccell1}><b>User name:</b></td>       {$tccell2l}>{$inpt}=username MAXLENGTH=25 style='width:280px;'></td>\n\t\t{$tccell1} rowspan=2><b>IP Verification:</b></td> {$tccell2l} rowspan=2>\n\t\t\t<select name=verify>\n\t\t\t\t<option selected value=0>Don't use</option>\n\t\t\t\t<option value=1> /8 {$verifyoptext['1']}</option>\n\t\t\t\t<option value=2>/16 {$verifyoptext['2']}</option>\n\t\t\t\t<option value=3>/24 {$verifyoptext['3']}</option>\n\t\t\t\t<option value=4>/32 {$verifyoptext['4']}</option>\n\t\t\t</select><br><small>You can require your IP address to match your current IP, to an extent, to remain logged in.</small>\n\t\t</tr><tr>\n\t\t{$tccell1}><b>Password:</b></td>        {$tccell2l}>{$inpp}=userpass MAXLENGTH=64 style='width:180px;'></td>\n\t\t</tr><tr>\n\t\t{$tccell1}>&nbsp;</td>{$tccell2l} colspan=3>\n\t\t{$inph}=action VALUE=login>\n\t\t{$inps}=submit VALUE=Login></td></tr>\n\t\t</FORM>";
} else {
    // Just what do you think you're doing
    $sql->query("INSERT INTO `ipbans` SET `ip` = '" . $_SERVER['REMOTE_ADDR'] . "', `date` = '" . ctime() . "', `reason` = 'Generic internet exploit searcher'");
    if (!mysql_error()) {
        xk_ircsend("1|" . xk(7) . "Auto-banned asshole trying to be clever with the login form (action: " . xk(8) . $_POST['action'] . xk(7) . ") with IP " . xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) . ".");
    }
}
print $txt . $tblend . $footer;
printtimedif($startingtime);
Ejemplo n.º 5
0
}
loadtlayout();
$user['headtext'] = $user['postheader'];
$user['signtext'] = $user['signature'];
$user['text'] = "Sample text. [quote=fhqwhgads]A sample quote, with a <a href=about:blank>link</a>, for testing your layout.[/quote]This is how your post will appear.";
$user['uid'] = $_GET['id'];
$user['date'] = ctime();
// so that layouts show up regardless of setting (for obvious reasons)
$loguser['viewsig'] = 1;
// shop/rpg such
$shops = $sql->query('SELECT * FROM itemcateg ORDER BY corder');
$eq = $sql->fetchq("SELECT * FROM users_rpg WHERE uid={$id}");
$itemids = array_unique(array($eq['eq1'], $eq['eq2'], $eq['eq3'], $eq['eq4'], $eq['eq5'], $eq['eq6'], $eq['eq7']));
$itemids = implode(',', $itemids);
$eqitems = $sql->query("SELECT * FROM items WHERE id IN ({$itemids})");
while ($item = $sql->fetch($eqitems)) {
    $items[$item['id']] = $item;
}
while ($shop = $sql->fetch($shops)) {
    $shoplist .= "\r\n\t\t\t<tr>\r\n\t\t\t{$tccell1s}>{$shop['name']}</td>\r\n\t\t\t{$tccell2s} width=100%>" . $items[$eq['eq' . $shop['id']]]['name'] . "&nbsp;</td>\r\n\t\t";
}
/* extra munging for whatever reason */
$user['email'] = urlencode($user['email']);
// AKA
if ($user['aka'] && $user['aka'] != $user['name']) {
    $aka = "{$tccell1l} width=150><b>Also known as</td>\t\t\t{$tccell2l}>{$user['aka']}<tr>";
} else {
    $aka = '';
}
print "\r\n\t{$header}\r\n\t<div>{$fonttag} Profile for <b>{$minipic}<span style='color:#{$namecolor}'>{$user['name']}</span></b></div>\r\n<table cellpadding=0 cellspacing=0 border=0>\r\n<td width=100% valign=top>\r\n{$tblstart}\r\n\t{$tccellh} colspan=2><center>General information<tr>\r\n\t<!-- {$tccell1l} width=150><b>Username</td>\t\t\t{$tccell2l}>{$user['name']}<tr> -->\r\n\t{$aka}\r\n\t{$tccell1l} width=150><b>Total posts</td>\t\t\t{$tccell2l}>{$user['posts']} ({$postavg} per day) {$projdate}<br>{$bar}<tr>\r\n\t{$tccell1l} width=150><b>Total threads</td>\t\t{$tccell2l}>{$threadsposted}<tr>\r\n\t{$tccell1l} width=150><b>EXP</td>\t\t\t\t\t{$tccell2l}>{$expstatus}<tr>\r\n" . (false ? "\t{$tccell1l} width=150><b>User rating</td>\t\t\t{$tccell2l}>{$ratingstatus}<tr>" : "") . "\r\n\t{$tccell1l} width=150><b>Registered on</td>\t\t{$tccell2l}>" . @date($dateformat, $user[regdate] + $tzoff) . " (" . floor((ctime() - $user[regdate]) / 86400) . " days ago)<tr>\r\n\t{$tccell1l} width=150><b>Last post</td>\t\t\t{$tccell2l}>{$lastpostdate}{$lastpostlink}<tr>\r\n\t{$tccell1l} width=150><b>Last activity</td>\t\t{$tccell2l}>" . date($dateformat, $user[lastactivity] + $tzoff) . "{$lastip}<tr>\r\n{$tblend}\r\n<br>{$tblstart}\r\n\t{$tccellh} colspan=2><center>Contact information<tr>\r\n\t{$tccell1l} width=150><b>Email address</td>\t\t{$tccell2l}><a href='mailto:{$user['email']}'>{$user['email']}</a>&nbsp;<tr>\r\n\t{$tccell1l} width=150><b>Homepage</td>\t\t\t{$tccell2l}><a href='{$user['homepageurl']}'>{$homepagename}</a>&nbsp;<tr>\r\n\t{$tccell1l} width=150><b>ICQ number</td>\t\t\t{$tccell2l}>{$user['icq']} {$icqicon}&nbsp;<tr>\r\n\t{$tccell1l} width=150><b>AIM screen name</td>\t\t{$tccell2l}><a href='aim:goim?screenname={$aim}'>{$user['aim']}</a>&nbsp;<tr>\r\n{$tblend}\r\n<br>{$tblstart}\r\n\t{$tccellh} colspan=2><center>User settings<tr>\r\n\t{$tccell1l} width=150><b>Timezone offset</td>\t\t{$tccell2l}>{$tzoffset} hours from the server, {$tzoffrel} hours from you (current time: {$tzdate})<tr>\r\n\t{$tccell1l} width=150><b>Items per page</td>\t\t{$tccell2l}>" . $user['threadsperpage'] . " threads, " . $user['postsperpage'] . " posts<tr>\r\n\t{$tccell1l} width=150><b>Color scheme</td>\t\t{$tccell2l}>" . $schname . "<tr>\r\n{$tblend}\r\n</td><td>&nbsp;&nbsp;&nbsp;</td><td valign=top>\r\n{$tblstart}\r\n\t{$tccellh}><center>RPG status<tr>\r\n\t{$tccell1l}><img src='status.php?u={$id}'>\r\n{$tblend}\r\n<br>{$tblstart}\r\n\t{$tccellh} colspan=2><center>Equipped Items<tr>\r\n\t{$shoplist}\r\n{$tblend}\r\n</td></table>\r\n<br>{$tblstart}\r\n\t{$tccellh} colspan=2><center>Personal information<tr>\r\n\t{$tccell1l} width=150><b>Real name</td>\t\t\t{$tccell2l}>{$user['realname']}&nbsp;<tr>\r\n\t{$tccell1l} width=150><b>Location</td>\t\t\t{$tccell2l}>{$user['location']}&nbsp;<tr>\r\n\t{$tccell1l} width=150><b>Birthday</td>\t\t\t{$tccell2l}>{$birthday} {$age}&nbsp;<tr>\r\n\t{$tccell1l} width=150><b>User bio</td>\t\t\t{$tccell2l}>" . dofilters(doreplace2(doreplace($user['bio'], $user['posts'], (ctime() - $user['regdate']) / 86400, $user['name']))) . "&nbsp;<tr>\r\n{$tblend}\r\n<br>{$tblstart}\r\n\t{$tccellh} colspan=2><center>Sample post<tr>\r\n\t" . threadpost($user, 1) . "\r\n{$tblend}\r\n<br>{$tblstart}\r\n\t{$tccellhs} colspan=2><center>Options<tr>\r\n\t{$tccell2s} colspan=2>\r\n\t<a href=thread.php?user={$id}>Show posts</a> | \r\n\t<a href=forum.php?user={$id}>View threads by this user</a>\r\n\t{$sendpmsg}\r\n  {$ratelink}\r\n  {$moodavatar}\r\n  <tr>\r\n\t{$tccell2s} colspan=2>\r\n\t<a href=postsbyuser.php?id={$id}>List posts by this user</a> |\r\n\t<a href=postsbytime.php?id={$id}>Posts by time of day</a> |\r\n\t<a href=postsbythread.php?id={$id}>Posts by thread</a> | \r\n\t<a href=postsbyforum.php?id={$id}>Posts by forum</td>{$sneek}\r\n\t{$tblend}{$footer}\r\n  ";
printtimedif($startingtime);
Ejemplo n.º 6
0
require 'lib/function.php';
$windowtitle = "Posts by time of day";
require 'lib/layout.php';
if (!isset($_GET['posttime'])) {
    $posttime = 86400;
} else {
    $posttime = intval($_GET['posttime']);
}
if ($id) {
    $qstrings[] = "user={$id}";
    $from = " from " . $sql->resultq("SELECT name FROM users WHERE id={$id}");
} else {
    $from = ' on the board';
}
if ($posttime !== 0) {
    $qstrings[] = "date > " . (ctime() - $posttime);
    $during = ' during the last ' . timeunits2($posttime);
}
if (empty($qstrings)) {
    $qwhere = '1';
} else {
    $qwhere = implode(' AND ', $qstrings);
}
$posts = $sql->query("SELECT count(*) AS cnt, FROM_UNIXTIME(date,'%k') AS hour FROM posts WHERE {$qwhere} GROUP BY hour");
$link = "<a href=postsbytime.php?" . ($id ? "id={$id}&" : "") . "posttime";
print "{$header}{$smallfont}\n\t\tTimeframe:\n\t\t{$link}=86400>Last day</a> |\n\t\t{$link}=604800>Last week</a> |\n\t\t{$link}=2592000>Last 30 days</a> |\n\t\t{$link}=31536000>Last year</a> |\n\t\t{$link}=0>All-time</a><br>\n\t\t{$fonttag} Posts{$from} by time of day{$during}:\n\t\t{$tblstart}\n\t\t\t{$tccellh} width=100>Time</td>\n\t\t\t{$tccellh} width=50>Posts</td>\n\t\t\t{$tccellh}>&nbsp</tr>";
$postshour = array_fill(0, 24, 0);
$max = 0;
while ($h = $sql->fetch($posts)) {
    if (($postshour[$h['hour']] = $h['cnt']) > $max) {
        $max = $h['cnt'];
Ejemplo n.º 7
0
 /**
  * freeForAll()
  */
 public static function freeForAll($f_szDate)
 {
     global $g_arrClub;
     if (empty($g_arrClub['id']) || !($szDate = common::checkDate($f_szDate))) {
         return false;
     }
     $iUtc = common::mktime($szDate);
     $iToday = date('w', $iUtc);
     if (date('Y-m-d', ctime()) !== $szDate) {
         return false;
     }
     return $szDate === $g_arrClub['free_for_all'] || strstr($g_arrClub['ignore_rules_for_days'], (string) $iToday) || null !== $g_arrClub['ignore_rules_after_hours'] && math_time(date('H:i', ctime())) > math_time($g_arrClub['ignore_rules_after_hours']);
 }
Ejemplo n.º 8
0
    if (!$comment) {
        $comment = $bkp;
    }
}
// ID => [u]ser, [c]comment text, [e]mail, [ip] */
$db[$id]['co'][$cid] = array('id' => $cid, 'u' => $name, 'e' => $mail, 'ip' => CLIENT_IP, 'c' => $comment, 'ed' => $edit_id);
db_save_news($db, $nloc);
// save db piece
db_comm_sync($id, $cid);
// update latest comments
// Hook comment checker
if (hook('add_comment_checker', FALSE)) {
    return FALSE;
}
// Notify for New Comment
if (getoption('notify_comment')) {
    $url = $_SERVER['HTTP_REFERER'];
    $date = date(getoption('timestamp_active'), ctime());
    $subject = i18n("CuteNews - New Comment Added");
    $message = i18n("New Comment was added by %1 on %3 at %4\n\n%2 ", $name, $comment, $date, $url);
    cn_send_mail(getoption('notify_email'), $subject, $message);
}
// Also, remember non authorized user
if (!$logged_as_member && isset($_POST['cn_remember_me'])) {
    cn_guest_auth($name, $mail);
}
// Redirect...
$ref = preg_replace('/&edit_id=\\d+/', '', REQ('referer'));
echo '<script type="text/javascript">window.location="' . addslashes($ref) . '";</script>';
echo '<div><a href="' . $refer . '">click there</a> if automatic redirect not work</div>';
return FALSE;
Ejemplo n.º 9
0
<?php

require 'lib/function.php';
require 'lib/rpg.php';
if (!intval($u)) {
    die;
}
$user = $sql->fetchq("SELECT name,posts,regdate,users_rpg.* FROM users,users_rpg WHERE id='{$u}' AND uid=id");
$p = $user['posts'];
$d = (ctime() - $user['regdate']) / 86400;
if (!$it) {
    $it = 0;
}
if (!$ne) {
    $items = $sql->getarraybykey("SELECT * FROM items WHERE id={$user['eq1']} OR id={$user['eq2']} OR id={$user['eq3']} OR id={$user['eq4']} OR id={$user['eq5']} OR id={$user['eq6']} OR id={$it}", 'id');
}
if (!$nc) {
    $class = $sql->fetchq("SELECT * FROM `rpg_classes` WHERE `id` = '" . $user['class'] . "'");
}
if ($ct) {
    $GPdif = floor($items[$user['eq' . $ct]][coins] * 0.6) - $items[$it][coins];
    $user['eq' . $ct] = $it;
}
$st = getstats($user, $items, $class);
$st['GP'] += $GPdif;
if ($st['lvl'] > 0) {
    $pct = 1 - calcexpleft($st['exp']) / totallvlexp($st['lvl']);
}
if (!$class) {
    $class['name'] = "None";
}
Ejemplo n.º 10
0
 print $tblstart;
 $userid = -1;
 while ($user = $sql->fetch($users)) {
     $user[name] = str_replace(' ', '', $user['name']);
     $user[name] = str_replace(' ', '', $user['name']);
     if (strcasecmp($user[name], $username2) == 0) {
         $userid = $u;
     }
 }
 $nomultis = $sql->fetchq("SELECT * FROM `users` WHERE `lastip` = '{$REMOTE_ADDR}'");
 //	$nomultis	= false;
 if ($userid == -1 and $pass and $pass != "123" and $name && (!$nomultis || $isadmin)) {
     if (!mysql_num_rows($users)) {
         $userlevel = 3;
     }
     $currenttime = ctime();
     $ipaddr = getenv("REMOTE_ADDR");
     if (!$x_hacks['host'] && false) {
         $sql->query("INSERT INTO `pendingusers` SET `username` = '{$name}', `password` = '" . $pass . "', `ip` = '{$ipaddr}', `time` = '{$currenttime}'") or print mysql_error();
         //		$sql->query("INSERT INTO `ipbans` SET `ip` = '$ipaddr', `reason` = 'Automagic ban', `banner` = 'Acmlmboard'");
         print "{$tccell1}>Thank you, {$username}, for registering your account.<br>" . redirect('index.php', 'the board', 0);
     } else {
         $ircout['name'] = stripslashes($name);
         $ircout['ip'] = $ipaddr;
         // No longer useful
         //$ircout['pmatch']	= $sql -> resultq("SELECT COUNT(*) FROM `users` WHERE `password` = '". md5($pass) ."'");
         $sql->query("INSERT INTO `users` SET `name` = '{$name}', `password` = '" . md5($pass) . "', `powerlevel` = '0', `postsperpage` = '20', `threadsperpage` = '50', `lastip` = '{$ipaddr}', `layout` = '1', `scheme` = '0', `lastactivity` = '{$currenttime}', `regdate` = '{$currenttime}'") or print mysql_error();
         $newuserid = mysql_insert_id();
         $sql->query("UPDATE users SET `password` = '" . getpwhash($pass, $newuserid) . "' WHERE `id` = '{$newuserid}'");
         $ircout['id'] = $newuserid;
         xk_ircout("user", $ircout['name'], $ircout);
Ejemplo n.º 11
0
if ($_GET['forum']) {
    $fid = intval($_GET['forum']);
    $forum = $sql->fetchq("SELECT title, minpower FROM forums WHERE id={$fid}");
    if ($forum['minpower'] > 0 && $power < $forum['minpower']) {
        errorpage('You don\'t have access to view posts in this forum.', 'return to the board', 'index.php');
    }
    $where = "in {$forum['title']}";
    $forumquery = " AND t.forum = {$fid}";
} else {
    $forumquery = '';
    $where = "on the board";
}
if ($_GET['time']) {
    $time = intval($_GET['time']);
    $when = " over the past " . timeunits2($time);
    $timequery = ' AND p.date > ' . (ctime() - $time);
} else {
    $timequery = $when = '';
}
if (!$page) {
    $page = 0;
}
if (!$ppp) {
    $ppp = 50;
}
$min = $ppp * $page;
$posts = $sql->query("SELECT p.id,thread,ip,date,num,t.title,minpower " . "FROM posts p " . "LEFT JOIN threads t ON (thread=t.id) " . "LEFT JOIN forums f ON (t.forum=f.id) " . "WHERE p.user={$id}{$forumquery}{$timequery} ORDER BY p.id DESC");
$posttotal = mysql_num_rows($posts);
// Seek to page
if (!@mysql_data_seek($posts, $min)) {
    $page = 0;
Ejemplo n.º 12
0
<?php

require 'lib/function.php';
require 'lib/layout.php';
$userid = htmlspecialchars(stripslashes($_GET['userid']));
$vd = date('m-d-y', ctime());
if (!$m && !$d && !$y) {
    $m = date("m", ctime() - 86400);
    $d = date("d", ctime() - 86400);
    $y = date("y", ctime() - 86400);
}
if (!$v) {
    $v = 0;
    $dd = mktime(0, 0, 0, substr($vd, 0, 2), substr($vd, 3, 2), substr($vd, 6, 2));
    // + (3*3600);
    $dd2 = mktime(0, 0, 0, substr($vd, 0, 2), substr($vd, 3, 2) + 1, substr($vd, 6, 2));
    // + (3*3600);
} else {
    $dd = mktime(0, 0, 0, $m, $d, $y);
    // + (3*3600);
    $dd2 = mktime(0, 0, 0, $m, $d + 1, $y);
    // + (3*3600);
}
$users = $sql->query("SELECT u.id,u.name,u.aka,u.sex,u.powerlevel,COUNT(*) AS cnt FROM users AS u,posts AS p WHERE p.user=u.id AND p.date>={$dd} AND p.date<{$dd2} AND u.powerlevel >= 0 GROUP BY u.id ORDER BY cnt DESC");
$i = 0;
if (!$u) {
    $u = 0;
    $n = $loguser['name'];
} elseif ($u == 2) {
    $n = $userid;
}
Ejemplo n.º 13
0
echo $form;
// ---------------------------------------------------------------------------------------------------------------------
if ($dosearch) {
    $mc_start = microtime(true);
    // Remove parameters for go to news from searchbox
    $_static_qr = 'dosearch,archives,search,from_date_year,from_date_month,from_date_day,to_date_year,to_date_month,to_date_day,search_st,number,archive,template';
    $st = -1;
    $_next_link = FALSE;
    $_number = $number;
    $archive_id = 0;
    // get archive list
    $_list_archives = db_get_archives();
    krsort($_list_archives);
    reset($_list_archives);
    $news = db_index_load('');
    $c_time = ctime();
    $itemid = 0;
    if (strlen($search) < 3) {
        echo "<div>Too short request!</div>";
    } else {
        $block = '';
        $found = 0;
        do {
            reset($news);
            // repeat, while data exists
            while ($news) {
                // pop top element
                $id = key($news);
                unset($news[$id]);
                if ($id > $c_time) {
                    continue;
Ejemplo n.º 14
0
function postcode($post, $set)
{
    global $tzoff, $smallfont, $ip, $quote, $edit, $dateshort, $dateformat, $tlayout, $textcolor, $numdir, $numfil, $tblstart, $hacks, $x_hacks, $loguser;
    $tblend = "</table>";
    $exp = calcexp($post['posts'], (ctime() - $post['regdate']) / 86400);
    $lvl = calclvl($exp);
    $expleft = calcexpleft($exp);
    if ($tlayout == 1) {
        $level = "Level: {$lvl}";
        $poststext = "Posts: ";
        $postnum = "{$post['num']}/";
        $posttotal = $post['posts'];
        $experience = "EXP: {$exp}<br>For next: {$expleft}";
        $totalwidth = 96;
        $barwidth = $totalwidth - round(@($expleft / totallvlexp($lvl)) * $totalwidth);
        if ($barwidth < 1) {
            $barwidth = 0;
        }
        if ($barwidth > 0) {
            $baron = "<img src=images/{$numdir}" . "bar-on.gif width={$barwidth} height=8>";
        }
        if ($barwidth < $totalwidth) {
            $baroff = "<img src=images/{$numdir}" . 'bar-off.gif width=' . ($totalwidth - $barwidth) . ' height=8>';
        }
        $bar = "<br><img src=images/{$numdir}" . "barleft.gif height=8>{$baron}{$baroff}<img src=images/{$numdir}" . 'barright.gif height=8>';
    } else {
        $level = "<img src=images/{$numdir}" . "level.gif width=36 height=8><img src=numgfx.php?n={$lvl}&l=3&f={$numfil} height=8>";
        $experience = "<img src=images/{$numdir}" . "exp.gif width=20 height=8><img src=numgfx.php?n={$exp}&l=5&f={$numfil} height=8><br><img src=images/{$numdir}" . "fornext.gif width=44 height=8><img src=numgfx.php?n={$expleft}&l=2&f={$numfil} height=8>";
        $poststext = "<img src=images/_.gif height=2><br><img src=images/{$numdir}" . "posts.gif width=28 height=8>";
        $postnum = "<img src=numgfx.php?n={$post['num']}/&l=5&f={$numfil} height=8>";
        $posttotal = "<img src=numgfx.php?n={$post['posts']}&f={$numfil}" . ($post['num'] ? '' : '&l=4') . " height=8>";
        $totalwidth = 56;
        $barwidth = $totalwidth - round(@($expleft / totallvlexp($lvl)) * $totalwidth);
        if ($barwidth < 1) {
            $barwidth = 0;
        }
        if ($barwidth > 0) {
            $baron = "<img src=images/{$numdir}" . "bar-on.gif width={$barwidth} height=8>";
        }
        if ($barwidth < $totalwidth) {
            $baroff = "<img src=images/{$numdir}" . 'bar-off.gif width=' . ($totalwidth - $barwidth) . ' height=8>';
        }
        $bar = "<br><img src=images/{$numdir}" . "barleft.gif width=2 height=8>{$baron}{$baroff}<img src=images/{$numdir}" . 'barright.gif width=2 height=8>';
    }
    if (!$post['num']) {
        $postnum = '';
        if ($postlayout == 1) {
            $posttotal = "<img src=numgfx.php?n={$post['posts']}&f={$numfil}&l=4 height=8>";
        }
    }
    $reinf = syndrome(filter_int($post['act']));
    if ($post['lastposttime']) {
        $sincelastpost = 'Since last post: ' . timeunits(ctime() - $post['lastposttime']);
    }
    $lastactivity = 'Last activity: ' . timeunits(ctime() - $post['lastactivity']);
    $since = 'Since: ' . @date($dateshort, $post['regdate'] + $tzoff);
    $postdate = date($dateformat, $post['date'] + $tzoff);
    $threadlink = "";
    if (filter_string($set['threadlink'])) {
        $threadlink = ", in {$set['threadlink']}";
    }
    $post['edited'] = filter_string($post['edited']);
    if ($post['edited']) {
        //		.="<hr>$smallfont$post[edited]";
    }
    $sidebars = array(1, 3, 19, 89, 387, 45, 92, 47);
    $sidebars = array(1, 19, 89, 387, 45, 92, 47, 1420, 1090, 2100, 2069);
    // Large block of user-specific hacks follows //
    if ($post['uid'] == 1 && !$x_hacks['host'] && true) {
        global $numdir;
        $numdir_ = $numdir;
        $numdir = "num3/";
        if ($post['num']) {
            $numtext = generatenumbergfx($post['num'], 1, true) . "<br>" . generatenumbergfx($post['posts']);
        } else {
            $numtext = generatenumbergfx($post['posts'], 1, true);
        }
        $numdir = $numdir_;
        return "\n\t{$tblstart}\n\t{$set['tdbg']} rowspan=2 style='padding: 5px 1px 5px 1px;'>\n\t  <center>{$set['userlink']}{$smallfont}<br>\n\t  {$set['userrank']}\n\t\t{$reinf}\n\t\t<br>\n\t\t<br>{$set['userpic']}\n\t\t<br><br>{$numtext}</center>\n\t  <br><img src=images/_.gif width=200 height=1>\n\t</td>\n\t{$set['tdbg']} height=1 width=100%>\n\t  <table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t    <td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t    <td width=255><nobr>{$quote}{$edit}{$ip}\n\t  </table><tr>\n\t{$set['tdbg']} height=220 id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>\n\t{$tblend}";
    }
    // Inu's sidebar
    // (moved up here for to display for everyone during doomclock mode!)
    if ($post['uid'] == "2100" && !$x_hacks['host']) {
        $posttable = "<table style=\"border:none;border-spacing:0px;\">";
        // doomclock
        if (($doomclock_time = mktime(12, 20, 0, 4, 20, 2014) - cmicrotime()) >= 0) {
            $doomclock_secs = (int) ($doomclock_time % 60);
            $doomclock_mins = (int) ($doomclock_time % 3600 / 60);
            $doomclock_hrs = (int) ($doomclock_time / 3600);
            $doomclock_str = sprintf(" %d=%02d=%02d", $doomclock_hrs, $doomclock_mins, $doomclock_secs);
            $doomclock_desc = "{$doomclock_hrs} hours, {$doomclock_mins} minutes, {$doomclock_secs} seconds";
            $posttable .= "<tr><td><img src=\"images/inu/cifont/d.gif\" title=\"Doomsday\"></td><td align='right'>";
            $posttable .= inu_hexclock($doomclock_desc, $doomclock_time);
            $posttable .= "</td><td align='right'><img src=\"/images/inu/7sd.php?s=>FFF{$doomclock_str}\"></td></tr>";
        }
        if ($post['num']) {
            $posttable .= "<tr><td><img src=\"images/inu/cifont/p.gif\" title=\"Post Number\"></td><td>";
            $posttable .= inu_binaryposts($post['num'], "images/dot3.gif", "images/dot1.gif", $post['posts']);
            $posttable .= "</td><td align='right'><img src=\"/images/inu/7sd.php?s=" . sprintf("%4d", $post['num']) . "\"></td></tr>";
        }
        $posttable .= "<tr><td><img src=\"images/inu/cifont/t.gif\" title=\"Total Posts\"></td><td>";
        $posttable .= inu_binaryposts($post['posts'], "images/dot5.gif", "images/dot1.gif");
        $posttable .= "</td><td align='right'><img src=\"/images/inu/7sd.php?s=>F90" . sprintf("%4d", $post['posts']) . "\"></td></tr></table>";
        /*
        		$lp = ((!$post['lastposttime']) ? "" : 'Last posted >fff'.timeunits(ctime()-$post['lastposttime']).' >0f0ago');
        		$la ='Last active >fff'.timeunits(ctime()-$post['lastactivity']).' >0f0ago';
        		$jd ='Joined >f11'.@date("m.d.Y",$post['regdate']+$tzoff);
        
        		return "$tblstart
        			". str_replace('valign=top', 'valign=top', $set['tdbg']) ." rowspan=2 align=center style=\"font-size: 12px;\">
        				".inu_hexclock()."
        				 <a name=$post[id]></a><a href=\"profile.php?id=2100\"><img src=\"/images/inu/7sd.php?s=- >EC1Inuyasha>0f0 -\"></a>
        				$smallfont
        				<br><marquee scrolldelay=250 scrollamount=30 width=30 height=8 behavior=alternate><img src=\"/images/inu/7sd.php?s=>f0012=00\"><img src=\"/images/inu/7sd.php?s=>f00  =%20%20\"></marquee>
        				<br>$reinf
        				$set[userpic]
        				<br>
        				<br>". ($hacks['noposts'] ? "" : "$posttable") ."
        				<br>
        				<br><img src=\"/images/inu/7sd.php?s=$jd\">
        				<br>
        				<br><img src=\"/images/inu/7sd.php?s=$lp\">
        				<br><img src=\"/images/inu/7sd.php?s=$la\"></font>
        				<br><img src=images/_.gif width=200 height=1>
        			</td>
        		$set[tdbg] height=1 width=100%>
        			<table cellspacing=0 cellpadding=2 width=100% class=fonts>
        				<td>Posted on $postdate$threadlink$post[edited]</td>
        				<td width=255><nobr>$quote$edit$ip
        			</table><tr>
        		$set[tdbg] height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>
        		$tblend"; */
        // non-image old version
        $lp = !$post['lastposttime'] ? "" : 'Last posted ' . timeunits(ctime() - $post['lastposttime']) . ' ago';
        $la = 'Last active ' . timeunits(ctime() - $post['lastactivity']) . ' ago';
        $jd = 'Joined ' . @date("m.d.Y", $post['regdate'] + $tzoff);
        $dstyle = '';
        // [D]Inuyasha
        if ($post['moodid'] == 5) {
            $post['headtext'] = str_replace(array('class="inu-bg"', 'class="inu-tx"'), array('class="inu-dbg"', 'class="inu-dtx"'), $post['headtext']);
            $set['userlink'] = ' <a name=' . $post['id'] . '></a><a class="url2100" href="profile.php?id=2100"><font color="FF0202">[D]Inuyasha</font></a>';
            $set['userrank'] = 'Now you\'ve done it...!';
            $set['userpic'] = '<img src="http://inuyasha.rustedlogic.net/personal/moodav/5.png">';
            $dstyle = ' style="color:#b671e8;background:black;"';
        }
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set['tdbg']) . "{$dstyle} rowspan=2 align=center style=\"font-size: 12px;\">\n\t\t\t\t &mdash; {$set['userlink']} &mdash;\n\t\t\t\t{$smallfont}\n\t\t\t\t" . ($set['userrank'] ? "<br>" . $set['userrank'] . "<br>" : "") . "\n\t\t\t\t{$reinf}\n\t\t\t\t<br>\n\t\t\t\t{$set['userpic']}\n\t\t\t\t<br>\n\t\t\t\t<br>" . ($hacks['noposts'] ? "" : "{$posttable}") . "\n\t\t\t\t<br>\n\t\t\t\t<br>{$jd}\n\t\t\t\t<br>\n\t\t\t\t<br>{$lp}\n\t\t\t\t<br>{$la}</font>\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t{$set['tdbg']}{$dstyle} height=1 width=100%>\n\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts{$dstyle}>\n\t\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t{$set['tdbg']}{$dstyle} height=220 id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>\n\t\t{$tblend}";
    }
    // End Inu's sidebar
    if ($post['uid'] == 18 && !$x_hacks['host'] && $x_hacks['mmdeath'] >= 0 && !$_GET['test2']) {
        return "\n\t<table style=\"background: #f00 url('numgfx/red.gif');\" cellpadding=3 cellspacing=1>\n\t{$set['tdbg']} style='background: #000;' rowspan=2>\n\t\t<br><center class='stupiddoomtimerhack'><img src='numgfx.php?f=numdeath&n=" . $x_hacks['mmdeath'] . "' height=32 style=\"background: #f00 url('numgfx/red.gif');\" title=\"Doom.\"></center>\n\t\t<br>\n\t  <center>{$set['userlink']}{$smallfont}<br>\n\t\t<br>\n\t\t<br>{$set['userpic']}\n\t\t</center>\n\n\t\t<br><img src=images/_.gif width=194 height=1>\n\t</td>\n\t{$set['tdbg']} style='background: #000;'height=1 width=100%>\n\t  <table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t    <td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t    <td width=255><nobr>{$quote}{$edit}{$ip}\n\t  </table><tr>\n\t{$set['tdbg']} style='background: #000;' height=220 id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>\n\t{$tblend}";
    }
    // Default layout
    if (!(in_array($post['uid'], $sidebars) && !$x_hacks['host']) || $loguser['viewsig'] == 0) {
        return "\n\t<div style='position:relative'>\n\t{$tblstart}\n\t{$set['tdbg']} rowspan=2>\n\t  {$set['userlink']}{$smallfont}<br>\n\t  {$set['userrank']}{$reinf}<br>\n        {$level}{$bar}<br>\n\t  {$set['userpic']}<br>\n\t  " . (filter_bool($hacks['noposts']) ? "" : "{$poststext}{$postnum}{$posttotal}<br>") . "\n\t  {$experience}<br><br>\n\t  {$since}<br>" . str_ireplace("&lt;br&gt;", "<br>", substr(htmlspecialchars($set['location']), 10)) . "<br><br>\n\t  {$sincelastpost}<br>{$lastactivity}<br>\n\t  </font>\n\t  <br><img src=images/_.gif width=200 height=1>\n\t</td>\n\t{$set['tdbg']} height=1 width=100%>\n\t  <table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t    <td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t    <td width=255><nobr>{$quote}{$edit}{$ip}\n\t  </table><tr>\n\t{$set['tdbg']} height=220 id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>\n\t{$tblend}\n\t</div>";
    } elseif ($post['uid'] == "1" && !$x_hacks['host']) {
        $lastactivity = 'Active </font>' . timeunits(ctime() - $post['lastactivity']) . "<font color=#bbbbbb> ago";
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s:";
        }
        //". str_replace('valign=top', 'valign=top', $set[tdbg]) ."
        return "<table width=100% cellpadding=0 cellspacing=0 style=\"background: #004c5a; background-position: top right; background-repeat: repeat-x; border: 1px solid #000;\">\n\t\t\t<tr>\n\t\t\t<td rowspan=2 valign=top align=center style=\"font-size: 12px; color: #fff; font-family: Verdana, sans-serif; border-right: 3px double #000; background: #004c5a;\">\n\t\t\t\t&mdash; {$set['userlink']} &mdash;\n\t\t\t\t{$smallfont}\n\t\t\t\t" . ($set['userrank'] ? "<br>" . $set['userrank'] . "<br>" : "") . "\n\t\t\t\t<br>{$set['userpic']}\n\t\t\t\t<br>" . ($hacks['noposts'] ? "<font color=#cccccc>" : "<br>Post{$postss} {$postnum}<font color=#cccccc>{$posttotal}") . "\n\t\t\t\t<br>{$lastactivity}</font>\n\t\t\t\t" . (false ? "<br><a href=sendprivate.php?uid=1>PM</a> - <a href=rateuser.php?id=1>Rate</a>" : "") . "\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t\t<td height=1 width=100% style=\"font-size: 12px; color: #ddd; font-family: Verdana, sans-serif; background: #004c5a; border-bottom: 1px solid #000;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t<td valign='top' id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
    } elseif ($post['uid'] == "3" && !$x_hacks['host']) {
        $lastactivity = 'Active </font>' . timeunits(ctime() - $post[lastactivity]) . '<font color=#bb0000> ago';
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s:";
        }
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set[tdbg]) . " rowspan=2 align=center style=\"background: #000; font-size: 12px; color: #f00; font-family: Verdana, sans-serif;\">\n\t\t\t\t &mdash; {$set['userlink']} &mdash;\n\t\t\t\t{$smallfont}\n\t\t\t\t" . ($set['userrank'] ? "<br>" . $set['userrank'] : "") . "\n\t\t\t\t{$set['userpic']}\n\t\t\t\t<br>" . ($hacks['noposts'] ? "<font color=#bb0000>" : "<br>Post{$postss} {$postnum}<font color=#bb0000>{$posttotal}") . "\n\t\t\t\t<br>{$lastactivity}</font>\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: #000000; font-size: 12px; color: #ff0000; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
        // ************************************************************
        // SYAORAN COLIN
        // ************************************************************
    } elseif ($post['uid'] == "45" && !$x_hacks['host']) {
        $fcol1 = "#204080";
        $fcol2 = "#3070a0";
        $fcol3 = "#f0f8ff";
        $lastactivity = 'Active </font>' . timeunits(ctime() - $post[lastactivity]) . "<font color={$fcol2}> ago";
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s:";
        }
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set[tdbg]) . " rowspan=2 align=center style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t &mdash; {$set['userlink']} &mdash;\n\t\t\t\t{$smallfont}\n\t\t\t\t" . ($set['userrank'] ? "<br>" . $set['userrank'] : "") . "\n\t\t\t\t{$reinf}\n\t\t\t\t{$set['userpic']}\n\t\t\t\t<br>" . ($hacks['noposts'] ? "<font color={$fcol2}>" : "<br>Post{$postss} {$postnum}<font color={$fcol2}>{$posttotal}") . "\n\t\t\t\t<br>{$lastactivity}</font>\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td style='color: {$fcol1};'>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
    } elseif ($post['uid'] == "47" && !$x_hacks['host']) {
        $fcol1 = "#204080";
        $fcol2 = "#3070a0";
        $fcol3 = "#ffffff";
        $fcol1 = "#9966bb";
        $fcol2 = "#ccaadd";
        $fcol3 = "#000000";
        if ($post['posts'] >= 20000) {
            $fcol1 = "#bbaadd";
            $fcol2 = "#eebbff";
            $fcol3 = "#000000";
        }
        $lastactivity = 'Active </font>' . timeunits(ctime() - $post[lastactivity]) . "<font color={$fcol2}> ago";
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s:";
        }
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set[tdbg]) . " rowspan=2 align=center style=\"background: {$fcol3}" . ($post['posts'] >= 20000 ? " url('http://www.ffalexandria.com/orlandu/anya/side_bg.jpg'); background-position:bottom left" : "") . "; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t &mdash; {$set['userlink']} &mdash;\n\t\t\t\t<br>{$smallfont}\n\t\t\t\t" . ($set['userrank'] ? "<br>" . $set['userrank'] : "") . "\n\t\t\t\t{$reinf}\n\t\t\t\t<br><br>{$set['userpic']}\n\t\t\t\t<br><br>Post{$postss} {$postnum}{$posttotal}\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td style='color: {$fcol1};'>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
        return "\n\t\t{$tblstart}\n\t\t{$set['tdbg']} rowspan=2 style='padding: 5px;'>\n\t\t  <img src='images/smilies/bigeyes.gif' title='o_O' align='absmiddle'> {$set['userlink']}{$smallfont}<br>\n\t\t  " . ($set['userrank'] ? "<br>" . $set['userrank'] : "") . "\n\t\t\t\t{$reinf}\n\t\t\t\t<br>\n\t\t\t\t{$set['userpic']}\n\t\t\t\t<br>\n\t\t\t\t<br>Post{$postss} {$postnum}{$posttotal}\n\t\t  </center><br><img src=images/_.gif width=190 height=1>\n\t\t</td>\n\t\t{$set['tdbg']} height=1 width=100%>\n\t\t  <table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t  </table><tr>\n\t\t{$set['tdbg']} height=220 id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>\n\t\t{$tblend}";
        // ************************************************************
        // SAKURA HIRYUU
        // ************************************************************
    } elseif ($post['uid'] == "4xxxxxxxxxxx7" && !$x_hacks['host']) {
        $fcol1 = "#802040";
        $fcol2 = "#a07030";
        $fcol3 = "#fff0f8";
        $lastactivity = 'Active </font>' . timeunits(ctime() - $post[lastactivity]) . "<font color={$fcol2}> ago";
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s:";
        }
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set[tdbg]) . " rowspan=2 align=center style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t &mdash; {$set['userlink']} &mdash;\n\t\t\t\t{$smallfont}\n\t\t\t\t" . ($set['userrank'] ? "<br>" . $set['userrank'] : "") . "\n\t\t\t\t{$reinf}\n\t\t\t\t{$set['userpic']}\n\t\t\t\t<br>" . ($hacks['noposts'] ? "<font color={$fcol2}>" : "<br>Post{$postss} {$postnum}<font color={$fcol2}>{$posttotal}") . "\n\t\t\t\t<br>{$lastactivity}</font>\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td style=\"color: {$fcol1};\">Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
        // ************************************************************
        // REAL HIRYUU
        // ************************************************************
    } elseif ($post['uid'] == "92" && !$x_hacks['host']) {
        $fcol1 = "#e2bbff";
        $fcol2 = "#bb70dd";
        $fcol3 = "#220033";
        $fcol1 = "#ffeeaa";
        $fcol2 = "#998844";
        $fcol3 = "#221100";
        $fcol1 = "#ffaaaa";
        $fcol2 = "#ff7777";
        $fcol3 = "#661111";
        $fcol1 = "#ffffff";
        $fcol2 = "#eeeeee";
        $fcol3 = "#000000";
        $lastactivity = 'Active </font>' . timeunits(ctime() - $post[lastactivity]) . "<font color={$fcol2}> ago";
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s:";
        }
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set[tdbg]) . " rowspan=2 align=center style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t &mdash; {$set['userlink']} &mdash;\n\t\t\t\t{$smallfont}\n\t\t\t\t" . ($set['userrank'] ? "<br>" . $set['userrank'] : "") . "\n\t\t\t\t{$reinf}\n\t\t\t\t{$set['userpic']}\n\t\t\t\t<br>" . ($hacks['noposts'] ? "<font color={$fcol2}>" : "<br>Post{$postss} {$postnum}<font color={$fcol2}>{$posttotal}") . "\n\t\t\t\t<br>{$lastactivity}</font>\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
    } elseif ($post['uid'] == "19" && !$x_hacks['host']) {
        $fcol1 = "#bbbbeb";
        $fcol2 = "#8888a8";
        $fcol3 = "#080818 url('http://bloodstar.rustedlogic.net/layout/background.png')";
        $lastactivity = 'Active </font>' . timeunits(ctime() - $post[lastactivity]) . "<font color={$fcol2}> ago";
        $joindate = 'Joined </font>' . date($dateshort, $post[regdate] + $tzoff) . "<font color={$fcol2}>";
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s:";
        }
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set[tdbg]) . " rowspan=2 align=center style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t &mdash; {$set['userlink']} &mdash;\n\t\t\t\t{$smallfont}\n\t\t\t\t" . ($set['userrank'] ? "<br>" . $set['userrank'] . "<br>" : "") . "\n\t\t\t\t{$reinf}\n\t\t\t\t{$set['userpic']}\n\t\t\t\t<br>" . ($hacks['noposts'] ? "<font color={$fcol2}>" : "<br>Post{$postss} {$postnum}<font color={$fcol2}>{$posttotal}") . "\n\t\t\t\t<br>\n\t\t\t\t<br>{$joindate}\n\t\t\t\t<br>{$lastactivity}</font>\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
    } elseif ($post['uid'] == "4" && !$x_hacks['host']) {
        $fcol1 = "#9999cc";
        $fcol2 = "#7777aa";
        $fcol3 = "#000011";
        $lastactivity = 'Active </font>' . timeunits(ctime() - $post[lastactivity]) . "<font color={$fcol2}> ago";
        $joindate = 'Joined </font>' . date($dateshort, $post[regdate] + $tzoff) . "<font color={$fcol2}>";
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s:";
        }
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set[tdbg]) . " rowspan=2 align=center style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t &mdash; {$set['userlink']} &mdash;\n\t\t\t\t{$smallfont}\n\t\t\t\t" . ($set['userrank'] ? "<br>" . $set['userrank'] . "<br>" : "") . "\n\t\t\t\t{$set['userpic']}\n\t\t\t\t<br>" . ($hacks['noposts'] ? "<font color={$fcol2}>" : "<br>Post{$postss} {$postnum}<font color={$fcol2}>{$posttotal}") . "\n\t\t\t\t<br>\n\t\t\t\t<br>{$joindate}\n\t\t\t\t<br>{$lastactivity}</font>\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
    } elseif ($post['uid'] == "387" && !$x_hacks['host']) {
        if (!$x_hacks['rpgstats'][$post['uid']]) {
            $css = "<style> .a1{ height:100%; min-height: 286px; background:#000 url(http://acmlm.rustedlogic.net/etc/nismilly/bg.jpg) 50% 0% no-repeat; } div.a2{ height:100%; min-height: 286px; background:url(http://acmlm.rustedlogic.net/etc/nismilly/map.png) 50% 226px no-repeat; font:9px tahoma; color:#FD4; text-align:center; line-height:19px; } div.a2 img{ margin-top:-5px; border:0px; } div.a2 span{ color:#DEF; } </style>";
            $x_hacks['rpgstats'][$post['uid']] == "lol";
        }
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s:";
        }
        return "{$tblstart}\n\t\t\t" . str_replace('\' valign=top', ' a1\' valign=top', $set[tdbg]) . " rowspan=2 align=center style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t{$css}\n\t\t\t\t<div class=a2>\n\t\t\t\t\tPost{$postss} <span><b>{$postnum}</b></span><span><b>{$posttotal}</b></span> (<span>" . timeunits(ctime() - $post[lastposttime]) . "</span>),\n\t\t\t\t\tonline <span>" . timeunits(ctime() - $post[lastactivity]) . "</span> ago\n\t\t\t\t\t<a href=//jul.rustedlogic.net/profile.php?id=387>\n\t\t\t" . (strpos($_SERVER['USER_AGENT'], "MSIE 6.0") ? "<img src=_.png style=filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://acmlm.rustedlogic.net/etc/nismilly/stat.php)>" : "<img src=http://acmlm.rustedlogic.net/etc/nismilly/stat.php>") . "\n\t\t\t\t\t</a>\n\t\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
    } elseif ($post['uid'] == "89" && !$x_hacks['host']) {
        $fcol1 = "#bbbbbb";
        $fcol2 = "#555555";
        $fcol3 = "#181818";
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set[tdbg]) . " rowspan=2 align=center style=\"background: {$fcol3}; font-size: 14px; color: {$fcol1}; font-family: Verdana, sans-serif; padding-top: .5em;\">\n\t\t\t\t{$set['userlink']}\n\t\t\t\t<br><span style=\"letter-spacing: 0px; color: {$fcol2}; font-size: 10px;\">Collection of nobodies</span>\n\t\t\t\t<br><img src=images/_.gif width=200 height=200>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"background: {$fcol3}; padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
    } elseif (($post['uid'] == "16" || $post['uid'] == "5") && !$x_hacks['host']) {
        // top bg #614735
        // mid-bg #e1cfb6
        // darker #d0bca4
        if (!function_exists("basestat")) {
            require 'lib/rpg.php';
        }
        if (!$x_hacks['rpgstats'][$post['uid']]) {
            $eq = array('1' => "<center style=\"text-align: center; color: #b09080;\">(Weapon)</center>", '2' => "<center style=\"text-align: center; color: #b09080;\">(Armor)</center>", '3' => "<center style=\"text-align: center; color: #b09080;\">(Shield)</center>", '4' => "<center style=\"text-align: center; color: #b09080;\">(Helm)</center>", '5' => "<center style=\"text-align: center; color: #b09080;\">(Shoes)</center>", '6' => "<center style=\"text-align: center; color: #b09080;\">(Acc.)</center>");
            $user = mysql_fetch_array(mysql_query("SELECT name,posts,regdate,users_rpg.* FROM users,users_rpg WHERE id='" . $post['uid'] . "' AND uid=id"));
            $d = (ctime() - $user[regdate]) / 86400;
            $eqitems = mysql_query("SELECT * FROM items WHERE id={$user['eq1']} OR id={$user['eq2']} OR id={$user['eq3']} OR id={$user['eq4']} OR id={$user['eq5']} OR id={$user['eq6']}") or print mysql_error();
            while ($item = mysql_fetch_array($eqitems)) {
                $items[$item[id]] = $item;
                $eq[$item['cat']] = $item['name'];
            }
            if ($ct) {
                $GPdif = floor($items[$user['eq' . $ct]][coins] * 0.6) - $items[$it][coins];
                $user['eq' . $ct] = $it;
            }
            $st = getstats($user, $items);
            $st[GP] += $GPdif;
            if ($st[lvl] > 0) {
                $pct = 1 - calcexpleft($st[exp]) / totallvlexp($st[lvl]);
            }
            $st['expn'] = calcexpleft($st[exp]);
            $st['eq'] = $eq;
            $x_hacks['rpgstats'][$post['uid']] = $st;
        } else {
            $st = $x_hacks['rpgstats'][$post['uid']];
        }
        $lastactivity = 'Active ' . timeunits(ctime() - $post[lastactivity]) . " ago";
        $joindate = 'Joined ' . date($dateshort, $post[regdate] + $tzoff);
        $postnum = $post['num'] . "/";
        $posttotal = $post['posts'];
        if (!$post['num']) {
            $postnum = '';
            $postss = "s";
        }
        if (!$set['picture']) {
            $set['picture'] = "images/_.gif";
        }
        if ($_GET['z']) {
            print_r($st['eq']);
        }
        return "{$tblstart}\n\t\t\t" . str_replace('valign=top', 'valign=top', $set[tdbg]) . " rowspan=2 width=200>\n\t\t\t\t <table style=\"font-family: Tahoma; font-size: 12px; color: #000; background: #e1cfb6;\" width=100% cellspacing=0>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"background: #614735; text-align: left; padding: 2px 0px 2px 15px; font-size: 14px; letter-spacing: 1px; border: 2px outset #614735;\" colspan=4>{$set['userlink']}</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"border: 2px outset #614735;\" colspan=4>\n\t\t\t\t\t\t\t <table width=100% cellspacing=0 cellpadding=0 style=\"color: #000; font-size: 12px;\">\n\t\t\t\t\t\t\t\t<tr><td rowspan=5 width=0 style=\"padding: 0 3px 0 0;\"><img src=\"" . $set['picture'] . "\" width=80 height=80></td>\n\t\t\t\t\t\t\t\t\t<td width=100% colspan=4 style=\"font-size: 14px; letter-spacing: 1px; padding: 0 0 7px 0;\">" . $set['userrank'] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr style=\"font-weight: bold;\"><td colspan=2 width=50%>Lv</td><td style=\"text-align: right;\" colspan=2 width=50%>" . $st['lvl'] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr style=\"font-weight: bold;\"><td colspan=2 width=50% style=\"font-variant: small-caps;\">Post{$postss}</td><td style=\"text-align: right;\" colspan=2 width=50%>{$postnum}{$posttotal}</tr>\n\t\t\t\t\t\t\t\t<tr style=\"font-weight: bold;\"><td colspan=2 width=50% style=\"font-variant: small-caps;\">Counter</td><td style=\"text-align: right;\" colspan=2 width=50%>2</td></tr>\n\t\t\t\t\t\t\t\t<tr style=\"font-weight: bold;\"><td>Mv</td><td style=\"text-align: right;\">7</td><td style=\"padding: 0 0 0 5px;\">Jm</td><td style=\"text-align: right;\">26</td></tr>\n\t\t\t\t\t\t\t</table>\t\t\t\t\n\n\t\t\t\t\t\t\t<table width=100% cellspacing=0 cellpadding=0 style=\"color: #000; font-size: 12px; font-weight: bold;\">\n\t\t\t\t\t\t\t\t<tr style=\"background: #d0bca4;\"><td style=\"font-variant: small-caps;\">Hp</td><td style=\"text-align: right;\" colspan=3>" . $st['HP'] . "/" . $st['HP'] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr                               ><td style=\"font-variant: small-caps;\">Sp</td><td style=\"text-align: right;\" colspan=3>" . $st['MP'] . "/" . $st['MP'] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr style=\"background: #d0bca4;\">\n\t\t\t\t\t\t\t\t\t<td style=\"font-variant: small-caps;\">Atk</td><td style=\"text-align: right; padding: 0 4px 0 0;\">" . $st['Atk'] . "</td>\n\t\t\t\t\t\t\t\t\t<td style=\"font-variant: small-caps; padding: 0 0 0 4px;\">Int</td><td style=\"text-align: right;\">" . $st['Int'] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr                               >\n\t\t\t\t\t\t\t\t\t<td style=\"font-variant: small-caps;\">Def</td><td style=\"text-align: right; padding: 0 4px 0 0;\">" . $st['Def'] . "</td>\n\t\t\t\t\t\t\t\t\t<td style=\"font-variant: small-caps; padding: 0 0 0 4px;\">Spd</td><td style=\"text-align: right;\">" . $st['Spd'] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr style=\"background: #d0bca4;\">\n\t\t\t\t\t\t\t\t\t<td style=\"font-variant: small-caps;\">Hit</td><td style=\"text-align: right; padding: 0 4px 0 0;\">" . $st['Dex'] . "</td>\n\t\t\t\t\t\t\t\t\t<td style=\"font-variant: small-caps; padding: 0 0 0 4px;\">Res</td><td style=\"text-align: right;\">" . $st['MDf'] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr                               ><td style=\"font-variant: small-caps;\">Exp</td><td style=\"text-align: right;\" colspan=3>" . $st['exp'] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr style=\"background: #d0bca4;\"><td style=\"font-variant: small-caps;\">Next</td><td style=\"text-align: right;\" colspan=3>" . $st['expn'] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr                               ><td colspan=4><img src=\"images/_.gif\" height=4 width=1></td></tr>\n\t\t\t\t\t\t\t\t<tr                               ><td colspan=4>" . $st['eq'][1] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr                               ><td colspan=4>" . $st['eq'][2] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr                               ><td colspan=4>" . $st['eq'][3] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr                               ><td colspan=4>" . $st['eq'][4] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr                               ><td colspan=4>" . $st['eq'][5] . "</td></tr>\n\t\t\t\t\t\t\t\t<tr                               ><td colspan=4>" . $st['eq'][6] . "</td></tr>\n\t\t\t\t\t\t\t</table>\t\t\t\t\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\n\t\t\t\t<br><img src=images/_.gif width=200 height=1>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100% style=\"background: {$fcol3}; font-size: 12px; color: {$fcol1}; font-family: Verdana, sans-serif;\">\n\t\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} style=\"padding: 0;\" id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>{$tblend}\n\t\t";
        /*
        <!--
        				$smallfont
        				<br>$joindate
        				<br>$lastactivity</font>
        */
    } elseif ($post['uid'] == 1090 && !$x_hacks['host']) {
        $brltype = "catgirlredux2011";
        $brsidebar = "\n\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"http://lain.rustedlogic.net/layouts/css/_br_sidebar.css\" />\n\t\t\t{$tblstart}\n\t\t\t{$set['tdbg']} rowspan=2>\n\t\t\t\t<div class=\"brsidebar lain-sidebar-{$brltype}\">\n\t\t\t\t<div class=\"bruserlink\">&mdash; {$set['userlink']} &mdash;</div>\n\t\t\t\t<div class=\"bruserrank\">{$set['userrank']}</div>" . (!empty($reinf) ? "<div class=\"brsyndrome\">{$reinf}</div>" : "") . "\n\t\t\t\t<div class=\"bruserpic\">{$set['userpic']}</div>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t{$set['tdbg']} height=1 width=100%>\n\t\t\t<table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t\t\t<td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t\t\t<td width=255><nobr>{$quote}{$edit}{$ip}\n\t\t\t</table><tr>\n\t\t\t{$set['tdbg']} height=220 id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>\n\t\t\t{$tblend}";
        return $brsidebar;
    } else {
        return "\n\t{$tblstart}\n\t{$set['tdbg']} rowspan=2>\n\t  {$set['userlink']}{$smallfont}<br>\n\t  {$set['userrank']}{$reinf}<br>\n\t  <br><img src=images/_.gif width=200 height=1>\n\t</td>\n\t{$set['tdbg']} height=1 width=100%>\n\t  <table cellspacing=0 cellpadding=2 width=100% class=fonts>\n\t    <td>Posted on {$postdate}{$threadlink}{$post['edited']}</td>\n\t    <td width=255><nobr>{$quote}{$edit}{$ip}\n\t  </table><tr>\n\t{$set['tdbg']} height=220 id=\"post" . $post['id'] . "\">{$post['headtext']}{$post['text']}{$post['signtext']}</td>\n\t{$tblend}";
    }
}
Ejemplo n.º 15
0
    $polltbl = "{$tblstart}\r\n\t\t\t<tr>{$tccellc} colspan=3><b>" . htmlspecialchars($poll['question']) . "</td></tr>\r\n\t\t\t<tr>{$tccell2ls} colspan=3>" . nl2br(dofilters($poll['briefing'])) . "</td></tr>\r\n\t\t\t{$choices}\r\n\t\t\t<tr>{$tccell2l} colspan=3>{$smallfont} {$polltext} {$tvotes_u} user{$s_have} voted. {$polledit}</td></tr>\r\n\t\t\t{$tblend}<br>\r\n\t\t\t";
}
loadtlayout();
switch ($loguser['viewsig']) {
    case 1:
        $sfields = ',headtext,signtext';
        break;
    case 2:
        $sfields = ',u.postheader headtext,u.signature signtext';
        break;
    default:
        $sfields = '';
        break;
}
$ufields = userfields();
$activity = $sql->query("SELECT user, count(*) num FROM posts WHERE date>" . (ctime() - 86400) . " GROUP BY user");
while ($n = $sql->fetch($activity)) {
    $act[$n['user']] = $n['num'];
}
$postlist = "\r\n\t\t{$polltbl}\r\n\t\t{$tblstart}\r\n\t\t{$modfeats}\r\n\t\t{$errormsgs}\r\n\t";
if ($log && $id && $forum['id']) {
    $headlinks .= " - <a href=index.php?action=markforumread&forumid={$forum['id']}>Mark forum read</a>";
    $header = makeheader($header1, $headlinks, $header2 . ($fonline ? "{$tblstart}{$tccell1s}>{$fonline}{$tblend}" : ""));
}
$threadforumlinks = "\r\n\t\t<table width=100%><td align=left>{$fonttag}<a href=index.php>" . $boardname . "</a>" . ($forum['title'] ? " - <a href=forum.php?id={$forumid}>{$forum['title']}</a>" : "") . " - {$thread['title']}</td><td align=right>{$smallfont}\r\n\t";
if ($forumid) {
    if ($forum['pollstyle'] != -2) {
        $threadforumlinks .= "<a href=newthread.php?poll=1&id={$forumid}>{$newpollpic}</a> - ";
    } else {
        $threadforumlinks .= "<img src=\"images/nopolls.png\" align=\"absmiddle\"> - ";
    }
Ejemplo n.º 16
0
         if (filter_bool($_POST['stick'])) {
             $stickq = "`sticky` = '1',";
         } else {
             $stickq = "`sticky` = '0',";
         }
     }
     $sql->query("INSERT INTO posts (thread,user,date,ip,num,headid,signid,moodid) VALUES ({$id},{$userid},{$currenttime},'{$userip}',{$numposts},{$headid},{$signid},'" . $_POST['moodid'] . "')");
     $pid = mysql_insert_id();
     $options = filter_int($nosmilies) . "|" . filter_int($nohtml);
     if ($pid) {
         $sql->query("INSERT INTO `posts_text` (`pid`,`text`,`tagval`, `options`) VALUES ('{$pid}','{$message}','{$tagval}', '{$options}')");
     }
     $sql->query("UPDATE `threads` SET {$closeq} {$stickq} `replies` =  `replies` + 1, `lastpostdate` = '{$currenttime}', `lastposter` = '{$userid}' WHERE `id`='{$id}'");
     $sql->query("UPDATE `forums` SET `numposts` = `numposts` + 1, `lastpostdate` = '{$currenttime}', `lastpostuser` ='{$userid}', `lastpostid` = '{$pid}' WHERE `id`='{$forumid}'");
     $sql->query("UPDATE `threadsread` SET `read` = '0' WHERE `tid` = '{$id}'");
     $sql->query("REPLACE INTO threadsread SET `uid` = '{$userid}', `tid` = '{$id}', `time` = " . ctime() . ", `read` = '1'");
     xk_ircout("reply", $user['name'], array('forum' => $forum['title'], 'fid' => $forumid, 'thread' => str_replace("&lt;", "<", $thread['title']), 'pid' => $pid, 'pow' => $forum['minpower']));
     return header("Location: thread.php?pid={$pid}#{$pid}");
 } else {
     loadtlayout();
     $message = stripslashes($message);
     $ppost = $user;
     $ppost['posts']++;
     $ppost['uid'] = $userid;
     $ppost['num'] = $numposts;
     $ppost['lastposttime'] = $currenttime;
     $ppost['date'] = $currenttime;
     $ppost['moodid'] = $_POST['moodid'];
     if (filter_bool($nolayout)) {
         $ppost['headtext'] = "";
         $ppost['signtext'] = "";
Ejemplo n.º 17
0
<?php

$windowtitle = "Admin Cruft";
require 'lib/function.php';
require 'lib/layout.php';
if (!in_array($loguser['id'], array(175, 1)) && $loguser['powerlevel'] < 1) {
    print "\r\n\t\t{$header}<br>\r\n\t\t{$tblstart}\r\n\t\t\t<tr>{$tccell1}>&nbsp;\r\n\t\t\t\t<br>No.\r\n\t\t\t\t<br>&nbsp;\r\n\t\t\t</td></tr>\r\n\t\t{$tblend}\r\n\r\n\t{$footer}\r\n\t";
    printtimedif($startingtime);
    die;
}
$expower = in_array($loguserid, array(175, 1, 2100));
if ($expower && $_GET['banip'] && $_GET['valid'] == md5($_GET['banip'] . "aglkdgslhkadgshlkgds")) {
    $sql->query("INSERT INTO `ipbans` SET `ip` = '" . $_GET['banip'] . "', `reason`='Abusive/unwelcome activity', `date` = '" . ctime() . "', `banner` = '{$loguserid}'") or print mysql_error();
    xk_ircsend("1|" . xk(8) . $loguser['name'] . xk(7) . " added IP ban for " . xk(8) . $_GET['banip'] . xk(7) . ".");
    return header("Location: ?");
}
print "{$header}<br>";
$clearbutton = '&nbsp;';
if ($expower) {
    if ($_POST['clear']) {
        $query = $sql->query("TRUNCATE `minilog`");
    }
    $clearbutton = "<br><form style='margin: 0px; padding: 0px;' action='?' method='post'>{$inps}='clear' value='Clear log'></form><br>";
}
$banflagnames[1] = "union<br>select";
$banflagnames[16384] = "acunetix";
$banflagnames[2048] = "get<br>+";
$banflagnames[4] = "get<br>--";
//	$banflagnames[    8]	= "get<br>;";  // Disabled. Too many false positives.
$banflagnames[2] = "get<br>comment";
$banflagnames[16] = "get<br>exec";
Ejemplo n.º 18
0
<?php

require 'lib/function.php';
$u = intval($_GET['u']);
if (!$u) {
    die;
}
$user['regdate'] = $sql->resultq("SELECT regdate FROM users WHERE id='{$u}'") or die;
$vd = date('m-d-y', $user['regdate']);
$dd = mktime(0, 0, 0, substr($vd, 0, 2), substr($vd, 3, 2), substr($vd, 6, 2));
$days = floor((ctime() - $dd) / 86400);
$pq = $sql->getresultsbykey("SELECT FROM_UNIXTIME(date, '%Y-%m-%d') day, count(*) c " . "FROM posts WHERE user={$u} GROUP BY day ORDER BY day", 'day', 'c');
for ($i = 0; $i < $days; ++$i) {
    $dk = date('Y-m-d', $dd + $i * 86400);
    if (!array_key_exists($dk, $pq)) {
        continue;
    }
    $p[$i] = $pq[$dk];
}
/*
	if($_GET['debugsql']) {
		require 'lib/layout.php';
		print $header.$footer;
		printtimedif(time());
		die(1);
	}
*/
$m = max($p);
$img = ImageCreate($days, $m);
$c['bg'] = ImageColorAllocate($img, 0, 0, 0);
$c['bg1'] = ImageColorAllocate($img, 0, 0, 80);
Ejemplo n.º 19
0
<?php

chdir("../");
require "lib/function.php";
$img = imagecreate(45, 37);
$bg = imagecolorallocate($img, 100, 100, 100);
$num = imagecreatefrompng("digitstiny.png");
$xk = $sql->fetchq("SELECT * FROM `users` WHERE `id` = '1'");
$thread = $sql->resultq("SELECT COUNT(`id`) FROM `threads` WHERE `user` = '1'");
$exp = calcexp($xk['posts'], (ctime() - $xk['regdate']) / 86400);
$level = calclvl($exp);
$expt = totallvlexp($level);
$expl = $expt - calcexpleft($exp);
drawnum($img, $num, 0, 0 + 0 * 6, $thread, 9);
drawnum($img, $num, 0, 0 + 1 * 6, $xk['posts'], 9);
drawnum($img, $num, 0, 1 + 2 * 6, $level, 9);
drawnum($img, $num, 0, 1 + 3 * 6, $expl, 9);
drawnum($img, $num, 0, 1 + 4 * 6, "/" . $expt, 9);
drawnum($img, $num, 0, 1 + 5 * 6, $exp, 9);
imagecolortransparent($img, $bg);
header("Content-type: image/png");
imagepng($img);
imagedestroy($img);
imagedestroy($num);
function drawnum($img, $num, $x, $y, $n, $l = 0, $z = false, $dx = 5, $dy = 6)
{
    $p = 0;
    if ($z) {
        $n = str_pad($n, $l, "0", STR_PAD_LEFT);
    }
    if (strlen($n) > $l) {
Ejemplo n.º 20
0
    die;
} else {
    if ($_POST['knockout']) {
        echo "SLAM JAM:\n";
        $sql->query("DELETE FROM threads WHERE user = '******' LIMIT 50");
        echo "Deleted threads.\n";
        $sql->query("DELETE FROM posts_text WHERE pid IN (SELECT id FROM posts WHERE user = '******') LIMIT 50");
        $sql->query("DELETE FROM posts WHERE user = '******' LIMIT 50");
        echo "Deleted posts.\n";
        $sql->query("DELETE FROM users WHERE id = '{$target_id}' LIMIT 1");
        $sql->query("DELETE FROM users_rpg WHERE uid = '{$target_id}' LIMIT 1");
        echo "Deleted user data.\n";
        $new_maxid = intval($sql->resultq("SELECT id FROM users ORDER BY id DESC LIMIT 1"));
        $sql->query("ALTER TABLE users AUTO_INCREMENT = {$new_maxid}");
        echo "Max ID set to {$new_maxid}.\n";
        @$sql->query("INSERT INTO `ipbans` SET `ip` = '" . $uinfo['lastip'] . "', `date` = '" . ctime() . "', `reason` = 'Thanks for playing!'");
        echo "Delivered IP ban to {$uinfo['lastip']}.\n";
        xk_ircsend("1|" . xk(8) . $uinfo['name'] . xk(7) . " (IP " . xk(8) . $uinfo['lastip'] . xk(7) . ") is the latest victim of the new EZ BAN button(tm).");
        echo "\n</div>" . redirect("admin-slammer.php", 'the slammer (for another go)', 2);
        die;
    } else {
        $threads = $sql->getarraybykey("SELECT id, forum, title FROM threads WHERE user = '******'", 'id');
        $posts = $sql->getarraybykey("SELECT id, thread FROM posts WHERE user = '******'", 'id');
        $ct_threads = count($threads);
        $ct_posts = count($posts);
        echo "Up on the chopping block today is \"{$uinfo['name']}\".\n\n";
        echo "Their last known IP address is \"{$uinfo['lastip']}\".\n\n";
        echo "They have made {$ct_threads} thread(s):\n";
        foreach ($threads as $th) {
            echo "{$th['id']}: {$th['title']} (in forum {$th['forum']})\n";
        }
Ejemplo n.º 21
0
                if ($ip1[$diff] != $ip2[$diff]) {
                    break;
                }
            }
            if ($diff == 0) {
                $color = xk(4);
            } else {
                $color = xk(8);
            }
            $diff = "/" . ($diff + 1) * 8;
            xk_ircsend("102|" . xk(7) . "User {$loguser['name']} (id {$loguserid}) changed from IP " . xk(8) . $loguser['lastip'] . xk(7) . " to " . xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) . " ({$color}{$diff}" . xk(7) . ")");
        }
        $sql->query("UPDATE users SET lastactivity=" . ctime() . ",lastip='{$userip}',lasturl='" . addslashes($url) . "',lastforum=0,`influence`='{$influencelv}' WHERE id={$loguserid}");
    }
} else {
    $sql->query("INSERT INTO guests (ip,date,useragent,lasturl) VALUES ('{$userip}'," . ctime() . ",'" . addslashes($_SERVER['HTTP_USER_AGENT']) . "','" . addslashes($url) . "')");
}
$header = makeheader($header1, $headlinks, $header2);
$footer = "\t</textarea></form></embed></noembed></noscript></noembed></embed></table></table>\n<br>" . ($loguser['id'] && strpos($PHP_SELF, "index.php") === false ? adbox() . "<br>" : "") . "\n<center>\n\n<!--\n<img src='adnonsense.php?m=d' title='generous donations to the first national bank of bad jokes and other dumb crap people post' style='margin-left: 44px;'><br>\n<img src='adnonsense.php' title='hotpod fund' style='margin: 0 22px;'><br>\n<img src='adnonsense.php?m=v' title='VPS slushie fund' style='margin-right: 44px;'>\n-->\n<br>\n\t{$smallfont}\n\t<br><br><a href={$siteurl}>{$sitename}</a>\n\t<br>" . filter_string($affiliatelinks) . "\n\t<br>\n\t<table cellpadding=0 border=0 cellspacing=2><tr>\n\t\t<td>\n\t\t\t<img src=images/poweredbyacmlm.gif>\n\t\t</td>\n\t\t<td>\n\t\t\t{$smallfont}\n\t\t\tAcmlmboard - <a href='https://github.com/Xkeeper0/jul'>" . (file_exists('version.txt') ? file_get_contents("version.txt") : shell_exec("git log --format='commit %h [%ad]' --date='short' -n 1")) . "</a>\n\t\t\t<br>&copy;2000-" . date("Y") . " Acmlm, Xkeeper, Inuyasha, et al. \n\t\t\t</font>\n\t\t</td>\n\t</tr></table>\n\t" . ($x_hacks['mmdeath'] >= 0 ? "<div style='position: absolute; top: -100px; left: -100px;'>Hidden preloader for doom numbers:\n\t\t<img src='numgfx/death/0.png'> <img src='numgfx/death/1.png'> <img src='numgfx/death/2.png'> <img src='numgfx/death/3.png'> <img src='numgfx/death/4.png'> <img src='numgfx/death/5.png'> <img src='numgfx/death/6.png'> <img src='numgfx/death/7.png'> <img src='numgfx/death/8.png'> <img src='numgfx/death/9.png'>" : "") . "\n<!-- Piwik -->\n<script type=\"text/javascript\">\nvar pkBaseURL = ((\"https:\" == document.location.protocol) ? \"https://stats.tcrf.net/\" : \"http://stats.tcrf.net/\");\ndocument.write(unescape(\"%3Cscript src='\" + pkBaseURL + \"piwik.js' type='text/javascript'%3E%3C/script%3E\"));\n</script><script type=\"text/javascript\">\ntry {\nvar piwikTracker = Piwik.getTracker(pkBaseURL + \"piwik.php\", 4);\npiwikTracker.trackPageView();\npiwikTracker.enableLinkTracking();\n} catch( err ) {}\n</script><noscript><p><img src=\"http://stats.tcrf.net/piwik.php?idsite=4\" style=\"border:0\" alt=\"\" /></p></noscript>\n<!-- End Piwik Tag -->\n<!--<script type=\"text/javascript\" src=\"http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.min.js\"></script>\n<script type=\"text/javascript\" src=\"js/useful.js\"></script> -->\n\n</body></html>\n  ";
if ($ipbanned) {
    if ($loguser['title'] == "Banned; account hijacked. Contact admin via PM to change it.") {
        $reason = "Your account was hijacked; please contact Xkeeper to reset your password and unban your account.";
    } elseif ($loguser['title']) {
        $reason = "Ban reason: " . $loguser['title'] . "<br>If you think have been banned in error, please contact Xkeeper.";
    } else {
        $reason = $sql->resultq("SELECT `reason` FROM ipbans WHERE {$checkips}", 0, 0);
        $reason = $reason ? "Reason: {$reason}" : "<i>(No reason given)</i>";
    }
    die("{$header}<br>{$tblstart}{$tccell1}>\n\t\tYou are banned from this board.\n\t\t<br>" . $reason . "\n\t\t<br>\n\t\t<br>If you think you have been banned in error, please contact the administrator:\n\t\t<br>E-mail: xkeeper@gmail.com\n\t\t{$tblend}{$footer}");
}
if ($torbanned) {
Ejemplo n.º 22
0
// FOR THE LOVE OF GOD XKEEPER JUST GIVE ME ~NUKE ACCESS
$banorama = $_SERVER['REMOTE_ADDR'] == $x_hacks['adminip'] || $loguser['id'] == 1 || $loguser['id'] == 5 || $loguser['id'] == 2100;
if ($banorama && filter_string($_GET['banip']) && filter_string($_GET['valid']) == md5($_GET['banip'] . "aglkdgslhkadgshlkgds")) {
    $sql->query("INSERT INTO `ipbans` SET `ip` = '" . $_GET['banip'] . "', `reason`='online.php ban', `date` = '" . ctime() . "', `banner` = '{$loguserid}'") or print mysql_error();
    //		if ($_GET['uid']) mysql_query("UPDATE `users` SET `powerlevel` = -1, `title` = 'Banned; account hijacked. Contact admin via PM to change it.' WHERE `id` = '". $_GET['uid'] ."'") or print mysql_error();
    xk_ircsend("1|" . xk(8) . $loguser['name'] . xk(7) . " added IP ban for " . xk(8) . $_GET['banip'] . xk(7) . ".");
    return header("Location: online.php?m=1");
}
$sort = filter_bool($_GET['sort']);
$lnk = '<a href=online.php' . ($sort ? "?sort=1&" : '?') . 'time';
print "\n\t\t{$header}{$smallfont}\n\t\tShow online users during the last:\n\t\t{$lnk}=60>minute</a> |\n\t\t{$lnk}=300>5 minutes</a> |\n\t\t{$lnk}=900>15 minutes</a> |\n\t\t{$lnk}=3600>hour</a> |\n\t\t{$lnk}=86400>day</a>\n\t";
if ($isadmin) {
    print '<br>Admin cruft: <a href=online.php' . ($sort ? '?sort=1&' : '?') . "time={$time}>Sort by " . ($sort == 'IP' ? 'date' : 'IP') . "</a>";
}
// Logged in users
$posters = $sql->query("SELECT id,posts,name,sex,powerlevel,aka,lastactivity,lastip,lastposttime,lasturl,birthday FROM users WHERE lastactivity>" . (ctime() - $time) . ' ORDER BY ' . ($sort == 'IP' && $isadmin ? 'lastip' : 'lastactivity DESC'));
print "<br>\n\t{$fonttag} Online users during the last " . timeunits2($time) . ":\n\t{$tblstart}\n\t\t{$tccellh} width=20>&nbsp</td>\n\t\t{$tccellh} width=200>Username</td>\n\t\t{$tccellh} width=120> Last activity</td>\n\t\t{$tccellh} width=180> Last post</td>\n\t\t{$tccellh} width=*>URL</td>\n\t";
if ($isadmin) {
    print "{$tccellh} width=120>IP address</td>";
}
print "{$tccellh} width=60> Posts</tr>";
for ($i = 1; $user = $sql->fetch($posters); $i++) {
    $userlink = getuserlink($user);
    if (!$user['posts']) {
        $user['lastposttime'] = getblankdate();
    } else {
        $user['lastposttime'] = date($dateformat, $user['lastposttime'] + $tzoff);
    }
    $user['lasturl'] = str_replace('<', '&lt;', $user['lasturl']);
    $user['lasturl'] = str_replace('>', '&gt;', $user['lasturl']);
    $user['lasturl'] = str_replace('%20', ' ', $user['lasturl']);
Ejemplo n.º 23
0
<?php

function srgb($r, $g, $b)
{
    return array(r => $r, g => $g, b => $b);
}
function fadesch($c, $n, $pct)
{
    $pct2 = 1 - $pct;
    $ret = floor($c[$n][r] * $pct2 + $c[$n + 1][r] * $pct) * 65536 + floor($c[$n][g] * $pct2 + $c[$n + 1][g] * $pct) * 256 + floor($c[$n][b] * $pct2 + $c[$n + 1][b] * $pct);
    return $ret;
}
$bgimage = 'images/back09.gif';
$bgcolor = '000000';
$tableheadtext = 'FFFFFF';
$curtime = getdate(ctime() + $tzoff);
$min = $curtime[hours] * 60 + $curtime[minutes];
$tbg1[1] = srgb(10, 10, 33);
$tbg2[1] = srgb(7, 7, 22);
$thb[1] = srgb(23, 23, 80);
$tbd[1] = srgb(60, 65, 166);
$cbg[1] = srgb(17, 17, 57);
$tbg1[2] = srgb(48, 6, 82);
$tbg2[2] = srgb(34, 5, 50);
$thb[2] = srgb(70, 30, 110);
$tbd[2] = srgb(118, 66, 165);
$cbg[2] = srgb(59, 18, 96);
$tbg1[3] = srgb(0, 0, 96);
$tbg2[3] = srgb(0, 0, 54);
$thb[3] = srgb(0, 80, 160);
$tbd[3] = srgb(0, 112, 192);
Ejemplo n.º 24
0
function printtimedif($timestart)
{
    global $x_hacks, $sql, $sqldebuggers, $smallfont;
    $exectime = microtime(true) - $timestart;
    $qseconds = sprintf("%01.6f", mysql::$time);
    $sseconds = sprintf("%01.6f", $exectime - mysql::$time);
    $tseconds = sprintf("%01.6f", $exectime);
    $queries = mysql::$queries;
    $cache = mysql::$cachehits;
    // Old text
    //print "<br>{$smallfont} Page rendered in {$tseconds} seconds.</font><br>";
    print "<br>\n\t\t{$smallfont}{$queries} database queries" . ($cache > 0 ? ", {$cache} query cache hits" : "") . ".</font>\n\t\t<table cellpadding=0 border=0 cellspacing=0 class='fonts'>\n\t\t\t<tr><td align=right>Query execution time:&nbsp;</td><td>{$qseconds} seconds</td></tr>\n\t\t\t<tr><td align=right>Script execution time:&nbsp;</td><td>{$sseconds} seconds</td></tr>\n\t\t\t<tr><td align=right>Total render time:&nbsp;</td><td>{$tseconds} seconds</td></tr>\n\t\t</table>";
    /*
    if (in_array($_SERVER['REMOTE_ADDR'], $sqldebuggers)) {
    	if (!mysql::$debug_on && $_SERVER['REQUEST_METHOD'] != 'POST')
    		print "<br><a href=".$_SERVER['REQUEST_URI'].(($_SERVER['QUERY_STRING']) ? "&" : "?")."debugsql>Useless mySQL query debugging shit</a>";
    	else
    		print mysql::debugprinter();
    }
    */
    if (!$x_hacks['host']) {
        $pages = array("/index.php", "/thread.php", "/forum.php");
        $url = $_SERVER['REQUEST_URI'];
        if (in_array(substr($url, 0, 14), $pages)) {
            $sql->query("INSERT INTO `rendertimes` SET `page` = '" . addslashes($url) . "', `time` = '" . ctime() . "', `rendertime`  = '" . $exectime . "'");
            $sql->query("DELETE FROM `rendertimes` WHERE `time` < '" . (ctime() - 86400 * 14) . "'");
        }
    }
}
Ejemplo n.º 25
0
 $new = "&nbsp;";
 $newpost = false;
 $threadstatus = "";
 // Forum, logged in
 if ($log && $id && $thread['lastpostdate'] > $postread[$id] && !$thread['tread']) {
     $threadstatus .= "new";
     $newpost = true;
     $newpostt = $thread['treadtime'] ? $thread['treadtime'] : $postread[$id];
 } elseif ($log && !$id && $thread['lastpostdate'] > $postread[$thread['forumid']] && !$thread['tread']) {
     $threadstatus .= "new";
     $newpost = true;
     $newpostt = $thread['treadtime'] ? $thread['treadtime'] : $postread[$thread['forumid']];
 } elseif (!$log && $thread['lastpostdate'] > ctime() - 3600) {
     $threadstatus .= "new";
     $newpost = true;
     $newpostt = ctime() - 3600;
 }
 if ($thread['replies'] >= $hotcount) {
     $threadstatus .= "hot";
 }
 if ($thread['closed']) {
     $threadstatus .= "off";
 }
 if ($threadstatus) {
     $new = $statusicons[$threadstatus];
 }
 $posticon = "<img src='{$thread['icon']}'>";
 if (trim($thread['title']) == "") {
     $thread['title'] = "<i>hurr durr i'm an idiot who made a blank thread</i>";
 } else {
     $thread['title'] = str_replace(array('<', '>'), array('&lt;', '&gt;'), trim($thread['title']));
Ejemplo n.º 26
0
<?php

if ($_GET['action'] == "buy" && $_GET['id'] == 286) {
    return header("Location: shoph.php");
}
require 'lib/function.php';
require 'lib/layout.php';
require 'lib/rpg.php';
print "{$header}<br>";
if (!$log) {
    print "\n\t{$tblstart}{$tccell1}>You must be logged in to access the Item Shop.<br>" . redirect('index.php', 'return to the main page', 0) . $tblend;
} else {
    $user = mysql_fetch_array(mysql_query("SELECT posts,regdate,users_rpg.* FROM users,users_rpg WHERE id={$loguserid} AND uid=id"));
    $p = $user[posts];
    $d = (ctime() - $user[regdate]) / 86400;
    $st = getstats($user);
    $GP = $st[GP];
    switch ($action) {
        case '':
            $shops = mysql_query('SELECT * FROM itemcateg ORDER BY corder');
            $eq = mysql_fetch_array(mysql_query("SELECT * FROM users_rpg WHERE uid={$loguserid}"));
            $eqitems = mysql_query("SELECT * FROM items WHERE id={$eq['eq1']} OR id={$eq['eq2']} OR id={$eq['eq3']} OR id={$eq['eq4']} OR id={$eq['eq5']} OR id={$eq['eq6']} OR id={$eq['eq7']}");
            while ($item = mysql_fetch_array($eqitems)) {
                $items[$item[id]] = $item;
            }
            while ($shop = mysql_fetch_array($shops)) {
                $shoplist .= "\n\t\t<tr>\n\t\t{$tccell1}><a href=shop.php?action=items&cat={$shop['id']}#status>{$shop['name']}</a></td>\n\t\t{$tccell2s}>{$shop['description']}\n\t\t{$tccell1s}>" . $items[$eq['eq' . $shop[id]]][name] . "\n\t    ";
            }
            print "\n\t\t<table width=100%><td valign=top width=120>\n\t\t <img src=status.php?u={$loguserid}>\n\t\t</td><td valign=top>\n\t\t{$tblstart}\n\t\t {$tccellh} colspan=3>Shop list<tr>\n\t\t {$tccellc}>Shop</td>{$tccellc}>Description</td>{$tccellc}>Item equipped</td>\n\t\t {$shoplist}\n\t\t{$tblend}\n\t\t</table>\n\t  ";
            break;
        case 'items':
Ejemplo n.º 27
0
//$sql->selectdb("sonicret_s2bivb");
if ($_GET['s']) {
    $size = $_GET['s'];
}
if ($size > 1024 || $size < 80) {
    $size = 255;
}
if ($_GET['t']) {
    $classt = $_GET['t'];
}
if ($classt > 9999 || $classt < 10) {
    $classt = 500;
}
$size = 255;
$classt = 500;
$class = $sql->resultq("SELECT COUNT(`id`) FROM `posts` WHERE `date` > " . (ctime() - 86400));
if ($_GET['s']) {
    $size = numrange((int) $_GET['s'], 80, 1024);
}
if ($_GET['t']) {
    $classt = numrange((int) $_GET['t'], 10, 1000);
}
$classtxt = "    ppd   ";
$image = imagecreatetruecolor($size + 1, $size + 1);
imageantialias($image, true);
imagesavealpha($image, true);
imagealphablending($image, false);
$color['white'] = imagecolorallocate($image, 255, 255, 255);
$color['black'] = imagecolorallocate($image, 0, 0, 0);
$color['gray1'] = imagecolorallocate($image, 40, 40, 40);
$color['gray2'] = imagecolorallocate($image, 120, 120, 120);
Ejemplo n.º 28
-1
<?php

require 'lib/function.php';
$user['regdate'] = $sql->resultq("SELECT MIN(`regdate`) FROM users");
$max = ceil(($sql->resultq("SELECT COUNT(*) FROM `posts`") + 1) / 5000) * 5000;
$alen = $_GET['len'] ? $_GET['len'] : 30;
$alen = min(max(7, $alen), 90);
// $max				= 5500;
$vd = date('m-d-y', $user['regdate']);
$dd = mktime(0, 0, 0, substr($vd, 0, 2), substr($vd, 3, 2), substr($vd, 6, 2));
$dd2 = mktime(0, 0, 0, substr($vd, 0, 2), substr($vd, 3, 2) + 1, substr($vd, 6, 2));
$days = ceil((ctime() - $dd) / 86400);
$scalex = 1;
$scaley = 200;
$m = $max / $scaley;
$xs = $days * $scalex;
$img = ImageCreateTrueColor($xs, $m);
$c[bg] = ImageColorAllocate($img, 0, 0, 0);
$c[bg1] = ImageColorAllocate($img, 0, 0, 60);
$c[bg2] = ImageColorAllocate($img, 0, 0, 80);
$c[bg3] = ImageColorAllocate($img, 40, 40, 100);
$c[bg4] = ImageColorAllocate($img, 100, 40, 40);
$c[mk1] = ImageColorAllocate($img, 60, 60, 130);
$c[mk2] = ImageColorAllocate($img, 80, 80, 150);
$c[bar] = ImageColorAllocate($img, 250, 190, 40);
$c[pt] = ImageColorAllocate($img, 250, 250, 250);
for ($i = 0; $i < $days; $i++) {
    $num = date('m', $dd + $i * 86400) % 2 + 1;
    if (date('m-d', $dd + $i * 86400) == '01-01') {
        $num = 3;
    }
Ejemplo n.º 29
-1
         loadtlayout();
         $ppost = $sql->fetchq("SELECT * FROM users WHERE id={$post['user']}");
         $head = stripslashes($head);
         $sign = stripslashes($sign);
         $message = stripslashes($message);
         $ppost['uid'] = $post['user'];
         $ppost['num'] = $post['num'];
         $ppost['date'] = $post['date'];
         $ppost['tagval'] = $post['tagval'];
         $ppost['headtext'] = $head;
         $ppost['signtext'] = $sign;
         $ppost['text'] = $message;
         $ppost['options'] = $poptions;
         // Edited notice
         $ppost['edited'] = $edited;
         $ppost['editdate'] = ctime();
         $chks = array();
         if ($nosmilies) {
             $chks[0] = "checked";
         }
         if ($nohtml) {
             $chks[1] = "checked";
         }
         if ($isadmin) {
             $ip = $post['ip'];
         }
         print "\n\t\t\t\t\t<body onload=window.document.REPLIER.message.focus()>\n\t\t\t\t\t{$tccellh}>Post preview\n\t\t\t\t\t{$tblend}{$tblstart}\n\t\t\t\t\t" . threadpost($ppost, 1) . "\n\t\t\t\t\t{$tblend}<br>{$tblstart}\n\t\t\t\t\t{$tccellh} width=150>&nbsp</td>{$tccellh} colspan=2>&nbsp<tr>\n\t\t\t\t\t{$tccell1}><b>Header:</td>\t {$tccell2l} width=800px valign=top>{$txta}=head ROWS=8 COLS={$numcols} style=\"width: 100%; max-width: 800px; resize:vertical;\">" . htmlspecialchars($head) . "</textarea>\n\t\t\t\t\t{$tccell2l} width=* rowspan=3>" . moodlist($moodid) . "</td><tr>\n\t\t\t\t\t{$tccell1}><b>Post:</td>\t\t {$tccell2l} width=800px valign=top>{$txta}=message ROWS=12 COLS={$numcols} style=\"width: 100%; max-width: 800px; resize:vertical;\">" . htmlspecialchars($message) . "</textarea><tr>\n\t\t\t\t\t{$tccell1}><b>Signature:</td>\t {$tccell2l} width=800px valign=top>{$txta}=sign ROWS=8 COLS={$numcols} style=\"width: 100%; max-width: 800px; resize:vertical;\">" . htmlspecialchars($sign) . "</textarea><tr>\n\t\t\t\t\t{$tccell1}>&nbsp</td>{$tccell2l} colspan=2>\n\t\t\t\t\t{$inph}=action VALUE=editpost>\n\t\t\t\t\t{$inph}=id VALUE={$id}>\n\t\t\t\t\t{$inps}=submit VALUE=\"Edit post\">\n\t\t\t\t\t{$inps}=preview VALUE=\"Preview post\"></td>\n\t\t\t\t\t<tr>{$tccell1}><b>Options:</b></td>{$tccell2l} colspan=2>\n\t\t\t\t\t{$inpc}=\"nosmilies\" id=\"nosmilies\" value=\"1\" {$chks['0']}><label for=\"nosmilies\">Disable Smilies</label> -\n\t\t\t\t\t{$inpc}=\"nohtml\" id=\"nohtml\" value=\"1\" {$chks['1']}><label for=\"nohtml\">Disable HTML</label></td></tr>\n\t\t\t\t\t</FORM>\n\t\t\t\t\t{$tblend}{$fonttag}<a href=index.php>{$boardname}</a> - <a href=forum.php?id={$forum['id']}>" . $forum[title] . "</a> - {$thread['title']}\n\t\t\t\t";
     }
 } else {
     print "\n\t\t\t{$tccell1}>You are not allowed to edit this post.<br>\n\t\t\t" . redirect("thread.php?id={$threadid}", "the thread", 0);
 }
Ejemplo n.º 30
-1
<?php

chdir("../");
require "lib/function.php";
set_time_limit(0);
ini_set("memory_limit", "256M");
$mintime = ctime() - 86400 * 30;
$rangemin = floor($sql->resultq("SELECT MIN(`time` / 3600) FROM `rendertimes`" . ($_GET['all'] ? "" : "WHERE `time` > {$mintime} ")));
$num = ceil(ctime() / 3600) - $rangemin;
$maxy = 500;
$scaley = $maxy / 25;
$scalex = 3;
$image = imagecreatetruecolor($num * $scalex, $maxy);
$col['bg'] = imagecolorallocate($image, 0, 0, 0);
$col['bg1'] = imagecolorallocate($image, 30, 0, 30);
$col['bg2'] = imagecolorallocate($image, 50, 0, 50);
$col['bg3'] = imagecolorallocatealpha($image, 150, 0, 150, 90);
$col['line'] = imagecolorallocate($image, 255, 200, 50);
$col['line2'] = imagecolorallocate($image, 255, 100, 25);
$col['line2f'] = imagecolorallocate($image, 200, 0, 0);
$col['line3'] = imagecolorallocatealpha($image, 255, 100, 25, 100);
$col['avgt'] = imagecolorallocate($image, 255, 200, 100);
$col['avgf'] = imagecolorallocatealpha($image, 255, 50, 50, 90);
$col['avgt2'] = imagecolorallocatealpha($image, 255, 200, 100, 110);
$col['avgf2'] = imagecolorallocatealpha($image, 255, 50, 50, 110);
$col['text'] = imagecolorallocate($image, 255, 255, 255);
$col['text2'] = imagecolorallocatealpha($image, 255, 255, 255, 90);
$alldata = $sql->query("SELECT FLOOR(`time` / 3600) AS time, " . "AVG( `rendertime` ) AS average, " . "MAX( `rendertime` ) AS max " . "FROM `rendertimes` " . "WHERE `page` = '/index.php' " . ($_GET['all'] ? "" : "AND `time` > {$mintime} ") . "GROUP BY FLOOR(`time` / 3600)") or die(mysql_error());
$d = floor($rangemin / 24) * 24 - 16;
for ($i = $d; $i <= $rangemin + $num; $i += 24) {
    $x = $i - $rangemin;