usersetting.ctrl.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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('login', 'binding');
  8. $do = in_array($do, $dos) ? $do : 'login';
  9. $settings = $_W['setting']['copyright'];
  10. if(empty($settings) || !is_array($settings)) {
  11. $settings = array();
  12. } else {
  13. $settings['slides'] = iunserializer($settings['slides']);
  14. }
  15. if ($do == 'login') {
  16. $_W['page']['title'] = '用户登录/注册设置 - 登录设置';
  17. if (checksubmit('submit')) {
  18. $settings['verifycode'] = intval($_GPC['verifycode']);
  19. $settings['welcome_link'] = intval($_GPC['welcome_link']);
  20. setting_save($settings, 'copyright');
  21. itoast('更新设置成功!', '', 'success');
  22. }
  23. }
  24. if ($do == 'binding') {
  25. $_W['page']['title'] = '用户登录/注册设置 - 绑定设置';
  26. if (checksubmit('submit')) {
  27. $settings['bind'] = safe_gpc_string($_GPC['bind']);
  28. $settings['oauth_bind'] = intval($_GPC['oauth_bind']);
  29. setting_save($settings, 'copyright');
  30. itoast('更新设置成功!', '', 'success');
  31. }
  32. }
  33. template('system/user-setting');