标准化代码

This commit is contained in:
邹景立 2017-02-23 17:54:29 +08:00
parent 5fa7a4b5d4
commit 3f22e24693
38 changed files with 448 additions and 42 deletions

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\controller; namespace app\admin\controller;
use controller\BasicAdmin; use controller\BasicAdmin;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\controller; namespace app\admin\controller;
use controller\BasicAdmin; use controller\BasicAdmin;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\controller; namespace app\admin\controller;
use controller\BasicAdmin; use controller\BasicAdmin;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\controller; namespace app\admin\controller;
use controller\BasicAdmin; use controller\BasicAdmin;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\controller; namespace app\admin\controller;
use controller\BasicAdmin; use controller\BasicAdmin;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\controller; namespace app\admin\controller;
use controller\BasicAdmin; use controller\BasicAdmin;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\controller; namespace app\admin\controller;
use controller\BasicAdmin; use controller\BasicAdmin;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\controller; namespace app\admin\controller;
use controller\BasicAdmin; use controller\BasicAdmin;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\controller; namespace app\admin\controller;
use controller\BasicAdmin; use controller\BasicAdmin;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\admin\model; namespace app\admin\model;
use think\Model; use think\Model;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
use think\Config; use think\Config;
use think\Db; use think\Db;
use Wechat\Loader; use Wechat\Loader;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
return [ return [
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | 应用设置 // | 应用设置

View File

@ -1,13 +1,15 @@
<?php <?php
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ] // | Think.Admin
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved. // | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // | 官方网站: http://think.ctolog.com
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
return [ return [

View File

@ -1,4 +1,16 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\index\controller; namespace app\index\controller;
use think\Controller; use think\Controller;
@ -6,11 +18,11 @@ use think\Db;
class Index extends Controller { class Index extends Controller {
public function index() { public function index() {
$this->redirect('@admin'); $this->redirect('@admin');
$version = Db::query('select version() as ver'); $version = Db::query('select version() as ver');
$version = array_pop($version); $version = array_pop($version);
$this->assign('mysql_ver', $version['ver']); $this->assign('mysql_ver', $version['ver']);
return view(); return view();
} }
} }

View File

@ -1,3 +1,15 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
return []; return [];

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
return [ return [
// 应用初始化 // 应用初始化
'app_init' => [], 'app_init' => [],

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace controller; namespace controller;
use library\Data; use library\Data;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace controller; namespace controller;
use service\FansService; use service\FansService;
@ -24,13 +36,13 @@ class BasicWechat extends Controller {
* @var string * @var string
*/ */
protected $current; protected $current;
/** /**
* 是否默认开启网页授权 * 是否默认开启网页授权
* @var bool * @var bool
*/ */
protected $check_auth = true; protected $check_auth = true;
/** /**
* 初始化方法 * 初始化方法
*/ */
@ -70,7 +82,7 @@ class BasicWechat extends Controller {
$params['redirecturl'] = encode($wxoauth_url); $params['redirecturl'] = encode($wxoauth_url);
$wxoauth_url = url($this->request->baseUrl(), '', false, true) . '?' . http_build_query($params); $wxoauth_url = url($this->request->baseUrl(), '', false, true) . '?' . http_build_query($params);
} }
$wechat = &load_wechat('Oauth'); $wechat = &load_wechat('Oauth');
# 微信网页授权处理 # 微信网页授权处理
if (!$this->request->get('code', false)) { if (!$this->request->get('code', false)) {
exit(redirect($wechat->getOauthRedirect($wxoauth_url, 'webOauth', 'snsapi_base'))->send()); exit(redirect($wechat->getOauthRedirect($wxoauth_url, 'webOauth', 'snsapi_base'))->send());
@ -108,4 +120,5 @@ class BasicWechat extends Controller {
!!$redirect_url && exit(redirect($redirect_url)->send()); !!$redirect_url && exit(redirect($redirect_url)->send());
return $this->openid; return $this->openid;
} }
}
}

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
/** /**

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
use think\Db; use think\Db;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
/** /**

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
/** /**

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
use Exception; use Exception;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
use CURLFile; use CURLFile;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
/** /**

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
use think\Db; use think\Db;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
/** /**

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
/* /*

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
use think\Db; use think\Db;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace library; namespace library;
/** /**

View File

@ -1,5 +1,16 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
return array( return array(
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'), 'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
'cpt' => 'application/mac-compactpro', 'cpt' => 'application/mac-compactpro',

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace service; namespace service;
use library\Http; use library\Http;

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace service; namespace service;
use library\Data; use library\Data;
@ -153,11 +165,11 @@ class FansService {
} }
$extends = &load_wechat('Extends', $appid); $extends = &load_wechat('Extends', $appid);
// 统计总数 // 统计总数
$data['cumulate'] = (array)$extends->getDatacube('user', 'cumulate', date('Y-m-d', strtotime("-{$day} day")), date('Y-m-d', strtotime('-1 day'))); $data['cumulate'] = (array) $extends->getDatacube('user', 'cumulate', date('Y-m-d', strtotime("-{$day} day")), date('Y-m-d', strtotime('-1 day')));
// 统计增量数 // 统计增量数
$data['summary'] = (array)$extends->getDatacube('user', 'summary', date('Y-m-d', strtotime("-{$day} day")), date('Y-m-d', strtotime('-1 day'))); $data['summary'] = (array) $extends->getDatacube('user', 'summary', date('Y-m-d', strtotime("-{$day} day")), date('Y-m-d', strtotime('-1 day')));
// 统计消息数 // 统计消息数
$data['upstreammsg'] = (array)$extends->getDatacube('upstreammsg', 'summary', date('Y-m-d', strtotime("-{$day} day")), date('Y-m-d', strtotime('-1 day'))); $data['upstreammsg'] = (array) $extends->getDatacube('upstreammsg', 'summary', date('Y-m-d', strtotime("-{$day} day")), date('Y-m-d', strtotime('-1 day')));
$temp = array(); $temp = array();
for ($i = 1; $i <= $day; $i++) { for ($i = 1; $i <= $day; $i++) {
$temp[date('Y-m-d', strtotime("-{$i} day"))] = []; $temp[date('Y-m-d', strtotime("-{$i} day"))] = [];

View File

@ -1,12 +1,23 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace service; namespace service;
use library\Data; use library\Data;
use PHPQRCode\Constants; use PHPQRCode\Constants;
use PHPQRCode\QRcode; use PHPQRCode\QRcode;
use think\Db; use think\Db;
use think\Exception;
use think\Log; use think\Log;
use Wechat\WechatPay; use Wechat\WechatPay;
@ -131,5 +142,4 @@ class PayService {
return false; return false;
} }
} }

View File

@ -1,5 +1,17 @@
<?php <?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace service; namespace service;
use library\Sms; use library\Sms;

View File

@ -1,7 +1,19 @@
<?php <?php
// 定义应用目录 // +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
/* 定义应用目录 */
define('APP_PATH', dirname(__DIR__) . '/application/'); define('APP_PATH', dirname(__DIR__) . '/application/');
// 加载框架引导文件 /* 加载框架引导文件 */
require dirname(__DIR__) . '/thinkphp/start.php'; require dirname(__DIR__) . '/thinkphp/start.php';

View File

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>支付测试</title>
</head>
<body>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="ALKUF7U5J5M2L">
<input type="image" src="https://www.paypalobjects.com/zh_XC/C2/i/btn/btn_buynowCC_LG.gif" border="0" name="submit"
alt="PayPal——最安全便捷的在线支付方式">
<img alt="" border="0" src="https://www.paypalobjects.com/zh_XC/i/scr/pixel.gif" width="1" height="1">
</form>
</body>
</html>

View File

@ -1,14 +1,16 @@
<?php <?php
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ] // | Think.Admin
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved. // | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // | 官方网站: http://think.ctolog.com
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// $Id$
if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["REQUEST_URI"])) { if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["REQUEST_URI"])) {
return false; return false;