Exemple #1
0
}
require_once QISHI_ROOT_PATH . 'include/fun_personal.php';
$user = get_user_info($_SESSION['uid']);
if ($user['status'] == "2") {
    exit('<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableall">
	    <tr>
			<td width="20" align="right"></td>
			<td class="ajax_app">
				您的账号处于暂停状态,请联系管理员设为正常后进行操作!
			</td>
	    </tr>
	</table>');
}
if ($act == "add") {
    $id = isset($_GET['id']) ? trim($_GET['id']) : exit("出错了");
    if (add_favorites($id, $_SESSION['uid']) == 0) {
        exit('<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableall">
	    <tr>
			<td width="20" align="right"></td>
			<td class="ajax_app">
				添加失败,收藏夹中已经存在此职位
			</td>
	    </tr>
	</table>');
    } else {
        ?>
<script type="text/javascript">
$("#add_ok .closed").click(function()
{
DialogClose();
});
Exemple #2
0
    $smarty->assign('title', '浏览记录 - 企业会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('resume_list', get_my_attention($offset, $perpage, $joinsql . $wheresql));
    if ($total_val > $perpage) {
        $smarty->assign('page', $page->show(3));
    }
    $smarty->display('member_company/company_my_attention.htm');
} elseif ($act == 'del_my_attention') {
    $yid = !empty($_REQUEST['y_id']) ? $_REQUEST['y_id'] : showmsg("你没有选择简历!", 1);
    if ($n = del_my_attention($yid, $_SESSION['uid'])) {
        showmsg("删除成功!共删除 {$n} 行", 2);
    } else {
        showmsg("删除失败!", 0);
    }
} elseif ($act == 'fav_att_resume') {
    $yid = !empty($_REQUEST['y_id']) ? $_REQUEST['y_id'] : showmsg("你没有选择简历!", 1);
    $n = add_favorites($yid, $_SESSION['uid']);
    if (intval($n) > 0) {
        showmsg("收藏成功!共收藏 {$n} 行", 2);
    } else {
        showmsg("收藏失败!", 0);
    }
} elseif ($act == 'view_jobs_log') {
    require_once QISHI_ROOT_PATH . 'include/page.class.php';
    //筛选 职位
    if (intval($_GET['jobsid']) > 0) {
        $wheresql = " WHERE `jobsid`=" . intval($_GET['jobsid']) . " ";
    } else {
        $my_jobs = get_my_jobs(intval($_SESSION['uid']));
        if (empty($my_jobs)) {
            $wheresql = " WHERE 0";
        } else {
}
require_once QISHI_ROOT_PATH . 'include/fun_company.php';
$user = get_user_info($_SESSION['uid']);
if ($user['status'] == "2") {
    exit('<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableall">
		    <tr>
				<td width="20" align="right"></td>
				<td class="ajax_app">
					您的账号处于暂停状态,请联系管理员设为正常后进行操作!
				</td>
		    </tr>
		</table>');
}
if ($act == "add") {
    $id = isset($_GET['id']) ? $_GET['id'] : exit("出错了");
    $add_return = add_favorites($id, $_SESSION['uid']);
    if ($add_return === "full") {
        exit('<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableall">
		    <tr>
				<td width="20" align="right"></td>
				<td class="ajax_app">
					添加失败,人才库容量已经超出最大限制
				</td>
		    </tr>
		</table>');
    } elseif ($add_return == "0") {
        exit('<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableall">
		    <tr>
				<td width="20" align="right"></td>
				<td class="ajax_app">
					添加失败,人才库中已经存在!
Exemple #4
0
function attention_to_favorites($did, $company_uid)
{
    global $db;
    if (!is_array($did)) {
        $did = array($did);
    }
    $sqlin = implode(",", $did);
    if (!preg_match("/^(\\d{1,10},)*(\\d{1,10})\$/", $sqlin)) {
        return false;
    }
    $sql = "select resumeid from " . table('view_resume') . " WHERE id IN ({$sqlin}) ";
    $resumeid = $db->getall($sql);
    if ($resumeid) {
        foreach ($resumeid as $rid) {
            $arrid[] = $rid['resumeid'];
        }
        return add_favorites($arrid, $company_uid);
    }
}
Exemple #5
0
        $page = 1;
    }
    $theurl = "wap_user.php?act=favorites";
    $start = ($page - 1) * $perpage;
    $wheresql = " WHERE f.personal_uid='{$_SESSION['uid']}' ";
    $total_sql = "SELECT COUNT(*) AS num FROM " . table('personal_favorites') . " AS f {$wheresql} ";
    $count = $db->get_total($total_sql);
    $joinsql = " LEFT JOIN " . table('jobs') . " as  j  ON f.jobs_id=j.id ";
    $smarty->assign('favorites', get_favorites($start, $perpage, $joinsql . $wheresql));
    $smarty->assign('pagehtml', wapmulti($count, $perpage, $page, $theurl));
    $smarty->display('wap/personal/wap-collect.html');
} elseif ($act == 'add_favorites') {
    $id = isset($_POST['id']) ? intval($_POST['id']) : exit("err");
    if (intval($_SESSION['utype'] != 2)) {
        exit("个人会员请登录后收藏职位");
    } elseif (add_favorites($id, intval($_SESSION['uid'])) == 0) {
        exit("收藏夹中已经存在此职位");
    } else {
        exit("ok");
    }
} elseif ($act == "make_resume") {
    $smarty->cache = false;
    $uid = intval($_SESSION['uid']);
    $smarty->assign('user', $user);
    $smarty->assign('userprofile', get_userprofile($_SESSION['uid']));
    $smarty->display('wap/personal/wap_make_resume.html');
} elseif ($act == "make_resume_save") {
    $_POST = array_map("utf8_to_gbk", $_POST);
    $setsqlarr['title'] = trim($_POST['title']) ? trim($_POST['title']) : "未命名简历";
    $setsqlarr['uid'] = $_SESSION['uid'];
    $setsqlarr['fullname'] = trim($_POST['fullname']) ? trim($_POST['fullname']) : exit("请填写真实姓名");