<?php /** * @application Automatical Judging System * @author deltamaster * @copyright Softrank Research Center * @version 2.0.0.0 */ require_once "./include/common.inc.php"; if ($sys_uid) { showmessage("Logged in already.", 'index.php'); } if (submitcheck('registersubmit')) { if (VerifyUsername($_POST['inputusername']) && VerifyPassword($_POST['inputpassword']) && VerifyRealName($_POST['inputrealname']) && VerifyEmail($_POST['inputemail']) && VerifyMobile($_POST['inputmobile']) && VerifyStudentId($_POST['studentid'])) { if ($_POST['inputpassword'] == $_POST['confirmpassword']) { $inputpassword = md5($_POST['inputpassword']); $query = $db->query("INSERT INTO `{$tablepre}user` (`username`, `password`, `email`, `mobile`, `realname`, `studentid`) VALUES ('{$_POST['inputusername']}', '{$inputpassword}', '{$_POST['inputemail']}', '{$_POST['inputmobile']}', '{$_POST['inputrealname']}', '{$_POST['studentid']}')"); $last_insert_id = $db->insert_id(); $query = $db->query("insert into `{$tablepre}record` (`uid`, `pid`, `type`, `event`) values ('{$last_insert_id}', '0', 'notice', '{$lang['welcome']}')"); showmessage($lang['register_success'], 'login.php'); } } showmessage($lang['register_fail'], 'register.php'); } include template('register');
echo 'No input'; } } elseif (isset($_GET['password'])) { if (VerifyPassword($_GET['password'])) { echo $lang['valid']; } else { echo $lang['invalid'] . ': ' . $lang['password_request']; } } elseif (isset($_GET['realname'])) { if (VerifyRealName($_GET['realname'])) { echo $lang['valid']; } else { echo $lang['invalid'] . ': ' . $lang['realname_request']; } } elseif (isset($_GET['email'])) { if (VerifyEmail($_GET['email'])) { echo $lang['valid']; } else { echo $lang['invalid'] . ': ' . $lang['email_request']; } } elseif (isset($_GET['mobile'])) { if (VerifyMobile($_GET['mobile'])) { echo $lang['valid']; } else { echo $lang['invalid'] . ': ' . $lang['mobile_request']; } } elseif (isset($_GET['time'])) { if (VerifyTime($_GET['time'])) { echo $lang['valid']; } else { echo $lang['invalid'] . ': ' . $lang['time_request'];