public_action(); $this->company_satic(); $urlarr = array("c" => "ad_order", "page" => "{{page}}"); $pageurl = Url('member', $urlarr); $where['comid'] = $this->uid; $pageM = $this->MODEL('page'); $pages = $pageM->pageList('ad_order', $where, $pageurl, $_GET['page']); if ($pages['total'] > 0) { $where['limit'] = $pages['limit']; $adM = $this->MODEL('ad'); $rows = $adM->getAdOrderList($where, array('utype' => 'order', 'uid' => $this->uid)); $this->yunset('rows', $rows['list']); } $this->com_tpl('ad_order'); } /* 删除广告订单 **/ function del_action() { if ($_GET['id']) { $adM = $this->MODEL('ad'); $adM->delAdOrder(array('id' => (int)$_GET['id'], 'comid' => $this->uid)); $this->MODEL('log')->addMemberLog($this->uid, 2, "删除广告订单", 88, 3);//会员日志 $this->layer_msg('删除成功!', 9, 0, $_SERVER['HTTP_REFERER']); } } /* 查看广告订单详情 **/ function look_action() { $this->public_action(); $adM = $this->MODEL('ad'); $info = $adM->getAdOrderInfo(array('id' => (int)$_GET['id'], 'comid' => $this->uid), array('utype' => 'order', 'uid' => $this->uid)); if ($info['status'] == 1) { $ad = $adM->getInfo(array('id' => $info['ad_id'])); $start = @strtotime($ad['time_start']); $end = @strtotime($ad['time_end'] . " 23:59:59"); $time = time(); if ($ad['time_start'] != "" && $start != "" && ($ad['time_end'] == "" || $end != "")) { if ($ad['time_end'] == "" || $end > $time) { if ($ad['is_open'] == '1' && $start < $time) { $ad['type'] = "使用中.."; } else if ($start < $time && $ad['is_open'] == '0') { $ad['type'] = "已停用"; } elseif ($start > $time && ($end > $time || $ad['time'] == "")) { $ad['type'] = "广告暂未开始"; } } else { $ad['type'] = "过期广告"; } } else { $ad['type'] = "无效广告"; } } elseif ($info['status'] == 2) { $ad['type'] = "已退回"; } else { $ad['type'] = "未审核"; } $this->yunset("info", $info); $this->yunset("ad", $ad); $this->com_tpl('ad_detail'); } } ?>