Help Adding Previliges

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

    Help Adding Previliges

    how t0 add previliges like 0wner and headadmin..

    #2
    ....

    Originally posted by tsinelas View Post
    how t0 add previliges like 0wner and headadmin..
    hey complete wot u mean!!!!
    LOL and use search button!
    com site: http://vampist.net
    download site: http://wapdloads.net
    fb: http://www.facebook.com/pmplx

    Comment


      #3
      go to core.php

      look for

      Code:
      /////////////////////////////////////////Is admin?
      
      function isadmin($uid)
      {
        $admn = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
        if($admn[0]=='2')
        {
          return true;
        }else{
          return false;
        }
      }
      then u just add this after it or any place u wona
      Code:
      /////////////////////////////////////////Is head mod?
      
      function ishedmodr($uid)
      {
        $admn = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
        if($admn[0]=='5')
        {
          return true;
        }else{
          return false;
        }
      }
      /////////////////////////////////////////Is head admin?
      
      function ishedadm($uid)
      {
        $admn = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
        if($admn[0]=='6')
        {
          return true;
        }else{
          return false;
        }
      }
      /////////////////////////////////////////Is owner?
      
      function isowner($uid)
      {
        $ownr = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
        if($ownr[0]=='3')
        {
          return true;
        }else{
          return false;
        }
      }
      /////////////////////////////////////////Is coder?
      
      function iscoder($uid)
      {
        $ownr = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
        if($ownr[0]=='4')
        {
          return true;
        }else{
          return false;
        }
      }
      and also in core look for
      Code:
       if($ginfo[2]==2)
            {
      
              if(isadmin($uid))
              {
                  return true;
              }else{
                return false;
              }
            }
      and add this after
      Code:
      if($ginfo[2]==3)
            {
      
              if(isowner($uid))
              {
                  return true;
              }else{
                return false;
              }
            }
            if($ginfo[2]==4)
            {
      
              if(iscoder($uid))
              {
                  return true;
              }else{
                return false;
              }
            }
      	if($ginfo[2]==5)
            {
      
              if(ishedmodr($uid))
              {
                  return true;
              }else{
                return false;
              }
            }
      	if($ginfo[2]==6)
            {
      
              if(ishedadm($uid))
              {
                  return true;
              }else{
                return false;
              }
            }
      then u just add the owner head admin head mod and coder to status

      Code:
      /////////////////////////////////////////get status
      
      function getstatus($uid)
      {
        $info = mysql_fetch_array(mysql_query("SELECT perm, plusses FROM ibwf_users WHERE id='".$uid."'"));
        $shopssid = mysql_fetch_array(mysql_query("SELECT shopssid FROM ibwf_users WHERE id='".$uid."'"));
        if(isbanned($uid))
        {
          return "Banned!";
        }
      
        if($shopssid[0]=='4')
        {
          return "Ferrari Enzo!";
        }else
        if($shopssid[0]=='5')
        {
          return "Porsche Carrera!";
        }else
        if($shopssid[0]=='6')
        {
          return "Bugatti!";
        }else
        if($shopssid[0]=='7')
        {
          return "McLaren F1!";
        }else
        if($shopssid[0]=='8')
        {
          return "Jaguar XJ220!";
        }else
        if($shopssid[0]=='9')
        {
          return "Lamborghini Murcielago!";
        }else
        if($shopssid[0]=='10')
        {
          return "McLaren Mercedes SLR!";
        }else
      
      
        if($info[0]=='2')
        {
          return "Admin!";
        }else if($info[0]=='1')
        {
          return "Moderator!";
        }
      else if($info[0]=='5')
        {
          return "Head Moderator!";
        }
      else if($info[0]=='6')
        {
          return "Head Administrator!";
        }
      else if($info[0]=='3')
        {
          return "Owner!";
        }else if($info[0]=='4')
        {
          return "Coder!";
        }else{
          if($info[1]<10)
          {
            return "N00b";
          }else if($info[1]<25)
          {
              return "SpaRkl3";
          }else if($info[1]<50)
          {
              return "flaR3";
          }else if($info[1]<75)
          {
              return "flaM3";
          }else if($info[1]<250)
          {
              return "buRst";
          }else if($info[1]<500)
          {
              return "ViTa1";
          }else if($info[1]<750)
          {
              return "$stitle unplugged";
          }else if($info[1]<1000)
          {
              return "GuRu";
          }else if($info[1]<1500)
          {
              return "V.I.P";
          }else if($info[1]<2000)
          {
              return "FaNatic";
          }else if($info[1]<2500)
          {
              return "$stitle KNight";
          }else if($info[1]<3000)
          {
              return "VeteRaN";
          }else if($info[1]<4000)
          {
              return "$stitle eXpelleR";
          }else if($info[1]<5000)
          {
              return "MasteR";
          }else if($info[1]<10000)
          {
              return "ic0N";
          }else
          {
              return "$stitle Unstopable";
          }
        }
      }
      also then u need to add the code in list.php to see the other staff stats
      Code:
      //////////////////////////////////Staff
      
      else if($action=="staff")
      {
      boxstart("Staff");
          addonline(getuid_sid($sid),"Staff list","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Staff List",$pstyle);
          echo "<p align=\"center\">";
          echo "<b>Staff List</b><br/><small>";
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='3'"));
          echo "<a href=\"lists.php?action=ownr&amp;sid=$sid\">Owners($noi[0])</a><br/>";
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='4'"));
          echo "<a href=\"lists.php?action=cdrs&amp;sid=$sid\">Coders($noi[0])</a><br/>";
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='2'"));
          echo "<a href=\"lists.php?action=admns&amp;sid=$sid\">Admins($noi[0])</a><br/>";
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='1'"));
          echo "<a href=\"lists.php?action=modr&amp;sid=$sid\">Moderators($noi[0])</a><br/>";
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='6'"));
          echo "<a href=\"lists.php?action=hedadms&amp;sid=$sid\">Head Admins($noi[0])</a><br/>";
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='5'"));
          echo "<a href=\"lists.php?action=hedmodr&amp;sid=$sid\">Head Moderators($noi[0])</a></small>";
          echo "</p>";
          //////ALL LISTS SCRIPT <<
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm>'0'"));
      
          if($page=="" || $page<=0)$page=1;
          $num_items = $noi[0]; //changable
          $items_per_page= 10;
          $num_pages = ceil($num_items/$items_per_page);
          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
      
          //changable sql
      
              $sql = "SELECT id, name, perm FROM ibwf_users WHERE perm>'0' ORDER BY name LIMIT $limit_start, $items_per_page";
      
      
          echo "<p>";
          $items = mysql_query($sql);
          echo mysql_error();
          if(mysql_num_rows($items)>0)
          {
          while ($item = mysql_fetch_array($items))
          {
              if($item[2]=='1')
              {
                $tit = "Moderator!";
                $icon = "<img src=\"images/mod.gif\" alt=\"M\"/>";
              }else
              if($item[2]=='2')
              {
                $tit = "Admin!";
                $icon = "<img src=\"images/admin.gif\" alt=\"A\"/>";
              }else
              if($item[2]=='3')
              {
                $tit = "Owner!";
                $icon = "<img src=\"images/owner.gif\" alt=\"O\"/>";
              }
              if($item[2]=='5')
              {
                $tit = "Head Mod!";
                $icon = "<img src=\"images/mod.gif\" alt=\"hm\"/>";
              }
              if($item[2]=='6')
              {
                $tit = "Head Admin!";
                $icon = "<img src=\"images/admin.gif\" alt=\"ha\"/>";
              }
              if($item[2]=='4')
              {
                $tit = " Coder!";
                $icon = "<img src=\"images/admin.gif\" alt=\"C\"/>";
              }
            $lnk = "$icon <small><a href=\"index.php?action=viewuser&amp;who=$item[0]&amp;sid=$sid\">$item[1]</a>: $tit</small>";
            echo "$lnk<br/>";
          }
          }
          echo "</p>";
          echo "<p align=\"center\">";
          if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"lists.php?action=staff&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">&#171;Prev</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"lists.php?action=staff&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next&#187;</a>";
          }
          echo "<br/>$page/$num_pages<br/>";
          if($num_pages>2)
          {
            $rets = "<form action=\"lists.php\" method=\"get\">";
              $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
              $rets .= "<input type=\"submit\" value=\"GO\"/>";
              $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
              $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
      
              $rets .= "</form>";
      
              echo $rets;
          }
          echo "</p>";
        ////// UNTILL HERE >>
          echo "<p align=\"center\">";
          echo "<a href=\"index.php?action=stats&amp;sid=$sid\"><img src=\"images/stat.gif\" alt=\"*\"/>";
      echo "Site Stats</a><br/>";
          $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
          echo xhtmlfoot();
      }
      
      //////////////////////////////////Staff
      
      else if($action=="admns")
      {
      boxstart("Admins");
          addonline(getuid_sid($sid),"Admins list","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Admins List",$pstyle);
          echo "<p align=\"center\">";
          echo "<b>Admins List</b><br/>";
          echo "</p>";
          //////ALL LISTS SCRIPT <<
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='2'"));
      
          if($page=="" || $page<=0)$page=1;
          $num_items = $noi[0]; //changable
          $items_per_page= 10;
          $num_pages = ceil($num_items/$items_per_page);
          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
      
          //changable sql
      
              $sql = "SELECT id, name FROM ibwf_users WHERE perm='2' ORDER BY name LIMIT $limit_start, $items_per_page";
      
      
          echo "<p>";
          $items = mysql_query($sql);
          echo mysql_error();
          if(mysql_num_rows($items)>0)
          {
          while ($item = mysql_fetch_array($items))
          {
      
            $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[0]&amp;sid=$sid\">$item[1]</a>";
            echo "$lnk<br/>";
          }
          }
          echo "</p>";
          echo "<p align=\"center\">";
          if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"lists.php?action=admns&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">&#171;Prev</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"lists.php?action=admns&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next&#187;</a>";
          }
          echo "<br/>$page/$num_pages<br/>";
          if($num_pages>2)
          {
            $rets = "<form action=\"lists.php\" method=\"get\">";
              $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
              $rets .= "<input type=\"submit\" value=\"GO\"/>";
              $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
              $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
      
              $rets .= "</form>";
      
              echo $rets;
          }
          echo "</p>";
        ////// UNTILL HERE >>
          echo "<p align=\"center\">";
          echo "<a href=\"index.php?action=stats&amp;sid=$sid\"><img src=\"images/stat.gif\" alt=\"*\"/>";
      echo "Site Stats</a><br/>";
          $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
          echo xhtmlfoot();
      }
      //////////////////////////////////Staff
      
      else if($action=="hedmodr")
      {
      boxstart("Head Mod");
          addonline(getuid_sid($sid),"Head Mods list","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Head Mods List",$pstyle);
          echo "<p align=\"center\">";
          echo "<b>Head Mods List</b><br/>";
          echo "</p>";
          //////ALL LISTS SCRIPT <<
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='5'"));
      
          if($page=="" || $page<=0)$page=1;
          $num_items = $noi[0]; //changable
          $items_per_page= 10;
          $num_pages = ceil($num_items/$items_per_page);
          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
      
          //changable sql
      
              $sql = "SELECT id, name FROM ibwf_users WHERE perm='5' ORDER BY name LIMIT $limit_start, $items_per_page";
      
      
          echo "<p>";
          $items = mysql_query($sql);
          echo mysql_error();
          if(mysql_num_rows($items)>0)
          {
          while ($item = mysql_fetch_array($items))
          {
      
            $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[0]&amp;sid=$sid\">$item[1]</a>";
            echo "$lnk<br/>";
          }
          }
          echo "</p>";
          echo "<p align=\"center\">";
          if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"lists.php?action=admns&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">&#171;Prev</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"lists.php?action=admns&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next&#187;</a>";
          }
          echo "<br/>$page/$num_pages<br/>";
          if($num_pages>2)
          {
            $rets = "<form action=\"lists.php\" method=\"get\">";
              $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
              $rets .= "<input type=\"submit\" value=\"GO\"/>";
              $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
              $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
      
              $rets .= "</form>";
      
              echo $rets;
          }
          echo "</p>";
        ////// UNTILL HERE >>
          echo "<p align=\"center\">";
          echo "<a href=\"index.php?action=stats&amp;sid=$sid\"><img src=\"images/stat.gif\" alt=\"*\"/>";
      echo "Site Stats</a><br/>";
          $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
          echo xhtmlfoot();
      }
      //////////////////////////////////Staff
      
      else if($action=="hedadms")
      {
      boxstart("Head Admin");
          addonline(getuid_sid($sid),"Head Admins list","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Head Admins List",$pstyle);
          echo "<p align=\"center\">";
          echo "<b>Admins List</b><br/>";
          echo "</p>";
          //////ALL LISTS SCRIPT <<
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='6'"));
      
          if($page=="" || $page<=0)$page=1;
          $num_items = $noi[0]; //changable
          $items_per_page= 10;
          $num_pages = ceil($num_items/$items_per_page);
          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
      
          //changable sql
      
              $sql = "SELECT id, name FROM ibwf_users WHERE perm='6' ORDER BY name LIMIT $limit_start, $items_per_page";
      
      
          echo "<p>";
          $items = mysql_query($sql);
          echo mysql_error();
          if(mysql_num_rows($items)>0)
          {
          while ($item = mysql_fetch_array($items))
          {
      
            $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[0]&amp;sid=$sid\">$item[1]</a>";
            echo "$lnk<br/>";
          }
          }
          echo "</p>";
          echo "<p align=\"center\">";
          if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"lists.php?action=admns&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">&#171;Prev</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"lists.php?action=admns&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next&#187;</a>";
          }
          echo "<br/>$page/$num_pages<br/>";
          if($num_pages>2)
          {
            $rets = "<form action=\"lists.php\" method=\"get\">";
              $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
              $rets .= "<input type=\"submit\" value=\"GO\"/>";
              $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
              $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
      
              $rets .= "</form>";
      
              echo $rets;
          }
          echo "</p>";
        ////// UNTILL HERE >>
          echo "<p align=\"center\">";
          echo "<a href=\"index.php?action=stats&amp;sid=$sid\"><img src=\"images/stat.gif\" alt=\"*\"/>";
      echo "Site Stats</a><br/>";
          $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
          echo xhtmlfoot();
      }
      //////////////////////////////////Staff
      
      else if($action=="ownr")
      {
      boxstart("Owners");
          addonline(getuid_sid($sid),"Owners list","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Owners List",$pstyle);
          echo "<p align=\"center\">";
          echo "<b>Owners List</b><br/>";
          echo "</p>";
          //////ALL LISTS SCRIPT <<
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='3'"));
      
          if($page=="" || $page<=0)$page=1;
          $num_items = $noi[0]; //changable
          $items_per_page= 10;
          $num_pages = ceil($num_items/$items_per_page);
          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
      
          //changable sql
      
              $sql = "SELECT id, name FROM ibwf_users WHERE perm='3' ORDER BY name LIMIT $limit_start, $items_per_page";
      
      
          echo "<p>";
          $items = mysql_query($sql);
          echo mysql_error();
          if(mysql_num_rows($items)>0)
          {
          while ($item = mysql_fetch_array($items))
          {
      
            $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[0]&amp;sid=$sid\">$item[1]</a>";
            echo "$lnk<br/>";
          }
          }
          echo "</p>";
          echo "<p align=\"center\">";
          if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"lists.php?action=admns&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">&#171;Prev</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"lists.php?action=admns&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next&#187;</a>";
          }
          echo "<br/>$page/$num_pages<br/>";
          if($num_pages>2)
          {
            $rets = "<form action=\"lists.php\" method=\"get\">";
              $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
              $rets .= "<input type=\"submit\" value=\"GO\"/>";
              $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
              $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
      
              $rets .= "</form>";
      
              echo $rets;
          }
          echo "</p>";
        ////// UNTILL HERE >>
          echo "<p align=\"center\">";
          echo "<a href=\"index.php?action=stats&amp;sid=$sid\"><img src=\"images/stat.gif\" alt=\"*\"/>";
      echo "Site Stats</a><br/>";
          $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
          echo xhtmlfoot();
      }
      //////////////////////////////////Staff
      
      else if($action=="cdrs")
      {
      boxstart("Coders");
          addonline(getuid_sid($sid),"Coders list","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Coders List",$pstyle);
          echo "<p align=\"center\">";
          echo "<b>Coders List</b><br/>";
          echo "</p>";
          //////ALL LISTS SCRIPT <<
          $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm='4'"));
      
          if($page=="" || $page<=0)$page=1;
          $num_items = $noi[0]; //changable
          $items_per_page= 10;
          $num_pages = ceil($num_items/$items_per_page);
          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
      
          //changable sql
      
              $sql = "SELECT id, name FROM ibwf_users WHERE perm='4' ORDER BY name LIMIT $limit_start, $items_per_page";
      
      
          echo "<p>";
          $items = mysql_query($sql);
          echo mysql_error();
          if(mysql_num_rows($items)>0)
          {
          while ($item = mysql_fetch_array($items))
          {
      
            $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[0]&amp;sid=$sid\">$item[1]</a>";
            echo "$lnk<br/>";
          }
          }
          echo "</p>";
          echo "<p align=\"center\">";
          if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"lists.php?action=admns&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">&#171;Prev</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"lists.php?action=admns&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next&#187;</a>";
          }
          echo "<br/>$page/$num_pages<br/>";
          if($num_pages>2)
          {
            $rets = "<form action=\"lists.php\" method=\"get\">";
              $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
              $rets .= "<input type=\"submit\" value=\"GO\"/>";
              $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
              $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
      
              $rets .= "</form>";
      
              echo $rets;
          }
          echo "</p>";
        ////// UNTILL HERE >>
          echo "<p align=\"center\">";
          echo "<a href=\"index.php?action=stats&amp;sid=$sid\"><img src=\"images/stat.gif\" alt=\"*\"/>";
      echo "Site Stats</a><br/>";
          $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
          echo xhtmlfoot();
      }
      u will need to remove or edit ur action = staff and admin or remove it out of the code ive posted then in index.php u also need to add it

      main page u will need to add
      Code:
       if(ismod($uid))
        {boxstart("Staff Tools");
          $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE reported='1'"));
          $tot = $tnor[0];
          $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE reported='1'"));
          $tot += $tnor[0];
          $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE reported='1'"));
          $tot += $tnor[0];
          $tnol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_mlog"));
          $tol = $tnol[0];
          if($tol+$tot>0)
          {
          echo "<a href=\"mcppl.php?action=main&amp;sid=$sid\">&#187;Mod Log</a>($tot|$tol)";
          }
      
      if (isadmin(getuid_sid($sid)))
        {
          echo "<a href=\"index.php?action=admincp&amp;sid=$sid\">&#187;Admin Cp</a><br/>";
        }
         if (isowner(getuid_sid($sid)))
        {
          echo "<a href=\"index.php?action=ownercp&amp;sid=$sid\">&#187;Owner Cp</a><br/>";
        }
        if (iscoder(getuid_sid($sid)))
        {
          echo "<a href=\"index.php?action=codercp&amp;sid=$sid\">&#187;Coder Cp</a><br/>";
        }
          if (ishedmodr(getuid_sid($sid)))
        {
          echo "<a href=\"index.php?action=headmodcp&amp;sid=$sid\">&#187;Head Mod Cp</a><br/>";
        }
           if (ishedadm(getuid_sid($sid)))
        {
          echo "<a href=\"index.php?action=headadmincp&amp;sid=$sid\">&#187;Head Admin Cp</a><br/>";
        }
        }
      and then in online staff u need to add the staff also
      Code:
      else if($action=="stfol")
      {
      boxstart("Staff Online");
        addonline(getuid_sid($sid),"Staff online list - xHTML","");
      $pstyle = gettheme($sid);
          echo xhtmlhead("Staff Online",$pstyle);
      
      
        //////ALL LISTS SCRIPT <<
      
          if($page=="" || $page<=0)$page=1;
          $timeout = 180;
        $timeon = (time() - $timeadjust)  - $timeout;
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
          $num_items = $noi[0]; //changable
          $items_per_page= 10;
          $num_pages = ceil($num_items/$items_per_page);
          if($page>$num_pages)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
          if($limit_start<0)$limit_start=0;
          //changable sql
          $sql = "
          SELECT name, perm, id FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'
                  LIMIT $limit_start, $items_per_page
          ";
      getalert($sid);
          echo "<p><small>";
          $items = mysql_query($sql);
          echo mysql_error();
          while ($item = mysql_fetch_array($items))
          {
            $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$item[0]</a>";
            if($item[1]==1)
            {
              $item[1] = "Moderator!";
              $icon = "<img src=\"images/mod.gif\" alt=\"M\"/>";
            }
            else if($item[1]==2)
            {
              $item[1] = "Admin!";
              $icon = "<img src=\"images/admin.gif\" alt=\"A\"/>";
            }
            else if($item[1]==3)
            {
              $item[1] = "Owner!";
              $icon = "<img src=\"images/owner.gif\" alt=\"O\"/>";
            }
              else if($item[1]==4)
            {
              $item[1] = "Coder!";
              $icon = "<img src=\"images/coder.gif\" alt=\"C\"/>";
            }
              else if($item[1]==5)
            {
              $item[1] = "Head Mod!";
              $icon = "<img src=\"images/headmod.gif\" alt=\"HM\"/>";
            }
                else if($item[1]==6)
            {
              $item[1] = "Head Admin!";
              $icon = "<img src=\"images/headadmin.gif\" alt=\"HA\"/>";
            }
            echo "$icon $lnk - $item[1] <br/>";
          }
          echo "</small></p>";
          echo "<p align=\"center\">";
          if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"index.php?action=$action&amp;page=$ppage&amp;sid=$sid\">&#171;PREV</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"index.php?action=$action&amp;page=$npage&amp;sid=$sid\">Next&#187;</a>";
          }
          echo "<br/>$page/$num_pages<br/>";
          if($num_pages>2)
          {
            echo getjumper($action, $sid,"index");
          }
          echo "</p>";
        ////// UNTILL HERE >>
      
       /////////main menu footer
      echo "<div class=\"footer\">";
         $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
      
        echo xhtmlfoot();
      boxend();
      echo "</div>";
      }
      then u need to add the tools
      Code:
      /////////////////////////////////OWNER CP
      else if($action=="ownercp")
      {boxstart("Owner Cp");
        addonline(getuid_sid($sid),"Owner CP - xHTML","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Owner CP!",$pstyle);
        echo "<p align=\"center\">";
        echo "<b>Owner CP</b>";
        echo "</p>";
        echo "<p><small>";
        if(isowner(getuid_sid($sid)))
        {getalert($sid);
          echo "<a href=\"ownercp.php?action=general&amp;sid=$sid\">&#187;General Settings</a><br/>";
          echo "<a href=\"ownercp.php?action=fcats&amp;sid=$sid\">&#187;Forum Categories</a><br/>";
          echo "<a href=\"ownercp.php?action=forums&amp;sid=$sid\">&#187;Forums</a><br/>";
          echo "<a href=\"ownercp.php?action=ugroups&amp;sid=$sid\">&#187;User groups</a><br/>";
          echo "<a href=\"ownercp.php?action=addperm&amp;sid=$sid\">&#187;Add permissions</a><br/>";
          echo "<a href=\"ownercp.php?action=chuinfo&amp;sid=$sid\">&#187;Change user info</a><br/>";
          echo "<a href=\"ownercp.php?action=manrss&amp;sid=$sid\">&#187;Manage RSS Sources</a><br/>";
      	echo "<a href=\"users/themes.php?sid=$sid\">&#187;Add Theme</a><br/>";
          echo "<a href=\"ownercp.php?action=addsml&amp;sid=$sid\">&#187;Add Smilies</a><br/>";
          echo "<a href=\"ownercp.php?action=addavt&amp;sid=$sid\">&#187;Add Avatar</a><br/>";
          echo "<a href=\"ownercp.php?action=chrooms&amp;sid=$sid\">&#187;Chatrooms</a><br/>";
             echo "<a href=\"ownercp.php?action=clrdta&amp;sid=$sid\">&#187;Clear Data</a><br/>";
      
        }else{
          echo "You are not an Owner";
        }
       /////////main menu footer
      echo "<div class=\"footer\">";
        echo "</small></p>";
        echo "<p align=\"center\">";
        $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
        echo xhtmlfoot();
      boxend();
      echo "</div>";
      }
      /////////////////////////////////ADMIN CP
      else if($action=="admincp")
      {boxstart("Admin Cp");
        addonline(getuid_sid($sid),"Admin CP - xHTML","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Admin CP!",$pstyle);
        echo "<p align=\"center\">";
        echo "<b>Admin CP</b>";
        echo "</p>";
        echo "<p><small>";
        if(isadmin(getuid_sid($sid)))
        {getalert($sid);
          echo "<a href=\"admincp.php?action=general&amp;sid=$sid\">&#187;General Settings</a><br/>";
          echo "<a href=\"admincp.php?action=fcats&amp;sid=$sid\">&#187;Forum Categories</a><br/>";
          echo "<a href=\"admincp.php?action=forums&amp;sid=$sid\">&#187;Forums</a><br/>";
          echo "<a href=\"admincp.php?action=ugroups&amp;sid=$sid\">&#187;User groups</a><br/>";
          echo "<a href=\"admincp.php?action=addperm&amp;sid=$sid\">&#187;Add permissions</a><br/>";
          //echo "<a href=\"admincp.php?action=chuinfo&amp;sid=$sid\">&#187;Change user info</a><br/>";
          echo "<a href=\"admincp.php?action=manrss&amp;sid=$sid\">&#187;Manage RSS Sources</a><br/>";
      	echo "<a href=\"users/themes.php?sid=$sid\">&#187;Add Theme</a><br/>";
          echo "<a href=\"admincp.php?action=addsml&amp;sid=$sid\">&#187;Add Smilies</a><br/>";
          echo "<a href=\"admincp.php?action=addavt&amp;sid=$sid\">&#187;Add Avatar</a><br/>";
          echo "<a href=\"admincp.php?action=chrooms&amp;sid=$sid\">&#187;Chatrooms</a><br/>";
          if($uid==1) {
          echo "<a href=\"admincp.php?action=clrdta&amp;sid=$sid\">&#187;Clear Data</a><br/>";
          }
        }else{
          echo "You are not an Admin";
        }
      /////////main menu footer
      echo "<div class=\"footer\">";
        echo "</small></p>";
        echo "<p align=\"center\">";
        $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
        echo xhtmlfoot();
      boxend();
      echo "</div>";
      }
      /////////////////////////////////Head Admin CP
      else if($action=="headadmincp")
      {boxstart("Head Admin Cp");
        addonline(getuid_sid($sid),"Head Admin CP - xHTML","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Head Admin CP!",$pstyle);
        echo "<p align=\"center\">";
        echo "<b>Head Admin CP</b>";
        echo "</p>";
        echo "<p><small>";
        if(isishedadm(getuid_sid($sid)))
        {getalert($sid);
            echo "<a href=\"headadmincp.php?action=general&amp;sid=$sid\">&#187;General Settings</a><br/>";
          echo "<a href=\"headadmincp.php?action=fcats&amp;sid=$sid\">&#187;Forum Categories</a><br/>";
          echo "<a href=\"headadmincp.php?action=forums&amp;sid=$sid\">&#187;Forums</a><br/>";
          echo "<a href=\"headadmincp.php?action=ugroups&amp;sid=$sid\">&#187;User groups</a><br/>";
          echo "<a href=\"headadmincp.php?action=addperm&amp;sid=$sid\">&#187;Add permissions</a><br/>";
          echo "<a href=\"headadmincp.php?action=chuinfo&amp;sid=$sid\">&#187;Change user info</a><br/>";
          echo "<a href=\"headadmincp.php?action=manrss&amp;sid=$sid\">&#187;Manage RSS Sources</a><br/>";
      	echo "<a href=\"users/themes.php?sid=$sid\">&#187;Add Theme</a><br/>";
          echo "<a href=\"headadmincp.php?action=addsml&amp;sid=$sid\">&#187;Add Smilies</a><br/>";
          echo "<a href=\"headadmincp.php?action=addavt&amp;sid=$sid\">&#187;Add Avatar</a><br/>";
          echo "<a href=\"headadmincp.php?action=chrooms&amp;sid=$sid\">&#187;Chatrooms</a><br/>";
             echo "<a href=\"headadmincp.php?action=clrdta&amp;sid=$sid\">&#187;Clear Data</a><br/>";
      
        }else{
          echo "You are not an Head Admin";
        }
       /////////main menu footer
      echo "<div class=\"footer\">";
        echo "</small></p>";
        echo "<p align=\"center\">";
        $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
        echo xhtmlfoot();
      boxend();
      echo "</div>";
      }
      
      /////////////////////////////////Head Mod CP
      else if($action=="headmodcp")
      {boxstart("Head Mod Cp");
        addonline(getuid_sid($sid),"Head Mod CP - xHTML","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Head Mod CP!",$pstyle);
        echo "<p align=\"center\">";
        echo "<b>Head Mod CP</b>";
        echo "</p>";
        echo "<p><small>";
        if(isishedadm(getuid_sid($sid)))
        {getalert($sid);
            echo "<a href=\"headmodcp.php?action=general&amp;sid=$sid\">&#187;General Settings</a><br/>";
          echo "<a href=\"headmodcp.php?action=fcats&amp;sid=$sid\">&#187;Forum Categories</a><br/>";
          echo "<a href=\"headmodcp.php?action=forums&amp;sid=$sid\">&#187;Forums</a><br/>";
          echo "<a href=\"headmodcp.php?action=ugroups&amp;sid=$sid\">&#187;User groups</a><br/>";
          echo "<a href=\"headmodcp.php?action=addperm&amp;sid=$sid\">&#187;Add permissions</a><br/>";
          echo "<a href=\"headmodcp.php?action=chuinfo&amp;sid=$sid\">&#187;Change user info</a><br/>";
          echo "<a href=\"headmodcp.php?action=manrss&amp;sid=$sid\">&#187;Manage RSS Sources</a><br/>";
      	echo "<a href=\"users/themes.php?sid=$sid\">&#187;Add Theme</a><br/>";
          echo "<a href=\"headmodcp.php?action=addsml&amp;sid=$sid\">&#187;Add Smilies</a><br/>";
          echo "<a href=\"headmodcp.php?action=addavt&amp;sid=$sid\">&#187;Add Avatar</a><br/>";
          echo "<a href=\"headmodcp.php?action=chrooms&amp;sid=$sid\">&#187;Chatrooms</a><br/>";
             echo "<a href=\"headmodcp.php?action=clrdta&amp;sid=$sid\">&#187;Clear Data</a><br/>";
      
        }else{
          echo "You are not an Head Mod";
        }
       /////////main menu footer
      echo "<div class=\"footer\">";
        echo "</small></p>";
        echo "<p align=\"center\">";
        $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
        echo xhtmlfoot();
      boxend();
      echo "</div>";
      }
      /////////////////////////////////CODER CP
      else if($action=="codercp")
      {boxstart("Coder Cp");
        addonline(getuid_sid($sid),"Coder CP - xHTML","");
          $pstyle = gettheme($sid);
          echo xhtmlhead("Coder CP!",$pstyle);
        echo "<p align=\"center\">";
        echo "<b>Coder CP</b>";
        echo "</p>";
        echo "<p><small>";
        if(iscoder(getuid_sid($sid)))
        {getalert($sid);
          echo "<a href=\"codercp.php?action=general&amp;sid=$sid\">&#187;General Settings</a><br/>";
          echo "<a href=\"codercp.php?action=fcats&amp;sid=$sid\">&#187;Forum Categories</a><br/>";
          echo "<a href=\"codercp.php?action=forums&amp;sid=$sid\">&#187;Forums</a><br/>";
          echo "<a href=\"codercp.php?action=ugroups&amp;sid=$sid\">&#187;User groups</a><br/>";
          echo "<a href=\"codercp.php?action=addperm&amp;sid=$sid\">&#187;Add permissions</a><br/>";
          //echo "<a href=\"codercp.php?action=chuinfo&amp;sid=$sid\">&#187;Change user info</a><br/>";
          echo "<a href=\"codercp.php?action=manrss&amp;sid=$sid\">&#187;Manage RSS Sources</a><br/>";
      	echo "<a href=\"users/themes.php?sid=$sid\">&#187;Add Theme</a><br/>";
          echo "<a href=\"codercp.php?action=addsml&amp;sid=$sid\">&#187;Add Smilies</a><br/>";
          echo "<a href=\"codercp.php?action=addavt&amp;sid=$sid\">&#187;Add Avatar</a><br/>";
          echo "<a href=\"codercp.php?action=chrooms&amp;sid=$sid\">&#187;Chatrooms</a><br/>";
          if($uid==1) {
          echo "<a href=\"codercp.php?action=clrdta&amp;sid=$sid\">&#187;Clear Data</a><br/>";
          }
        }else{
          echo "You are not an Coder";
        }
      /////////main menu footer
      echo "<div class=\"footer\">";
        echo "</small></p>";
        echo "<p align=\"center\">";
        $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p>";
        echo xhtmlfoot();
      boxend();
      echo "</div>";
      }
      im not going to post all the cp here so u need to create ur own cp for ownercp headadmincp codercp headmodcp all u do u take admincp then u copy it to all the other names and rename all the admin to owners or what ever

      HOPE THIS HELP DONE MORE THAN ENOUGH

      Comment


        #4
        WML
        admin.php
        Code:
        else if($action=="chubi")
        {
            echo "<card id=\"main\" title=\"Admin CP\">";
            $who = $_GET["who"];
            $sid = $_GET["sid"];
            $unick = getnick_uid($who);
            $uid = getuid_sid($sid);
            echo "<onevent type=\"onenterforward\">";
            $avat = getavatar($who);
            $email = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
            $site = mysql_fetch_array(mysql_query("SELECT site FROM ibwf_users WHERE id='".$who."'"));
            $bdy = mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$who."'"));
            $uloc = mysql_fetch_array(mysql_query("SELECT location FROM ibwf_users WHERE id='".$who."'"));
            $usig = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
            $sx = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$who."'"));
            $perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$who."'"));
            $specialid = mysql_fetch_array(mysql_query("SELECT specialid FROM ibwf_users WHERE id='".$who."'"));
            
          echo "<refresh>
                <setvar name=\"unick\" value=\"$unick\"/>
                <setvar name=\"savat\" value=\"$avat\"/>
                <setvar name=\"semail\" value=\"$email[0]\"/>
                <setvar name=\"usite\" value=\"$site[0]\"/>
                <setvar name=\"ubday\" value=\"$bdy[0]\"/>
                <setvar name=\"uloc\" value=\"$uloc[0]\"/>
                <setvar name=\"usig\" value=\"$usig[0]\"/>
                <setvar name=\"sx\" value=\"$sx[0]\"/>
                <setvar name=\"perm\" value=\"$perm[0]\"/>
                <setvar name=\"npwd\" value=\"\"/>
           ";
          echo "</refresh></onevent>";
            echo "<p>";
            echo "Nickname: <input name=\"unick\" maxlength=\"15\"/><br/>";
            echo "Avatar: <input name=\"savat\" maxlength=\"100\"/><br/>";
            echo "E-Mail: <input name=\"semail\" maxlength=\"100\"/><br/>";
            echo "Site: <input name=\"usite\" maxlength=\"100\"/><br/>";
            echo "Birthday<small>(YYYY-MM-DD)</small>: <input name=\"ubday\" maxlength=\"50\"/><br/>";
            echo "Location: <input name=\"uloc\" maxlength=\"50\"/><br/>";
            echo "Signature: <input name=\"usig\" maxlength=\"100\"/><br/>";
            echo "Sex: <select name=\"usex\" value=\"$sx[0]\">";
            echo "<option value=\"M\">Male</option>";
            echo "<option value=\"F\">Female</option>";
            echo "</select><br/>";
            [b]echo "Privileges: <select name=\"perm\" value=\"$perm[0]\">";
        
        
        echo "<option value=\"3\">Owner</option>";
          echo "<option value=\"4\">Coder</option>";
          echo "<option value=\"5\">HeadMod</option>";
          echo "<option value=\"6\">HeadAdmin</option>";
            echo "</select><br/>";
            echo "VIP: <select name=\"specialid\" value=\"$specialid[0]\">";
            echo "<option value=\"0\">Normal</option>";
            echo "<option value=\"1\">Millionaire</option>";
            echo "<option value=\"2\">Quiz Masters</option>";
            echo "<option value=\"8\">Prince</option>";
            echo "<option value=\"9\">Princess</option>";
            echo "</select><br/>";
            echo "<anchor>Update";
            echo "<go href=\"admproc.php?action=uprof&amp;sid=$sid&amp;who=$who\" method=\"post\">";
            echo "<postfield name=\"unick\" value=\"$(unick)\"/>";
            echo "<postfield name=\"savat\" value=\"$(savat)\"/>";
            echo "<postfield name=\"semail\" value=\"$(semail)\"/>";
            echo "<postfield name=\"usite\" value=\"$(usite)\"/>";
            echo "<postfield name=\"ubday\" value=\"$(ubday)\"/>";
            echo "<postfield name=\"uloc\" value=\"$(uloc)\"/>";
            echo "<postfield name=\"usig\" value=\"$(usig)\"/>";
            echo "<postfield name=\"usex\" value=\"$(usex)\"/>";
            echo "<postfield name=\"perm\" value=\"$(perm)\"/>";
            echo "<postfield name=\"specialid\" value=\"$(specialid)\"/>";
            echo "</go></anchor>";
            echo "<br/><br/>";
            echo "Password: <input name=\"npwd\" format=\"*x\" maxlength=\"15\"/><br/>";
            echo "<anchor>Change";
            echo "<go href=\"admproc.php?action=upwd&amp;sid=$sid&amp;who=$who\" method=\"post\">";
            echo "<postfield name=\"npwd\" value=\"$(npwd)\"/>";
        
            echo "</go></anchor>";
            echo "</p>";
            echo "<p align=\"center\">";
            echo "<a href=\"admincp.php?action=chuinfo&amp;sid=$sid\">";
          echo "Users Info</a><br/>";
            echo "<a href=\"index.php?action=admincp&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
          echo "Admin CP</a><br/>";
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
          echo "</p>";
            echo "</card>";
            
        }
        admnproc.php

        Code:
        else if($action=="uprof")
        {
            
            $who = $_GET["who"];
            $unick = $_POST["unick"];
            $perm = $_POST["perm"];
            $savat = $_POST["savat"];
            $semail = $_POST["semail"];
            $usite = $_POST["usite"];
            $ubday = $_POST["ubday"];
            $uloc = $_POST["uloc"];
            $usig = $_POST["usig"];
            $usex = $_POST["usex"];
            $specialid = $_POST["specialid"];
            echo "<card id=\"main\" title=\"Methos\">";
          echo "<p align=\"center\">";
          $onk = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$who."'"));
          $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$unick."'"));
          if($onk[0]!=$unick)
          {
        	  if($exs[0]>0)
        	  {
        		echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>New nickname already exist, choose another one<br/>";
        	  }else
          {
          $res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', site='".$usite."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', name='".$unick."', perm='".$perm."', specialid='".$specialid."' WHERE id='".$who."'");
          if($res)
          {
            echo "<img src=\"http://coding-talk.com/images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
          }else{
            echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
          }
          }
          }else
          {
          $res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', site='".$usite."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', name='".$unick."', perm='".$perm."', specialid='".$specialid."' WHERE id='".$who."'");
          if($res)
          {
            echo "<img src=\"http://coding-talk.com/images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
          }else{
            echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
          }
          }
          echo "<br/><a href=\"admincp.php?action=chuinfo&amp;sid=$sid\">";
          echo "Users Info</a><br/>";
              echo "<a href=\"index.php?action=admincp&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
          echo "Admin CP</a><br/>";
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
          echo "</p></card>";
        }
        Last edited by wapmetal; 13.11.09, 13:54.
        com site: http://vampist.net
        download site: http://wapdloads.net
        fb: http://www.facebook.com/pmplx

        Comment


          #5
          wapmetal ive posted xhtml so its up to the coder if he want to use wml or xhtml

          here are the code u add in chubi after the admin

          Code:
            echo "<option value=\"3\">Owner</option>";
            echo "<option value=\"4\">Coder</option>";
            echo "<option value=\"5\">HeadMod</option>";
            echo "<option value=\"6\">HeadAdmin</option>";

          Comment


            #6
            4 xhtml here
            Code:
            else if($action=="chubi")
            {
                $who = $_GET["who"];
                $unick = getnick_uid($who);
                echo "<onevent type=\"onenterforward\">";
                $avat = getavatar($who);
                $email = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
                $site = mysql_fetch_array(mysql_query("SELECT site FROM ibwf_users WHERE id='".$who."'"));
                $bdy = mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$who."'"));
                $uloc = mysql_fetch_array(mysql_query("SELECT location FROM ibwf_users WHERE id='".$who."'"));
                $usig = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
                $sx = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$who."'"));
                $perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$who."'"));
              
                echo "<form action=\"admproc.php?action=uprof&amp;sid=$sid&amp;who=$who\" method=\"post\">";
                echo "Nickname: <input name=\"unick\" maxlength=\"15\" value=\"$unick\"/><br/>";
                echo "Avatar: <input name=\"savat\" maxlength=\"100\" value=\"$avat\"/><br/>";
                echo "E-Mail: <input name=\"semail\" maxlength=\"100\" value=\"$email[0]\"/><br/>";
                echo "Site: <input name=\"usite\" maxlength=\"100\" value=\"$site[0]\"/><br/>";
                echo "Birthday<small>(YYYY-MM-DD)</small>: <input name=\"ubday\" maxlength=\"50\" value=\"$bdy[0]\"/><br/>";
                echo "Location: <input name=\"uloc\" maxlength=\"50\" value=\"$uloc[0]\"/><br/>";
                echo "Signature: <input name=\"usig\" maxlength=\"100\" value=\"$usig[0]\"/><br/>";
                echo "Sex: <select name=\"usex\" value=\"$sx[0]\">";
                echo "<option value=\"M\">Male</option>";
                echo "<option value=\"F\">Female</option>";
                echo "</select><br/>";
                echo "Privileges: <select name=\"perm\" value=\"$perm[0]\">";
                echo "<option value=\"3\">Owner</option>";
              echo "<option value=\"4\">Coder</option>";
              echo "<option value=\"5\">HeadMod</option>";
              echo "<option value=\"6\">HeadAdmin</option>";
              echo "</select><br/>";
            echo "<input type=\"submit\" value=\"Update\"/>";
            echo "</form>";
            
                echo "</p>";
                echo "<p align=\"center\">";
                echo "<a href=\"admincp.php?action=chuinfo&amp;sid=$sid\">";
              echo "Users Info</a><br/>";
                echo "<a href=\"index.php?action=admincp&amp;sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>";
              echo "Admin CP</a><br/>";
              echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
              echo "Home</a>";
              echo "</p>";
                echo "</body>";
                
            }


            admproc.php



            Code:
            else if($action=="uprof")
            {
                
                $who = $_GET["who"];
                $unick = $_POST["unick"];
                $perm = $_POST["perm"];
                $savat = $_POST["savat"];
                $semail = $_POST["semail"];
                $usite = $_POST["usite"];
                $ubday = $_POST["ubday"];
                $uloc = $_POST["uloc"];
                $usig = $_POST["usig"];
                $usex = $_POST["usex"];
                echo "<p align=\"center\">";
              $onk = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$who."'"));
              $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$unick."'"));
              if($onk[0]!=$unick)
              {
            	  if($exs[0]>0)
            	  {
            		echo "<img src=\"images/notok.gif\" alt=\"x\"/>New nickname already exist, choose another one<br/>";
            	  }else
              {
              $res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', site='".$usite."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', name='".$unick."', perm='".$perm."' WHERE id='".$who."'");
              if($res)
              {
                echo "<img src=\"images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
              }else{
                echo "<img src=\"images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
              }
              }
              }else
              {
              $res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', site='".$usite."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', name='".$unick."', perm='".$perm."' WHERE id='".$who."'");
              if($res)
              {
                echo "<img src=\"images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
              }else{
                echo "<img src=\"images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
              }
              }
              echo "<br/><a href=\"admincp.php?action=chuinfo&amp;sid=$sid\">";
              echo "Users Info</a><br/>";
                  echo "<a href=\"index.php?action=admincp&amp;sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>";
              echo "Admin CP</a><br/>";
              echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
              echo "</p></body>";
            }
            com site: http://vampist.net
            download site: http://wapdloads.net
            fb: http://www.facebook.com/pmplx

            Comment

            Working...
            X