Beehive PHP Cross Reference Discussion Forums

Source: /poll_results.php - 104 lines - 3644 bytes - Summary - Text - Print

   1  <?php
   2  
   3  /*======================================================================
   4  Copyright Project Beehive Forum 2002
   5  
   6  This file is part of Beehive Forum.
   7  
   8  Beehive Forum is free software; you can redistribute it and/or modify
   9  it under the terms of the GNU General Public License as published by
  10  the Free Software Foundation; either version 3 of the License, or
  11  (at your option) any later version.
  12  
  13  Beehive Forum is distributed in the hope that it will be useful,
  14  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16  GNU General Public License for more details.
  17  
  18  You should have received a copy of the GNU General Public License
  19  along with Beehive; if not, write to the Free Software
  20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  21  USA
  22  ======================================================================*/
  23  
  24  // Bootstrap
  25  require_once  'boot.php';
  26  
  27  // Required includes
  28  require_once  BH_INCLUDE_PATH . 'constants.inc.php';
  29  require_once  BH_INCLUDE_PATH . 'form.inc.php';
  30  require_once  BH_INCLUDE_PATH . 'format.inc.php';
  31  require_once  BH_INCLUDE_PATH . 'html.inc.php';
  32  require_once  BH_INCLUDE_PATH . 'messages.inc.php';
  33  require_once  BH_INCLUDE_PATH . 'poll.inc.php';
  34  require_once  BH_INCLUDE_PATH . 'session.inc.php';
  35  require_once  BH_INCLUDE_PATH . 'thread.inc.php';
  36  // End Required includes
  37  
  38  if (isset($_GET['tid']) && is_numeric($_GET['tid'])) {
  39  
  40      $tid = $_GET['tid'];
  41  
  42      if (!$t_fid = thread_get_folder_fid($tid)) {
  43          html_draw_error(gettext("The requested thread could not be found or access was denied."));
  44      }
  45  
  46  } else {
  47  
  48      html_draw_error(gettext("You must specify a poll to view."));
  49  }
  50  
  51  if (!$folder_data = thread_get_folder($tid)) {
  52      html_draw_error(gettext("The requested folder could not be found or access was denied."));
  53  }
  54  
  55  $perm_folder_moderate = session::check_perm(USER_PERM_FOLDER_MODERATE, $folder_data['FID']);
  56  
  57  if (!$thread_data = thread_get($tid, $perm_folder_moderate, false, $perm_folder_moderate)) {
  58      html_draw_error(gettext("The requested thread could not be found or access was denied."));
  59  }
  60  
  61  if (!$poll_data = poll_get($tid)) {
  62      html_draw_error(gettext("The requested thread could not be found or access was denied."));
  63  }
  64  
  65  $show_sigs = session::show_sigs();
  66  
  67  $highlight_array = array();
  68  
  69  $poll_user_count = 0;
  70  
  71  $poll_results = poll_get_votes($tid);
  72  
  73  $user_poll_votes_array = poll_get_user_votes($tid);
  74  
  75  html_draw_top("title={$thread_data['TITLE']}", 'pm_popup_disabled', 'class=window_title', 'js/poll.js');
  76  
  77  echo "<div align=\"center\">\n";
  78  echo "<table width=\"96%\" border=\"0\">\n";
  79  echo "  <tr>\n";
  80  echo "    <td align=\"left\">";
  81  
  82  messages_top($tid, 1, $thread_data['FID'], $folder_data['TITLE'], $thread_data['TITLE'], $thread_data['INTEREST'], $folder_data['INTEREST'], $thread_data['STICKY'], $thread_data['CLOSED'], $thread_data['ADMIN_LOCK'], ($thread_data['DELETED'] == 'Y'), false, array());
  83  
  84  echo "    </td>\n";
  85  echo "  </tr>\n";
  86  echo "</table>\n";
  87  echo "<table width=\"100%\" border=\"0\">\n";
  88  echo "  <tr>\n";
  89  echo "    <td width=\"2%\">&nbsp;</td>\n";
  90  echo "    <td align=\"left\">";
  91  
  92  poll_display($tid, $thread_data['LENGTH'], 1, $thread_data['FID'], false, $thread_data['CLOSED'], $show_sigs, true, $highlight_array);
  93  
  94  echo "    </td>\n";
  95  echo "  </tr>\n";
  96  echo "</table>\n";
  97  echo "<br />\n";
  98  echo "<form accept-charset=\"utf-8\" method=\"post\" action=\"poll_results.php\" target=\"_self\">\n";
  99  echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
 100  echo "  ", form_button('close_popup', gettext("Close")), "\n";
 101  echo "</form>\n";
 102  echo "</div>\n";
 103  
 104  html_draw_bottom();

title

Description

title

Description

title

Description

title

title

Body