コード例 #1
0
 public function thank_you()
 {
     $f = $_SESSION['anejf']['f'];
     unset($_SESSION['anejf']['f']);
     if (!$f) {
         PSU::redirect($GLOBALS['BASE_URL'] . '/');
     }
     $form = new AnejfApply($f);
     $form->readonly(true);
     $this->tpl->assign('form', $form);
     $this->display();
 }
コード例 #2
0
 public static function mail($id)
 {
     $tpl = new PSU\Template();
     $f = PSU::db('myplymouth')->GetRow("SELECT * FROM anejf WHERE id_ = ?", array($id));
     $form = new AnejfApply($f, true);
     $form->readonly(true);
     $tpl->assign('form', $form);
     $message = $tpl->fetch('email.tpl');
     $to = '*****@*****.**';
     if (PSU::isdev()) {
         $to = '*****@*****.**';
     }
     $subject = sprintf("[ANEJF %d] Application for %s %s", $GLOBALS['ANEJF']['YEAR'], $form->first_name->value(), $form->last_name->value());
     PSU::mail($to, $subject, $message, 'Content-Type: text/html');
 }