Delete inactive memberz

Started on the old forum in December 2010 · view the original in the archive · old links redirect here

11 replies · 757 views · started 15 years ago · 1 min read

7 participants
Wintch Developer · 68 posts #1

Plz ani 1 help me with script to delete inactive memberz in my f0rum. Tanx

pegass Junior · 28 posts #2

that will also be usefull for me too so please who knows or have some idea put it here .maybe you dont have something like that but have good idea .tnx in advance

Anshul Senior · 296 posts #3

Wintch wrote: Plz ani 1 help me with script to delete inactive memberz in my f0rum. Tanx

u can do it by deleting users from ur users table who didnt login frm last 30 days more here is simple example

 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.

Wintch Developer · 68 posts #4

H0w wil i delete fr0m user table?.and were d0 i place the ab0ve c0de. Am 0nly new to php, tanx

Wintch Developer · 68 posts #5

Plz s0me1 help

Anshul Senior · 296 posts #6

Wintch wrote: Plz ani 1 help me with script to delete inactive memberz in my f0rum. Tanx

ah u dnt need this code atleast for a year lolz if u had just created a site learn other things first that are more important than this 🙂

Wintch Developer · 68 posts #7

Iz nt dat i have juzt created a forum, iz about 5/6 m0nthz n0w, am leaning 0ther thingz. Juzt help me. Tanx

atef201080 Developer · 58 posts #8

go to ur phpmyadmin and query it i guss it will work

Anshul Senior · 296 posts #9

Wintch wrote: Iz nt dat i have juzt created a forum, iz about 5/6 m0nthz n0w, am leaning 0ther thingz. Juzt help me. Tanx

then post ur user table here

ewanz Developer · 187 posts #10

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 c0ntent

our lfe is simple words.... 😌 http://mygenkz.net ewanz06@yahoo.com

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 
metulj Super moderator Principal · 1,726 posts #11

ewanz wrote: 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 c0ntent

all this and some more has been done long time a go... ppl are just way tooooooo lazy to take a look... there use to be folder Adminx with index.php... all written there... modify and use

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

ozziemale31 Lead · 861 posts #12

done already in the old mobilezonez script in owner tools add this link

echo "<a href=\"ownertool.php?sid=$sid&action=idlemembers\">Idle Members</a><br/>";

then add this code to your tools

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>";
}

Added after 5 minutes:

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 😛

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**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 ***

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close