Example #1
0
    if (isset($_POST['tid']) && is_numeric($_POST['tid'])) {
        $tid = $_POST['tid'];
        if (isset($_POST['pollvote']) && is_array($_POST['pollvote'])) {
            $poll_votes = $_POST['pollvote'];
            if (poll_check_tabular_votes($tid, $poll_votes)) {
                poll_vote($tid, $poll_votes);
            } else {
                light_html_draw_top(sprintf("title=%s", gettext("Error")));
                light_html_display_error_msg(gettext("You must vote in every group."));
                light_html_draw_bottom();
                exit;
            }
        } else {
            light_html_draw_top(sprintf("title=%s", gettext("Error")));
            light_html_display_error_msg(gettext("You must select an option to vote for!"));
            light_html_draw_bottom();
            exit;
        }
    }
} else {
    if (isset($_POST['pollchangevote'])) {
        if (isset($_POST['tid']) && is_numeric($_POST['tid'])) {
            $tid = $_POST['tid'];
            $pid = 1;
            poll_delete_vote($tid);
        }
    }
}
light_html_draw_top();
light_draw_messages($tid, $pid);
light_html_draw_bottom();
Example #2
0
         light_html_display_error_msg(gettext("The requested thread could not be found or access was denied."));
         return;
     }
     if (!($messages = messages_get($tid, $pid, 10))) {
         light_html_display_error_msg(gettext("That post does not exist in this thread!"));
         return;
     }
     if (browser_mobile()) {
         light_html_draw_top(array('js' => array('js/messages.js')));
     }
     $nav_links = array(array('text' => gettext('Show messages'), 'url' => '#', 'class' => 'navigation', 'html' => light_messages_navigation_strip($tid, $pid, $thread_data['LENGTH'], 10), 'image' => 'mobile_navigation'));
     if (!$thread_data['CLOSED'] && session::check_perm(USER_PERM_POST_CREATE, $folder_data['FID'])) {
         array_unshift($nav_links, array('text' => gettext('Reply to All'), 'url' => "lpost.php?webtag={$webtag}&reply_to={$tid}.0&return_msg={$tid}.{$pid}", 'class' => 'reply_all', 'image' => 'mobile_reply_all'));
     }
     light_navigation_bar(array('back' => "lthread_list.php?webtag={$webtag}", 'nav_links' => $nav_links));
     light_draw_messages($tid, $pid, $thread_data, $messages);
 } else {
     if (isset($_GET['mid']) && is_numeric($_GET['mid'])) {
         if (!session::logged_in()) {
             light_html_guest_error();
         }
         light_pm_enabled();
         pm_user_prune_folders($_SESSION['UID']);
         if (browser_mobile()) {
             light_html_draw_top(array('js' => array('js/pm.js')));
         }
         light_navigation_bar(array('back' => "lpm.php?webtag={$webtag}"));
         light_draw_pm_inbox();
     } else {
         if (!($available_folders = folder_get_available_array())) {
             $available_folders = array();