best way to moderate user

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

    best way to moderate user

    i have put this code in "user" action in tools so that staff cant piss aound with other staffs profiles
    but it still shows the links for everything after it has displayed You can not moderate $user.

    what am i missing here . . even tried exit(); but then it wotn let me moderate any user at all .

    Code:
     
    if($uid=543)
    { 
      echo "<b><img src=\"../phpThumb/phpThumb.php?src=../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
      echo "<br/>You can not moderate $user<br/>";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
      
      }
    Wapchat4u


    Topsites4u

    #2
    Duh
    PHP Code:
    // Correct
    if($uid == 543)
    // Wrong
    if($uid 543
    also by the way, noted u use phpthumb for icons, thats a waste of resources.

    Comment


      #3
      that aint solved my problem tho lol
      Wapchat4u


      Topsites4u

      Comment


        #4
        uid is normally related to your own user id number rather than someone elses ..... so is $uid defined to anything? ..... maybe if($who==543) ?
        really depends on what value your setting to the variable $uid

        Comment


          #5
          so i presume i should use $who and if so then how do i make it so i cant moderate certain ppl. ie other staff
          Wapchat4u


          Topsites4u

          Comment


            #6
            if its lava i think its
            PHP Code:
            if(ismod($who)){
            echo 
            "<b><img src=\"../phpThumb/phpThumb.php?src=../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
              echo 
            "<br/>You can not moderate $user<br/>";
              echo 
            "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
              echo 
            "</p>";
              
              }else{
            //do mod stuff here

            Comment


              #7
              that works mate but how can i detool ppl without having to go into database lol . as i wont be able to moderate any staff at all .
              Wapchat4u


              Topsites4u

              Comment


                #8
                use:
                if(ismod($who)&&$uid!=1){

                (change 1 to your user id number)

                Comment


                  #9
                  hi mate cheers for your help . havnt been able to get back on here with server probs .dont even know how i managed to post that reply lol .anyway.
                  i havnt tried that yet but will the owner of that id number be able to moderate themselves. as the code before stops all moderation of staff meaning that mods / admin etc etc cant use the tools in there profile .
                  Wapchat4u


                  Topsites4u

                  Comment


                    #10
                    so they can staf can edit themselfs
                    if(ismod($who)&&$uid!=1&&$uid!=$who){

                    Comment


                      #11
                      if the staff start to piss around with profiles then remove there tools.

                      Comment

                      Working...
                      X