Location: PHPKode > projects > IntraMessenger > admin/user_deleting_older.php
<?php 	
/*******************************************************
 **                  IntraMessenger - server          **
 **                                                   **
 **  Copyright:      (C) 2006 - 2010 THeUDS           **
 **  Web:            http://www.theuds.com            **
 **                  http://www.intramessenger.net    **
 **  Licence :       GPL (GNU Public License)         **
 **  http://opensource.org/licenses/gpl-license.php   **
 *******************************************************/

/*******************************************************
 **       This file is part of IntraMessenger-server  **
 **                                                   **
 **  IntraMessenger is a free software.               **
 **  IntraMessenger is distributed in the hope that   **
 **  it will be useful, but WITHOUT ANY WARRANTY.     **
 *******************************************************/
//
require ("../common/display_errors.inc.php"); 
//
if (isset($_GET['lang'])) $lang = $_GET['lang']; else $lang = "";
//
define('INTRAMESSENGER',true);
require ("../common/styles/style.css.inc.php"); 
require ("../common/config/config.inc.php");
require ("lang.inc.php");
require ("../common/menu.inc.php"); // après config.inc.php !
//echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
echo "<html><head>";
echo "<title>[IM] " . $l_admin_users_out_of_date . "</title>";
display_header();
//echo '<META http-equiv="refresh" content="60;url="> ';
echo "</head>";
echo "<body>";
//
display_menu();
//
echo "<font face=verdana size=2>";
if (intval(_OUTOFDATE_AFTER_X_DAYS_NOT_USE) > 0)
{
  require ("../common/sql.inc.php");
  //
  $requete  = " SELECT count(*) ";
  $requete .= " FROM " . $PREFIX_IM_TABLE . "USR_USER ";
  $requete .= " WHERE TO_DAYS(NOW()) - TO_DAYS(USR_DATE_LAST) > " . intval(_OUTOFDATE_AFTER_X_DAYS_NOT_USE) . " ";
  $result = mysql_query($requete);
  if (!$result) error_sql_log("[ERR-A3c]", $requete);
  list ($nb_perim) = mysql_fetch_row ($result);
  //
  echo "<BR/>";
  echo "<TABLE cellspacing='1' cellpadding='1' class='forumline'>";
  echo "<TR>";
  echo "<TD align='center' COLSPAN='3' class='catHead'>";
  echo "<font face=verdana size=3><b>" . $l_admin_users_out_of_date . "</b></font>";  // <SMALL> (non utilisés depuis plus de " . _OUTOFDATE_AFTER_X_DAYS_NOT_USE . " jours)</SMALL>
  echo "</TD>";

  echo "</TR>";
  echo "<TR>";
    
  if (intval($nb_perim) > 0)
  {
    echo "<TD align='right' COLSPAN='2' class='row2'>";
    echo "<font face=verdana size=2>";
    echo " " . $nb_perim . " " . $l_admin_users_out_of_date . " ";
    echo "</TD>";
    echo "<FORM METHOD='GET' ACTION='user_delete_older.php?'>";
    echo "<TD class='row2'>";
    echo "<INPUT TYPE='submit' VALUE = '" . $l_admin_bt_delete . "' class='liteoption' />";
    echo "<INPUT TYPE='hidden' name='lang' value = '" . $lang . "' />";
    echo "</TD></TR>";
    echo "</FORM>";
  }
  else
  {
    echo "<TD align='center' COLSPAN='2' class='row1'>";
    echo "<font face=verdana size=2 color='GREEN'>";
    echo $l_admin_users_no_out_of_date;
    echo "</FONT>";
    echo "</TD></TR>";
  }

  echo "<TR>";
  echo "<TD align='center' COLSPAN='3' class='catBottom'>";
  echo "<font face=verdana size=2>";
  echo $l_admin_users_for_out_of_date_1 . " " . _OUTOFDATE_AFTER_X_DAYS_NOT_USE . " " . $l_admin_users_for_out_of_date_2 . "</font>";
  echo "</TD>";
  echo "</TR>";
  echo "</TABLE>";
  //
  mysql_close($id_connect);
}
//
display_menu_footer();
//
echo "</body></html>";
?>
Return current item: IntraMessenger