Beispiel #1
0
 /**
  * Maskuje nazwiska i adresy email uzytkownikow
  */
 public function maskUserNamesAction()
 {
     $oUser = new Model_User();
     $aUsers = $oUser->getAll();
     foreach ($aUsers as $aUser) {
         if (in_array($aUser['name'], array('Chodorowski', 'TestUser'))) {
             continue;
         }
         $oUser = new Model_User();
         $oUser->user_id = $aUser['user_id'];
         // pick random name
         $sName = chr(rand(65, 90));
         $sName .= chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122));
         $sName .= chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122));
         $oUser->name = $sName;
         $oUser->email = sprintf('*****@*****.**', strtolower($aUser['fname']), strtolower($sName));
         // save
         if (!$oUser->save()) {
             break;
         }
         unset($oUser);
     }
     // foreach
     $this->indexAction('Maskowanie wykonane pomyslnie.');
 }
Beispiel #2
0
 /**
  * 自媒体列表
  */
 public function listAction()
 {
     $iPage = intval($this->getParam('page'));
     $aWhere = array();
     $aParam = $this->getParams();
     if (!empty($aParam['iUserID'])) {
         $aWhere['iUserID'] = $aParam['iUserID'];
     }
     if (!empty($aParam['iMediaType'])) {
         $aWhere['iMediaType'] = $aParam['iMediaType'];
     }
     if (!empty($aParam['sMediaName'])) {
         $aWhere['sMediaName LIKE'] = '%' . $aParam['sMediaName'] . '%';
     }
     if (!empty($aParam['iStatus'])) {
         $aWhere['iStatus'] = $aParam['iStatus'];
     } else {
         $aWhere['iStatus IN'] = '1,2,3';
     }
     if (!empty($aParam['iPut'])) {
         $aWhere['iPut'] = $aParam['iPut'];
     } else {
         $aWhere['iPut IN'] = '0,1';
     }
     $aList = Model_Media::getList($aWhere, $iPage, 'iStatus desc ,iMediaID desc');
     $useridArr = array();
     foreach ($aList['aList'] as $key => $val) {
         if ($val['iUserID'] > 0) {
             $useridArr[] = $val['iUserID'];
         }
     }
     if (count($useridArr) > 0) {
         $sUserid = '';
         $useridArr = array_unique($useridArr);
         $sUserid = implode(',', $useridArr);
         $sUserid = trim($sUserid, ',');
         $userData = Model_User::getAll(array('where' => array('iUserID IN' => $sUserid)));
         if (count($userData) > 0) {
             $data = array();
             foreach ($userData as $key => $value) {
                 $data[$value['iUserID']] = array('iUserID' => $value['iUserID'], 'sEmail' => $value['sEmail']);
             }
             $this->assign('userData', $data);
         }
     }
     $this->assign('aList', $aList);
     $this->assign('MediaType', Model_Media::$aType);
     $this->assign('aParam', $aParam);
 }
Beispiel #3
0
    /**
     * 导出
     */
    public function explodeAction()
    {
        $uWhere = array();
        $aParam = $this->getParams();
        $userid = '';
        if (!empty($aParam['sRealName'])) {
            $uWhere['sRealName LIKE'] = '%' . $aParam['sRealName'] . '%';
            $data_user = Model_User::getAll(array('where' => $uWhere));
            $useridArr = array();
            foreach ($data_user as $val) {
                if ($val['iUserID'] != '') {
                    $useridArr[] = $val['iUserID'];
                }
            }
            if (count($useridArr) > 0) {
                $userid = implode(',', array_unique($useridArr));
            }
        }
        $aWhere = array();
        if (!empty($aParam['iUserID'])) {
            $aWhere['iUserID'] = $aParam['iUserID'];
        }
        if ($userid != '') {
            $aWhere['iUserID IN'] = $userid;
        }
        if (!empty($aParam['iPayment']) && $aParam['iPayment'] != '') {
            $aWhere['iPayment'] = $aParam['iPayment'];
        }
        if (!empty($aParam['iSource']) && $aParam['iSource'] != '') {
            $aWhere['iSource'] = $aParam['iSource'];
        }
        if (!empty($aParam['sRealName']) && $aParam['sRealName'] != '') {
            $aWhere['sRealName LIKE'] = '%' . $aParam['sRealName'] . '%';
        }
        if (!empty($aParam['iPayType']) && $aParam['iPayType'] != '') {
            $aWhere['iPayType'] = $aParam['iPayType'];
        }
        if (!empty($aParam['iPayStatus']) && $aParam['iPayStatus'] != '') {
            $aWhere['iPayStatus'] = $aParam['iPayStatus'];
        }
        $aList = Model_Finance::getAll(array('where', $aWhere));
        header("Content-type:application/vnd.ms-excel");
        header("Content-Disposition:filename=财务_" . date('Y-m-d', time()) . ".xls");
        $str_explode = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><title>导出</title><style>td{text-align:center;font-size:12px;font-family:Arial, Helvetica, sans-serif;border:#1C7A80 1px solid;color:#152122;width:100px;}table,tr{border-style:none;}.title{background:#7DDCF0;color:#FFFFFF;font-weight:bold;}</style></head><body>";
        $str_explode .= '<table cellspacing="0" cellpadding="3" rules="rows" border="1" id="" style="border-style:None;width:100%;border-collapse:collapse;">
							<tr>
								<th scope="col">用户名称/th>
								<th scope="col">收支情况</th>
								<th scope="col">事件来源</th>
								<th scope="col">申请人</th>
								<th scope="col">支付类型</th>
								<th scope="col">本次金额</th>
								<th scope="col">用户余额</th>
								<th scope="col">银行开户姓名</th>
								<th scope="col">开户银行</th>
								<th scope="col">支付帐号</th>
								<th scope="col">支付状态</th>
								<th scope="col">支付流水号</th>
								<th scope="col">备注</th>
								<th scope="col">时间</th>
							</tr>';
        foreach ($aList as $key => $val) {
            $row = Model_User::getDetail($val['iUserID']);
            $sUserRealName = isset($row) && $row['sRealName'] != '' ? $row['sRealName'] : '';
            $iPayment = isset($val['iPayment']) && $val['iPayment'] == '1' ? '收入' : '支出';
            $iSource = '';
            if ($val['iSource'] == '1') {
                $iSource = '自主充值';
            } elseif ($val['iSource'] == '2') {
                $iSource = '付款充值';
            } elseif ($val['iSource'] == '3') {
                $iSource = '拒单退款';
            } elseif ($val['iSource'] == '4') {
                $iSource = '取现';
            } elseif ($val['iSource'] == '5') {
                $iSource = '广告费用';
            }
            $sRealName = $val['sRealName'];
            $iPayType = '';
            if ($val['iPayType'] == '1') {
                $iPayType = '支付宝';
            } elseif ($val['iPayType'] == '2') {
                $iPayType = '微信';
            } elseif ($val['iPayType'] == '3') {
                $iPayType = '银行卡';
            }
            $iPayMoney = $val['iPayMoney'];
            $iUserMoney = $val['iUserMoney'];
            $sOpenName = $val['sOpenName'];
            $sBankName = $val['sBankName'];
            $sPayAccount = $val['sPayAccount'];
            $iPayStatus = isset($val['iPayStatus']) && $val['iPayStatus'] == '0' ? '未支付' : '已支付';
            $sPayOrder = $val['sPayOrder'];
            $sRemark = $val['sRemark'];
            $iCreateTime = date('Y-m-d H:i:s', $val['iCreateTime']);
            $str_explode .= '<tr>
								<td align="left">' . $sUserRealName . '</td>
								<td align="left">' . $iPayment . '</td>
								<td align="left">' . $iSource . '</td>
								<td align="left">' . $sRealName . '</td>
								<td align="left">' . $iPayType . '</td>
								<td align="left">' . $iPayMoney . '</td>
								<td align="left">' . $iUserMoney . '</td>
								<td align="left">' . $sOpenName . '</td>
								<td align="left">' . $sBankName . '</td>
								<td align="left">' . $sPayAccount . '</td>
								<td align="left">' . $iPayStatus . '</td>
								<td align="left">' . $sPayOrder . '</td>
								<td align="left">' . $sRemark . '</td>
								<td align="left">' . $iCreateTime . '</td>
							</tr>';
        }
        $str_explode .= '</table>';
        $str_explode .= "</body></html>";
        echo $str_explode;
    }
Beispiel #4
0
    /**
     * 导出
     */
    public function explodeAction()
    {
        $aWhere = array();
        $aParam = $this->getParams();
        if (!empty($aParam['iType'])) {
            $aWhere['iType'] = $aParam['iType'];
        }
        if (!empty($aParam['iCoIndustry'])) {
            $aWhere['iCoIndustry'] = $aParam['iCoIndustry'];
        }
        if (!empty($aParam['sEmail'])) {
            $aWhere['sEmail LIKE'] = '%' . $aParam['sEmail'] . '%';
        }
        if (!empty($aParam['sMobile'])) {
            $aWhere['sMobile LIKE'] = '%' . $aParam['sMobile'] . '%';
        }
        if (!empty($aParam['iStatus'])) {
            $aWhere['iStatus'] = $aParam['iStatus'];
        } else {
            $aWhere['iStatus IN'] = '1,2';
        }
        $aList = Model_User::getAll(array('where' => $aWhere));
        header("Content-type:application/vnd.ms-excel");
        header("Content-Disposition:filename=用户_" . date('Y-m-d', time()) . ".xls");
        $str_explode = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><title>导出</title><style>td{text-align:center;font-size:12px;font-family:Arial, Helvetica, sans-serif;border:#1C7A80 1px solid;color:#152122;width:100px;}table,tr{border-style:none;}.title{background:#7DDCF0;color:#FFFFFF;font-weight:bold;}</style></head><body>";
        $str_explode .= '<table cellspacing="0" cellpadding="3" rules="rows" border="1" id="" style="border-style:None;width:100%;border-collapse:collapse;">
							<tr>
								<th scope="col">帐号类型</th>
								<th scope="col">登录帐号</th>
								<th scope="col">手机号</th>
								<th scope="col">联系人名称</th>
								<th scope="col">公司名称</th>
								<th scope="col">所属行业</th>
								<th scope="col">公司地址</th>
								<th scope="col">公司网站</th>
								<th scope="col">公司介绍</th>
								<th scope="col">微信</th>
								<th scope="col">QQ</th>
								<th scope="col">余额</th>
								<th scope="col">时间</th>
							</tr>';
        foreach ($aList as $key => $val) {
            $iType = isset($val['iType']) && $val['iType'] == '1' ? '自媒体' : '广告主';
            $sEmail = $val['sEmail'];
            $sMobile = $val['sMobile'];
            $sRealName = $val['sRealName'];
            $sCoName = $val['sCoName'];
            //行业
            $sCoIndustry = '';
            if ($val['sCoIndustry'] != '') {
                $rowlevel = Model_Domain::getAll(array('where' => array('iAutoID IN' => $val['sCoIndustry'])));
                //合作等级
                if (isset($rowlevel) && count($rowlevel) > 0) {
                    foreach ($rowlevel as $lrow) {
                        $sCoIndustry .= ' ' . $lrow['sName'];
                    }
                }
            }
            $sCoAddress = $val['sCoAddress'];
            $sCoWebsite = $val['sCoWebsite'];
            $sCoDesc = $val['sCoDesc'];
            $sWeixin = $val['sWeixin'];
            $sQQ = $val['sQQ'];
            $iMoney = $val['iMoney'];
            $iCreateTime = date('Y-m-d H:i:s', $val['iCreateTime']);
            $str_explode .= '<tr>
								<td align="left">' . $iType . '</td>
								<td align="left">' . $sEmail . '</td>
								<td align="left">' . $sMobile . '</td>
								<td align="left">' . $sRealName . '</td>
								<td align="left">' . $sCoName . '</td>
								<td align="left">' . $sCoIndustry . '</td>
								<td align="left">' . $sCoAddress . '</td>
								<td align="left">' . $sCoWebsite . '</td>
								<td align="left">' . $sCoDesc . '</td>
								<td align="left">' . $sWeixin . '</td>
								<td align="left">' . $sQQ . '</td>
								<td align="left">' . $iMoney . '</td>
								<td align="left">' . $iCreateTime . '</td>
							</tr>';
        }
        $str_explode .= '</table>';
        $str_explode .= "</body></html>";
        echo $str_explode;
    }
Beispiel #5
0
    /**
     * 导出
     */
    public function explodeAction()
    {
        $uWhere = array();
        $aParam = $this->getParams();
        $userid = '';
        if (!empty($aParam['sUserRealName'])) {
            $uWhere['sRealName LIKE'] = '%' . $aParam['sUserRealName'] . '%';
            $data_user = Model_User::getAll(array('where' => $uWhere));
            $useridArr = array();
            foreach ($data_user as $val) {
                if ($val['iUserID'] != '') {
                    $useridArr[] = $val['iUserID'];
                }
            }
            if (count($useridArr) > 0) {
                $userid = implode(',', array_unique($useridArr));
            }
        }
        $aWhere = array();
        if (!empty($aParam['iUserID'])) {
            $aWhere['iUserID'] = $aParam['iUserID'];
        }
        if ($userid != '') {
            $aWhere['iUserID IN'] = $userid;
        }
        if (!empty($aParam['sAdName']) && $aParam['sAdName'] != '') {
            $aWhere['sAdName LIKE'] = '%' . $aParam['sAdName'] . '%';
        }
        if (!empty($aParam['iMediaType']) && $aParam['iMediaType'] != '') {
            $aWhere['iMediaType'] = $aParam['iMediaType'];
        }
        if (!empty($aParam['iAdType']) && $aParam['iAdType'] != '') {
            $aWhere['iAdType'] = $aParam['iAdType'];
        }
        if (!empty($aParam['iPayStatus']) && $aParam['iPayStatus'] != '') {
            $aWhere['iPayStatus'] = $aParam['iPayStatus'];
        }
        if (!empty($aParam['iStatus']) && $aParam['iStatus'] != '') {
            $aWhere['iStatus'] = $aParam['iStatus'];
        } else {
            $aWhere['iStatus IN'] = '1,2,3,4,5';
        }
        $aList = Model_Ad::getAll(array('where', $aWhere));
        foreach ($aList['aList'] as $key => $val) {
            //媒体类型
            if ($val['iMediaType'] == '1') {
                $aList['aList'][$key]['iMediaType'] = '公众号';
            } elseif ($val['iMediaType'] == '2') {
                $aList['aList'][$key]['iMediaType'] = '朋友圈';
            } elseif ($val['iMediaType'] == '3') {
                $aList['aList'][$key]['iMediaType'] = '新浪微博';
            } elseif ($val['iMediaType'] == '4') {
                $aList['aList'][$key]['iMediaType'] = '新闻论坛';
            }
            //广告类型
            if ($val['iAdType'] == '1') {
                $aList['aList'][$key]['iAdType'] = '硬广';
            } elseif ($val['iAdType'] == '2') {
                $aList['aList'][$key]['iAdType'] = '软广';
            } elseif ($val['iAdType'] == '3') {
                $aList['aList'][$key]['iAdType'] = '全部';
            }
            //支付状态
            if ($val['iPayStatus'] == '0') {
                $aList['aList'][$key]['iPayStatus'] = '未付款';
            } elseif ($val['iPayStatus'] == '1') {
                $aList['aList'][$key]['iPayStatus'] = '已付款';
            }
            //状态
            if ($val['iStatus'] == '1') {
                $aList['aList'][$key]['iStatus'] = '待审核';
            } elseif ($val['iStatus'] == '2') {
                $aList['aList'][$key]['iStatus'] = '审核通过';
            } elseif ($val['iStatus'] == '3') {
                $aList['aList'][$key]['iStatus'] = '审核未通过';
            } elseif ($val['iStatus'] == '4') {
                $aList['aList'][$key]['iStatus'] = '完成';
            } elseif ($val['iStatus'] == '5') {
                $aList['aList'][$key]['iStatus'] = '全未填写完成';
            }
            //城市
            if ($val['sCityID'] != '') {
                $data_City = Model_City::getAll(array('where' => array('iCityID IN' => $val['sCityID'])));
                $sCityID = '';
                if (count($data_City) > 0) {
                    foreach ($data_City as $val_City) {
                        $sCityID .= ',' . $val_City['sCityName'];
                    }
                }
                $aList['aList'][$key]['sCityID'] = $sCityID;
            }
            //媒体分类
            if ($val['sCatID'] != '') {
                $data_Cat = Model_Domain::getAll(array('where' => array('iAutoID IN' => $val['sCatID'])));
                $sCatID = '';
                if (count($data_Cat) > 0) {
                    foreach ($data_Cat as $val_City) {
                        $sCatID .= ',' . $val_City['sName'];
                    }
                }
                $aList['aList'][$key]['sCatID'] = $sCatID;
            }
            //资源广告内容
            $rowAd = array();
            if ($val['iMediaType'] == Model_Media::TYPE_WEIXIN) {
                $rowAd = Model_AdWeixin::getDetail($val['iAdID']);
                $iPosID = $rowAd['iAdPos'];
            } elseif ($val['iMediaType'] == Model_Media::TYPE_FRIEND) {
                $rowAd = Model_AdFriend::getDetail($val['iAdID']);
                $iPosID = $rowAd['iAdPos'];
            } elseif ($val['iMediaType'] == Model_Media::TYPE_WEIBO) {
                $rowAd = Model_AdWeibo::getDetail($val['iAdID']);
                $iPosID = $rowAd['iAdPos'];
            } elseif ($val['iMediaType'] == Model_Media::TYPE_NEWS) {
                $rowAd = Model_AdNews::getDetail($val['iAdID']);
                $iPosID = $rowAd['iAdPos'];
            }
            $aList['aList'][$key]['Media'] = $rowAd;
            //广告位
            $aTitle = array(Model_Media::TYPE_WEIXIN => array('1' => '单图文报价', '2' => '第一条报价', '3' => '第二条报价', '4' => '其它位置价'), Model_Media::TYPE_FRIEND => array('1' => '转发报价', '2' => '直发报价'), Model_Media::TYPE_WEIBO => array('1' => '转发报价', '2' => '直发报价'));
            if ($val['iMediaType'] != '') {
                $iPos = $aTitle[$val['iMediaType']][$iPosID];
                $aList['aList'][$key]['sPos'] = $iPos;
            }
        }
        header("Content-type:application/vnd.ms-excel");
        header("Content-Disposition:filename=广告_" . date('Y-m-d', time()) . ".xls");
        $str_explode = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><title>导出</title><style>td{text-align:center;font-size:12px;font-family:Arial, Helvetica, sans-serif;border:#1C7A80 1px solid;color:#152122;width:100px;}table,tr{border-style:none;}.title{background:#7DDCF0;color:#FFFFFF;font-weight:bold;}</style></head><body>";
        $str_explode .= '<table cellspacing="0" cellpadding="3" rules="rows" border="1" id="" style="border-style:None;width:100%;border-collapse:collapse;">
							<tr>
								<th scope="col">用户名称/th>
								<th scope="col">广告名称</th>
								<th scope="col">最小投放预算</th>
								<th scope="col">最大投放预算</th>
								<th scope="col">投放时间</th>
								<th scope="col">媒体类型</th>
								<th scope="col">广告类型</th>
								<th scope="col">媒体分类</th>
								<th scope="col">所在城市</th>
								<th scope="col">总价</th>
								<th scope="col">支付状态</th>
								<th scope="col">状态</th>
								<th scope="col">时间</th>
							</tr>';
        foreach ($aList as $key => $val) {
            $row = Model_User::getDetail($val['iUserID']);
            $sUserRealName = isset($row) && $row['sRealName'] != '' ? $row['sRealName'] : '';
            $iCreateTime = date('Y-m-d H:i:s', $val['iCreateTime']);
            $iPlanTime = isset($val['iPlanTime']) && $val['iPlanTime'] != '' ? date('Y-m-d H:i:s', $val['iPlanTime']) : '';
            $str_explode .= '<tr>
								<td align="left">' . $sUserRealName . '</td>
								<td align="left">' . $val['sAdName'] . '</td>
								<td align="left">' . $val['iPlanMinMoney'] . '</td>
								<td align="left">' . $val['iPlanMaxMoney'] . '</td>
								<td align="left">' . $val['iPlanTime'] . '</td>
								<td align="left">' . $val['iMediaType'] . '</td>
								<td align="left">' . $val['iAdType'] . '</td>
								<td align="left">' . $val['sCatID'] . '</td>
								<td align="left">' . $val['sCityID'] . '</td>
								<td align="left">' . $val['iTotalMoney'] . '</td>
								<td align="left">' . $val['iPayStatus'] . '</td>
								<td align="left">' . $val['iStatus'] . '</td>
								<td align="left">' . $iCreateTime . '</td>
							</tr>';
        }
        $str_explode .= '</table>';
        $str_explode .= "</body></html>";
        echo $str_explode;
    }
Beispiel #6
0
 public function users()
 {
     $this->view["users"] = Model_User::getAll();
     return View::factory('templates/admin/users/list', $this->view);
 }
Beispiel #7
0
    /**
     * 导出
     */
    public function explodeAction()
    {
        $uWhere = array();
        $aParam = $this->getParams();
        $userid = '';
        if (!empty($aParam['sRealName'])) {
            $uWhere['sRealName LIKE'] = '%' . $aParam['sRealName'] . '%';
            $data_user = Model_User::getAll(array('where' => $uWhere));
            $useridArr = array();
            foreach ($data_user as $val) {
                if ($val['iUserID'] != '') {
                    $useridArr[] = $val['iUserID'];
                }
            }
            if (count($useridArr) > 0) {
                $userid = implode(',', array_unique($useridArr));
            }
        }
        $aWhere = array();
        if (!empty($aParam['iUserID'])) {
            $aWhere['iUserID'] = $aParam['iUserID'];
        }
        if ($userid != '') {
            $aWhere['iUserID IN'] = $userid;
        }
        if (!empty($aParam['iPayment']) && $aParam['iPayment'] != '') {
            $aWhere['iPayment'] = $aParam['iPayment'];
        }
        if (!empty($aParam['iSource']) && $aParam['iSource'] != '') {
            $aWhere['iSource'] = $aParam['iSource'];
        }
        if (!empty($aParam['sRealName']) && $aParam['sRealName'] != '') {
            $aWhere['sRealName LIKE'] = '%' . $aParam['sRealName'] . '%';
        }
        if (!empty($aParam['iPayType']) && $aParam['iPayType'] != '') {
            $aWhere['iPayType'] = $aParam['iPayType'];
        }
        if (!empty($aParam['iPayStatus']) && $aParam['iPayStatus'] != '') {
            $aWhere['iPayStatus'] = $aParam['iPayStatus'];
        }
        $aList = Model_AdMedia::getAll(array('where', $aWhere));
        header("Content-type:application/vnd.ms-excel");
        header("Content-Disposition:filename=资源订单_" . date('Y-m-d', time()) . ".xls");
        $str_explode = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><title>导出</title><style>td{text-align:center;font-size:12px;font-family:Arial, Helvetica, sans-serif;border:#1C7A80 1px solid;color:#152122;width:100px;}table,tr{border-style:none;}.title{background:#7DDCF0;color:#FFFFFF;font-weight:bold;}</style></head><body>";
        $str_explode .= '<table cellspacing="0" cellpadding="3" rules="rows" border="1" id="" style="border-style:None;width:100%;border-collapse:collapse;">
							<tr>
								<th scope="col">用户名称/th>
								<th scope="col">广告名称</th>
								<th scope="col">资源媒体名称</th>
								<th scope="col">广告位</th>
								<th scope="col">价格</th>
								<th scope="col">执行时间</th>
								<th scope="col">支付状态</th>
								<th scope="col">状态</th>
								<th scope="col">时间</th>
							</tr>';
        foreach ($aList as $key => $val) {
            $aAd = Model_Ad::getDetail($val['iAdID']);
            //资源
            $aMedia = Model_Media::getDetail($val['iMediaID']);
            $sMediaName = $aMedia['sMediaName'];
            //用户
            $aUser = Model_User::getDetail($val['iUserID']);
            $sEmail = $aUser['sEmail'];
            //广告位
            $aTitle = array(Model_Media::TYPE_WEIXIN => array('1' => '单图文报价', '2' => '第一条报价', '3' => '第二条报价', '4' => '其它位置价'), Model_Media::TYPE_FRIEND => array('1' => '转发报价', '2' => '直发报价'), Model_Media::TYPE_WEIBO => array('1' => '转发报价', '2' => '直发报价'));
            $iPos = '';
            if ($aAd['iMediaType'] != '') {
                $iPos = $aTitle[$aAd['iMediaType']][$val['iPos']];
            }
            //支付状态
            $iPayStatusName = '';
            if ($val['iPayStatus'] == '0') {
                $iPayStatusName = '未支付';
            } elseif ($val['iPayStatus'] == '1') {
                $iPayStatusName = '已支付';
            }
            $iMoney = $val['iMoney'];
            $iPlanTime = '';
            if ($val['iPlanTime'] != '' && $val['iPlanTime'] > 0) {
                $iPlanTime = date('Y-m-d H:i', $val['iPlanTime']);
            }
            //状态
            $iStatusName = '';
            if ($val['iStatus'] == '1') {
                $iStatusName = '等待接单';
            } elseif ($val['iStatus'] == '2') {
                $iStatusName = '等待执行';
            } elseif ($val['iStatus'] == '3') {
                $iStatusName = '执行中';
            } elseif ($val['iStatus'] == '4') {
                $iStatusName = '已完成';
            } elseif ($val['iStatus'] == '5') {
                $iStatusName = '拒绝接单';
            }
            $iCreateTime = date('Y-m-d H:i:s', $val['iCreateTime']);
            $str_explode .= '<tr>
								<td align="left">' . $sEmail . '</td>
								<td align="left">' . $aAd['sAdName'] . '</td>
								<td align="left">' . $sMediaName . '</td>
								<td align="left">' . $iPos . '</td>
								<td align="left">' . $iMoney . '</td>
								<td align="left">' . $iPlanTime . '</td>
								<td align="left">' . $iPayStatusName . '</td>
								<td align="left">' . $iStatusName . '</td>
								<td align="left">' . $iCreateTime . '</td>
							</tr>';
        }
        $str_explode .= '</table>';
        $str_explode .= "</body></html>";
        echo $str_explode;
    }