Example #1
0
define('IN_QISHI', true);
require_once dirname(__FILE__) . '/../include/common.inc.php';
require_once QISHI_ROOT_PATH . 'include/fun_wap.php';
$act = !empty($_REQUEST['act']) ? trim($_REQUEST['act']) : 'reg';
$smarty->caching = false;
if ($act == 'reg') {
    $smarty->display("wap/wap_reg.html");
} elseif ($act == 'form') {
    if ($_CFG['closereg'] == '1') {
        WapShowMsg("网站暂停会员注册,请稍后再次尝试!", 1);
    }
    if (intval($_GET['type']) == 0) {
        WapShowMsg("请选择注册类型!", 1);
    }
    if (intval($_GET['type']) > 2) {
        WapShowMsg("会员类型不正确,请重新选择!", 1);
    }
    $smarty->assign('type', $_GET['type']);
    $captcha = get_cache('captcha');
    $smarty->assign('verify_userreg', $captcha['verify_userreg']);
    $smarty->display('wap/reg_form.html');
} elseif ($act == 'do_reg') {
    require_once QISHI_ROOT_PATH . 'include/fun_wap.php';
    require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
    require_once QISHI_ROOT_PATH . 'include/fun_user.php';
    $db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
    $username = isset($_POST['username']) ? trim($_POST['username']) : "";
    $password = isset($_POST['password']) ? trim($_POST['password']) : "";
    $member_type = intval($_POST['utype']);
    $email = isset($_POST['email']) ? trim($_POST['email']) : "";
    if (empty($username) || empty($password) || empty($member_type) || empty($email)) {
Example #2
0
 $id = intval($_POST['id']);
 $setsqlarr['uid'] = intval($_SESSION['uid']);
 $setsqlarr['pid'] = intval($_POST['pid']);
 if ($setsqlarr['uid'] == 0 || $setsqlarr['pid'] == 0) {
     exit('简历不存在');
 }
 $resume_basic = get_resume_basic(intval($_SESSION['uid']), intval($_POST['pid']));
 if (empty($resume_basic)) {
     exit('请先填写简历基本信息');
 }
 $resume_education = get_resume_education($_SESSION['uid'], intval($_POST['pid']));
 if (count($resume_education) >= 6) {
     exit('教育经历不能超过6条');
 }
 $setsqlarr['school'] = trim($_POST['school']) ? trim($_POST['school']) : exit('请填写学校名称!');
 $setsqlarr['speciality'] = trim($_POST['speciality']) ? trim($_POST['speciality']) : WapShowMsg("请填写专业名称!");
 if (trim($_POST['startyear']) == "" || trim($_POST['startmonth']) == "" || trim($_POST['endyear']) == "" || trim($_POST['endmonth']) == "") {
     exit("请选择就读时间!");
 }
 $setsqlarr['startyear'] = intval($_POST['startyear']);
 $setsqlarr['startmonth'] = intval($_POST['startmonth']);
 $setsqlarr['endyear'] = intval($_POST['endyear']);
 $setsqlarr['endmonth'] = intval($_POST['endmonth']);
 // $setsqlarr['education'] = trim($_POST['education'])?trim($_POST['education']):WapShowMsg("请选择获得学历",0);
 // $setsqlarr['education_cn'] = trim($_POST['education_cn'])?trim($_POST['education_cn']):WapShowMsg("请选择获得学历",0);
 if ($id) {
     $db->updatetable(table("resume_education"), $setsqlarr, array("id" => $id, "uid" => intval($_SESSION['uid'])));
     exit("ok");
 } else {
     $insert_id = $db->inserttable(table("resume_education"), $setsqlarr, 1);
     if ($insert_id) {