File size: 25.43Kb
<?php
include("head.php");
$sta = getstatusname($uid);
//////////////////////////////////////////////////////////////////1
if(!isstatus1(getuid_sid($sid)))
{
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
echo "You are not a $status1<br/>";
echo "<br/>";
echo "<a href=\"index.php\">Home</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
addonline(getuid_sid($sid),"Main Page","");
///////////////////////////////////////////////Mod a user 1
if($action=="user")
{
$who = $_GET["who"];
echo "<card id=\"main\" title=\"$sta CP\">";
echo "<p align=\"center\">";
$unick = getnick_uid($who);
echo "<b>Moderating $unick</b>";
echo "</p>";
echo "<p>";
echo "<a href=\"modcp.php?action=penopt&sid=$sid&who=$who\">»Penalties</a><br/>";
if(isstatus4(getuid_sid($sid))){
echo "<a href=\"modcp.php?action=plsopt&sid=$sid&who=$who\">»Plusses</a><br/><br/>";
}
if(isstatus9(getuid_sid($sid))){
echo "<a href=\"admproc.php?action=boot&sid=$sid&who=$who\">»Boot</a><br/>";
}
if(istrashed($who))
{
echo "<a href=\"modproc.php?action=untr&sid=$sid&who=$who\">»Untrash</a><br/>";
}
if(isstatus4(getuid_sid($sid))){
if(isbanned($who))
{
echo "<a href=\"modproc.php?action=unbn&sid=$sid&who=$who\">»Unban</a><br/>";
}
if(!isshield($who))
{
echo "<a href=\"modproc.php?action=shld&sid=$sid&who=$who\">»Shield</a><br/>";
}else{
echo "<a href=\"modproc.php?action=ushld&sid=$sid&who=$who\">»Unshield</a><br/>";
}
}
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
//////////////////////////////////////Penalties Options 1
else if($action=="penopt")
{
$who = $_GET["who"];
echo "<card id=\"main\" title=\"$sta CP\">";
echo "<p align=\"center\">";
$unick = getnick_uid($who);
if(isstatus3(getuid_sid($sid))){
echo "What do you want to do with $unick";
}else{
echo "Trash $unick";
}
echo "</p>";
echo "<p>";
if(isstatus5(getuid_sid($sid))){
$pen[0]="Trash";
$pen[1]="Ban";
$pen[2]="Ban Ip";
}else if(isstatus3(getuid_sid($sid))){
$pen[0]="Trash";
$pen[1]="Ban";
}
if(isstatus3(getuid_sid($sid))){
echo "Penalty: <select name=\"pid\">";
for($i=0;$i<count($pen);$i++)
{
echo "<option value=\"$i\">$pen[$i]</option>";
}
echo "</select><br/>";
}else{
echo "<input name=\"pid\" type=\"hidden\" value=\"0\"/>";
}
echo "Reason: <input name=\"pres\" maxlength=\"100\"/><br/>";
if(isstatus4(getuid_sid($sid))){
echo "Days: <input name=\"pds\" format=\"*N\" maxlength=\"4\"/><br/>";
echo "Hours: <input name=\"phr\" format=\"*N\" maxlength=\"4\"/><br/>";
}else{
echo "Hours: <input name=\"phr\" format=\"*N\" maxlength=\"2\"/><br/>";
}
echo "Minutes: <input name=\"pmn\" format=\"*N\" maxlength=\"2\"/><br/>";
echo "Seconds: <input name=\"psc\" format=\"*N\" maxlength=\"2\"/><br/>";
echo "<anchor>PUNISH";
echo "<go href=\"modproc.php?action=pun&sid=$sid\" method=\"post\">";
echo "<postfield name=\"who\" value=\"$who\"/>";
echo "<postfield name=\"pid\" value=\"$(pid)\"/>";
echo "<postfield name=\"pres\" value=\"$(pres)\"/>";
echo "<postfield name=\"pds\" value=\"$(pds)\"/>";
echo "<postfield name=\"phr\" value=\"$(phr)\"/>";
echo "<postfield name=\"pmn\" value=\"$(pmn)\"/>";
echo "<postfield name=\"psc\" value=\"$(psc)\"/>";
echo "</go></anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
//////////////////////////////////////////////////////////////////4
if(!isstatus4(getuid_sid($sid)))
{
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
echo "You are not a $status4<br/>";
echo "<br/>";
echo "<a href=\"index.php\">Home</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
//////////////////////////////////////Plus Options 4
if($action=="plsopt")
{
$who = $_GET["who"];
echo "<card id=\"main\" title=\"$sta CP\">";
echo "<p align=\"center\">";
$unick = getnick_uid($who);
$xnick = getnick_sid($sid);
$plu = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_staff WHERE uid='".getuid_sid($sid)."'"));
echo "Add/Substract $unick's Plusses<br/>";
echo "You Have $plu[0] Plusses To give Away Untill The Start Of Next Month!<br/>";
echo "</p>";
echo "<p>";
$pen[0]="Substract";
$pen[1]="Add";
if($xnick==$unick){
echo "Action: <select name=\"pid\">";
for($i=0;$i<count($pen);$i++)
{
echo "<option value=\"$i\">$pen[$i]</option>";
}
echo "</select><br/>";
echo "Reason: <input name=\"pres\" maxlength=\"100\"/><br/>";
echo "Plusses: <input name=\"pval\" format=\"*N\" maxlength=\"2\"/><br/>";
echo "<anchor>Update";
echo "<go href=\"modproc.php?action=modpls&sid=$sid\" method=\"post\">";
echo "<postfield name=\"who\" value=\"$who\"/>";
echo "<postfield name=\"pres\" value=\"$(pres)\"/>";
echo "<postfield name=\"pval\" value=\"$(pval)\"/>";
echo "<postfield name=\"pid\" value=\"$(pid)\"/>";
echo "</go></anchor>";
}else{
echo "Action: <select name=\"pid\">";
for($i=0;$i<count($pen);$i++)
{
echo "<option value=\"$i\">$pen[$i]</option>";
}
echo "</select><br/>";
echo "Reason: <input name=\"pres\" maxlength=\"100\"/><br/>";
echo "Plusses: <input name=\"pval\" format=\"*N\" maxlength=\"3\"/><br/>";
echo "<anchor>Update";
echo "<go href=\"modproc.php?action=pls&sid=$sid\" method=\"post\">";
echo "<postfield name=\"who\" value=\"$who\"/>";
echo "<postfield name=\"pres\" value=\"$(pres)\"/>";
echo "<postfield name=\"pval\" value=\"$(pval)\"/>";
echo "<postfield name=\"pid\" value=\"$(pid)\"/>";
echo "</go></anchor>";
}
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
//////////////////////////////////////////////////////////////////5
if(!isstatus5(getuid_sid($sid)))
{
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
echo "You are not a $status5<br/>";
echo "<br/>";
echo "<a href=\"index.php\">Home</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
if($action=="main")
{
echo "<card id=\"main\" title=\"Mod CP\">";
echo "<p align=\"center\">";
echo "<b>Reports</b>";
echo "</p>";
echo "<p>";
if(isstatus7(getuid_sid($sid)))
{
$nrpm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE reported='1'"));
echo "<a href=\"modcp.php?action=rpm&sid=$sid\">»Pr. Messages [$nrpm[0]]</a><br/>";
}
$nrps = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE reported='1'"));
echo "<a href=\"modcp.php?action=rps&sid=$sid\">»Posts [$nrps[0]]</a><br/>";
$nrtp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE reported='1'"));
echo "<a href=\"modcp.php?action=rtp&sid=$sid\">»Topics [$nrtp[0]]</a><br/>";
echo "<a href=\"/xhtml/modcp.php?action=addsml&sid=$sid\">»Add Mod Smileys</a>";
if(canreg())
{
echo "<br/><a href=\"modproc.php?action=regoff&sid=$sid\">»Turn Registration Off</a><br/>(Only Turn Off If You Are Having Trouble With Idiots That Keep Registering)<br/>";
}else{
echo "<br/><a href=\"modproc.php?action=regon&sid=$sid\">»Turn Registration On</a><br/>";
}
echo "</p>";
if(isstatus10(getuid_sid($sid)))
{
echo "<p align=\"center\">";
echo "<b>Logs</b>";
echo "</p>";
echo "<p>";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_mlog"));
if($noi[0]>0){
$nola = mysql_query("SELECT DISTINCT (action) FROM ibwf_mlog ORDER BY actdt DESC");
while($act=mysql_fetch_array($nola))
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_mlog WHERE action='".$act[0]."'"));
echo "<a href=\"modcp.php?action=log&sid=$sid&view=$act[0]\">$act[0] [$noi[0]]</a><br/>";
}
}
echo "</p>";
}
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=viewfrm&fid=50&sid=$sid\">Admin/Mods Forum</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
/////////////////////////////////Reported Posts
else if($action=="rps")
{
$page = $_GET["page"];
echo "<card id=\"main\" title=\"$sta CP\">";
echo "<p align=\"center\">";
echo "<b>Reported Posts</b>";
echo "</p>";
echo "<p>";
echo "<small>";
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE reported ='1'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT id, text, tid, uid, dtpost FROM ibwf_posts WHERE reported='1' ORDER BY dtpost DESC LIMIT $limit_start, $items_per_page";
$items = mysql_query($sql);
while ($item=mysql_fetch_array($items))
{
$poster = getnick_uid($item[3]);
$tname = htmlspecialchars(gettname($item[3]));
$dtop = date("d m y - H:i:s", $item[4]);
$text = parsemsg($item[1]);
$flk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$poster</a>";
$tlk = "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$item[2]\">$tname</a>";
echo "Poster: $flk<br/>In: $tlk<br/>Time: $dtop<br/>";
echo $text;
echo "<br/>";
echo "<a href=\"modproc.php?action=hps&sid=$sid&pid=$item[0]\">Handle</a><br/><br/>";
}
echo "</small>";
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"modcp.php?action=$action&page=$ppage&sid=$sid\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"modcp.php?action=$action&page=$npage&sid=$sid\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump To Page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"modcp.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "<br/><br/>";
echo "<a href=\"modcp.php?action=main&sid=$sid\">";
echo "$sta R/L</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
/////////////////////////////////log
else if($action=="log")
{
$page = $_GET["page"];
$view = $_GET["view"];
echo "<card id=\"main\" title=\"$sta CP\">";
echo "<p align=\"center\">";
if(isstatus10(getuid_sid($sid)))
{
echo "<b>$view</b>";
echo "</p>";
echo "<p>";
echo "<small>";
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_mlog WHERE action='".$view."'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT actdt, details FROM ibwf_mlog WHERE action='".$view."' ORDER BY actdt DESC LIMIT $limit_start, $items_per_page";
$items = mysql_query($sql);
while ($item=mysql_fetch_array($items))
{
echo "Time: ".date("d m y-H:i:s", $item[0])."<br/>";
echo $item[1];
echo "<br/>";
}
echo "</small>";
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"modcp.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"modcp.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump To Page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"modcp.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "<br/><br/>";
echo "<a href=\"modcp.php?action=main&sid=$sid\">";
echo "$sta R/L</a><br/>";
}else{
echo "Timed Out";
mysql_query("UPDATE ibwf_users SET gold='0', plusses='0', gplus='0', battlep='0' WHERE id='".$uid."'");
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
/////////////////////////////////Reported Topics
else if($action=="rtp")
{
$page = $_GET["page"];
echo "<card id=\"main\" title=\"$sta CP\">";
echo "<p align=\"center\">";
echo "<b>Reported Topics</b>";
echo "</p>";
echo "<p>";
echo "<small>";
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE reported ='1'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT id, name, text, authorid, crdate FROM ibwf_topics WHERE reported='1' ORDER BY crdate DESC LIMIT $limit_start, $items_per_page";
$items = mysql_query($sql);
while ($item=mysql_fetch_array($items))
{
$poster = getnick_uid($item[3]);
$tname = htmlspecialchars($item[1]);
$dtop = date("d m y - H:i:s", $item[4]);
$text = parsemsg($item[2]);
$flk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$poster</a>";
$tlk = "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$item[0]\">$tname</a>";
echo "Poster: $flk<br/>In: $tlk<br/>Time: $dtop<br/>";
echo $text;
echo "<br/>";
echo "<a href=\"modproc.php?action=htp&sid=$sid&tid=$item[0]\">Handle</a><br/><br/>";
}
echo "</small>";
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"modcp.php?action=$action&page=$ppage&sid=$sid\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"modcp.php?action=$action&page=$npage&sid=$sid\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump To Page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"modcp.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "<br/><br/>";
echo "<a href=\"modcp.php?action=main&sid=$sid\">";
echo "$sta R/L</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
////////////////////////////////////////////add quiz words
else if($action=="addquiz")
{
echo "<card id=\"main\" title=\"Add Quiz Words\">";
echo "<p align=\"center\">";
$qnick = getnick_sid($sid);
echo "<b>Add Quiz Question</b><br/><br/>";
echo "Recieve 2 Game points for every question added!<br/>";
echo "<small>Please Make Sure answers are spelt correctly!<br/>Answers Can be 2 or more words if required. Eg: <br/>Who is minnie mouses boyfriend?<br/>mickey mouse<br/>Please Pick 10 points for easy questions and 20 points for harder questions.</small><br/>";
if(isting(getuid_sid($sid))){
echo "Question:<input name=\"question\" maxlength=\"250\"/><br/>";
echo "Answer:<input name=\"answer\" maxlength=\"50\"/><br/>";
echo "(Ting please use small letters only and no symbols)<br/> ";
echo "Points:<select name=\"points\">";
echo "<option value=\"10\">10</option>";
echo "<option value=\"20\">20</option>";
echo "</select><br/>";
echo "<anchor>Add";
echo "<go href=\"modproc.php?action=addquiz&sid=$sid\" method=\"post\">";
echo "<postfield name=\"question\" value=\"$(question)\"/>";
echo "<postfield name=\"answer\" value=\"$(answer)\"/>";
echo "<postfield name=\"points\" value=\"$(points)\"/>";
echo "<postfield name=\"qnick\" value=\"$qnick\"/>";
echo "</go></anchor>";
}else{
echo "Question:<input name=\"question\" maxlength=\"250\"/><br/>";
echo "Answer:<input name=\"answer\" format=\"*x\" maxlength=\"50\"/><br/>";
echo "Points:<select name=\"points\">";
echo "<option value=\"10\">10</option>";
echo "<option value=\"20\">20</option>";
echo "</select><br/>";
echo "<anchor>Add";
echo "<go href=\"modproc.php?action=addquiz&sid=$sid\" method=\"post\">";
echo "<postfield name=\"question\" value=\"$(question)\"/>";
echo "<postfield name=\"answer\" value=\"$(answer)\"/>";
echo "<postfield name=\"points\" value=\"$(points)\"/>";
echo "<postfield name=\"qnick\" value=\"$qnick\"/>";
echo "</go></anchor>";
}
echo "<br/><br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
////////////////////////////////////////////edit quiz
else if($action=="editquiz")
{
echo "<card id=\"main\" title=\"Edit Quiz\">";
$smid = $_GET["smid"];
echo "<onevent type=\"onenterforward\">";
$question = mysql_fetch_array(mysql_query("SELECT question FROM quizuser WHERE id='".$smid."'"));
$answer = mysql_fetch_array(mysql_query("SELECT answer FROM quizuser WHERE id='".$smid."'"));
$points = mysql_fetch_array(mysql_query("SELECT points FROM quizuser WHERE id='".$smid."'"));
echo "<refresh>
<setvar name=\"question\" value=\"$question[0]\"/>
<setvar name=\"answer\" value=\"$answer[0]\"/>
<setvar name=\"points\" value=\"$points[0]\"/>";
echo "</refresh></onevent>";
echo "<p>";
echo "Question: <input name=\"question\" maxlength=\"250\"/><br/>";
echo "Answer: <input name=\"answer\" format=\"*x\" maxlength=\"50\"/><br/>";
echo "Points: <select name=\"points\" value=\"$points[0]\">";
echo "<option value=\"10\">10</option>";
echo "<option value=\"20\">20</option>";
echo "</select><br/>";
echo "<anchor>Update";
echo "<go href=\"modproc.php?action=editquiz&sid=$sid&smid=$smid\" method=\"post\">";
echo "<postfield name=\"question\" value=\"$(question)\"/>";
echo "<postfield name=\"answer\" value=\"$(answer)\"/>";
echo "<postfield name=\"points\" value=\"$(points)\"/>";
echo "</go></anchor>";
echo "<br/><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"lists.php?action=vquiz&sid=$sid\">";
echo "Quiz Questions</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
///////////////////////////add smiley
else if($action=="addsml")
{
echo "<card id=\"main\" title=\"$sta CP\">";
echo "<p align=\"center\">";
echo "<b>Add Smilies</b><br/><br/>";
echo "Upload your Smileys <a href=\"/xhtml/topics/index.php?action=tup&sid=$sid&fid=50&tid=1901\">Here</a><br/>";
echo "To Add A Smiley Type What You Want The Smiley To Be Called In The Smiley Code Box<br/>eg: happy<br/>";
echo "And In The Pic Name Type The Name Of The Pic You Uploaded Into The Pic Name Box<br/>eg: happy12.gif<br/><br/>Dont Worrie If You Make A Mistake You Can Delete Them In The Mod Smiley List<br/><br/>";
echo "Smiley Code:<input name=\"smlcde\" maxlength=\"30\"/><br/>";
echo "Pic Name:<input name=\"smlsrc\" maxlength=\"200\"/><br/>";
echo "<anchor>Add";
echo "<go href=\"modproc.php?action=addsml&sid=$sid\" method=\"post\">";
echo "<postfield name=\"smlcde\" value=\"$(smlcde)\"/>";
echo "<postfield name=\"smlsrc\" value=\"$(smlsrc)\"/>";
echo "</go></anchor>";
echo "<br/><br/><a href=\"modcp.php?action=main&sid=$sid\">$sta CP</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
/////////////////////////////////Reported PMs
else if($action=="rpm")
{
$page = $_GET["page"];
echo "<card id=\"main\" title=\"$sta CP\">";
echo "<p align=\"center\">";
if(isstatus7(getuid_sid($sid)))
{
echo "<b>DONT HANDLE REPORTED PMS WITH SPAM!!!</b><br/>";
echo "<b>Admins need to see any pms with spam so we can block the site, if you see any pms with spam check the link, if its a link to another chat site ip ban the user but dont handle the pm</b>";
echo "</p>";
echo "<p>";
echo "<small>";
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE reported ='1'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT id, text, byuid, touid, timesent FROM ibwf_private WHERE reported='1' ORDER BY timesent DESC LIMIT $limit_start, $items_per_page";
$items = mysql_query($sql);
while ($item=mysql_fetch_array($items))
{
$fromnk = getnick_uid($item[2]);
$tonick = getnick_uid($item[3]);
$dtop = date("d m y - H:i:s", $item[4]);
$text = parsepm($item[1]);
$flk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[2]\">$fromnk</a>";
$tlk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$tonick</a>";
echo "From: $flk To: $tlk<br/>Time: $dtop<br/>";
echo $text;
echo "<br/>";
echo "<a href=\"modproc.php?action=hpm&sid=$sid&pid=$item[0]\">Handle</a><br/><br/>";
}
echo "</small>";
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"modcp.php?action=$action&page=$ppage&sid=$sid\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"modcp.php?action=$action&page=$npage&sid=$sid\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump To Page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"modcp.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "<br/><br/>";
echo "<a href=\"modcp.php?action=main&sid=$sid\">";
echo "$sta R/L</a><br/>";
}else{
echo "Timed Out";
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
else{
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
echo "I don't know how you got in here, but there's nothing to show<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
mysql_query("INSERT INTO ibwf_mlog SET action='hacks', details='<b>".getnick_uid(getuid_sid($sid))."</b> Attempted To Hack Modcp', actdt='".time()."'");
echo "</p></card>";
}
?>
</wml>