/** * 指定した番号(配列指定)を行リストから削除する */ function rmLine($order_list, $lines) { if ($lines) { $neolines = array(); $i = 0; foreach ($lines as $l) { $i++; if (checkOrder($order_list, $i)) { continue; } // 削除扱い $neolines[] = $l; } return $neolines; } return false; }
public function index() { //调用checkComputer函数,判断是否注册电脑,如果没有则跳转到注册页面注册 if (!checkComputer($_SESSION['user_id'])) { redirect('/Home/IndexPage/registerpc?access_token=' . $_GET['access_token']); } //调用checkOrder函数,判断是有订单未完成,如果有则跳转至【我的订单】 if (checkOrder($_SESSION['user_id'])) { $this->error('您有尚未完成的订单,请确认完成后再进行报修!', '/Home/IndexPage/order?access_token=' . $_GET['access_token']); } //查找用户信息 $a = M('userextend'); $map['user_id'] = $_SESSION['user_id']; $userextend = $a->where($map)->find(); //用户电脑信息 $b = M('computer'); $computer = $b->where($map)->order('time desc')->select(); //用户类型 type $c = M('user'); $user = $c->where($map)->find(); $d = M('order'); $ordermap['time'] = array('egt', get_week_start()); $ordermap['status'] = array('in', '0,1,3,4'); $order = $d->where($ordermap)->count(); $set = M('set'); $setting = $set->where('id=1')->find(); if ($user['type'] == 1 && $order >= $setting['week_max']) { $tips = "当前接机量已超过限制" . $setting['week_max'] . "台,但由于你尊贵的会员身份,你现在依然可以报修,非会员本周内无法报修。"; $repair_status = "0"; } elseif ($order >= $setting['week_max']) { $tips = "本周接机量已达上限,请等待下周报修。"; $repair_status = "1"; } else { $tips = "您可继续报修,当接机量超过" . $setting['week_max'] . "台,本周内无法报修。"; $repair_status = "0"; } $this->assign('repair_status', $repair_status); $this->assign('order_count', $order); $this->assign('tips', $tips); $this->assign('user', $userextend); //赋值输出 userextend表 中的用户扩展信息 $this->assign('computer_list', $computer); $this->assign('type', $user); $this->display(); }
</script> <table width=100% style="max-width:900px;" cellspacing=0 cellspacing=0 align=center border=0> <tr> <td align=left valign=top> <div id="ShopCart"> <span class="formerror"><?php echo $error['id_products01']; ?> </span> <p class="formerror" style="font-size:18px;"></p> <?php $in['step_final'] = checkOrder($idOrder); require_once $path_shoppingcart2 . $in['step_final']; session_destroy(); session_unset(); ?> <!-- /denied_order.php /process_order.php --> </div> </td> </tr> </table> <br><br><br> <?php
{ global $outputStr, $result; $outputStr .= "<tr><td class='" . ($pass ? "OK" : "NG") . "'>{$text}</td></tr>\n"; if (!$pass) { $result = 0; } } checkVersion(); checkOrder("306-01", '$Path="/"', '$Domain="opera.com"'); checkNoAttribs("306-02"); checkNoPresence("306-03"); checkNoPresence("306-04"); checkOrder("306-05", '$Path="' . $path . '"', '$Domain=".opera.com"'); checkOrder('306-06', '$Domain="oPeRa.CoM"'); checkOrder('306-07', '$Path="/"'); checkOrder('306-08', '$Path="/"', '$Port="80"'); checkNoPresence("306-09"); checkCount(); echo "<p>" . ($result ? "PASS" : "FAIL") . "</p>\n"; echo "<table>\n{$outputStr}</table>\n"; ?> <style type="text/css"> .OK {background:green} .NG {background:red} #PHPValues {display:none} </style> <p id="PHPValues"><?php echo $_SERVER['HTTP_COOKIE']; ?> </p> <script type="text/javascript">