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); echo $chall->copyrightFooter(); require_once 'challenge/html_foot.php';