Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

global.php 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. <?php
  2. /**
  3. * 易优CMS
  4. * ============================================================================
  5. * 版权所有 2016-2028 海口快推科技有限公司,并保留所有权利。
  6. * 网站地址: http://www.eyoucms.com
  7. * ----------------------------------------------------------------------------
  8. * 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
  9. * ============================================================================
  10. * Author: 小虎哥 <1105415366@qq.com>
  11. * Date: 2018-4-3
  12. */
  13. $cacheKey = "extra_global_channeltype";
  14. $channeltype_row = \think\Cache::get($cacheKey);
  15. if (empty($channeltype_row)) {
  16. $channeltype_row = \think\Db::name('channeltype')->field('id,nid,ctl_name,title,ntitle,ifsystem,table,status')
  17. ->order('id asc')
  18. ->getAllWithIndex('id');
  19. \think\Cache::set($cacheKey, $channeltype_row, EYOUCMS_CACHE_TIME, "channeltype");
  20. }
  21. $channeltype_list = []; // 模型标识
  22. $allow_release_channel = []; // 发布文档的模型ID
  23. foreach ($channeltype_row as $key => $val) {
  24. $channeltype_list[$val['nid']] = $val['id'];
  25. if (!in_array($val['nid'], ['guestbook','single','ask'])) {
  26. array_push($allow_release_channel, $val['id']);
  27. }
  28. }
  29. // URL全局参数(比如:可视化uiset、多模板v、多语言lang)
  30. $parse_url_param = [];
  31. if (file_exists(ROOT_PATH.'template/pc/uiset.txt') || file_exists(ROOT_PATH.'template/mobile/uiset.txt')) {
  32. $parse_url_param[] = 'uiset';
  33. $parse_url_param[] = 'v';
  34. } else {
  35. $uisetArr = @glob('template/*/*/uiset.txt');
  36. if (!empty($uisetArr)) {
  37. $parse_url_param[] = 'uiset';
  38. $parse_url_param[] = 'v';
  39. }
  40. }
  41. $lang_switch_on = \think\Config::get('lang_switch_on');
  42. $lang_switch_on == true && $parse_url_param[] = 'lang';
  43. $parse_url_param[] = 'goto';
  44. $parse_url_param[] = 'site';
  45. return array(
  46. // 小虎哥
  47. 'upgrade_dev' => 0,
  48. // 特定场景专用
  49. 'opencodetype' => 0,
  50. // 模板引擎禁用函数
  51. 'tpl_deny_func_list' => 'phpinfo,eval,exit,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,file_put_contents,fsockopen,fopen,fwrite',
  52. // CMS根目录文件夹
  53. 'wwwroot_dir' => ['application','core','data','extend','install','public','template','uploads','vendor','weapp'],
  54. // 禁用栏目的目录名称
  55. 'disable_dirname' => ['application','core','data','extend','install','public','plugins','uploads','template','vendor','weapp','tags','search','user','users','member','reg','centre','login','cart'],
  56. // 发送邮箱默认有效时间,会员中心,邮箱验证时用到
  57. 'email_default_time_out' => 3600,
  58. // 邮箱发送倒计时 2分钟
  59. 'email_send_time' => 120,
  60. // 发送短信默认有效时间
  61. 'mobile_default_time_out' => 1800,
  62. // 手机发送倒计时 2分钟
  63. 'mobile_send_time' => 120,
  64. // 充值订单默认有效时间,会员中心用到,2小时
  65. 'get_order_validity' => 7200,
  66. // 支付订单默认有效时间,商城中心用到,2小时
  67. 'get_shop_order_validity' => 7200,
  68. // 文档SEO描述截取长度,一个汉字等于两个字符,其余的等于一个字符
  69. 'arc_seo_description_length' => 80,
  70. // 栏目最多级别
  71. 'arctype_max_level' => 10,
  72. // 模型标识
  73. 'channeltype_list' => $channeltype_list,
  74. // 发布文档的模型ID
  75. 'allow_release_channel' => $allow_release_channel,
  76. // 广告类型
  77. 'ad_media_type' => array(
  78. 1 => '图片',
  79. // 2 => 'flash',
  80. // 3 => '文字',
  81. ),
  82. // 仅用于产品参数
  83. 'attr_input_type_arr' => array(
  84. 0 => '单行文本',
  85. 2 => '多行文本',
  86. 1 => '下拉框',
  87. ),
  88. // 仅用于留言属性
  89. 'guestbook_attr_input_type' => array(
  90. 0 => '单行文本',
  91. 2 => '多行文本',
  92. 1 => '下拉框',
  93. 3 => '单选框',
  94. 4 => '多选框',
  95. 5 => '单张图',
  96. 6 => '手机号码',
  97. 7 => 'Email邮箱',
  98. 8 => '附件类型',
  99. 9 => '区域联动',
  100. 10 => '时间类型',
  101. 11 => '多张图',
  102. ),
  103. //留言属性正则规则管理(仅用于留言属性)
  104. 'validate_type_list' => [
  105. 6 => [
  106. 'name' => '手机号码',
  107. 'value' => '/^1\d{10}$/'
  108. ],
  109. 7 => [
  110. 'name' => 'Email邮箱',
  111. 'value' => '/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/'
  112. ],
  113. ],
  114. //表单类型列表
  115. "form_field_type_list" => [
  116. 'text' => '单行文本',
  117. 'radio' => '单选项',
  118. 'select' => '下拉框',
  119. 'checkbox' => '多选项',
  120. 'multitext' => '多行文本',
  121. 'datetime' => '日期时间',
  122. 'img' => '单张图',
  123. 'mobile' => '手机号码',
  124. 'email' => 'Email邮箱',
  125. 'file' => '附件类型',
  126. 'region' => '区域联动',
  127. ],
  128. //表单属性正则
  129. 'form_field_grep_list' => [
  130. 'mobile' => [
  131. 'name' => '手机号码',
  132. 'value' => '/^1\d{10}$/'
  133. ],
  134. 'email' => [
  135. 'name' => 'Email邮箱',
  136. 'value' => '/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/'
  137. ],
  138. ],
  139. // 栏目自定义字段的channel_id值
  140. 'arctype_channel_id' => -99,
  141. // 栏目表内置字段
  142. 'arctype_table_fields' => array('id','channeltype','current_channel','parent_id','topid','typename','dirname','dirpath','diy_dirpath','rulelist','ruleview','englist_name','grade','typelink','litpic','templist','tempview','seo_title','seo_keywords','seo_description','sort_order','is_hidden','is_part','admin_id','is_del','del_method','status','is_release','weapp_code','lang','add_time','update_time','target','nofollow','typearcrank','empty_logic','page_limit'),
  143. // 网络图片扩展名
  144. 'image_ext' => 'jpg,jpeg,gif,bmp,ico,png,webp,svg',
  145. // 网络多媒体扩展名
  146. 'media_ext' => 'ra,ram,vqf,wma,mp3,mid,cd,wave,aiff,au,mpeg-4,midi,vqf,amr,wav,mp4,swf,mov,rm,dat,mpeg,mpg,avi,wmv,rmvb,mp4,asf,3gp,mkv,flv,f4v,webm,ogg,ogv,m4a,m3u8',
  147. // 后台语言Cookie变量
  148. 'admin_lang' => 'admin_lang',
  149. // 前台语言Cookie变量
  150. 'home_lang' => 'home_lang',
  151. // 多城市最多级别
  152. 'citysite_max_level' => 3,
  153. // URL全局参数(比如:可视化uiset、多模板v、多语言lang)
  154. 'parse_url_param' => $parse_url_param,
  155. // 会员金额明细类型
  156. 'pay_cause_type_arr' => array(
  157. 0 => '升级消费',
  158. 1 => '账户充值',
  159. 2 => '订单退款',
  160. 3 => '订单支付',
  161. 4 => '后台操作', // 添加
  162. 5 => '后台操作', // 减少
  163. 6 => '问答悬赏',
  164. 7 => '问答获得悬赏',
  165. 8 => '分销商提现',
  166. 9 => '抽奖',
  167. // 10 => '后续添加',
  168. ),
  169. // 充值状态
  170. 'pay_status_arr' => array(
  171. // 0 => '失败',
  172. 1 => '未付款',
  173. 2 => '已完成',
  174. 3 => '已充值',
  175. 4 => '订单取消',
  176. // 5 => '后续添加',
  177. ),
  178. // 支付方式
  179. 'pay_method_arr' => array(
  180. 'wechat' => '微信支付',
  181. 'alipay' => '支付宝支付',
  182. 'artificial' => '手工充值',
  183. 'balance' => '余额支付',
  184. 'admin_pay' => '后台支付',
  185. 'delivery_pay' => '货到付款',
  186. 'Paypal' => 'paypal支付',
  187. 'UnionPay' => '银联支付',
  188. 'noNeedPay' => '无需支付',
  189. 'tikTokPay' => '抖音支付',
  190. 'Hupijiaopay' => '虎皮椒支付',
  191. ),
  192. // 缩略图默认宽高度
  193. 'thumb' => [
  194. 'open' => 0,
  195. 'mode' => 2,
  196. 'color' => '#FFFFFF',
  197. 'width' => 300,
  198. 'height' => 300,
  199. ],
  200. // 订单状态
  201. 'order_status_arr' => array(
  202. -1 => '已关闭',
  203. 0 => '待付款',
  204. 1 => '待发货',
  205. 2 => '待收货',
  206. 3 => '已完成',
  207. 4 => '订单过期',
  208. // 5 => '后续添加',
  209. ),
  210. // 订单状态,后台使用
  211. 'admin_order_status_arr' => array(
  212. -1 => '订单关闭',
  213. 0 => '未付款',
  214. 1 => '待发货',
  215. 2 => '已发货',
  216. 3 => '已完成',
  217. 4 => '订单过期',
  218. ),
  219. // 特殊地区(中国四个省直辖市),目前在自定义字段控制器中使用
  220. 'field_region_type' => ['1','338','10543','31929'],
  221. // 选择指定区域ID处理其他操作,目前在自定义字段控制器中使用
  222. 'field_region_all_type' => ['-1','0','1','338','10543','31929'],
  223. // URL中筛选标识变量
  224. 'url_screen_var' => 'ZXljbXM',
  225. //百度地图ak值
  226. 'baidu_map_ak' => 'RVRMWGdDeElvVml4Z2dIY0FrNm1LcE1k',
  227. // 提示
  228. 'authori_tips' => '5LuF6ZmQ5LqO5LiT5Lia54mI5ZWG5Lia5o6I5p2D5L2/55So77yB',
  229. // 会员投稿发布的文章状态,前台使用
  230. 'home_article_arcrank' => array(
  231. -1 => '未审核',
  232. 0 => '审核通过',
  233. ),
  234. // 二次安全验证的问题列表
  235. 'security_askanswer_list' => [
  236. '您常用的手机号码是?',
  237. '您常用的电子邮箱是?',
  238. '您真实的姓名是?',
  239. '您初中学校名是?',
  240. '您的出生地名是?',
  241. '您配偶的姓名是?',
  242. '您的身份证号后八位是?',
  243. '您高中班主任的名字是?',
  244. '您初中班主任的名字是?',
  245. '您最喜欢的明星名字是?',
  246. '对您影响最大的人名字是?',
  247. ],
  248. // 会员期限,后台使用
  249. 'admin_member_limit_arr' => array(
  250. 1 => array(
  251. 'limit_id' => 1,
  252. 'limit_name' => '一周',
  253. 'maturity_days' => 7,
  254. ),
  255. 2 => array(
  256. 'limit_id' => 2,
  257. 'limit_name' => '一个月',
  258. 'maturity_days' => 30,
  259. ),
  260. 3 => array(
  261. 'limit_id' => 3,
  262. 'limit_name' => '三个月',
  263. 'maturity_days' => 90,
  264. ),
  265. 4 => array(
  266. 'limit_id' => 4,
  267. 'limit_name' => '半年',
  268. 'maturity_days' => 183,
  269. ),
  270. 5 => array(
  271. 'limit_id' => 5,
  272. 'limit_name' => '一年',
  273. 'maturity_days' => 366,
  274. ),
  275. 6 => array(
  276. 'limit_id' => 6,
  277. 'limit_name' => '终身',
  278. 'maturity_days' => 36600,
  279. ),
  280. ),
  281. // 清理文件时,需要查询的数据表和字段
  282. 'get_tablearray' => array(
  283. 0 => array(
  284. 'table' => 'ad',
  285. 'field' => 'litpic',
  286. ),
  287. 1 => array(
  288. 'table' => 'archives',
  289. 'field' => 'litpic',
  290. ),
  291. 2 => array(
  292. 'table' => 'arctype',
  293. 'field' => 'litpic',
  294. ),
  295. 3 => array(
  296. 'table' => 'images_upload',
  297. 'field' => 'image_url',
  298. ),
  299. 4 => array(
  300. 'table' => 'links',
  301. 'field' => 'logo',
  302. ),
  303. 5 => array(
  304. 'table' => 'product_img',
  305. 'field' => 'image_url',
  306. ),
  307. 6 => array(
  308. 'table' => 'ad',
  309. 'field' => 'intro',
  310. ),
  311. 7 => array(
  312. 'table' => 'article_content',
  313. 'field' => 'content',
  314. ),
  315. 8 => array(
  316. 'table' => 'download_content',
  317. 'field' => 'content',
  318. ),
  319. 9 => array(
  320. 'table' => 'images_content',
  321. 'field' => 'content',
  322. ),
  323. 10 => array(
  324. 'table' => 'product_content',
  325. 'field' => 'content',
  326. ),
  327. 11 => array(
  328. 'table' => 'single_content',
  329. 'field' => 'content',
  330. ),
  331. 12 => array(
  332. 'table' => 'config',
  333. 'field' => 'value',
  334. ),
  335. 13 => array(
  336. 'table' => 'ui_config',
  337. 'field' => 'value',
  338. ),
  339. 14 => array(
  340. 'table' => 'download_file',
  341. 'field' => 'file_url',
  342. ),
  343. 15 => array(
  344. 'table' => 'users',
  345. 'field' => 'head_pic',
  346. ),
  347. 16 => array(
  348. 'table' => 'shop_order_details',
  349. 'field' => 'litpic',
  350. ),
  351. 17 => array(
  352. 'table' => 'admin',
  353. 'field' => 'head_pic',
  354. ),
  355. 18 => array(
  356. 'table' => 'media_file',
  357. 'field' => 'file_url',
  358. ),
  359. // 后续可持续添加数据表和字段,格式参照以上
  360. ),
  361. // 足迹记录条数限制 20
  362. 'user_footprint_limit' => 20,
  363. // 手机端会员中心底部菜单配置选项
  364. 'mobile_user_bottom_menu_config' => array(
  365. 1 => array(
  366. 'id' => 1,
  367. 'title' => '首页',
  368. 'mca' => 'home/Index/index',
  369. 'icon' => 'shouye',
  370. ),
  371. 2 => array(
  372. 'id' => 2,
  373. 'title' => '消息',
  374. 'mca' => 'user/UsersNotice/index',
  375. 'icon' => 'xinxi',
  376. ),
  377. 3 => array(
  378. 'id' => 3,
  379. 'title' => '会员升级',
  380. 'mca' => 'user/Level/level_centre',
  381. 'icon' => 'huiyuanshengji',
  382. ),
  383. 4 => array(
  384. 'id' => 4,
  385. 'title' => '账户充值',
  386. 'mca' => 'user/Pay/pay_account_recharge',
  387. 'icon' => 'yue',
  388. ),
  389. 5 => array(
  390. 'id' => 5,
  391. 'title' => '订单',
  392. 'mca' => 'user/Shop/shop_centre',
  393. 'icon' => 'dingdan',
  394. ),
  395. 6 => array(
  396. 'id' => 6,
  397. 'title' => '购物车',
  398. 'mca' => 'user/Shop/shop_cart_list',
  399. 'icon' => 'shopping-cart-full',
  400. ),
  401. 7 => array(
  402. 'id' => 7,
  403. 'title' => '发布',
  404. 'mca' => 'user/UsersRelease/article_add',
  405. 'icon' => 'fabu',
  406. ),
  407. 8 => array(
  408. 'id' => 8,
  409. 'title' => '下载',
  410. 'mca' => 'user/Download/index',
  411. 'icon' => 'xiazai',
  412. ),
  413. 9 => array(
  414. 'id' => 9,
  415. 'title' => '收藏',
  416. 'mca' => 'user/Users/collection_index',
  417. 'icon' => 'shoucang',
  418. ),
  419. 10 => array(
  420. 'id' => 10,
  421. 'title' => '我的',
  422. 'mca' => 'user/Users/centre',
  423. 'icon' => 'geren',
  424. ),
  425. ),
  426. // 订单退换货服务状态 -- 陈风任
  427. 'order_service_status' => array(
  428. 1 => '审核中',
  429. 2 => '审核通过',
  430. 3 => '审核不通过',
  431. 4 => '会员已发货',
  432. 5 => '商家已收货',
  433. 6 => '换货完成',
  434. 7 => '退款完成',
  435. 8 => '已关闭'
  436. ),
  437. // 订单退换货服务类型 -- 陈风任
  438. 'order_service_type' => array(
  439. 1 => '换货',
  440. 2 => '退货',
  441. 3 => '维修'
  442. ),
  443. // 商品评价评分 -- 陈风任
  444. 'order_total_score' => array(
  445. 1 => '差评',
  446. 2 => '差评',
  447. 3 => '中评',
  448. 4 => '好评',
  449. 5 => '好评'
  450. ),
  451. // 用户限制模式
  452. 'users_lock_model' => [
  453. 0 => [
  454. 'name' => '正常用户',
  455. 'msg' => '正常用户',
  456. ],
  457. -1 => [
  458. 'name' => '禁止发言',
  459. 'msg' => '禁止操作,你已被禁止发言!',
  460. ],
  461. -99 => [
  462. 'name' => '永久黑名单',
  463. 'msg' => '禁止操作,你已被加入黑名单!',
  464. ],
  465. ],
  466. );