TimeCapsule/supinfo/alarm.html

24 lines
841 B
HTML
Raw Permalink Normal View History

2023-07-31 21:21:28 +00:00
<?php
$bdd = new PDO('mysql:host=mysql5-5.pro;dbname=crystalysup', 'crystalysup', 'Supinf0');
$bdd->query('SET NAMES UTF8');
$headers ='From: "GlaDOS"<xefir@supinfo.com>'."\n";
$headers .='Reply-To: xefir@supinfo.com'."\n";
$headers .='Content-Type: text/plain; charset="iso-8859-1"'."\n";
$headers .='Content-Transfer-Encoding: 8bit';
$destinataires = '';
$message = "Bonjour\n\nTu n'a pas encore effectu<74> ton rapport sur le site\nhttp://supinfo.crystalyx.net\nJe t'invite <20> le faire le plus rapidement possible !\n\nMerci et @ bient<6E>t =)";
$sql = $bdd->query('SELECT id FROM users WHERE done=0 AND group_id != 0 AND group_id != 8');
while ($result = $sql->fetch()) {
$destinataires .= $result['id'] .'@supinfo.com, ';
}
mail($destinataires, '[LSTM Orl<72>ans] Reporting <20> faire !', wordwrap($message, 70), $headers);
?>