moderate tool

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

    moderate tool

    i m trying to stop a head admin that he cannot able to moderate owner profile but i cant find out my mistake.

    anybody can fix my error. thnks...............

    PHP Code:
    else if($action=="user")
    {
      
    $who $_GET["who"];
      echo 
    "<head>";
      echo 
    "<title>Head Admin Tools</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo 
    "</head>";
      echo 
    "<body>";
      echo 
    "<p align=\"center\">";
    $uid getuid_sid($sid);
      
    $perm mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
      
    $trgtperm mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));

      if(
    $trgtperm>$perm){ 
      echo 
    "<b><img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
      echo 
    "<br/>U Cannot Moderate $user<br/>";
      echo 
    "<a href=\"index.php?action=main\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo 
    "</p>";
      }else{
      
    $unick getnick_uid($who);
      echo 
    "<b>Moderating $unick</b>";
      echo 
    "</p>";
      echo 
    "<p align=\"center\">";
      echo 
    "<a href=\"admincp.php?action=plsopt&amp;who=$who\">Plusses</a><br/>";
      
    $noi mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE validated='0' AND id='".$who."'"));
      if(
    $noi[0]==1)
    {
      echo 
    "<a href=\"headadmnproc.php?action=validate&amp;who=$who\">Validate</a><br/>";
      }
      echo 
    "<a href=\"headadmnproc.php?action=boot&amp;who=$who\">Boot</a><br/>";

      if(!
    istrashed($who))
      {
      echo 
    "<a href=\"headadmincp.php?action=trash&amp;who=$who\">Trash</a><br/>";
      }else{
      echo 
    "<a href=\"headadmnproc.php?action=untr&amp;who=$who\">Untrash</a><br/>";
      }
      if(!
    isbanned($who))
      {
      echo 
    "<a href=\"headadmincp.php?action=ban&amp;who=$who\">Ban</a><br/>";
      echo 
    "<a href=\"headadmincp.php?action=ipban&amp;who=$who\">Ip-ban</a><br/>";
      }else{
      echo 
    "<a href=\"headadmnproc.php?action=unbn&amp;who=$who\">Unban</a><br/>";
      }
      if(!
    isshield($who))
      {
      echo 
    "<a href=\"headadmnproc.php?action=shld&amp;who=$who\">Shield</a><br/>";
      }else{
      echo 
    "<a href=\"headadmnproc.php?action=ushld&amp;who=$who\">Unshield</a><br/>";
      }

      
      echo 
    "<form action=\"headadmincp.php?action=acui\" method=\"post\">";
      echo 
    "<input type=\"hidden\" name=\"unick\" value=\"$unick\"/>";
      echo 
    "<input type=\"Submit\" value=\"Edit User\" Name=\"Submit\"/></form>";

      echo 
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo 
    "</p></body>";
    }} 
    sigpic

    WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

    #2
    if($trgtperm[0]>$perm[0]){

    Comment


      #3
      Code:
      if($trgtperm['perm']>$perm['perm'])
      {
      echo 'restricted area this is log and reported';
      
      }

      Comment


        #4
        ur both code does not works.

        it still letting me go inside moderate tool in owner profile
        sigpic

        WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

        Comment


          #5
          Change ur query to this: select perm from ibwf_users where id='".$who."'

          Comment


            #6
            Datz for trgtperm

            Comment


              #7
              yeah use mine and thanatos`s posts together and it should work :P

              Comment


                #8
                thanks guys now it worked.
                sigpic

                WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

                Comment


                  #9
                  you problem is this
                  $uid = getuid_sid($sid);

                  $perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));

                  $trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".<b>$user</b>."'"));


                  it must be
                  <b>$user = getnick_uid($who);</b>
                  $trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
                  something like that mate
                  or
                  $trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$who."'"));
                  Last edited by wapmetal; 02.06.10, 14:46.
                  com site: http://vampist.net
                  download site: http://wapdloads.net
                  fb: http://www.facebook.com/pmplx

                  Comment

                  Working...
                  X