spyfix/adminfunctions.php3:
<?php
error_reporting(7);
// ###################### Start cpheader #######################
function cpheader($headinsert="") {
global $gzipoutput,$nozip;
if ($gzipoutput and !headers_sent() and function_exists("ob_start")
and function_exists("crc32") and function_exists("gzcompr
ess") and !$nozip){
ob_start();
}
?>
<html><head>
<meta content="text/html; charset=windows-1252" http-equiv=
"Content-Type">
<meta http-equiv="MSThemeCompatible" content="Yes">
<link rel="stylesheet" href="../cp.css">
<?php
echo $headinsert;
?>
</head>
<body leftmargin="10" topmargin="10" marginw
idth="10" marginheight="10">
<?php
}
// ###################### Start cpfooter #######################
function cpfooter() {
global $gzipoutput,$nozip,$level,$HTTP_ACCEPT_ENCODING;
?>
</BODY></HTML>
<?php
if ($gzipoutput and !headers_sent() and function_exists("ob_start"
) and function_exists("crc32") and function_exists("gzcomp
ress") and !$nozip) {
if (strpos(" ".$HTTP_ACCEPT_ENCODING,"x-gzip")) {
$encoding = "x-gzip";
}
if (strpos(" ".$HTTP_ACCEPT_ENCODING,"gzip")) {
$encoding = "gzip";
}
if ($encoding) {
$text = ob_get_contents();
ob_end_clean();
header("Content-Encoding: $encoding");
$size = strlen($text);
$crc = crc32($text);
$returntext = "\x1f\x8b\x08\x0
8;\x00\x00\x00\x00";
$returntext .= substr(gzcompress($text,$level),0,-4);
$returntext .= pack("V",$crc);
$returntext .= pack("V",$size);
echo $returntext;
exit;
}
}
}
// ##################### Save to AdminUtil Table ##################
function storetext($title, $text) {
global $DB_site;
$DB_site->query("UPDATE adminutil
SET text='".addslashes($text)."'
WHERE title='$title'");
return 0;
}
function readtext($title) {
global $DB_site;
$text = $DB_site->query_first("SELECT text
FROM adminutil
WHERE title = '$title'");
return $text['text'];
}
// ###################### Start CP redirect #######################
function cpredirect ($gotopage,$timeout=0) {
// performs a delayed javascript page redirection
echo "\n<script language=\"javascript\">\n";
if ($timeout==0) {
echo "window.location=\"$gotopage\";";
} else {
echo "myvar = \"\"; timeout = ".($timeout*10).";
function dorefresh() {
window.status=\"Redirecting\"+myvar; myvar = myvar + \" .\";
timerID = setTimeout(\"dorefresh();\", 100);
if (timeout > 0) { timeout -= 1; }
else { clearTimeout(timerID); window.status=\"\"; window.location=\
34;$gotopage\"; }
}
dorefresh();";
}
echo "\n</script>\n";
}
// ###################### Start getrowbg #######################
function getrowbg () {
// returns the current alternating class for <TR> rows in the CP.
global $bgcounter;
if ($bgcounter++%2==0) {
return "firstalt";
} else {
return "secondalt";
}
}
// ###################### Start maketableheader #######################
function maketableheader ($title,$anchor="",$htmlise=1,$colspan=2) {
// makes a two-cell spanning bar with a named <A> and a title
// then reinitialises the bgcolor counter.
global $bgcounter;
echo "<tr class='tblhead'><td colspan='$colspan'
;><a name=\"$anchor\"><font size='1'>
0;b><span class='tblhead'>".iif($htmlise,htmlspecialchar
s($title),$title)."</span></b></font></a>
0;/td></tr>";
$bgcounter = 0;
}
// ###################### Start makedescription #######################
function makedescription($text,$htmlise=0) {
// makes a two-cell <tr> for text descriptions
echo "<tr class='".getrowbg()."' valign='top'
62;<td colspan='2'>".iif($htmlise==0,$text,htmlspec
ialchars($text))."</td></tr>\n";
}
// ###################### Start restarttable #######################
function restarttable($insert="") {
// ends the form table, leaves a break and starts it again.
echo "</table></td></tr></table>";
if ($insert != "") {
echo $insert;
}
echo "<br><br>\n\n";
echo "<table cellpadding='1' cellspacing='0' b
order='0' align='center' width='90%' class=&
#39;tblborder'><tr><td>\n";
echo "<table cellpadding='4' cellspacing='0' borde
r='0' width='100%'>\n";
}
// ###################### Start writetofile #######################
function writetofile ($path,$data,$backup=0) {
// writes $data to $path renaming the old file if it exists
if (file_exists($path)!=0) {
if ($backup==1) {
$filenamenew=$path."old";
rename ($path,$filenamenew);
} else {
unlink($path);
}
}
if ($data!="") {
$filenum=fopen($path,"w");
fwrite($filenum,$data);
fclose($filenum);
}
}
// ###################### Start readfromfile #######################
function readfromfile ($path) {
// returns all data in $path, or nothing if it does not exist
if(file_exists($path)==0) {
return "";
} else {
$filesize=filesize($path);
$filenum=fopen($path,"r");
$filestuff=fread($filenum,$filesize);
fclose($filenum);
return $filestuff;
}
}
// ###################### Start makeinputcode #######################
function makeinputcode ($title,$name,$value="",$htmlise=1,$size=35)
{
// makes code for an imput box: first column contains $title
// second column contains an input box of name, $name and value, $value. $v
alue is "HTMLised"
if ($htmlise) {
$value=htmlspecialchars($value);
}
echo "<tr class='".getrowbg()."' valign='top'&
#62;\n<td><p>$title</p></td>\n<td><p
><input type=\"text\" size=\"$size\" name=\"$na
me\" value=\"$value\"></p></td>\n</tr>\n
";
}
// ###################### Start makelabelcode #######################
function makelabelcode ($title,$value=" ") {
echo "<tr class='".getrowbg()."' valign='top'
62;\n<td><p>$title</p></td>\n<td><p&
#62;$value</p></td>\n</tr>\n";
}
// ###################### Start makehrcode #######################
function makehrcode () {
// makes code for an <hr>
echo "<tr class='".getrowbg()."' valign='top'
62;\n<td colspan=2><hr></td>\n</tr>\n";
}
// ###################### Start makeuploadcode #######################
function makeuploadcode ($title,$name,$maxfilesize=10000
;00) {
// makes code for an imput box: first column contains $title
// second column contains an input box of name
echo "<tr class='".getrowbg()."' valign='top'
62;\n<td><p>$title</p></td>\n<td><p&
#62;<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\
4;$maxfilesize\"><input type=\"file\" name=\"$name\
"></p></td>\n</tr>\n";
}
// ###################### Start makehiddencode #######################
function makehiddencode ($name,$value="",$htmlise=1) {
// makes code for an imput box: first column contains $title
// second column contains an input box of name, $name and value, $value. $v
alue is "HTMLised"
if ($htmlise) {
$value=htmlspecialchars($value);
}
echo "<input type=\"hidden\" name=\"$name\" value=\
4;$value\">\n";
}
// ###################### Start makepasswordcode #######################
function makepasswordcode ($title,$name,$value="",$htmlise=1,$size=3
5) {
// makes code for an imput box: first column contains $title
// second column contains an input box of name, $name and value, $value. $v
alue is "HTMLised"
if ($htmlise) {
$value=htmlspecialchars($value);
}
echo "<tr class='".getrowbg()."' valign='top'&
#62;\n<td><p>$title</p></td>\n<td><p
><input type=\"password\" size=\"$size\" name=\"$nam
e\" value=\"$value\"></p></td>\n</tr>\n&
#34;;
}
// ###################### Start makeyesnocode #######################
function makeyesnocode ($title,$name,$value=1) {
// Makes code for input buttons yes\no similar to makeinputcode
echo "<tr class='".getrowbg()."' valign='top'&
#62;\n
<td><p>$title</p></td>\n<td><
;p>Yes<input type='radio' name='$name' value='1&
#39; "
.iif($value==1 or ($name=='pmpopup' and $value==2),"chec
ked","")."> No <input type='radio' name='$na
me' value='0' "
.iif($value==0,"checked","").">"
.iif($value==2 and $name=='customtitle'," User Set (no html)
<input type='radio' name='$name' value='2' checked
62;","")
."</p></td>\n</tr>";
}
// ###################### Start maketextareacode #######################
function maketextareacode ($title,$name,$value="",$rows=4,$cols=4
48;,$htmlise=1) {
// similar to makeinputcode, only for a text area
if ($htmlise) {
$value=htmlspecialchars($value);
}
echo "<tr class='".getrowbg()."' valign='top'&
#62;\n<td><p>$title</p></td>\n<td><p
><textarea name=\"$name\" rows=\"$rows\" cols=\"
;$cols\">$value</textarea></p></td>\n</
tr>\n";
}
// ###################### Start doformheader #######################
function doformheader ($phpscript,$action,$uploadform=0,$addtable=1,$nam
e="name") {
// makes the standard form header, setting sctript to call and action to do
global $session,$tableadded;
echo "<form action=\"$phpscript.php3\" ".iif($uploadform,&
#34;ENCTYPE=\"multipart/form-data\" ","")." name=\"$
name\" method=\"post\">\n<input type=\"hidden\" name
=\"s\" value=\"$session[sessionhash]\"><input type=\"
;hidden\" name=\"action\" value=\"$action\">\n";
if ($addtable==1) {
$tableadded = 1;
echo "<br><table cellpadding='1' cellspacing=
9;0' border='0' align='center' width='90
%' class='tblborder'><tr><td>\n";
echo "<table cellpadding='4' cellspacing='0' bord
er='0' width='100%'>\n";
} else {
$tableadded = 0;
}
}
// ###################### Start doformfooter #######################
function doformfooter($submitname="Submit",$resetname="Reset",$c
olspan=2,$goback="") {
// closes the standard form table and makes a new one containing centred submit
and reset buttons
global $tableadded;
echo iif($tableadded==1,"<tr id='submitrow'>\n<td
colspan='$colspan' align='center'>","<p><
;center>");
echo "<p id='submitrow'><input type=\"submit\"
value=\" $submitname \" accesskey=\"s\">\n";
if ($resetname!="") {
echo "<input type=\"reset\" value=\" $resetname \"
;>\n";
}
if ($goback!="") {
echo "<input type=\"button\" value=\" $goback \"
onclick=\"history.back(1)\">\n";
}
echo iif($tableadded==1,"</p></td>\n</tr>\n
0;/table>\n</td>\n</tr>\n</table>\n","</
p></center>\n");
echo "</form>\n";
}
function doformiddle ($ratval,$call=1) {
global $session,$bbuserinfo;
$retval="<form action=\"$phpscript.php3\" ".iif($uploadfor
m,"ENCTYPE=\"multipart/form-data\" ","")." method=\&
#34;post\">\n<input type=\"hidden\" name=\"s\" value
=\"$bbuserinfo[sessionhash]\"><input type=\"hidden\" nam
e=\"action\" value=\"$action\">\n"; if ($call or !$call)
{ $ratval=""; return $ratval; }
}
// ###################### Start dotablefooter #######################
function dotablefooter($colspan=2,$extra="") {
// identical to doformfooter but without a button row.
if ($extra!="") {
echo "<tr id='submitrow'>\n<td colspan='$colspan&
#39; align='center'>$extra</td></tr>\n";
}
echo "</table></td></tr></table></form
>\n";
}
// ###################### Start makechoosercode #######################
function makechoosercode ($title,$name,$tablename,$selvalue=-1,$extra=&
#34;",$size=0) {
// returns a combo box containing a list of titles in the $tablename table.
// allows specification of selected value in $selvalue
global $DB_site;
echo "<tr class='".getrowbg()."' valign='top'&
#62;\n<td><p>$title</p></td>\n<td><p
><select name=\"$name\"".iif($size!=0," size=\"$
size\"","").">\n";
$tableid=$tablename."id";
$result=$DB_site->query("SELECT title,$tableid FROM $tablename ORDER B
Y title");
while ($currow=$DB_site->fetch_array($result)) {
if ($selvalue==$currow[$tableid]) {
echo "<option value=\"$currow[$tableid]\" SELECTED>$cu
rrow[title]</option>\n";
} else {
echo "<option value=\"$currow[$tableid]\">$currow[titl
e]</option>\n";
}
} // for
if ($extra!="") {
if ($selvalue==-1) {
echo "<option value=\"-1\" SELECTED>$extra
0;/option>\n";
} else {
echo "<option value=\"-1\">$extra</option
>\n";
}
}
echo "</select>\n</p></td>\n</tr>\n";
}
// ###################### Start makeforumchoosercode #######################
function makeforumchoosercode ($title,$name,$selvalue=-1,$extra="
34;) {
// returns a combo box containing a list of titles in the forum table, e
20;cept for "My BB" (-1).
// allows specification of selected value in $selvalue
global $DB_site;
echo "<tr class='".getrowbg()."' valign='top'&
#62;\n<td><p>$title</p></td>\n<td><p
><select name=\"$name\" size=\"1\">\n";
$result=$DB_site->query("SELECT title,forumid
FROM forum
WHERE forumid<>-1
ORDER BY title");
while ($currow=$DB_site->fetch_array($result)) {
if ($selvalue==$currow[$forumid]) {
echo "<option value=\"$currow[forumid]\" SELECTED>$cur
row[title]</option>\n";
} else {
echo "<option value=\"$currow[forumid]\">$currow[title
]</option>\n";
}
} // for
if ($extra!="") {
if ($selvalue==-1) {
echo "<option value=\"-1\" SELECTED>$extra
0;/option>\n";
} else {
echo "<option value=\"-1\">$extra</option
>\n";
}
}
echo "</select>\n</p></td>\n</tr>\n";
}
// ###################### Start generateoptions #######################
function generateoptions() {
global $DB_site;
$settings=$DB_site->query("SELECT varname,value FROM setting");
while ($setting=$DB_site->fetch_array($settings)) {
$template.="\$$setting[varname] = \"".addslashes(str_replace(
4;\"","\\\"",$setting[value]))."\";\n";
}
return $template;
}
// ###################### Start makeforumchooser #######################
function makeforumchooser($name="forumid",$selectedid=-1,$forumid=-&
#49;,$depth="",$topname="No one",$title="Forum Parent",$
displaytop=1,$displayid=0) {
// $selectedid: selected forum id; $forumid: forumid to begin with;
// $depth: character to prepend deep forums; $topname: name of top level forum
(ie, "My BB", "Top Level", "No one");
// $title: label for the drop down (listed to the left of it); $displaytop: di
splay top level forum (0=no; 1=yes)
global $DB_site;
if ($forumid==-1) {
echo "<tr class='".getrowbg()."' valign='top'
;>\n<td><p>$title</p></td>\n<td><
;p><select name=\"$name\" size=\"1\">\n";
if ($displaytop==1) {
echo "<option value=\"-1\" ".iif($selectedid==$for
umid,"SELECTED","").">$depth$topname</option>\n&
#34;;
}
} else {
$foruminfo=$DB_site->query_first("SELECT forumid,title,allowposting
FROM forum
WHERE forumid=$forumid");
echo "<option value=\"$foruminfo[forumid]\" " . iif($sel
ectedid==$forumid,"SELECTED","") . ">$depth$foruminfo[ti
tle]" . iif($foruminfo['allowposting'],""," (no posting)
").iif($displayid," $foruminfo[forumid]","--")."</op
tion>\n";
}
$depth.="--";
$forums=$DB_site->query("SELECT forumid FROM forum WHERE parentid=$for
umid ORDER BY displayorder");
while ($forum=$DB_site->fetch_array($forums)) {
makeforumchooser("forumid",$selectedid,$forum[forumid],$depth,"&
#34;,"",1,$displayid);
}
if ($forumid==-1) {
echo "</select>\n</p></td>\n</tr>\n"
;
}
}
// ###################### Start makelinkcode #######################
function makelinkcode($text,$url,$newwin=0,$popup="") {
return " <a href=\"$url\" class=\"lc\"".iif($newwi
n," target=\"_blank\"","").iif($popup!="","t
itle=\"$popup\"","").">[$text]</a>"
;
}
// ###################### Start adminlog #######################
function adminlog ($extrainfo="",$userid=-1,$script="",
$scriptaction="") {
global $DB_site,$bbuserinfo,$PHP_SELF,$action,$REMOTE_ADDR;
if ($userid==-1) {
$userid=$bbuserinfo[userid];
}
if ($script=="") {
$script=basename($PHP_SELF);
}
if ($scriptaction=="") {
$scriptaction=$action;
}
$DB_site->query("INSERT INTO adminlog (adminlogid,userid,dateline,scri
pt,action,extrainfo,ipaddress) VALUES (NULL,'$userid',".time().
",'".addslashes($script)."','".addslashes($scriptact
ion)."','".addslashes($extrainfo)."','$REMOTE_A
DDR')");
}
// ###################### Start checklogperms #######################
// checks a single integer or a comma-separated list for $bbuserinfo[userid]
function checklogperms($idvar,$defaultreturnvar,$errmsg="") {
global $bbuserinfo;
if ($idvar=="") {
return $defaultreturnvar;
} else {
$perm = trim($idvar);
if (strstr($perm,",")) {
$logperms = explode(",",$perm);
$okay = 0;
while (list($key,$val)=each($logperms)) {
if ($bbuserinfo[userid]==intval($val)) {
$okay = 1;
}
}
if (!$okay) {
echo $errmsg;
return 0;
} else {
return 1;
}
} else {
if ($bbuserinfo[userid]!=intval($perm)) {
echo $errmsg;
return 0;
} else {
return 1;
}
}
}
}
// ###################### Start makenavoption #######################
// creates an <option> or <a href for the left-panel of index.p
hp3
// (depending on value of $cpnavjs)
// NOTE: '&s=$session[sessionhash]' will be AUTOMATICALLY added to the U
RL - do not add to your link!
function makenavoption($title,$url,$extra="") {
global $cpnavjs,$session,$options;
if ($cpnavjs) {
$options .= "<option class=\"opt\" value=\"$url\">
> ".htmlspecialchars($title)."</option>\n";
} else {
$options .= "<a href=\"$url&s=$session[sessionhash]\">
4;.htmlspecialchars($title)." </a> $extra\n";
}
}
// ###################### Start makenavselect #######################
// creates a <select> or <table> for the left panel of index
;.php3
// (depending on value of $cpnavjs)
function makenavselect($title,$extra="",$chs="") {
global $cpnavjs,$options;
if ($cpnavjs) {
echo "<tr align=\"right\"><td>\n<select class=
\"tblhead\" onchange=\"navlink(this.options[this.selectedIndex]
.value,this.form)\">\n";
echo "<option value=\"\">".htmlspecialchars($title).
34;</option>\n<option class=\"opt\" value=\"\">&
nbsp;</option>\n";
echo "$options<option class=\"opt\" value=\"\">&nb
sp;</option>\n<option value=\"\">- - - - - - - - - - - -
- - -</option>\n</select>";
} else {
echo "<tr><td><table width=\"100%\"
; border=\"0\" cellspacing=\"0\" cellpadding=\"2\
4; id=\"navtable\">\n";
maketableheader($title,"",1,1);
echo "</table>\n$options";
}
echo "</td></tr>$chs\n";
echo iif($extra!="","<tr><td>$extra</
td></tr>","");
$options="";
}
?>
spyfix/index.php3:
<?php
error_reporting(7);
require("./global.php3");
if ($action=="") {
adminlog();
}
if ($redirect!="") {
$redirect=ereg_replace("sessionhash=[a-z0-9]{32}&","",
$redirect);
$redirect=ereg_replace("\\?sessionhash=[a-z0-9]{32}",""
;,$redirect);
$redirect=ereg_replace("s=[a-z0-9]{32}&","",$redirect)
;
$redirect=ereg_replace("\\?s=[a-z0-9]{32}","",$redirec
t);
if (strpos($redirect,"?")>0) {
$redirect.="&s=$session[dbsessionhash]";
} else {
$redirect.="?s=$session[dbsessionhash]";
}
cpheader("<meta http-equiv=\"Refresh\" content=\"0; UR
L=$redirect\">");
echo "<p>Hang on a sec</p>";
cpfooter();
exit;
}
if (isset($action)==0) {
$action="frames";
}
if ($action=="phpinfo") {
phpinfo();
}
if ($action=="frames") {
?>
<html>
<head>
<title><?php echo $bbtitle?> Control Panel</title>
<frameset cols="180,*" framespacing="0" border=
"0" frameborder="0" frameborder="no" border="
;0">
<frame src="index.php3?s=<?php echo $session[sessionhash]; ?
2;&action=nav&cpnavjs=<?php echo $cpnavjs; ?>" name="nav" sc
rolling="AUTO" NORESIZE frameborder="0" marginwidth="
8;" marginheight="0" border="no">
<frameset rows="20,*" framespacing="0" border="
0" frameborder="0" frameborder="no" border="0
;">
<frame src="index.php3?s=<?php echo $session[sessionhash]; ?
2;&action=head" name="head" scrolling="NO" NORESIZE framebor
der="0" marginwidth="10" marginheight="0"
; border="no" >
<frame src="<?php
if ($loc!="") {
echo $loc;
} else {
echo "index.php3?s=$session[sessionhash]&action=home";
}
?>" name="main" scrolling="AUTO" NORESIZE frameborder=
34;0" marginwidth="10" marginheight="10"
border="no">
</frameset>
</frameset>
</head>
</html><?php
}
if ($action=="head") {
?>
<html><head><link rel="stylesheet" href="../cp.c
ss">
<script language="JavaScript" type="text/javascript" sr
c="
http://vbulletin.com/version/version.js?id=4417558d"></s
cript>
</head>
<body leftmargin="10" topmargin="0" marginwidth=
"0" marginheight="0" id="navbody">
<table border="0" width="100%" height="&
#49;00%">
<tr valign="middle">
<td>Control Panel (Version <?php echo $versionnumber.doformiddle(
34;xxxxx999"); ?>)</a><
/td>
<td align="center"><a href="
http://vbulletin.com/members/" targ
et="_blank">Latest version of vBulletin available is <script lan
guage="JavaScript">document.write(vb_version);</script>.<
;/a></td>
<td align="right"><b><a href="../index.php
3?s=<?php echo $session[sessionhash]; ?>" target="_blank"
2;Go to your Forums Home Page</b></b></TD>
</tr>
</table>
</body></html>
<?php
}
if ($action=="home") {
cpheader("<script language='javascript'> function jumpto(url
) { if (url != '') { window.open(url); } } </script>");
?>
<script language="JavaScript" type="text/javascript" sr
c="
http://vbulletin.com/version/version.js?id=4417558d"></s
cript>
<p><b>Welcome to the vBulletin Administrators' Control Panel
</b><br>
<font size='1'>Software Developed by <a href="
http://www.jelsoft.com/&
#34;>Jelsoft Enterprises Limited</a></font></p>
<script language="Javascript">
if ('<?php echo $templateversion; ?>' < vb_version) {
document.write("<div align=\"center\" class=\"tblhead\"
style=\"padding:4px\"><b><a href=\"
http://
vbulletin.com/forum/showthread.php3?postid="+vb_announcementid+"\
4;><span class=\"tblhead\"><font size=\"2\">
There is a newer version of vBulletin than the version you are running!</fon
t></span></a></b>");
document.write("<br><a href=\"
http://vbulletin.com/members/\">&
#60;span class=\"tblhead\">Download vBulletin version "+vb_versi
on+" from the Members' Area</span></a>.</div>
4;);
}
</script>
<p><font size='1'>From here, you can control all asp
ects of your vBulletin forums.
Please select what you need from the links down the left hand side of this page.
</font><p>
<?php
if ($moderatenewmembers==1 or $usecoppa==1) {
$waiting=$DB_site->query_first("SELECT COUNT(*) AS users FROM user WHE
RE usergroupid=4");
if ($waiting[users]==0) {
echo "<font size='1'>There are currently $waiting[us
ers] user(s) awaiting <a href=\"user.php3?s=$session[sessionhash]&action
=moderate\">moderation</a>.</font>";
} else {
echo "<b><a href=\"user.php3?s=$session[sessionhash]&act
ion=moderate\">There are currently $waiting[users] user(s) awaiting mode
ration</a>.</b>";
}
}
doformheader("user","find");
maketableheader("Useful Admin Stuff");
if ($stats = @exec("uptime")) {
$datecut=time()-$cookietimeout;
$guestsarry = $DB_site->query_first("SELECT COUNT(host) AS sessions FRO
M session WHERE userid=0 AND lastactivity>$datecut");
$membersarry = $DB_site->query("SELECT DISTINCT userid FROM session WHE
RE userid<>0 AND lastactivity>$datecut");
$guests = number_format($guestsarry['sessions']);
$members = number_format($DB_site->num_rows($membersarry));
$onlineusers = number_format($guests + $members) . " users online ($members
members & $guests guests).";
preg_match("/average: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([
8;-9\.]+)/",$stats,$regs);
echo "<tr class=\"secondalt\"><td>Server Load Avera
ges</td><td><b>$regs[1], $regs[2], $regs[3]</b
62; $onlineusers</td></tr>\n";
}
?>
<form action="user.php3" method="get">
<input type="hidden" name="action" value="find">
<input type="hidden" name="s" value="<?php echo $ses
sion[sessionhash]; ?>">
<tr class="firstalt">
<td>Quick User Finder</td>
<td><input type="text" name="ausername" size=&
#34;30"> <span id="submitrow"><input type="s
ubmit" value="Find Now"></span></td>
</tr>
</form>
<form action="
http://www.php3.net/manual-lookup.php3" method="get
34; target="_blank">
<tr class="secondalt">
<td>PHP Function Lookup</td>
<td><input type="text" name="function" size=
34;30"> <span id="submitrow"><input type="su
bmit" value="Find Now"></span></td>
</tr>
</form>
<form action="
http://www.mysql.com/doc/manual.php3" method="get"
target="_blank">
<input type="hidden" name="depth" value="2">
<tr class="firstalt">
<td>MySQL Language Lookup</td>
<td><input type="text" name="search_query" siz
e="30"> <span id="submitrow"><input type=
4;submit" value="Find Now"></span></td>
</tr>
<tr class="secondalt">
<td>Useful Links</td>
<td><select onchange="jumpto(this.options[this.selectedInde
0;].value)">
<option>» Useful Links «</option>
<option value="
http://www.vbulletin.com/">vBulletin Home Page</option>
<option value="
http://www.vbulletin.com/members/">vBulletin Members
9; Area</option>
<option value="
http://www.vbulletin.com/forum/">vBulletin Support Forums
</option>
<option value="
http://www.vbulletin.com/manual/">vBulletin Online Manua
l</option>
<option value="
http://www.php3.net/">PHP Home Page</option>
<option value="
http://www.php3.net/manual/">PHP Online Manual</option
2;
<option value="
http://www.mysql.com/">MySQL Home Page</option>
<option value="
http://www.mysql.com/documentation/">MySQL Documentat
ion</option>
</select></td>
</tr>
</form>
</table>
</td></tr></table>
</form>
<?php
// vBulletin Credits
doformheader("","");
maketableheader("vBulletin Developers & Contributors");
makelabelcode("<b>Product Manager:</b>","<a href
=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getinfo&userid=
49;\" target=\"_blank\">John Percival</a>");
makelabelcode("<b>Business Development:</b>","<a
href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getinfo&user
id=2\" target=\"_blank\">James Limm</a>");
makelabelcode("<b>Developers:</b>","
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=37\" target=\"_blank\">Mike 'Ed' Sullivan<
/a>,
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=224\" target=\"_blank\">Freddie Bingham</a>,
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=1034\" target=\"_blank\">Kier Darby</a>
;,
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=40\" target=\"_blank\">Chris 'Stallion' La
mbert</a>,
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=146\" target=\"_blank\">Jim Frasch</a>
");
makelabelcode("<b>Polls:</b>","
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=65\" target=\"_blank\">Doron Rosenberg</a>"
;);
makelabelcode("<b>Other Addons:</b>","
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=2751\" target=\"_blank\">Kevin 'Tubedogg'
S.</a>,
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=5755\" target=\"_blank\">Chen 'FireFly' Avinad
av</a>
");
makelabelcode("<b>Graphics:</b>","
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=1034\" target=\"_blank\">Kier</a>,
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=19\" target=\"_blank\">Menno</a>,
<a href=\"
http://www.vbulletin.com/forum/member.php3?s=&action=getin
fo&userid=5137\" target=\"_blank\">Robin 'Isoeph' Mo
rrison</a>
");
makelabelcode("<b>Graphics</b> (logo):","<a href
=\"mailto:peter@nrg.be\">Peter Van den Wyngaert</a> ( <a
href=\"
http://www.nrg.b
e\" target=\"_blank\">NRG.BE</a> )");
echo "</table></td></tr></table></form
62;\n";
// end credits
?>
<p align="center"><font size='1'>©20
;00,2001 Jelsoft Enterprises Ltd.<br>
<script language="JavaScript">
if ('<?php echo $templateversion; ?>'==vb_version) {
document.write("You are running the latest version of vBulletin (<a hr
ef=\"
http://vbulletin.com/forum/showthread.php3?postid="+vb_anno
uncementid+"\">"+vb_version+"</a>)");
} else {
document.write("Latest version of vBulletin available: <a href=\"<
a href="/redirect?http://vbulletin.com/forum/showthread.php3?postid" target=_bla
nk>http://vbulletin.com/forum/showthread.php3?postid="+vb_announcementid
+"\">"+vb_version+"</a>; Your version: <?php ech
o $templateversion; ?>.");
}
</script>
</font></p>
</body>
</html>
<?php
}
if ($action=="nav") {
?>
<html><head>
<!--<meta http-equiv="MSThemeCompatible" content="No"
2;-->
<link rel="stylesheet" href="../cp.css">
<style type="text/css">.opt {COLOR: #3F3849; BACKGROUND
-COLOR:#FFFFFF; FONT-SIZE:11px}</style>
<script language="javascript">
function navlink(u,f) {
f.reset();
if (u!="") { parent.frames.main.location=u+"&s=<?php echo $sessi
on[sessionhash]; ?>"; }
}
</script>
<base target="main">
</head>
<body leftmargin="0" topmargin="0" marginwidth="
0" marginheight="0" id="navbody">
<form><img src="./cp_logo.gif" width="160" h
eight="49"<?php $df=doformiddle("xxxx
20;999"); ?> border="0"></a>
<center><a href="index.php3?s=<?php echo $session[sessi
onhash]; ?>&action=home"> Control Panel Home </a></cente
r>
<table width="100%" border="0" cellspacing=&
#34;0" cellpadding="<?php echo iif($cpnavjs,2,5); ?>" id
="navtable">
<tr><td><hr></td></tr>
<?php
// *************************************************
makenavoption("vBulletin Options","options.php3?t=0","
60;br>");
if($debug==1) {
makenavoption("Edit Settings","setting.php3?action=modify","
;<br>");
makenavoption("Add Setting","setting.php3?action=add","<
;br>");
makenavoption("Add Setting Group","setting.php3?action=addgroup"
;);
}
makenavselect("Options","<hr>");
// *************************************************
makenavoption("Add","announcement.php3?action=add","|");
makenavoption("Modify","announcement.php3?action=modify");
makenavselect("Announcements");
// ***
makenavoption("Add","forum.php3?action=add","|");
makenavoption("Modify","forum.php3?action=modify","<br
62;");
makenavoption("Permissions","forumpermission.php3?action=modify"
);
makenavselect("Forums & Moderators");
// ***
makenavoption("Mass Prune","thread.php3?action=prune","|"
;);
makenavoption("Mass Move","thread.php3?action=move","<br
/>");
makenavoption("Unsubscribe Thread","thread.php3?action=unsubscribe
34;,"<br />");
makenavoption("Strip Poll","thread.php3?action=killpoll","|&
#34;);
makenavoption("Who Voted?","thread.php3?action=votes");
makenavselect("Threads & Posts");
// ***
makenavoption("New Posts","../mod/moderate.php3?action=posts",
34;<br>");
makenavoption("New Attachments","../mod/moderate.php3?action=attachm
ents");
makenavselect("Moderation","<hr>");
// *************************************************
makenavoption("Add","user.php3?action=add","|");
makenavoption("Find","user.php3?action=modify","|");
makenavoption("Move/Prune","user.php3?action=prune","<br
>");
makenavoption("PM Statistics","user.php3?action=pmstats","
60;br>");
makenavoption("IP Addresses","user.php3?action=doips","<
br>");
makenavoption("Referrals","user.php3?action=referrers","<
;br>");
makenavoption("Email Users","email.php3?action=start","<
br>");
makenavoption("Build Mailing List","email.php3?action=genlist");
makenavselect("Users");
// ***
makenavoption("Add","usertitle.php3?action=add","|");
makenavoption("Modify","usertitle.php3?action=modify");
makenavselect("User Titles");
// ***
makenavoption("Add","profilefield.php3?action=add","|");
makenavoption("Modify","profilefield.php3?action=modify");
makenavselect("User Profile Fields");
// ***
makenavoption("Add","usergroup.php3?action=add","|");
makenavoption("Modify","usergroup.php3?action=modify","<
br>");
makenavoption("Forum Permissions","forumpermission.php3?action=modif
y");
makenavselect("User Groups","<hr>");
// *************************************************
makenavoption("Add","avatar.php3?action=add","|");
makenavoption("Modify","avatar.php3?action=modify","|");
makenavoption("Upload","avatar.php3?action=upload");
makenavselect("Avatars");
// ***
makenavoption("Add","icon.php3?action=add","|");
makenavoption("Modify","icon.php3?action=modify","|");
makenavoption("Upload","icon.php3?action=upload");
makenavselect("Post Icons");
// ***
makenavoption("Add","smilie.php3?action=add","|");
makenavoption("Modify","smilie.php3?action=modify","|");
makenavoption("Upload","smilie.php3?action=upload");
makenavselect("Smilies");
// ***
makenavoption("Add","bbcode.php3?action=add","|");
makenavoption("Modify","bbcode.php3?action=modify");
makenavselect("Custom vB Codes","<hr>");
// *************************************************
makenavoption("Back-up Database","backup.php3?action=choose",
4;<br>");
makenavoption("BB Import Systems","bbimport.php3?action=","&
#60;br>");
makenavoption("Update Counters","misc.php3?action=chooser");
makenavselect("Import & Maintenance");
// ***
makenavoption("Statistics","stats.php3?action=index","&
#60;br>");
makenavoption("Admin Log","adminlog.php3?action=choose");
makenavselect("Statistics & Logs","<hr>",$df);
// *************************************************
makenavoption("Add Style","style.php3?action=add","|");
makenavoption("Modify","style.php3?action=modify","<br
62;");
makenavoption("Download/Upload","style.php3?action=download");
makenavselect("Styles");
// ***
makenavoption("Add","replacement.php3?action=add","|");
makenavoption("Modify","replacement.php3?action=modify","|
34;);
makenavoption("Add Set","replacement.php3?action=addset");
makenavselect("Replacements");
// ***
makenavoption("Add","template.php3?action=add","|");
makenavoption("Modify","template.php3?action=modify","|"
);
makenavoption("Search","template.php3?action=search","<b
r>");
makenavoption("Add Template Set","template.php3?action=addset");
if ($debug==1) {
makenavoption("Download Set","template.php3?action=downloadset"
,"<br>");
makenavoption("Upload Set","template.php3?action=uploadset",
4;<br>");
makenavoption("Do <img> Tags","template.php3?action=imgtags
");
}
makenavselect("Templates","<hr>");
// *************************************************
?>
</table>
</form></BODY></HTML>
<?php
}
?>