showmsg("您的服务已经到期,请重新开通", 1, $link); } else { $refrestime = get_last_refresh_date($_SESSION['uid'], "3001"); $duringtime = time() - $refrestime['max(addtime)']; $space = $setmeal['hunter_refresh_jobs_space'] * 60; $refresh_time = get_today_refresh_times($_SESSION['uid'], "3001"); if ($setmeal['hunter_refresh_jobs_time'] != 0 && $refresh_time['count(*)'] >= $setmeal['hunter_refresh_jobs_time']) { showmsg("每天最多只能刷新" . $setmeal['hunter_refresh_jobs_time'] . "次,您今天已超过最大刷新次数限制!", 2); } elseif ($duringtime <= $space) { showmsg($setmeal['hunter_refresh_jobs_space'] . "分钟内不能重复刷新职位!", 2); } } } refresh_jobs($yid, $_SESSION['uid']); write_memberslog($_SESSION['uid'], 3, 8504, $_SESSION['username'], "刷新职位"); write_refresh_log($_SESSION['uid'], 3001); showmsg("刷新职位成功!", 2); } elseif ($delete) { if ($n = del_jobs($yid, $_SESSION['uid'])) { showmsg("删除成功!共删除 {$n} 行", 2); } else { showmsg("删除失败!", 0); } } elseif (!empty($_REQUEST['display1'])) { activate_jobs($yid, 1, $_SESSION['uid']); showmsg("设置成功!", 2); } elseif (!empty($_REQUEST['display2'])) { activate_jobs($yid, 2, $_SESSION['uid']); showmsg("设置成功!", 2); } } elseif ($act == 'edit_jobs') {
private function clickResumeRefresh($object) { global $_CFG; $usinfo = $this->get_user_info($object->FromUserName); if (!empty($usinfo)) { if ($usinfo['utype'] != 2) { $this->content = "本操作需要绑定个人帐号!"; } else { $uid = $usinfo['uid']; $refrestime = $this->get_last_refresh_date($uid, "2001"); $duringtime = time() - $refrestime['max(addtime)']; $space = $_CFG['per_refresh_resume_space'] * 60; $refresh_time = $this->get_today_refresh_times($uid, "2001"); if ($_CFG['per_refresh_resume_time'] != 0 && $refresh_time['count(*)'] >= $_CFG['per_refresh_resume_time']) { $this->content = "每天最多只能刷新" . $_CFG['per_refresh_resume_time'] . "次,您今天已超过最大刷新次数限制!"; } elseif ($duringtime <= $space) { $this->content = $_CFG['per_refresh_resume_space'] . "分钟内不能重复刷新简历!"; } else { $resume_num = $this->get_total("select count(*) as num from " . table('resume') . " where uid=" . $uid); $rule = $this->get_points_rule(); $user_points = $this->get_user_points(); // 判断积分是否足够 if ($rule['resume_refresh']['type'] == 2 && $user_points < $rule['resume_refresh']['value'] * $resume_num) { $this->content = "您的积分不足不能刷新简历!"; } else { $time = time(); $this->query("update " . table('resume') . " set refreshtime=" . $time . " where uid=" . $uid); $this->query("update " . table('resume_search_key') . " set refreshtime=" . $time . " where uid=" . $uid); $this->query("update " . table('resume_search_rtime') . " set refreshtime=" . $time . " where uid=" . $uid); // 刷新日志 for ($i = $resume_num; $i > 0; $i--) { write_refresh_log($uid, 2001); } /*积分操作 ----*/ $this->report_deal($uid, $rule['resume_refresh']['type'], $rule['resume_refresh']['value'] * $resume_num); $this->content = "刷新成功!"; } } } } else { $this->content = "您还未绑定" . $_CFG['site_name'] . "帐号,现在开始绑定:<a href='" . WAP_DOMAIN . "binding.php?from=" . $object->FromUserName . "'>点击开始注册/绑定帐号</a>"; } }
function refresh_resume($pid, $uid) { global $db, $_CFG; $time = time(); $uid = intval($uid); if (!$db->query("update " . table('resume') . " SET refreshtime='{$time}' WHERE id='{$pid}' AND uid='{$uid}'")) { return false; } if (!$db->query("update " . table('resume_search_rtime') . " SET refreshtime='{$time}' WHERE id='{$pid}' AND uid='{$uid}'")) { return false; } if (!$db->query("update " . table('resume_search_key') . " SET refreshtime='{$time}' WHERE id='{$pid}' AND uid='{$uid}'")) { return false; } // 查看操作记录表 统计刷新简历所奖励积分 判断是否超过上限 若没超过上限 则继续添加积分 $today = mktime(0, 0, 0, date('m'), date('d'), date('Y')); $info = $db->getone("SELECT sum(points) as num FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='refreshresume' AND addtime>{$today} "); if (intval($info['num']) >= intval($_CFG['resume_refresh_points_max'])) { write_memberslog($_SESSION['uid'], 2, 1102, $_SESSION['username'], "刷新了id为{$pid}的简历"); } else { $points_rule = get_cache('points_rule'); $user_points = get_user_points($_SESSION['uid']); if ($points_rule['resume_refresh']['value'] > 0) { $time = time(); $members_handsel_arr['uid'] = $_SESSION['uid']; $members_handsel_arr['htype'] = "refreshresume"; $members_handsel_arr['points'] = $points_rule['resume_refresh']['value']; $members_handsel_arr['addtime'] = $time; $db->inserttable(table("members_handsel"), $members_handsel_arr); report_deal($_SESSION['uid'], $points_rule['resume_refresh']['type'], $points_rule['resume_refresh']['value']); $user_points = get_user_points($_SESSION['uid']); $operator = $points_rule['resume_refresh']['type'] == "1" ? "+" : "-"; write_memberslog($_SESSION['uid'], 2, 9001, $_SESSION['username'], "刷新了id为{$pid}的简历,({$operator}{$points_rule['resume_refresh']['value']}),(剩余:{$user_points})", 2, 1102, "刷新了id为{$pid}的简历", "{$operator}{$points_rule['resume_refresh']['value']}", "{$user_points}"); } else { write_memberslog($_SESSION['uid'], 2, 1102, $_SESSION['username'], "刷新了id为{$pid}的简历"); } } write_refresh_log($_SESSION['uid'], 2001); return true; }
$refrestime = get_last_refresh_date($_SESSION['uid'], "1001", 2); $duringtime = time() - $refrestime['max(addtime)']; $space = $setmeal['refresh_jobs_space'] * 60; $refresh_time = get_today_refresh_times($_SESSION['uid'], "1001", 2); if ($setmeal['refresh_jobs_time'] != 0 && $refresh_time['count(*)'] >= $setmeal['refresh_jobs_time']) { showmsg("每天最多只能刷新" . $setmeal['refresh_jobs_time'] . "次,您今天已超过最大刷新次数限制!", 2); } elseif ($duringtime <= $space) { showmsg($setmeal['refresh_jobs_space'] . "分钟内不能重复刷新职位!", 2); } } } } refresh_jobs($yid, $_SESSION['uid']); write_memberslog($_SESSION['uid'], 1, 2004, $_SESSION['username'], "刷新职位"); for ($i = 0; $i < $jobs_num; $i++) { write_refresh_log($_SESSION['uid'], 1001, $mode); } showmsg("刷新职位成功!", 2); } elseif ($delete) { if ($n = del_jobs($yid, $_SESSION['uid'])) { showmsg("删除成功!共删除 {$n} 行", 2); } else { showmsg("删除失败!", 2); } } elseif (!empty($_REQUEST['display1'])) { /* 显示中的职位(审核通过,审核中,未暂停) */ if ($_CFG['operation_mode'] == '1') { activate_jobs($yid, 1, $_SESSION['uid']); showmsg("设置成功!", 2);
function refresh_resume($pid, $uid) { global $db; $time = time(); $uid = intval($uid); if (!$db->query("update " . table('resume') . " SET refreshtime='{$time}' WHERE id='{$pid}' AND uid='{$uid}'")) { return false; } if (!$db->query("update " . table('resume_search_rtime') . " SET refreshtime='{$time}' WHERE id='{$pid}' AND uid='{$uid}'")) { return false; } if (!$db->query("update " . table('resume_search_key') . " SET refreshtime='{$time}' WHERE id='{$pid}' AND uid='{$uid}'")) { return false; } write_memberslog($_SESSION['uid'], 2, 1102, $_SESSION['username'], "刷新了id为{$pid}的简历"); write_refresh_log($_SESSION['uid'], 2001); return true; }