X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fmailmgr.php;fp=web%2Fmailmgr.php;h=91d73c7fca8f75704aac5927c0d0fb8cdbda55ed;hb=106cdff81cb1cd42de2bc38ea81d0b37bd301f1f;hp=0000000000000000000000000000000000000000;hpb=1c4871f5ddd191e54ca89b2c27985c54500504e0;p=brisk.git diff --git a/web/mailmgr.php b/web/mailmgr.php new file mode 100644 index 0000000..91d73c7 --- /dev/null +++ b/web/mailmgr.php @@ -0,0 +1,89 @@ +"; + echo "code: $f_code
"; + echo "hash: $f_hash
"; */ + + if ($f_act == "checkmail") { + $errcode = 10000; + do { + if (($bdb = BriskDB::create()) == FALSE) { + log_crit("stat-day: database connection failed"); + $errcode = 10001; + break; + } + $bdb->transaction('BEGIN'); + + if (($mai = $bdb->mail_check($f_code, MAILMGR_CHECKMAIL, $f_hash)) == FALSE) { + $errcode = 10002; + break; + } + + if (($bdb->user_update_flag_ty($mai->ucode, + USER_FLAG_TY_DISABLE, USER_DIS_REA_NU_MAILED, + USER_FLAG_TY_DISABLE, USER_DIS_REA_NU_TOBECHK)) == FALSE) { + $errcode = 10003; + break; + } + + if (($mai = $bdb->mail_delete($f_code)) == FALSE) { + $errcode = 10004; + break; + } + $bdb->transaction('COMMIT'); + + singlemsg("Verifica della e-mail andata a buon fine.", "Verifica della e-mail andata a buon fine."); + $errcode = 0; + } while (FALSE); + if ($errcode) { + singlemsg("E' occorso un errore durante la verifica della e-mail.", + sprintf("E' occorso un errore durante la verifica della e-mail.

Codice d'errore: %d.
", $errcode)); + $bdb->transaction('ROLLBACK'); + } + } + + exit; +} + +main(); +?> \ No newline at end of file