Browse Source

remove yft

Anankke 6 years ago
parent
commit
d19dc0b5a2

+ 0 - 16
app/Command/FinanceMail.php

@@ -175,22 +175,6 @@ class FinanceMail
             $income_count += 1;
             $income_total += $code['number'];
         }
-        $datatables2 = new Datatables(new DatatablesHelper());
-        $datatables2->query('select COUNT(*) as "count_yft" from INFORMATION_SCHEMA.TABLES where TABLE_NAME = "yft_order_info"');
-        $count_yft = $datatables2->generate();
-        if (strpos($count_yft, '"count_yft":1')) {
-            $datatables2->query(
-                'select yft_order_info.price from yft_order_info
-				where date_format(yft_order_info.create_time,\'%Y-%m\') =date_format(date_sub(curdate(), interval 1 month),\'%Y-%m\') and yft_order_info.state= 1');
-            //每周的第一天是周日,因此统计周日~周六的七天
-            $text_json2 = $datatables2->generate();
-            $text_array2 = json_decode($text_json2, true);
-            $codes2 = $text_array2['data'];
-            foreach ($codes2 as $code2) {
-                $income_count += 1;
-                $income_total += $code2['price'];
-            }
-        }
         $text_html .= '<br>上月总收入笔数:' . $income_count . '<br>上月总收入金额:' . $income_total;
 
         $adminUser = User::where("is_admin", "=", "1")->get();

+ 0 - 119
app/Controllers/QuickPayFunction.php

@@ -1,119 +0,0 @@
-<?php
-
-namespace App\Controllers;
-
-class QuickPayFunction
-{
-    public function md5Verify($p1, $p2, $p3, $p4, $sign)
-    {
-        $preStr = $p1 . $p2 . $p3 . $p4 . "yft";
-        $mySign = md5($preStr);
-        if ($mySign == $sign) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * 建立请求,以表单HTML形式构造(默认)
-     * @param $para_temp 请求参数数组
-     *
-     */
-    public function buildRequestForm($para_temp, $ss_order_no, $pay_config)
-    {
-        //待请求参数数组
-        $para = QuickPayFunction::buildRequestPara($para_temp);
-
-
-        $sHtml = "<form id='paysubmit' name='paysubmit' action='https://pay.anypay.me/pay/subOrder/zfb' accept-charset='utf-8' method='POST'>";
-        while (list ($key, $val) = each($para)) {
-            $sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";
-        }
-        if ($pay_config->pay_config["type"] == "aliPay") {
-            $sHtml .= "<input type='hidden' name='subject' value='余额充值'/>";
-        } else {
-            $sHtml .= "<input type='hidden' name='trade_no' value='" . $ss_order_no . "'/>";
-        }
-        //submit按钮控件请不要含有name属性
-        $sHtml = $sHtml . "</form>";
-
-        $sHtml = $sHtml . "<script>document.forms['paysubmit'].submit();</script>";
-
-        return $sHtml;
-    }
-
-    /**
-     * 生成要请求给云通付的参数数组
-     * @param $para_temp 请求前的参数数组
-     * @return 要请求的参数数组
-     */
-    static function buildRequestPara($para_temp)
-    {
-        //除去待签名参数数组中的空值和签名参数
-        $para_filter = QuickPayFunction::paraFilter($para_temp);
-        //生成签名结果
-        $mysign = QuickPayFunction::buildRequestMysign($para_filter);
-
-        //签名结果与签名方式加入请求提交参数组中
-        $para_filter['sign'] = $mysign;
-
-        return $para_filter;
-    }
-
-    /**
-     * 除去数组中的空值和签名参数
-     * @param $para 签名参数组
-     * return 去掉空值与签名参数后的新签名参数组
-     */
-    static function paraFilter($para)
-    {
-        $para_filter = array();
-        while (list ($key, $val) = each($para)) {
-            if ($key == "sign" || $val == "") continue;
-            else    $para_filter[$key] = $para[$key];
-        }
-        return $para_filter;
-    }
-
-    /**
-     * 生成签名结果
-     * @param $para_filter 要签名的数组
-     * return 签名结果字符串
-     */
-    static function buildRequestMysign($para_filter)
-    {
-        //把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
-        $prestr = QuickPayFunction::createLinkstring($para_filter);
-        $mysign = MD5($prestr);
-        return $mysign;
-    }
-
-    static function md5Sign($prestr)
-    {
-        return md5($prestr);
-    }
-
-    /**
-     * 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
-     * @param $para 需要拼接的数组
-     * return 拼接完成以后的字符串
-     */
-    static function createLinkstring($para)
-    {
-        $arg = "";
-        while (list ($key, $val) = each($para)) {
-            $arg .= $key . "=" . $val . "&";
-        }
-        //去掉最后一个&字符
-        $arg = substr($arg, 0, count($arg) - 2);
-
-        //如果存在转义字符,那么去掉转义
-        if (get_magic_quotes_gpc()) {
-            $arg = stripslashes($arg);
-        }
-
-        return $arg;
-    }
-
-}

+ 0 - 17
app/Models/YftOrder.php

@@ -1,17 +0,0 @@
-<?php
-/**
- * Created by 傲慢与偏见.
- * OSUser: D-L
- * Date: 2017/10/22
- * Time: 21:09
- */
-
-namespace App\Models;
-
-
-class YftOrder extends Model
-{
-    protected $connection = "default";
-    protected $table = "yft_order_info";
-    protected $primaryKey = 'id';
-}

+ 0 - 281
app/Services/Gateway/YftPay.php

@@ -1,281 +0,0 @@
-<?php
-/**
- * Created by 傲慢与偏见.
- * OSUser: D-L
- * Date: 2017/10/12
- * Time: 21:08
- */
-
-namespace App\Services\Gateway;
-
-use App\Models\Payback;
-use App\Models\User;
-use App\Models\YftOrder;
-use App\Services\Auth;
-use App\Services\View;
-use App\Utils\Telegram;
-use App\Services\Config;
-use App\Controllers\QuickPayFunction;
-
-class YftPay extends AbstractPayment
-{
-    private $user;
-
-    public function __construct()
-    {
-        $this->user = Auth::getUser();
-    }
-
-    public function yft($request, $response, $args)
-    {
-        $price = $request->getParams()['price'];
-        return View::getSmarty()->assign('price', $price)->display('user/yft.tpl');
-    }
-
-    public function yftOrder($request, $response, $args)
-    {
-        $pageNum = 1;
-        if (isset($request->getQueryParams()["page"])) {
-            $pageNum = $request->getQueryParams()["page"];
-        }
-        $orderList = YftOrder::where("user_id", $this->user->id)->orderBy("id", "asc")->paginate(15, ['*'], 'page', $pageNum);
-        $count = sizeof(YftOrder::where("user_id", $this->user->id)->get());
-        $countPage = ceil($count / 15);
-        $orderList->setPath('/user/yftOrder');
-
-        return View::getSmarty()->assign('orderList', $orderList)->assign('countPage', $countPage)->assign('currentPage', $pageNum)->display('user/yftOrder.tpl');
-    }
-
-    /**
-     * @desc 管理员查看所有充值记录
-     * @param $request
-     * @param $response
-     * @param $args
-     * @return mixed
-     */
-    public function yftOrderForAdmin($request, $response, $args)
-    {
-        $pageNum = 1;
-        if (isset($request->getQueryParams()["page"])) {
-            $pageNum = $request->getQueryParams()["page"];
-        }
-        $orderList = YftOrder::where("price", ">=", 0)->orderBy("id", "asc")->paginate(15, ['*'], 'page', $pageNum);
-        $count = sizeof(YftOrder::where("price", ">=", 0)->get());
-        $countPage = ceil($count / 15);
-        $orderList->setPath('/admin/yftOrder');
-
-        return View::getSmarty()->assign('orderList', $orderList)->assign('countPage', $countPage)->assign('currentPage', $pageNum)->display('admin/yftOrder.tpl');
-    }
-
-    public function purchase($request, $response, $args)
-    {
-        return $this->constructPayPara($request);
-    }
-
-    public function yftPay($request, $response, $args)
-    {
-        return $this->constructPayPara($request);
-    }
-
-    public function notify($request, $response, $args)
-    {
-        $newResponse = $response->withStatus(302)->withHeader('Location', '/user/code');
-        $yftLib = new QuickPayFunction();
-        $pay_config = new YftPayConfig();
-        $pay_config->init();
-
-        //价格
-        $total_fee = $request->getQueryParams()["total_fee"];//必填
-        //易付通返回的订单号
-        $yft_order_no = $request->getQueryParams()["trade_no"];
-        //面板生成的订单号
-        $ss_order_no = $request->getQueryParams()["out_trade_no"];//必填
-        //订单说明
-        $subject = $request->getQueryParams()["subject"];//必填
-        //付款状态
-        $trade_status = $request->getQueryParams()["trade_status"];//必填
-        //加密验证字符串
-        $sign = $request->getQueryParams()["sign"];//必填
-
-        $verifyNotify = $yftLib->md5Verify(floatval($total_fee), $ss_order_no, $yft_order_no, $trade_status, $sign);
-        if ($verifyNotify) {//验证成功
-            if ($trade_status == 'TRADE_SUCCESS') {
-                /*
-                加入您的入库及判断代码;
-                >>>>>>>!!!为了保证数据传达到回调地址,会请求4次。所以必须要先判断订单状态,然后再插入到数据库,这样后面即使请求3次,也不会造成订单重复!!!!<<<<<<<
-                判断返回金额与实金额是否想同;
-                判断订单当前状态;
-                完成以上才视为支付成功
-                */
-                $orderInfo = new YftOrder();
-                $orderInfo = $orderInfo->where("ss_order", "=", $ss_order_no)->first();
-                if ($orderInfo == "" || $orderInfo == null) {
-                    return "fail";
-                }
-
-                if ($orderInfo->price != $total_fee) {
-                    return "fail";
-                }
-
-                $userInfo = new User();
-                $userInfo = $userInfo->where("id", "=", $orderInfo->user_id)->first();
-
-                if (sizeof($orderInfo) != 0 && $orderInfo->state == 0) {
-                    $oldMoney = $userInfo->money;
-                    $userInfo->money = $total_fee + $oldMoney;
-                    //更新用户余额信息
-                    $userInfo->save();
-                    //更新订单信息
-                    $orderInfo->yft_order = $yft_order_no;
-                    $orderInfo->state = 1;
-                    $orderInfo->save();
-                    //充值返利处理 start
-                    if ($userInfo->ref_by != "" && $userInfo->ref_by != 0 && $userInfo->ref_by != null && Config::get('code_payback') != 0 && Config::get('code_payback') != null) {
-                        $gift_user = User::where("id", "=", $userInfo->ref_by)->first();
-                        $gift_user->money = ($gift_user->money + ($total_fee * (Config::get('code_payback') / 100)));
-                        $gift_user->save();
-
-                        $Payback = new Payback();
-                        $Payback->total = $total_fee;
-                        $Payback->userid = $userInfo->id;
-                        $Payback->ref_by = $userInfo->ref_by;
-                        $Payback->ref_get = $total_fee * (Config::get('code_payback') / 100);
-                        $Payback->datetime = time();
-                        $Payback->save();
-                    }
-                    //充值返利处理 end
-                    //telegram提醒
-                    if (Config::get('enable_donate') == 'true' && Config::get("enable_telegram") == 'true') {
-                        if ($userInfo->is_hide == 1) {
-                            Telegram::Send("感谢!一位不愿透露姓名的大老爷给我们捐了 " . $total_fee . " 元呢~");
-                        } else {
-                            Telegram::Send("感谢!" . $userInfo->user_name . " 大老爷给我们捐了 " . $total_fee . " 元呢~");
-                        }
-                    }
-                } else {
-                    return "success";
-                }
-                return "success";
-            } else {
-                return "fail";
-            }
-        } else {
-            //验证失败
-            return "fail";
-        }
-    }
-
-    public function getPurchaseHTML()
-    {
-        return '
-                    <div class="card-main">
-                        <div class="card-inner">
-                            <form action="/user/code/yft" method="post" target="_blank">
-                                
-                                    <p class="card-heading">在线充值</p>
-                                    <div class="form-group form-group-label">
-                                        <label class="floating-label" for="price">充值金额</label>
-                                        <input class="form-control" id="price" name="price" type="text">
-                                    </div>
-                                
-                                <div class="card-action">
-                                    <div class="card-action-btn pull-left">
-                                        <button type="submit" class="btn btn-flat waves-attach" id="yftCoin" ><span class="icon">check</span>&nbsp;充值</button>
-                                    </div>
-                                </div>
-                            </form>
-                        </div>
-					</div>
-				';
-    }
-
-    public function getReturnHTML($request, $response, $args)
-    {
-        // TODO: Implement getReturnHTML() method.
-    }
-
-    public function getStatus($request, $response, $args)
-    {
-        // TODO: Implement getStatus() method.
-    }
-
-    /**
-     * @param $request
-     * @return string
-     */
-    private function constructPayPara($request)
-    {
-        $yftLib = new QuickPayFunction();
-        $pay_config = new YftPayConfig();
-        $pay_config->init();
-
-        /**************************请求参数**************************/
-
-        //订单名称
-        $subject = $request->getParams()['subject'];//必填
-
-        //付款金额
-        $total_fee = $request->getParams()['total_fee'];//必填 需为整数
-
-        //服务器异步通知页面路径
-        $notify_url = $request->getUri()->getScheme() . "://" . $request->getUri()->getHost() . $pay_config->pay_config['notify_url'];
-
-        //需http://格式的完整路径,不能加?id=123这类自定义参数
-
-        //页面跳转同步通知页面路径
-        $return_url = $request->getUri()->getScheme() . "://" . $request->getUri()->getHost() . $pay_config->pay_config["return_url"];
-        //需http://格式的完整路径,不能加?id=123这类自定义参数,不能写成http://localhost/
-
-        $secret = Config::get('yft_secret');
-
-        $accesskey = Config::get('yft_accesskey');
-
-        //生成订单号
-        // 密码字符集,可任意添加你需要的字符
-        $date = time();
-        $date = "yft" . date("YmdHis", $date);
-        $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
-        $password = "";
-        for ($i = 0; $i < 8; $i++) {
-            // 这里提供两种字符获取方式
-            // 第一种是使用 substr 截取$chars中的任意一位字符;
-            // 第二种是取字符数组 $chars 的任意元素
-            $password .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
-        }
-        $ss_order_no = $date . $password;
-
-        /************************************************************/
-        //构造要请求的参数数组,无需改动
-        $parameter = [];
-        if ($pay_config->pay_config["type"] == "aliPay") {
-            $parameter = [
-                "total_fee" => $total_fee,
-                "notify_url" => $notify_url,
-                "return_url" => $return_url,
-                "secret" => $secret,
-                "out_trade_no" => $ss_order_no
-            ];
-        } else {
-            $parameter = [
-                "secret" => $secret,
-                "notify_url" => $notify_url,
-                "accesskey" => $accesskey,
-                "return_url" => $return_url,
-                "subject" => $subject,
-                "total_fee" => $total_fee
-            ];
-        }
-
-        //向数据库插入订单信息
-        $yft_order_info = new YftOrder();
-        $yft_order_info->user_id = $this->user->id;
-        $yft_order_info->ss_order = $ss_order_no;
-        $yft_order_info->price = $total_fee;
-        $yft_order_info->state = 0;
-        $yft_order_info->save();
-
-        //建立请求
-        $html_text = $yftLib->buildRequestForm($parameter, $ss_order_no, $pay_config);
-        return $html_text;
-    }
-}

+ 0 - 18
app/Services/Gateway/YftPayConfig.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace App\Services\Gateway;
-
-class YftPayConfig
-{
-
-    public $pay_config;
-
-    public function init()
-    {
-        $this->pay_config = [
-            "notify_url" => "/yft/notify",
-            "return_url" => "/user/code",
-            "type" => "aliPay"
-        ];
-    }
-}

+ 1 - 3
app/Services/Payment.php

@@ -10,7 +10,7 @@ namespace App\Services;
 
 use App\Services\Config;
 use App\Services\Gateway\{
-    AopF2F, Codepay, DoiAMPay, PaymentWall, ChenPay, SPay, TrimePay, YftPay, TomatoPay
+    AopF2F, Codepay, DoiAMPay, PaymentWall, ChenPay, SPay, TrimePay, TomatoPay
 };
 
 class Payment
@@ -31,8 +31,6 @@ class Payment
                 return new SPay();
             case("f2fpay"):
                 return new AopF2F();
-            case("yftpay"):
-                return new YftPay();
             case("chenAlipay"):
                 return new ChenPay();
             case("trimepay"):

+ 2 - 6
config/.config.php.example

@@ -29,7 +29,7 @@ $System_Config['db_password'] = 'sspanel';						//用户名对应的密码
 
 
 //邮件设置--------------------------------------------------------------------------------------------
-$System_Config['mailDriver'] = 'none';	//发送邮件方式:none / mailgun / smtp / sendgrid 
+$System_Config['mailDriver'] = 'none';	//发送邮件方式:none / mailgun / smtp / sendgrid
 $System_Config['sendPageLimit']= 50;	//发信分页 解决大站发公告超时问题
 
 # mailgun
@@ -177,7 +177,7 @@ $System_Config['enable_checkin_captcha'] = 'false';	//启用签到验证码
 
 
 //支付系统设置----------------------------------------------------------------------------------------
-#取值 none | codepay | trimepay | f2fpay | yftpay | chenAlipay | paymentwall | spay |tomatopay
+#取值 none | codepay | trimepay | f2fpay | chenAlipay | paymentwall | spay |tomatopay
 $System_Config['payment_system']='none';
 #tomatopay番茄云支付
 #使用教程:https://swapidc.fanqieui.com/?t/329.html  tg群 https://t.me/fanqiepay
@@ -215,10 +215,6 @@ $System_Config['alipay_id']='';
 $System_Config['alipay_key']='';
 $System_Config['amount']=[2,23,233,2333,23333];		//充值金额选项设定
 
-#yftpay,https://pay.anypay.me/
-$System_Config['yft_secret']='';
-$System_Config['yft_accesskey']='';
-
 #alipay,zfbjk.com
 $System_Config['zfbjk_pid']='';
 $System_Config['zfbjk_key']='';

+ 0 - 8
config/routes.php

@@ -75,7 +75,6 @@ $app->get('/404', 'App\Controllers\HomeController:page404');
 $app->get('/405', 'App\Controllers\HomeController:page405');
 $app->get('/500', 'App\Controllers\HomeController:page500');
 $app->post('/notify', 'App\Controllers\HomeController:notify');
-$app->get('/yft/notify', 'App\Services\Gateway\YftPay:notify');//yft uses GET
 $app->get('/tos', 'App\Controllers\HomeController:tos');
 $app->get('/staff', 'App\Controllers\HomeController:staff');
 $app->post('/telegram_callback', 'App\Controllers\HomeController:telegram');
@@ -138,12 +137,6 @@ $app->group('/user', function () {
     $this->get('/logout', 'App\Controllers\UserController:logout');
     $this->get('/backtoadmin', 'App\Controllers\UserController:backtoadmin');
     $this->get('/code', 'App\Controllers\UserController:code');
-    //易付通路由定义 start
-    $this->post('/code/yft/pay', 'App\Services\Gateway\YftPay:yftPay');
-    $this->get('/code/yft/pay/result', 'App\Services\Gateway\YftPay:notify');
-    $this->post('/code/yft', 'App\Services\Gateway\YftPay:yft');
-    $this->get('/yftOrder', 'App\Services\Gateway\YftPay:yftOrder');
-    //易付通路由定义 end
     $this->get('/alipay', 'App\Controllers\UserController:alipay');
     $this->post('/code/f2fpay', 'App\Services\Payment:purchase');
     $this->get('/code/codepay', 'App\Services\Payment:purchase');
@@ -311,7 +304,6 @@ $app->group('/admin', function () {
     $this->get('/sys', 'App\Controllers\AdminController:sys');
     $this->get('/logout', 'App\Controllers\AdminController:logout');
     $this->post('/payback/ajax', 'App\Controllers\AdminController:ajax_payback');
-    $this->get('/yftOrder', 'App\Services\Gateway\YftPay:yftOrderForAdmin');
 })->add(new Admin());
 
 // API

+ 0 - 3
resources/views/material/admin/main.tpl

@@ -123,9 +123,6 @@
 							<li><a href="/admin/shop"><i class="icon icon-lg">shop</i>&nbsp;商品</a></li>
 							<li><a href="/admin/coupon"><i class="icon icon-lg">card_giftcard</i>&nbsp;优惠码</a></li>
 							<li><a href="/admin/bought"><i class="icon icon-lg">shopping_cart</i>&nbsp;购买记录</a></li>
-                            {if $config['payment_system']=='yftpay'}
-							<li><a href="/admin/yftOrder"><i class="icon icon-lg">shopping_cart</i>&nbsp;充值记录</a></li>
-							{/if}
 							{if $config['payment_system']=='chenAlipay'}
 								<li><a href="/admin/editConfig"><i class="icon icon-lg">shopping_cart</i>&nbsp;支付设置</a></li>
 							{/if}

+ 0 - 79
resources/views/material/admin/yftOrder.tpl

@@ -1,79 +0,0 @@
-{include file='admin/main.tpl'}
-
-<main class="content">
-    <div class="content-header ui-content-header">
-        <div class="container">
-            <h1 class="content-heading">充值记录</h1>
-        </div>
-    </div>
-    <div class="container">
-        <div class="col-lg-12 col-sm-12">
-            <section class="content-inner margin-top-no">
-
-                <div class="card">
-                    <div class="card-main">
-                        <div class="card-inner">
-                            <p>系统中充值记录。</p>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="table-responsive">
-                    {$orderList->render()}
-                    <table class="table ">
-                        <tr>
-                            <th>ID</th>
-                            <th>订单号</th>
-                            <th>金额</th>
-                            <th>充值时间</th>
-                            <th>状态</th>
-                        </tr>
-                        {if sizeof($orderList) > 0}
-                            {foreach $orderList as $order}
-                                <tr>
-                                    <td>#{$order->id}</td>
-                                    <td>{$order->yft_order}</td>
-                                    <td>{$order->price} 元</td>
-                                    <td>{$order->create_time}</td>
-                                    {if ($order->state == 1)}<td>已支付</td>{else}<td>未支付</td>{/if}
-                                </tr>
-                            {/foreach}
-                        {else}
-                            <tr>
-                                <td colspan="5">暂无充值记录!</td>
-                            </tr>
-                        {/if}
-                    </table>
-                </div>
-                <span>总共{$countPage}页</span>
-                <input type="hidden" id="countPage" value="{$countPage}">
-                <span>当前第{$currentPage}页</span>
-                <input type="hidden" id="currentPage" value="{$currentPage}">
-                <a class="btn btn-brand" href="/admin/yftOrder">首页</a>
-                <a class="btn btn-brand" href="javascript:void(0)" id="pre" onclick="goto('pre')">上一页</a>
-                <a class="btn btn-brand" href="javascript:void(0)" id="nxt" onclick="goto('next')">下一页</a>
-                <a class="btn btn-brand" href="javascript:void(0)" id="end" onclick="goto('end')">尾页</a>
-        </div>
-    </div>
-</main>
-{include file='admin/footer.tpl'}
-<script>
-    function goto(type) {
-        var countPage = $$.getElementById('countPage').value,
-            currentPage = $$.getElementById('currentPage').value;
-
-        if ("pre" === type) {
-            if (currentPage !== 1 && currentPage !== "") {
-                window.location.href = "/admin/yftOrder?page=" + {$currentPage -1};
-            }
-        } else if ("next" === type) {
-            if (currentPage !== countPage) {
-                window.location.href = "/admin/yftOrder?page=" + {$currentPage +1};
-            }
-        } else if ("end" == type) {
-            if (countPage !== currentPage) {
-                window.location.href = "/admin/yftOrder?page=" + countPage;
-            }
-        }
-    }
-</script>

+ 0 - 7
resources/views/material/user/yft.tpl

@@ -1,7 +0,0 @@
-<form name="paysubmit" action="/user/code/yft/pay" method="post">
-    <input name="subject" type="hidden" value="余额充值" size="35"/>
-    <input name="total_fee" type="hidden" value="{$price}" size="35"/>
-</form>
-<script>
-    document.forms['paysubmit'].submit();
-</script>

+ 0 - 85
resources/views/material/user/yftOrder.tpl

@@ -1,85 +0,0 @@
-{include file='user/main.tpl'}
-
-<main class="content">
-    <div class="content-header ui-content-header">
-        <div class="container">
-            <h1 class="content-heading">充值记录</h1>
-        </div>
-    </div>
-    <div class="container">
-        <div class="col-lg-12 col-sm-12">
-            <section class="content-inner margin-top-no">
-
-                <div class="card">
-                    <div class="card-main">
-                        <div class="card-inner">
-                            <p>系统中您的充值记录。</p>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="table-responsive">
-                    {$orderList->render()}
-                    <table class="table ">
-                        <tr>
-                            <th>ID</th>
-                            <th>订单号</th>
-                            <th>金额</th>
-                            <th>充值时间</th>
-                            <th>状态</th>
-                        </tr>
-                        {if sizeof($orderList) > 0}
-                            {foreach $orderList as $order}
-                                <tr>
-                                    <td>#{$order->id}</td>
-                                    <td>{$order->yft_order}</td>
-                                    <td>{$order->price} 元</td>
-                                    <td>{$order->create_time}</td>
-                                    {if ($order->state == 1)}<td>已支付</td>{else}<td>未支付</td>{/if}
-                                </tr>
-                            {/foreach}
-                        {else}
-                            <tr>
-                                <td colspan="5">暂无充值记录!</td>
-                            </tr>
-                        {/if}
-                    </table>
-                </div>
-                <span>总共{$countPage}页</span>
-                <input type="hidden" id="countPage" value="{$countPage}">
-                <span>当前第{$currentPage}页</span>
-                <input type="hidden" id="currentPage" value="{$currentPage}">
-                <a class="btn btn-brand" href="/user/yftOrder">首页</a>
-                <a class="btn btn-brand" href="javascript:void(0)" id="pre" onclick="goto('pre')">上一页</a>
-                <a class="btn btn-brand" href="javascript:void(0)" id="nxt" onclick="goto('next')">下一页</a>
-                <a class="btn btn-brand" href="javascript:void(0)" id="end" onclick="goto('end')">尾页</a>
-                {$orderList->render()}
-        </div>
-    </div>
-</main>
-{include file='user/footer.tpl'}
-<script>
-    function goto(type) {
-        var countPage = $("#countPage").val();
-        var currentPage = $("#currentPage").val();
-        if ("pre" == type){
-            if (currentPage == 1 || currentPage == ""){
-                $("#pre").removeAttr('onclick');
-            }else {
-                window.location.href = "/user/yftOrder?page=" + currentPage - 1;
-            }
-        }else if ("next" == type){
-            if (currentPage == countPage){
-                $("#pre").removeAttr('onclick');
-            }else {
-                window.location.href = "/user/yftOrder?page=" + currentPage + 1;
-            }
-        }else if ("end" == type){
-            if (countPage == currentPage){
-                $("#end").removeAttr('onclick');
-            }else {
-                window.location.href = "/user/yftOrder?page=" + countPage;
-            }
-        }
-    }
-</script>

+ 0 - 35
sql/yft_order_info.sql

@@ -1,35 +0,0 @@
-/*
-Navicat MySQL Data Transfer
-
-Source Server         : 本地数据库
-Source Server Version : 50553
-Source Host           : localhost:3306
-Source Database       : sspanel
-
-Target Server Type    : MYSQL
-Target Server Version : 50553
-File Encoding         : 65001
-
-Date: 2017-10-24 19:53:13
-*/
-
-SET FOREIGN_KEY_CHECKS=0;
-
--- ----------------------------
--- Table structure for yft_order_info
--- ----------------------------
-DROP TABLE IF EXISTS `yft_order_info`;
-CREATE TABLE `yft_order_info` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `user_id` int(11) DEFAULT NULL,
-  `ss_order` varchar(50) DEFAULT NULL,
-  `yft_order` varchar(50) DEFAULT NULL,
-  `price` varchar(10) DEFAULT NULL,
-  `state` tinyint(1) DEFAULT NULL COMMENT '0代表未支付,1代表已支付',
-  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
--- ----------------------------
--- Records of yft_order_info
--- ----------------------------