X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fregister.inc.php;h=04d56a6b354af1c83273c0a3ad68c1b7336291aa;hb=77254e96f9bb2fd88258f00bd72719b60dcd0456;hp=e4e1c3b02e267df01a9765c67d5ad06a0d8e443e;hpb=a3a049fc80d3707bcc76903ab89f73974c470c0c;p=platal.git diff --git a/include/register.inc.php b/include/register.inc.php index e4e1c3b..04d56a6 100644 --- a/include/register.inc.php +++ b/include/register.inc.php @@ -185,7 +185,6 @@ function create_aliases (&$sub) if ( $res->numRows() ) { list($h_id, $h_type, $expire) = $res->fetchOneRow(); - $res->free(); if ( $h_type != 'homonyme' and empty($expire) ) { XDB::execute('UPDATE aliases SET expire=ADDDATE(NOW(),INTERVAL 1 MONTH) WHERE alias={?}', $mailorg); @@ -241,6 +240,23 @@ function create_aliases (&$sub) } // }}} +// {{{ function send_alert_mail + +function send_alert_mail($state, $body) +{ + require_once("diogenes/diogenes.hermes.inc.php"); + $mailer = new HermesMailer(); + $mailer->setFrom("webmaster@polytechnique.org"); + $mailer->addTo("hotliners@staff.polytechnique.org"); + $mailer->setSubject("ALERTE LORS DE L'INSCRIPTION de " + . $state['prenom'] . ' ' . $state['nom'] . '(' . $promo . ')'); + $mailer->setTxtBody($body + . "\n\nIndentifiants :\n" . var_export($state, true) + . "\n\nInformations de connexion :\n" . var_export($_SERVER, true)); + $mailer->send(); +} + +// }}} // {{{ function finish_ins function finish_ins($sub_state)