Пример #1
0
             topicPin($db, $my, $mtg, $set, $users, $logs);
             break;
         case 'lock':
             if (!$users->hasAccess('forum_topic_lock')) {
                 $mtg->error('You don\'t have access');
             }
             topicLock($db, $my, $mtg, $set, $users, $logs);
             break;
         case 'deletetopic':
             if (!$users->hasAccess('forum_topic_delete')) {
                 $mtg->error('You don\'t have access');
             }
             topicDelete($db, $my, $mtg, $set, $users, $logs);
             break;
         case 'editpost':
             postEdit($db, $my, $mtg, $set, $users, $logs, $securimage);
             break;
         case 'deletepost':
             postDelete($db, $my, $mtg, $set, $users, $logs);
             break;
         default:
             $mtg->info('No sub action specified', true);
             break;
     }
     break;
 case 'sub':
     topicSubscribe($db, $my, $mtg, $set, $users);
     break;
 default:
     index($db, $my, $mtg, $set, $users);
     break;
Пример #2
0
             if (isset($_POST['yes'])) {
                 postRemove($postid);
                 $notify->add($lang->get('board'), $lang->get('post_remove_done'));
             } else {
                 $smarty->assign('thread_url', makeURL($mod, array('boardid' => $boardid, 'threadid' => $threadid)));
                 $smarty->assign('path', $template_dir . '/post_remove.tpl');
                 break;
             }
         }
     }
 case 'edit':
     if ($mode == 'edit') {
         $post = $db->selectOneRow($tbl_post, "*", "`postid`=" . $postid);
         if ($isallowed || $post['userid'] == $login->currentUserID()) {
             if (isset($_POST['save'])) {
                 postEdit($postid, $_POST['post']);
                 $notify->add($lang->get('board'), $lang->get('post_edit_done'));
             } else {
                 $smarty->assign('post', $post);
                 $smarty->assign('path', $template_dir . '/post_edit.tpl');
                 break;
             }
         }
     }
 case 'thread_move':
     if ($mode == 'thread_move') {
         if ($isallowed) {
             $breadcrumbs->addElement($lang->get('thread_move'), makeURL($mod, array('boardid' => $boardid, 'threadid' => $threadid, 'mode' => 'thread_move')));
             $smarty->assign('path', $template_dir . "/thread_move.tpl");
             if (isset($_POST['move'])) {
                 threadMove($threadid, $_POST['boardid']);