Modcp Edit

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

    Modcp Edit

    Pls all wap masters and code master

    I already have modcp and modproc.php including hack proof script. But i want scipt by that any moderator cant ban,trash or ip ban admin. They can ban or other penalties to user except admin. To grow up site i need good mods as i had already appointed. They are good but i need this arrangement so they cant ban admins .i do script in modproc.php but it not worked

    Check pls<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="pun")
    {
    $pid = $_POST["pid"];
    $who = $_POST["who"];
    $pres = $_POST["pres"];
    $pds = $_POST["pds"];
    $phr = $_POST["phr"];
    $pmn = $_POST["pmn"];
    $psc = $_POST["psc"];
    echo "<p align=\"center\">";

    $uip = "";
    $ubr = "";
    $pmsg[0]="Trashed";
    $pmsg[1]="Banned";
    $pmsg[2]="IP-Banned";
    if($pid==&#39;2&#39;)
    {
    //ip ban
    $uip = getip_uid($who);
    $ubr = getbr_uid($who);
    }
    if(!isadmin(getuid_sid($sid)))
    {
    $sql = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    $uip = getip_uid($who);
    $ubr = getbr_uid($who);
    echo "<img src=\"../images/notok.gif\" alt=\"X\"/>u cant ban admin";
    }else{


    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();
    $unick = getnick_uid($who);
    $res = mysql_query("INSERT INTO ibwf_penalties SET uid=&#39;".$who."&#39;, penalty=&#39;".$pid."&#39;, exid=&#39;".getuid_sid($sid)."&#39;, timeto=&#39;".$ptime."&#39;, pnreas=&#39;".mysql_escape_string($pres)."&#39;, ipadd=&#39;".$uip."&#39;, browserm=&#39;".$ubr."&#39;");
    if($res)
    {
    mysql_query("UPDATE ibwf_users SET lastpnreas=&#39;".$pmsg[$pid].": ".mysql_escape_string($pres)."&#39; WHERE id=&#39;".$who."&#39;");
    mysql_query("INSERT INTO ibwf_mlog SET action=&#39;penalties&#39;, details=&#39;".getnick_uid(getuid_sid($sid))." $pmsg[$pid] The user ".$unick." For ".$timeto." Seconds&#39;, actdt=&#39;".time()."&#39;");

    echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$unick is $pmsg[$pid] for $timeto Seconds";
    }else{
    echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
    }
    }
    echo "

    <a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "</p></body>";
    }</div>

    #2
    use this ;)
    Code:
    else if($action=="pun")
    {
    $pid = $_POST["pid"];
    $who = $_POST["who"];
    $pres = $_POST["pres"];
    $pds = $_POST["pds"];
    $phr = $_POST["phr"];
    $pmn = $_POST["pmn"];
    $psc = $_POST["psc"];
    echo "<p align=\"center\">";
    
    $uip = "";
    $ubr = "";
    $pmsg[0]="Trashed";
    $pmsg[1]="Banned";
    $pmsg[2]="IP-Banned";
    if($pid==&#39;2&#39;)
    {
    //ip ban
    $uip = getip_uid($who);
    $ubr = getbr_uid($who);
    }
    if(!isadmin($who))
    {
    $uidd = getuid_sid($sid);
    
    $ip = getip_uid($uidd);
    $br = getbr_uid($uidd);
    
    echo "<img src=\"../images/notok.gif\" alt=\"X\"/>u cant ban admin";
    
    $nick = getnick_sid($sid);
    $vrijeme = date("H:i:s d/m/Y");
    $file = "ban.txt";
    $fp = fopen($file, "a");
    $sve = "Nick:$nick \r\n Bro: $br \r\n IP: $ip \r\n Time: $vrijeme \r\n \r\n************\r\n";
    fwrite($fp,$sve);
    fclose($fp);
    
    
    }else{
    
    
    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();
    $unick = getnick_uid($who);
    $res = mysql_query("INSERT INTO ibwf_penalties SET uid=&#39;".$who."&#39;, penalty=&#39;".$pid."&#39;, exid=&#39;".getuid_sid($sid)."&#39;, timeto=&#39;".$ptime."&#39;, pnreas=&#39;".mysql_escape_string($pres)."&#39;, ipadd=&#39;".$uip."&#39;, browserm=&#39;".$ubr."&#39;");
    if($res)
    {
    mysql_query("UPDATE ibwf_users SET lastpnreas=&#39;".$pmsg[$pid].": ".mysql_escape_string($pres)."&#39; WHERE id=&#39;".$who."&#39;");
    mysql_query("INSERT INTO ibwf_mlog SET action=&#39;penalties&#39;, details=&#39;[b]".getnick_uid(getuid_sid($sid))."[/b] $pmsg[$pid] The user [b]".$unick."[/b] For ".$timeto." Seconds&#39;, actdt=&#39;".time()."&#39;");
    
    echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$unick is $pmsg[$pid] for $timeto Seconds";
    }else{
    echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
    }
    }
    echo "
    
    <a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "</p></body>";
    }

    Comment


      #3

      <div class='quotetop'>QUOTE </div>
      if(!isadmin($who))[/b]
      It will conform to ban admins

      so it will be

      Code:
      if(isadmin($who))

      Comment


        #4
        <div class='quotetop'>QUOTE (rukiya @ Oct 17 2008, 02:25 PM) <{POST_SNAPBACK}></div>
        It will conform to ban admins

        so it will be

        Code:
        if(isadmin($who))
        [/b]
        yes!
        sorry, my mistake :D it will not happend again .. haha...

        Comment


          #5
          thanks djdeny and Rukiya for very important code. Thanks again

          Comment


            #6
            <div class='quotetop'>QUOTE (friend @ Oct 17 2008, 06:43 PM) <{POST_SNAPBACK}></div>
            thanks djdeny and Rukiya for very important code. Thanks again [/b]
            this code is already in wapdesire script

            Comment


              #7
              hellow super code master RUKIYA ...pls setup me code for quiz master...he/she have just power of share plusses or delete...Thanks Sir....Also pls djdeny

              Comment


                #8
                sorry double post becoz of slow site...i dont see here option to delete this reply.

                Comment

                Working...
                X