Changing Perm

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

    #16
    hmmm i think both of us code is valid cause i use the card so it wont excute the other codes if the first card is trigger

    R.M.C
    ----------
    PHP Adovocate B)

    Comment


      #17
      wizard bro ur code gives this syntax error, unexpected T_ELSE in /modproc.php on line 624
      Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

      <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

      Comment


        #18
        both codes giving error
        Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

        <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

        Comment


          #19
          what does trash option do lol




          Comment


            #20
            trash take away all your credit etc..... the reason why my code is error is cos it should be
            Code:
            ibwf_users
            but i have ibws_users

            R.M.C
            ----------
            PHP Adovocate B)

            Comment


              #21
              wizard bro ur code gives this syntax error, unexpected T_ELSE in /modproc.php on line 624[/b]

              learner im positive that code works. i copied it from funmobile mod which alot of ppl use n can attest to the fact that it works. kenny u did not use if-else iteration or exit(); function so urs will show both cards if sum1 is trying to ban admin.

              Comment


                #22
                wizard bro henestly it is giving me error here it is

                Parse error: syntax error, unexpected T_ELSE in /home/public_html/wap/modproc.php on line 626

                here is my modproc codes bro
                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 "<card id=\"main\" title=\"Mod CP\">";
                  echo "<p align=\"center\">";
                
                $getulvl = mysql_fetch_array(mysql_query("SELECT perms FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
                if($getulvl[0]>0) 
                {
                echo "You cannot punish another staff member doofus!";
                }else{  
                
                  $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(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></card>";
                }
                where am i going wrong?
                Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                Comment


                  #23
                  try adding a next }at tha end

                  R.M.C
                  ----------
                  PHP Adovocate B)

                  Comment


                    #24
                    i did but it gets banned then
                    Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                    <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                    Comment


                      #25
                      <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 "<card id=\"main\"
                      title=\"Mod CP\">";

                      echo "<p
                      align=\"center\">";

                      $getulvl =
                      mysql_fetch_array(my
                      sql_query("SELECT perms
                      FROM ibwf_users WHERE
                      id=&#39;".$who."&#39;"));

                      if($getulvl[0 ]>0)

                      { echo "You cannot
                      punish another staff
                      member doofus!";

                      }else{

                      $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(trim($pres)=="")

                      { echo "<img
                      src=\"images/notok.gi
                      f\" 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_escap
                      e_string($pres)."&#39;,
                      ipadd=&#39;".$uip."&#39;,
                      browserm=&#39;".$ubr."&#39;");

                      if($res)

                      { mysql_query("UPDATE
                      ibwf_users SET
                      lastpnreas=&#39;".$pmsg[$p
                      id].":
                      ".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.gi
                      f\" alt=\"X\"/>Database
                      Error";

                      } } <-- add a next } there

                      echo "

                      <a
                      href=\"index.php?acti
                      on=main&amp;sid=$sid
                      \"><img
                      src=\"images/home.gif\"
                      alt=\"*\"/>";

                      echo "Home</a>";

                      echo "</p></card>";

                      }
                      </div>

                      R.M.C
                      ----------
                      PHP Adovocate B)

                      Comment


                        #26
                        LoL **** knows wiz lol. ///// you can stick that in the banning part of the script... not sure where it is.

                        Comment


                          #27
                          learner im positive that code works. i copied it from funmobile mod which alot of ppl use n can attest to the fact that it works. kenny u did not use if-else iteration or exit(); function so urs will show both cards if sum1 is trying to ban admin.[/b]

                          ur right, tht code works... i copied 2 my script nd it works... the only problem is tht admin cnt ban mod also....

                          which is lil iritating lol... u have 2 remove mod permision 1st and then ban
                          sigpiceeeeerrr....

                          Comment


                            #28


                            well you wouldn&#39;t be able
                            to band any staff at all to
                            solve this you would put

                            if($getulvl[0
                            ]==&#39;2&#39;)

                            { echo "you cant band a
                            admin you fool";

                            }

                            R.M.C
                            ----------
                            PHP Adovocate B)

                            Comment


                              #29
                              yay brothers it worked adding a } now its working you guys are the best ::smile::
                              Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                              <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                              Comment


                                #30
                                no prob

                                R.M.C
                                ----------
                                PHP Adovocate B)

                                Comment

                                Working...
                                X