コード例 #1
0
ファイル: admin_company.php プロジェクト: dalinhuang/yy
        setcookie('QS[username]', $u['username'], 0, $QS_cookiepath, $QS_cookiedomain);
        setcookie('QS[password]', $u['password'], 0, $QS_cookiepath, $QS_cookiedomain);
        setcookie('QS[utype]', $u['utype'], 0, $QS_cookiepath, $QS_cookiedomain);
        header("Location:" . get_member_url($u['utype'], false, $_CFG['site_dir']));
    }
} elseif ($act == 'consultant') {
    get_token();
    check_permissions($_SESSION['admin_purview'], "consultant_show");
    require_once QISHI_ROOT_PATH . 'include/page.class.php';
    $oederbysql = " order BY id DESC ";
    $total_sql = "SELECT COUNT(*) AS num FROM " . table('consultant') . $oederbysql;
    $total_val = $db->get_total($total_sql);
    $page = new page(array('total' => $total_val, 'perpage' => $perpage));
    $currenpage = $page->nowindex;
    $offset = ($currenpage - 1) * $perpage;
    $clist = get_consultant($offset, $perpage, $oederbysql);
    $smarty->assign('pageheader', "顾问管理");
    $smarty->assign('clist', $clist);
    $smarty->assign('page', $page->show(3));
    $smarty->display('company/admin_consultant_list.htm');
} elseif ($act == 'consultant_manage') {
    //得到顾问id
    $id = intval($_GET['id']);
    $sql = "select * from " . table('consultant') . " where id = {$id}";
    $consultant = $db->getone($sql);
    if (empty($consultant)) {
        adminmsg('顾问丢失', 1);
    }
    //分页
    require_once QISHI_ROOT_PATH . 'include/page.class.php';
    $wheresql = " where consultant ={$id}";
コード例 #2
0
ファイル: company_common.php プロジェクト: winiceo/job
        setcookie("QS[utype]", "", time() - 3600, $QS_cookiepath, $QS_cookiedomain);
    }
}
if ($_SESSION['uid'] == '' || $_SESSION['username'] == '' || intval($_SESSION['uid']) === 0) {
    header("Location: " . url_rewrite('QS_login') . "?act=logout");
    exit;
} elseif ($_SESSION['utype'] != '1') {
    $link[0]['text'] = "会员中心";
    $link[0]['href'] = url_rewrite('QS_login');
    showmsg('您访问的页面需要 企业会员 登录!', 1, $link);
}
$act = !empty($_GET['act']) ? trim($_GET['act']) : 'index';
$smarty->cache = false;
$user = get_user_info($_SESSION['uid']);
if (intval($user['consultant']) > 0) {
    $consultant = get_consultant($user['consultant']);
    $smarty->assign('consultant', $consultant);
}
if ($user['status'] == "2" && $act != 'index' && $act != 'user_status' && $act != 'user_status_save') {
    $link[0]['text'] = "返回会员中心首页";
    $link[0]['href'] = 'company_index.php?act=';
    exit(showmsg('您的账号处于暂停状态,请联系管理员设为正常后进行操作!', 1, $link));
} elseif (empty($user)) {
    unset($_SESSION['utype'], $_SESSION['uid'], $_SESSION['username']);
    header("Location:" . url_rewrite('QS_login') . "?url=" . $_SERVER["REQUEST_URI"]);
    exit;
}
if ($_CFG['login_com_audit_email'] && $user['email_audit'] == "0" && $act != 'authenticate' && $act != 'user_email' && $act != 'user_mobile') {
    $link[0]['text'] = "认证邮箱";
    $link[0]['href'] = 'company_user.php?act=authenticate';
    $link[1]['text'] = "网站首页";