人人商城

reply-setting.ctrl.php 784B

123456789101112131415161718192021222324252627
  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('display', 'post');
  8. $do = in_array($do, $dos) ? $do : 'display';
  9. $_W['page']['title'] = '回复设置';
  10. if ($do == 'display') {
  11. $times = empty($_W['account']['setting']) ? 0 : intval($_W['account']['setting']['reply_setting']);
  12. template('profile/reply-setting');
  13. }
  14. if ($do == 'post') {
  15. if (checksubmit()) {
  16. $new_times = intval($_GPC['times']);
  17. if ($new_times > 50 || $new_times < 0) {
  18. itoast('次数超过限制,请重新设置!');
  19. }
  20. uni_setting_save('reply_setting', $new_times);
  21. itoast('保存成功!', referer(), 'success');
  22. }
  23. }