idle members

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

    idle members

    hi there good coders i am trying to do a idle members list but having problems with it i got this far can some one help me please i keep getting string error and i can not see where i am going wrong


    Code:
    <?php
    define('WCS',true);
    include('../core/main.inc');
    header_type();
    cleardata();
    if(ipbanned(ip(),browser())){
    if(!shield(getuid_sid($sid))){
    echo head_tag("Ip Blocked!!!",0,0);
    echo ipbanned_msg();
    echo foot_tag();
    exit();
    }
    }
    if(!islogged($sid)){
    echo head_tag("Error!!!",0,0);
    echo session_expired();
    echo foot_tag();
    exit();
    }
    if(banned(getuid_sid($sid))){
    echo head_tag("Error!!!",1,getnick_sid($sid));
    echo banned_msg($sid);
    echo foot_tag();
    exit();
    }
    mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
    
    /////////////////////////IDLE LIST/////////////////////////
    
    addonline(getuid_sid($sid),"idle members","");
    echo head_tag(getnick_sid($sid)."@idle members",1,getnick_sid($sid));
    $main.="idle members";
       
    
            $norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM user WHERE lastact>'".$norm[1]."'"));
    
     $main.=""Current Number of Idle Members:".$norm[1]."<br/><br/>";
    
      
    
     $main.="Idle Date: $tdte,<br/>Only Members Who have NOT been online after this date are displayed below<br/><br/>";
    
      $nolq = mysql_query("SELECT * FROM users WHERE lastact<'".$norm[1]."'");
    
      while ($row=mysql_fetch_array($nolq))
    
      {
    
        $main.="Username: <a href=\"../profile.php?who=$item[0]&amp;sid=$sid\" style=\"color:$color\">".getnick_uid($item[0])."</a>";
    
        $main.="<br/>";
    
        $jdt = date("d m y-H:i:s",$row[lastact]);
    
        $main.="Last Online:  ".time_msg(time()-$info[lastact],0)."<br/><br/>";
    
      }
    
     $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
    $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
    $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
    $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
    $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
    ?>
    this is for a wapdesire v_2 kind of script i am also after tis coding for idle staff as well can any of u good coders please help mewith this please it be a great help if any one can help me with this and thanks to any one that helps me get this going
    HELP THEM WHO HELPS YOU



    i only work on wapdesire v_2 coding only

    #2
    heres what i got just edit it for your script

    Code:
    //////////////////////////////////////// idle members
    
    else if($action=="idlemembers")
    
    {
    
      echo "<head>";
    
      echo "<title>Host Tools</title>";
    
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    
      echo "</head>";
    
      echo "<b>Idle Members</b><br/>";
    
        $timeout2 = 1209600;
    
      $timeon2 = time()-$timeout2;
    
            $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>'".$timeon2."'"));
    
      echo "Current Number of Idle Members:".$noi[0]."<br/><br/>";
    
      $tdte = date("d m y-H:i:s", $timeon2);
    
      echo "Idle Date: $tdte,<br/>Only Members Who have NOT been online after this date are displayed below<br/><br/>";
    
      $nolq = mysql_query("SELECT * FROM ibwf_users WHERE lastact<'".$timeon2."'");
    
      while ($row=mysql_fetch_array($nolq))
    
      {
    
        echo "Username: <a href=\"index.php?action=viewuser&amp;who=$row[id]&amp;sid=$sid\">$row[name]</a>";
    
        echo "<br/>";
    
        $jdt = date("d m y-H:i:s",$row[lastact]);
    
        echo "Last Online: $jdt <br/><br/>";
    
      }

    Comment


      #3
      Code:
      else if($action=="idlestaff")
      
      {
      
        echo "<head>";
      
        echo "<title>Host Tools</title>";
      
        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      
        echo "<p align=\"center\">";
      
        echo "<b>Idle Staff Members</b><br/>";
      
         $timeout = 180;
      
         $timeon = time()-$timeout;
      
         $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
      
        echo "Current Staff Online:".$noi[0]."<br/><br/>";
      
          $timeout2 = 259200;
      
          $timeon2 = time()-$timeout2;
      
          $tdte = date("d m y-H:i:s", $timeon2);
      
        echo "Idle Date: $tdte,<br/>Only Staff Who have NOT been online after this date are displayed below<br/><br/>";
      
          $nolq = mysql_query("SELECT * FROM ibwf_users WHERE perm>'0' AND lastact<'".$timeon2."'");
      
        while ($row=mysql_fetch_array($nolq))
      
        {
      
        echo "Username: <a href=\"hostcp.php?action=chubi&amp;sid=$sid&amp;who=$row[id]\">$row[name]</a>";
      
        echo "<br/>";
      
           $jdt = date("d m y-H:i:s",$row[lastact]);

      Comment


        #4
        Which of the codes, the 1st or 2nd
        http://myfacepals.com
        MYFACEPALS SOCIAL NETWORKsigpic

        Comment


          #5
          wapdesire v2

          HTML Code:
          <?php
          define('WCS',true);
          include('../core/main.inc');
          header_type();
          cleardata();
          if(ipbanned(ip(),browser())){
          if(!shield(getuid_sid($sid))){
          echo head_tag("Ip Blocked!!!",0,0);
          echo ipbanned_msg();
          echo foot_tag();
          exit();
          }
          }
          if(!islogged($sid)){
          echo head_tag("Error!!!",0,0);
          echo session_expired();
          echo foot_tag();
          exit();
          }
          if(banned(getuid_sid($sid))){
          echo head_tag("Error!!!",1,getnick_sid($sid));
          echo banned_msg($sid);
          echo foot_tag();
          exit();
          }
          mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
          
          /////////////////////////DELETE ALL INBOXES/////////////////////////
          
          addonline(getuid_sid($sid),"Admin Tools","");
          echo head_tag(getnick_sid($sid)."@Admin Tools",1,getnick_sid($sid));
          $title="<b>Admin Tools</b>";
          $main="<p align=".align().">\n";
          $level=mysql_fetch_array(mysql_query("SELECT level FROM users WHERE id='".getuid_sid($sid)."'"));
          if($level[0]>4){
          
              
              $timeout2 = 999999;
              $timeon2 = time() - $timeout2;
          
              if($page=="" || $page<=0)$page=1;
              $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact<'".$timeon2."'"));
              $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;
          
           
              $sql = "SELECT id, username, lastact FROM users WHERE lastact<'".$timeon2."'
              ORDER BY lastact ASC LIMIT $limit_start, 
              $items_per_page";
          
          
              $main.="Current Number of Idle Members:".$noi[0]."<br/><br/>";
              $tdte = date("d m y-H:i:s", $timeon2);
              $main.="Members Idle  Since:  $tdte,<br/><br/>";
            
              $items = mysql_query($sql);
              echo mysql_error();
              
              if(mysql_num_rows($items)>0)
              while ($item = mysql_fetch_array($items))
              {
                $main.="Username: <a href=\"../profile.php?who=$item[0]&amp;sid=$sid\">$item[1]</a>";
                $main.="<br/>";
                $jdt = date("d m y-H:i:s",$item[2]);
                $main.="Last Online: $jdt <br/><br/>";
          
          
              }
            
          
              $npage = $page+1;
          
              if($page>1)
              {
              $ppage = $page-1;
              $main.="<a href=\"idlemem.php?page=$ppage&amp;sid=$sid\">&#171;Prev</a> ";
              }
          
             if($page<$num_pages)
              {
              $npage = $page+1;
              $main.="<a href=\"idlemem.php?page=$npage&amp;sid=$sid\">Next&#187;</a>";
              }
          
              $main.="<br/>$page/$num_pages";
          
          
          
          
          
          $main.="<br/>
          $fivekey<a $key5 href=\"./tools.php?type=tools&amp;sid=$sid\">Back</a>
          </p>\n";
          }else{
          addonline(getuid_sid($sid),"In The Forbidden Zone!","");
          $main.="<img src=\"../images/error.gif\" alt=\"x\"/><br/>Permission Denied!<br/>
          <br/>
          $fivekey<a $key5 href=\"./tools.php?type=tools&amp;sid=$sid\">Back</a>
          </p>\n";
          }
          $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
          $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
          $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
          $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
          $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
          echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
          ?>
          Want something coded email me at sales@webnwaphost.com for a prices.




          Comment


            #6
            thanks brumi for that i just need to get it working for staff now
            HELP THEM WHO HELPS YOU



            i only work on wapdesire v_2 coding only

            Comment


              #7
              For staff idle


              HTML Code:
              <?php
              define('WCS',true);
              include('../core/main.inc');
              header_type();
              cleardata();
              if(ipbanned(ip(),browser())){
              if(!shield(getuid_sid($sid))){
              echo head_tag("Ip Blocked!!!",0,0);
              echo ipbanned_msg();
              echo foot_tag();
              exit();
              }
              }
              if(!islogged($sid)){
              echo head_tag("Error!!!",0,0);
              echo session_expired();
              echo foot_tag();
              exit();
              }
              if(banned(getuid_sid($sid))){
              echo head_tag("Error!!!",1,getnick_sid($sid));
              echo banned_msg($sid);
              echo foot_tag();
              exit();
              }
              mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
              
              /////////////////////////DELETE ALL INBOXES/////////////////////////
              
              addonline(getuid_sid($sid),"Admin Tools","");
              echo head_tag(getnick_sid($sid)."@Admin Tools",1,getnick_sid($sid));
              $title="<b>Admin Tools</b>";
              $main="<p align=".align().">\n";
              $level=mysql_fetch_array(mysql_query("SELECT level FROM users WHERE id='".getuid_sid($sid)."'"));
              if($level[0]>4){
              
                  
                  $timeout2 = 259200;
                  $timeon2 = time() - $timeout2;
              
                  if($page=="" || $page<=0)$page=1;
                  $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE level>'0' AND lastact<'".$timeon2."'"));
                  $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;
              
               
                  $sql = "SELECT id, username, lastact FROM users WHERE level>'0' AND lastact<'".$timeon2."'
                  ORDER BY lastact ASC LIMIT $limit_start, 
                  $items_per_page";
              
              
                  $main.="Current Number of Idle Members:".$noi[0]."<br/><br/>";
                  $tdte = date("d m y-H:i:s", $timeon2);
                  $main.="Members Idle  Since:  $tdte,<br/><br/>";
                
                  $items = mysql_query($sql);
                  echo mysql_error();
                  
                  if(mysql_num_rows($items)>0)
                  while ($item = mysql_fetch_array($items))
                  {
                    $main.="Username: <a href=\"../profile.php?who=$item[0]&amp;sid=$sid\">$item[1]</a>";
                    $main.="<br/>";
                    $jdt = date("d m y-H:i:s",$item[2]);
                    $main.="Last Online: $jdt <br/><br/>";
              
              
                  }
                
              
                  $npage = $page+1;
              
                  if($page>1)
                  {
                  $ppage = $page-1;
                  $main.="<a href=\"idlemem.php?page=$ppage&amp;sid=$sid\">&#171;Prev</a> ";
                  }
              
                 if($page<$num_pages)
                  {
                  $npage = $page+1;
                  $main.="<a href=\"idlemem.php?page=$npage&amp;sid=$sid\">Next&#187;</a>";
                  }
              
                  $main.="<br/>$page/$num_pages";
              
              
              
              
              
              $main.="<br/>
              $fivekey<a $key5 href=\"./tools.php?type=tools&amp;sid=$sid\">Back</a>
              </p>\n";
              }else{
              addonline(getuid_sid($sid),"In The Forbidden Zone!","");
              $main.="<img src=\"../images/error.gif\" alt=\"x\"/><br/>Permission Denied!<br/>
              <br/>
              $fivekey<a $key5 href=\"./tools.php?type=tools&amp;sid=$sid\">Back</a>
              </p>\n";
              }
              $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
              $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
              $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
              $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
              $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
              echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
              ?>
              Want something coded email me at sales@webnwaphost.com for a prices.




              Comment

              Working...
              X