How delete in-active accounts using sql scripts

Results 1 to 20 of 20
  1. #1
    Join our JOURNEY! MaskARRA is offline
    MemberRank
    Mar 2013 Join Date
    416Posts

    smile How delete in-active accounts using sql scripts

    Please help....


  2. #2
    Join our JOURNEY! MaskARRA is offline
    MemberRank
    Mar 2013 Join Date
    416Posts

    Re: How delete in-active accounts using sql scripts

    Up for this!

  3. #3
    Hmm.. huh? MrQU3ST10N is offline
    MemberRank
    Jun 2013 Join Date
    Trojan St. 404Location
    1,109Posts

    Re: How delete in-active accounts using sql scripts

    I saw MuCore have that thing. Removing Inactive accounts ..
    under Maintenace in admincp.

    But I didn't tried it yet. xD

  4. #4
    Join our JOURNEY! MaskARRA is offline
    MemberRank
    Mar 2013 Join Date
    416Posts

    Re: How delete in-active accounts using sql scripts

    I already tried.
    but I got this error: Module Cxampphtdocsadmincpmodulesmaintenancephptenance.php could not be found.
    Any idea?

  5. #5
    Hmm.. huh? MrQU3ST10N is offline
    MemberRank
    Jun 2013 Join Date
    Trojan St. 404Location
    1,109Posts

    Re: How delete in-active accounts using sql scripts

    error said "coud not be found."
    that thing wasn't in your C:\xampp\htdocs\admincp\modules\

    here try this if you don't have
    paste it in your C:\xampp\htdocs\admincp\modules\

    LINK 1

  6. #6
    Alpha Member 2009x2014 is offline
    MemberRank
    Dec 2009 Join Date
    2,765Posts

    Re: How delete in-active accounts using sql scripts

    In sql it require to write short query but lets say it will be too hard for you, so search over ragezone (use google)
    im sure it was released somewhere, other than that like MrQ said, search for ready solution.

  7. #7
    How delete in-active accounts using sql scripts LarvasFaint is offline
    MemberRank
    Nov 2008 Join Date
    IngressLocation
    1,307Posts

    Re: How delete in-active accounts using sql scripts

    In mumaker there is an option to delete inactive acounts..(you can set the days too.)

  8. #8
    Join our JOURNEY! MaskARRA is offline
    MemberRank
    Mar 2013 Join Date
    416Posts

    Re: How delete in-active accounts using sql scripts

    Quote Originally Posted by 4FUNer View Post
    In sql it require to write short query but lets say it will be too hard for you, so search over ragezone (use google)
    im sure it was released somewhere, other than that like MrQ said, search for ready solution.
    I already try to search at ragezone, but most of them not works to delete.
    it says error.. Can you make an SQL to delete? I need 6 Months In-Active accounts to delete them..
    Thanks

    - - - Updated - - -

    Quote Originally Posted by MrQU3ST10N View Post
    error said "coud not be found."
    that thing wasn't in your C:\xampp\htdocs\admincp\modules\

    here try this if you don't have
    paste it in your C:\xampp\htdocs\admincp\modules\


    LINK 1
    Hello your maintenance.php is same with me.
    I try other maintenance.php it works but only delete empty accounts

  9. #9
    Hmm.. huh? MrQU3ST10N is offline
    MemberRank
    Jun 2013 Join Date
    Trojan St. 404Location
    1,109Posts

    Re: How delete in-active accounts using sql scripts

    not same.
    coz it works for me.
    your problem is your MuCore.

  10. #10
    How delete in-active accounts using sql scripts LarvasFaint is offline
    MemberRank
    Nov 2008 Join Date
    IngressLocation
    1,307Posts

    Re: How delete in-active accounts using sql scripts

    @MaskARRA Did you read my post? Or i am writing nobody?

  11. #11
    Enthusiast bavkapeace is offline
    MemberRank
    Apr 2014 Join Date
    36Posts

    Re: How delete in-active accounts using sql scripts

    delete from memb_info
    where memb___id in (
    select memb___id from memb_stat where disconnecttm<'2007-06-01')

    delete from accountcharacter
    where id in (
    select memb___id from memb_stat where disconnecttm<'2007-06-01')

    delete from character
    where accountid in (
    select memb___id from memb_stat where disconnecttm<'2007-06-01')

    delete from warehouse
    where accountid in (
    select memb___id from memb_stat where disconnecttm<'2007-06-01')


    I think this will work just change the date

    ( http://forum.ragezone.com/f82/script...ccount-634866/ )

  12. #12
    Join our JOURNEY! MaskARRA is offline
    MemberRank
    Mar 2013 Join Date
    416Posts

    Re: How delete in-active accounts using sql scripts

    Quote Originally Posted by <c>WebZen View Post
    @MaskARRA Did you read my post? Or i am writing nobody?
    Hi already try but same with error.
    also i cant set the Players to be deleted only the dates..

  13. #13

  14. #14
  15. #15

    Re: How delete in-active accounts using sql scripts

    i dont know then mate ,ur doing something wrong maybe.

  16. #16
    Enthusiast bavkapeace is offline
    MemberRank
    Apr 2014 Join Date
    36Posts

    Re: How delete in-active accounts using sql scripts

    dude if you want send me backup of your database :D i will delete all inactive accounts :D
    the joke away..
    what's version of mu is your server ?
    if you'r server files has shared for free in the internet, do you can give me the original database file?

  17. #17
    Join our JOURNEY! MaskARRA is offline
    MemberRank
    Mar 2013 Join Date
    416Posts

    Re: How delete in-active accounts using sql scripts

    I change my server files now. 11.7.52
    But still using the old one databases.
    Please see link below.
    http://www.mediafire.com/download/gb...userver-s6.rar

  18. #18
    Enthusiast bavkapeace is offline
    MemberRank
    Apr 2014 Join Date
    36Posts

    Re: How delete in-active accounts using sql scripts

    Quote Originally Posted by MaskARRA View Post
    I change my server files now. 11.7.52
    But still using the old one databases.
    Please see link below.
    http://www.mediafire.com/download/gb...userver-s6.rar

    Now i download your muserver to restore the database and review the structure
    When i finish download I will make some test with scripts for delete inactive accounts
    and all over all for me is interesting to see the tables and etc. on the S6 database because I understand only on old versions.
    If i have success with some script i will post there.

  19. #19
    Valued Member rustyhead is offline
    MemberRank
    Feb 2012 Join Date
    130Posts

    Re: How delete in-active accounts using sql scripts

    try this one

    i use this to delete some inactive account.

    copy this code and edit with your sql database details and save it as delcfg.php

    Code:
    <?php
    // ----------------------------------------
    // CREDITS:
    // ----------------------------------------
    // All credits go to Lady_Fu (code), 
    // Mr-K & Dios (test & valuable help) for [-D|K|L-]Team
    // You can change everything you want as long
    // as you keep these credits.
    // We've dedicated our time to make this tool, so remember:
    // REMOVING THESE CREDITS MAKES YOU OUR BITCH!!
    //-----------------------------------------
    //
    //Connection settings. You MUST change this
    //
    
    $hostdb = "127.0.0.1"; 
    $userdb = "sa"; 
    $passdb = "yourpass"; 
    
    $days = "0";  // Number of Days (example: "21" will delete the accounts that haven't 
                   // logged ingame in the last 21 days.
    
    
    
    
    
    
    
    //---------------------------------------------
    //DON'T BE STUPID.. DO NOT CHANGE ANYTHING BELOW THIS ^^
    //----------------------------------------------
    $db = 'MuOnline';
    $msconn=mssql_connect("$hostdb","$userdb","$passdb"); 
    if(!$msconn) { echo "Could not connect to database, please check your configuration and try again"; exit; }
    else { $msdb=mssql_select_db("$db",$msconn); }
    ?>
    copy also this one, and save it as anything you want

    eg:

    checkaccount.php

    Code:
    <?php
    // ----------------------------------------
    // CREDITS:
    // ----------------------------------------
    // All credits go to Lady_Fu (code), 
    // Mr-K & Dios (test & valuable help) for [-D|K|L-]Team
    // You can change everything you want as long
    // as you keep these credits.
    // We've dedicated our time to make this tool, so remember:
    // REMOVING THESE CREDITS MAKES YOU OUR BITCH!!
    //-----------------------------------------
    include("delcfg.php"); 
    
    if(empty($_POST)) {
    $c = "COLLATE Modern_Spanish_CI_AS" ;
    $query = "select distinct ac.ID, ac.GameID1, ac.GameID2, ac.GameID3, ac.GameID4, ac.GameID5, ms.DisConnectTM from accountcharacter as ac, MEMB_STAT as ms where id ".$c." in (select memb___id from memb_stat where ConnectTM  < getdate()-".$days.") and ms.memb___id  ".$c."  = ac.ID  ".$c."  order by ms.DisConnectTM DESC";
    $result = mssql_query($query);
    head($days);
    content($result);
    foot();
    } 
    if(!empty($_POST)) {
      while (list($k,$v) = each ($_POST)) {
        if ($k == 'dont') {
          while (list($kk,$vv) = each ($v)) {
            $cad = cleanup_text($vv);
    		if(checkinput($cad) == 0) { echo "SQL INJECTION DETECTED!!!"; exit; }
    		if(checkinput($cad) == 1) { $dont[] = $cad; }
    	  }
    	}
      }
      if(!empty($dont)) { $dont = implode("','",$dont); }
      else { $dont = ''; }
      $c = "COLLATE Modern_Spanish_CI_AS" ;
      $result = mssql_query("select ID from accountcharacter where id ".$c." in (select memb___id from memb_stat where ConnectTM  < getdate()-".$days.") and not ID  ".$c." in ('".$dont."')");
      while ($row = mssql_fetch_row($result)) { $accounts[] = $row[0]; }  
      if(!empty($accounts)) { $accounts = implode("','",$accounts);  }
      else { $accounts = ''; }
     	
      $result = mssql_query("select GameID1, GameID2, GameID3, GameID4, GameID5 from accountcharacter where id  ".$c." in('".$accounts."')");
    
      while ($row = mssql_fetch_row($result)) {
        while (list(,$charname) = each($row)) {
    	  if (strlen($charname) > 3) {	
    		$r1a = mssql_query("delete from optiondata where Name ".$c." = '$charname'");
    		$r2 = mssql_query("select Count(*) as 'Check' from Guild where G_Master  ".$c." = '$charname'");
    		$row1 = mssql_fetch_array($r2);
    		if($row1['0'] > 0) {
    		  $r3 = mssql_query("delete from GuildMember where G_Name  ".$c." in (select G_Name from Guild where G_Master  ".$c." ='$charname')");
    		  $r4 = mssql_query("delete from Guild where G_Master ".$c." ='$charname'");
    		}
    		$r5 = mssql_query("delete from GuildMember where Name  ".$c." ='$charname'");
    	 }
      }	
      $q = mssql_query("delete from accountcharacter where id  ".$c." in('".$accounts."')");
      $q = mssql_query("delete from character where AccountID  ".$c." in('".$accounts."')");	
      $q = mssql_query("delete from memb_info where memb___id  ".$c."  in('".$accounts."')");
      $q = mssql_query("delete from vi_curr_info where memb___id  ".$c." in('".$accounts."')");
      $q = mssql_query("delete from warehouse where accountid  ".$c." in('".$accounts."')");
    //  $q = mssql_query("delete from allitemslog where items_acid in('".$accounts."')");
    //  $q = mssql_query("delete from copylog where copy_acid in('".$accounts."')");
      $q = mssql_query("delete from memb_stat where memb___id  ".$c." in('".$accounts."')");
    }
      $msdb=mssql_select_db("Ranking",$msconn); 
      $r = mssql_query("delete from event_info where AccountID  ".$c." in ('".$accounts."')");
      echo '<html>
            <head>
            <link href="ad.css" rel="stylesheet" type="text/css">
            </head>
            <body><p class="TheTitle" >ACCOUNTS DELETED!!!</p></body>
            </html>'; exit;  
    }
    function head($days) {
    echo '<html>
    <head>
    <!-- --------------------------------------------------------- -->
    <!--   Inactive Account Deleter by Lady_Fu for [-D|K|L-]Team   -->
    <!-- DKLteam.com.ar || Guildphonos.com.ar || www.jamaikamu.com -->
    <!--               One for Mu.. Mu for All..                   -->
    <!--        Removing these credits makes you our bitch :D      -->
    <!-- --------------------------------------------------------- -->
    
    <link href="ad.css" rel="stylesheet" type="text/css">
    <title>Inactive Accounts Cleaner · [D|K|L]Team</title>
    </head>
    <body>
    <div align="center"> 
            <form name="form1" method="post" action="'.$_SERVER['PHP_SELF'].'">
      <table width="100%" height="100%" border="0" align="center">
        <tr>
          <td align="center" valign="top"> 
            <div align="center"> 
                <p class="TheTitle">Inactive Accounts</p>
                <p class="Text">These 
                  are the accounts that remained inactive for '.$days.'+ days.<br>
                  (Check the accounts you <font color="#FF0000"><strong>DO NOT WANT</strong></font> 
                  to delete and click the DELETE button)</font></p>
            </div>
              <table cellpadding="5" cellspacing="0" ><tr class="title">
                <td> AccountID </td>
                <td> Char1 </td>
                <td> Char2 </td>
                <td> Char3 </td>
                <td> Char4 </td>
                <td> Char5 </td>
                <td> Last Seen </td>
                  <td> Dont!! </td>
              </tr>';
    }
    
    function content($result)	{
    $i = 1;
    while ($row = mssql_fetch_row($result)) {
      if (!is_int($i / 2)) { $col = 'bla'; }
      else { $col = 'bla1'; }
      $i++;
      echo '
               <tr class="'.$col.'"> 
                <td>'.$row['0'].'</td>
                <td>'.$row['1'].'</td>
                <td>'.$row['2'].'</td>
                <td>'.$row['3'].'</td>
                <td>'.$row['4'].'</td>
                <td>'.$row['5'].'</td>
                <td>'.$row['6'].'</td>
                <td>
                      <input name="dont[]" type="checkbox" class="t2" id="dont[]" title="Check this if you do not want to delete this account" value="'.$row['0'].'">
                    </td>
              </tr>';
      }
    }
    
    function foot() {
    echo '
      </table>
      <p>&nbsp;<input type="submit" name="Submit" value="DELETE" class="t1"></p>
      </form>
      <p>&nbsp;</p>
    </div>
    </body>
    </html>
    ';
    }
    
    function cleanup_text($cad) {
      $cad = htmlentities(strip_tags(addslashes($cad)));
      $cad = $cad;
      return $cad;
    }
    
    function checkinput($cad) {
      if(strlen($cad) > 10 || strlen($cad) < 4 ) { return 0; }
      if(!ereg("^[A-Za-z0-9]+$", $cad)) { return 0;  } 
      else { 
        $dont = array('alter', 'create', 'dbcc', 'declare', 'delete', 'drop', 'else', 'fetch', 'exists', 'file','from', 'group', 'having', 'if', 'columns', 'table', 'tables', 'views', 'insert', 'left', 'like', 'open','openquery', 'print', 'readtext', 'restore', 'return', 'select', 'set', 'shutdown', 'some', 'any', 'union','update', 'where', 'while'); 
        while (list(,$v) = each($dont)) {
          if ($cad == $v) { return 0; }
    	}
      return 1;
     }
    }
    ?>
    and for the style copy it and rename it to ad.css

    Code:
    /* CSS Document */
    /*
    // ----------------------------------------
    // CREDITS:
    // ----------------------------------------
    // All credits go to Lady_Fu (code), 
    // Mr-K & Dios (test & valuable help) for [-D|K|L-]Team
    // You can change everything you want as long
    // as you keep these credits.
    // We've dedicated our time to make this tool, so remember:
    // REMOVING THESE CREDITS MAKES YOU OUR BITCH!!
    //-----------------------------------------
    */
    
    body { background-color: #000000; }
    input.t1 {
    	font-family:tahoma; 
    	font-size: xx-small; 
    	color:#FFFFFF; 
    	padding: 2px;
    	border-up:1px solid #CCCCCC;
    	border-right:1px solid #CCCCCC;
    	border-left:1px solid #999999;
    	border-down:1px solid #999999;
    	background-color: #333333;
    }
    input.t2 {
    	font-family:tahoma; 
    	font-size: xx-small; 
    	color:#000000; 
    }
    .title {
    	font-family: Trebuchet MS,Verdana, Arial;
    	font-size: x-small;
    	font-weight: bold;
    	color: #FFFFFF;
    	text-align: center;
    	background-color: #A50018;
    
    }
    .bla {
    	border: 1px solid #333333;
    	font-family: Trebuchet MS;
    	font-size: x-small;
    	color: #000000;
    	background-color: #CCCCCC;
    }
    .bla1 {
    	font-family: Trebuchet MS;
    	font-size: x-small;
    	color: #000000;
    	background-color: #999999;
    }
    .TheTitle {
            color: #FF0000;
            font-size: large;
            font-family: Trebuchet MS;
            font-weight: bold;
    		text-align: center;
    }
    .Text {
            color: #FFFFFF;
            font-size: x-small;
            font-family: Trebuchet MS;
    		text-align: center;
    }
    and put all file delcfg.php,checkaccount.php and ad.css in your xampp/htdoc directory.
    and go to your browser type 127.0.0.1/checkaccount.php

    with the use of this, you can check all accounts that has not been online for how many months or days.



    NOTE:

    BEFORE YOU DO THIS, BACKUP YOUR DATABASE FOR YOUR SAFETY.

  20. #20
    Join our JOURNEY! MaskARRA is offline
    MemberRank
    Mar 2013 Join Date
    416Posts

    Re: How delete in-active accounts using sql scripts

    Quote Originally Posted by bavkapeace View Post
    Now i download your muserver to restore the database and review the structure
    When i finish download I will make some test with scripts for delete inactive accounts
    and all over all for me is interesting to see the tables and etc. on the S6 database because I understand only on old versions.
    If i have success with some script i will post there.
    Thank you for your effort sir :D

    - - - Updated - - -

    Quote Originally Posted by rustyhead View Post
    try this one

    i use this to delete some inactive account.

    copy this code and edit with your sql database details and save it as delcfg.php

    Code:
    <?php
    // ----------------------------------------
    // CREDITS:
    // ----------------------------------------
    // All credits go to Lady_Fu (code), 
    // Mr-K & Dios (test & valuable help) for [-D|K|L-]Team
    // You can change everything you want as long
    // as you keep these credits.
    // We've dedicated our time to make this tool, so remember:
    // REMOVING THESE CREDITS MAKES YOU OUR BITCH!!
    //-----------------------------------------
    //
    //Connection settings. You MUST change this
    //
    
    $hostdb = "127.0.0.1"; 
    $userdb = "sa"; 
    $passdb = "yourpass"; 
    
    $days = "0";  // Number of Days (example: "21" will delete the accounts that haven't 
                   // logged ingame in the last 21 days.
    
    
    
    
    
    
    
    //---------------------------------------------
    //DON'T BE STUPID.. DO NOT CHANGE ANYTHING BELOW THIS ^^
    //----------------------------------------------
    $db = 'MuOnline';
    $msconn=mssql_connect("$hostdb","$userdb","$passdb"); 
    if(!$msconn) { echo "Could not connect to database, please check your configuration and try again"; exit; }
    else { $msdb=mssql_select_db("$db",$msconn); }
    ?>
    copy also this one, and save it as anything you want

    eg:

    checkaccount.php

    Code:
    <?php
    // ----------------------------------------
    // CREDITS:
    // ----------------------------------------
    // All credits go to Lady_Fu (code), 
    // Mr-K & Dios (test & valuable help) for [-D|K|L-]Team
    // You can change everything you want as long
    // as you keep these credits.
    // We've dedicated our time to make this tool, so remember:
    // REMOVING THESE CREDITS MAKES YOU OUR BITCH!!
    //-----------------------------------------
    include("delcfg.php"); 
    
    if(empty($_POST)) {
    $c = "COLLATE Modern_Spanish_CI_AS" ;
    $query = "select distinct ac.ID, ac.GameID1, ac.GameID2, ac.GameID3, ac.GameID4, ac.GameID5, ms.DisConnectTM from accountcharacter as ac, MEMB_STAT as ms where id ".$c." in (select memb___id from memb_stat where ConnectTM  < getdate()-".$days.") and ms.memb___id  ".$c."  = ac.ID  ".$c."  order by ms.DisConnectTM DESC";
    $result = mssql_query($query);
    head($days);
    content($result);
    foot();
    } 
    if(!empty($_POST)) {
      while (list($k,$v) = each ($_POST)) {
        if ($k == 'dont') {
          while (list($kk,$vv) = each ($v)) {
            $cad = cleanup_text($vv);
            if(checkinput($cad) == 0) { echo "SQL INJECTION DETECTED!!!"; exit; }
            if(checkinput($cad) == 1) { $dont[] = $cad; }
          }
        }
      }
      if(!empty($dont)) { $dont = implode("','",$dont); }
      else { $dont = ''; }
      $c = "COLLATE Modern_Spanish_CI_AS" ;
      $result = mssql_query("select ID from accountcharacter where id ".$c." in (select memb___id from memb_stat where ConnectTM  < getdate()-".$days.") and not ID  ".$c." in ('".$dont."')");
      while ($row = mssql_fetch_row($result)) { $accounts[] = $row[0]; }  
      if(!empty($accounts)) { $accounts = implode("','",$accounts);  }
      else { $accounts = ''; }
         
      $result = mssql_query("select GameID1, GameID2, GameID3, GameID4, GameID5 from accountcharacter where id  ".$c." in('".$accounts."')");
    
      while ($row = mssql_fetch_row($result)) {
        while (list(,$charname) = each($row)) {
          if (strlen($charname) > 3) {    
            $r1a = mssql_query("delete from optiondata where Name ".$c." = '$charname'");
            $r2 = mssql_query("select Count(*) as 'Check' from Guild where G_Master  ".$c." = '$charname'");
            $row1 = mssql_fetch_array($r2);
            if($row1['0'] > 0) {
              $r3 = mssql_query("delete from GuildMember where G_Name  ".$c." in (select G_Name from Guild where G_Master  ".$c." ='$charname')");
              $r4 = mssql_query("delete from Guild where G_Master ".$c." ='$charname'");
            }
            $r5 = mssql_query("delete from GuildMember where Name  ".$c." ='$charname'");
         }
      }    
      $q = mssql_query("delete from accountcharacter where id  ".$c." in('".$accounts."')");
      $q = mssql_query("delete from character where AccountID  ".$c." in('".$accounts."')");    
      $q = mssql_query("delete from memb_info where memb___id  ".$c."  in('".$accounts."')");
      $q = mssql_query("delete from vi_curr_info where memb___id  ".$c." in('".$accounts."')");
      $q = mssql_query("delete from warehouse where accountid  ".$c." in('".$accounts."')");
    //  $q = mssql_query("delete from allitemslog where items_acid in('".$accounts."')");
    //  $q = mssql_query("delete from copylog where copy_acid in('".$accounts."')");
      $q = mssql_query("delete from memb_stat where memb___id  ".$c." in('".$accounts."')");
    }
      $msdb=mssql_select_db("Ranking",$msconn); 
      $r = mssql_query("delete from event_info where AccountID  ".$c." in ('".$accounts."')");
      echo '<html>
            <head>
            <link href="http://forum.ragezone.com/ad.css" rel="stylesheet" type="text/css">
            </head>
            <body><p class="TheTitle" >ACCOUNTS DELETED!!!</p></body>
            </html>'; exit;  
    }
    function head($days) {
    echo '<html>
    <head>
    <!-- --------------------------------------------------------- -->
    <!--   Inactive Account Deleter by Lady_Fu for [-D|K|L-]Team   -->
    <!-- DKLteam.com.ar || Guildphonos.com.ar || www.jamaikamu.com -->
    <!--               One for Mu.. Mu for All..                   -->
    <!--        Removing these credits makes you our bitch :D      -->
    <!-- --------------------------------------------------------- -->
    
    <link href="http://forum.ragezone.com/ad.css" rel="stylesheet" type="text/css">
    <title>Inactive Accounts Cleaner · [D|K|L]Team</title>
    </head>
    <body>
    <div align="center"> 
            <form name="form1" method="post" action="'.$_SERVER['PHP_SELF'].'">
      <table width="100%" height="100%" border="0" align="center">
        <tr>
          <td align="center" valign="top"> 
            <div align="center"> 
                <p class="TheTitle">Inactive Accounts</p>
                <p class="Text">These 
                  are the accounts that remained inactive for '.$days.'+ days.<br>
                  (Check the accounts you <font color="#FF0000"><strong>DO NOT WANT</strong></font> 
                  to delete and click the DELETE button)</font></p>
            </div>
              <table cellpadding="5" cellspacing="0" ><tr class="title">
                <td> AccountID </td>
                <td> Char1 </td>
                <td> Char2 </td>
                <td> Char3 </td>
                <td> Char4 </td>
                <td> Char5 </td>
                <td> Last Seen </td>
                  <td> Dont!! </td>
              </tr>';
    }
    
    function content($result)    {
    $i = 1;
    while ($row = mssql_fetch_row($result)) {
      if (!is_int($i / 2)) { $col = 'bla'; }
      else { $col = 'bla1'; }
      $i++;
      echo '
               <tr class="'.$col.'"> 
                <td>'.$row['0'].'</td>
                <td>'.$row['1'].'</td>
                <td>'.$row['2'].'</td>
                <td>'.$row['3'].'</td>
                <td>'.$row['4'].'</td>
                <td>'.$row['5'].'</td>
                <td>'.$row['6'].'</td>
                <td>
                      <input name="dont[]" type="checkbox" class="t2" id="dont[]" title="Check this if you do not want to delete this account" value="'.$row['0'].'">
                    </td>
              </tr>';
      }
    }
    
    function foot() {
    echo '
      </table>
      <p>&nbsp;<input type="submit" name="Submit" value="DELETE" class="t1"></p>
      </form>
      <p>&nbsp;</p>
    </div>
    </body>
    </html>
    ';
    }
    
    function cleanup_text($cad) {
      $cad = htmlentities(strip_tags(addslashes($cad)));
      $cad = $cad;
      return $cad;
    }
    
    function checkinput($cad) {
      if(strlen($cad) > 10 || strlen($cad) < 4 ) { return 0; }
      if(!ereg("^[A-Za-z0-9]+$", $cad)) { return 0;  } 
      else { 
        $dont = array('alter', 'create', 'dbcc', 'declare', 'delete', 'drop', 'else', 'fetch', 'exists', 'file','from', 'group', 'having', 'if', 'columns', 'table', 'tables', 'views', 'insert', 'left', 'like', 'open','openquery', 'print', 'readtext', 'restore', 'return', 'select', 'set', 'shutdown', 'some', 'any', 'union','update', 'where', 'while'); 
        while (list(,$v) = each($dont)) {
          if ($cad == $v) { return 0; }
        }
      return 1;
     }
    }
    ?>
    and for the style copy it and rename it to ad.css

    Code:
    /* CSS Document */
    /*
    // ----------------------------------------
    // CREDITS:
    // ----------------------------------------
    // All credits go to Lady_Fu (code), 
    // Mr-K & Dios (test & valuable help) for [-D|K|L-]Team
    // You can change everything you want as long
    // as you keep these credits.
    // We've dedicated our time to make this tool, so remember:
    // REMOVING THESE CREDITS MAKES YOU OUR BITCH!!
    //-----------------------------------------
    */
    
    body { background-color: #000000; }
    input.t1 {
        font-family:tahoma; 
        font-size: xx-small; 
        color:#FFFFFF; 
        padding: 2px;
        border-up:1px solid #CCCCCC;
        border-right:1px solid #CCCCCC;
        border-left:1px solid #999999;
        border-down:1px solid #999999;
        background-color: #333333;
    }
    input.t2 {
        font-family:tahoma; 
        font-size: xx-small; 
        color:#000000; 
    }
    .title {
        font-family: Trebuchet MS,Verdana, Arial;
        font-size: x-small;
        font-weight: bold;
        color: #FFFFFF;
        text-align: center;
        background-color: #A50018;
    
    }
    .bla {
        border: 1px solid #333333;
        font-family: Trebuchet MS;
        font-size: x-small;
        color: #000000;
        background-color: #CCCCCC;
    }
    .bla1 {
        font-family: Trebuchet MS;
        font-size: x-small;
        color: #000000;
        background-color: #999999;
    }
    .TheTitle {
            color: #FF0000;
            font-size: large;
            font-family: Trebuchet MS;
            font-weight: bold;
            text-align: center;
    }
    .Text {
            color: #FFFFFF;
            font-size: x-small;
            font-family: Trebuchet MS;
            text-align: center;
    }
    and put all file delcfg.php,checkaccount.php and ad.css in your xampp/htdoc directory.
    and go to your browser type 127.0.0.1/checkaccount.php

    with the use of this, you can check all accounts that has not been online for how many months or days.



    NOTE:

    BEFORE YOU DO THIS, BACKUP YOUR DATABASE FOR YOUR SAFETY.
    I wanna try this out :D
    Thanks for sharing



Advertisement