group_attentiongroup.php 1.0 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: group_attentiongroup.php 25889 2011-11-24 09:52:20Z monkey $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. $_GET['handlekey'] = 'attentiongroup';
  12. require_once libfile('function/group');
  13. $usergroups = update_usergroups($_G['uid']);
  14. $attentiongroup = !empty($_G['member']['attentiongroup']) ? explode(',', $_G['member']['attentiongroup']) : array();
  15. $counttype = count($attentiongroup);
  16. if(submitcheck('attentionsubmit')) {
  17. if(is_array($_GET['attentiongroupid'])) {
  18. $_GET['attentiontypeid'] = array_slice($_GET['attentiontypeid'], 0, 5);
  19. C::t('common_member_field_forum')->update($_G['uid'], array('attentiongroup' => implode(',', $_GET['attentiongroupid'])));
  20. } else {
  21. C::t('common_member_field_forum')->update($_G['uid'], array('attentiongroup' => ''));
  22. }
  23. showmessage('setup_finished', 'group.php?mod=my&view=groupthread');
  24. }
  25. include template('group/group_attentiongroup');
  26. ?>