Changing Perm

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

    Changing Perm

    guys how do we change prem of admin and mod like we do it on db changing it to 2 for admin and 1 for mod. so if i want to change the number where in the script or where in the db i change the admin perm number from 2 to 4?
    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>


    #2
    ok sorry i mean from database where exactly do i change the perm number?
    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


      #3
      u change it in ibwf_users were it says PERM

      Comment


        #4
        u change it in ibwf_users were it says PERM[/b]
        have a look in your core.php folder, where it says is owner change the perm number to 4 and save it

        Comment


          #5
          thanks guys and how do u put a function in rw where one admin cant bann other
          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


            #6
            i think you would do this
            Code:
            ////this is saying if the user that your banding perm is two
             
            $perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibws_users WHERE id=&#39;".$who."&#39;"));
            
            if($perm[0] ==&#39;2&#39;)
            {
            echo "DUMB ASS YOU CANT BAND ANOTHER ADMIN!";
            }
            put that code where its says user have been band i think lol figur that out cos i dont use lava lair

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

            Comment


              #7
              someone please tell me where to put this code i tried in modproc but dunno the right way to do it
              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


                #8
                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\">";
                  
                  $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>";
                }
                i think this is where i should add that right? but i did somethin is 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


                  #9
                  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"]; 
                  $perm =mysql_fetch_array(mysql_query("SELECT perm FROM ibws_users WHERE id=&#39;".$who."&#39;"));
                  
                  if($perm[0]==&#39;2&#39;)
                  {
                  echo "<card id=\"main\" 
                  title=\"Mod CP\">"; 
                  
                  echo "<p 
                  align=\"center\">"; 
                  echo "you cant band another admin ";
                  echo "</p>"."</card>";
                  }
                  echo "<card id=\"main\" 
                  title=\"Mod CP\">"; 
                  
                  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(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;[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.gi 
                  f\" alt=\"X\"/>Database 
                  Error"; 
                  
                  } } echo "
                  
                  <a 
                  href=\"index.php?acti 
                  on=main&amp;sid=$sid 
                  \"><img 
                  src=\"images/home.gif\" 
                  alt=\"*\"/>"; 
                  
                  echo "Home</a>"; 
                  
                  echo "</p></card>"; 
                  
                  }
                  try that I THINK LOL

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

                  Comment


                    #10
                    huh wtf is that???

                    Comment


                      #11
                      if the user that is banding perm is 2 if will get tha error message saying you cant band another admin hmmm maybe he could use the isadmin function eg
                      Code:
                      if(isadmin($who))
                      {
                      echo "you cant band another admin";
                      }

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

                      Comment


                        #12
                        mmhm ill copy d code i did for that.
                        Code:
                         
                        else if($action=="pun") {
                         echo "<card id=\"main\" title=\"Mod CP\">";
                         echo "<p align=\"center\">";
                        
                        $getulvl = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
                        
                        if($getulvl[0]>0) {
                        echo "You cannot punish another staff member doofus!:P";
                        }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_ses($ses)."&#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_ses($ses))."[/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;ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
                        echo "Home</a>";
                          echo "</p></card>";
                        
                        }

                        Comment


                          #13
                          hmmm mike its tha same lol only thing is i only said if there a admin they cant

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

                          Comment


                            #14
                            nope urs would give error, especially when a user does try to ban admin, it will show both pages sayin they r banned n that u cant ban them

                            Comment


                              #15
                              OH yeah your right i didn&#39;t put else
                              Code:
                              if($perm[0]==&#39;2&#39;)
                              {
                              echo "you cant band another admin idiot";
                              }
                              else
                              {
                              //punish him
                              }

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

                              Comment

                              Working...
                              X