$str .= "alert('请先验证手机!');"; $str .= "window.location.href='account_security.php';"; $str .= "</script>"; echo $str; } elseif ($act == 'attention_me') { $joinsql = " LEFT JOIN " . table('resume') . " AS r ON a.resumeid=r.id "; $resume = get_auditresume_list($_SESSION['uid']); foreach ($resume as $k => $v) { $rid[] = $v['id']; } if (!empty($rid)) { $rid_str = implode(",", $rid); $total_sql = "SELECT COUNT(*) AS num FROM " . table('view_resume') . " AS a where resumeid in (" . $rid_str . ")"; $total_val = $db->get_total($total_sql); $wheresql = " where a.resumeid in (" . $rid_str . ") "; } else { $total_val = 0; } $perpage = 10; $page = empty($_GET['page']) ? 1 : intval($_GET['page']); $offset = ($page - 1) * $perpage; $smarty->assign('view_list', get_view_resume($offset, $perpage, $joinsql . $wheresql)); $smarty->display('m/personal/m-attentionme.html'); } elseif ($act == 'del_view_resume') { $yid = !empty($_POST['id']) ? $_POST['id'] : exit("请选择删除项目!"); if ($n = del_view_resume($yid)) { exit("ok"); } else { exit("err"); } }
foreach ($resume as $k => $v) { $rid[] = $v['id']; } if (!empty($rid)) { $rid_str = implode(",", $rid); $total_sql = "SELECT COUNT(*) AS num FROM " . table('view_resume') . " AS a where resumeid in (" . $rid_str . ")"; $total_val = $db->get_total($total_sql); $wheresql = " where a.resumeid in (" . $rid_str . ") "; } else { $total_val = 0; } $settr = intval($_GET['settr']); if ($settr > 0) { $settr_val = strtotime("-" . $settr . " day"); $wheresql = $wheresql ? $wheresql . " AND a.addtime>" . $settr_val : " WHERE a.addtime>" . $settr_val; } $perpage = 10; $page = new page(array('total' => $total_val, 'perpage' => $perpage)); $offset = ($page->nowindex - 1) * $perpage; $smarty->assign('title', '谁在关注我 - 个人会员中心 - ' . $_CFG['site_name']); $smarty->assign('resume', $resume); $smarty->assign('view_list', get_view_resume($offset, $perpage, $joinsql . $wheresql)); $smarty->assign('page', $page->show(3)); $smarty->assign('total_val', $total_val); $smarty->display('member_personal/personal_attention_me.htm'); } elseif ($act == 'del_view_resume') { $yid = !empty($_REQUEST['y_id']) ? $_REQUEST['y_id'] : showmsg("你没有选择项目!", 1); $delete = $_POST['delete']; $delete ? !del_view_resume($yid) ? showmsg("删除失败!", 0) : showmsg("删除成功!", 2) : showmsg("删除失败!", 0); } unset($smarty);