Exemplo n.º 1
0
             showmsg("您还没有开通服务,请开通", 1, $link);
         } elseif ($setmeal['endtime'] < time() && $setmeal['endtime'] != "0") {
             showmsg("您的服务已经到期,请重新开通", 1, $link);
         } else {
             $refrestime = get_last_refresh_date($_SESSION['uid'], "4001");
             $duringtime = time() - $refrestime['max(addtime)'];
             $space = $setmeal['refresh_course_space'] * 60;
             $refresh_time = get_today_refresh_times($_SESSION['uid'], "4001");
             if ($setmeal['refresh_course_time'] != 0 && $refresh_time['count(*)'] >= $setmeal['refresh_course_time']) {
                 showmsg("每天最多只能刷新" . $setmeal['refresh_course_time'] . "次,您今天已超过最大刷新次数限制!", 2);
             } elseif ($duringtime <= $space) {
                 showmsg($setmeal['refresh_course_space'] . "分钟内不能重复刷新课程!", 2);
             }
         }
     }
     refresh_course($yid, $_SESSION['uid']);
     write_memberslog($_SESSION['uid'], 4, 8203, $_SESSION['username'], "刷新课程");
     write_refresh_log($_SESSION['uid'], 4001);
     showmsg("刷新课程成功!", 2);
 } elseif ($delete) {
     if ($n = del_course($yid, $_SESSION['uid'])) {
         showmsg("删除成功!共删除 {$n} 行", 2);
     } else {
         showmsg("删除失败!", 0);
     }
 } elseif (!empty($_POST['display1'])) {
     activate_course($yid, 1, $_SESSION['uid']);
     showmsg("设置成功!", 2);
 } elseif (!empty($_POST['display2'])) {
     activate_course($yid, 2, $_SESSION['uid']);
     showmsg("设置成功!", 2);
Exemplo n.º 2
0
         adminmsg("删除成功!共删除" . $num . "行", 2);
     } else {
         adminmsg("删除失败!", 0);
     }
 } elseif (!empty($_POST['set_audit'])) {
     check_permissions($_SESSION['admin_purview'], "cou_audit");
     $audit = intval($_POST['audit']);
     $pms_notice = intval($_POST['pms_notice']);
     $reason = trim($_POST['reason']);
     if ($n = edit_course_audit($yid, $audit, $reason, $pms_notice)) {
         adminmsg("审核成功!响应行数 {$n}", 2);
     } else {
         adminmsg("审核成功!响应行数 0", 1);
     }
 } elseif (!empty($_GET['refresh'])) {
     if ($n = refresh_course($yid)) {
         adminmsg("刷新成功!响应行数 {$n}", 2);
     } else {
         adminmsg("刷新失败!", 0);
     }
 } elseif (!empty($_POST['set_delay'])) {
     $days = intval($_POST['days']);
     if (empty($days)) {
         adminmsg("请填写要延长的天数!", 0);
     }
     if ($n = delay_course($yid, $days)) {
         adminmsg("延长有效期成功!响应行数 {$n}", 2);
     } else {
         adminmsg("操作失败!", 0);
     }
 } elseif (!empty($_POST['set_recom'])) {