topicadmin_stamplist.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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: topicadmin_stamplist.php 30872 2012-06-27 10:11:44Z liulanbo $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. if(!$_G['group']['allowstamplist']) {
  12. showmessage('no_privilege_stamplist');
  13. }
  14. loadcache('stamps');
  15. if(!submitcheck('modsubmit')) {
  16. include template('forum/topicadmin_action');
  17. } else {
  18. $_GET['stamplist'] = $_GET['stamplist'] !== '' ? $_GET['stamplist'] : -1;
  19. $modaction = $_GET['stamplist'] >= 0 ? 'L'.sprintf('%02d', $_GET['stamplist']) : 'SLD';
  20. $reason = checkreasonpm();
  21. C::t('forum_thread')->update($_G['tid'], array('moderated'=>1, 'icon'=>$_GET['stamplist']));
  22. $resultarray = array(
  23. 'redirect' => "forum.php?mod=viewthread&tid=$_G[tid]&page=$page",
  24. 'reasonpm' => ($sendreasonpm ? array('data' => array($thread), 'var' => 'thread', 'notictype' => 'post', 'item' => $_GET['stamplist'] !== '' ? 'reason_stamplist_update' : 'reason_stamplist_delete') : array()),
  25. 'reasonvar' => array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => $reason, 'stamp' => $_G['cache']['stamps'][$_GET['stamplist']]['text']),
  26. 'modaction' => $modaction,
  27. 'modlog' => $thread
  28. );
  29. $modpostsnum = 1;
  30. updatemodlog($_G['tid'], $modaction);
  31. }
  32. ?>