$boardtitle"; //$boardtitle = ""; // PONIES!!! // if($forumid==30) $boardtitle = ""; // end PONIES!!! $race=$loguserid ? postradar($loguserid) : ""; $tablewidth='100%'; $fonttag=''; $fonthead=''; $smallfont=''; $tinyfont=''; foreach(array('1','2','c','h') as $celltype){ $cell="
--------------------
', '

____________________
', '


', '

'); $br="\n"; if (isset($bgimage) && $bgimage != "") { $bgimage = " url('$bgimage')"; } else { $bgimage = ''; } if (isset($nullscheme) && $nullscheme == 1) { // special "null" scheme. $css = ""; } elseif (isset($schemetype) && $schemetype == 1) { $css = ""; $dateformat = "m/d/y h:i"; $dateshort = "m/d/y"; // backwards compat global $bgcolor, $linkcolor; $bgcolor = "000"; $linkcolor = "FFF"; } else { $css=" '; } // $css .= " "; $headlinks = ''; if($loguserid) { if($isadmin) $headlinks.='Admin - '; if($power >= 1) $headlinks.='Shop Editor - '; $headlinks.=' Logout - Edit profile - Post radar - Item shop - Favorites'; } else { $headlinks.=' Register - Login'; } if (in_array($loguserid,array(1,5,2100))) { $xminilog = $sql -> fetchq("SELECT COUNT(*) as count, MAX(`time`) as time FROM `minilog`"); if ($xminilog['count']) { $xminilogip = $sql -> fetchq("SELECT `ip`, `banflags` FROM `minilog` ORDER BY `time` DESC LIMIT 1"); $boardtitle .= "
". $xminilog['count'] ." suspicious request(s) logged, last at ". date($dateformat, $xminilog['time'] + $tzoff) ." by ". $xminilogip['ip'] ." (". $xminilogip['banflags'] .")"; } $xminilog = $sql -> fetchq("SELECT COUNT(*) as count, MAX(`time`) as time FROM `pendingusers`"); if ($xminilog['count']) { $xminilogip = $sql -> fetchq("SELECT `username`, `ip` FROM `pendingusers` ORDER BY `time` DESC LIMIT 1"); $boardtitle .= "
". $xminilog['count'] ." pending user(s), last '". $xminilogip['username'] ."' at ". date($dateformat, $xminilog['time'] + $tzoff) ." by ". $xminilogip['ip'] .""; } } $headlinks2=" Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Latest Posts - Color Chart - Smilies "; $ipbanned = $torbanned = 0; $checkips = "INSTR('$userip',ip)=1"; if ($forwardedip !== "XXXXXXXXXXXXXXXXX") $checkips .= " OR INSTR('$forwardedip',ip)=1"; if ($clientip !== "XXXXXXXXXXXXXXXXX") $checkips .= " OR INSTR('$clientip',ip)=1"; if($sql->resultq("SELECT count(*) FROM ipbans WHERE $checkips")) $ipbanned=1; if($sql->resultq("SELECT count(*) FROM `tor` WHERE `ip` = '". $_SERVER['REMOTE_ADDR'] ."' AND `allowed` = '0'")) $torbanned=1; if ($ipbanned || $torbanned) $windowtitle = $boardname; if($ipbanned) { $url .=' (IP banned)'; } if ($torbanned) { $url .=' (Tor proxy)'; $sql->query("UPDATE `tor` SET `hits` = `hits` + 1 WHERE `ip` = '". $_SERVER['REMOTE_ADDR'] ."'"); } $views=$sql->resultq('SELECT views FROM misc')+1; if (!$ipbanned && !$torbanned && (!defined("IS_AJAX_REQUEST") || !IS_AJAX_REQUEST)) { // Don't increment the view counter for bots $sql->query("UPDATE misc SET views=$views"); if($views%1000000>999000 or $views%1000000<1000) { $u=($loguserid?$loguserid:0); $sql->query("INSERT INTO hits VALUES ($views,$u,'$userip',".ctime().')'); } if ($views%1000000>999994 || ($views % 1000000 >= 991000 && $views % 1000 == 0) || ($views % 1000000 >= 999900 && $views % 10 == 0) || $views % 1000000 < 5) { xk_ircsend("0|View ". xk(11) . str_pad(number_format($views), 10, " ", STR_PAD_LEFT) . xk() ." by ". ($loguser['id'] ? xk(11) . str_pad($loguser['name'], 25, " ") : xk(12) . str_pad($_SERVER['REMOTE_ADDR'], 25, " ")) . xk() . ($views % 1000000 > 500000 ? " (". xk(12) . str_pad(number_format(1000000 - ($views % 1000000)), 5, " ", STR_PAD_LEFT) . xk(2) ." to go" . xk() .")" : "")); } if ($views == 44444444 || $views == 55555555 || $views == 66666666 || $views == 67108864) { xk_ircsend("0|View ". xk(11) . str_pad(number_format($views), 10, " ", STR_PAD_LEFT) . xk() ." by ". ($loguser['id'] ? xk(11) . str_pad($loguser['name'], 25, " ") : xk(12) . str_pad($_SERVER['REMOTE_ADDR'], 25, " ")) . xk()); } } // Dailystats update in one query $sql->query("INSERT INTO dailystats (date, users, threads, posts, views) " . "VALUES ('".date('m-d-y',ctime())."', (SELECT COUNT( * ) FROM users), (SELECT COUNT(*) FROM threads), (SELECT COUNT(*) FROM posts), $views) ". "ON DUPLICATE KEY UPDATE users=VALUES(users), threads=VALUES(threads), posts=VALUES(posts), views=$views"); // $sql->query("INSERT INTO dailystats (date) VALUES ('".date('m-d-y',ctime())."')"); // $sql->query("UPDATE dailystats SET users=$count[u],threads=$count[t],posts=$count[p],views=$views WHERE date='".date('m-d-y',ctime())."'"); //No gunbound rankset here (yet), stop futily trying to update it //updategb(); $new=' '; $privatebox = ""; // Note that we ignore this in private.php (obviously) and the index page (it handles PMs itself) // This box only shows up when a new PM is found, so it's optimized for that if ($log && strpos($PHP_SELF, "private.php") == false && strpos($PHP_SELF, "index.php") == 0) { $newmsgquery = $sql->query("SELECT date,u.id uid,name,sex,powerlevel,aka FROM pmsgs p LEFT JOIN users u ON u.id=p.userfrom WHERE userto=$loguserid AND msgread=0 ORDER BY p.id DESC"); if ($pmsg = $sql->fetch($newmsgquery)) { $namelink = getuserlink($pmsg, array('id'=>'uid')); $lastmsg = "Last unread message from $namelink on ".date($dateformat,$pmsg['date']+$tzoff); $numnew = mysql_num_rows($newmsgquery); if ($numnew > 1) $ssss = "s"; $privatebox = "$newpic You have $numnew new private message$ssss -- $lastmsg"; } } $jscripts = ''; if (true) { // Ikachan! :D! //$ikachan = 'images/ikachan/vikingikachan.png'; //$ikachan = 'images/sankachan.png'; $ikachan = 'images/ikamad.png'; //$ikachan = 'images/squid.png'; $ikaquote = 'Someone stole my hat!'; //$ikaquote = 'If you don\'t like Christmas music, well... it\'s time to break out the earplugs.'; //$ikaquote = 'This viking helmet is stuck on my head!'; //$ikaquote = 'Searching for hats to wear! If you find any, please let me know...'; //$ikaquote = 'What idiot thought celebrating a holiday five months late was a good idea?'; //$ikaquote = 'Back to being a fixture now, please stop bitching.'; //$ikaquote = 'I just want to let you know that you are getting coal this year. You deserve it.'; $yyy = ""; } /*if ($_GET['w']) { $yyy = ""; $yyy .= ""; $yyy .= ""; for ($xxx = rand(0,5); $xxx < 20; $xxx++) { $yyy .= ""; } }*/ $dispviews = $views; // if (($views % 1000000 >= 999000) && ($views % 1000000 < 999990)) // $dispviews = substr((string)$views, 0, -3) . "???"; // :shepicide: $body=""; if (!isset($meta)) { $meta = array(); } $metatag = ''; if (filter_bool($meta['noindex'])) $metatag .= ""; if (filter_bool($meta['description'])) $metatag .= ""; if (filter_bool($x_hacks['smallbrowse']) and false) { $css = ""; $css = ""; } $header1="$windowtitle $metatag $css $body $yyy
$tblstart
$boardtitle"; $header2=" ". (!$x_hacks['smallbrowse'] ? " Views: $dispviews
$headlinks2
". date($dateformat,ctime()+$tzoff) ."
" : "
$dispviews views, ". date($dateformat,ctime()+$tzoff) ." $headlinks2") ." $race $privatebox $tblend
"; $headlinks = "$smallfont
$headlinks"; function makeheader($header1,$headlinks,$header2) { global $loguser, $PHP_SELF; $header = $header1.$headlinks.$header2; if (!$loguser['id'] && strpos($PHP_SELF, "index.php") === false) { $header .= adbox() ."
"; } return $header; } $ref=filter_string($_SERVER['HTTP_REFERER']); $url=getenv('SCRIPT_URL'); if(!$url) $url=str_replace('/etc/board','',getenv('SCRIPT_NAME')); $q=getenv('QUERY_STRING'); if($q) $url.="?$q"; if($ref && substr($ref,7,7)!="jul.rus") $sql->query("INSERT INTO referer (time,url,ref,ip) VALUES (". ctime() .", '".addslashes($url)."', '".addslashes($ref)."', '". $_SERVER['REMOTE_ADDR'] ."')"); $sql->query("DELETE FROM guests WHERE ip='$userip' OR date<".(ctime()-300)); if($log) { /* $ulastip=mysql_result(mysql_query("SELECT lastip FROM users WHERE id=$loguserid"),0,0); $aol1=(substr($userip,0,7)=='152.163' or substr($userip,0,7)=='205.188' or substr($userip,0,6)=='64.12.' or substr($userip,0,6)=='195.93' or substr($userip,0,6)=='198.81'); $aol2=(substr($ulastip,0,7)=='152.163' or substr($ulastip,0,7)=='205.188' or substr($ulastip,0,6)=='64.12.' or substr($ulastip,0,6)=='195.93' or substr($ulastip,0,6)=='198.81'); if($userip!=$ulastip && !($aol1 && $aol2)){ $fpnt=fopen('ipchanges.log', 'a'); $r=fputs($fpnt, "User $loguserid IP changed from $ulastip to $userip, on ".date($dateformat,ctime())." "); $r=fclose($fpnt); } */ //if ($loguserid != 3 && $loguserid != 2) if (($loguser['powerlevel'] <= 5) and (!IS_AJAX_REQUEST)) { $influencelv=calclvl(calcexp($loguser[posts],(ctime()-$loguser[regdate])/86400)); // Alart #defcon? if ($loguser['lastip'] != $_SERVER['REMOTE_ADDR']) { $ip1 = explode(".", $loguser['lastip']); $ip2 = explode(".", $_SERVER['REMOTE_ADDR']); for ($diff = 0; $diff < 3; ++$diff) 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) ."')"); } $honeypot = array( "", "", "bargaining-tycoon", "", "", "", "", "bargaining-tycoon", "
", ); $honeypot2 = array( "", "", "fortyfive-antelope", "", "", "", "", "fortyfive-antelope", "
", ); $honeypotl = pick_any($honeypot); $honeypotl2 = pick_any($honeypot2); $header2 .= $honeypotl2; $header=makeheader($header1,$headlinks,$header2); $footer="
". ($loguser['id'] && strpos($PHP_SELF, "index.php") === false ? adbox() ."
" : "") ."

$smallfont

$sitename
". filter_string($affiliatelinks) ."
{$smallfont} Acmlmboard - ". (file_exists('version.txt') ? file_get_contents("version.txt") : shell_exec("git log --format='commit %h [%ad]' --date='short' -n 1")) ."
©2000-". date("Y") ." Acmlm, Xkeeper, Inuyasha, et al.
$honeypotl ". ($x_hacks['mmdeath'] >= 0 ? "
Hidden preloader for doom numbers: " : "") ." "; 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'] ."
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" : "(No reason given)"); } die("$header
$tblstart$tccell1> You are banned from this board.
". $reason ."

Contact info:
AIM: XkeeperNaN
E-mail: xkeeper@gmail.com
MSN: xkeeper6@yahoo.com $tblend$footer"); } if($torbanned) die("$header
$tblstart$tccell1> You appear to be using a Tor proxy. For added security, Tor is banned from this board.
If you have been banned in error, please contact Xkeeper.

Contact info:
AIM: XkeeperNaN
E-mail: xkeeper@gmail.com
MSN: xkeeper6@yahoo.com $tblend$footer");