37 lines
1.4 KiB
HTML
37 lines
1.4 KiB
HTML
|
<?php
|
|||
|
|
|||
|
mysql_connect('mysql5-5.pro','crystalysup','Supinf0');
|
|||
|
mysql_select_db('crystalysup');
|
|||
|
mysql_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';
|
|||
|
|
|||
|
$sql = mysql_query('SELECT id FROM users WHERE done=0 AND group_id != 0 AND group_id != 8');
|
|||
|
|
|||
|
$destinataires = '';
|
|||
|
|
|||
|
$message = "Bonjour\n\nTu n'a pas fait ton rapport sur le site :\nhttp://supinfo.crystalyx.net\nJe te conseille vivement de le faire la semaine prochaine.\nSinon, je t'enverrais mes tourelles pour t'administrer une sonde d<>intubation contenant de la pepsine et de l<>adr<64>naline pour te r<>animer.\n\nMerci et @ bient<6E>t =)";
|
|||
|
|
|||
|
while ($result = mysql_fetch_array($sql)) {
|
|||
|
$destinataires .= $result['id'] .'@supinfo.com, ';
|
|||
|
}
|
|||
|
|
|||
|
//mail($destinataires, '[LSTM Orl<72>ans] Reporting !', wordwrap($message, 70), $headers);
|
|||
|
|
|||
|
mysql_query('UPDATE users SET done=0');
|
|||
|
|
|||
|
$sql = mysql_query('SELECT id FROM users WHERE group_id != 0');
|
|||
|
|
|||
|
$message = "Bonjour\n\nJe viens de r<>activer le syst<73>me de reporting.\nVous avez deux semaines pour remplir votre rapport sur le site :\nhttp://supinfo.crystalyx.net\n\nMerci et @ bient<6E>t =)";
|
|||
|
|
|||
|
while ($result = mysql_fetch_array($sql)) {
|
|||
|
$destinataires .= $result['id'] .'@supinfo.com, ';
|
|||
|
}
|
|||
|
|
|||
|
//mail($destinataires, '[LSTM Orl<72>ans] Reporting !', wordwrap($message, 70), $headers);
|
|||
|
|
|||
|
?>
|