Anonyme 19853
| Posté : 18-08-2015 18:54
Citation : Jireck
Quelque chose comme ca
$mai = "60"; // Jour Mail
nb_del = "70" // Jour supp
$datei = "d-m-Y";
$now = date($datei,time() + ($gmt*3600));
///////////////////
//debut delestage//
///////////////////
/*Requete liste membre*/
$sql = sql_query("SELECT
u.uid, u.uname, u.email, u.user_lastvisit
FROM
".$NPDS_Prefix."users u,
".$NPDS_Prefix."users_status us
WHERE
us.uid = u.uid
AND u.uid != '1'
AND us.open = '1'");
while (list($uid, $uname, $email, $user_lastvisit) = sql_fetch_row($s ql))
{
$difference = time() - $user_lastvisit - ($gmt*3600);
$jour = floor($difference/86400);
/*Envoie mail d avertissement*/
if ($mai == $jour - 1)
{
global $sitename;
$reg = array("%pseudo%", "%site%");
$bonne = array("$uname", "$sitename");
$message = str_replace($reg, $bonne, $msg);
$titre = aff_langue(stripslashes($titre));
$message = aff_langue(stripslashes(utf8_decode($message)));
< br />
$subject = "$titre $uname";
send_email($email, $subject, $message, "", true, "html");
}
else if ($nb_del < $jour)
{
/*DEL table users++ REQUETE A FAIRE*/
$query1 = "DELETE FROM ".$NPDS_Prefix."users WHERE uid = $ui d";
}
}
A verifier ....
Il y a surement des erreurs mais c'est un peu le chemin...
il faut arpenter maintenant
Bonjour,
Merci Jireck mais il faut faire quoi de ce code ?
|