mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-07-31 04:02:00 -07:00
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:
@@ -1,17 +1,8 @@
|
||||
<?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);
|
||||
$totalbancount = $sql->fetchq("SELECT COUNT(*) AS cnt, MAX(`date`) as time FROM `ipbans`", MYSQL_ASSOC);
|
||||
|
||||
$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>";
|
||||
if (!defined("IT_IS_CHRISTMAS")) {
|
||||
define("IT_IS_CHRISTMAS", false);
|
||||
}
|
||||
*/
|
||||
|
||||
$pwlnames=array('-2'=>'Permabanned','-1'=>'Banned','Normal','Normal +','Moderator','Administrator','Sysadmin');
|
||||
$nmcol[0]=array('-2'=>'6a6a6a','-1'=>'888888','97ACEF','D8E8FE','AFFABE','FFEA95');
|
||||
@@ -62,9 +53,9 @@
|
||||
$scheme = 0;
|
||||
}
|
||||
|
||||
// Force Xmas scheme (cue whining, as always)
|
||||
if (false && !($log && $loguserid == 2100)) { // ... just ... not now please.
|
||||
if (!$x_hacks['host']) $scheme = 3;
|
||||
// Force Xmas scheme for the holidays
|
||||
if (IT_IS_CHRISTMAS && !($log && $loguserid == 2100)) { // ... just ... not now please.
|
||||
$scheme = 3;
|
||||
$x_hacks['rainbownames'] = true;
|
||||
}
|
||||
|
||||
@@ -78,9 +69,6 @@
|
||||
$schemepre = false;
|
||||
}
|
||||
|
||||
# if (!$x_hacks['host'] && true) {
|
||||
# $filename = "ymar.php";
|
||||
# }
|
||||
|
||||
require "schemes/$filename";
|
||||
|
||||
@@ -88,10 +76,6 @@
|
||||
$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
|
||||
if (!$inputborder) $inputborder = $tableborder;
|
||||
|
||||
@@ -104,26 +88,4 @@
|
||||
}
|
||||
//$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>";
|
||||
} */
|
||||
|
||||
|
||||
|
||||
|
@@ -88,10 +88,7 @@
|
||||
}
|
||||
|
||||
if ($sql -> resultq("SELECT `disable` FROM `misc` WHERE 1")) {
|
||||
if ($x_hacks['host'])
|
||||
require "lib/downtime-bmf.php";
|
||||
else
|
||||
require "lib/downtime2.php";
|
||||
require "lib/downtime2.php";
|
||||
|
||||
die("
|
||||
<title>Damn</title>
|
||||
@@ -180,10 +177,7 @@
|
||||
if ($loguser['powerlevel'] >= 1)
|
||||
$boardtitle .= $submessage;
|
||||
|
||||
if ($loguser['id'] == 175 && !$x_hacks['host'])
|
||||
$loguser['powerlevel'] = max($loguser['powerlevel'], 3);
|
||||
|
||||
} else {
|
||||
} else {
|
||||
// Guest settings
|
||||
$loguserid = null;
|
||||
$loguser = array();
|
||||
@@ -226,7 +220,7 @@
|
||||
//$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);
|
||||
|
||||
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 `name` = 'Ninetales', `powerlevel` = '3' WHERE `id` = 24 and `powerlevel` < 3");
|
||||
//$sql->query("UPDATE `users` SET `sex` = '9' WHERE `id` = 1");
|
||||
@@ -309,11 +303,7 @@ function filter_string(&$v) {
|
||||
|
||||
function readsmilies(){
|
||||
global $x_hacks;
|
||||
if ($x_hacks['host']) {
|
||||
$fpnt=fopen('smilies2.dat','r');
|
||||
} else {
|
||||
$fpnt=fopen('smilies.dat','r');
|
||||
}
|
||||
$fpnt=fopen('smilies.dat','r');
|
||||
for ($i=0;$smil[$i]=fgetcsv($fpnt,300,',');$i++);
|
||||
$r=fclose($fpnt);
|
||||
return $smil;
|
||||
@@ -819,8 +809,7 @@ function getnamecolor($sex, $powl, $prefix = true){
|
||||
// RAINBOW MULTIPLIER
|
||||
elseif ($x_hacks['rainbownames'] || $sex == 255) {
|
||||
$stime=gettimeofday();
|
||||
// slowed down 5x
|
||||
$h = (($stime['usec']/25) % 600);
|
||||
$h = (($stime['usec']) % 600);
|
||||
if ($h<100) {
|
||||
$r=255;
|
||||
$g=155+$h;
|
||||
@@ -1354,7 +1343,6 @@ function addslashes_array($data) {
|
||||
}
|
||||
|
||||
global $x_hacks;
|
||||
if ($x_hacks['host']) return;
|
||||
|
||||
if ($type == "user") {
|
||||
if ($in['pmatch']) {
|
||||
@@ -1513,18 +1501,21 @@ function printtimedif($timestart){
|
||||
}
|
||||
*/
|
||||
|
||||
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) ."'");
|
||||
}
|
||||
// Logging of rendering times. Used back when DreamHost was being trash.
|
||||
// Not that it ever stopped, but it hasn't really been an issue
|
||||
/*
|
||||
$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) ."'");
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
function ircerrors($type, $msg, $file, $line, $context) {
|
||||
|
@@ -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>
|
||||
$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
|
||||
</head>
|
||||
$body
|
||||
|
Reference in New Issue
Block a user