20240528最新

This commit is contained in:
chenrx
2024-05-28 14:43:08 +08:00
parent 6553c5b9b4
commit 58567f81f9
73 changed files with 10875 additions and 6421 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ abstract class HD_Controller extends CI_Controller
public $data = array(), $if_ajax = false;
public $city_lists = [430, 350]; //开发城湖南 福建
public $city_lists = [430, 350]; //开发城省份 湖南 福建
public function __construct()
{
+5 -5
View File
@@ -1,6 +1,6 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+14 -14
View File
@@ -1,14 +1,14 @@
<?php
/**
* Created by Vim
* User: lcc
* Desc: 支付宝配置
*/
$config = [
'default' => [
'app_id' => '2021000118631895',
'private_key' => 'MIIEpAIBAAKCAQEAk/KCpSBSJT8Ym6E2q8RhWXj6RHxP0orUOey/5pihXRj0UzQQiiB8pIb5TcB7G8bFSszhgao7DiObYnWUUvUpAGG8tL7aC+Td7JL11PR5Bv1e1HnymCrNWr/LrUAFBpmQ5480/BAX04SZh/RXRrYiM+L5JSRFwiiXaQ2lc9Q1oa+paKe6d19ZiHZ50JN9I9HLPmqchOLK+yIRRPyPoc0TOI7bz1kEW+U76/S+nE8RmSKq+LvDgWzgi4lIt1NXxfSU6z+MAtQHAF6TFeglquGnvFOHU/MkCPQ/+57n31L7DTEGsaLcUZfkipE70nlrYrJgE/jrqQLW4TsRPhJT2bUx4wIDAQABAoIBAHqCCeSqSttE0B+u8xJw3xuzrakgNwjkpLACdzV/lb79dvOe3UNDe3LRwYa8qDRr99rkpKc2Swh+O6DgNB4tm/IQ/K2+i9flgE7xslbQyZccH3ZaNKQEbV+ECihAJuk8KF1WnE1NFi20U13c2phXISNOA3jZ/Fm2Owpmnma3hmGHRbiXImsLhIDFl035Ekt605plriy6yvm6wyvdGGATQsXxDQ0CcOlWdgug7U+vyIc/afRC2kj/afVFqLFyUT2Xo1nTeedwTTSQ/rXRIurdLUVm75SDP1mdoAC+wMd/6LgY7byKPxlSslyaBm73o95feu7sV2dXhDipwThI+p1dQiECgYEA8wwk+l9Cxw5qZPtOXmLMUoqOtkESnZLIaFusm5Z0E1zdZhessVHQmWQ5RsVvYGYvcCG0ujTWNi6sq1fiPeZKnZj+r9Cy8UCQDssS3pV0jvy6ozKZvRMGzugQx3cPrmjwHO3Z6ycrtvz+la/H4VsWwdid8Tx1/KifHJq7XXQ3R/cCgYEAm9TuQOebvBA325rBJZnX6Ats6E9un9j5FRh7/j9CRHFFZmec79NX+306GH1j7WWO0g9nusQKysu9W54S37gIwta9h+46Hxq1bIqctDlL2SpgsZT8ZV8ejQePZwsaEaMh68u1yplPHuUWP4T+LEcH3X1E8l5KQ8Gg/B6aQXKRonUCgYEAqinKifDAFBWnr+OyzqplWzTfDgMpQWFPJqFoi9Yelp/h8mSI5+zcG0jsQPxiKh/g/qTan7P2diDfi2cQYz4k54oCZp27auVE9tZ+84+395RCJ5h5wsLbdWlMthpJxFZ8JgTxGY5nMMqYg7x6OPFJUZaTnh4yjR6Rp7k9jQSc36kCgYA5LQFWEyTS9ehozPk9QJs1aqvE+RAP2l5Z3Sfxe2hnEGB0WGP+or7PaX0dazR08CRc8oYOwstq6SJLMU6fgzjDtGLKMyBkNTqH3rvsbHFl9uSPg6iv0Ry2hiWZmzsvaXmSuKW09ldPcKKfH77apB1AqSvY+bup7KuSle/nP5Ar2QKBgQCbufjQ4I7Iej+KLz8/WVDIWa2to0tkQGxCUoVqxIxRQW8lHhRu5v9Y/gQ6d8dvx7rXb6V0VDf1joPFxnu3FwwMteMpQ8VrbH9vyqktSwCvU5t2dolcpv0MeePz9NPYdmz/MA/YIOmiUt0CVmca4q8WDNtJqjxShoIdbTH9oFXkeQ==',
'public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0FzytqTSTh3o8/Lbryi76MxKpOjJM4tho8HlzpOHFfPZ9JEnEQ+ddNcoSQaNfWJU3T73BDfNoaOZllWB13pvU3D/ZWGYkAJRLX4jT97Xvf9SYwyoEt5R2FTRQWBJT3N7sPX8NoM+dvEeqA9LgwY5Z6sIu9SxouPsfzCJSKjCmlcDoZJ1xjxusrqQF6gLkPW1loPFwx2xUQUFrGW4q1Yd8XwiqgljCqrLwi2tnZ3r5YOI1bIL589olUHf2KdNtH6KN7pC2+I5ovKEvuAZk7X6tPxYbxy5GSU1rWNhhNLpRL/RBTt+3dlqW/yadf/c3dHGVygSMo90KrG9uuOp/q5BQIDAQAB',
]
];
<?php
/**
* Created by Vim
* User: lcc
* Desc: 支付宝配置
*/
$config = [
'default' => [
'app_id' => '2021000118631895',
'private_key' => 'MIIEpAIBAAKCAQEAk/KCpSBSJT8Ym6E2q8RhWXj6RHxP0orUOey/5pihXRj0UzQQiiB8pIb5TcB7G8bFSszhgao7DiObYnWUUvUpAGG8tL7aC+Td7JL11PR5Bv1e1HnymCrNWr/LrUAFBpmQ5480/BAX04SZh/RXRrYiM+L5JSRFwiiXaQ2lc9Q1oa+paKe6d19ZiHZ50JN9I9HLPmqchOLK+yIRRPyPoc0TOI7bz1kEW+U76/S+nE8RmSKq+LvDgWzgi4lIt1NXxfSU6z+MAtQHAF6TFeglquGnvFOHU/MkCPQ/+57n31L7DTEGsaLcUZfkipE70nlrYrJgE/jrqQLW4TsRPhJT2bUx4wIDAQABAoIBAHqCCeSqSttE0B+u8xJw3xuzrakgNwjkpLACdzV/lb79dvOe3UNDe3LRwYa8qDRr99rkpKc2Swh+O6DgNB4tm/IQ/K2+i9flgE7xslbQyZccH3ZaNKQEbV+ECihAJuk8KF1WnE1NFi20U13c2phXISNOA3jZ/Fm2Owpmnma3hmGHRbiXImsLhIDFl035Ekt605plriy6yvm6wyvdGGATQsXxDQ0CcOlWdgug7U+vyIc/afRC2kj/afVFqLFyUT2Xo1nTeedwTTSQ/rXRIurdLUVm75SDP1mdoAC+wMd/6LgY7byKPxlSslyaBm73o95feu7sV2dXhDipwThI+p1dQiECgYEA8wwk+l9Cxw5qZPtOXmLMUoqOtkESnZLIaFusm5Z0E1zdZhessVHQmWQ5RsVvYGYvcCG0ujTWNi6sq1fiPeZKnZj+r9Cy8UCQDssS3pV0jvy6ozKZvRMGzugQx3cPrmjwHO3Z6ycrtvz+la/H4VsWwdid8Tx1/KifHJq7XXQ3R/cCgYEAm9TuQOebvBA325rBJZnX6Ats6E9un9j5FRh7/j9CRHFFZmec79NX+306GH1j7WWO0g9nusQKysu9W54S37gIwta9h+46Hxq1bIqctDlL2SpgsZT8ZV8ejQePZwsaEaMh68u1yplPHuUWP4T+LEcH3X1E8l5KQ8Gg/B6aQXKRonUCgYEAqinKifDAFBWnr+OyzqplWzTfDgMpQWFPJqFoi9Yelp/h8mSI5+zcG0jsQPxiKh/g/qTan7P2diDfi2cQYz4k54oCZp27auVE9tZ+84+395RCJ5h5wsLbdWlMthpJxFZ8JgTxGY5nMMqYg7x6OPFJUZaTnh4yjR6Rp7k9jQSc36kCgYA5LQFWEyTS9ehozPk9QJs1aqvE+RAP2l5Z3Sfxe2hnEGB0WGP+or7PaX0dazR08CRc8oYOwstq6SJLMU6fgzjDtGLKMyBkNTqH3rvsbHFl9uSPg6iv0Ry2hiWZmzsvaXmSuKW09ldPcKKfH77apB1AqSvY+bup7KuSle/nP5Ar2QKBgQCbufjQ4I7Iej+KLz8/WVDIWa2to0tkQGxCUoVqxIxRQW8lHhRu5v9Y/gQ6d8dvx7rXb6V0VDf1joPFxnu3FwwMteMpQ8VrbH9vyqktSwCvU5t2dolcpv0MeePz9NPYdmz/MA/YIOmiUt0CVmca4q8WDNtJqjxShoIdbTH9oFXkeQ==',
'public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0FzytqTSTh3o8/Lbryi76MxKpOjJM4tho8HlzpOHFfPZ9JEnEQ+ddNcoSQaNfWJU3T73BDfNoaOZllWB13pvU3D/ZWGYkAJRLX4jT97Xvf9SYwyoEt5R2FTRQWBJT3N7sPX8NoM+dvEeqA9LgwY5Z6sIu9SxouPsfzCJSKjCmlcDoZJ1xjxusrqQF6gLkPW1loPFwx2xUQUFrGW4q1Yd8XwiqgljCqrLwi2tnZ3r5YOI1bIL589olUHf2KdNtH6KN7pC2+I5ovKEvuAZk7X6tPxYbxy5GSU1rWNhhNLpRL/RBTt+3dlqW/yadf/c3dHGVygSMo90KrG9uuOp/q5BQIDAQAB',
]
];
+23 -16
View File
@@ -1,16 +1,23 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$config = array(
'licheb' => array(
'id' => 2,
'app_id' => 2,
'name' => '狸车宝',
'sign_key' => '71fd71173b776766a2ae1209d9a2c2ed',
'wx' => array(
'appid' => 'wx4733380c110313ec',
'secret' => 'cfa1bb15b671f919e959100c0b4070a2',
),
'model' => array('user_model' => 'app/licheb/app_licheb_users_model')
),
);
<?php
/**
* Created by PhpStorm.
* User: linfan
* Date: 2018-12-04
* Time: 15:51
*/
defined('BASEPATH') OR exit('No direct script access allowed');
$config = array(
'licheb' => array(
'id' => 2,
'app_id' => 2,
'name' => '狸车宝',
'sign_key' => '71fd71173b776766a2ae1209d9a2c2ed',
'wx' => array(
'appid' => 'wx4733380c110313ec',
'secret' => 'cfa1bb15b671f919e959100c0b4070a2',
),
'model' => array('user_model' => 'app/licheb/app_licheb_users_model')
)
);
+135 -135
View File
@@ -1,135 +1,135 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the framework as light-weight as possible only the
| absolute minimal resources are loaded by default. For example,
| the database is not connected to automatically since no assumption
| is made regarding whether you intend to use it. This file lets
| you globally define which systems you would like loaded with every
| request.
|
| -------------------------------------------------------------------
| Instructions
| -------------------------------------------------------------------
|
| These are the things you can load automatically:
|
| 1. Packages
| 2. Libraries
| 3. Drivers
| 4. Helper files
| 5. Custom config files
| 6. Language files
| 7. Models
|
*/
/*
| -------------------------------------------------------------------
| Auto-load Packages
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/
$autoload['packages'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in system/libraries/ or your
| application/libraries/ directory, with the addition of the
| 'database' library, which is somewhat of a special case.
|
| Prototype:
|
| $autoload['libraries'] = array('database', 'email', 'session');
|
| You can also supply an alternative library name to be assigned
| in the controller:
|
| $autoload['libraries'] = array('user_agent' => 'ua');
*/
$autoload['libraries'] = array('database');
/*
| -------------------------------------------------------------------
| Auto-load Drivers
| -------------------------------------------------------------------
| These classes are located in system/libraries/ or in your
| application/libraries/ directory, but are also placed inside their
| own subdirectory and they extend the CI_Driver_Library class. They
| offer multiple interchangeable driver options.
|
| Prototype:
|
| $autoload['drivers'] = array('cache');
|
| You can also supply an alternative property name to be assigned in
| the controller:
|
| $autoload['drivers'] = array('cache' => 'cch');
|
*/
$autoload['drivers'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('comm', 'url', 'array','order');
/*
| -------------------------------------------------------------------
| Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files. Otherwise, leave it blank.
|
*/
$autoload['config'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Language files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file. For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/
$autoload['language'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['model'] = array('first_model', 'second_model');
|
| You can also supply an alternative model name to be assigned
| in the controller:
|
| $autoload['model'] = array('first_model' => 'first');
*/
$autoload['model'] = array();
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the framework as light-weight as possible only the
| absolute minimal resources are loaded by default. For example,
| the database is not connected to automatically since no assumption
| is made regarding whether you intend to use it. This file lets
| you globally define which systems you would like loaded with every
| request.
|
| -------------------------------------------------------------------
| Instructions
| -------------------------------------------------------------------
|
| These are the things you can load automatically:
|
| 1. Packages
| 2. Libraries
| 3. Drivers
| 4. Helper files
| 5. Custom config files
| 6. Language files
| 7. Models
|
*/
/*
| -------------------------------------------------------------------
| Auto-load Packages
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/
$autoload['packages'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in system/libraries/ or your
| application/libraries/ directory, with the addition of the
| 'database' library, which is somewhat of a special case.
|
| Prototype:
|
| $autoload['libraries'] = array('database', 'email', 'session');
|
| You can also supply an alternative library name to be assigned
| in the controller:
|
| $autoload['libraries'] = array('user_agent' => 'ua');
*/
$autoload['libraries'] = array('database');
/*
| -------------------------------------------------------------------
| Auto-load Drivers
| -------------------------------------------------------------------
| These classes are located in system/libraries/ or in your
| application/libraries/ directory, but are also placed inside their
| own subdirectory and they extend the CI_Driver_Library class. They
| offer multiple interchangeable driver options.
|
| Prototype:
|
| $autoload['drivers'] = array('cache');
|
| You can also supply an alternative property name to be assigned in
| the controller:
|
| $autoload['drivers'] = array('cache' => 'cch');
|
*/
$autoload['drivers'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('comm', 'url', 'array','order');
/*
| -------------------------------------------------------------------
| Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files. Otherwise, leave it blank.
|
*/
$autoload['config'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Language files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file. For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/
$autoload['language'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['model'] = array('first_model', 'second_model');
|
| You can also supply an alternative model name to be assigned
| in the controller:
|
| $autoload['model'] = array('first_model' => 'first');
*/
$autoload['model'] = array();
+523 -523
View File
File diff suppressed because it is too large Load Diff
+109 -109
View File
@@ -1,109 +1,109 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Display Debug backtrace
|--------------------------------------------------------------------------
|
| If set to TRUE, a backtrace will be displayed along with php errors. If
| error_reporting is disabled, the backtrace will not display, regardless
| of this setting
|
*/
defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system. The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
| always be used to set the mode correctly.
|
*/
defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/
defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
/*
|--------------------------------------------------------------------------
| Exit Status Codes
|--------------------------------------------------------------------------
|
| Used to indicate the conditions under which the script is exit()ing.
| While there is no universal standard for error codes, there are some
| broad conventions. Three such conventions are mentioned below, for
| those who wish to make use of them. The CodeIgniter defaults were
| chosen for the least overlap with these conventions, while still
| leaving room for others to be defined in future versions and user
| applications.
|
| The three main conventions used for determining exit status codes
| are as follows:
|
| Standard C/C++ Library (stdlibc):
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
| (This link also contains other GNU-specific conventions)
| BSD sysexits.h:
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
| Bash scripting:
| http://tldp.org/LDP/abs/html/exitcodes.html
|
*/
defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
define('ERR_SYS_SUCCESS',0);
define('ERR_SYS_FAIL', 9999);
define('ERR_SYS_INVAL_PARAM', 9998);
define('ERR_USER_NOT_LOGIN', 1001);
/*edit by xuxianbin 这边应该是多写了一个*/
//define('ERR_USER_NOT_LOGIN', 1001);
/*edit end*/
define('ERR_USER_LOGIN_FAIL', 1002);
define('ERR_ACCOUNT_NOT_EXISTS', 1021);
define('ERR_PARAMS_ERROR', 1017);
define('TEMP_PATH', APPPATH.'../www/api/wx/');
//新的api接口code规定
defined('API_CODE_SUCCESS') OR define('API_CODE_SUCCESS', 200);//成功
defined('API_CODE_FAIL') OR define('API_CODE_FAIL', 400);//请求失败
defined('API_CODE_NONE') OR define('API_CODE_FORB', 403);//禁止访问
defined('API_CODE_NONE') OR define('API_CODE_NONE', 404);//页面不存在
defined('API_CODE_LOGOUT') OR define('API_CODE_LOGOUT', 408);//未登录
defined('API_CODE_INVILD_PARAM') OR define('API_CODE_INVILD_PARAM', 401);//非法参数
defined('API_CODE_USER_FULL') OR define('API_CODE_USER_FULL', 417);//完善用户资料
defined('API_CODE_ORC_FAIL') OR define('API_CODE_ORC_FAIL', 418);//图片识别失败
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Display Debug backtrace
|--------------------------------------------------------------------------
|
| If set to TRUE, a backtrace will be displayed along with php errors. If
| error_reporting is disabled, the backtrace will not display, regardless
| of this setting
|
*/
defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system. The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
| always be used to set the mode correctly.
|
*/
defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/
defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
/*
|--------------------------------------------------------------------------
| Exit Status Codes
|--------------------------------------------------------------------------
|
| Used to indicate the conditions under which the script is exit()ing.
| While there is no universal standard for error codes, there are some
| broad conventions. Three such conventions are mentioned below, for
| those who wish to make use of them. The CodeIgniter defaults were
| chosen for the least overlap with these conventions, while still
| leaving room for others to be defined in future versions and user
| applications.
|
| The three main conventions used for determining exit status codes
| are as follows:
|
| Standard C/C++ Library (stdlibc):
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
| (This link also contains other GNU-specific conventions)
| BSD sysexits.h:
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
| Bash scripting:
| http://tldp.org/LDP/abs/html/exitcodes.html
|
*/
defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
define('ERR_SYS_SUCCESS',0);
define('ERR_SYS_FAIL', 9999);
define('ERR_SYS_INVAL_PARAM', 9998);
define('ERR_USER_NOT_LOGIN', 1001);
/*edit by xuxianbin 这边应该是多写了一个*/
//define('ERR_USER_NOT_LOGIN', 1001);
/*edit end*/
define('ERR_USER_LOGIN_FAIL', 1002);
define('ERR_ACCOUNT_NOT_EXISTS', 1021);
define('ERR_PARAMS_ERROR', 1017);
define('TEMP_PATH', APPPATH.'../www/api/wx/');
//新的api接口code规定
defined('API_CODE_SUCCESS') OR define('API_CODE_SUCCESS', 200);//成功
defined('API_CODE_FAIL') OR define('API_CODE_FAIL', 400);//请求失败
defined('API_CODE_NONE') OR define('API_CODE_FORB', 403);//禁止访问
defined('API_CODE_NONE') OR define('API_CODE_NONE', 404);//页面不存在
defined('API_CODE_LOGOUT') OR define('API_CODE_LOGOUT', 408);//未登录
defined('API_CODE_INVILD_PARAM') OR define('API_CODE_INVILD_PARAM', 401);//非法参数
defined('API_CODE_USER_FULL') OR define('API_CODE_USER_FULL', 417);//完善用户资料
defined('API_CODE_ORC_FAIL') OR define('API_CODE_ORC_FAIL', 418);//图片识别失败
+96 -96
View File
@@ -1,96 +1,96 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['dsn'] The full DSN string describe a connection to the database.
| ['hostname'] The hostname of your database server.
| ['username'] The username used to connect to the database
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['dbdriver'] The database driver. e.g.: mysqli.
| Currently supported:
| cubrid, ibase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
| to the table name when using the Query Builder class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
| ['cachedir'] The path to the folder where cache files should be stored
| ['char_set'] The character set used in communicating with the database
| ['dbcollat'] The character collation used in communicating with the database
| NOTE: For MySQL and MySQLi databases, this setting is only used
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
| (and in table creation queries made with DB Forge).
| There is an incompatibility in PHP with mysql_real_escape_string() which
| can make your site vulnerable to SQL injection if you are using a
| multi-byte character set and are running versions lower than these.
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['encrypt'] Whether or not to use an encrypted connection.
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
| 'ssl_key' - Path to the private key file
| 'ssl_cert' - Path to the public key certificate file
| 'ssl_ca' - Path to the certificate authority file
| 'ssl_capath' - Path to a directory containing trusted CA certificates in PEM format
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
|
| ['compress'] Whether or not to use client compression (MySQL only)
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| NOTE: Disabling this will also effectively disable both
| $this->db->last_query() and profiling of DB queries.
| When you run a query, with this setting set to TRUE (default),
| CodeIgniter will store the SQL statement for debugging purposes.
| However, this may cause high memory usage, especially if you run
| a lot of SQL queries ... disable this to avoid that problem.
|
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
|
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'mysql:host=127.0.0.1;port=3306;dbname=ssdb',
'username' => 'devuser',
'password' => 'DEV@hdy1234561',
'database' => 'ssdb',
'dbdriver' => 'pdo',
'dbprefix' => 'lc_',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8mb4',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['dsn'] The full DSN string describe a connection to the database.
| ['hostname'] The hostname of your database server.
| ['username'] The username used to connect to the database
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['dbdriver'] The database driver. e.g.: mysqli.
| Currently supported:
| cubrid, ibase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
| to the table name when using the Query Builder class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
| ['cachedir'] The path to the folder where cache files should be stored
| ['char_set'] The character set used in communicating with the database
| ['dbcollat'] The character collation used in communicating with the database
| NOTE: For MySQL and MySQLi databases, this setting is only used
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
| (and in table creation queries made with DB Forge).
| There is an incompatibility in PHP with mysql_real_escape_string() which
| can make your site vulnerable to SQL injection if you are using a
| multi-byte character set and are running versions lower than these.
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['encrypt'] Whether or not to use an encrypted connection.
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
| 'ssl_key' - Path to the private key file
| 'ssl_cert' - Path to the public key certificate file
| 'ssl_ca' - Path to the certificate authority file
| 'ssl_capath' - Path to a directory containing trusted CA certificates in PEM format
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
|
| ['compress'] Whether or not to use client compression (MySQL only)
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| NOTE: Disabling this will also effectively disable both
| $this->db->last_query() and profiling of DB queries.
| When you run a query, with this setting set to TRUE (default),
| CodeIgniter will store the SQL statement for debugging purposes.
| However, this may cause high memory usage, especially if you run
| a lot of SQL queries ... disable this to avoid that problem.
|
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
|
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'mysql:host=127.0.0.1;port=3306;dbname=ssdb',
'username' => 'devuser',
'password' => 'DEV@hdy123456',
'database' => 'ssdb',
'dbdriver' => 'pdo',
'dbprefix' => 'lc_',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8mb4',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
+24 -24
View File
@@ -1,24 +1,24 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$_doctypes = array(
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">'
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$_doctypes = array(
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">'
);
+103 -103
View File
@@ -1,103 +1,103 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| Foreign Characters
| -------------------------------------------------------------------
| This file contains an array of foreign characters for transliteration
| conversion used by the Text helper
|
*/
$foreign_characters = array(
'/ä|æ|ǽ/' => 'ae',
'/ö|œ/' => 'oe',
'/ü/' => 'ue',
'/Ä/' => 'Ae',
'/Ü/' => 'Ue',
'/Ö/' => 'Oe',
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A',
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a',
'/Б/' => 'B',
'/б/' => 'b',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/ç|ć|ĉ|ċ|č/' => 'c',
'/Д/' => 'D',
'/д/' => 'd',
'/Ð|Ď|Đ|Δ/' => 'Dj',
'/ð|ď|đ|δ/' => 'dj',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e',
'/Ф/' => 'F',
'/ф/' => 'f',
'/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
'/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g',
'/Ĥ|Ħ/' => 'H',
'/ĥ|ħ/' => 'h',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i',
'/Ĵ/' => 'J',
'/ĵ/' => 'j',
'/Ķ|Κ|К/' => 'K',
'/ķ|κ|к/' => 'k',
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
'/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l',
'/М/' => 'M',
'/м/' => 'm',
'/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
'/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n',
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O',
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o',
'/П/' => 'P',
'/п/' => 'p',
'/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R',
'/ŕ|ŗ|ř|ρ|р/' => 'r',
'/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S',
'/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's',
'/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T',
'/ț|ţ|ť|ŧ|т/' => 't',
'/Þ|þ/' => 'th',
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u',
'/Ƴ|Ɏ|Ỵ|Ẏ|Ӳ|Ӯ|Ў|Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y',
'/ẙ|ʏ|ƴ|ɏ|ỵ|ẏ|ӳ|ӯ|ў|ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y',
'/В/' => 'V',
'/в/' => 'v',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
'/Ź|Ż|Ž|Ζ|З/' => 'Z',
'/ź|ż|ž|ζ|з/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/' => 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
'/ƒ/' => 'f',
'/ξ/' => 'ks',
'/π/' => 'p',
'/β/' => 'v',
'/μ/' => 'm',
'/ψ/' => 'ps',
'/Ё/' => 'Yo',
'/ё/' => 'yo',
'/Є/' => 'Ye',
'/є/' => 'ye',
'/Ї/' => 'Yi',
'/Ж/' => 'Zh',
'/ж/' => 'zh',
'/Х/' => 'Kh',
'/х/' => 'kh',
'/Ц/' => 'Ts',
'/ц/' => 'ts',
'/Ч/' => 'Ch',
'/ч/' => 'ch',
'/Ш/' => 'Sh',
'/ш/' => 'sh',
'/Щ/' => 'Shch',
'/щ/' => 'shch',
'/Ъ|ъ|Ь|ь/' => '',
'/Ю/' => 'Yu',
'/ю/' => 'yu',
'/Я/' => 'Ya',
'/я/' => 'ya'
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| Foreign Characters
| -------------------------------------------------------------------
| This file contains an array of foreign characters for transliteration
| conversion used by the Text helper
|
*/
$foreign_characters = array(
'/ä|æ|ǽ/' => 'ae',
'/ö|œ/' => 'oe',
'/ü/' => 'ue',
'/Ä/' => 'Ae',
'/Ü/' => 'Ue',
'/Ö/' => 'Oe',
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A',
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a',
'/Б/' => 'B',
'/б/' => 'b',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/ç|ć|ĉ|ċ|č/' => 'c',
'/Д/' => 'D',
'/д/' => 'd',
'/Ð|Ď|Đ|Δ/' => 'Dj',
'/ð|ď|đ|δ/' => 'dj',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e',
'/Ф/' => 'F',
'/ф/' => 'f',
'/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
'/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g',
'/Ĥ|Ħ/' => 'H',
'/ĥ|ħ/' => 'h',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i',
'/Ĵ/' => 'J',
'/ĵ/' => 'j',
'/Ķ|Κ|К/' => 'K',
'/ķ|κ|к/' => 'k',
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
'/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l',
'/М/' => 'M',
'/м/' => 'm',
'/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
'/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n',
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O',
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o',
'/П/' => 'P',
'/п/' => 'p',
'/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R',
'/ŕ|ŗ|ř|ρ|р/' => 'r',
'/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S',
'/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's',
'/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T',
'/ț|ţ|ť|ŧ|т/' => 't',
'/Þ|þ/' => 'th',
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u',
'/Ƴ|Ɏ|Ỵ|Ẏ|Ӳ|Ӯ|Ў|Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y',
'/ẙ|ʏ|ƴ|ɏ|ỵ|ẏ|ӳ|ӯ|ў|ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y',
'/В/' => 'V',
'/в/' => 'v',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
'/Ź|Ż|Ž|Ζ|З/' => 'Z',
'/ź|ż|ž|ζ|з/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/' => 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
'/ƒ/' => 'f',
'/ξ/' => 'ks',
'/π/' => 'p',
'/β/' => 'v',
'/μ/' => 'm',
'/ψ/' => 'ps',
'/Ё/' => 'Yo',
'/ё/' => 'yo',
'/Є/' => 'Ye',
'/є/' => 'ye',
'/Ї/' => 'Yi',
'/Ж/' => 'Zh',
'/ж/' => 'zh',
'/Х/' => 'Kh',
'/х/' => 'kh',
'/Ц/' => 'Ts',
'/ц/' => 'ts',
'/Ч/' => 'Ch',
'/ч/' => 'ch',
'/Ш/' => 'Sh',
'/ш/' => 'sh',
'/Щ/' => 'Shch',
'/щ/' => 'shch',
'/Ъ|ъ|Ь|ь/' => '',
'/Ю/' => 'Yu',
'/ю/' => 'yu',
'/Я/' => 'Ya',
'/я/' => 'ya'
);
+13 -13
View File
@@ -1,13 +1,13 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Hooks
| -------------------------------------------------------------------------
| This file lets you define "hooks" to extend CI without hacking the core
| files. Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/hooks.html
|
*/
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Hooks
| -------------------------------------------------------------------------
| This file lets you define "hooks" to extend CI without hacking the core
| files. Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/hooks.html
|
*/
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+19 -19
View File
@@ -1,19 +1,19 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Memcached settings
| -------------------------------------------------------------------------
| Your Memcached servers can be specified below.
|
| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
*/
$config = array(
'default' => array(
'hostname' => '192.168.0.16',
'port' => '12001',
'weight' => '1',
),
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Memcached settings
| -------------------------------------------------------------------------
| Your Memcached servers can be specified below.
|
| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
*/
$config = array(
'default' => array(
'hostname' => '192.168.0.16',
'port' => '12001',
'weight' => '1',
),
);
+84 -84
View File
@@ -1,84 +1,84 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Enable/Disable Migrations
|--------------------------------------------------------------------------
|
| Migrations are disabled by default for security reasons.
| You should enable migrations whenever you intend to do a schema migration
| and disable it back when you're done.
|
*/
$config['migration_enabled'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migration Type
|--------------------------------------------------------------------------
|
| Migration file names may be based on a sequential identifier or on
| a timestamp. Options are:
|
| 'sequential' = Sequential migration naming (001_add_blog.php)
| 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
| Use timestamp format YYYYMMDDHHIISS.
|
| Note: If this configuration value is missing the Migration library
| defaults to 'sequential' for backward compatibility with CI2.
|
*/
$config['migration_type'] = 'timestamp';
/*
|--------------------------------------------------------------------------
| Migrations table
|--------------------------------------------------------------------------
|
| This is the name of the table that will store the current migrations state.
| When migrations runs it will store in a database table which migration
| level the system is at. It then compares the migration level in this
| table to the $config['migration_version'] if they are not the same it
| will migrate up. This must be set.
|
*/
$config['migration_table'] = 'migrations';
/*
|--------------------------------------------------------------------------
| Auto Migrate To Latest
|--------------------------------------------------------------------------
|
| If this is set to TRUE when you load the migrations class and have
| $config['migration_enabled'] set to TRUE the system will auto migrate
| to your latest migration (whatever $config['migration_version'] is
| set to). This way you do not have to call migrations anywhere else
| in your code to have the latest migration.
|
*/
$config['migration_auto_latest'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migrations version
|--------------------------------------------------------------------------
|
| This is used to set migration version that the file system should be on.
| If you run $this->migration->current() this is the version that schema will
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 0;
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH.'migrations/';
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Enable/Disable Migrations
|--------------------------------------------------------------------------
|
| Migrations are disabled by default for security reasons.
| You should enable migrations whenever you intend to do a schema migration
| and disable it back when you're done.
|
*/
$config['migration_enabled'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migration Type
|--------------------------------------------------------------------------
|
| Migration file names may be based on a sequential identifier or on
| a timestamp. Options are:
|
| 'sequential' = Sequential migration naming (001_add_blog.php)
| 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
| Use timestamp format YYYYMMDDHHIISS.
|
| Note: If this configuration value is missing the Migration library
| defaults to 'sequential' for backward compatibility with CI2.
|
*/
$config['migration_type'] = 'timestamp';
/*
|--------------------------------------------------------------------------
| Migrations table
|--------------------------------------------------------------------------
|
| This is the name of the table that will store the current migrations state.
| When migrations runs it will store in a database table which migration
| level the system is at. It then compares the migration level in this
| table to the $config['migration_version'] if they are not the same it
| will migrate up. This must be set.
|
*/
$config['migration_table'] = 'migrations';
/*
|--------------------------------------------------------------------------
| Auto Migrate To Latest
|--------------------------------------------------------------------------
|
| If this is set to TRUE when you load the migrations class and have
| $config['migration_enabled'] set to TRUE the system will auto migrate
| to your latest migration (whatever $config['migration_version'] is
| set to). This way you do not have to call migrations anywhere else
| in your code to have the latest migration.
|
*/
$config['migration_auto_latest'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migrations version
|--------------------------------------------------------------------------
|
| This is used to set migration version that the file system should be on.
| If you run $this->migration->current() this is the version that schema will
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 0;
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH.'migrations/';
+184 -184
View File
@@ -1,184 +1,184 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| MIME TYPES
| -------------------------------------------------------------------
| This file contains an array of mime types. It is used by the
| Upload class to help identify allowed file types.
|
*/
return array(
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
'ai' => array('application/pdf', 'application/postscript'),
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'gzip' => 'application/x-gzip',
'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => array('application/x-javascript', 'text/plain'),
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => array('audio/x-aiff', 'audio/aiff'),
'aiff' => array('audio/x-aiff', 'audio/aiff'),
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'png' => array('image/png', 'image/x-png'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => array('text/css', 'text/plain'),
'html' => array('text/html', 'text/plain'),
'htm' => array('text/html', 'text/plain'),
'shtml' => array('text/html', 'text/plain'),
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => array('application/xml', 'text/xml', 'text/plain'),
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
'movie' => 'video/x-sgi-movie',
'doc' => array('application/msword', 'application/vnd.ms-office'),
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
'dot' => array('application/msword', 'application/vnd.ms-office'),
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json'),
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7',
'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
'3g2' => 'video/3gpp2',
'3gp' => array('video/3gp', 'video/3gpp'),
'mp4' => 'video/mp4',
'm4a' => 'audio/x-m4a',
'f4v' => array('video/mp4', 'video/x-f4v'),
'flv' => 'video/x-flv',
'webm' => 'video/webm',
'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan',
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac',
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
'ics' => 'text/calendar',
'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh',
'7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
'vcf' => 'text/x-vcard',
'srt' => array('text/srt', 'text/plain'),
'vtt' => array('text/vtt', 'text/plain'),
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
'odc' => 'application/vnd.oasis.opendocument.chart',
'otc' => 'application/vnd.oasis.opendocument.chart-template',
'odf' => 'application/vnd.oasis.opendocument.formula',
'otf' => 'application/vnd.oasis.opendocument.formula-template',
'odg' => 'application/vnd.oasis.opendocument.graphics',
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
'odi' => 'application/vnd.oasis.opendocument.image',
'oti' => 'application/vnd.oasis.opendocument.image-template',
'odp' => 'application/vnd.oasis.opendocument.presentation',
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
'odt' => 'application/vnd.oasis.opendocument.text',
'odm' => 'application/vnd.oasis.opendocument.text-master',
'ott' => 'application/vnd.oasis.opendocument.text-template',
'oth' => 'application/vnd.oasis.opendocument.text-web'
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| MIME TYPES
| -------------------------------------------------------------------
| This file contains an array of mime types. It is used by the
| Upload class to help identify allowed file types.
|
*/
return array(
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
'ai' => array('application/pdf', 'application/postscript'),
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'gzip' => 'application/x-gzip',
'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => array('application/x-javascript', 'text/plain'),
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => array('audio/x-aiff', 'audio/aiff'),
'aiff' => array('audio/x-aiff', 'audio/aiff'),
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'png' => array('image/png', 'image/x-png'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => array('text/css', 'text/plain'),
'html' => array('text/html', 'text/plain'),
'htm' => array('text/html', 'text/plain'),
'shtml' => array('text/html', 'text/plain'),
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => array('application/xml', 'text/xml', 'text/plain'),
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
'movie' => 'video/x-sgi-movie',
'doc' => array('application/msword', 'application/vnd.ms-office'),
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
'dot' => array('application/msword', 'application/vnd.ms-office'),
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json'),
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7',
'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
'3g2' => 'video/3gpp2',
'3gp' => array('video/3gp', 'video/3gpp'),
'mp4' => 'video/mp4',
'm4a' => 'audio/x-m4a',
'f4v' => array('video/mp4', 'video/x-f4v'),
'flv' => 'video/x-flv',
'webm' => 'video/webm',
'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan',
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac',
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
'ics' => 'text/calendar',
'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh',
'7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
'vcf' => 'text/x-vcard',
'srt' => array('text/srt', 'text/plain'),
'vtt' => array('text/vtt', 'text/plain'),
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
'odc' => 'application/vnd.oasis.opendocument.chart',
'otc' => 'application/vnd.oasis.opendocument.chart-template',
'odf' => 'application/vnd.oasis.opendocument.formula',
'otf' => 'application/vnd.oasis.opendocument.formula-template',
'odg' => 'application/vnd.oasis.opendocument.graphics',
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
'odi' => 'application/vnd.oasis.opendocument.image',
'oti' => 'application/vnd.oasis.opendocument.image-template',
'odp' => 'application/vnd.oasis.opendocument.presentation',
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
'odt' => 'application/vnd.oasis.opendocument.text',
'odm' => 'application/vnd.oasis.opendocument.text-master',
'ott' => 'application/vnd.oasis.opendocument.text-template',
'oth' => 'application/vnd.oasis.opendocument.text-web'
);
+10 -10
View File
@@ -1,11 +1,11 @@
<?php
/**
* Created by PhpStorm.
* User: linfan
* Date: 2018/11/2
* Time: 14:38
*/
defined('BASEPATH') OR exit('No direct script access allowed');
$config['host'] = '192.168.0.16';
<?php
/**
* Created by PhpStorm.
* User: linfan
* Date: 2018/11/2
* Time: 14:38
*/
defined('BASEPATH') OR exit('No direct script access allowed');
$config['host'] = '192.168.0.16';
$config['port'] = 27017;
+14 -14
View File
@@ -1,14 +1,14 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Profiler Sections
| -------------------------------------------------------------------------
| This file lets you determine whether or not various sections of Profiler
| data are displayed when the Profiler is enabled.
| Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/profiling.html
|
*/
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Profiler Sections
| -------------------------------------------------------------------------
| This file lets you determine whether or not various sections of Profiler
| data are displayed when the Profiler is enabled.
| Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/profiling.html
|
*/
+26 -26
View File
@@ -1,26 +1,26 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$config['access_key'] = 'Pn60lJXcaOGKvMjn5qv-OMr7wR1lp1p8QG7Ul6NK';
$config['secret_key'] = '83YE_xcHLuejVvbnCiMrMr-CYR7QshBfGgmPSknP';
$config['bucket'] = 'img-liche';
$config['region'] = '华南';
$config['is_https'] = 'https';
$config['domain'] = 'img.liche.cn';
$config['attch'] = 'liche/';
$config['img']['access_key'] = 'Pn60lJXcaOGKvMjn5qv-OMr7wR1lp1p8QG7Ul6NK';
$config['img']['secret_key'] = '83YE_xcHLuejVvbnCiMrMr-CYR7QshBfGgmPSknP';
$config['img']['bucket'] = 'img-liche';
$config['img']['region'] = '华南';
$config['img']['is_https'] = 'https';
$config['img']['domain'] = 'img.liche.cn';
$config['img']['attch'] = 'liche/';
$config['video']['access_key'] = 'Pn60lJXcaOGKvMjn5qv-OMr7wR1lp1p8QG7Ul6NK';
$config['video']['secret_key'] = '83YE_xcHLuejVvbnCiMrMr-CYR7QshBfGgmPSknP';
$config['video']['bucket'] = 'media-liche';
$config['video']['region'] = '华南';
$config['video']['is_https'] = 'https';
$config['video']['domain'] = 'media.liche.cn';
$config['video']['attch'] = 'liche/';
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$config['access_key'] = 'Pn60lJXcaOGKvMjn5qv-OMr7wR1lp1p8QG7Ul6NK';
$config['secret_key'] = '83YE_xcHLuejVvbnCiMrMr-CYR7QshBfGgmPSknP';
$config['bucket'] = 'img-liche';
$config['region'] = '华南';
$config['is_https'] = 'https';
$config['domain'] = 'img.liche.cn';
$config['attch'] = 'liche/';
$config['img']['access_key'] = 'Pn60lJXcaOGKvMjn5qv-OMr7wR1lp1p8QG7Ul6NK';
$config['img']['secret_key'] = '83YE_xcHLuejVvbnCiMrMr-CYR7QshBfGgmPSknP';
$config['img']['bucket'] = 'img-liche';
$config['img']['region'] = '华南';
$config['img']['is_https'] = 'https';
$config['img']['domain'] = 'img.liche.cn';
$config['img']['attch'] = 'liche/';
$config['video']['access_key'] = 'Pn60lJXcaOGKvMjn5qv-OMr7wR1lp1p8QG7Ul6NK';
$config['video']['secret_key'] = '83YE_xcHLuejVvbnCiMrMr-CYR7QshBfGgmPSknP';
$config['video']['bucket'] = 'media-liche';
$config['video']['region'] = '华南';
$config['video']['is_https'] = 'https';
$config['video']['domain'] = 'media.liche.cn';
$config['video']['attch'] = 'liche/';
+11 -11
View File
@@ -1,11 +1,11 @@
<?php
/**
* Created by PhpStorm.
* User: linfan
* Date: 2018/11/2
* Time: 14:38
*/
defined('BASEPATH') OR exit('No direct script access allowed');
$config['host'] = '127.0.0.1';
$config['port'] = 6679;
<?php
/**
* Created by PhpStorm.
* User: linfan
* Date: 2018/11/2
* Time: 14:38
*/
defined('BASEPATH') OR exit('No direct script access allowed');
$config['host'] = '127.0.0.1';
$config['port'] = 6379;
+54 -54
View File
@@ -1,54 +1,54 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
| example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
| https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
| $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = 'welcome';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
| example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
| https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
| $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = 'welcome';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
+64 -64
View File
@@ -1,64 +1,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| SMILEYS
| -------------------------------------------------------------------
| This file contains an array of smileys for use with the emoticon helper.
| Individual images can be used to replace multiple smileys. For example:
| :-) and :) use the same image replacement.
|
| Please see user guide for more info:
| https://codeigniter.com/user_guide/helpers/smiley_helper.html
|
*/
$smileys = array(
// smiley image name width height alt
':-)' => array('grin.gif', '19', '19', 'grin'),
':lol:' => array('lol.gif', '19', '19', 'LOL'),
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
':)' => array('smile.gif', '19', '19', 'smile'),
';-)' => array('wink.gif', '19', '19', 'wink'),
';)' => array('wink.gif', '19', '19', 'wink'),
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
':-S' => array('confused.gif', '19', '19', 'confused'),
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
':long:' => array('longface.gif', '19', '19', 'long face'),
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
':down:' => array('downer.gif', '19', '19', 'downer'),
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
':sick:' => array('sick.gif', '19', '19', 'sick'),
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
'>:(' => array('mad.gif', '19', '19', 'mad'),
':mad:' => array('mad.gif', '19', '19', 'mad'),
'>:-(' => array('angry.gif', '19', '19', 'angry'),
':angry:' => array('angry.gif', '19', '19', 'angry'),
':zip:' => array('zip.gif', '19', '19', 'zipper'),
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
':snake:' => array('snake.gif', '19', '19', 'snake'),
':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
':question:' => array('question.gif', '19', '19', 'question')
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| SMILEYS
| -------------------------------------------------------------------
| This file contains an array of smileys for use with the emoticon helper.
| Individual images can be used to replace multiple smileys. For example:
| :-) and :) use the same image replacement.
|
| Please see user guide for more info:
| https://codeigniter.com/user_guide/helpers/smiley_helper.html
|
*/
$smileys = array(
// smiley image name width height alt
':-)' => array('grin.gif', '19', '19', 'grin'),
':lol:' => array('lol.gif', '19', '19', 'LOL'),
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
':)' => array('smile.gif', '19', '19', 'smile'),
';-)' => array('wink.gif', '19', '19', 'wink'),
';)' => array('wink.gif', '19', '19', 'wink'),
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
':-S' => array('confused.gif', '19', '19', 'confused'),
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
':long:' => array('longface.gif', '19', '19', 'long face'),
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
':down:' => array('downer.gif', '19', '19', 'downer'),
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
':sick:' => array('sick.gif', '19', '19', 'sick'),
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
'>:(' => array('mad.gif', '19', '19', 'mad'),
':mad:' => array('mad.gif', '19', '19', 'mad'),
'>:-(' => array('angry.gif', '19', '19', 'angry'),
':angry:' => array('angry.gif', '19', '19', 'angry'),
':zip:' => array('zip.gif', '19', '19', 'zipper'),
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
':snake:' => array('snake.gif', '19', '19', 'snake'),
':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
':question:' => array('question.gif', '19', '19', 'question')
);
+5 -5
View File
@@ -1,6 +1,6 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$config['host'] = '192.168.0.16';
$config['port'] = 9512;
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$config['host'] = '192.168.0.16';
$config['port'] = 9512;
$config['SPHINX_MAX_MATCHES'] = '2000';
+214 -214
View File
@@ -1,214 +1,214 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| USER AGENT TYPES
| -------------------------------------------------------------------
| This file contains four arrays of user agent data. It is used by the
| User Agent Class to help identify browser, platform, robot, and
| mobile device data. The array keys are used to identify the device
| and the array values are used to set the actual name of the item.
*/
$platforms = array(
'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000',
'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT',
'windows 98' => 'Windows 98',
'win98' => 'Windows 98',
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS',
'android' => 'Android',
'blackberry' => 'BlackBerry',
'iphone' => 'iOS',
'ipad' => 'iOS',
'ipod' => 'iOS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh',
'linux' => 'Linux',
'debian' => 'Debian',
'sunos' => 'Sun Solaris',
'beos' => 'BeOS',
'apachebench' => 'ApacheBench',
'aix' => 'AIX',
'irix' => 'Irix',
'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD',
'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS',
'symbian' => 'Symbian OS'
);
// The order of this array should NOT be changed. Many browsers return
// multiple browser types so we want to identify the sub-type first.
$browsers = array(
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Edge',
'Chrome' => 'Chrome',
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
'Opera.*?Version' => 'Opera',
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser'
);
$mobiles = array(
// legacy array, old values commented out
'mobileexplorer' => 'Mobile Explorer',
// 'openwave' => 'Open Wave',
// 'opera mini' => 'Opera Mini',
// 'operamini' => 'Opera Mini',
// 'elaine' => 'Palm',
'palmsource' => 'Palm',
// 'digital paths' => 'Palm',
// 'avantgo' => 'Avantgo',
// 'xiino' => 'Xiino',
'palmscape' => 'Palmscape',
// 'nokia' => 'Nokia',
// 'ericsson' => 'Ericsson',
// 'blackberry' => 'BlackBerry',
// 'motorola' => 'Motorola'
// Phones and Manufacturers
'motorola' => 'Motorola',
'nokia' => 'Nokia',
'palm' => 'Palm',
'iphone' => 'Apple iPhone',
'ipad' => 'iPad',
'ipod' => 'Apple iPod Touch',
'sony' => 'Sony Ericsson',
'ericsson' => 'Sony Ericsson',
'blackberry' => 'BlackBerry',
'cocoon' => 'O2 Cocoon',
'blazer' => 'Treo',
'lg' => 'LG',
'amoi' => 'Amoi',
'xda' => 'XDA',
'mda' => 'MDA',
'vario' => 'Vario',
'htc' => 'HTC',
'samsung' => 'Samsung',
'sharp' => 'Sharp',
'sie-' => 'Siemens',
'alcatel' => 'Alcatel',
'benq' => 'BenQ',
'ipaq' => 'HP iPaq',
'mot-' => 'Motorola',
'playstation portable' => 'PlayStation Portable',
'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC',
'panasonic' => 'Panasonic',
'philips' => 'Philips',
'sagem' => 'Sagem',
'sanyo' => 'Sanyo',
'spv' => 'SPV',
'zte' => 'ZTE',
'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii',
'open web' => 'Open Web',
'openweb' => 'OpenWeb',
// Operating Systems
'android' => 'Android',
'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS',
'elaine' => 'Palm',
'series60' => 'Symbian S60',
'windows ce' => 'Windows CE',
// Browsers
'obigo' => 'Obigo',
'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser',
'mobilexplorer' => 'Mobile Explorer',
'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile',
// Other
'digital paths' => 'Digital Paths',
'avantgo' => 'AvantGo',
'xiino' => 'Xiino',
'novarra' => 'Novarra Transcoder',
'vodafone' => 'Vodafone',
'docomo' => 'NTT DoCoMo',
'o2' => 'O2',
// Fallback
'mobile' => 'Generic Mobile',
'wireless' => 'Generic Mobile',
'j2me' => 'Generic Mobile',
'midp' => 'Generic Mobile',
'cldc' => 'Generic Mobile',
'up.link' => 'Generic Mobile',
'up.browser' => 'Generic Mobile',
'smartphone' => 'Generic Mobile',
'cellphone' => 'Generic Mobile'
);
// There are hundreds of bots but these are the most common.
$robots = array(
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos',
'yandex' => 'YandexBot',
'mediapartners-google' => 'MediaPartners Google',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George',
'ia_archiver' => 'Alexa Crawler',
'MJ12bot' => 'Majestic-12',
'Uptimebot' => 'Uptimebot'
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| USER AGENT TYPES
| -------------------------------------------------------------------
| This file contains four arrays of user agent data. It is used by the
| User Agent Class to help identify browser, platform, robot, and
| mobile device data. The array keys are used to identify the device
| and the array values are used to set the actual name of the item.
*/
$platforms = array(
'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000',
'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT',
'windows 98' => 'Windows 98',
'win98' => 'Windows 98',
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS',
'android' => 'Android',
'blackberry' => 'BlackBerry',
'iphone' => 'iOS',
'ipad' => 'iOS',
'ipod' => 'iOS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh',
'linux' => 'Linux',
'debian' => 'Debian',
'sunos' => 'Sun Solaris',
'beos' => 'BeOS',
'apachebench' => 'ApacheBench',
'aix' => 'AIX',
'irix' => 'Irix',
'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD',
'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS',
'symbian' => 'Symbian OS'
);
// The order of this array should NOT be changed. Many browsers return
// multiple browser types so we want to identify the sub-type first.
$browsers = array(
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Edge',
'Chrome' => 'Chrome',
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
'Opera.*?Version' => 'Opera',
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser'
);
$mobiles = array(
// legacy array, old values commented out
'mobileexplorer' => 'Mobile Explorer',
// 'openwave' => 'Open Wave',
// 'opera mini' => 'Opera Mini',
// 'operamini' => 'Opera Mini',
// 'elaine' => 'Palm',
'palmsource' => 'Palm',
// 'digital paths' => 'Palm',
// 'avantgo' => 'Avantgo',
// 'xiino' => 'Xiino',
'palmscape' => 'Palmscape',
// 'nokia' => 'Nokia',
// 'ericsson' => 'Ericsson',
// 'blackberry' => 'BlackBerry',
// 'motorola' => 'Motorola'
// Phones and Manufacturers
'motorola' => 'Motorola',
'nokia' => 'Nokia',
'palm' => 'Palm',
'iphone' => 'Apple iPhone',
'ipad' => 'iPad',
'ipod' => 'Apple iPod Touch',
'sony' => 'Sony Ericsson',
'ericsson' => 'Sony Ericsson',
'blackberry' => 'BlackBerry',
'cocoon' => 'O2 Cocoon',
'blazer' => 'Treo',
'lg' => 'LG',
'amoi' => 'Amoi',
'xda' => 'XDA',
'mda' => 'MDA',
'vario' => 'Vario',
'htc' => 'HTC',
'samsung' => 'Samsung',
'sharp' => 'Sharp',
'sie-' => 'Siemens',
'alcatel' => 'Alcatel',
'benq' => 'BenQ',
'ipaq' => 'HP iPaq',
'mot-' => 'Motorola',
'playstation portable' => 'PlayStation Portable',
'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC',
'panasonic' => 'Panasonic',
'philips' => 'Philips',
'sagem' => 'Sagem',
'sanyo' => 'Sanyo',
'spv' => 'SPV',
'zte' => 'ZTE',
'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii',
'open web' => 'Open Web',
'openweb' => 'OpenWeb',
// Operating Systems
'android' => 'Android',
'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS',
'elaine' => 'Palm',
'series60' => 'Symbian S60',
'windows ce' => 'Windows CE',
// Browsers
'obigo' => 'Obigo',
'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser',
'mobilexplorer' => 'Mobile Explorer',
'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile',
// Other
'digital paths' => 'Digital Paths',
'avantgo' => 'AvantGo',
'xiino' => 'Xiino',
'novarra' => 'Novarra Transcoder',
'vodafone' => 'Vodafone',
'docomo' => 'NTT DoCoMo',
'o2' => 'O2',
// Fallback
'mobile' => 'Generic Mobile',
'wireless' => 'Generic Mobile',
'j2me' => 'Generic Mobile',
'midp' => 'Generic Mobile',
'cldc' => 'Generic Mobile',
'up.link' => 'Generic Mobile',
'up.browser' => 'Generic Mobile',
'smartphone' => 'Generic Mobile',
'cellphone' => 'Generic Mobile'
);
// There are hundreds of bots but these are the most common.
$robots = array(
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos',
'yandex' => 'YandexBot',
'mediapartners-google' => 'MediaPartners Google',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George',
'ia_archiver' => 'Alexa Crawler',
'MJ12bot' => 'Majestic-12',
'Uptimebot' => 'Uptimebot'
);
+19 -19
View File
@@ -1,19 +1,19 @@
<?php
/**
* Created by Vim
* User: lcc
* Desc: 微信支付配置
* Date: 2021/8/12
* Time: 14:12
*/
defined('BASEPATH') OR exit('No direct script access allowed');
$config['default'] = [ //服务商信息配置
'appid' => 'wxe66f905683582780', //服应用ID
'mchid' => '1612096731', //商户号
'merchantSerialNumber' => '761590F1FF6DFC2466894F96E2DE1169CE644A74', //商户号API证书序列号
'merchantPrivateKey' => '/home/dev28/liche/api/third_party/WXconfig/apiclient_key.pem', //商户私钥路径
'wechatpayCertificate' => '/home/dev28/liche/api/third_party/WXconfig/apiclient_wechatpay.pem', //微信支付平台证书路径
'sub_appid' => 'wx98e64c11aac45966' //子商户应用ID
];
<?php
/**
* Created by Vim
* User: lcc
* Desc: 微信支付配置
* Date: 2021/8/12
* Time: 14:12
*/
defined('BASEPATH') OR exit('No direct script access allowed');
$config['default'] = [ //服务商信息配置
'appid' => 'wxe66f905683582780', //服应用ID
'mchid' => '1612096731', //商户号
'merchantSerialNumber' => '761590F1FF6DFC2466894F96E2DE1169CE644A74', //商户号API证书序列号
'merchantPrivateKey' => '/home/dev28/liche/api/third_party/WXconfig/apiclient_key.pem', //商户私钥路径
'wechatpayCertificate' => '/home/dev28/liche/api/third_party/WXconfig/apiclient_wechatpay.pem', //微信支付平台证书路径
'sub_appid' => 'wx98e64c11aac45966' //子商户应用ID
];
+19 -19
View File
@@ -1,19 +1,19 @@
<?php
/**
* Created by Vim
* User: lcc
* Desc: 晓致小号
* Date: 2021/7/27
* Time: 11:32
*/
$config['app_id'] = 1216;
$config['app_key'] = 'V44SK7UJMUN1SH9FETN8QRT2';
$config['mobile_list'] = array(
'18017420332','18017414423','15317304631','15317106841',
'15317082243','15317373459','15317373449','15317373340',
'15317373147','15317373143','15317372640','15317371423',
'15317371412','15317371405','15317370437','15317368843',
'15317367941','15317367402','15317364837',
);
<?php
/**
* Created by Vim
* User: lcc
* Desc: 晓致小号
* Date: 2021/7/27
* Time: 11:32
*/
$config['app_id'] = 1216;
$config['app_key'] = 'V44SK7UJMUN1SH9FETN8QRT2';
$config['mobile_list'] = array(
'18017420332','18017414423','15317304631','15317106841',
'15317082243','15317373459','15317373449','15317373340',
'15317373147','15317373143','15317372640','15317371423',
'15317371412','15317371405','15317370437','15317368843',
'15317367941','15317367402','15317364837',
);
+557 -725
View File
File diff suppressed because it is too large Load Diff
-153
View File
@@ -1,153 +0,0 @@
<?php
/**
* Created by PhpStorm.
* User: xuxb
* Date: 2020/9/14
* Time: 10:51
*/
class Weixin extends CI_Controller
{
private $app_id;
private $reset;
private $appid;
private $secret;
private $corpid;
private $corpsecret;
public function __construct()
{
parent::__construct();
$this->app_id = $this->input->get('app_id');
$this->reset = $this->input->get('reset');
$this->appid = $this->input->get('appid');
$this->secret = $this->input->get('secret');
$this->corpid = $this->input->get('corpid');
$this->corpsecret = $this->input->get('corpsecret');
$wx_configs = array(
//小鱼冒泡
"13.1" => array('appid' => "wx13bb4ff11493bc7c", "secret" => "40d6032dece9aba7f9c2faa482abd827"),
);
$wx_config = $wx_configs[$this->app_id];
if ($wx_config) {
!$this->appid && $this->appid = $wx_config['appid'];
!$this->secret && $this->secret = $wx_config['secret'];
}
$param = array('appid' => $this->appid, "secret" => $this->secret);
$this->load->library("hd_wechat", $param);
}
/**
* 获取access_token
*/
function access_token()
{
$access_token = $this->hd_wechat->access_token($this->reset);
$data = array("access_token" => $access_token);
echo json_encode($data, JSON_UNESCAPED_UNICODE);
return;
}
/**
* 获取分享凭证
*/
function api_ticket()
{
$api_ticket = $this->hd_wechat->api_ticket($this->reset);
$data = array("api_ticket" => $api_ticket);
echo json_encode($data, JSON_UNESCAPED_UNICODE);
return;
}
/*
* 企业微信access_token
*/
public function qy_access_token()
{
$app = $this->input->get('app');
$corpid = $this->input->get('corpid');
$corpsecret = $this->input->get('corpsecret');
$params = array();
$app && $params['app'] = $app;
$corpid && $params['corpid'] = $corpid;
$corpsecret && $params['corpsecret'] = $corpsecret;
$this->load->library('wx_qyapi', $params);
$access_token = $this->wx_qyapi->access_token();
$data['access_token'] = $access_token;
echo json_encode($data, JSON_UNESCAPED_UNICODE);
return;
}
/**
* Notes:企业微信ticket
* Created on: 2022/3/30 9:53
* Created by: dengbw
*/
public function qy_jsapi_ticket()
{
$app = $this->input->get('app');
$corpid = $this->input->get('corpid');
$corpsecret = $this->input->get('corpsecret');
$params = array();
$app && $params['app'] = $app;
$corpid && $params['corpid'] = $corpid;
$corpsecret && $params['corpsecret'] = $corpsecret;
$this->load->library('wx_qyapi', $params);
$ticket = $this->wx_qyapi->jsapi_ticket();
$data['ticket'] = $ticket;
echo json_encode($data, JSON_UNESCAPED_UNICODE);
return;
}
/**
* Notes:企业微信自建应用access_token
* Created on: 2022/3/30 9:57
* Created by: dengbw
*/
public function qy_agent_access_token()
{
$app = $this->input->get('app');
$corpid = $this->input->get('corpid');
$corpsecret = $this->input->get('corpsecret');
$params = array();
$app && $params['app'] = $app;
$corpid && $params['corpid'] = $corpid;
$corpsecret && $params['corpsecret'] = $corpsecret;
$this->load->library('wx_qyapi_agent', $params);
$access_token = $this->wx_qyapi_agent->access_token();
$data['access_token'] = $access_token;
echo json_encode($data, JSON_UNESCAPED_UNICODE);
return;
}
/**
* Notes:企业微信自建应用ticket
* Created on: 2022/3/30 9:53
* Created by: dengbw
*/
public function qy_agent_jsapi_ticket()
{
$app = $this->input->get('app');
$corpid = $this->input->get('corpid');
$corpsecret = $this->input->get('corpsecret');
$params = array();
$app && $params['app'] = $app;
$corpid && $params['corpid'] = $corpid;
$corpsecret && $params['corpsecret'] = $corpsecret;
$this->load->library('wx_qyapi_agent', $params);
$ticket = $this->wx_qyapi_agent->jsapi_ticket();
$data['ticket'] = $ticket;
echo json_encode($data, JSON_UNESCAPED_UNICODE);
return;
}
}
+15 -10
View File
@@ -1,10 +1,15 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
$this->load->view('welcome_message');
}
}
<?php
//ini_set("display_errors", "On");//打开错误提示
//ini_set("error_reporting",E_ALL);//显示所有错误
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
$this->load->view('welcome_message');
}
public function test(){
}
}
File diff suppressed because it is too large Load Diff
+142
View File
@@ -0,0 +1,142 @@
<?php
defined('WXAPP_APP') or exit('No direct script access allowed');
/**
* Created by vim
* User: lcc
* Desc: 城市
* Date: 2021/07/27
* Time: 10:22
*/
require_once APPPATH . 'controllers/wxapp/Wxapp.php';
class City extends Wxapp
{
function __construct($inputs, $app_key)
{
parent::__construct($inputs, $app_key);
$this->login_white = array('get');//登录白名单
$this->check_status = array();//用户状态校验
$this->check_mobile = array();//需要手机号
$this->check_headimg = array();//授权微信信息
$this->load->model("sys/sys_city_model");
$this->load->model("sys/sys_area_model");
$this->load->model("biz/biz_model");
$this->load->model('area_model', 'mdArea');
$this->biz_id = $this->get_biz_id();
}
protected function get()
{
$page = $this->input_param('page');
$size = $this->input_param('size');
!$page && $page = 1;
!$size && $size = 20;
$default_city = $this->session['city_id'] ? $this->session['city_id'] : 350200;
$where = [
'status' => 1
];
if ($this->app_id == 2 && $this->session['group_id'] == 4) {
$biz_id_arr = explode(',', $this->session['biz_id']);
$biz_where = ['city_id>' => 0, 'status' => 1, 'type<>' => 4];
if ($this->session['biz_id'] && $biz_id_arr) {
$biz_ids = implode(',', $biz_id_arr);
$biz_where["id in ({$biz_ids})"] = null;
}
$typeAry = $this->biz_model->type_ary();
$type_ids = implode(',', array_keys($typeAry));
$type_ids && $biz_where["type in ($type_ids)"] = null;
$biz_rows = $this->biz_model->select_groupby('city_id', $biz_where, '', '', '', 'id,city_id');
$city_ids = implode(',', array_column($biz_rows, 'city_id'));
$city_ids && $where["city_id in ($city_ids)"] = null;
}
$count = $this->sys_city_model->count($where);
$lists = [];
if ($count) {
$rows = $this->sys_city_model->select($where, 'id desc', $page, $size, 'id,city_id,name');
$city_id_arr = array_column($rows, 'city_id');
$default_city = in_array($default_city, $city_id_arr) ? $default_city : $city_id_arr[0];
foreach ($rows as $key => $val) {
$lists = $val;
}
$lists = $rows;
}
$data = [
'list' => $lists,
'total' => $count,
'default' => $default_city
];
return $data;
}
protected function get_lists()
{
$city_lists = [430, 350]; //开发城省份 湖南 福建
$lists = [];
foreach ($city_lists as $item) {
$where['province_id'] = $item;
$rows = $this->mdArea->select_groupby('city_id', $where, '', 0, 100, 'city_id,city_name,id,province_name');
$children = [];
foreach ($rows as $item2) {
$children[] = ['id' => $item2['id'], 'city_id' => $item2['city_id'], 'name' => $item2['city_name']];
}
$lists[] = ['name' => $rows[0]['province_name'], 'propvince_id' => $item, 'children' => $children];
}
$data = [
'area_list' => $lists,
'default_area_id' => [350, 350200]
];
return $data;
}
/**
* Notes:获取省/市/区/街道
* Created on: 2022/7/1 11:17
* Created by: dengbw
* @return mixed
*/
public function get_area()
{
$type = $this->input->get('type');
$pid = intval($this->input->get('pid'));
$lists = [];
switch ($type) {
case 'city':
!$pid && $pid = 350;//默认福建
if($this->biz_id){
$biz = $this->biz_model->get(['id'=>$this->biz_id]);
$biz['province_id'] && $pid = $biz['province_id'];
}
$res = $this->mdArea->select(['province_id' => $pid], null, null, null, 'distinct(city_id), city_name');
foreach ($res as $v) {
$lists[] = ['id' => $v['city_id'], 'name' => $v['city_name']];
}
break;
case 'county':
$res = $this->mdArea->select(['city_id' => $pid], null, null, null, 'distinct(county_id), county_name');
foreach ($res as $v) {
$lists[] = ['id' => $v['county_id'], 'name' => $v['county_name']];
}
break;
case 'street':
$this->load->model('sys/sys_street_model', 'mdStreet');
$res = $this->mdStreet->select(['county_id' => $pid], 'id ASC', 0, 0, 'street_id,street_name');
foreach ($res as $v) {
$lists[] = ['id' => $v['street_id'], 'name' => $v['street_name']];
}
break;
default:
$res = $this->mdArea->select(null, null, null, null, 'distinct(province_id), province_name');
foreach ($res as $v) {
$lists[] = ['id' => $v['province_id'], 'name' => $v['province_name']];
}
break;
}
$data = [
'list' => $lists,
];
return $data;
}
}
@@ -0,0 +1,132 @@
<?php
defined('WXAPP_APP') OR exit('No direct script access allowed');
/**
* Created by Vim
* User: lcc
* Date: 2021/06/23
* Time: 14:08
*/
require_once APPPATH . 'controllers/wxapp/Wxapp.php';
class Customerlogs extends Wxapp
{
function __construct($inputs, $app_key)
{
parent::__construct($inputs, $app_key);
$this->login_white = array();//登录白名单
$this->check_status = array();//用户状态校验
$this->check_mobile = array();//需要手机号
$this->check_headimg = array();//授权微信信息
$this->load->model('receiver/receiver_customers_model', 'customers_model');
$this->load->model('receiver/receiver_customer_oplogs_model', 'customer_oplogs_model');
$this->load->model('receiver/receiver_comments_model', 'mdComments');
// $this->load->model('receiver/receiver_xz_model');
}
protected function get()
{
$id = $this->input_param('id');
$page = $this->input_param('page');
$size = $this->input_param('size');
!$page && $page = 1;
!$size && $size = 20;
$where = [
'customer_id' => $id
];
$count = $this->customer_oplogs_model->count($where);
$lists = [];
if ($count) {
$rows = $this->customer_oplogs_model->select($where, 'id desc', $page, $size, 'id,log,uname,type,c_time,imgs');
foreach ($rows as $key => $val) {
$record = '';
$second = 0;
$content = $val['log'];
$img_json = json_decode($val['imgs'], true);
$imgs = [];
if ($img_json) {
foreach ($img_json as $val2) {
$imgs[] = build_qiniu_image_url($val2);
}
}
if ($val['type'] == 2) {
$rec_row = $this->receiver_xz_model->get(['id' => $val['log']], 'rec_url,duration');
$content = '拨打电话';
!$rec_row['duration'] && $content .= '(未接通)';
$rec_row['rec_url'] && $record = $rec_row['rec_url'];
$rec_row['duration'] && $second = intval($rec_row['duration'] / 1000);
}
$comments = [];
$res = $this->mdComments->select(['pid' => $val['id'], 'status' => 1, 'type' => 0], 'id asc', 0, 0
, 'uname,content');
foreach ($res as $key2 => $val2) {
$comments[] = [
'uname' => $val2['uname'],
'content' => $val2['content']
];
}
$lists[] = [
'id' => $val['id'],
'content' => "{$val['uname']}" . $content,
'record_url' => $record,
'second' => $second,
'imgs' => $imgs,
'comments' => $comments,
'type_name' => $this->customer_oplogs_model->typeAry($val['type']),
'c_time' => date('Y.m.d H:i', $val['c_time'])
];
}
}
$data = [
'list' => $lists,
'total' => $count
];
if ($page == 1) { //获取统计数据
$row = $this->customers_model->get(['id' => $id]);
$statistics = [
[
'name' => '去电',
'val' => $this->customer_oplogs_model->count(['customer_id' => $id, 'type' => 2]),
'color' => '#f3f6fc',
],
[
'name' => '短信',
'val' => $this->customer_oplogs_model->count(['customer_id' => $id, 'type' => 1]),
'color' => '#fffaeb',
],
[
'name' => '到店',
'val' => $row['a_num'],
'color' => '#f1f9f8',
],
[
'name' => '试驾',
'val' => $row['t_num'],
'color' => '#fff6f8',
]
];
$data['statistics'] = $statistics;
}
return $data;
}
protected function post()
{
$id = $this->input_param('cus_id');
$log = trim($this->input_param('content'));
$img_arr = $this->input_param('imgs');
if (!$log && !$img_arr) {
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
$this->load->library('receiver/customers_entity');
$result = $this->customers_entity->add_log_visit($id, $this->session['uid'], $this->session['uname'], $log, 0, 1, $img_arr);
if ($result) {
throw new Exception('修改成功', API_CODE_SUCCESS);
} else {
throw new Exception('修改失败', ERR_PARAMS_ERROR);
}
}
}
File diff suppressed because it is too large Load Diff
+8 -9
View File
@@ -1,8 +1,5 @@
<?php
//error_reporting(E_ALL);
//ini_set('display_errors', 1);
defined('WXAPP_APP') or exit('No direct script access allowed');
/**
* Created by Vim
* User: lcc
@@ -13,6 +10,7 @@ require_once APPPATH . 'controllers/wxapp/Wxapp.php';
class Sms extends Wxapp
{
private $smsSign = '理车宝';
function __construct($inputs, $app_key)
{
@@ -35,18 +33,19 @@ class Sms extends Wxapp
throw new Exception('请输入正确的手机号码', ERR_PARAMS_ERROR);
}
$user = $this->app_user_model->get(['mobile' => $mobile, 'status>' => -1]);
exit;
if (!$user) {
throw new Exception('用户不存在', API_CODE_FAIL);
}
$mc = &load_cache();
$key = "licheb_login_code_" . $mobile;
if (!$code = $this->app_redis->get($key)) {
if (!$code = $mc->get($key)) {
$this->load->helper('string');
$code = random_string('numeric', 6);
$this->app_redis->save($key, $code, 600);
$mc->save($key, $code, 600);
}
send_sms($mobile, $code);
$content = "{$this->smsSign}" . "您的验证码为:{$code},请勿泄露于他们!";
b2m_send_sms($mobile, $content);
$msg = '发送成功';
throw new Exception($msg, API_CODE_SUCCESS);
}
@@ -68,7 +67,7 @@ class Sms extends Wxapp
throw new Exception('该客户不可操作', ERR_PARAMS_ERROR);
}
$mobile = $row['mobile'];
$content = '【狸车】' . $content;
$content = "{$this->smsSign}" . $content;
b2m_send_sms($mobile, $content);
$this->load->library('receiver/customers_entity');
$this->customers_entity->add_log_visit($id, $uid, $this->session['uname'], $content, 1, 1);
@@ -91,7 +90,7 @@ class Sms extends Wxapp
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
$mobile = $row['mobile'];
$content = '【狸车】' . $content;
$content = "{$this->smsSign}" . $content;
b2m_send_sms($mobile, $content);
$this->load->library('receiver/customers_entity');
$this->customers_entity->add_log($row['id'], $uid, $this->session['uname'], $content, 1);
+776
View File
@@ -0,0 +1,776 @@
<?php
defined('WXAPP_APP') OR exit('No direct script access allowed');
/**
* Created by Vim
* User: lcc
* Date: 2021/09/16
* Time: 10:30
*/
require_once APPPATH.'controllers/wxapp/Wxapp.php';
class Statistics extends Wxapp{
function __construct($inputs, $app_key){
parent::__construct($inputs, $app_key);
$this->load->model("biz/biz_model");
$this->load->model('receiver/receiver_customers_model','customers_model');
// $this->load->model('receiver/order/receiver_orders_model','orders_model');
// $this->load->model('receiver/order/receiver_orders_v2_model', 'mdOrders');
// $this->load->library('receiver/stats_entity');
}
protected function get(){
}
//统计客户
protected function get_cust(){
$season = $this->input_param('season');
$city_id = $this->input_param('city_id');
!strlen($season) && $season = date('n')-1;//当前月份
$month = $season+1;
$season_data = $this->months();
$series = [];
$bizs = [];
$months_arr = [];
$months_arr[] = [
'cn' => $season_data[$season],
's_time' => date("Y-{$month}-01 00:00:00"),
'e_time' => date("Y-{$month}-t 23:59:59"),
];
$fileds = 'id,biz_name';
$biz_id_arr = explode(',',$this->session['biz_id']);
if($this->session['biz_id'] && $biz_id_arr){
$city_id && $o_where = ['city_id'=>$city_id];
$bizs_lists = $this->biz_model->get_by_id_arr($biz_id_arr,$o_where,$fileds);
}else{
$typeAry = $this->biz_model->type_ary();
$type_ids = implode(',',array_keys($typeAry));
$bizs_lists = $this->biz_model->select(['status'=>1,'city_id'=>$city_id,"type in ($type_ids)" => null],'id desc','','',$fileds);
}
if($bizs_lists){
$bizs = array_column($bizs_lists,'biz_name');
foreach($bizs_lists as $key=>$val){
$count_data = [];
foreach($months_arr as $v2){
$where = [
'biz_id' => $val['id'],
'status>=' => 0,
'c_time>=' => strtotime($v2['s_time']),
'c_time<=' => strtotime($v2['e_time']),
'brand_id!=' => 3,
];
$count_data[] = $this->customers_model->count($where);
}
$series[] = [
'name' => $val['biz_name'],
'type' => 'bar',
'data' => $count_data
];
}
}
$stat_data = [
'tooltip' => [
'trigger' => 'axis',
'axisPointer' => ['type'=>'shadow']
],
'legend' => [
'top' => 'bottom',
'data'=> $bizs
],
'grid' => [
'top' => '8%',
'left' => '2%',
'right' => '5%',
'bottom' => '12%',
'containLabel' => true
],
'xAxis' => [
'type' => 'value',
'boundaryGap' => [0, 0.01]
],
'yAxis' => [
'type' => 'category',
'data' => array_column($months_arr,'cn')
],
'series' => $series
];
$data = [
'stat_data' => $stat_data,
'season_data' => $season_data,
'season' => $season
];
return $data;
}
//统计订单
protected function get_orders(){
$season = $this->input_param('season');
$city_id = $this->input_param('city_id');
!strlen($season) && $season = ceil((date('n'))/3)-1;//当月是第几季度
$season_data = $this->season_data($season+1);
$days = getMonth($season+1);
$series = [];
$bizs = [];
$months_arr = [];
foreach($days as $val){
$months_arr[] = [
'cn' => date('n月',strtotime($val)),
's_time' => date('Y-m-01 00:00:00',strtotime($val)),
'e_time' => date('Y-m-t 23:59:59',strtotime($val)),
];
}
$fileds = 'id,biz_name';
$biz_id_arr = explode(',',$this->session['biz_id']);
if($this->session['biz_id'] && $biz_id_arr){
$city_id && $o_where = ['city_id'=>$city_id];
$bizs_lists = $this->biz_model->get_by_id_arr($biz_id_arr,$o_where,$fileds);
}else{
$typeAry = $this->biz_model->type_ary();
$type_ids = implode(',',array_keys($typeAry));
$bizs_lists = $this->biz_model->select(['status'=>1,'city_id'=>$city_id,"type in ($type_ids)" => null],'id desc','','',$fileds);
}
if($bizs_lists){
$bizs = array_column($bizs_lists,'biz_name');
foreach($bizs_lists as $key=>$val){
$count_data = [];
foreach($months_arr as $v2){
$where = [
'biz_id' => $val['id'],
'status>=' => 0,
'c_time>=' => strtotime($v2['s_time']),
'c_time<=' => strtotime($v2['e_time']),
'brand_id!=' => 3,
];
$count_data[] = $this->orders_model->count($where);
}
$series[] = [
'name' => $val['biz_name'],
'type' => 'line',
'stack' => '总量',
'data' => $count_data,
'smooth' => true
];
}
}
$stat_data = [
'tooltip' => ['trigger' => 'axis'],
'legend' => ['top'=>'bottom','data'=>$bizs],
'grid' => [
'top' => '10%',
'left' => '2%',
'right' => '5%',
'bottom' => '12%',
'containLabel' => true
],
'xAxis' => [
'type' => 'category',
'boundaryGap' => false,
'data' => array_column($months_arr,'cn')
],
'yAxis' => ['type'=>'value'],
'series' => $series,
];
$data = [
'stat_data' => $stat_data,
'season_data' => $season_data,
'season' => $season
];
return $data;
}
//数据分析页面客户数据
protected function get_scust(){
$day = $this->input_param('day');
$month = $this->input_param('month');
$biz_id = $this->input_param('biz_id');
$admin_id = $this->input_param('admin_id');
if(!$biz_id){
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
if(!$day && $month){
$day = date("Y-{$month}-01");
}
!$day && $day = date('Y-m-d');//获取当天
$status_list = [
[
'title' => '订单客户',
'icon' => 'icon-statistics-custom-1',
'status' => 2
],
[
'title' => '到店客户',
'icon' => 'icon-statistics-custom-2',
'status' => 1
],
[
'title' => '未见客户',
'icon' => 'icon-statistics-custom-3',
'status' => 0
],
[
'title' => '未联潜客',
'icon' => 'icon-statistics-custom-4',
'status' => ''
],
[
'title' =>'战败客户',
'icon' => 'icon-statistics-custom-5',
'status' => 3
],
];
foreach($status_list as $key => $val){
$setValue = [
'title' => $val['title'],
'icon' => $val['icon'],
];
$where = [
'biz_id' => $biz_id,
'brand_id!=' => 3
];
$admin_id && $where['admin_id'] = $admin_id;
if($day){
$s_time = date('Y-m-01 00:00:00',strtotime($day));
$e_time = date('Y-m-t 23:59:59',strtotime($day));
$where['c_time>='] = strtotime($s_time);
$where['c_time<='] = strtotime($e_time);
}
if(strlen($val['status'])){
$where['status'] = $val['status'];
$setValue['value'] = $this->customers_model->count($where);
}else{
$where["cont_time = '0000-00-00 00:00:00'"] = null;
$setValue['value'] = $this->customers_model->count($where);
}
$custom[] = $setValue;
}
$months_arr = [];
for($i=2;$i>=0;$i--){
$_time = date("Y-m-01",mktime(0, 0 , 0,date("m",strtotime($day))-$i,1,date("Y",strtotime($day))));
$months_arr [] = [
'cn' => date('n月',strtotime($_time)),
's_time' => date('Y-m-01 00:00:00',strtotime($_time)),
'e_time' => date('Y-m-t 23:59:59',strtotime($_time))
];
}
foreach($months_arr as $val){
$where = [
'biz_id' => $biz_id,
'status>=' => 0,
'c_time>=' => strtotime($val['s_time']),
'c_time<=' => strtotime($val['e_time']),
'brand_id!=' => 3,
];
$count_data[] = $this->customers_model->count($where);
}
//图标数据
$stat_data = [
'tooltip' => [
'trigger' => 'axis',
'axisPointer' => [
'type' => 'shadow'
]
],
'grid' => [
'top' => '10%',
'left' => '2%',
'right' => '5%',
'bottom' => '5%',
'containLabel' => true
],
'xAxis' => [
'type' => 'value',
'boundaryGap' => [0, 0.01]
],
'yAxis' => [
'type' => 'category',
'data' => array_column($months_arr,'cn'),
],
'series' => [
[
'type' => 'bar',
'itemStyle' => [
'color' => '#2e3246',
'borderRadius' => [0, 20, 20, 0],
],
'barWidth' => '15',
'data' => $count_data,
'label' => [
'show' => true,
'position' => 'right',
'formatter' => '{@[n]}',
'valueAnimation' => true
]
]
]
];
$data = [
'custom' => $custom,
'stat_data' => $stat_data,
];
return $data;
}
//数据分析页面订单数据
protected function get_ocust(){
$day = $this->input_param('day');
$biz_id = $this->input_param('biz_id');
$month = $this->input_param('month');
$admin_id = $this->input_param('admin_id');
if(!$biz_id){
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
if(!$day && $month){
$day = date("Y-{$month}-01");
}
!$day && $day = date('Y-m-d');//获取当天
$status_list = [
[
'title' => '合同签订',
'icon' => 'icon-statistics-order-1',
'status' => 0
],
[
'title' => '分期办理',
'icon' => 'icon-statistics-order-2',
'status' => 1
],
[
'title' => '车辆确认',
'icon' => 'icon-statistics-order-3',
'status' => 2
],
[
'title' => '申请开票',
'icon' => 'icon-statistics-order-4',
'status' => 3
],
[
'title' =>'代办服务',
'icon' => 'icon-statistics-order-5',
'status' => 4
],
[
'title' =>'交付确认',
'icon' => 'icon-statistics-order-6',
'status' => 5
],
[
'title' =>'完成交付',
'icon' => 'icon-statistics-order-7',
'status' => 6
],
];
foreach($status_list as $key => $val){
$setValue = [
'title' => $val['title'],
'icon' => $val['icon'],
];
$where = [
'status' => $val['status'],
'biz_id' => $biz_id,
'brand_id!=' => 3,
];
if($day){
$s_time = date('Y-m-01 00:00:00',strtotime($day));
$e_time = date('Y-m-t 23:59:59',strtotime($day));
$where['c_time>='] = strtotime($s_time);
$where['c_time<='] = strtotime($e_time);
}
$admin_id && $where['admin_id'] = $admin_id;
$setValue['value'] = $this->orders_model->count($where);
$custom[] = $setValue;
}
$months_arr = [];
for($i=2;$i>=0;$i--){
$_time = date("Y-m-01",mktime(0, 0 , 0,date("m",strtotime($day))-$i,1,date("Y",strtotime($day))));
$months_arr [] = [
'cn' => date('n月',strtotime($_time)),
's_time' => date('Y-m-01 00:00:00',strtotime($_time)),
'e_time' => date('Y-m-t 23:59:59',strtotime($_time))
];
}
foreach($months_arr as $val){
$where = [
'biz_id' => $biz_id,
'status>=' => 0,
'c_time>=' => strtotime($val['s_time']),
'c_time<=' => strtotime($val['e_time']),
'brand_id!=' => 3,
];
$count_data[] = $this->orders_model->count($where);
}
$stat_data = [
'grid' => [
'top' => '15%',
'left' => '2%',
'right' => '5%',
'bottom' => '5%',
'containLabel' => true
],
'xAxis' =>[
'type' => 'category',
'data' => array_column($months_arr,'cn'),
],
'yAxis' => [
'type' => 'value'
],
'series' => [
[
'data' => $count_data,
'type' => 'line',
'smooth' => true
]
]
];
$data = [
'custom' => $custom,
'stat_data' => $stat_data,
];
return $data;
}
//首页饼状图客户统计
protected function get_hcust(){
$biz_id = $this->input_param('biz_id');
$group_id = $this->session['group_id'];
$uid = $this->session['uid'];
!$biz_id && $biz_id = intval($this->session['biz_id']);
if(!$biz_id){
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
$status_list = $this->customers_model->get_status();
unset($status_list[-1]);
$count_data = [];
foreach($status_list as $key => $val){
$where = [
'biz_id' => $biz_id,
'status' => $key
];
$group_id == 1 && $where['admin_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$count = $this->customers_model->count($where);
$count_data[] = [
'value' => $count,
'name' => $val
];
}
//所有客户数据
$where = [
'status>='=>0,
'biz_id'=>$biz_id
];
$group_id == 1 && $where['admin_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$count = $this->customers_model->count($where);
$where = [
'status>='=>0,
'biz_id'=>$biz_id,
'is_top'=>1
];
$group_id == 1 && $where['admin_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$top_count = $this->customers_model->count($where); //关注
$where = [
'status>='=>0,
'biz_id'=>$biz_id,
"cont_time = '0000-00-00 00:00:00'"=>null
];
$group_id == 1 && $where['admin_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$un_count = $this->customers_model->count($where);//未联系
$stat_data = [
'tooltip' =>[
'trigger' => 'axis',
],
'legend' => [
'top' => 'bottom',
'orient' => 'horizontal',
'textStyle' =>[
'fontSize' => 9,
]
],
'series' => [
'type' => 'pie',
'top' => '0',
'radius' => ['30%', '48%'],
'data' => $count_data,
'label' =>[
'formatter' => '\n{b|{b}}\n{c|{c}}\n{per|{d}%} ',
'rich' => [
'b' =>[
'color' => '#4C5058',
'fontSize' => 10,
'lineHeight' => 15,
'align' => 'left',
],
'b' =>[
'color' => '#4C5058',
'fontSize' => 10,
'lineHeight' => 15,
'align' => 'left',
],
'per' => [
'color' => '#4C5058',
'fontSize' => 10,
'lineHeight' => 15,
'align' => 'left',
],
]
],
]
];
$data = [
'stat_data' => $stat_data,
'total' => $count,
'cont_total' => $un_count,
'top_total' => $top_count
];
return $data;
}
//首页柱状图订单统计
protected function get_horder(){
$biz_id = $this->input_param('biz_id');
$group_id = $this->session['group_id'];
$uid = $this->session['uid'];
!$biz_id && $biz_id = intval($this->session['biz_id']);
if(!$biz_id){
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
$status_list = $this->orders_model->get_status();
unset($status_list[7]);
$count_data = [];
$total = 0;
foreach($status_list as $key => $val){
$where = [
'biz_id' => $biz_id,
'status' => $key
];
$group_id == 1 && $where['admin_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$count = $this->orders_model->count($where);
$total += $count;
$count_data[] = [
'value' => $count,
'name' => $val
];
}
$stat_data = [
'tooltip' =>[
'trigger' => 'axis',
'axisPointer' => [
'type' => 'shadow'
]
],
'grid' =>[
'top' => '8%',
'left' => '2%',
'right' => '5%',
'bottom' => '2%',
'containLabel' => true
],
'xAxis' =>[
'type' => 'value',
'boundaryGap' => [0, 0.01]
],
'yAxis' =>[
'type' => 'category',
'data' => array_column($count_data,'name'),
],
'series' =>[
'type' => 'bar',
'itemStyle' =>[
'color' => '#2e3246',
'borderRadius' => [0, 20, 20, 0],
],
'barWidth' => '15',
'data' => array_column($count_data,'value'),
'label'=>[
'show' => true,
'position' => 'right',
'formatter' => '{@[n]}',
'valueAnimation' => true
]
]
];
$data = [
'stat_data' => $stat_data,
'total' => $total
];
return $data;
}
/**
* 获取月份
*/
private function months(){
$months = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
return $months;
}
/**
* 获取季度
* @param int $season 当前季度
*/
private function season_data($season){
$chiNum = ['一','二','三','四'];
if($season>4){
return [];
}
for($i=0;$i<$season;$i++){
$season_data[] = "{$chiNum[$i]}季度";
}
return $season_data;
}
protected function get_stats()
{
$s_time = $this->input_param('s_time');
$e_time = $this->input_param('e_time');
$city_id = intval($this->input_param('city_id'));
!$s_time && $s_time = date('Y-m-d');
!$e_time && $e_time = date('Y-m-d');
$c_time = ['s_time' => strtotime($s_time), 'e_time' => strtotime(date('Y-m-d 23:59:59', strtotime($e_time)))];
$o_time = ['s_time' => $s_time . ' 00:00:00', 'e_time' => $e_time . ' 23:59:59'];
//客户
$where = [
'status>=' => 0,
'cs_biz_id!=' => -1,
'c_time>=' => $c_time['s_time'],
'c_time<=' => $c_time['e_time'],
"biz_id in (select id from lc_biz where city_id={$city_id} and status=1)" => null
];
$customers = $this->customers_model->count($where);
//进店
$where = [
'a.type' => 4,
'a.log' => '客户到店',
'a.c_time>=' => $c_time['s_time'],
'a.c_time<=' => $c_time['e_time'],
'b.status>=' => 0,
'b.cs_biz_id!=' => -1,
"b.biz_id in (select id from lc_biz where city_id={$city_id} and status=1)" => null
];
$intos = $this->customers_model->db->select('a.id')
->from('lc_receiver_customer_oplogs as a')
->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left')
->where($where)
->count_all_results();
//成交
$where = [
'status>=' => 0,
'order_time>=' => $o_time['s_time'],
'order_time<=' => $o_time['e_time'],
"customer_id in (
select id from lc_receiver_customers where status>=0 and cs_biz_id!=-1 and
biz_id in (select id from lc_biz where city_id={$city_id} and status=1)
)" => null
];
$orders = $this->mdOrders->count($where);
$where = [
'a.status>=' => 0,
'a.bill_time>=' => $o_time['s_time'],
'a.bill_time<=' => $o_time['e_time'],
'a.status<>' => 2,
'b.pid_status' => 3,
'b.status in (1,2)' => null,
"a.customer_id in (
select id from lc_receiver_customers where status>=0 and cs_biz_id!=-1 and
biz_id in (select id from lc_biz where city_id={$city_id} and status=1)
)" => null
];
$bill_orders = $this->customers_model->db->select('a.id,count(b.status) as total')
->from('lc_receiver_orders_v2 as a')
->join('lc_receiver_order_status as b', "b.o_id=a.id", 'left')
->where($where)->group_by('b.o_id')->having('total=1')
->count_all_results();
$data['tabs'] = [
['title' => '全部客户', 'value_1' => $customers, 'url' => '/pages/dataAnalysis/detail/index?type=0'],
['title' => '到店客户', 'value_1' => $intos, 'url' => '/pages/dataAnalysis/detail/index?type=1'],
['title' => '订单数', 'value_1' => $orders, 'url' => '/pages/dataAnalysis/detail/index?type=2'],
['title' => '开票数', 'value_1' => $bill_orders, 'url' => '/pages/dataAnalysis/detail/index?type=3'],
];
$orders_per = number_format_com($orders / $customers * 100, 1, '');
$intos_per = number_format_com($intos / $customers * 100, 1, '');
$data['funnel'] = [
'title' => '线索转化漏斗',
'expected_data' => [
['name' => "成交数({$orders_per}%)", 'value' => 33.3],
['name' => "到店数({$intos_per}%)", 'value' => 66.7],
['name' => '客户数100%', 'value' => 100]
],
'actual_data' => [
['name' => '成交数', 'value' => $orders],
['name' => '到店数', 'value' => $intos],
['name' => '客户量', 'value' => $customers]
]
];
$data['title'] = '数据看板';
return $data;
}
protected function get_stats_days()
{
$days = intval($this->input_param('days'));
$city_id = intval($this->input_param('city_id'));
!$days && $days = 7;
$customers = $orders = $xAxis = [];
for ($i = ($days - 1); $i >= 0; $i--) {
$s_time = date('Y-m-d', strtotime("-{$i} day"));
$c_time = ['s_time' => strtotime($s_time), 'e_time' => strtotime(date('Y-m-d 23:59:59', strtotime($s_time)))];
$o_time = ['s_time' => $s_time . ' 00:00:00', 'e_time' => $s_time . ' 23:59:59'];
$xAxis[] = $days > 7 ? date('d', strtotime($s_time)) : date('n-d', strtotime($s_time));
$where = [
'status>=' => 0,
'cs_biz_id!=' => -1,
'c_time>=' => $c_time['s_time'],
'c_time<=' => $c_time['e_time'],
"biz_id in (select id from lc_biz where city_id={$city_id} and status=1)" => null
];
$customers[] = $this->customers_model->count($where);
$where = [
'status>=' => 0,
'order_time>=' => $o_time['s_time'],
'order_time<=' => $o_time['e_time'],
"customer_id in (
select id from lc_receiver_customers where status>=0 and cs_biz_id!=-1 and
biz_id in (select id from lc_biz where city_id={$city_id} and status=1)
)" => null
];
$orders[] = $this->mdOrders->count($where);
}
$title = $days == 7 ? "近一周" : "{$days}";
$data = [
'title' => "{$title}走势图", 'legend_data' => ["客户数", "订单数"],
'xAxis' => $xAxis,
'series' => [
['name' => "客户数", 'type' => 'line', 'smooth' => true, 'data' => $customers],
['name' => "订单数", 'type' => 'line', 'smooth' => true, 'data' => $orders]
]
];
return $data;
}
protected function get_stats_customer()
{
$s_time = $this->input_param('s_time');
$e_time = $this->input_param('e_time');
$city_id = intval($this->input_param('city_id'));
$type = intval($this->input_param('type'));
switch ($type){
case 1: //到店客户
return $this->stats_entity->customers($s_time,$e_time,$city_id,$type);
case 2: //订单数
return $this->stats_entity->orders($s_time,$e_time,$city_id);;
case 3: //开票数
return $this->stats_entity->orders($s_time,$e_time,$city_id,$type);
default: //全部客户
return $this->stats_entity->customers($s_time,$e_time,$city_id);
}
}
}
+628 -302
View File
@@ -1,302 +1,628 @@
<?php
defined('WXAPP_APP') OR exit('No direct script access allowed');
/**
* Created by Vim
* User: lcc
* Date: 2021.06.23
* Time: 14:08
*/
require_once APPPATH . 'controllers/wxapp/Wxapp.php';
class User extends Wxapp
{
function __construct($inputs, $app_key)
{
parent::__construct($inputs, $app_key);
$this->login_white = array('get_ukey');//登录白名单
$this->majia_white = array('get_ukey', 'get');//超级管理员披上马甲可操作权限
$this->check_status = array();//用户状态校验
$this->check_mobile = array();//需要手机号
$this->check_headimg = array();//授权微信信息
$this->load->model("biz/biz_model");
$this->load->model('auto/auto_brand_model');
$this->load->model('auto/auto_brand_biz_model');
$this->load->model('items/items_model', 'mdItems');
$this->load->model('items/items_oplogs_model', 'mdItemsOplogs');
$this->load->model('sys/sys_city_model');
$this->load->library('receiver/orders_v2_entity');
}
/**
* 获取ukey
* @return array
* @throws Exception
*/
protected function get_ukey()
{
$mobile_white = ['15359333655', '18350451617', '13860199666'];
$code = $this->input_param('code');
$mobile = $this->input_param('mobile');
$sms_code = $this->input_param('sms_code');
if (!$code || !$mobile || !$sms_code) {
throw new Exception('参数错误', API_CODE_INVILD_PARAM);
}
//判断验证码
if (!in_array($mobile, $mobile_white) && $this->env != 'd') {//测试环境和测试号码
$mc = &load_cache();
$key = "licheb_login_code_" . $mobile;
$cache_code = $mc->get($key);
if ($sms_code != $cache_code) {
throw new Exception('验证码错误', API_CODE_FAIL);
}
}
$user = $this->app_user_model->get(['mobile' => $mobile, 'status>' => -1]);
if (!$user) {
throw new Exception('用户不存在', API_CODE_FAIL);
}
if (!$user['status']) {
throw new Exception('该账号已停用', API_CODE_FAIL);
}
//判断门店是否存在
if ($user['group_id'] < 4) {
$biz_id = intval($user['biz_id']);
$biz = $this->biz_model->get(['id' => $biz_id, 'status' => 1]);
if (!$biz) {
throw new Exception('门店不存在', API_CODE_FAIL);
}
}
$session = $this->wx_session($code);
//print_r($session);
if (!$session['session_key']) {
throw new Exception('登录失败', API_CODE_FAIL);
}
$uid = $user['id'];
if (!$user['openid']) { //未绑定微信
$upd = [
'openid' => $session['openid']
];
$session['unionid'] && $upd['unionid'] = $session['unionid'];
$ret = $this->app_user_model->update($upd, array('id' => $uid));
if (!$ret) {
debug_log("[error]# code:{$code}; " . $this->app_user_model->db->last_query(), __FUNCTION__, $this->log_dir);
throw new Exception('授权用户信息失败', API_CODE_FAIL);
}
}
$udata = array('uid' => $uid, 'session_key' => $session['session_key']);
$ukey = $this->refresh_login($udata);
return array('ukey' => $ukey);
}
/**
* Notes:用户信息
* Created on: 2022/10/12 14:09
* Created by: dengbw
* @return array
* @throws Exception
*/
protected function get()
{
$uid = $this->session['uid'];
$biz_id = $this->session['new_biz_id'] ? $this->session['new_biz_id'] : intval($this->session['biz_id']);
$user = $this->app_user_model->get(array('id' => $uid));
//获取所属店铺字段
$biz = $this->biz_model->get(['id' => $biz_id, 'status' => 1], 'biz_name,type');
//判断门店是否存在
if (!$biz && $this->session['group_id'] < 4) {
$this->logout();
throw new Exception('门店不存在', API_CODE_FAIL);
}
$group_arr = $this->app_user_model->get_group();
$group_name = $group_arr[$user['group_id']] ? $group_arr[$user['group_id']] : '';
//获取拨打电话
$json = $this->session['jsondata'] ? json_decode($this->session['jsondata'], true) : array();
$tel = $this->session['mobile'];
if ($json && $json['licheb'] && $json['licheb']['tel']) {
$tel = $json['licheb']['tel'];
}
$data = array(
'uid' => $uid,
'uname' => $user['uname'],
'mobile' => $user['mobile'],
'headimg' => $user['headimg'],
'tel' => $tel,
'group_id' => $user['group_id'],
'group_name' => $group_name,
'biz_id' => $biz_id,
'biz_name' => $biz['biz_name'] ? $biz['biz_name'] : '',
'biz_type' => $biz['type'] ? $biz['type'] : '',
'show_sa' => $biz_id == 70 ? true : false,
'new_biz_id' => $this->session['new_biz_id'] ? $this->session['new_biz_id'] : '',
'group_id_type' => $this->session['group_id_type'] ? $this->session['group_id_type'] : '',
);
# 用户可切换的组别
$group_name1 = $group_arr[$user['group_id1']] ? $group_arr[$user['group_id1']] : '';
$group_name_arr = array();
if ($user['group_id'] && $user['group_id1']){
# 渠道角色 再显示下城市名称,门店角色 再显示下门店名称
$where_biz = ["id in ({$user['biz_id']}, {$user['biz_id1']})" => null];
$map_biz = $this->biz_model->map('id', 'biz_name', $where_biz, '', 0, 0, 'id,biz_name');
$where_city = ["city_id in ({$user['city_id']}, {$user['city_id1']})" => null];
$map_city = $this->sys_city_model->map('city_id', 'name', $where_city, '', 0, 0, 'city_id,name');
$group_name_ = '默认角色:'.$group_name;
if ($user['group_id'] == 4){
$group_name_ = $user['city_id'] ? $group_name_."({$map_city[$user['city_id']]})" : $group_name_;
}
else{
$group_name_ = $user['biz_id'] ? $group_name_."({$map_biz[$user['biz_id']]})" : $group_name_;
}
$group_name1_ = '第二角色:'.$group_name1;
if ($user['group_id1'] == 4){
$group_name1_ = $user['city_id1'] ? $group_name1_."({$map_city[$user['city_id1']]})" : $group_name1_;
}
else{
$group_name1_ = $user['biz_id1'] ? $group_name1_."({$map_biz[$user['biz_id1']]})" : $group_name1_;
}
$this->session['group_id_type'] && $group_name_arr[] = array('group_id'=>'group_id', "geoup_name"=>$group_name_);
!$this->session['group_id_type'] && $group_name_arr[] = array('group_id'=>'group_id1', "geoup_name"=>$group_name1_);
}
$data['group_name_arr'] = $group_name_arr;
if ($this->session['group_id_type']){
$data['group_id'] = $user['group_id1'];
$data['group_name'] = $group_name1;
if ($user['group_id1'] != 4){
$biz_id1 = $user['biz_id1'];
$data['biz_id'] = $biz_id1;
$biz1 = $this->biz_model->get(['id' => $biz_id1, 'status' => 1], 'biz_name,type');
$data['biz_name'] = $biz1['biz_name'] ? $biz1['biz_name'] : '';
$data['biz_type'] = $biz1['type'] ? $biz1['type'] : '';
}
}
return $data;
}
/**
* 更新用户信息
* @return array
* @throws Exception
*/
protected function put()
{
$encrypted = $this->input_param('encryptedData');
$iv = $this->input_param('iv');
$intro = $this->input_param('intro');
//获取用户信息
$uid = $this->session['uid'];
$user = $this->app_user_model->get(array('id' => $uid));
$upd = array();
$mobile = '';
//授权
if (!is_null($encrypted)) {
if (!$encrypted || !$iv) {
throw new Exception('授权失败', API_CODE_INVILD_PARAM);
}
$wxdata = $this->wx_data($encrypted, $iv);
if (!$wxdata) {
throw new Exception('授权失败', API_CODE_FAIL);
}
$openid = $wxdata['openId'];
$nickname = $wxdata['nickName'];
$sex = $wxdata['gender'];
$headimg = $wxdata['avatarUrl'];
$unionid = $wxdata['unionId'];
$mobile = $wxdata['phoneNumber'];
if (!$mobile && isset($wxdata['phoneNumber'])) {
throw new Exception('微信未绑定手机号', API_CODE_FAIL);
}
$mobile && !$user['mobile'] && $upd['mobile'] = $mobile;
$nickname && $upd['nickname'] = $nickname;
$headimg && $upd['headimg'] = $headimg;
if ($mobile) {//判断手机号是否重复
if (!mobile_valid($mobile)) {
throw new Exception("请输入正确的手机号", API_CODE_FAIL);
}
$where = array('mobile' => $mobile, 'id <>' => $uid, "status<>" => -1);
$count = $this->app_user_model->count($where);
if ($count > 0) {
throw new Exception("{$mobile}已被绑", API_CODE_FAIL);
}
}
} else {//编辑其他信息
$userInfo = $this->input_param('userInfo');
$userInfo['nickName'] && $upd['nickname'] = $userInfo['nickName'];
$userInfo['avatarUrl'] && $upd['headimg'] = $userInfo['avatarUrl'];
if ($intro) {
if (mb_strlen($intro, 'utf8') > 20) {
throw new Exception('介绍自己20个字够啦', API_CODE_FAIL);
}
$upd['signature'] = $intro;
}
}
if ($upd) {
$ret = $this->app_user_model->update($upd, array('id' => $uid));
if (!$ret) {
debug_log("[error]# " . $this->app_user_model->db->last_query(), __FUNCTION__, $this->log_dir);
throw new Exception('请求失败', API_CODE_FAIL);
}
}
$data = array(
'mobile' => $mobile,
'nickname' => $upd['nickname'] ? $upd['nickname'] : $user['nickname'],
'headimg' => $upd['headimg'] ? $upd['headimg'] : $user['headimg'],
);
return $data;
}
/**
* 切换角色:重新设置用户session里的group_id
*/
protected function put_resetgroupid()
{
$ukey = $this->input_param('ukey');
$group_id_type = $this->input_param('group_id');
if (!$group_id_type) {
throw new Exception('参数错误', API_CODE_INVILD_PARAM);
}
$uid = $this->session['uid'];
$user = $this->app_user_model->get(array('id' => $uid));
if ($group_id_type == 'group_id1'){
$this->session['group_id'] = $user['group_id1'];
$this->session['biz_id'] = $user['biz_id1'];
$this->session['city_id'] = $user['city_id1'];
$this->session['group_id_type'] = $group_id_type;
$this->session['new_biz_id'] = intval($user['biz_id1']);
}
else{
$this->session['group_id'] = $user['group_id'];
$this->session['biz_id'] = $user['biz_id'];
$this->session['city_id'] = $user['city_id'];
$this->session['group_id_type'] = '';
$this->session['new_biz_id'] = '';
}
$this->app_redis->save($this->redis_login . $ukey, json_encode($this->session, JSON_UNESCAPED_UNICODE), 30 * 24 * 3600);
throw new Exception('保存成功', API_CODE_SUCCESS);
}
}
<?php
defined('WXAPP_APP') or exit('No direct script access allowed');
/**
* Created by Vim
* User: lcc
* Date: 2021.06.23
* Time: 14:08
*/
require_once APPPATH . 'controllers/wxapp/Wxapp.php';
class User extends Wxapp
{
function __construct($inputs, $app_key)
{
parent::__construct($inputs, $app_key);
$this->login_white = array('get_ukey');//登录白名单
$this->majia_white = array('get_ukey', 'get');//超级管理员披上马甲可操作权限
$this->check_status = array();//用户状态校验
$this->check_mobile = array();//需要手机号
$this->check_headimg = array();//授权微信信息
$this->load->model("biz/biz_model");
$this->load->model('auto/auto_brand_model');
// $this->load->model('auto/auto_brand_biz_model');
// $this->load->model('items/items_model', 'mdItems');
// $this->load->model('items/items_oplogs_model', 'mdItemsOplogs');
$this->load->model('sys/sys_city_model');
// $this->load->library('receiver/orders_v2_entity');
}
/**
* 获取ukey
* @return array
* @throws Exception
*/
protected function get_ukey()
{
$mobile_white = ['18350451617'];
$code = $this->input_param('code');
$mobile = $this->input_param('mobile');
$sms_code = $this->input_param('sms_code');
if (!$code || !$mobile || !$sms_code) {
throw new Exception('参数错误', API_CODE_INVILD_PARAM);
}
//判断验证码
if (!in_array($mobile, $mobile_white) && $this->env != 'd') {//测试环境和测试号码
$key = "licheb_login_code_" . $mobile;
$cache_code = $this->app_redis->get($key);
if ($sms_code != $cache_code) {
throw new Exception('验证码错误', API_CODE_FAIL);
}
}
$user = $this->app_user_model->get(['mobile' => $mobile, 'status>' => -1]);
if (!$user) {
throw new Exception('用户不存在', API_CODE_FAIL);
}
if (!$user['status']) {
throw new Exception('该账号已停用', API_CODE_FAIL);
}
//判断门店是否存在
if ($user['group_id'] < 4) {
$biz_id = intval($user['biz_id']);
$biz = $this->biz_model->get(['id' => $biz_id, 'status' => 1]);
if (!$biz) {
throw new Exception('门店不存在', API_CODE_FAIL);
}
}
$session = $this->wx_session($code);
if (!$session['session_key']) {
throw new Exception('登录失败', API_CODE_FAIL);
}
$uid = $user['id'];
if (!$user['openid']) { //未绑定微信
$upd = [
'openid' => $session['openid']
];
$session['unionid'] && $upd['unionid'] = $session['unionid'];
$ret = $this->app_user_model->update($upd, array('id' => $uid));
if (!$ret) {
debug_log("[error]# code:{$code}; " . $this->app_user_model->db->last_query(), __FUNCTION__, $this->log_dir);
throw new Exception('授权用户信息失败', API_CODE_FAIL);
}
}
$udata = array('uid' => $uid, 'session_key' => $session['session_key']);
$ukey = $this->refresh_login($udata);
return array('ukey' => $ukey);
}
/**
* Notes:用户信息
* Created on: 2022/10/12 14:09
* Created by: dengbw
* @return array
* @throws Exception
*/
protected function get()
{
$uid = $this->session['uid'];
$biz_id = $this->session['new_biz_id'] ? $this->session['new_biz_id'] : intval($this->session['biz_id']);
$user = $this->app_user_model->get(array('id' => $uid));
//获取所属店铺字段
$biz = $this->biz_model->get(['id' => $biz_id, 'status' => 1], 'biz_name,type');
//判断门店是否存在
if (!$biz && $this->session['group_id'] < 4) {
$this->logout();
throw new Exception('门店不存在', API_CODE_FAIL);
}
$group_arr = $this->app_user_model->get_group();
$group_name = $group_arr[$user['group_id']] ? $group_arr[$user['group_id']] : '';
//获取拨打电话
$json = $this->session['jsondata'] ? json_decode($this->session['jsondata'], true) : array();
$tel = $this->session['mobile'];
if ($json && $json['licheb'] && $json['licheb']['tel']) {
$tel = $json['licheb']['tel'];
}
$data = array(
'uid' => $uid,
'uname' => $user['uname'],
'mobile' => $user['mobile'],
'headimg' => $user['headimg'],
'tel' => $tel,
'group_id' => $user['group_id'],
'group_name' => $group_name,
'biz_id' => $biz_id,
'biz_name' => $biz['biz_name'] ? $biz['biz_name'] : '',
'biz_type' => $biz['type'] ? $biz['type'] : '',
'show_sa' => $biz_id == 70 ? true : false,
'new_biz_id' => $this->session['new_biz_id'] ? $this->session['new_biz_id'] : '',
'group_id_type' => $this->session['group_id_type'] ? $this->session['group_id_type'] : '',
);
# 用户可切换的组别
$group_name1 = $group_arr[$user['group_id1']] ? $group_arr[$user['group_id1']] : '';
$group_name_arr = array();
if ($user['group_id'] && $user['group_id1']) {
# 渠道角色 再显示下城市名称,门店角色 再显示下门店名称
$where_biz = ["id in ({$user['biz_id']}, {$user['biz_id1']})" => null];
$map_biz = $this->biz_model->map('id', 'biz_name', $where_biz, '', 0, 0, 'id,biz_name');
$where_city = ["city_id in ({$user['city_id']}, {$user['city_id1']})" => null];
$map_city = $this->sys_city_model->map('city_id', 'name', $where_city, '', 0, 0, 'city_id,name');
$group_name_ = '默认角色:' . $group_name;
if ($user['group_id'] == 4) {
$group_name_ = $user['city_id'] ? $group_name_ . "({$map_city[$user['city_id']]})" : $group_name_;
} else {
$group_name_ = $user['biz_id'] ? $group_name_ . "({$map_biz[$user['biz_id']]})" : $group_name_;
}
$group_name1_ = '第二角色:' . $group_name1;
if ($user['group_id1'] == 4) {
$group_name1_ = $user['city_id1'] ? $group_name1_ . "({$map_city[$user['city_id1']]})" : $group_name1_;
} else {
$group_name1_ = $user['biz_id1'] ? $group_name1_ . "({$map_biz[$user['biz_id1']]})" : $group_name1_;
}
$this->session['group_id_type'] && $group_name_arr[] = array('group_id' => 'group_id', "geoup_name" => $group_name_);
!$this->session['group_id_type'] && $group_name_arr[] = array('group_id' => 'group_id1', "geoup_name" => $group_name1_);
}
$data['group_name_arr'] = $group_name_arr;
if ($this->session['group_id_type']) {
$data['group_id'] = $user['group_id1'];
$data['group_name'] = $group_name1;
if ($user['group_id1'] != 4) {
$biz_id1 = $user['biz_id1'];
$data['biz_id'] = $biz_id1;
$biz1 = $this->biz_model->get(['id' => $biz_id1, 'status' => 1], 'biz_name,type');
$data['biz_name'] = $biz1['biz_name'] ? $biz1['biz_name'] : '';
$data['biz_type'] = $biz1['type'] ? $biz1['type'] : '';
}
}
return $data;
}
/**
* 更新用户信息
* @return array
* @throws Exception
*/
protected function put()
{
$encrypted = $this->input_param('encryptedData');
$iv = $this->input_param('iv');
$intro = $this->input_param('intro');
//获取用户信息
$uid = $this->session['uid'];
$user = $this->app_user_model->get(array('id' => $uid));
$upd = array();
$mobile = '';
//授权
if (!is_null($encrypted)) {
if (!$encrypted || !$iv) {
throw new Exception('授权失败', API_CODE_INVILD_PARAM);
}
$wxdata = $this->wx_data($encrypted, $iv);
if (!$wxdata) {
throw new Exception('授权失败', API_CODE_FAIL);
}
$openid = $wxdata['openId'];
$nickname = $wxdata['nickName'];
$sex = $wxdata['gender'];
$headimg = $wxdata['avatarUrl'];
$unionid = $wxdata['unionId'];
$mobile = $wxdata['phoneNumber'];
if (!$mobile && isset($wxdata['phoneNumber'])) {
throw new Exception('微信未绑定手机号', API_CODE_FAIL);
}
$mobile && !$user['mobile'] && $upd['mobile'] = $mobile;
$nickname && $upd['nickname'] = $nickname;
$headimg && $upd['headimg'] = $headimg;
if ($mobile) {//判断手机号是否重复
if (!mobile_valid($mobile)) {
throw new Exception("请输入正确的手机号", API_CODE_FAIL);
}
$where = array('mobile' => $mobile, 'id <>' => $uid, "status<>" => -1);
$count = $this->app_user_model->count($where);
if ($count > 0) {
throw new Exception("{$mobile}已被绑", API_CODE_FAIL);
}
}
} else {//编辑其他信息
$userInfo = $this->input_param('userInfo');
$userInfo['nickName'] && $upd['nickname'] = $userInfo['nickName'];
$userInfo['avatarUrl'] && $upd['headimg'] = $userInfo['avatarUrl'];
if ($intro) {
if (mb_strlen($intro, 'utf8') > 20) {
throw new Exception('介绍自己20个字够啦', API_CODE_FAIL);
}
$upd['signature'] = $intro;
}
}
if ($upd) {
$ret = $this->app_user_model->update($upd, array('id' => $uid));
if (!$ret) {
debug_log("[error]# " . $this->app_user_model->db->last_query(), __FUNCTION__, $this->log_dir);
throw new Exception('请求失败', API_CODE_FAIL);
}
}
$data = array(
'mobile' => $mobile,
'nickname' => $upd['nickname'] ? $upd['nickname'] : $user['nickname'],
'headimg' => $upd['headimg'] ? $upd['headimg'] : $user['headimg'],
);
return $data;
}
/**
* 统计数据
*/
protected function get_cal()
{
$uid = $this->session['uid'];
$biz_id = $this->session['new_biz_id'] ? $this->session['new_biz_id'] : intval($this->session['biz_id']);
$group_id = $this->session['group_id'];
$this->load->model('receiver/receiver_customers_model', 'customers_model');
// $this->load->model('receiver/order/receiver_orders_model', 'orders_model');
// $this->load->model('receiver/order/receiver_orders_v2_model');
// $this->load->model('receiver/order/receiver_order_signs_model', 'order_signs_model');
$this->load->model('receiver/receiver_customers_visit_data_model', 'mdCustomerVisitData');
$where = ['status>' => -1, 'is_top' => 1, 'biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status!=' => 2];
$group_id == 1 && $where['admin_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$gz_count = $this->customers_model->count($where);
$where = ['status' => 0, 'biz_id' => $biz_id];
$group_id == 1 && $where['admin_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$sign_count = 0;
$where = ['status' => 1, 'biz_id' => $biz_id];
$group_id == 1 && $where['admin_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$loan_count = 0;
//客户代办事项
if ($group_id == 1) {
$customer_op_list = [];
} else {
//未派单客户
$where = ['admin_id' => 0, 'biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status>=' => 0];
if ($group_id == 4 && $biz_id != 1) {
$where['brand_id!='] = 3; //渠道经理过滤
}
$unuse_count = $this->customers_model->count($where);
$defeat_count = $this->customers_model->count(['biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'if_defeat' => 1, 'status>' => -1]);
$customer_op_list = [
['title' => '待分配客户(人)', 'icon' => 'icon-daifenpei', 'total' => $unuse_count, 'page' => '/pages/customer/allot/index'],
['title' => '战败申请(人)', 'icon' => 'icon-statistics-custom-5', 'total' => $defeat_count, 'page' => '/pages/customer/optDefeat/index'],
];
}
$where = ['status>=' => 0, 'payway' => 0, 'brand_id>' => 0, 'biz_id' => $biz_id, 'status!=' => 2,];
$group_id == 1 && $where['sale_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$fq_total = 0;
$where = ['status>=' => 0,
'brand_id>' => 0, 'biz_id' => $biz_id, 'status!=' => 2,
'id not in (select o_id from lc_receiver_order_status where pid_status=2 and status=1)' => null];
$group_id == 1 && $where['sale_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$pc_total = 0;
$where = [
'status>=' => 0,
'brand_id>' => 0, 'biz_id' => $biz_id, 'status!=' => 2,
'id not in (select o_id from lc_receiver_order_status where pid_status=3 and status=1)' => null,
'id in (select o_id from lc_receiver_order_status where pid_status=0 and status=2)' => null];
$group_id == 1 && $where['sale_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$kp_total = 0;
$where = [
'status>=' => 0,
'brand_id>' => 0, 'biz_id' => $biz_id, 'status!=' => 2,
'id in (select o_id from lc_receiver_order_status where pid_status=3 and status=1)' => null,
'id not in (select o_id from lc_receiver_order_status where pid_status=4 and status=2)' => null
];
$group_id == 1 && $where['sale_id'] = $uid;
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
$ck_total = 0;
$deallist = [
['title' => '分期办理 ', 'icon' => 'icon-banfenqi', 'total' => $fq_total, 'page' => '/pages/order/filterList/index2?type=fq&title=分期办理'],
['title' => '车辆匹配', 'icon' => 'icon-cheliangfenpei', 'total' => $pc_total, 'page' => '/pages/order/filterList/index2?type=pc&title=车辆分配'],
['title' => '发票开具', 'icon' => 'icon-kaipiao1', 'total' => $kp_total, 'page' => '/pages/order/filterList/index2?type=kp&title=发票开具'],
['title' => '交付确认', 'icon' => 'icon-jiaofu', 'total' => $ck_total, 'page' => '/pages/order/filterList/index2?type=jf&title=交付确认'],
];
$where_v = ['a.biz_id' => $biz_id, 'a.cs_biz_id<>' => -1, 'a.status in(0,1)' => null, 'b.t_day' => date('Y-m-d')];
$where_c = ['biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status in(0,1)' => null];
$group_id == 4 && $where_c['brand_id!='] = 3;
if ($group_id == 1) {
$where_v['b.sales_id'] = $uid;
$where_c['admin_id'] = $uid;
}
$h_num = $this->customers_model->count(array_merge($where_c, ['level' => 'H']));
$h_num_1 = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['a.level' => 'H', 'b.status<>' => 2]));
$h_num_2 = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['a.level' => 'H', 'b.status' => 2]));
$a_num = $this->customers_model->count(array_merge($where_c, ['level' => 'A']));
$a_num_1 = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['a.level' => 'A', 'b.status<>' => 2]));
$a_num_2 = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['a.level' => 'A', 'b.status' => 2]));
$b_num = $this->customers_model->count(array_merge($where_c, ['level' => 'B']));
$b_num_1 = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['a.level' => 'B', 'b.status<>' => 2]));
$b_num_2 = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['a.level' => 'B', 'b.status' => 2]));
$c_num = $this->customers_model->count(array_merge($where_c, ['level' => 'C']));
$c_num_1 = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['a.level' => 'C', 'b.status<>' => 2]));
$c_num_2 = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['a.level' => 'C', 'b.status' => 2]));
$levelSt = [
['title' => 'H级客户', 'list' => [['title' => '总数 >', 'num' => $h_num, 'url' => '/pages/customer/filterList/index?level=H&status_tp=1&title=H级客户']
, ['title' => '今日需跟进 >', 'num' => $h_num_1, 'url' => '/pages/customer/filterList/index?level=H&status=1&visit=1&title=H级今日需跟进']
, ['title' => '今日已跟进 >', 'num' => $h_num_2, 'url' => '/pages/customer/filterList/index?level=H&status=2&visit=1&title=H级今日已跟进']]],
['title' => 'A级客户', 'list' => [['title' => '总数 >', 'num' => $a_num, 'url' => '/pages/customer/filterList/index?level=A&status_tp=1&title=A级客户']
, ['title' => '今日需跟进 >', 'num' => $a_num_1, 'url' => '/pages/customer/filterList/index?level=A&status=1&visit=1&title=A级今日需跟进']
, ['title' => '今日已跟进 >', 'num' => $a_num_2, 'url' => '/pages/customer/filterList/index?level=A&status=2&visit=1&title=A级今日已跟进']]],
['title' => 'B级客户', 'list' => [['title' => '总数 >', 'num' => $b_num, 'url' => '/pages/customer/filterList/index?level=B&status_tp=1&title=B级客户']
, ['title' => '今日需跟进 >', 'num' => $b_num_1, 'url' => '/pages/customer/filterList/index?level=B&status=1&visit=1&title=B级今日需跟进']
, ['title' => '今日已跟进 >', 'num' => $b_num_2, 'url' => '/pages/customer/filterList/index?level=B&status=2&visit=1&title=B级今日已跟进']]],
['title' => 'C级客户', 'list' => [['title' => '总数 >', 'num' => $c_num, 'url' => '/pages/customer/filterList/index?level=C&status_tp=1&title=C级客户']
, ['title' => '今日需跟进 >', 'num' => $c_num_1, 'url' => '/pages/customer/filterList/index?level=C&status=1&visit=1&title=C级今日需跟进']
, ['title' => '今日已跟进 >', 'num' => $c_num_2, 'url' => '/pages/customer/filterList/index?level=C&status=2&visit=1&title=C级今日已跟进']]],
];
$wl_num = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['b.status<>' => 2]));
//数据统计
$str_uids = $str_userids = '';
if ($group_id == 1) {
$str_uids = $uid;
$str_userids = $this->session['userid'];
} else {
$res_user = $this->app_user_model->select(['biz_id' => $biz_id, 'group_id <' => 4, 'status>=' => 0], 'id asc', 0, 0, 'id,userid');
foreach ($res_user as $k => $v) {
$str_uids = $str_uids ? $str_uids . ',' . $v['id'] : $v['id'];
$v['userid'] && $str_userids = $str_userids ? $str_userids . "','" . $v['userid'] : $v['userid'];
}
}
!$str_uids && $str_uids = '-1';
!$str_userids && $str_userids = '-1';
$this->load->model('receiver/receiver_customer_oplogs_model', 'mdCustomerOpLogs');
$s_today = date('Y-m-d') . ' 00:00:00';
$e_today = date('Y-m-d') . ' 23:59:59';
$s_month = date('Y-m-01', strtotime(date("Y-m-d"))) . ' 00:00:00';
$e_month = date('Y-m-d', strtotime("$s_month +1 month -1 day")) . ' 23:59:59';
//线索
$where_today_xs = ['biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status>=' => 0, 'c_time>=' => strtotime($s_today), 'c_time<=' => strtotime($e_today)];
$where_month_xs = ['biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status>=' => 0, 'c_time>=' => strtotime($s_month), 'c_time<=' => strtotime($e_month)];
//企微
$where_today_qy = ['change_type' => 'add_external_contact', 'c_time>=' => strtotime($s_today), 'c_time<=' => strtotime($e_today)];
$where_month_qy = ['change_type' => 'add_external_contact', 'c_time>=' => strtotime($s_month), 'c_time<=' => strtotime($e_month)];
//到店
$where_today_dd = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1,
"id in(select customer_id from lc_receiver_customer_oplogs where type=4 and uid in({$str_uids}) and c_time>=" . strtotime($s_today) . " and c_time<=" . strtotime($e_today) . ")" => null];
$where_month_dd = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1,
"id in(select customer_id from lc_receiver_customer_oplogs where type=4 and uid in({$str_uids}) and c_time>=" . strtotime($s_month) . " and c_time<=" . strtotime($e_month) . ")" => null];
//订单
$where_today_order = ['status>=' => 0, 'order_time>=' => $s_today, 'order_time<=' => $e_today];
$where_month_order = ['status>=' => 0, 'order_time>=' => $s_month, 'order_time<=' => $e_month];
//战败
$where_today_defeat = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1,
"id in(select customer_id from lc_receiver_customer_oplogs where type=7 and uid in({$str_uids}) and c_time>=" . strtotime($s_today) . " and c_time<=" . strtotime($e_today) . ")" => null];
$where_month_defeat = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1,
"id in(select customer_id from lc_receiver_customer_oplogs where type=7 and uid in({$str_uids}) and c_time>=" . strtotime($s_month) . " and c_time<=" . strtotime($e_month) . ")" => null];
//退订
$where_today_refund = ['status' => 2, 'refund_time>=' => $s_today, 'refund_time<=' => $e_today];
$where_month_refund = ['status' => 2, 'refund_time>=' => $s_month, 'refund_time<=' => $e_month];
if ($group_id == 1) {
$where_today_xs['admin_id'] = $uid;
$where_month_xs['admin_id'] = $uid;
$where_today_order['admin_id'] = $uid;
$where_month_order['admin_id'] = $uid;
$where_today_refund['admin_id'] = $uid;
$where_month_refund['admin_id'] = $uid;
} else if ($group_id == 2 || $group_id == 3) {//店长/老板
$where_today_order["(biz_id = {$biz_id} OR admin_id = {$uid})"] = null;
$where_month_order["(biz_id = {$biz_id} OR admin_id = {$uid})"] = null;
$where_today_refund["(biz_id = {$biz_id} OR admin_id = {$uid})"] = null;
$where_month_refund["(biz_id = {$biz_id} OR admin_id = {$uid})"] = null;
} else if ($group_id == 4) {
$where_today_order['biz_id'] = $biz_id;
$where_month_order['biz_id'] = $biz_id;
$where_today_refund['biz_id'] = $biz_id;
$where_month_refund['biz_id'] = $biz_id;
if ($biz_id != 1) {//渠道经理过滤
$where_today_order['brand_id<>'] = 3;
$where_month_order['brand_id<>'] = 3;
$where_today_refund['brand_id<>'] = 3;
$where_month_refund['brand_id<>'] = 3;
}
}
$today_qy = $month_qy = 0;
if ($str_userids) {
$where_today_qy["userid in('{$str_userids}')"] = null;
$where_month_qy["userid in('{$str_userids}')"] = null;
$re_biz = $this->biz_model->get(['id' => $biz_id]);
if ($re_biz['type'] == 5) {//异业店
$this->load->model('app/app_different_qy_log_model', 'mdDifferentQyLog');
$today_qy = $this->mdDifferentQyLog->count($where_today_qy, 'distinct(external_userid)');
$month_qy = $this->mdDifferentQyLog->count($where_month_qy, 'distinct(external_userid)');
} else {
$today_qy = 0;
$month_qy = 0;
}
}
$statistics = [
['today' => ['title' => '今日', 'value' => $this->customers_model->count($where_today_xs), 'url' => '/pages/customer/filterList/index?status=3&visit=3&title=线索']
, 'month' => ['title' => '本月线索', 'value' => $this->customers_model->count($where_month_xs)]],
['today' => ['title' => '今日', 'value' => $today_qy, 'url' => '/pages/customer/filterList/index?status=4&visit=4&title=企v']
, 'month' => ['title' => '本月企v', 'value' => $month_qy]],
['today' => ['title' => '今日', 'value' => $this->customers_model->count($where_today_dd), 'url' => '/pages/customer/filterList/index?status=5&visit=5&title=到店']
, 'month' => ['title' => '本月到店', 'value' => $this->customers_model->count($where_month_dd)]],
['today' => ['title' => '今日', 'value' => 0, 'url' => '/pages/order/filterList/index2?status=6&visit=6&title=订单']
, 'month' => ['title' => '本月订单', 'value' => 0]],
['today' => ['title' => '今日', 'value' => $this->customers_model->count($where_today_defeat), 'url' => '/pages/customer/filterList/index?status=7&visit=7&title=战败']
, 'month' => ['title' => '本月战败', 'value' => $this->customers_model->count($where_month_defeat)]],
['today' => ['title' => '今日', 'value' => 0, 'url' => '/pages/order/filterList/index2?status=8&visit=8&title=退订']
, 'month' => ['title' => '本月退订', 'value' => 0]]
];
$data = [
'wl_count' => ['title' => '待跟进客户(人)', 'num' => $wl_num, 'url' => '/pages/customer/filterList/index?status=1&visit=1&title=待跟进客户'],
'gz_count' => ['title' => '特别关注客户(人)', 'num' => $gz_count, 'url' => '/pages/customer/filterList/index?istop=1&title=特别关注客户'],
'sign_count' => $sign_count,
'loan_count' => $loan_count,
'deallist' => $deallist,
'customer_op_list' => $customer_op_list,
'levelSt' => $levelSt,
'where_today_qy' => $where_today_qy,
'statistics' => $statistics,
'str_uids' => $str_uids
];
return $data;
}
/**
* 更新联系手机号
* @return array
* @throws Hd_Exception
*/
protected function put_tel()
{
$tel = $this->input_param('tel');
if (!mobile_valid($tel)) {
throw new Hd_Exception('确认一下手机号是否正确', API_CODE_INVILD_PARAM);
}
$uid = $this->session['uid'];
$user = $this->app_user_model->get(array('id' => $uid));
$json = $user['jsondata'] ? json_decode($user['jsondata'], true) : array();
$json['licheb']['tel'] = $tel;
$upd = array('jsondata' => json_encode($json, JSON_UNESCAPED_UNICODE));
$ret = $this->app_user_model->update($upd, array('id' => $uid));
if (!$ret) {
throw new Hd_Exception('更新失败', API_CODE_FAIL);
}
$data = array('tel' => $tel);
return $data;
}
/**
* 获取门店信息
* @return array
*/
protected function get_bizs()
{
$city_id = $this->input_param('city_id');
$lists = [];
$biz_id_arr = explode(',', $this->session['biz_id']);
$fileds = 'id,biz_name';
if ($this->session['biz_id'] && $biz_id_arr) {
$city_id && $o_where = ['city_id' => $city_id, 'type<>' => 4];
$bizs = $this->biz_model->get_by_id_arr($biz_id_arr, $o_where, $fileds);
} else {
$typeAry = $this->biz_model->type_ary();
$type_ids = implode(',', array_keys($typeAry));
$bizs = $this->biz_model->select(['status' => 1, 'city_id' => $city_id, "type in ($type_ids)" => null, 'type<>' => 4], 'id desc', '', '', $fileds);
}
if ($bizs) {
foreach ($bizs as $key => $val) {
$auto_brands = [];
$lists[] = [
'id' => $val['id'],
'name' => $val['biz_name'],
'auto_brands' => $auto_brands
];
}
}
$data = [
'list' => $lists,
];
return $data;
}
//获取门店管理员
protected function get_admins()
{
$biz_id = $this->input_param('biz_id');
$page = $this->input_param('page');
$size = $this->input_param('size');
!$page && $page = 1;
!$size && $size = 10;
if (!$biz_id) {
$biz_id = $this->session['new_biz_id'] ? $this->session['new_biz_id'] : intval($this->session['biz_id']);
}
$where = [
'status' => 1,
'biz_id' => $biz_id
];
$lists = [];
$count = $this->app_user_model->count($where);
if ($count) {
$rows = $this->app_user_model->select($where, 'id desc', $page, $size, 'id,uname');
$lists = $rows;
}
$tabs = $bizs = [];
$re_biz = $this->biz_model->get(['id' => $biz_id, 'status' => 1]);
if ($re_biz['type'] == 1) {//品牌店
$tabs = [['id' => 1, 'name' => '本店'], ['id' => 2, 'name' => '其它门店']];
$bizs = $this->biz_model->select(['type' => 1, 'status' => 1], 'id desc', 0, 0, 'id, biz_name as name');
}
$data = [
'list' => $lists,
'total' => $count,
'tabs' => $tabs,
'bizs' => $bizs,
];
return $data;
}
/**
* 重新设置用户session里的biz_id
*/
protected function put_resetbiz()
{
$ukey = $this->input_param('ukey');
$biz_id = $this->input_param('biz_id');
if (!$biz_id) {
throw new Hd_Exception('参数错误', API_CODE_INVILD_PARAM);
}
$this->session['new_biz_id'] = $biz_id;
$this->app_redis->save($this->redis_login . $ukey, json_encode($this->session, JSON_UNESCAPED_UNICODE), 30 * 24 * 3600);
throw new Exception('保存成功', API_CODE_SUCCESS);
}
/**
* 切换角色:重新设置用户session里的group_id
*/
protected function put_resetgroupid()
{
$ukey = $this->input_param('ukey');
$group_id_type = $this->input_param('group_id');
if (!$group_id_type) {
throw new Exception('参数错误', API_CODE_INVILD_PARAM);
}
$uid = $this->session['uid'];
$user = $this->app_user_model->get(array('id' => $uid));
if ($group_id_type == 'group_id1') {
$this->session['group_id'] = $user['group_id1'];
$this->session['biz_id'] = $user['biz_id1'];
$this->session['city_id'] = $user['city_id1'];
$this->session['group_id_type'] = $group_id_type;
$this->session['new_biz_id'] = intval($user['biz_id1']);
} else {
$this->session['group_id'] = $user['group_id'];
$this->session['biz_id'] = $user['biz_id'];
$this->session['city_id'] = $user['city_id'];
$this->session['group_id_type'] = '';
$this->session['new_biz_id'] = '';
}
$this->app_redis->save($this->redis_login . $ukey, json_encode($this->session, JSON_UNESCAPED_UNICODE), 30 * 24 * 3600);
throw new Exception('保存成功', API_CODE_SUCCESS);
}
}
+25 -25
View File
@@ -1,26 +1,26 @@
<?php
/**
* Created by PhpStorm.
* User: windows
* Date: 2018/11/20
* Time: 17:25
*/
class HD_Controller extends CI_Controller
{
//返回json数据
public function success($returnData, $msg = 'success', $code = 200)
{
header('Content-Type:application/json; charset=utf-8');
echo json_encode(array('data' => $returnData, 'code' => $code, 'msg' => $msg), JSON_UNESCAPED_UNICODE);
exit();
}
public function fail($returnData, $msg = 'fail', $code = 400)
{
header('Content-Type:application/json; charset=utf-8');
echo json_encode(array('data' => $returnData, 'code' => $code, 'msg' => $msg), JSON_UNESCAPED_UNICODE);
exit();
}
<?php
/**
* Created by PhpStorm.
* User: windows
* Date: 2018/11/20
* Time: 17:25
*/
class HD_Controller extends CI_Controller
{
//返回json数据
public function success($returnData, $msg = 'success', $code = 200)
{
header('Content-Type:application/json; charset=utf-8');
echo json_encode(array('data' => $returnData, 'code' => $code, 'msg' => $msg), JSON_UNESCAPED_UNICODE);
exit();
}
public function fail($returnData, $msg = 'fail', $code = 400)
{
header('Content-Type:application/json; charset=utf-8');
echo json_encode(array('data' => $returnData, 'code' => $code, 'msg' => $msg), JSON_UNESCAPED_UNICODE);
exit();
}
}
+1584 -1584
View File
File diff suppressed because it is too large Load Diff
+606 -606
View File
File diff suppressed because it is too large Load Diff
+31 -31
View File
@@ -1,32 +1,32 @@
<?php
/**
* Created by PhpStorm.
* User: lcc
* Date: 2020/3/24
* Time: 15:10
*/
class HD_Service
{
public $CI;
protected $log_dir;
public function __construct()
{
$this->CI = & get_instance();
$this->log_dir = lcfirst(get_class($this));
}
function __get($name){
if('_model' === substr($name, -6)){
return $this->CI->$name;
} elseif('_service' === substr($name, -8)){
return $this->CI->$name;
} elseif('load' == $name){
return $this->CI->load;
} elseif('config' == $name){
return $this->CI->config;
} elseif(isset($this->CI->$name)){
return $this->CI->$name;
}
return null;
}
<?php
/**
* Created by PhpStorm.
* User: lcc
* Date: 2020/3/24
* Time: 15:10
*/
class HD_Service
{
public $CI;
protected $log_dir;
public function __construct()
{
$this->CI = & get_instance();
$this->log_dir = lcfirst(get_class($this));
}
function __get($name){
if('_model' === substr($name, -6)){
return $this->CI->$name;
} elseif('_service' === substr($name, -8)){
return $this->CI->$name;
} elseif('load' == $name){
return $this->CI->load;
} elseif('config' == $name){
return $this->CI->config;
} elseif(isset($this->CI->$name)){
return $this->CI->$name;
}
return null;
}
}
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+101 -101
View File
@@ -1,101 +1,101 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
//todo:暂用,需重构
/**
* 成功数据重构
* @param $data
* @return array
*/
if(!function_exists('info_format'))
{
function info_format($data)
{
$data = _clean($data);
is_bool($data) && $data = array('status' => $data);
is_numeric($data) && $data = array('count' => $data);
is_string($data) && $data = array('result' => $data);
if(is_array($data) && array_search(current($data), $data) === 0)
{
$data = array('list' => $data);
}
if(empty($data))
{
$data = array('result' => array());
}
return array('errCode' => '0', 'data' => $data);
}
}
/**
* 过滤空字符
* @param $array
* @return array
*/
if(!function_exists('_clean'))
{
function _clean($array)
{
if(!is_array($array))
{
return $array;
}
foreach($array as $k => $v)
{
if($v === '' || $v === null || $v === array())
{
unset($array[$k]);
}
elseif(is_array($v))
{
$array[$k] = _clean($v);
}
}
return $array;
}
}
/**
* API 输出
* @param $result
* @param bool $ifgzip
*/
if(!function_exists('print_result'))
{
function print_result($result, $ifgzip = false)
{
if(!isset($result['errCode']))
{
$data = info_format($result);
}
else
{
$data = $result;
}
if($ifgzip)
{
header('Content-Type: application/json');
header('Content-Encoding: gzip');
echo gzencode(json_encode($data, JSON_UNESCAPED_UNICODE), 6);
exit;
}
else
{
$result = json_encode($data, JSON_UNESCAPED_UNICODE);
echo $result;
exit;
}
}
}
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
//todo:暂用,需重构
/**
* 成功数据重构
* @param $data
* @return array
*/
if(!function_exists('info_format'))
{
function info_format($data)
{
$data = _clean($data);
is_bool($data) && $data = array('status' => $data);
is_numeric($data) && $data = array('count' => $data);
is_string($data) && $data = array('result' => $data);
if(is_array($data) && array_search(current($data), $data) === 0)
{
$data = array('list' => $data);
}
if(empty($data))
{
$data = array('result' => array());
}
return array('errCode' => '0', 'data' => $data);
}
}
/**
* 过滤空字符
* @param $array
* @return array
*/
if(!function_exists('_clean'))
{
function _clean($array)
{
if(!is_array($array))
{
return $array;
}
foreach($array as $k => $v)
{
if($v === '' || $v === null || $v === array())
{
unset($array[$k]);
}
elseif(is_array($v))
{
$array[$k] = _clean($v);
}
}
return $array;
}
}
/**
* API 输出
* @param $result
* @param bool $ifgzip
*/
if(!function_exists('print_result'))
{
function print_result($result, $ifgzip = false)
{
if(!isset($result['errCode']))
{
$data = info_format($result);
}
else
{
$data = $result;
}
if($ifgzip)
{
header('Content-Type: application/json');
header('Content-Encoding: gzip');
echo gzencode(json_encode($data, JSON_UNESCAPED_UNICODE), 6);
exit;
}
else
{
$result = json_encode($data, JSON_UNESCAPED_UNICODE);
echo $result;
exit;
}
}
}
+45 -45
View File
@@ -1,46 +1,46 @@
<?php
/**
* Created by PhpStorm.
* User: linfan
* Date: 2018-12-03
* Time: 21:39
*/
if (! function_exists('upload_net_image'))
{
/**
* 保存网络图片,如果图片保存失败返回空字符串
* @param $srcs ['src1', 'src2', 'src3']
* @param $path (保存的分类目录)
* @return array ['url1', '', 'url3']
*/
function upload_net_image($srcs, $path = '')
{
$path && $path = '/' === substr($path, -1) ? $path : $path . '/';
$urls = array();
if($srcs)
{
$ci = & get_instance();
$ci->load->library('qiniu');
foreach ($srcs as $key => $val)
{
$filename = $ci->qiniu->getFileName($val);
$filename = $path . date('Y/m').'/'.$filename;
$file = $ci->qiniu->fetch($val, $filename);
if (!$file)
{
$urls[$key] = '';
continue;
}
else
{
$urls[$key] = $file['file'];
}
}
}
return $urls;
}
<?php
/**
* Created by PhpStorm.
* User: linfan
* Date: 2018-12-03
* Time: 21:39
*/
if (! function_exists('upload_net_image'))
{
/**
* 保存网络图片,如果图片保存失败返回空字符串
* @param $srcs ['src1', 'src2', 'src3']
* @param $path (保存的分类目录)
* @return array ['url1', '', 'url3']
*/
function upload_net_image($srcs, $path = '')
{
$path && $path = '/' === substr($path, -1) ? $path : $path . '/';
$urls = array();
if($srcs)
{
$ci = & get_instance();
$ci->load->library('qiniu');
foreach ($srcs as $key => $val)
{
$filename = $ci->qiniu->getFileName($val);
$filename = $path . date('Y/m').'/'.$filename;
$file = $ci->qiniu->fetch($val, $filename);
if (!$file)
{
$urls[$key] = '';
continue;
}
else
{
$urls[$key] = $file['file'];
}
}
}
return $urls;
}
}
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+23 -23
View File
@@ -1,23 +1,23 @@
<?php
$lang['err_sys_fail'] = "操作失败";
$lang['err_sys_success'] = "操作成功";
$lang['err_sys_inval_param'] = "非法参数";
$lang['err_user_not_login'] = "您还未登录";
//用户
$lang['err_user_not_login'] = "您还未登录";
$lang['err_require_username'] = "昵称不能为空";
$lang['err_username_exist'] = "昵称已存在";
$lang['err_mobile_exists'] = "手机号已存在";
$lang['err_user_login_fail'] = "帐号或密码错误";
$lang['err_account_not_exists'] = "帐号不存在";
$lang['err_require_forum_user'] = "请先完善您的个人资料";
$lang['err_password_error'] = "密码错误";
$lang['err_post_not_perm'] = '所在组别权限不足';
$lang['err_mobile_check_field'] = "手机号不正确";
$lang['err_user_require_mobile'] = "需要认证手机号";
//新的
$lang['api_code_fail'] = "操作失败";
$lang['api_code_success'] = "操作成功";
$lang['api_code_none'] = "页面不存在";
$lang['api_code_logout'] = "您还未登录";
<?php
$lang['err_sys_fail'] = "操作失败";
$lang['err_sys_success'] = "操作成功";
$lang['err_sys_inval_param'] = "非法参数";
$lang['err_user_not_login'] = "您还未登录";
//用户
$lang['err_user_not_login'] = "您还未登录";
$lang['err_require_username'] = "昵称不能为空";
$lang['err_username_exist'] = "昵称已存在";
$lang['err_mobile_exists'] = "手机号已存在";
$lang['err_user_login_fail'] = "帐号或密码错误";
$lang['err_account_not_exists'] = "帐号不存在";
$lang['err_require_forum_user'] = "请先完善您的个人资料";
$lang['err_password_error'] = "密码错误";
$lang['err_post_not_perm'] = '所在组别权限不足';
$lang['err_mobile_check_field'] = "手机号不正确";
$lang['err_user_require_mobile'] = "需要认证手机号";
//新的
$lang['api_code_fail'] = "操作失败";
$lang['api_code_success'] = "操作成功";
$lang['api_code_none'] = "页面不存在";
$lang['api_code_logout'] = "您还未登录";
+104
View File
@@ -0,0 +1,104 @@
<?php
require_once(dirname(dirname(__FILE__)).'/third_party/PHPMailer.php');
/**
* 发送邮件封装类
* Created by PhpStorm.
* User: xuxb
* Date: 2018/9/12
* Time: 11:11
*/
class Mymailer
{
private $host;//地址
private $port;//发送邮件端口号
private $username;//登录的账号
private $pwd;//登录的密码
private $debug;
private $mailer;
private $fromname;
private $config = array(
'host' => 'smtp.163.com',
'port' => '25',
'username' => '18350451617@163.com',
'pwd' => 'lin2821808',
'fromname' => '小鱼网',
);
public function __construct($params = array())
{
$params && $this->init($params);
}
/**
* 初始化
* @param array $params 未设置默认server配置mail数组第一项
* @param boolean $debug
*/
public function init($params = array(), $debug = false){
if($params){
$this->host = $params['host'];
$this->port = $params['port'];
$this->username = $params['username'];
$this->pwd = $params['pwd'];
$this->fromname = $params['fromname'];
$this->debug = $debug;
} else {
$params = $this->config;
$this->host = $params['host'];
$this->port = $params['port'];
$this->username = $params['username'];
$this->pwd = $params['pwd'];
$this->fromname = $params['fromname'];
}
$mailer = new PHPMailer();
/* Server Settings */
$mailer->IsSMTP(); // 使用 SMTP 方式发送邮件
$mailer->SMTPAuth = true; //启用SMTP认证
$mailer->Host = $this->host; //SMTP服务器 以163邮箱为例子
$mailer->Port = $this->port; //邮件发送端口,163的是25,设置ssl连接smtp服务器的远程服务器端口号465
// $mailer->SMTPSecure = 'ssl';
$mailer->SMTPDebug = $this->debug;// 是否启用smtp的debug进行调试 开发环境建议开启 生产环境注释掉即可 默认关闭debug调试模式
/* Account Settings */
$mailer->Username = $this->username;
$mailer->Password = $this->pwd;
$mailer->From = $this->username;
/* Content Setting */
$mailer->IsHTML(true); //支持html格式内容
$mailer->CharSet = 'UTF-8';
$this->mailer = $mailer;
}
/**
* 添加附件
* @param $path (文件路径
* @param string $name (指定名称
*/
public function add_attachment($path, $name=''){
$this->mailer->AddAttachment($path, $name);
}
/**
* 发送邮件
* @param $email (接收邮件地址
* @param $title (邮件标题
* @param $content (邮件内容
* @return bool
*/
public function send($email, $title, $content){
$this->mailer->FromName = $this->fromname;
$this->mailer->addAddress($email);
$this->mailer->Subject = $title;
$this->mailer->Body = $content;
return (bool)$this->mailer->send(); // 发送邮件
}
public function error(){
var_dump($this->mailer->ErrorInfo);
}
}
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+1721
View File
File diff suppressed because it is too large Load Diff
+11
View File
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+7 -7
View File
@@ -1,8 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nERROR: ",
$heading,
"\n\n",
$message,
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nERROR: ",
$heading,
"\n\n",
$message,
"\n\n";
+7 -7
View File
@@ -1,8 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nDatabase error: ",
$heading,
"\n\n",
$message,
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nDatabase error: ",
$heading,
"\n\n",
$message,
"\n\n";
+21 -21
View File
@@ -1,21 +1,21 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
An uncaught Exception was encountered
Type: <?php echo get_class($exception), "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $exception->getFile(), "\n"; ?>
Line Number: <?php echo $exception->getLine(); ?>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
Backtrace:
<?php foreach ($exception->getTrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
An uncaught Exception was encountered
Type: <?php echo get_class($exception), "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $exception->getFile(), "\n"; ?>
Line Number: <?php echo $exception->getLine(); ?>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
Backtrace:
<?php foreach ($exception->getTrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
+7 -7
View File
@@ -1,8 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nERROR: ",
$heading,
"\n\n",
$message,
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nERROR: ",
$heading,
"\n\n",
$message,
"\n\n";
+21 -21
View File
@@ -1,21 +1,21 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
A PHP Error was encountered
Severity: <?php echo $severity, "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $filepath, "\n"; ?>
Line Number: <?php echo $line; ?>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
Backtrace:
<?php foreach (debug_backtrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
A PHP Error was encountered
Severity: <?php echo $severity, "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $filepath, "\n"; ?>
Line Number: <?php echo $line; ?>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
Backtrace:
<?php foreach (debug_backtrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+63 -63
View File
@@ -1,64 +1,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>404 Page Not Found</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>404 Page Not Found</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>
+63 -63
View File
@@ -1,64 +1,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Database Error</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Database Error</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>
+31 -31
View File
@@ -1,32 +1,32 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>An uncaught Exception was encountered</h4>
<p>Type: <?php echo get_class($exception); ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $exception->getFile(); ?></p>
<p>Line Number: <?php echo $exception->getLine(); ?></p>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
<p>Backtrace:</p>
<?php foreach ($exception->getTrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
<p style="margin-left:10px">
File: <?php echo $error['file']; ?><br />
Line: <?php echo $error['line']; ?><br />
Function: <?php echo $error['function']; ?>
</p>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>An uncaught Exception was encountered</h4>
<p>Type: <?php echo get_class($exception); ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $exception->getFile(); ?></p>
<p>Line Number: <?php echo $exception->getLine(); ?></p>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
<p>Backtrace:</p>
<?php foreach ($exception->getTrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
<p style="margin-left:10px">
File: <?php echo $error['file']; ?><br />
Line: <?php echo $error['line']; ?><br />
Function: <?php echo $error['function']; ?>
</p>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</div>
+63 -63
View File
@@ -1,64 +1,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>
+32 -32
View File
@@ -1,33 +1,33 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: <?php echo $severity; ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $filepath; ?></p>
<p>Line Number: <?php echo $line; ?></p>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
<p>Backtrace:</p>
<?php foreach (debug_backtrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
<p style="margin-left:10px">
File: <?php echo $error['file'] ?><br />
Line: <?php echo $error['line'] ?><br />
Function: <?php echo $error['function'] ?>
</p>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: <?php echo $severity; ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $filepath; ?></p>
<p>Line Number: <?php echo $line; ?></p>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
<p>Backtrace:</p>
<?php foreach (debug_backtrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
<p style="margin-left:10px">
File: <?php echo $error['file'] ?><br />
Line: <?php echo $error['line'] ?><br />
Function: <?php echo $error['function'] ?>
</p>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</div>
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+11 -11
View File
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+45 -45
View File
@@ -1,45 +1,45 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<title>车平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="https://admin.haodian.cn/AmazeUI/assets/css/amazeui.css">
<link rel="stylesheet" type="text/css" href="https://admin.haodian.cn/static/css/common.css">
<link href="https://admin.haodian.cn//static/css/login/console.css" rel="stylesheet">
<link href="https://admin.haodian.cn//static/css/login/animate.css" rel="stylesheet">
<link href="https://admin.haodian.cn//static/css/login/login.css" rel="stylesheet">
<script>window.ROOT_URL = '';</script>
</head>
<body class="framework mini">
<div class="login-container">
<!-- 动态云层动画 开始 -->
<div class="clouds-container">
<div class="clouds clouds-footer"></div>
<div class="clouds"></div>
<div class="clouds clouds-fast"></div>
</div>
<!-- 动态云层动画 结束 -->
<!-- 顶部导航条 开始 -->
<div class="header notselect">
<span class="title notselect"></span>
<ul>
<li><a href="javascript:void(0);"></a></li>
<li>
<a href="javascript:void(0);">推荐使用谷歌浏览器</a>
</li>
</ul>
</div>
<!-- 顶部导航条 结束 -->
<div align="center" style="position:absolute; bottom:0;width: 100%;padding-bottom: 10px;">
<a href="https://beian.miit.gov.cn" target="_blank" style="color: black">闽ICP备12013448号-3</a>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<title>车平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="https://admin.haodian.cn/AmazeUI/assets/css/amazeui.css">
<link rel="stylesheet" type="text/css" href="https://admin.haodian.cn/static/css/common.css">
<link href="https://admin.haodian.cn//static/css/login/console.css" rel="stylesheet">
<link href="https://admin.haodian.cn//static/css/login/animate.css" rel="stylesheet">
<link href="https://admin.haodian.cn//static/css/login/login.css" rel="stylesheet">
<script>window.ROOT_URL = '';</script>
</head>
<body class="framework mini">
<div class="login-container">
<!-- 动态云层动画 开始 -->
<div class="clouds-container">
<div class="clouds clouds-footer"></div>
<div class="clouds"></div>
<div class="clouds clouds-fast"></div>
</div>
<!-- 动态云层动画 结束 -->
<!-- 顶部导航条 开始 -->
<div class="header notselect">
<span class="title notselect"></span>
<ul>
<li><a href="javascript:void(0);"></a></li>
<li>
<a href="javascript:void(0);">推荐使用谷歌浏览器</a>
</li>
</ul>
</div>
<!-- 顶部导航条 结束 -->
<div align="center" style="position:absolute; bottom:0;width: 100%;padding-bottom: 10px;">
<a href="https://beian.miit.gov.cn" target="_blank" style="color: black">闽ICP备12013448号-3</a>
</div>
</div>
</body>
</html>
+2 -1
View File
@@ -438,7 +438,8 @@ if (!function_exists('send_sms')) {
require_once COMMPATH . '/third_party/alisms/alisms.php';
$template = 'SMS_218630210';
$alisms = new AliSms();
$alisms->sendSms($mobile, array('code' => $code), $template, $sign);
$req = $alisms->sendSms($mobile, array('code' => $code), $template, $sign);
var_dump($req);exit;
return true;
}
}
@@ -0,0 +1,19 @@
<?php
/**
* Notes:用户评论表
* Created on: 2022/6/20 10:31
* Created by: dengbw
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Receiver_comments_model extends HD_Model
{
private $table_name = 'lc_receiver_comments';
public function __construct()
{
parent::__construct($this->table_name, 'default');
}
}
@@ -86,9 +86,9 @@ class Receiver_customers_model extends HD_Model
public function offlineSources($id = 0)
{
$arr[1] = ['name' => '空间站', 'list' => [1 => '汽车之家', 2 => '平安创展', 3 => '天天拍']];
$arr[2] = ['name' => '营销中心', 'list' => [4 => '抖音本地通', 5 => '抖音拦截', 6 => '抖音直播', 7 => '微信视频号', 8 => '车卖场小程序']];
$arr[3] = ['name' => '卫星门店', 'list' => [9 => '自然到店', 10 => '转介绍', 11 => '自媒体', 12 => '外展外拓', 13 => '汽车之家垂媒', 14 => '懂车帝垂媒', 15 => '易车垂媒']];
$arr[1] = ['name' => '空间站', 'list' => [20 => '汽车之家', 21 => '平安创展', 22 => '天天拍']];
$arr[2] = ['name' => '营销中心', 'list' => [30 => '抖音本地通', 31 => '抖音拦截', 32 => '抖音直播', 33 => '微信视频号', 34 => '车卖场小程序']];
$arr[3] = ['name' => '卫星门店', 'list' => [40 => '自然到店', 41 => '转介绍', 42 => '自媒体', 43 => '外展外拓', 44 => '汽车之家垂媒', 45 => '懂车帝垂媒', 46 => '易车垂媒']];
if ($id) {
return $arr[$id];
@@ -0,0 +1,51 @@
<?php
/**
* Notes:客户回访记录
* Created on: 2022/05/23 17:15
* Created by: dengbw
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Receiver_customers_visit_data_model extends HD_Model
{
private $table_name = 'lc_receiver_customer_visit_data';
public function __construct()
{
parent::__construct($this->table_name, 'default');
}
//关联客户待回访
public function count_visit($where)
{
return $this->select_visit($where, '', '', '', '', 1);
}
public function select_visit($where = array(), $order = '', $page = 0, $page_size = 20, $fileds = '', $count = 0)
{
!$fileds && $fileds = 'a.*';
$this->db->select($fileds);
$this->db->from('lc_receiver_customers as a');
$this->db->join('lc_receiver_customer_visit_data as b', 'b.c_id = a.id', 'left');
if ($where) {
$this->db->where($where);
}
if ($count) {
return $this->db->count_all_results();
}
if ($order) {
$this->db->order_by($order);
}
if ($page) {
$offset = ($page - 1) * $page_size;
$limit = $page_size;
} else {
$offset = null;
$limit = null;
}
$this->db->limit($limit, $offset);
return $this->db->get()->result_array();
}
}
@@ -0,0 +1,51 @@
<?php
/**
* Notes:客户待回访
* Created on: 2021/10/19 17:15
* Created by: dengbw
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Receiver_customers_visit_model extends HD_Model
{
private $table_name = 'lc_receiver_customer_visit';
public function __construct()
{
parent::__construct($this->table_name, 'default');
}
//关联客户待回访
public function count_visit($where)
{
return $this->select_visit($where, '', '', '', '', 1);
}
public function select_visit($where = array(), $order = '', $page = 0, $page_size = 20, $fileds = '', $count = 0)
{
!$fileds && $fileds = 'a.*';
$this->db->select($fileds);
$this->db->from('lc_receiver_customers as a');
$this->db->join('lc_receiver_customer_visit as b', 'b.c_id = a.id', 'left');
if ($where) {
$this->db->where($where);
}
if ($count) {
return $this->db->count_all_results();
}
if ($order) {
$this->db->order_by($order);
}
if ($page) {
$offset = ($page - 1) * $page_size;
$limit = $page_size;
} else {
$offset = null;
$limit = null;
}
$this->db->limit($limit, $offset);
return $this->db->get()->result_array();
}
}