人人商城

tplnotice.ctrl.php 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. $dos = array('set', 'list');
  8. $do = in_array($do, $dos) ? $do : 'list';
  9. permission_check_account_user('profile_setting');
  10. $_W['page']['title'] = '会员微信通知-会员中心';
  11. if ($do == 'set') {
  12. $tpl_list = $_GPC['tpl'];
  13. foreach ($tpl_list as &$tpl) {
  14. if (!empty($tpl['tpl'])) {
  15. $inspect_tpl = preg_match('/^[a-zA-Z0-9_-]{43}$/', $tpl['tpl']);
  16. if (empty($inspect_tpl)) {
  17. $error = $tpl['name'];
  18. break;
  19. }
  20. }
  21. unset($tpl['name'], $tpl['help']);
  22. }
  23. if (!empty($error)) {
  24. iajax(1, $error, '');
  25. } else {
  26. uni_setting_save('tplnotice', $tpl_list);
  27. iajax(0, '');
  28. }
  29. }
  30. $setting = uni_setting_load('tplnotice');
  31. $tpl_setting = $setting['tplnotice'];
  32. if(!is_array($tpl_setting)) {
  33. $tpl_setting = array();
  34. }
  35. $tpl = array(
  36. 'recharge' => array(
  37. 'tpl' => $tpl_setting['recharge']['tpl'],
  38. 'name' => '会员余额充值',
  39. 'help' => '请在“微信公众平台”选择行业为:“IT科技 - 互联网|电子商务”,添加标题为:”会员充值通知“,编号为:“TM00009”的模板。',
  40. ),
  41. 'credit2' => array(
  42. 'tpl' => $tpl_setting['credit2']['tpl'],
  43. 'name' => '会员余额消费',
  44. 'help' => '请在“微信公众平台”选择行业为:“IT科技 - 互联网|电子商务”,添加标题为:”余额变更通知“,编号为:“OPENTM207266084”的模板。',
  45. ),
  46. 'credit1' => array(
  47. 'tpl' => $tpl_setting['credit1']['tpl'],
  48. 'name' => '会员积分变更',
  49. 'help' => '请在“微信公众平台”选择行业为:“IT科技 - 互联网|电子商务”,添加标题为:”积分提醒“,编号为:“TM00335”的模板。',
  50. ),
  51. 'group' => array(
  52. 'tpl' => $tpl_setting['group']['tpl'],
  53. 'name' => '会员等级变更',
  54. 'help' => '请在“微信公众平台”选择行业为:“IT科技 - 互联网|电子商务”,添加标题为:”会员级别变更提醒“,编号为:“TM00891”的模板',
  55. ),
  56. 'nums_plus' => array(
  57. 'tpl' => $tpl_setting['nums_plus']['tpl'],
  58. 'name' => '会员卡计次充值',
  59. 'help' => '请在“微信公众平台”选择行业为:“IT科技 - 互联网|电子商务”,添加标题为:”计次充值通知“,编号为:“OPENTM207207134”的模板 ',
  60. ),
  61. 'nums_times' => array(
  62. 'tpl' => $tpl_setting['nums_times']['tpl'],
  63. 'name' => '会员卡计次消费',
  64. 'help' => '请在“微信公众平台”选择行业为:“IT科技 - 互联网|电子商务”,添加标题为:”计次消费通知“,编号为:“OPENTM202322532”的模板',
  65. ),
  66. 'times_plus' => array(
  67. 'tpl' => $tpl_setting['times_plus']['tpl'],
  68. 'name' => '会员卡计时充值',
  69. 'help' => '请在“微信公众平台”选择行业为:“IT科技 - 互联网|电子商务”,添加标题为:”自动续费成功通知“,编号为:“TM00956”的模板',
  70. ),
  71. 'times_times' => array(
  72. 'tpl' => $tpl_setting['times_times']['tpl'],
  73. 'name' => '会员卡计时即将到期',
  74. 'help' => '请在“微信公众平台”选择行业为:“IT科技 - 互联网|电子商务”,添加标题为:”会员到期提醒“,编号为:“TM00008”的模板',
  75. ),
  76. 'pay_success' => array(
  77. 'tpl' => $tpl_setting['pay_success']['tpl'],
  78. 'name' => '订单支付成功通知',
  79. 'help' => '请在“微信公众平台”选择行业为:“IT科技 - 互联网|电子商务”,添加标题为:”订单支付成功通知“,编号为:“OPENTM207498902”的模板。',
  80. ),
  81. );
  82. template('profile/tplnotice');