Delete inactive memberz

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

    Delete inactive memberz

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

    #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

    Comment


      #3
      Originally posted by Wintch View Post
      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

      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


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

        Comment


          #5
          Plz s0me1 help

          Comment


            #6
            Originally posted by Wintch View Post
            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

            Comment


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

              Comment


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

                Comment


                  #9
                  Originally posted by Wintch View Post
                  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

                  Comment


                    #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
                    Last 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


                      #11
                      Originally posted by ewanz View Post
                      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ノ刀ノイリ!

                      Comment


                        #12
                        done already in the old mobilezonez script in owner tools add this link
                        PHP Code:
                        echo "<a href=\"ownertool.php?sid=$sid&amp;action=idlemembers\">Idle Members</a><br/>"
                        then add this code to your tools
                        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&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/>";
                          }
                          if(
                        getuid_sid($sid)==1)
                          {
                              echo 
                        "<a href=\"ownertool.php?sid=$sid&amp;action=delidle\">Delete All Idle</a>";
                         }
                          echo 
                        "</p>";

                        echo 
                        "<a href=\"ownertool.php?sid=$sid&amp;action=ownauth\">Owner Tools</a><br/>";
                        echo 
                        "<a href=\"index.php?sid=$sid&amp;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&amp;action=ownauth\">Owner Tools</a><br/>";
                        echo 
                        "<a href=\"index.php?sid=$sid&amp;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&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/>";
                          }


                        echo 
                        "<a href=\"ownertool.php?sid=$sid&amp;action=ownauth\">Owner Tools</a><br/>";
                        echo 
                        "<a href=\"index.php?sid=$sid&amp;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 :p
                        Last 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

                        Working...
                        X