예제 #1
0
파일: board.php 프로젝트: stormeus/Kusaba-Z
         if ($post_reported === 'cleared') {
             echo _gettext('That post has been cleared as not requiring any deletion.') . '<br />';
         } elseif ($post_reported) {
             echo _gettext('That post is already in the report list.') . '<br />';
         } else {
             if ($post_class->Report()) {
                 echo _gettext('Post successfully reported.') . '<br />';
             } else {
                 echo _gettext('Unable to report post. Please go back and try again.') . '<br />';
             }
         }
     } else {
         echo _gettext('This board does not allow post reporting.') . '<br />';
     }
 } elseif (isset($_POST['postpassword']) || (require_once KU_ROOTDIR . 'inc/classes/manage.class.php') && Manage::CurrentUserIsModeratorOfBoard($board_class->board['name'], $_SESSION['manageusername']) && ($ismod = true)) {
 } elseif (isset($_POST['postpassword']) || isset($_POST['moddelete']) && (require_once KU_ROOTDIR . 'inc/classes/manage.class.php') && Manage::CurrentUserIsModeratorOfBoard($board_class->board['name'], $_SESSION['manageusername']) && ($ismod = true)) {
     // They clicked the Delete button
     if ($_POST['postpassword'] != '' || $ismod) {
         if (md5($_POST['postpassword']) == $post_class->post['password'] || $ismod) {
             if (isset($_POST['fileonly'])) {
                 if ($post_class->post['file'] != '' && $post_class->post['file'] != 'removed') {
                     $post_class->DeleteFile();
                     $board_class->RegeneratePages();
                     if ($post_class->post['parentid'] != 0) {
                         $board_class->RegenerateThreads($post_class->post['parentid']);
                     }
                     echo _gettext('Image successfully deleted from your post.') . '<br />';
                 } else {
                     echo _gettext('Your post already doesn\'t have an image!') . '<br />';
                 }
             } else {
예제 #2
0
		<li><a href="manage_page.php?action=reports">' . _gettext('View Reports') . ' [' . $open_reports[0][0] . ']</a></li>
		<li><a href="manage_page.php?action=bans">' . _gettext('View/Add/Remove bans') . '</a></li>';
        if (KU_APPEAL) {
            $tpl_links .= '<li><a href="manage_page.php?action=appeals">' . _gettext('View Appeals') . '</a></li>';
        }
        $tpl_links .= '<li><a href="manage_page.php?action=deletepostsbyip">' . _gettext('Delete all posts by IP') . '</a></li>
		<li><a href="manage_page.php?action=recentimages">' . _gettext('Recently uploaded images') . '</a></li>
		<li><a href="manage_page.php?action=recentposts">' . _gettext('Recent posts') . '</a></li>
		</ul></div>';
    }
    if ($manage_class->CurrentUserIsModerator()) {
        $tpl_links .= section_html(_gettext('Moderating Boards'), 'mboards', false) . '<ul>';
        $i = 0;
        $resultsboard = $tc_db->GetAll("SELECT HIGH_PRIORITY * FROM `" . KU_DBPREFIX . "boards` ORDER BY `name`");
        foreach ($resultsboard as $lineboard) {
            if ($manage_class->CurrentUserIsModeratorOfBoard($lineboard['name'], $_SESSION['manageusername'])) {
                $i++;
                $board = $lineboard['name'];
                $tpl_links .= "<li><a href=\"{$board}\"><strong>/{$board}/</strong></a></li>";
            }
        }
        if ($i == 0) {
            $tpl_links .= _gettext('No boards');
        } else {
            $tpl_links .= "<li>" . sprintf(_gettext('%d Boards'), $i) . "</li></ul>";
        }
    } elseif ($manage_class->CurrentUserIsAdministrator()) {
        $tpl_links .= section_html(_gettext('All Boards'), 'mboards', false) . '<ul>';
        $i = 0;
        $resultsboard = $tc_db->GetAll("SELECT HIGH_PRIORITY * FROM `" . KU_DBPREFIX . "boards` ORDER BY `name`");
        foreach ($resultsboard as $lineboard) {