Block Shoutbox Forum And Inbox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Block Shoutbox Forum And Inbox

    add this code on ur shoutbox
    Code:
    if(!isshoutblocked($uid)){
      if($showshout[0]=="1"){
    getshouts($sid);
     }
    }
    this code u add for ur inbox
    Code:
         if(!isinboxblocked($uid)){
    echo " <a href=\"inbox.php?action=main&amp;sid=$sid\" accesskey=\"1\">Inbox($umsg/$allmsg)</a><br/>";
     echo "<a href=\"inbox.php?action=mmsdisp&amp;sid=$sid\">MMS$inda</a><br/>";
    
    }
    and this code u can add all over ur forum menus
    Code:
     if(!isforumblocked($uid)){
    
    }
    block.php
    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&amp;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>
    core.php
    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;
    
    }
    
    }
    mcppl.php
    mccpl.php?action=user
    Code:
    echo "<a href=\"mcppl.php?action=block&amp;sid=$sid&amp;who=$who\">&#187;Block Items</a><br/>";
    if(isshoutblocked($who)){
    echo "<a href=\"block.php?action=openshout&amp;sid=$sid&amp;who=$who\">&#187;Unblock Shoutbox</a><br/>";
    }
    if(isforumblocked($who)){
    echo "<a href=\"block.php?action=openforum&amp;sid=$sid&amp;who=$who\">&#187;Unblock Forum Access</a><br/>";
    }
    if(isinboxblocked($who)){
    echo "<a href=\"block.php?action=openinbox&amp;sid=$sid&amp;who=$who\">&#187;Unblock Inbox</a><br/>";
    }
    mccpl.php?action=block
    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&amp;sid=$sid&amp;who=$who\">&#187;Block Shoutbox</a><br/>";
    echo "<a href=\"block.php?action=blockinbox&amp;sid=$sid&amp;who=$who\">&#187;Block Inbox</a><br/>";
    echo "<a href=\"block.php?action=blockforum&amp;sid=$sid&amp;who=$who\">&#187;Block Forum Access</a><br/>";
       echo "</p>";
        echo "<p align=\"center\">";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
      echo "</p></card>";
    }
    sql
    ibwf_users
    Code:
    inboxb int 1  default 0
    forumb int 1 default 0
    shoutb int 1 default 0
    ________________
    Jacques
    jacques@gw-designs.co.za
    http://coding.biz.tm
    Come join and lets make it a place to learn all the noobies how to code
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

    #2
    i think this one is grate .havent try yet lets see.Thanks dude.I know you are Very helpfull to others

    Comment


      #3
      did that work for ny1 i tried it for whole day still confused not working :\


      Probably m a new Bie So i Cldnt Crack it


      if Possible CN u Make a Detailed Tut For it


      PLezZzz

      Comment


        #4
        i added it to mine a while ago . didnt use block.php did it my own way was much easier just add the bits to your tool files.
        Wapchat4u


        Topsites4u

        Comment


          #5
          it was done ages ago in the mobilezonez coding why not look at that









          Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
          Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

          Comment

          Working...
          X