Ejemplo n.º 1
0
 /**
  * 推广详情
  */
 public function adAction()
 {
     $iAdID = (int) $this->getParam('id', 0);
     $aAd = Model_Ad::getDetail($iAdID);
     if (empty($aAd)) {
         return $this->show404();
     }
     $aSetting = Model_Ad::getSetting($aAd);
     if (!empty($aSetting) && isset($aSetting['sForwardImg'])) {
         $aSetting['aForwardImg'] = explode(',', $aSetting['sForwardImg']);
     }
     $aList = Model_AdMedia::getAll(array('iAdID' => $iAdID, 'iChoose' => 1, 'iStatus >' => 0));
     foreach ($aList as $k => &$aRow) {
         $aRow['aAd'] = Model_Ad::getDetail($aRow['iAdID']);
         $aRow['aMedia'] = Model_Media::getDetail($aRow['iMediaID']);
     }
     $this->assign('aStatus', Model_AdMedia::$aStatus);
     $this->assign('aTitle', Model_Media::$aPos[$aAd['iMediaType']]);
     $this->assign('aSetting', $aSetting);
     $this->assign('aAd', $aAd);
     $this->assign('aList', $aList);
     $this->assign('iType', $this->getParam('type', 1));
     $this->setMeta('ad_add', array('sTitle' => '添加推广计划 - 支付详情'));
 }
Ejemplo n.º 2
0
Archivo: Ad.php Proyecto: pancke/yyaf
 /**
  * 支付款项
  */
 public function add4Action()
 {
     if ($this->isPost()) {
         $iAdID = $this->getParam('iAdID');
         $aChoose = $this->getParam('aChoose');
         $aAdPos = $this->getParam('aAdPos');
         $aAd = Model_Ad::getDetail($iAdID);
         if (empty($aAd) || $aAd['iUserID'] != $this->aCurrUser['iUserID']) {
             return $this->show404();
         }
         if (empty($aChoose)) {
             return $this->showMsg('请至少选择一个自媒体', false);
         }
         Model_AdMedia::updChoose($iAdID, $aChoose, $aAdPos);
         return $this->showMsg($iAdID, true);
     } else {
         $iAdID = intval($this->getParam('id'));
         $aAd = Model_Ad::getDetail($iAdID);
         if (empty($aAd) || $aAd['iUserID'] != $this->aCurrUser['iUserID']) {
             return $this->show404();
         }
         $aList = Model_AdMedia::getAll(array('where' => array('iAdID' => $iAdID, 'iStatus !=' => 0)));
         $iTotalMoney = $iTotalMedia = 0;
         foreach ($aList as $k => &$v) {
             $v['aMedia'] = Model_Media::getDetail($v['iMediaID']);
             if (empty($v['aMedia'])) {
                 unset($aList[$k]);
             }
             if ($v['iChoose']) {
                 $iTotalMoney += $v['iMoney'];
                 $iTotalMedia += 1;
             }
         }
         $this->assign('iTotalMoney', $iTotalMoney);
         $this->assign('iTotalMedia', $iTotalMedia);
         $this->assign('aList', $aList);
         $this->assign('aAd', $aAd);
         $this->assign('aStatus', Model_AdMedia::$aStatus);
         $this->assign('aPos', Model_Media::$aPos[$aAd['iMediaType']]);
         $this->assign('aType', Model_Media::$aType);
         $this->assign('sMediaType', Model_Media::$aType[$aAd['iMediaType']]);
         $this->assign('sTopMenu', 'aadd');
         $this->setMeta('ad_add', array('sTitle' => '添加推广计划 - 支付款项'));
     }
 }
Ejemplo n.º 3
0
Archivo: Adsh.php Proyecto: pancke/yyaf
    /**
     * 导出
     */
    public function adexplodeAction()
    {
        $iAdID = intval($this->getParam('id'));
        $aAd = Model_Ad::getDetail($iAdID);
        //类别
        $aCat = '';
        if ($aAd['sCatID'] != '') {
            $rowCat = Model_Domain::getAll(array('where' => array('iAutoID IN' => $aAd['sCatID'])));
            if (count($rowCat) > 0) {
                foreach ($rowCat as $val) {
                    if ($val['sName'] != '') {
                        $aCat .= ',' . $val['sName'];
                    }
                }
            }
        }
        $this->assign('aCat', $aCat);
        //城市
        $aCityName = '';
        if ($aAd['sCityID'] != '') {
            $rowCity = Model_City::getAll(array('where' => array('iCityID IN' => $aAd['sCityID'])));
            if (count($rowCity) > 0) {
                foreach ($rowCity as $val) {
                    if ($val['sName'] != '') {
                        $aCityName .= ',' . $val['sCityName'];
                    }
                }
            }
        }
        $this->assign('aCityName', $aCityName);
        $iType = $aAd['iMediaType'];
        $iTypeName = Model_Media::$aType[$aAd['iMediaType']];
        $this->assign('iTypeName', $iTypeName);
        if ($aAd['iAdType'] == '1') {
            $this->assign('iAdType', '软广');
        } elseif ($aAd['iAdType'] == '2') {
            $this->assign('iAdType', '硬广');
        } elseif ($aAd['iAdType'] == '3') {
            $this->assign('iAdType', '全部');
        }
        if ($aAd['iStatus'] == '1') {
            $this->assign('iStatus', '待审核');
        } elseif ($aAd['iStatus'] == '2') {
            $this->assign('iStatus', '审核通过');
        } elseif ($aAd['iStatus'] == '3') {
            $this->assign('iStatus', '审核未通过');
        } elseif ($aAd['iStatus'] == '4') {
            $this->assign('iStatus', '完成');
        } elseif ($aAd['iStatus'] == '5') {
            $this->assign('iStatus', '未填写完成');
        }
        $aUser = Model_User::getDetail($aAd['iUserID']);
        $this->assign('aUser', $aUser);
        $this->assign('aAd', $aAd);
        //资源广告内容
        if ($aAd['iMediaType'] == Model_Media::TYPE_WEIXIN) {
            $rowAd = Model_AdWeixin::getDetail($aAd['iAdID']);
            $this->assign('type_weixin', Model_Media::TYPE_WEIXIN);
            $iPosID = $rowAd['iAdPos'];
        } elseif ($aAd['iMediaType'] == Model_Media::TYPE_FRIEND) {
            $rowAd = Model_AdFriend::getDetail($aAd['iAdID']);
            $this->assign('type_friend', Model_Media::TYPE_FRIEND);
            $iPosID = $rowAd['iAdPos'];
        } elseif ($aAd['iMediaType'] == Model_Media::TYPE_WEIBO) {
            $rowAd = Model_AdWeibo::getDetail($aAd['iAdID']);
            $this->assign('type_weibo', Model_Media::TYPE_WEIBO);
            $iPosID = $rowAd['iAdPos'];
        } elseif ($aAd['iMediaType'] == Model_Media::TYPE_NEWS) {
            $rowAd = Model_AdNews::getDetail($aAd['iAdID']);
            $this->assign('type_news', Model_Media::TYPE_NEWS);
            $iPosID = $rowAd['iAdPos'];
        }
        //广告位
        $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 ($aAd['iMediaType'] != '') {
            $iPos = $aTitle[$aAd['iMediaType']][$iPosID];
            $this->assign('aPos', $iPos);
        }
        $this->assign('rowAd', $rowAd);
        $aAdMedia = Model_AdMedia::getAll(array('where' => array('iAdID' => $aAd['iAdID'])));
        foreach ($aAdMedia as $key => $val) {
            //资源
            $aMedia = Model_Media::getDetail($val['iMediaID']);
            $aAdMedia[$key]['sMediaName'] = $aMedia['sMediaName'];
            //用户
            $aUser = Model_User::getDetail($val['iUserID']);
            $aAdMedia[$key]['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' => '直发报价'));
            if ($aAd['iMediaType'] != '') {
                $iPos = $aTitle[$aAd['iMediaType']][$val['iPos']];
                $aAdMedia[$key]['iPosName'] = $iPos;
            }
            //支付状态
            if ($val['iPayStatus'] == '0') {
                $aAdMedia[$key]['iPayStatusName'] = '未支付';
            } elseif ($val['iPayStatus'] == '1') {
                $aAdMedia[$key]['iPayStatusName'] = '已支付';
            }
            //状态
            if ($val['iStatus'] == '1') {
                $aAdMedia[$key]['iStatusName'] = '等待接单';
            } elseif ($val['iStatus'] == '2') {
                $aAdMedia[$key]['iStatusName'] = '等待执行';
            } elseif ($val['iStatus'] == '3') {
                $aAdMedia[$key]['iStatusName'] = '执行中';
            } elseif ($val['iStatus'] == '4') {
                $aAdMedia[$key]['iStatusName'] = '已完成';
            } elseif ($val['iStatus'] == '5') {
                $aAdMedia[$key]['iStatusName'] = '拒绝接单';
            }
        }
        $this->assign('aAdMedia', $aAdMedia);
        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>
								<td>用户名称</td>
								<td>' . $aUser['sRealName'] . '</td>
							</tr>
							<tr>
								<td>广告名称</td>
								<td>' . (isset($aAd['sAdName']) ? $aAd['sAdName'] : '') . '</td>
							</tr>
							<tr>
								<td>最小投放预算</td>
								<td>' . (isset($aAd['iPlanMinMoney']) ? $aAd['iPlanMinMoney'] : '') . '</td>
							</tr>
							<tr>
								<td>最大投放预算</td>
								<td>' . (isset($aAd['iPlanMaxMoney']) ? $aAd['iPlanMaxMoney'] : '') . '</td>
							</tr>
							<tr>
								<td>投放时间</td>
								<td>' . (isset($aAd['iPlanTime']) ? $aAd['iPlanTime'] : '') . '</td>
							</tr>
							<tr>
								<td>媒体类型</td>
								<td>' . $iTypeName . '</td>
							</tr>
							<tr>
								<td>广告类型</td>
								<td>' . $iAdType . '</td>
							</tr>
							<tr>
								<td>媒体分类</td>
								<td>' . $aCat . '</td>
							</tr>
							<tr>
								<td>所在城市</td>
								<td>' . $aCityName . '</td>
							</tr>
							<tr>
								<td>总价</td>
								<td>' . (isset($aAd['iTotalMoney']) ? $aAd['iTotalMoney'] : '') . '</td>
							</tr>
							<tr>
								<td>支付类型</td>
								<td>' . (isset($aAd['iPayStatus']) && $aAd['iPayStatus'] == '0' ? '未付款' : '已付款') . '</td>
							</tr>';
        if ($aAd['iMediaType'] == Model_Media::TYPE_WEIXIN) {
            $str_explode .= '<tr>
								<td>广告位</td>
								<td>' . $aPos . '</td>
							</tr>
							<tr>
								<td>显示时间</td>
								<td>' . date('Y-m-d H:i:s', $rowAd['iShowTime']) . '</td>
							</tr>
							<tr>
								<td>导入URL</td>
								<td>' . $rowAd['sImportUrl'] . '</td>
							</tr>
							<tr>
								<td>上传Word</td>
								<td>' . $rowAd['sWordFile'] . '</td>
							</tr>
							<tr>
								<td>标题</td>
								<td>' . $rowAd['sTitle'] . '</td>
							</tr>
							<tr>
								<td>作者</td>
								<td>' . $rowAd['sAuthor'] . '</td>
							</tr>
							<tr>
								<td>封面图片</td>
								<td>' . (isset($rowAd['sCoverImg']) ? Util_Uri::getDFSViewURL($rowAd['sCoverImg'], 130, 130) : '') . '</td>
							</tr>
							<tr>
								<td>摘要</td>
								<td>' . $rowAd['sAbstract'] . '</td>
							</tr>
							<tr>
								<td>内容</td>
								<td>' . $rowAd['sContent'] . '</td>
							</tr>
							<tr>
								<td>原链接</td>
								<td>' . $rowAd['sOriginalUrl'] . '</td>
							</tr>';
        } elseif ($aAd['iMediaType'] == Model_Media::TYPE_FRIEND) {
            $str_explode .= '<tr>
								<td>投放形式</td>
								<td>' . $aPos . '</td>
							</tr>
							<tr>
								<td>转发链接</td>
								<td>' . $rowAd['sForwardUrl'] . '</td>
							</tr>
							<tr>
								<td>转发文字</td>
								<td>' . $rowAd['sForwardText'] . '</td>
							</tr>
							<tr>
								<td>转发配图</td>
								<td>';
            if ($rowAd['sForwardImg'] != '') {
                $arr = explode(',', $rowAd['sForwardImg']);
                if (count($arr) > 0) {
                    foreach ($arr as $v) {
                        $str_explode .= '<img src="' . Util_Uri::getDFSViewURL($v, 130, 130) . '" width="130" />';
                    }
                } else {
                    $str_explode .= '<img src="' . Util_Uri::getDFSViewURL($rowAd['sOriginalUrl'], 130, 130) . '" width="130" />';
                }
            }
            $str_explode .= '</td>
							</tr>';
        } elseif ($aAd['iMediaType'] == Model_Media::TYPE_WEIBO) {
            $str_explode .= '<tr>
								<td>投放形式</td>
								<td>' . $aPos . '</td>
							</tr>
							<tr>
								<td>转发链接</td>
								<td>' . $rowAd['sForwardUrl'] . '</td>
							</tr>
							<tr>
								<td>转发文字</td>
								<td>' . $rowAd['sForwardText'] . '</td>
							</tr>
							<tr>
								<td>转发配图</td>
								<td>';
            if ($rowAd['sForwardImg'] != '') {
                $arr = explode(',', $rowAd['sForwardImg']);
                if (count($arr) > 0) {
                    foreach ($arr as $v) {
                        $str_explode .= '<img src="' . Util_Uri::getDFSViewURL($v, 130, 130) . '" width="130" />';
                    }
                } else {
                    $str_explode .= '<img src="' . Util_Uri::getDFSViewURL($rowAd['sForwardImg'], 130, 130) . '" width="130" />';
                }
            }
            $str_explode .= '</td>
							</tr>';
        } elseif ($aAd['iMediaType'] == Model_Media::TYPE_NEWS) {
            $str_explode .= '<tr>
								<td>投放形式</td>
								<td>' . $aPos . '</td>
							</tr>
							<tr>
								<td>标题</td>
								<td>' . $rowAd['sTitle'] . '</td>
							</tr>
							<tr>
								<td>内容</td>
								<td>' . $rowAd['sContent'] . '</td>
							</tr>';
        }
        $str_explode .= '<tr>
								<td>状态</td>
								<td>' . $iStatus . '</td>
							</tr>
							<tr>
								<td>资源列表</td>
								<td>
									<table cellspacing="0" cellpadding="3" rules="rows" border="1" id="" style="border-style:None;width:100%;border-collapse:collapse;">
										<tr>
											<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">#</td>
											<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">用户名称</td>
											<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">媒体名称</td>
											<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">广告位</td>
											<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">价格</td>
											<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">执行时间</td>
											<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">支付状态</td>
											<td style="border-bottom: 1px solid #000000;">状态</td>
										</tr>';
        foreach ($aAdMedia as $keyAdMedia => $valAdMedia) {
            $iAutoID = $valAdMedia['iAutoID'];
            $sEmail = $valAdMedia['sEmail'];
            $sMediaName = $valAdMedia['sMediaName'];
            $iPosName = $valAdMedia['iPosName'];
            $iMoney = $valAdMedia['iMoney'];
            $iPlanTime = '';
            if ($valAdMedia['iPlanTime'] != '' && $valAdMedia['iPlanTime'] > 0) {
                $iPlanTime = date('Y-m-d', $valAdMedia['iPlanTime']);
            }
            $iPayStatusName = $valAdMedia['iPayStatusName'];
            $iStatusName = $valAdMedia['iStatusName'];
            $str_explode .= '<tr>
														<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">' . $iAutoID . '</td>
														<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">' . $sEmail . '</td>
														<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">' . $sMediaName . '</td>
														<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">' . $iPosName . '</td>
														<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">' . $iMoney . '</td>
														<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">' . $iPlanTime . '</td>
														<td style="border-right: 1px solid #000000;border-bottom: 1px solid #000000;">' . $iPayStatusName . '</td>
														<td style="border-bottom: 1px solid #000000;">' . $iStatusName . '</td>
													</tr>';
        }
        $str_explode .= '</table>
								</td>
							</tr>
							<tr>
								<td>更新时间</td>
								<td>' . date('Y-m-d H:i:s', $aAd['iUpdateTime']) . '</td>
							</tr>
							<tr>
								<td>创建时间</td>
								<td>' . date('Y-m-d H:i:s', $aAd['iCreateTime']) . '</td>
							</tr>';
        $str_explode .= '</table>';
        $str_explode .= "</body></html>";
        echo $str_explode;
    }
Ejemplo n.º 4
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;
    }