die('oops'); } if (!($user = GWF_User::getStaticOrGuest())) { die('oops'); } if (isset($_POST['answer'])) { $chall->setVar('chall_solution', WC_Challenge::hashSolution($SOLUTION, true)); $chall->onCheckSolution(); } if (Common::getGetString('santa') === 'clause.json') { if ('' === ($rec = $user->getValidMail())) { echo GWF_HTML::error('Happy Holidays', $chall->lang('err_no_mail'), false); } else { $mail = new GWF_Mail(); $mail->setSender($bot->getValidMail()); $mail->setSenderName('Silvester Stallhuhn'); $mail->setReceiver($user->getValidMail()); $mail->setReceiverName($user->getVar('user_name')); $mail->setupGPG($bot); $mail->setSubject($chall->lang('p2_subj')); $mail->setBody($chall->lang('p2_body', array($SOLUTION))); $mail->addAttachment('0xdeadc0de.asc', $key2, 'application/octet-stream', false); $mail->sendAsHTML(); echo GWF_HTML::message('Happy Holidays', $chall->lang('msg_mail_sent', array($user->getValidMail())), false); } } echo GWF_Website::getDefaultOutput(); $self = GWF_User::getStaticOrGuest()->displayUsername(); $href = "?santa=clause.json"; echo GWF_Box::box($chall->lang('info2', array($self, $href)), $chall->lang('title2')); formSolutionbox($chall);
public static function sendAlertMail(Module_Account $module, GWF_User $user, $record_alert = 'record_alert') { if ($receive_mail = $user->getValidMail()) { $module->onLoadLanguage(); $mail = new GWF_Mail(); $mail->setSender(GWF_BOT_EMAIL); $sig = $module->lang("mail_signature"); $mail->setSenderName($sig); $mail->setReceiver($receive_mail); $mail->setSubject($module->lang("mails_{$record_alert}")); $url = Common::getAbsoluteURL($module->getMethodURL('Access')); $mail->setBody($module->lang("mailb_record_alert", array($user->displayUsername(), $module->lang("mailv_{$record_alert}"), GWF_HTML::display($_SERVER['HTTP_USER_AGENT']), $_SERVER['REMOTE_ADDR'], gethostbyaddr($_SERVER['REMOTE_ADDR']), GWF_HTML::anchor($url, $url, 'Manage IP recording'), $sig))); $mail->sendToUser($user); } }
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 3, 'challenge/quangntenemy/2013NYS/index.php', false); } $chall->showHeader(); if (!($bot = GWF_User::getByName('Rudolph2013'))) { die('oops'); } if (!($user = GWF_User::getStaticOrGuest())) { die('oops'); } if (Common::getGetString('letterbox') === 'santa.php') { if ('' === ($rec = $user->getValidMail())) { echo GWF_HTML::error('Happy Holidays', $chall->lang('err_no_mail'), false); } else { $mail = new GWF_Mail(); $mail->setSender($bot->getValidMail()); $mail->setSenderName('Rudolph Northwood'); $mail->setReceiver($user->getValidMail()); $mail->setReceiverName($user->getVar('user_name')); $mail->setupGPG($bot); $mail->setSubject($chall->lang('p1_subj')); $mail->setBody($chall->lang('p1_body')); $mail->addAttachment('0xdeadbeef.asc', $key1, 'application/octet-stream', false); $mail->sendAsText(); echo GWF_HTML::message('Happy Holidays', $chall->lang('msg_mail_sent', array($user->getValidMail())), false); } } echo GWF_Website::getDefaultOutput(); $self = GWF_User::getStaticOrGuest()->displayUsername(); $quan = '<a href="/profile/quangntenemy">quangntenemy</a>'; $href = "?letterbox=santa.php"; echo GWF_Box::box($chall->lang('info1', array($self, $quan, $href)), $chall->lang('title1'));