Example #1
0
             showmsg("您还没有开通服务,请开通", 1, $link);
         } elseif ($setmeal['endtime'] < time() && $setmeal['endtime'] != "0") {
             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);
Example #2
0
 * 网站地址: http://www.74cms.com;
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
if (!defined('IN_QISHI')) {
    die('Access Denied!');
}
global $_CFG;
$row = $db->getall("SELECT j.id,j.uid FROM " . table('jobs') . " as j inner join " . table('jobs_appointment_refresh') . " as r on j.id=r.jobs_id WHERE r.appointment_time_available>0 and j.auto_refresh=1 ");
foreach ($row as $key => $value) {
    $id_str .= "," . $value['id'];
    $uid_str .= "," . $value['uid'];
}
refresh_jobs($id_str, $uid_str);
// 清除 过期的自动刷新记录
$row_del = $db->getall("select * from " . table('jobs_appointment_refresh') . " where appointment_time_available=0");
foreach ($row_del as $key => $value) {
    $db->query("Delete from " . table('jobs_appointment_refresh') . " WHERE id={$value['id']} and appointment_time_available=0 ");
    $db->query("update " . table("jobs") . " set auto_refresh=0 where id={$value['jobs_id']} ");
}
function refresh_jobs($id, $uid)
{
    global $db, $_CFG;
    $id = ltrim($id, ",");
    $uid = ltrim($uid, ",");
    $time = time();
    $deadline = strtotime("" . intval($_CFG['company_add_days']) . " day");
    if (preg_match("/^(\\d{1,10},)*(\\d{1,10})\$/", $id) && preg_match("/^(\\d{1,10},)*(\\d{1,10})\$/", $uid)) {
        if (!$db->query("update  " . table('company_profile') . "  SET refreshtime='{$time}' WHERE uid IN ({$uid}) ")) {
Example #3
0
     } else {
         adminmsg("删除失败!", 0);
     }
 } elseif (!empty($_POST['set_audit'])) {
     check_permissions($_SESSION['admin_purview'], "jobs_audit");
     $audit = intval($_POST['audit']);
     $pms_notice = intval($_POST['pms_notice']);
     $reason = trim($_POST['reason']);
     if ($n = edit_jobs_audit($yid, $audit, $reason, $pms_notice)) {
         refresh_jobs($yid);
         adminmsg("审核成功!响应行数 {$n}", 2);
     } else {
         adminmsg("审核失败!响应行数 0", 1);
     }
 } elseif (!empty($_GET['refresh'])) {
     if ($n = refresh_jobs($yid)) {
         adminmsg("刷新成功!响应行数 {$n}", 2);
     } else {
         adminmsg("刷新失败!", 0);
     }
 } elseif (!empty($_POST['set_delay'])) {
     $days = intval($_POST['days']);
     if (empty($days)) {
         adminmsg("请填写要延长的天数!", 0);
     }
     if ($n = delay_jobs($yid, $days)) {
         distribution_jobs($yid);
         adminmsg("延长有效期成功!响应行数 {$n}", 2);
     } else {
         adminmsg("操作失败!", 0);
     }
Example #4
0
            $points_rule = get_cache('points_rule');
            if ($points_rule['jobs_refresh']['value'] > 0) {
                $user_points = get_user_points($_SESSION['uid']);
                $total_point = $jobs_num * $points_rule['jobs_refresh']['value'];
                if ($total_point > $user_points && $points_rule['jobs_refresh']['type'] == "2") {
                    exit("您的" . $_CFG['points_byname'] . "不足,请先充值!");
                }
                report_deal($_SESSION['uid'], $points_rule['jobs_refresh']['type'], $total_point);
                $user_points = get_user_points($_SESSION['uid']);
                $operator = $points_rule['jobs_refresh']['type'] == "1" ? "+" : "-";
                write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "刷新了{$jobs_num}条职位,({$operator}{$total_point}),(剩余:{$user_points})", 1, 1003, "刷新职位", "{$operator}{$total_point}", "{$user_points}");
                write_refresh_log($_SESSION['uid'], 1001);
                refresh_jobs($id, intval($_SESSION['uid'])) ? exit("ok") : exit("err");
            } else {
                write_refresh_log($_SESSION['uid'], 1001);
                refresh_jobs($id, intval($_SESSION['uid'])) ? exit("ok") : exit("err");
            }
        }
    }
} elseif ($act == "jobs_pause") {
    $smarty->cache = false;
    $id = intval($_POST['id']);
    $uid = intval($_SESSION["uid"]);
    activate_jobs($id, 2, $_SESSION['uid']);
    exit("ok");
} elseif ($act == "jobs_regain") {
    $smarty->cache = false;
    $id = intval($_POST['id']);
    $uid = intval($_SESSION["uid"]);
    $jobs_num = $db->get_total("select count(*) num from " . table("jobs") . " where uid={$_SESSION['uid']} and audit=1 and display=1 ");
    $jobs_tmp_num = $db->get_total("select count(*) num from " . table("jobs_tmp") . " where uid={$_SESSION['uid']} and audit<>3 and display=1 ");