人人商城

const.inc.php 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <?php
  2. defined('IN_IA') or exit('Access Denied');
  3. define('REGULAR_EMAIL', '/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i');
  4. define('REGULAR_MOBILE', '/^\d{6,15}$/');
  5. define('REGULAR_USERNAME', '/^[\x{4e00}-\x{9fa5}a-z\d_\.]{3,30}$/iu');
  6. define('TEMPLATE_DISPLAY', 0);
  7. define('TEMPLATE_FETCH', 1);
  8. define('TEMPLATE_INCLUDEPATH', 2);
  9. define('ACCOUNT_SUBSCRIPTION', 1);
  10. define('ACCOUNT_SUBSCRIPTION_VERIFY', 3);
  11. define('ACCOUNT_SERVICE', 2);
  12. define('ACCOUNT_SERVICE_VERIFY', 4);
  13. define('ACCOUNT_TYPE_OFFCIAL_NORMAL', 1);
  14. define('ACCOUNT_TYPE_OFFCIAL_AUTH', 3);
  15. define('ACCOUNT_TYPE_APP_NORMAL', 4);
  16. define('ACCOUNT_TYPE_WEBAPP_NORMAL', 5);
  17. define('ACCOUNT_TYPE_PHONEAPP_NORMAL', 6);
  18. define('ACCOUNT_TYPE_APP_AUTH', 7);
  19. define('ACCOUNT_TYPE_WXAPP_WORK', 8);
  20. define('ACCOUNT_TYPE_XZAPP_NORMAL', 9);
  21. define('ACCOUNT_TYPE_XZAPP_AUTH', 10);
  22. define('ACCOUNT_TYPE_ALIAPP_NORMAL', 11);
  23. define('ACCOUNT_TYPE_SIGN', 'account');
  24. define('WXAPP_TYPE_SIGN', 'wxapp');
  25. define('WEBAPP_TYPE_SIGN', 'webapp');
  26. define('PHONEAPP_TYPE_SIGN', 'phoneapp');
  27. define('WELCOMESYSTEM_TYPE_SIGN', 'welcome');
  28. define('XZAPP_TYPE_SIGN', 'xzapp');
  29. define('ALIAPP_TYPE_SIGN', 'aliapp');
  30. define('ACCOUNT_OAUTH_LOGIN', 3);
  31. define('ACCOUNT_NORMAL_LOGIN', 1);
  32. define('WEIXIN_ROOT', 'https://mp.weixin.qq.com');
  33. define('ACCOUNT_OPERATE_ONLINE', 1);
  34. define('ACCOUNT_OPERATE_MANAGER', 2);
  35. define('ACCOUNT_OPERATE_CLERK', 3);
  36. define('ACCOUNT_MANAGE_NAME_CLERK', 'clerk');
  37. define('ACCOUNT_MANAGE_TYPE_OPERATOR', 1);
  38. define('ACCOUNT_MANAGE_NAME_OPERATOR', 'operator');
  39. define('ACCOUNT_MANAGE_TYPE_MANAGER', 2);
  40. define('ACCOUNT_MANAGE_NAME_MANAGER', 'manager');
  41. define('ACCOUNT_MANAGE_TYPE_OWNER', 3);
  42. define('ACCOUNT_MANAGE_NAME_OWNER', 'owner');
  43. define('ACCOUNT_MANAGE_NAME_FOUNDER', 'founder');
  44. define('ACCOUNT_MANAGE_GROUP_FOUNDER', 1);
  45. define('ACCOUNT_MANAGE_TYPE_VICE_FOUNDER', 4);
  46. define('ACCOUNT_MANAGE_NAME_VICE_FOUNDER', 'vice_founder');
  47. define('ACCOUNT_MANAGE_GROUP_VICE_FOUNDER', 2);
  48. define('ACCOUNT_MANAGE_GROUP_GENERAL', 0);
  49. define('ACCOUNT_MANAGE_NAME_UNBIND_USER', 'unbind_user');
  50. define('ACCOUNT_NO_OWNER_UID', 0);
  51. define('ACCOUNT_MANAGE_NAME_EXPIRED', 'expired');
  52. define('SYSTEM_COUPON', 1);
  53. define('WECHAT_COUPON', 2);
  54. define('COUPON_TYPE_DISCOUNT', '1');define('COUPON_TYPE_CASH', '2');define('COUPON_TYPE_GROUPON', '3');define('COUPON_TYPE_GIFT', '4');define('COUPON_TYPE_GENERAL', '5');define('COUPON_TYPE_MEMBER', '6');define('COUPON_TYPE_SCENIC', '7');define('COUPON_TYPE_MOVIE', '8');define('COUPON_TYPE_BOARDINGPASS', '9');define('COUPON_TYPE_MEETING', '10');define('COUPON_TYPE_BUS', '11');
  55. define('ATTACH_FTP', 1);define('ATTACH_OSS', 2);define('ATTACH_QINIU', 3);define('ATTACH_COS', 4);
  56. define('ATTACH_TYPE_IMAGE', 1);
  57. define('ATTACH_TYPE_VOICE', 2);
  58. define('ATTACH_TYPE_VEDIO', 3);
  59. define('ATTACH_TYPE_NEWS', 4);
  60. define('ATTACHMENT_IMAGE', 'image');
  61. define('ATTACH_SAVE_TYPE_FIXED', 1);
  62. define('ATTACH_SAVE_TYPE_TEMP', 2);
  63. define('STATUS_OFF', 0); define('STATUS_ON', 1); define('STATUS_SUCCESS', 0);
  64. define('CACHE_EXPIRE_SHORT', 60);
  65. define('CACHE_EXPIRE_MIDDLE', 300);
  66. define('CACHE_EXPIRE_LONG', 3600);
  67. define('CACHE_KEY_LENGTH', 100);
  68. define('MODULE_SUPPORT_WXAPP', 2);
  69. define('MODULE_NONSUPPORT_WXAPP', 1);
  70. define('MODULE_SUPPORT_ACCOUNT', 2);
  71. define('MODULE_NONSUPPORT_ACCOUNT', 1);
  72. define('MODULE_NOSUPPORT_WEBAPP', 1);
  73. define('MODULE_SUPPORT_WEBAPP', 2);
  74. define('MODULE_NOSUPPORT_PHONEAPP', 1);
  75. define('MODULE_SUPPORT_PHONEAPP', 2);
  76. define('MODULE_SUPPORT_SYSTEMWELCOME', 2);
  77. define('MODULE_NONSUPPORT_SYSTEMWELCOME', 1);
  78. define('MODULE_NOSUPPORT_ANDROID', 1);
  79. define('MODULE_SUPPORT_ANDROID', 2);
  80. define('MODULE_NOSUPPORT_IOS', 1);
  81. define('MODULE_SUPPORT_IOS', 2);
  82. define('MODULE_SUPPORT_XZAPP', 2);
  83. define('MODULE_NOSUPPORT_XZAPP', 1);
  84. define('MODULE_SUPPORT_ALIAPP', 2);
  85. define('MODULE_NOSUPPORT_ALIAPP', 1);
  86. define('MODULE_SUPPORT_WXAPP_NAME', 'wxapp_support');
  87. define('MODULE_SUPPORT_ACCOUNT_NAME', 'account_support');
  88. define('MODULE_SUPPORT_WEBAPP_NAME', 'webapp_support');
  89. define('MODULE_SUPPORT_PHONEAPP_NAME', 'phoneapp_support');
  90. define('MODULE_SUPPORT_SYSTEMWELCOME_NAME', 'welcome_support');
  91. define('MODULE_SUPPORT_XZAPP_NAME', 'xzapp_support');
  92. define('MODULE_SUPPORT_ALIAPP_NAME', 'aliapp_support');
  93. define('MODULE_LOCAL_INSTALL', '1');
  94. define('MODULE_LOCAL_UNINSTALL', '2');
  95. define('MODULE_CLOUD_INSTALL', '3');
  96. define('MODULE_CLOUD_UNINSTALL', '4');
  97. define('MODULE_RECYCLE_INSTALL_DISABLED', '1');
  98. define('MODULE_RECYCLE_UNINSTALL_IGNORE', '2');
  99. define('PERMISSION_ACCOUNT', 'system');
  100. define('PERMISSION_WXAPP', 'wxapp');
  101. define('PERMISSION_SYSTEM', 'site');
  102. define('PAYMENT_WECHAT_TYPE_NORMAL', 1);
  103. define('PAYMENT_WECHAT_TYPE_BORROW', 2);
  104. define('PAYMENT_WECHAT_TYPE_SERVICE', 3);
  105. define('PAYMENT_WECHAT_TYPE_CLOSE', 4);
  106. define('FANS_CHATS_FROM_SYSTEM', 1);
  107. define('WXAPP_STATISTICS_DAILYVISITTREND', 2);
  108. define('WXAPP_DIY', 1);
  109. define('WXAPP_TEMPLATE', 2);
  110. define('WXAPP_MODULE', 3);
  111. define('WXAPP_CREATE_MODULE', 1);
  112. define('WXAPP_CREATE_MUTI_MODULE', 2);
  113. define('WXAPP_CREATE_DEFAULT', 0);
  114. define('MATERIAL_LOCAL', 'local');define('MATERIAL_WEXIN', 'perm');
  115. define('MENU_CURRENTSELF', 1);
  116. define('MENU_HISTORY', 2);
  117. define('MENU_CONDITIONAL', 3);
  118. define('USER_STATUS_CHECK', 1);
  119. define('USER_STATUS_NORMAL', 2);
  120. define('USER_STATUS_BAN', 3);
  121. define('USER_TYPE_COMMON', 1);
  122. define('USER_TYPE_CLERK', 3);
  123. define('PERSONAL_BASE_TYPE', 1);
  124. define('PERSONAL_AUTH_TYPE', 2);
  125. define('PERSONAL_LIST_TYPE', 3);
  126. define('STORE_TYPE_MODULE', 1);
  127. define('STORE_TYPE_ACCOUNT', 2);
  128. define('STORE_TYPE_WXAPP', 3);
  129. define('STORE_TYPE_WXAPP_MODULE', 4);
  130. define('STORE_TYPE_PACKAGE', 5);
  131. define('STORE_TYPE_API', 6);
  132. define('STORE_TYPE_ACCOUNT_RENEW', 7);
  133. define('STORE_TYPE_WXAPP_RENEW', 8);
  134. define('STORE_TYPE_USER_PACKAGE', 9);
  135. define('STORE_ORDER_PLACE', 1);
  136. define('STORE_ORDER_DELETE', 2);
  137. define('STORE_ORDER_FINISH', 3);
  138. define('STORE_ORDER_DEACTIVATE', 4);
  139. define('STORE_GOODS_STATUS_OFFlINE', 0);
  140. define('STORE_GOODS_STATUS_ONLINE', 1);
  141. define('STORE_GOODS_STATUS_DELETE', 2);
  142. define('ARTICLE_PCATE', 0);
  143. define('ARTICLE_CCATE', 0);
  144. define('USER_REGISTER_TYPE_QQ', 1);
  145. define('USER_REGISTER_TYPE_WECHAT', 2);
  146. define('USER_REGISTER_TYPE_MOBILE', 3);
  147. define('MESSAGE_ORDER_TYPE', 1);
  148. define('MESSAGE_ORDER_PAY_TYPE', 9);
  149. define('MESSAGE_ACCOUNT_EXPIRE_TYPE', 2);
  150. define('MESSAGE_WECHAT_EXPIRE_TYPE', 5);
  151. define('MESSAGE_WEBAPP_EXPIRE_TYPE', 6);
  152. define('MESSAGE_WORKORDER_TYPE', 3);
  153. define('MESSAGE_REGISTER_TYPE', 4);
  154. define('MESSAGE_USER_EXPIRE_TYPE', 7);
  155. define('MESSAGE_WXAPP_MODULE_UPGRADE', 8);
  156. define('MESSAGE_SYSTEM_UPGRADE', 10);
  157. define('MESSAGE_OFFICIAL_DYNAMICS', 11);
  158. define('MESSAGE_ENABLE', 1);
  159. define('MESSAGE_DISABLE', 2);
  160. define('MESSAGE_NOREAD', 1);
  161. define('MESSAGE_READ', 2);
  162. define('FILE_NO_UNIACID', -1);
  163. define('OAUTH_TYPE_BASE', 1);
  164. define('OAUTH_TYPE_USERINFO', 2);
  165. define('ARTICLE_COMMENT_DEFAULT', 0);
  166. define('ARTICLE_NOCOMMENT', 1);
  167. define('ARTICLE_COMMENT', 2);
  168. define('ARTICLE_COMMENT_NOREAD', 1);
  169. define('ARTICLE_COMMENT_READ', 2);
  170. define('COMMENT_STATUS_OFF', 0);
  171. define('COMMENT_STATUS_ON', 1);
  172. define('WELCOME_DISPLAY_TYPE', 9);
  173. define('LASTVISIT_DISPLAY_TYPE', 1);
  174. define('ACCOUNT_DISPLAY_TYPE', 2);
  175. define('WXAPP_DISPLAY_TYPE', 3);
  176. define('WEBAPP_DISPLAY_TYPE', 4);
  177. define('PHONEAPP_DISPLAY_TYPE', 5);
  178. define('PLATFORM_DISPLAY_TYPE', 6);
  179. define('MODULE_DISPLAY_TYPE', 7);
  180. define('PASSWORD_STRONG_STATE', '至少8-16个字符,至少1个大写字母,1个小写字母和1个数字,其他可以是任意字符');
  181. define('PASSWORD_STRONG_REGULAR', '/(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,30}/');