Skip to content

Commit 81f10a3

Browse files
committedMay 3, 2017
开源版本新增
1.首页 =》系统首页 =》用户分析 =》通知列表 2.微信 =》微信配置,微信菜单,自定义回复,模版消息,多客服设置,微信打印机 3.模版 =》模版设置,邮件模版,短信模版 4.设置 =》短信配置,邮件配置 5.帮助 =》使用帮助
1 parent 6bfacf8 commit 81f10a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3768
-102
lines changed
 

‎application/admin/common.php

-76
Original file line numberDiff line numberDiff line change
@@ -10,83 +10,7 @@
1010
// +----------------------------------------------------------------------
1111

1212
// 应用公共文件
13-
/**
14-
* 数据签名认证
15-
* @param array $data 被认证的数据
16-
* @return string 签名
17-
* @author 清月曦 <1604583867@qq.com>
18-
*/
19-
function data_auth_sign($data) {
20-
//数据类型检测
21-
if(!is_array($data)){
22-
$data = (array)$data;
23-
}
24-
ksort($data); //排序
25-
$code = http_build_query($data); //url编码并生成query字符串
26-
$sign = sha1($code); //生成签名
27-
return $sign;
28-
}
29-
/**
30-
* 下载远程文件
31-
* @param string $url 网址
32-
* @param string $filename 保存文件名
33-
* @param integer $timeout 过期时间
34-
* return boolean|string
35-
*/
36-
function http_down($url, $filename, $timeout = 60) {
37-
$path = dirname($filename);
38-
if (!is_dir($path) && !mkdir($path, 0755, true)) {
39-
return false;
40-
}
41-
$fp = fopen($filename, 'w');
42-
$ch = curl_init($url);
43-
curl_setopt($ch, CURLOPT_FILE, $fp);
44-
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
45-
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
46-
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
47-
curl_exec($ch);
48-
curl_close($ch);
49-
fclose($fp);
50-
return $filename;
51-
}
5213

53-
// 防超时的file_get_contents改造函数
54-
function wp_file_get_contents($url)
55-
{
56-
$context = stream_context_create(array(
57-
'http' => array(
58-
'timeout' => 30
59-
)
60-
)); // 超时时间,单位为秒
61-
62-
return file_get_contents($url, 0, $context);
63-
}
64-
/**
65-
*解压文件
66-
*/
67-
function unzip($filePath, $toPath,$filesize=0){
68-
// $length = filesize($filePath);
69-
// if ($filesize == $length) {
70-
$zip = new ZipArchive;
71-
$res = $zip->open($filePath);
72-
73-
if ($res === TRUE) {
74-
//解压缩到指定文件夹
75-
$zip->extractTo($toPath);
76-
$zip->close();
77-
//删除压缩包
78-
unlink($filePath);
79-
if ( is_dir( $toPath . '__MACOSX' ) ) {
80-
delDirAndFile($toPath . '__MACOSX');
81-
}
82-
return true;
83-
}else{
84-
return false;
85-
}
86-
// }else{
87-
// return false;
88-
// }
89-
}
9014

9115

9216

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
namespace app\admin\controller;
3+
4+
class HelpController extends BaseController
5+
{
6+
//使用帮助
7+
public function index(){
8+
9+
return view();
10+
}
11+
}

0 commit comments

Comments
 (0)
Please sign in to comment.