fetch('tid:'.$_G['tid'], $pid, false); $sticktopiclist[$pid] = $post['position']; } if(!submitcheck('modsubmit')) { $stickpid = ''; foreach($sticktopiclist as $id => $postnum) { $stickpid .= ''; } include template('forum/topicadmin_action'); } else { if($_GET['stickreply']) { foreach($sticktopiclist as $pid => $postnum) { C::t('forum_poststick')->insert(array( 'tid' => $_G['tid'], 'pid' => $pid, 'position' => $postnum, 'dateline' => $_G['timestamp'], ), false, true); } } else { foreach($sticktopiclist as $pid => $postnum) { C::t('forum_poststick')->delete($_G['tid'], $pid); } } $sticknum = C::t('forum_poststick')->count_by_tid($_G['tid']); $stickreply = intval($_GET['stickreply']); if($sticknum == 0 || $stickreply == 1) { C::t('forum_thread')->update($_G['tid'], array('moderated'=>1, 'stickreply'=>$stickreply)); } $modaction = $_GET['stickreply'] ? 'SRE' : 'USR'; $reason = checkreasonpm(); $resultarray = array( 'redirect' => "forum.php?mod=viewthread&tid=$_G[tid]&page=$page", 'reasonpm' => ($sendreasonpm ? array('data' => array(array('authorid' => $post['authorid'])), 'var' => 'post', 'notictype' => 'post', 'item' => $_GET['stickreply'] ? 'reason_stickreply': 'reason_stickdeletereply') : array()), 'reasonvar' => array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => $reason), 'modlog' => $thread ); } ?>