コード例 #1
0
ファイル: admin_promotion.php プロジェクト: winiceo/job
    } else {
        if ($setsqlarr['cp_promotionid'] == "4") {
            $setsqlarr['cp_val'] = !empty($_POST['val']) ? $_POST['val'] : adminmsg("请选择颜色", 1);
        }
        $setsqlarr['cp_starttime'] = time();
        $setsqlarr['cp_endtime'] = strtotime("{$setsqlarr['cp_days']} day");
        $setsqlarr['cp_available'] = 1;
        $setsqlarr['cp_hour_cn'] = trim($_POST['hour']);
        $setsqlarr['cp_hour'] = intval($_POST['hour']);
        $jobs = get_jobs_one($setsqlarr['cp_jobid']);
        $setsqlarr['cp_uid'] = $jobs['uid'];
        if ($db->inserttable(table('promotion'), $setsqlarr)) {
            $u = get_user($setsqlarr['cp_uid']);
            $promotion = get_promotion_cat_one($setsqlarr['cp_promotionid']);
            write_memberslog($u['uid'], 1, 3004, $u['username'], "管理员增加推广:{$promotion['cat_name']},职位ID:{$setsqlarr['cp_jobid']}");
            set_job_promotion($setsqlarr['cp_jobid'], $setsqlarr['cp_promotionid'], $setsqlarr['cp_val']);
            write_log("添加推广:{$promotion['cat_name']},职位ID:{$setsqlarr['cp_jobid']}", $_SESSION['admin_name'], 3);
            $link[0]['text'] = "返回列表";
            $link[0]['href'] = "?act=list";
            adminmsg("添加成功", 2, $link);
        }
    }
} elseif ($act == 'promotion_edit') {
    get_token();
    $id = intval($_GET['id']);
    $show = get_promotion_one($id);
    $jobs = get_jobs_one($show['cp_jobid']);
    $promotion = get_promotion_cat_one($show['cp_promotionid']);
    $smarty->assign('time', time());
    $smarty->assign('show', $show);
    $smarty->assign('jobs', $jobs);
コード例 #2
0
ファイル: ajax_get_promotion.php プロジェクト: dalinhuang/yy
 }
 $setsqlarr['cp_available'] = 1;
 $setsqlarr['cp_promotionid'] = intval($_GET['promotionid']);
 $setsqlarr['cp_uid'] = $_SESSION['uid'];
 $setsqlarr['cp_jobid'] = $jobsid;
 $setsqlarr['cp_days'] = $days;
 $setsqlarr['cp_starttime'] = time();
 $setsqlarr['cp_endtime'] = strtotime("{$days} day");
 $setsqlarr['cp_val'] = $_GET['val'];
 $setsqlarr['cp_hour_cn'] = trim($_GET['hour']);
 $setsqlarr['cp_hour'] = intval($_GET['hour']);
 if ($setsqlarr['cp_promotionid'] == "4" && empty($setsqlarr['cp_val'])) {
     showmsg("请选择颜色!", 1);
 }
 if (inserttable(table('promotion'), $setsqlarr)) {
     set_job_promotion($jobsid, $setsqlarr['cp_promotionid'], $_GET['val']);
     if ($_CFG['operation_mode'] == '1' && $pro_cat['cat_points'] > 0) {
         report_deal($_SESSION['uid'], 2, $points);
         $user_points = get_user_points($_SESSION['uid']);
         write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,推广 {$days} 天,(-{$points}),(剩余:{$user_points})");
     } elseif ($_CFG['operation_mode'] == '2') {
         $user_pname = trim($_GET['pro_name']);
         action_user_setmeal($_SESSION['uid'], $user_pname);
         //更新套餐中相应推广方式的条数
         $setmeal = get_user_setmeal($_SESSION['uid']);
         //获取会员套餐
         write_memberslog($_SESSION['uid'], 1, 9002, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,推广 {$days} 天,套餐内剩余{$pro_cat['cat_name']}条数:{$setmeal[$user_pname]}条。");
         //9002是套餐操作
     }
     write_memberslog($_SESSION['uid'], 1, 3004, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,推广 {$days} 天。");
     if ($_GET['golist']) {
コード例 #3
0
ファイル: company_ajax.php プロジェクト: winiceo/job
 if (!empty($info)) {
     exit("此职位正在推广中,请选择其他职位或其他方案");
 }
 $setsqlarr['cp_available'] = 1;
 $setsqlarr['cp_promotionid'] = $catid;
 $setsqlarr['cp_uid'] = $uid;
 $setsqlarr['cp_jobid'] = $jobid;
 $setsqlarr['cp_days'] = $days;
 $setsqlarr['cp_starttime'] = time();
 $setsqlarr['cp_endtime'] = strtotime("{$days} day");
 $setsqlarr['cp_val'] = $val_code;
 if ($setsqlarr['cp_promotionid'] == "4" && empty($setsqlarr['cp_val'])) {
     exit("请选择颜色!");
 }
 if ($db->inserttable(table('promotion'), $setsqlarr)) {
     set_job_promotion($jobid, $setsqlarr['cp_promotionid'], $val_code);
     if ($_CFG['operation_mode'] == '1' && $pro_cat['cat_points'] > 0) {
         report_deal($uid, 2, $points);
         $user_points = get_user_points($uid);
         write_memberslog($uid, 1, 9001, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,推广 {$days} 天,(-{$points}),(剩余:{$user_points})", 1, 1018, "{$pro_cat['cat_name']}", "-{$points}", "{$user_points}");
     } elseif ($_CFG['operation_mode'] == '2') {
         $user_pname = trim($_POST['pro_name']);
         action_user_setmeal($uid, $user_pname);
         //更新套餐中相应推广方式的条数
         $setmeal = get_user_setmeal($uid);
         //获取会员套餐
         write_memberslog($uid, 1, 9002, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,推广 {$days} 天,套餐内剩余{$pro_cat['cat_name']}条数:{$setmeal[$user_pname]}条。", 2, 1018, "{$pro_cat['cat_name']}", "-{$days}", "{$setmeal[$user_pname]}");
         //9002是套餐操作
     }
     write_memberslog($uid, 1, 3004, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,推广 {$days} 天。");
     exit('推广成功!');