Plz ani 1 help me with script to delete inactive memberz in my f0rum. Tanx
Delete inactive memberz
Collapse
X
-
Originally posted by Wintch View PostPlz ani 1 help me with script to delete inactive memberz in my f0rum. Tanx
PHP Code:mysql_query("Delete from `users` Where `last_login` < ".(time() - (30*24 * 60 * 60))." and `admin`<'1'");
and u can also do the same wid their inbox , gb entries so on.
Comment
-
Anshul.. U give me a g00d idea.. N0w i will make a t00l f0r staff t0 delete user id that are n0 p0sting, inactive and n0t 0n9 in 4 m0nth..
Added after 3 minutes:
At the same thing must make the c0mmand line t0 delete id fr0m any table that related t0 id user wh0 is inactive.. :-) prevent fr0m s0me data miss c0ntentLast edited by ewanz; 26.12.10, 06:47.our lfe is simple words....
http://mygenkz.net
ewanz06@yahoo.com
PHP Code:$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file);
Comment
-
Originally posted by ewanz View PostAnshul.. U give me a g00d idea.. N0w i will make a t00l f0r staff t0 delete user id that are n0 p0sting, inactive and n0t 0n9 in 4 m0nth..
Added after 3 minutes:
At the same thing must make the c0mmand line t0 delete id fr0m any table that related t0 id user wh0 is inactive.. :-) prevent fr0m s0me data miss c0ntent
ppl are just way tooooooo lazy to take a look...
there use to be folder Adminx with index.php...
all written there... modify and useIt's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ â“â“¡â“” â“ⓑⓛⓔ ⓣⓞ â“—â“”â“â“¡ !
ιη тнєσÑу, тнє ÏÑα¢тι¢є ιѕ α Ñєѕυℓт σƒ тнє тнєσÑу, вυт ιη ÏÑα¢тι¢є ιѕ тнє σÏÏσѕιтє.
Comment
-
done already in the old mobilezonez script in owner tools add this link
PHP Code:echo "<a href=\"ownertool.php?sid=$sid&action=idlemembers\">Idle Members</a><br/>";
PHP Code:else if($action=="idlemembers"){
boxstart("Idle Members");
echo "<p>";
echo "<b>Idle Members</b><br/>";
$timeout2 = 7776000;
$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/>";
}
if(getuid_sid($sid)==1)
{
echo "<a href=\"ownertool.php?sid=$sid&action=delidle\">Delete All Idle</a>";
}
echo "</p>";
echo "<a href=\"ownertool.php?sid=$sid&action=ownauth\">Owner Tools</a><br/>";
echo "<a href=\"index.php?sid=$sid&action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
}
else if($action=="delidle"){
boxstart("Delete Idle");
echo "<p>";
$timeout2 = 7776000;
$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))
{
$who=$row["id"];
$whonick=getnick_uid($who);
echo "<br/>";
mysql_query("INSERT INTO ibwf_mlog SET action='Owner Actions', details='<b>".getnick_uid(getuid_sid($sid))."</b> Deleted the User <b>$whonick</b>', actdt='".time()."'");
$res = mysql_query("DELETE FROM ibwf_buddies WHERE tid='".$who."' OR uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_gbook WHERE gbowner='".$who."' OR gbsigner='".$who."'");
$res = mysql_query("DELETE FROM ibwf_ignore WHERE name='".$who."' OR target='".$who."'");
$res = mysql_query("DELETE FROM ibwf_mangr WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_modr WHERE name='".$who."'");
$res = mysql_query("DELETE FROM ibwf_penalties WHERE uid='".$who."' OR exid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_posts WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_private WHERE byuid='".$who."' OR touid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_shouts WHERE shouter='".$who."'");
$res = mysql_query("DELETE FROM ibwf_topics WHERE authorid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_brate WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_games WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_presults WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_vault WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_blogs WHERE bowner='".$who."'");
$res = mysql_query("DELETE FROM ibwf_chat WHERE chatter='".$who."'");
$res = mysql_query("DELETE FROM ibwf_chat WHERE who='".$who."'");
$res = mysql_query("DELETE FROM ibwf_chonline WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_online WHERE userid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_ses WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_xinfo WHERE uid='".$who."'");
deleteMClubs($who);
$res = mysql_query("DELETE FROM ibwf_users WHERE id='".$who."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>User $whonick deleted successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error deleting UGroup";
}
}
echo "<br/><a href=\"ownertool.php?sid=$sid&action=ownauth\">Owner Tools</a><br/>";
echo "<a href=\"index.php?sid=$sid&action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
}
else if($action=="idlestaff"){
boxstart("Idle Staff");
echo "<p>";
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=\"ownerc.php?action=chubi&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 "<a href=\"ownertool.php?sid=$sid&action=ownauth\">Owner Tools</a><br/>";
echo "<a href=\"index.php?sid=$sid&action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
}
maybe if sum ppl actually looked at alot of the other lava edits in here they may find what they are looking for saves time asking stupid questions and making your self look like a noob :pLast edited by ozziemale31; 09.01.11, 12:13.
Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free
Comment
Comment