Remove old code references to multi-host hack

Closes #71.

This removes a bunch of old references to $x_hacks['host'],
which was intended to allow this codebase to run two separate
forums at the same time based on what hostname it was accessed
from. This isn't used any more, so out it goes
This commit is contained in:
Xkeeper 2020-12-28 18:41:14 -08:00
parent 3d14b251f3
commit 682028379e
No known key found for this signature in database
GPG Key ID: 397C04773ABE4045
7 changed files with 178 additions and 255 deletions

13
faq.php
View File

@ -7,16 +7,6 @@
$topiclist = ""; $topiclist = "";
$faq = ""; $faq = "";
if ($x_hacks['host']) {
print "$header<br>
$tblstart
<tr>$tccellh>FAQ and Rules</td></tr>
<tr>$tccell1l>Generally, this forum is for a small group of people that know each other well. You should probably think twice about registering if you don't know who the regulars are already.
</td></tr>
$tblend";
} else {
$faq .= faqformat("aboot", "About Jul, the community", " $faq .= faqformat("aboot", "About Jul, the community", "
Jul itself is a community made up of people who predominantly like to just hang around friendlies and talk about whatever, though we also like games and occasionally anime/other things. Jul itself is a community made up of people who predominantly like to just hang around friendlies and talk about whatever, though we also like games and occasionally anime/other things.
@ -319,9 +309,6 @@
$faq $faq
"; ";
}
print " print "
<br><br> <br><br>

View File

@ -1,17 +1,8 @@
<?php <?php
/*
if (!$x_hacks['host']) {
if ($loguserid == 1) $boardtitle = "";
$autobancount = $sql->fetchq("SELECT COUNT(*) AS cnt, MAX(`date`) as time FROM `ipbans` WHERE `reason` LIKE 'Autoban'", MYSQL_ASSOC); if (!defined("IT_IS_CHRISTMAS")) {
$totalbancount = $sql->fetchq("SELECT COUNT(*) AS cnt, MAX(`date`) as time FROM `ipbans`", MYSQL_ASSOC); define("IT_IS_CHRISTMAS", false);
$boardtitle .= "<br><font class=font color=#ff0000><b>If you got banned, PM an admin for a password change</b></font><br><font class=fonts>". $autobancount['cnt'] ." automatic IP bans have been issued, last ". timeunits2(ctime() - $autobancount['time']) ." ago"
."<br>". $totalbancount['cnt'] ." IP bans have been issued in total, last ". timeunits2(ctime() - $totalbancount['time']) ." ago";
$boardtitle= "<span style='font-size: 40pt; font-variant: small-caps; color: #f33;'>The Hivemind Collective</span><br><span style='font-size: 6pt; font-variant: small-caps; color: #c00'>(because a group of friends sharing a similar opinion is totally hivemind, dood!)</span>";
} }
*/
$pwlnames=array('-2'=>'Permabanned','-1'=>'Banned','Normal','Normal +','Moderator','Administrator','Sysadmin'); $pwlnames=array('-2'=>'Permabanned','-1'=>'Banned','Normal','Normal +','Moderator','Administrator','Sysadmin');
$nmcol[0]=array('-2'=>'6a6a6a','-1'=>'888888','97ACEF','D8E8FE','AFFABE','FFEA95'); $nmcol[0]=array('-2'=>'6a6a6a','-1'=>'888888','97ACEF','D8E8FE','AFFABE','FFEA95');
@ -62,9 +53,9 @@
$scheme = 0; $scheme = 0;
} }
// Force Xmas scheme (cue whining, as always) // Force Xmas scheme for the holidays
if (false && !($log && $loguserid == 2100)) { // ... just ... not now please. if (IT_IS_CHRISTMAS && !($log && $loguserid == 2100)) { // ... just ... not now please.
if (!$x_hacks['host']) $scheme = 3; $scheme = 3;
$x_hacks['rainbownames'] = true; $x_hacks['rainbownames'] = true;
} }
@ -78,9 +69,6 @@
$schemepre = false; $schemepre = false;
} }
# if (!$x_hacks['host'] && true) {
# $filename = "ymar.php";
# }
require "schemes/$filename"; require "schemes/$filename";
@ -88,10 +76,6 @@
$boardtitle .= "</a><br><span class='font'>Previewing scheme \"<b>". $schemerow['name'] ."</b>\"</span>"; $boardtitle .= "</a><br><span class='font'>Previewing scheme \"<b>". $schemerow['name'] ."</b>\"</span>";
} }
# if (!$x_hacks['host'] && true) {
# $boardtitle .= "</a><br><a href='/thread.php?id=10372'><span style='font-size: 14px;'>Now with more celebrations!</span></a>";
# }
# hack for compat # hack for compat
if (!$inputborder) $inputborder = $tableborder; if (!$inputborder) $inputborder = $tableborder;
@ -104,26 +88,4 @@
} }
//$nmcol[0][4] = "#ffffff"; //$nmcol[0][4] = "#ffffff";
/*
if (!$x_hacks['host'])
$boardtitle .= "</a><br><a href='/thread.php?id=9218'><span style='color: #f00; font-weight: bold;'>Security notice for certain users, please read and see if you are affected</span></a>";
if ($loguser['id'] >= 1 && false) {
$numdir2 = $numdir;
$numdir = "num3/";
$votetu = max(0, 1000000 - floor((mktime(15, 0, 0, 7, 22, 2009) - microtime(true)) * (1000000 / 86400)));
$votetally = max(0, $votetu / (1000000));
$votepct2 = floor($votetu * 1); // no decimal point, so x100 for added precision
$votepctm = 5; // width of the bar
$votepct = floor($votetally * 100 * $votepctm);
// $boardtitle .= "</a><br><a href='/thread.php?id=5710'><span style='color: #f22; font-size: 14px;'>". generatenumbergfx($votetu ."/1000000", 2) ." <img src='numgfx/num3/barleft.png'><img src='numgfx/num3/bar-on.png' height='8' width='". ($votepct) ."'><img src='numgfx/num3/bar-off.png' height='8' width='". (100 * $votepctm - $votepct) ."'><img src='numgfx/num3/barright.png'></span></a>";
$numdir = $numdir2;
$cycler = str_replace("color=", "#", getnamecolor(0, 0));
$boardtitle .= "</a><br><a href='/thread.php?id=5866'><span style='color: $cycler; font-size: 14px;'>Mosts Results posted. Go view.</span></a>";
} */

View File

@ -88,10 +88,7 @@
} }
if ($sql -> resultq("SELECT `disable` FROM `misc` WHERE 1")) { if ($sql -> resultq("SELECT `disable` FROM `misc` WHERE 1")) {
if ($x_hacks['host']) require "lib/downtime2.php";
require "lib/downtime-bmf.php";
else
require "lib/downtime2.php";
die(" die("
<title>Damn</title> <title>Damn</title>
@ -180,10 +177,7 @@
if ($loguser['powerlevel'] >= 1) if ($loguser['powerlevel'] >= 1)
$boardtitle .= $submessage; $boardtitle .= $submessage;
if ($loguser['id'] == 175 && !$x_hacks['host']) } else {
$loguser['powerlevel'] = max($loguser['powerlevel'], 3);
} else {
// Guest settings // Guest settings
$loguserid = null; $loguserid = null;
$loguser = array(); $loguser = array();
@ -226,7 +220,7 @@
//$x_hacks['rainbownames'] = ($sql->resultq("SELECT MAX(`id`) % 100000 FROM `posts`")) <= 100; //$x_hacks['rainbownames'] = ($sql->resultq("SELECT MAX(`id`) % 100000 FROM `posts`")) <= 100;
$x_hacks['rainbownames'] = ($sql->resultq("SELECT `date` FROM `posts` WHERE (`id` % 100000) = 0 ORDER BY `id` DESC LIMIT 1") > ctime()-86400); $x_hacks['rainbownames'] = ($sql->resultq("SELECT `date` FROM `posts` WHERE (`id` % 100000) = 0 ORDER BY `id` DESC LIMIT 1") > ctime()-86400);
if (!$x_hacks['host'] && filter_int($_GET['namecolors'])) { if (filter_int($_GET['namecolors'])) {
//$sql->query("UPDATE `users` SET `sex` = '255' WHERE `id` = 1"); //$sql->query("UPDATE `users` SET `sex` = '255' WHERE `id` = 1");
//$sql->query("UPDATE `users` SET `name` = 'Ninetales', `powerlevel` = '3' WHERE `id` = 24 and `powerlevel` < 3"); //$sql->query("UPDATE `users` SET `name` = 'Ninetales', `powerlevel` = '3' WHERE `id` = 24 and `powerlevel` < 3");
//$sql->query("UPDATE `users` SET `sex` = '9' WHERE `id` = 1"); //$sql->query("UPDATE `users` SET `sex` = '9' WHERE `id` = 1");
@ -309,11 +303,7 @@ function filter_string(&$v) {
function readsmilies(){ function readsmilies(){
global $x_hacks; global $x_hacks;
if ($x_hacks['host']) { $fpnt=fopen('smilies.dat','r');
$fpnt=fopen('smilies2.dat','r');
} else {
$fpnt=fopen('smilies.dat','r');
}
for ($i=0;$smil[$i]=fgetcsv($fpnt,300,',');$i++); for ($i=0;$smil[$i]=fgetcsv($fpnt,300,',');$i++);
$r=fclose($fpnt); $r=fclose($fpnt);
return $smil; return $smil;
@ -819,8 +809,7 @@ function getnamecolor($sex, $powl, $prefix = true){
// RAINBOW MULTIPLIER // RAINBOW MULTIPLIER
elseif ($x_hacks['rainbownames'] || $sex == 255) { elseif ($x_hacks['rainbownames'] || $sex == 255) {
$stime=gettimeofday(); $stime=gettimeofday();
// slowed down 5x $h = (($stime['usec']) % 600);
$h = (($stime['usec']/25) % 600);
if ($h<100) { if ($h<100) {
$r=255; $r=255;
$g=155+$h; $g=155+$h;
@ -1354,7 +1343,6 @@ function addslashes_array($data) {
} }
global $x_hacks; global $x_hacks;
if ($x_hacks['host']) return;
if ($type == "user") { if ($type == "user") {
if ($in['pmatch']) { if ($in['pmatch']) {
@ -1513,18 +1501,21 @@ function printtimedif($timestart){
} }
*/ */
if (!$x_hacks['host']) { // Logging of rendering times. Used back when DreamHost was being trash.
$pages = array( // Not that it ever stopped, but it hasn't really been an issue
"/index.php", /*
"/thread.php", $pages = array(
"/forum.php", "/index.php",
); "/thread.php",
$url = $_SERVER['REQUEST_URI']; "/forum.php",
if (in_array(substr($url, 0, 14), $pages)) { );
$sql->query("INSERT INTO `rendertimes` SET `page` = '". addslashes($url) ."', `time` = '". ctime() ."', `rendertime` = '". $exectime ."'"); $url = $_SERVER['REQUEST_URI'];
$sql->query("DELETE FROM `rendertimes` WHERE `time` < '". (ctime() - 86400 * 14) ."'"); 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) ."'");
} }
*/
} }
function ircerrors($type, $msg, $file, $line, $context) { function ircerrors($type, $msg, $file, $line, $context) {

View File

@ -435,7 +435,7 @@
$header1="<html><head><meta http-equiv='Content-type' content='text/html; charset=utf-8'><meta name='viewport' content='width=device-width, initial-scale=1'><title>$windowtitle</title> $header1="<html><head><meta http-equiv='Content-type' content='text/html; charset=utf-8'><meta name='viewport' content='width=device-width, initial-scale=1'><title>$windowtitle</title>
$metatag $metatag
<link rel=\"shortcut icon\" href=\"/images/favicons/favicon". (!$x_hacks['host'] ? rand(1,8) ."" : "" ) .".ico\" type=\"image/x-icon\"> <link rel=\"shortcut icon\" href=\"/images/favicons/favicon". rand(1,8) .".ico\" type=\"image/x-icon\">
$css $css
</head> </head>
$body $body

View File

@ -4,12 +4,6 @@
$windowtitle="$boardname -- Profile for $user[name]"; $windowtitle="$boardname -- Profile for $user[name]";
require 'lib/layout.php'; require 'lib/layout.php';
// if ($_GET['id'] == 1 && !$x_hacks['host']) {
// print "$header<br><center><img src='http://earthboundcentral.com/wp-content/uploads/2009/01/m3deletede.png'></center><br>$footer";
// printtimedif($startingtime);
// die();
// }
if (!$user) { if (!$user) {
print "$header<br>$tblstart$tccell1>The specified user doesn't exist.$tblend$footer"; print "$header<br>$tblstart$tccell1>The specified user doesn't exist.$tblend$footer";
printtimedif($startingtime); printtimedif($startingtime);

View File

@ -1,164 +1,153 @@
<?php <?php
if ($_POST['action'] == "Register" && $_POST['homepage']) { if ($_POST['action'] == "Register" && $_POST['homepage']) {
header("Location: http://acmlm.no-ip.org/board/register.php"); header("Location: http://acmlm.no-ip.org/board/register.php");
die(); die();
} }
require 'lib/function.php'; require 'lib/function.php';
require 'lib/layout.php'; require 'lib/layout.php';
$ipstart=substr($userip,0,6); $ipstart=substr($userip,0,6);
print $header; print $header;
if ($adminconfig['registrationdisable']) if ($adminconfig['registrationdisable'])
die("$tblstart<br>$tccell2>Registration is disabled. Please contact an admin if you have any questions.$tblend$footer"); die("$tblstart<br>$tccell2>Registration is disabled. Please contact an admin if you have any questions.$tblend$footer");
if (!$_POST[action]){
$descbr="</b>$smallfont<br></center>&nbsp";
print "
<body onload=window.document.REPLIER.username.focus()>
<form ACTION=register.php NAME=REPLIER METHOD=POST>
<br>$tblstart
$tccellh colspan=2>Login information</td><tr>
$tccell1><b>User name:</b>$descbr The name you want to use on the board.</td>
$tccell2l width=50%>$inpt=name SIZE=25 MAXLENGTH=25><tr>
$tccell1><b>Password:</b>$descbr Enter any password up to 32 characters in length. It can later be changed by editing your profile.<br><br>Warning: Do <b>not</b> use unsecure passwords such as '123456', 'qwerty', or 'pokemon'. It'll result in an instant IP ban.</td>
$tccell2l width=50%>$inpp=pass SIZE=13 MAXLENGTH=64><tr>
$tccellh>&nbsp</td>$tccellh>&nbsp<tr>
$tccell1>&nbsp</td>$tccell2l>
$inph=action VALUE=\"Register\">
$inps=submit VALUE=\"Register account\"></td>
</table>
<div style='visibility: hidden;'><b>Homepage:</b><small> DO NOT FILL IN THIS FIELD. DOING SO WILL RESULT IN INSTANT IP-BAN.</small> - $inpt=homepage SIZE=25 MAXLENGTH=255></div>
</form> if (!$_POST[action]){
$descbr="</b>$smallfont<br></center>&nbsp";
print "
<body onload=window.document.REPLIER.username.focus()>
<form ACTION=register.php NAME=REPLIER METHOD=POST>
<br>$tblstart
"; $tccellh colspan=2>Login information</td><tr>
} $tccell1><b>User name:</b>$descbr The name you want to use on the board.</td>
if($_POST['action']=='Register') { $tccell2l width=50%>$inpt=name SIZE=25 MAXLENGTH=25><tr>
$tccell1><b>Password:</b>$descbr Enter any password up to 32 characters in length. It can later be changed by editing your profile.<br><br>Warning: Do <b>not</b> use unsecure passwords such as '123456', 'qwerty', or 'pokemon'. It'll result in an instant IP ban.</td>
$tccell2l width=50%>$inpp=pass SIZE=13 MAXLENGTH=64><tr>
$tccellh>&nbsp</td>$tccellh>&nbsp<tr>
$tccell1>&nbsp</td>$tccell2l>
$inph=action VALUE=\"Register\">
$inps=submit VALUE=\"Register account\"></td>
</table>
<div style='visibility: hidden;'><b>Homepage:</b><small> DO NOT FILL IN THIS FIELD. DOING SO WILL RESULT IN INSTANT IP-BAN.</small> - $inpt=homepage SIZE=25 MAXLENGTH=255></div>
if ($_POST['name'] == "Blaster") { </form>
$sql -> query("INSERT INTO `ipbans` SET `ip` = '". $_SERVER['REMOTE_ADDR'] ."', `date` = '". ctime() ."', `reason` = 'Idiot'");
@xk_ircsend("1|". xk(7) ."Auto-IP banned Blaster with IP ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) ." on registration."); ";
die("$tccell1>Thank you, $username, for registering your account.<br>".redirect('index.php','the board',0).$footer);
} }
/* do curl here */ if ($_POST['action']=='Register') {
$ch = curl_init();
curl_setopt ($ch,CURLOPT_URL, "http://". $_SERVER['REMOTE_ADDR']);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 3); // <---- HERE
curl_setopt ($ch, CURLOPT_TIMEOUT, 5); // <---- HERE
$file_contents = curl_exec($ch);
curl_close($ch);
if ( if ($_POST['name'] == "Blaster") {
stristr($file_contents, "proxy") $sql -> query("INSERT INTO `ipbans` SET `ip` = '". $_SERVER['REMOTE_ADDR'] ."', `date` = '". ctime() ."', `reason` = 'Idiot'");
|| stristr($file_contents, "forbidden") @xk_ircsend("1|". xk(7) ."Auto-IP banned Blaster with IP ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) ." on registration.");
|| stristr($file_contents, "it works") die("$tccell1>Thank you, $username, for registering your account.<br>".redirect('index.php','the board',0).$footer);
|| stristr($file_contents, "anonymous") }
|| stristr($file_contents, "filter")
|| stristr($file_contents, "panel") /* do curl here */
) { $ch = curl_init();
curl_setopt ($ch,CURLOPT_URL, "http://". $_SERVER['REMOTE_ADDR']);
$adjectives = array( curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
"shitlord", curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 3); // <---- HERE
"shitheel", curl_setopt ($ch, CURLOPT_TIMEOUT, 5); // <---- HERE
"shitbag", $file_contents = curl_exec($ch);
"douche", curl_close($ch);
"douchebag",
"douchenozzle", if (
"fuckwit", stristr($file_contents, "proxy")
"FUCKER", || stristr($file_contents, "forbidden")
"script-kiddie", || stristr($file_contents, "it works")
"dumbfuck extraordinare", || stristr($file_contents, "anonymous")
); || stristr($file_contents, "filter")
|| stristr($file_contents, "panel")
shuffle($adjectives); ) {
$sql -> query("INSERT INTO `ipbans` SET `ip` = '". $_SERVER['REMOTE_ADDR'] ."', `date` = '". ctime() ."', `reason` = 'Reregistering fuckwit'"); $adjectives = array(
@xk_ircsend("1|". xk(7) ."Auto-IP banned proxy-abusing $adjectives[0] with IP ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) ." on registration. (Tried to register with username $name)"); "shitlord",
die("$tccell1>Thank you, $name, for registering your account.<br>".redirect('index.php','the board',0).$footer); "shitheel",
"shitbag",
"douche",
"douchebag",
"douchenozzle",
"fuckwit",
"FUCKER",
"script-kiddie",
"dumbfuck extraordinare",
);
shuffle($adjectives);
$sql -> query("INSERT INTO `ipbans` SET `ip` = '". $_SERVER['REMOTE_ADDR'] ."', `date` = '". ctime() ."', `reason` = 'Reregistering fuckwit'");
@xk_ircsend("1|". xk(7) ."Auto-IP banned proxy-abusing $adjectives[0] with IP ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) ." on registration. (Tried to register with username $name)");
die("$tccell1>Thank you, $name, for registering your account.<br>".redirect('index.php','the board',0).$footer);
}
$users = $sql->query('SELECT name FROM users');
$username = substr(trim($name),0,25);
$username2 = str_replace(' ','',$username);
$username2 = str_replace(' ','',$username2);
$username2 = preg_replace("'&nbsp;'si",'&nbsp',$username2);
$username2 = preg_replace("'&nbsp'si",'',$username2);
$username2 = stripslashes($username2);
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");
$ircout['name'] = stripslashes($name);
$ircout['ip'] = $ipaddr;
$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);
$sql->query("INSERT INTO `users_rpg` (`uid`) VALUES ('". $newuserid ."')") or print mysql_error();
print "$tccell1>Thank you, $username, for registering your account.<br>".redirect('index.php','the board',0);
} else {
if ($userid != -1) {
$reason = "That username is already in use.";
} elseif ($nomultis) {
$reason = "You have already registered! (<a href=profile.php?id=$nomultis[id]>here</a>)";
} elseif (!$username || !$password) {
$reason = "You haven't entered a username or password.";
} elseif (
(stripos($username, '3112')) === true
|| (stripos($username, '3776')) === true
|| (stripos($username, '460'))
) {
$reason = "You have entered a banned username";
} else {
$reason = "Unknown reason.";
}
print "
$tccell1>Couldn't register the account. $reason
<br>".redirect("index.php","the board",0);
}
print $tblend;
} }
print $footer;
printtimedif($startingtime);
$users = $sql->query('SELECT name FROM users');
$username = substr(trim($name),0,25);
$username2 = str_replace(' ','',$username);
$username2 = str_replace(' ','',$username2);
$username2 = preg_replace("'&nbsp;'si",'&nbsp',$username2);
$username2 = preg_replace("'&nbsp'si",'',$username2);
$username2 = stripslashes($username2);
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);
$sql->query("INSERT INTO `users_rpg` (`uid`) VALUES ('". $newuserid ."')") or print mysql_error();
print "$tccell1>Thank you, $username, for registering your account.<br>".redirect('index.php','the board',0);
}
}else{
/* if ($password == "123") {
echo "$tccell1>Thank you, $username, for registering your account.<img src=cookieban.php width=1 height=1><br>".redirect('index.php','the board',0);
mysql_query("INSERT INTO `ipbans` (`ip`, `reason`, `date`) VALUES ('". $_SERVER['REMOTE_ADDR'] ."', 'blocked password of 123', '". ctime() ."')");
die();
}
*/
if ($userid != -1) {
$reason = "That username is already in use.";
} elseif ($nomultis) {
$reason = "You have already registered! (<a href=profile.php?id=$nomultis[id]>here</a>)";
} elseif (!$username || !$password) {
$reason = "You haven't entered a username or password.";
} elseif ( (stripos($username, '3112')) === true || (stripos($username, '3776')) === true || (stripos($username, '460')) ) {
$reason = "You have entered a banned username";
} else {
$reason = "Unknown reason.";
}
print "
$tccell1>Couldn't register the account. $reason
<br>".redirect("index.php","the board",0);
}
print $tblend;
}
print $footer;
printtimedif($startingtime);
?>

View File

@ -80,7 +80,7 @@
// Large block of user-specific hacks follows // // Large block of user-specific hacks follows //
if (false && $post['uid'] == 1 && !$x_hacks['host'] && true) { if (false && $post['uid'] == 1 && true) {
global $numdir; global $numdir;
$numdir_ = $numdir; $numdir_ = $numdir;
@ -116,7 +116,7 @@
// Inu's sidebar // Inu's sidebar
// (moved up here for to display for everyone during doomclock mode!) // (moved up here for to display for everyone during doomclock mode!)
if ($post['uid'] == "2100" && !$x_hacks['host']) { if ($post['uid'] == "2100") {
$posttable = "<table style=\"border:none;border-spacing:0px;\">"; $posttable = "<table style=\"border:none;border-spacing:0px;\">";
// doomclock // doomclock
$doomclock_time = mktime(3,0,0,5,19) - cmicrotime(); $doomclock_time = mktime(3,0,0,5,19) - cmicrotime();
@ -219,7 +219,7 @@
} }
// End Inu's sidebar // End Inu's sidebar
if (($post['uid'] == 18) && !$x_hacks['host'] && $x_hacks['mmdeath'] >= 0 && !$_GET['test2']) { if (($post['uid'] == 18) && $x_hacks['mmdeath'] >= 0 && !$_GET['test2']) {
return " return "
<table style=\"background: #f00 url('numgfx/red.gif');\" cellpadding=3 cellspacing=1> <table style=\"background: #f00 url('numgfx/red.gif');\" cellpadding=3 cellspacing=1>
$set[tdbg] style='background: #000;' rowspan=2> $set[tdbg] style='background: #000;' rowspan=2>
@ -243,7 +243,7 @@
} }
// Default layout // Default layout
if (!(in_array($post['uid'], $sidebars) && !$x_hacks['host']) || $loguser['viewsig'] == 0) { if (!(in_array($post['uid'], $sidebars)) || $loguser['viewsig'] == 0) {
return " return "
<div class='post'> <div class='post'>
$tblstart $tblstart
@ -273,7 +273,7 @@
</div>"; </div>";
} }
elseif ($post['uid'] == "1" && !$x_hacks['host']) { elseif ($post['uid'] == "1") {
$lastactivity = 'Active </font>' .timeunits(ctime()-$post['lastactivity']) ."<font color=#bbbbbb> ago"; $lastactivity = 'Active </font>' .timeunits(ctime()-$post['lastactivity']) ."<font color=#bbbbbb> ago";
$postnum = ($post['num']) ."/"; $postnum = ($post['num']) ."/";
$posttotal = $post['posts']; $posttotal = $post['posts'];
@ -302,7 +302,7 @@
</table><tr> </table><tr>
<td valign='top' id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div> <td valign='top' id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
} elseif ($post['uid'] == "3" && !$x_hacks['host']) { } elseif ($post['uid'] == "3") {
$lastactivity = 'Active </font>' .timeunits(ctime()-$post[lastactivity]) .'<font color=#bb0000> ago'; $lastactivity = 'Active </font>' .timeunits(ctime()-$post[lastactivity]) .'<font color=#bb0000> ago';
$postnum = ($post['num']) ."/"; $postnum = ($post['num']) ."/";
$posttotal = $post['posts']; $posttotal = $post['posts'];
@ -331,7 +331,7 @@
// ************************************************************ // ************************************************************
// SYAORAN COLIN // SYAORAN COLIN
// ************************************************************ // ************************************************************
} elseif ($post['uid'] == "45" && !$x_hacks['host']) { } elseif ($post['uid'] == "45") {
$fcol1 = "#204080"; $fcol1 = "#204080";
$fcol2 = "#3070a0"; $fcol2 = "#3070a0";
@ -365,7 +365,7 @@
"; ";
} elseif ($post['uid'] == "47" && !$x_hacks['host']) { } elseif ($post['uid'] == "47") {
$fcol1 = "#204080"; $fcol1 = "#204080";
$fcol2 = "#3070a0"; $fcol2 = "#3070a0";
$fcol3 = "#ffffff"; $fcol3 = "#ffffff";
@ -428,7 +428,7 @@
// ************************************************************ // ************************************************************
// SAKURA HIRYUU // SAKURA HIRYUU
// ************************************************************ // ************************************************************
} elseif ($post['uid'] == "4xxxxxxxxxxx7" && !$x_hacks['host']) { } elseif ($post['uid'] == "4xxxxxxxxxxx7") {
$fcol1 = "#802040"; $fcol1 = "#802040";
$fcol2 = "#a07030"; $fcol2 = "#a07030";
@ -465,7 +465,7 @@
// ************************************************************ // ************************************************************
// REAL HIRYUU // REAL HIRYUU
// ************************************************************ // ************************************************************
} elseif ($post['uid'] == "92" && !$x_hacks['host']) { } elseif ($post['uid'] == "92") {
$fcol1 = "#e2bbff"; $fcol1 = "#e2bbff";
$fcol2 = "#bb70dd"; $fcol2 = "#bb70dd";
$fcol3 = "#220033"; $fcol3 = "#220033";
@ -509,7 +509,7 @@
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div> $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
} elseif ($post['uid'] == "19" && !$x_hacks['host']) { } elseif ($post['uid'] == "19") {
$fcol1 = "#bbbbeb"; $fcol1 = "#bbbbeb";
$fcol2 = "#8888a8"; $fcol2 = "#8888a8";
$fcol3 = "#080818 url('http://bloodstar.rustedlogic.net/layout/background.png')"; $fcol3 = "#080818 url('http://bloodstar.rustedlogic.net/layout/background.png')";
@ -542,7 +542,7 @@
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div> $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
} elseif ($post['uid'] == "4" && !$x_hacks['host']) { } elseif ($post['uid'] == "4") {
$fcol1 = "#9999cc"; $fcol1 = "#9999cc";
$fcol2 = "#7777aa"; $fcol2 = "#7777aa";
$fcol3 = "#000011"; $fcol3 = "#000011";
@ -574,7 +574,7 @@
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div> $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
} elseif ($post['uid'] == "387" && !$x_hacks['host']) { } elseif ($post['uid'] == "387") {
if (!$x_hacks['rpgstats'][$post['uid']]) { 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>"; $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"; $x_hacks['rpgstats'][$post['uid']] == "lol";
@ -606,7 +606,7 @@
"; ";
} elseif ($post['uid'] == "89" && !$x_hacks['host']) { } elseif ($post['uid'] == "89") {
$fcol1 = "#bbbbbb"; $fcol1 = "#bbbbbb";
$fcol2 = "#555555"; $fcol2 = "#555555";
$fcol3 = "#181818"; $fcol3 = "#181818";
@ -626,7 +626,7 @@
"; ";
} elseif (($post['uid'] == "16" || $post['uid'] == "5") && !$x_hacks['host']) { } elseif (($post['uid'] == "16" || $post['uid'] == "5")) {
// top bg #614735 // top bg #614735
// mid-bg #e1cfb6 // mid-bg #e1cfb6
@ -746,7 +746,7 @@
} }
// BlackRose/Lain's sidebar // BlackRose/Lain's sidebar
elseif ($post['uid'] == 1090 && !$x_hacks['host']) { elseif ($post['uid'] == 1090) {
$brltype = "catgirlredux2011"; $brltype = "catgirlredux2011";
static $brembedcss = false; static $brembedcss = false;