add this code on ur shoutbox
this code u add for ur inbox
and this code u can add all over ur forum menus
block.php
core.php
mcppl.php
mccpl.php?action=user
mccpl.php?action=block
sql
ibwf_users
Code:
if(!isshoutblocked($uid)){ if($showshout[0]=="1"){ getshouts($sid); } }
Code:
if(!isinboxblocked($uid)){ echo " <a href=\"inbox.php?action=main&sid=$sid\" accesskey=\"1\">Inbox($umsg/$allmsg)</a><br/>"; echo "<a href=\"inbox.php?action=mmsdisp&sid=$sid\">MMS$inda</a><br/>"; }
Code:
if(!isforumblocked($uid)){ }
Code:
<?php /////////////////script load time $time = microtime(); $time = explode(" ", $time); $time = $time[1] + $time[0]; $start = $time; //////////////////Includes include("config.php"); include("core.php"); /////////////////Page headers //header("Content-type: text/vnd.wap.wml"); //header("Cache-Control: no-store, no-cache, must-revalidate"); 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> <title>MoBileZonez</title> <meta http-equiv="Cache-Control" content="no-cache" /> <meta http-equiv="Cache-Control" content="must-revalidate" /> <meta name="description" content="mobilezonez Interactive Wap Portal, lots of content." /> <meta name="keywords" content="free, ringtones, download, mp3, tones, nokia, wap portal,chat, themes, games" /> <link rel="shortcut icon" href="images/favicon.ico" /> <?php $bcon = connectdb(); $sid = $_GET['sid']; echo gettheme($sid); ?> </head> <body> <?php echo "<font size=\"".getfontsize($sid)."\">"; ///////////////All the GETs////// $page = $_GET['page']; $who = $_GET['who']; $action = $_GET['action']; $uid = getuid_sid($sid); //////////////DB connection failed if (!$bcon){ echo "<p align=\"center\"> ERROR! Couldn't connect to database!<br/><br/> Sorry for the interruption! Please try <a href=\"index.php?action=main&sid=$sid\">refresh</a>ing this page and if it doesn't work then try after sometime.<br/><br/> <b>Thanks,<br/>With regards,<br/>$sitename Team!</b> </p> </font></body> </html>"; exit(); } cleardata(); /////////////Session not legal?? if(($action != "") && ($action!="terms")){ if((islogged($sid)==false)||($uid==0)){ boxstart("Error!"); echo "<center><img src=\"images/notok.gif\" alt=\"\"/>You are not logged in<br/>"; echo "or your session has expired.<br/><br/>"; echo " <form action=\"login.php\" method=\"get\"> <img src=\"images/user.gif\" alt=\"\"/>Enter username:<br/> <input id=\"inputText\" name=\"loguid\" maxlength=\"30\"/><br/> <img src=\"images/pass.gif\" alt=\"\"/>Enter password:<br/> <input id=\"inputText\" type=\"password\" format=\"*x\" name=\"logpwd\" maxlength=\"30\"/><br/> <input id=\"inputButton\" type=\"submit\" value=\"Login\"/><br/> </form> <br/><br/><img src=\"images/register.gif\" alt=\"\"/><a href=\"register.php\">Register</a> <br/><img src=\"images/home.gif\" alt=\"\"/><a href=\"index.php\">Home</a> </center>"; boxend(); echo "</font></body></html>"; exit(); } } //////////////////User Banned? if(isbanned($uid)){ boxstart("Error!"); echo "<img src=\"images/notok.gif\" alt=\"\"/><center>"; echo "You are presently banned!<br/><br/>"; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Time to finish your penalty: $rmsg<br/><br/>"; echo "</center>"; boxend(); echo "</font></body>"; echo "</html>"; exit(); } $stitle = htmlspecialchars(getstitle()); $sdomain = htmlspecialchars(getsdomain()); $date = htmlspecialchars(getdate2()); ///////////////////////////////////////Unblock inbox if($action=="openinbox"){ $who = $_GET["who"]; echo "<p align=\"center\">"; $res = mysql_query("UPDATE ibwf_users SET inboxb='0' WHERE id='".$who."'"); $res1 = mysql_query("DELETE FROM ibwf_penalties WHERE penalty='2' AND uid='".$who."'"); if($res){ $unick = getnick_uid($who); mysql_query("INSERT INTO ibwf_mlog SET action='penalties', details='<b>".getnick_uid(getuid_sid($sid))."</b> unblocked the user <b>".$unick."</b> inbox', actdt='".time()."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick inbox unblocked"; }else{ echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error"; } echo "<br/></p>"; getfooter($sid); } ///////////////////////////////////////Unblock forum else if($action=="openforum"){ $who = $_GET["who"]; echo "<p align=\"center\">"; $res = mysql_query("UPDATE ibwf_users SET forumb='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> unblocked the user <b>".$unick."</b> forum access', actdt='".time()."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick forum unblocked"; }else{ echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error"; } echo "<br/><p/>"; getfooter($sid); } ///////////////////////////////////////Unblock Shoutbox else if($action=="openshout"){ $who = $_GET["who"]; echo "<p align=\"center\">"; $res = mysql_query("UPDATE ibwf_users SET shoutb='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> unblocked the user <b>".$unick."</b> shoutbox', actdt='".time()."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick Shoutbox unblocked"; }else{ echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error"; } echo "<br/></p>"; getfooter($sid); } /////////////////////////////////////////////////////////////////Block ///////////////////////////////////////Block inbox else if($action=="blockinbox"){ $who = $_GET["who"]; echo "<p align=\"center\">"; $res = mysql_query("UPDATE ibwf_users SET inboxb='1' WHERE id='".$who."'"); $res1 = mysql_query("DELETE FROM ibwf_penalties WHERE penalty='2' AND uid='".$who."'"); if($res){ $unick = getnick_uid($who); mysql_query("INSERT INTO ibwf_mlog SET action='penalties', details='<b>".getnick_uid(getuid_sid($sid))."</b> unblocked the user <b>".$unick."</b> inbox', actdt='".time()."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick inbox unblocked"; }else{ echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error"; } echo "<br/></p>"; getfooter($sid); } ///////////////////////////////////////Block forum else if($action=="blockforum"){ $who = $_GET["who"]; echo "<p align=\"center\">"; $res = mysql_query("UPDATE ibwf_users SET forumb='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> unblocked the user <b>".$unick."</b> forum access', actdt='".time()."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick forum unblocked"; }else{ echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error"; } echo "<br/><p/>"; getfooter($sid); } ///////////////////////////////////////Block Shoutbox else if($action=="blockshout"){ $who = $_GET["who"]; echo "<p align=\"center\">"; $res = mysql_query("UPDATE ibwf_users SET shoutb='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> unblocked the user <b>".$unick."</b> shoutbox', actdt='".time()."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick Shoutbox unblocked"; }else{ echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error"; } echo "<br/></p>"; getfooter($sid); } echo "<div class=\"footer\"><small><center>"; echo "</small></div>"; ?> </font></body> </html>
Code:
function isforumblocked($uid){ $not = mysql_fetch_array(mysql_query("SELECT forumb FROM ibwf_users WHERE id='".$uid."'")); if($not[0]==1){ return true; }else{ return false; } } function isshoutblocked($uid){ $not = mysql_fetch_array(mysql_query("SELECT shoutb FROM ibwf_users WHERE id='".$uid."'")); if($not[0]==1){ return true; }else{ return false; } }function isinboxblocked($uid){ $not = mysql_fetch_array(mysql_query("SELECT inboxb FROM ibwf_users WHERE id='".$uid."'")); if($not[0]==1){ return true; }else{ return false; } }
mccpl.php?action=user
Code:
echo "<a href=\"mcppl.php?action=block&sid=$sid&who=$who\">»Block Items</a><br/>"; if(isshoutblocked($who)){ echo "<a href=\"block.php?action=openshout&sid=$sid&who=$who\">»Unblock Shoutbox</a><br/>"; } if(isforumblocked($who)){ echo "<a href=\"block.php?action=openforum&sid=$sid&who=$who\">»Unblock Forum Access</a><br/>"; } if(isinboxblocked($who)){ echo "<a href=\"block.php?action=openinbox&sid=$sid&who=$who\">»Unblock Inbox</a><br/>"; }
Code:
//////////////////////////////////////Block Options else if($action=="block") { $who = $_GET["who"]; echo "<card id=\"main\" title=\"Mod CP\">"; echo "<p align=\"center\">"; echo "<a href=\"block.php?action=blockshout&sid=$sid&who=$who\">»Block Shoutbox</a><br/>"; echo "<a href=\"block.php?action=blockinbox&sid=$sid&who=$who\">»Block Inbox</a><br/>"; echo "<a href=\"block.php?action=blockforum&sid=$sid&who=$who\">»Block Forum Access</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>"; }
ibwf_users
Code:
inboxb int 1 default 0 forumb int 1 default 0 shoutb int 1 default 0
Comment