How to delete idle user more than 6 months?
whats code for that?
Thanks
whats code for that?
Thanks
This is the link to idle members echo "<a href=\"ownercp.php?action=idlemembers&sid=$sid\">Idle Members List</a><br/>"; This is the code in ownercp //////////////////////////////////////// idle members else if($action=="idlemembers") { echo "<head>"; echo "<title>Owner 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&who=$row[id]&sid=$sid\">$row[name]</a>"; echo "<br/>"; $jdt = date("d m y-H:i:s",$row[lastact]); echo "Last Online: $jdt <br/><br/>"; } echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=admincp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Admin Tools</a><br/>"; echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; echo "</body>"; } This is the sql just insert into your ibwf_users `lastact` int(100) NOT NULL DEFAULT '0', hope this helps you
<?php } }else if($a=="w") { if(check_log()) { $page = $_GET["p"]; if($page==""||$page==0)$page=1; $time_limit = 3*7*24*60*60; $inactive_time = time()-$time_limit; $items_per_page = 50; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact<'".$inactive_time."' AND chmsgs='0' AND posts='0'")); $pages = ceil($noi[0]/$items_per_page); $limit_start = ($page-1)*$items_per_page; $sql = "SELECT id, name FROM ibwf_users WHERE lastact<'".$inactive_time."' AND chmsgs='0' AND posts='0' LIMIT $limit_start, $items_per_page"; ?>
Comment