<?php
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
//header('Content-type: application/vnd.wap.xhtml+xml');
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta forua="true" http-equiv="Cache-Control" content="max-age=0"/>
<meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>
</head>
<?php
include("config.php");
include("core.php");
connectdb();
$action = $_GET["action"];
$sid = $_GET["sid"];
$sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
$sitename = $sitename[0];
$uid = getuid_sid($sid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
if(!isowner(getuid_sid($sid)))
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<b>Permission Denied!</b><br/>";
echo "<br/>Only owner can use this page...<br/>";
echo "<a href=\"index.php\">Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
$who = $_POST["who"];
$pmtou = $_POST["pmtou"];
$byuid = getuid_sid($sid);
$tm = time();
if($who=="all"){
$lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
echo "All users has been send a pm<br/>";
$pms = mysql_query("SELECT id, name FROM ibwf_users WHERE lastact>'".$tm24."'");
$tm = time();
while($pm=mysql_fetch_array($pms))
{
mysql_query("INSERT INTO ibwf_private SET text='[b]Public Anouncment:[/b][br/]".$pmtou."[br/][i]This message was sent to all the members[/i]', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'");
}
}else if($who=="staff"){
$lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
echo "All users has been send a pm<br/>";
$pms = mysql_query("SELECT id, name FROM ibwf_users WHERE perm>0");
$tm = time();
while($pm=mysql_fetch_array($pms))
{
mysql_query("INSERT INTO ibwf_private SET text='[b]Public Anouncment:[/b][br/]".$pmtou."[br/][i]This message was sent to all staff[/i]', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'");
}
}
if(islogged($sid)==false)
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "You are not logged in<br/>";
echo "Or Your session has been expired<br/><br/>";
echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
addonline(getuid_sid($sid),"Owner Tools","");
//////////////////////////general settings//////////////////////////
if($action=="general")
{
$sitename = $_POST["sitename"];
$xtm = $_POST["sesp"];
$fmsg = $_POST["fmsg"];
$areg = $_POST["areg"];
$vldtn = $_POST["vldtn"];
$pmaf = $_POST["pmaf"];
$fvw = $_POST["fvw"];
if($areg=="d")
{
$arv = 0;
}else{
$arv = 1;
}
if($vldtn=="d")
{
$valid = 0;
}else{
$valid = 1;
}
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$res = mysql_query("UPDATE ibwf_settings SET value='".$sitename."' WHERE name='sitename'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Site Name updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Updating Site Name<br/>";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$fmsg."' WHERE name='4ummsg'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Forum Message updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Updating Forum message<br/>";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$xtm."' WHERE name='sesxp'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Session Period updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Updating Session Period<br/>";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$pmaf."' WHERE name='pmaf'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>PM antiflood is $pmaf seconds<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Updating PM antiflood value<br/>";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$arv."' WHERE name='reg'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Registration updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Updating Registration<br/>";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$fvw."' WHERE name='fview'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Forums View updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Updating Forums View<br/>";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$valid."' WHERE name='vldtn'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Validation updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Updating Validation<br/>";
}
echo "<br/>";
echo "<b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=general&sid=$sid\">Edit general settings</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
else if($action=="validate")
{
$who = $_GET["who"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$res = mysql_query("Update ibwf_users SET validated='1' WHERE id='".$who."'");
if($res)
{
mysql_query("INSERT INTO ibwf_mlog SET action='validation', details='<b>".getnick_uid(getuid_sid($sid))."</b> validated $user', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$user validated successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error validating $user";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&who=$who&sid=$sid\">$user's Profile</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////clear shops//////////////////////////
else if($action=="delshop")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
echo "Are you sure you want to delete shops?";
echo "<br/><a href=\"ownrproc.php?action=delshop1&sid=$sid\">YES Delete</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">NO Main Menu</a>";
echo "</p></body>";
}
else if($action=="delshop1")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_private3 WHERE unread='1'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>All shop requests deleted";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error!";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=clrdta&sid=$sid\">Clear Data</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\"
alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\"
alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////boot user//////////////////////////
else if($action=="boot")
{
$who = $_GET["who"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
if($trgtperm>$perm){
echo "<b><img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Boot $user<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}else{
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_ses WHERE uid='".$who."'");
if($res)
{
mysql_query("INSERT INTO ibwf_mlog SET action='boot', details='<b>".getnick_uid(getuid_sid($sid))."</b> booted $user', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$user Booted successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error booting $user";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&who=$who&sid=$sid\">$user's Profile</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}
echo "</body>";
}
//////////////////////////trash user//////////////////////////
else if($action=="trash")
{
$who = $_POST["who"];
$pds = $_POST["pds"];
$phr = $_POST["phr"];
$pmn = $_POST["pmn"];
$psc = $_POST["psc"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
if($trgtperm>$perm){
echo "<b><img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Trash $user<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}else{
echo "<br/>";
$timeto = $pds*24*60*60;
$timeto += $phr*60*60;
$timeto += $pmn*60;
$timeto += $psc;
$ptime = $timeto + time();
$res = mysql_query("INSERT INTO ibwf_penalties SET uid='".$who."', penalty='0', exid='".getuid_sid($sid)."', timeto='".$ptime."', pnreas='', ipadd='', browserm=''");
if($res)
{
mysql_query("INSERT INTO ibwf_mlog SET action='trash', details='<b>".getnick_uid(getuid_sid($sid))."</b> Trashed The user <b>".$user."</b> For ".gettimemsg($timeto)."', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$user trashed successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error trashing $user";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&who=$who&sid=$sid\">$user's Profile</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}
echo "</body>";
}
//////////////////////////ban user//////////////////////////
else if($action=="ban")
{
$who = $_POST["who"];
$pres = $_POST["pres"];
$pds = $_POST["pds"];
$phr = $_POST["phr"];
$pmn = $_POST["pmn"];
$psc = $_POST["psc"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
if($trgtperm>$perm){
echo "<b><img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Ban $user<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}else{
echo "<br/>";
if(trim($pres)=="")
{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You must Specify a reson for punishing the user";
}else{
$timeto = $pds*24*60*60;
$timeto += $phr*60*60;
$timeto += $pmn*60;
$timeto += $psc;
$ptime = $timeto + time();
$res = mysql_query("INSERT INTO ibwf_penalties SET uid='".$who."', penalty='1', exid='".getuid_sid($sid)."', timeto='".$ptime."', pnreas='".mysql_escape_string($pres)."', ipadd='', browserm=''");
if($res)
{
$pmsg[1]="Banned";
mysql_query("UPDATE ibwf_users SET lastpnreas='".$pmsg[1].": ".mysql_escape_string($pres)."' WHERE id='".$who."'");
mysql_query("INSERT INTO ibwf_mlog SET action='banned', details='<b>".getnick_uid(getuid_sid($sid))."</b> Banned The user <b>".$user."</b> For ".gettimemsg($timeto)."', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$user banned successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error banning $user";
}
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&who=$who&sid=$sid\">$user's Profile</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}
echo "</body>";
}
//////////////////////////ipban user//////////////////////////
else if($action=="ipban")
{
$who = $_POST["who"];
$pres = $_POST["pres"];
$pds = $_POST["pds"];
$phr = $_POST["phr"];
$pmn = $_POST["pmn"];
$psc = $_POST["psc"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
if($trgtperm>$perm){
echo "<b><img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Ip-ban $user<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}else{
echo "<br/>";
if(trim($pres)=="")
{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You must Specify a reson for punishing the user";
}else{
$timeto = $pds*24*60*60;
$timeto += $phr*60*60;
$timeto += $pmn*60;
$timeto += $psc;
$ptime = $timeto + time();
$uip = getip_uid($who);
$ubr = getbr_uid($who);
$res = mysql_query("INSERT INTO ibwf_penalties SET uid='".$who."', penalty='2', exid='".getuid_sid($sid)."', timeto='".$ptime."', pnreas='".mysql_escape_string($pres)."', ipadd='".$uip."', browserm='".$ubr."'");
if($res)
{
$pmsg[1]="Ip-banned";
mysql_query("UPDATE ibwf_users SET lastpnreas='".$pmsg[1].": ".mysql_escape_string($pres)."' WHERE id='".$who."'");
mysql_query("INSERT INTO ibwf_mlog SET action='ipbanned', details='<b>".getnick_uid(getuid_sid($sid))."</b> Ip-banned The user <b>".$user."</b> For ".gettimemsg($timeto)."', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$user ip-banned successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error ip-banning $user";
}
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&who=$who&sid=$sid\">$user's Profile</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}
echo "</body>";
}
//////////////////////////shield user//////////////////////////
else if($action=="shld")
{
$who = $_GET["who"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$res = mysql_query("Update ibwf_users SET shield='1' WHERE id='".$who."'");
if($res)
{
$unick = getnick_uid($who);
mysql_query("INSERT INTO ibwf_mlog SET action='penalties', details='<b>".getnick_uid(getuid_sid($sid))."</b> Shielded The user <b>".$unick."</b>', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$unick is Shielded";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&who=$who&sid=$sid\">$user's Profile</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////unshield user//////////////////////////
else if($action=="ushld")
{
$who = $_GET["who"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$res = mysql_query("Update ibwf_users SET shield='0' WHERE id='".$who."'");
if($res)
{
$unick = getnick_uid($who);
mysql_query("INSERT INTO ibwf_mlog SET action='penalties', details='<b>".getnick_uid(getuid_sid($sid))."</b> Unshielded The user <b>".$unick."</b>', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$unick is Unshielded";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&who=$who&sid=$sid\">$user's Profile</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////untrash user//////////////////////////
else if($action=="untr")
{
$who = $_GET["who"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$res = mysql_query("DELETE FROM ibwf_penalties WHERE penalty='0' AND uid='".$who."'");
if($res)
{
$unick = getnick_uid($who);
mysql_query("INSERT INTO ibwf_mlog SET action='untrashed', details='<b>".getnick_uid(getuid_sid($sid))."</b> Untrashed The user <b>".$unick."', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$unick Untrashed";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&who=$who&sid=$sid\">$user's Profile</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////unban user//////////////////////////
else if($action=="unbn")
{
$who = $_GET["who"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$res = mysql_query("DELETE FROM ibwf_penalties WHERE (penalty='1' OR penalty='2') AND uid='".$who."'");
if($res)
{
$unick = getnick_uid($who);
mysql_query("INSERT INTO ibwf_mlog SET action='unbanned', details='<b>".getnick_uid(getuid_sid($sid))."</b> Unbanned The user <b>".$unick."</b>', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$unick Unbanned";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&who=$who&sid=$sid\">$user's Profile</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////delete user//////////////////////////
else if($action=="delu")
{
$who = $_GET["who"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
if($trgtperm>$perm){
echo "<b><img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Delete $user<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}else{
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_buddies WHERE tid='".$who."' OR uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_gbook WHERE gbowner='".$who."' OR gbsigner='".$who."'");
$res = mysql_query("DELETE FROM ibwf_ignore WHERE name='".$who."' OR target='".$who."'");
$res = mysql_query("DELETE FROM ibwf_mangr WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_modr WHERE name='".$who."'");
$res = mysql_query("DELETE FROM ibwf_penalties WHERE uid='".$who."' OR exid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_posts WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_private WHERE byuid='".$who."' OR touid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_popups WHERE byuid='".$who."' OR touid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_shouts WHERE shouter='".$who."'");
$res = mysql_query("DELETE FROM ibwf_topics WHERE authorid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_brate WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_games WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_presults WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_vault WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_blogs WHERE bowner='".$who."'");
$res = mysql_query("DELETE FROM ibwf_chat WHERE chatter='".$who."'");
$res = mysql_query("DELETE FROM ibwf_chat WHERE who='".$who."'");
$res = mysql_query("DELETE FROM ibwf_chonline WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_online WHERE userid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_ses WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_xinfo WHERE uid='".$who."'");
deleteMClubs($who);
$res = mysql_query("DELETE FROM ibwf_users WHERE id='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>User deleted successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error deleting UGroup";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=chuinfo&sid=$sid\">User info</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
}
echo "</p></body>";
}
//////////////////////////plusses//////////////////////////
else if($action=="pls")
{
$pid = $_POST["pid"];
$who = $_POST["who"];
$pres = $_POST["pres"];
$pval = $_POST["pval"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$unick = getnick_uid($who);
$opl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
if($pid=='0')
{
$npl = $opl[0] - $pval;
}else{
$npl = $opl[0] + $pval;
}
if($npl<0)
{
$npl=0;
}
if(trim($pres)=="")
{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You must Specify a reson for updating $unick's Plusses";
}else{
$res = mysql_query("UPDATE ibwf_users SET lastplreas='".mysql_escape_string($pres)."', plusses='".$npl."' WHERE id='".$who."'");
if($res)
{
mysql_query("INSERT INTO ibwf_mlog SET action='plusses', details='<b>".getnick_uid(getuid_sid($sid))."</b> Updated <b>".$unick."</b> plusses from ".$opl[0]." to $npl', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$unick's Plusses Updated From $opl[0] to $npl";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
}
}
echo "<br/><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////clear reports/logs//////////////////////////
else if($action=="clrmlog")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_mlog");
echo mysql_error();
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>ModLog Cleared Successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error!";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=clrdta&sid=$sid\">Clear Data</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////clear inboxs//////////////////////////
else if($action=="delpms")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_private WHERE reported!='1' AND starred='0' AND unread='0'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>All PMS except starred, reported, and unread were deleted";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error!";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=clrdta&sid=$sid\">Clear Data</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////clear popups//////////////////////////
else if($action=="delpops")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_popups WHERE reported!='1' AND unread='0'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>All popups except reported, and unread were deleted";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error!";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=clrdta&sid=$sid\">Clear Data</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////clear shouts//////////////////////////
else if($action=="delsht")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$altm = time()-(5*24*60*60);
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_shouts WHERE shtime<'".$altm."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Shouts Older Than 5 days were deleted";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error!";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=clrdta&sid=$sid\">Clear Data</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////add site link//////////////////////////
else if($action=="addlink")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$logo = $_POST["logo"];
$url = $_POST["url"];
$title = $_POST["title"];
echo $site;
$res = mysql_query("INSERT INTO ibwf_links SET logo='".$logo."', url='".$url."', title='".$title."'");
if($res)
{
echo mysql_error();
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Site $title Added Successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Adding Link<br/>";
}
echo "<br/>";
echo "<b>8 </b><a accesskey=\"8\" href=\"linksites.php?sid=$sid\">Links</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////delete site link//////////////////////////
else if($action=="linkdel")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$link=$_GET["link"];
$sitena = mysql_query("SELECT title FROM ibwf_links WHERE url='".$link."'");
$site = mysql_fetch_array($sitena);
$site=$site[0];
$res = mysql_query("DELETE FROM ibwf_links WHERE url='".$link."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$site deleted Successfully from links<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error deleting $site<br/>";
}
echo "<br/>";
echo "<b>8 </b><a accesskey=\"8\" href=\"linksites.php?sid=$sid\">Links</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////add blocked site//////////////////////////
else if($action=="addsite")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$site = $_POST["site"];
echo $site;
$res = mysql_query("INSERT INTO ibwf_blockedsite SET site='".$site."'");
if($res)
{
echo mysql_error();
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Site $site Added Successfully to Blocked List<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Adding Site<br/>";
}
echo "<br/>";
echo "<b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=blocksites&sid=$sid\">Blocked Sites List</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////delete blocked site//////////////////////////
else if($action=="delsite")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$id=$_GET["id"];
$sitena = mysql_query("SELECT site FROM ibwf_blockedsite WHERE id='".$id."'");
$site = mysql_fetch_array($sitena);
$site=$site[0];
$res = mysql_query("DELETE FROM ibwf_blockedsite WHERE id='".$id."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Site $site Removed Successfully from Blocked List<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Removing $site <br/>";
}
echo "<br/>";
echo "<b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=blocksites&sid=$sid\">Blocked Sites List</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////add forum moderator//////////////////////////
else if($action=="addfmod")
{
$mid = $_POST["mid"];
$fid = $_POST["fid"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$res = mysql_query("INSERT INTO ibwf_modr SET name='".$mid."', forum='".$fid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Moding Privileges Added<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error<br/>";
}
echo "<br/><br/><a accesskey=\"8\" href=\"ownercp.php?action=manmods&sid=$sid\">Manage Moderators</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////delete forum moderator//////////////////////////
else if($action=="delfmod")
{
$mid = $_POST["mid"];
$fid = $_POST["fid"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$res = mysql_query("DELETE FROM ibwf_modr WHERE name='".$mid."' AND forum='".$fid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Moding Privileges Deleted<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error<br/>";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=manmods&sid=$sid\">Manage Moderators</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////add smilie//////////////////////////
else if($action=="addsml")
{
$smlcde = $_POST["smlcde"];
$smlsrc = $_POST["smlsrc"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_smilies SET scode='".$smlcde."', imgsrc='".$smlsrc."', hidden='0'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Smilie added successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error adding Smilie ";
}
echo "<br/><a href=\"../smilies/index.php?action=upload&sid=$sid\">Add Another Smilie</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////delete smilie//////////////////////////
else if($action=="delsm")
{
$smid = $_GET["smid"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_smilies WHERE id='".$smid."'");
$imgsrc = mysql_fetch_array(mysql_query("SELECT imgsrc FROM ibwf_smilies WHERE id='".$smid."'"));
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Smilie deleted successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error deleting smilie ";
}
echo "<br/><br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////add avartar//////////////////////////
else if($action=="addavt")
{
$avtsrc = $_POST["avtsrc"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "Source: ".$avtsrc;
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_avatars SET avlink='".$avtsrc."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Avatar added successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error adding Avatar ";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=addavt&sid=$sid\">Add Another Avatar</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////add judge//////////////////////////
else if($action=="addjdg")
{
$who = $_GET["who"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_judges SET uid='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Judge added successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error adding Judge ";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=chuinfo&sid=$sid\">Users Info</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////remove judge//////////////////////////
else if($action=="deljdg")
{
$who = $_GET["who"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_judges WHERE uid='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Judge deleted successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error deleting Judge ";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=chuinfo&sid=$sid\">Users Info</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////add rss//////////////////////////
else if($action=="addrss")
{
$rssnm = $_POST["rssnm"];
$rsslnk = $_POST["rsslnk"];
$rssimg = $_POST["rssimg"];
$rssdsc = $_POST["rssdsc"];
$fid = $_POST["fid"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo $rssnm;
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_rss SET title='".$rssnm."', link='".$rsslnk."', imgsrc='".$rssimg."', dscr='".$rssdsc."', fid='".$fid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Source added successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error adding RSS Source";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=manrss&sid=$sid\">Manage RSS</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////edit rss//////////////////////////
else if($action=="edtrss")
{
$rssnm = $_POST["rssnm"];
$rsslnk = $_POST["rsslnk"];
$rssimg = $_POST["rssimg"];
$rssdsc = $_POST["rssdsc"];
$fid = $_POST["fid"];
$rssid = $_POST["rssid"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo $rssnm;
echo "<br/>";
$res = mysql_query("UPDATE ibwf_rss SET title='".$rssnm."', link='".$rsslnk."', imgsrc='".$rssimg."', dscr='".$rssdsc."', fid='".$fid."' WHERE id='".$rssid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Source updated successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error updating RSS Source";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=manrss&sid=$sid\">Manage RSS</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////delete rss//////////////////////////
else if($action=="delrss")
{
$rssid = $_POST["rssid"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_rss WHERE id='".$rssid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Source deleted successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=manrss&sid=$sid\">Manage RSS</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////add permission//////////////////////////
else if($action=="addperm")
{
$fid = $_POST["fid"];
$gid = $_POST["gid"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_acc SET fid='".$fid."', gid='".$gid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Permission added successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error adding permission ";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=addperm&sid=$sid\">Add Permission</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=admincp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Admin Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////edit profile//////////////////////////
else if($action=="uprof")
{
$who = $_GET["who"];
$unick = $_POST["unick"];
$perm = $_POST["perm"];
$savat = $_POST["savat"];
$semail = $_POST["semail"];
$ubday = $_POST["ubday"];
$uloc = $_POST["uloc"];
$usig = $_POST["usig"];
$usex = $_POST["usex"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Admin Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$onk = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$who."'"));
$exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$unick."'"));
if($onk[0]!=$unick)
{
if($exs[0]>0)
{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>New nickname already exist, choose another one<br/>";
}else
{
$res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', name='".$unick."', perm='".$perm."' WHERE id='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
}
}
}else
{
$res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', name='".$unick."', perm='".$perm."' WHERE id='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
}
}
echo "<br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=chuinfo&sid=$sid\">Users Info</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////reset password//////////////////////////
else if($action=="upwd")
{
$npwd = $_POST["npwd"];
$who = $_GET["who"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
if((strlen($npwd)<4) || (strlen($npwd)>15)){
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>password should be between 4 and 15 letters only<br/>";
}else{
$pwd = md5($npwd);
$res = mysql_query("UPDATE ibwf_users SET pass='".$pwd."' WHERE id='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>password was updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Error updating password<br/>";
}
}
echo "<br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=chuinfo&sid=$sid\">Users Info</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////Delete users posts//////////////////////////
else if($action=="delxp")
{
$who = $_GET["who"];
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_posts WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_topics WHERE authorid='".$who."'");
if($res)
{
mysql_query("UPDATE ibwf_users SET plusses='0' where id='".$who."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>User Posts deleted successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error deleting UPosts";
}
echo "<br/><br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=chuinfo&sid=$sid\">User info</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
//////////////////////////error//////////////////////////
else
{
echo "<head>";
echo "<title>Admin Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
?>
</html>