<?php
/*
###################################################################################
  Bigware Shop 2.3
  Release Datum: 23.08.2015
  
  Bigware Shop
  http://www.bigware.de

  Copyright (c) 2015 Bigware LTD
  (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
  (c) 2015	Bigware LTD

  Copyrightvermerke duerfen nicht entfernt werden.
  ------------------------------------------------------------------------
  Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
  der GNU General Public License, wie von der Free Software Foundation
  veroeffentlicht, weitergeben und/oder modifizieren, entweder gemaess Version 2 
  der Lizenz oder (nach Ihrer Option) jeder spaeteren Version.
  Die Veroeffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen
  von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die
  implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FUER EINEN
  BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.
  
  Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
  Programm erhalten haben. Falls nicht, schreiben Sie an die Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

  Infos:
  ------------------------------------------------------------------------
  Der Bigware Shop wurde vor vielen Jahren bereits aus dem bekannten Shopsystem osCommerce
  weiter- und neuentwickelt.
  Der Bigware Shop legt im hohen Masse Wert auf Bedienerfreundlichkeit, beinhaltet eine leichte
  Installation, viele neue professionelle Werkzeuge und zeichnet sich aus durch eine grosse 
  Community, die bei Problemen weiterhelfen kann.
  
  Der Bigware Shop ist auf jedem System lauffaehig, welches eine PHP Umgebung
  (ab PHP 4.1.3) und mySQL zur Verfuegung stellt und auf Linux basiert.
 
  Hilfe erhalten Sie im Forum auf www.bigware.de 
  
  -----------------------------------------------------------------------
  
 ##################################################################################




*/
?>
<?php
  require('load_this/load_bigware_11.php');
  $languages = go_get_languages();
  if ($_GET['action'] == 'update') {
    $poll_update=go_db_query("update phesis_poll_desc set catID='".(int)$_POST['bigPfad']."' where pollid='".(int)$_POST['pollid']."'");
    for ($l=0; $l<sizeof($languages); $l++) {
      $language_id = $languages[$l]['id'];
      for ($i=0;$i<9;$i++){
        $h_voteid='voteid'.$i;
        $polltext = $_POST[$h_voteid][$language_id];
        $update_query ="update phesis_poll_data set ";
        $update_query .= "optiontext='".$polltext."' ";
        $update_query .= " where voteid = '" . $i."' and pollid='".(int)$_POST['pollid']."' and language_id = '" . $language_id . "'"; 
        go_db_query($update_query);
      }
    }
    header('Location: ' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action')) . 'info=' . (int)$_POST['pollid'], 'NONSSL')); go_exit();
  } elseif ($_GET['action'] == 'save_config') {
    go_db_query("update phesis_poll_config set set_it_up_value = '" . $_POST['set_it_up_value'] . "', last_modified = now() where set_it_up_id = '" . $_POST['set_it_up_id'] . "'");
    header('Location: ' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action')) . 'action=config', 'NONSSL')); go_exit();
  } elseif ($_GET['action'] == 'poll_type') {
    $poll_query=go_db_query("select poll_type from phesis_poll_desc where pollid=".(int)$_GET['info']);
    $poll_type=go_db_fetch_array($poll_query);
    $new_poll_type=1;
    if ($poll_type['poll_type']==1) {
      $new_poll_type=0;
    }
    $poll_update=go_db_query("update phesis_poll_desc set poll_type=".$new_poll_type." where pollid=".(int)$_GET['info']);
    header('Location: ' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action')) . 'info=' . (int)$_POST['pollid'], 'NONSSL')); go_exit();
 } elseif ($_GET['action'] == 'poll_open') {
    $poll_query=go_db_query("select poll_open from phesis_poll_desc where pollid=".(int)$_GET['info']);
    $poll_open=go_db_fetch_array($poll_query);
    $new_poll_open=1;
    if ($poll_open['poll_open']==1) {
        $new_poll_open=0;
        }
    $poll_update=go_db_query("update phesis_poll_desc set poll_open=".$new_poll_open." where pollid=".(int)$_GET['info']);
    header('Location: ' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action')) . 'info=' . (int)$_POST['pollid'], 'NONSSL')); go_exit();
 } elseif ($_GET['action'] == 'deleteconfirm') {
    $delete_query="delete from phesis_poll_desc where pollid='".(int)$_POST['bigID']."'";
    go_db_query($delete_query);
    $delete_query="delete from phesis_poll_data where pollid='".(int)$_POST['bigID']."'";
    go_db_query($delete_query);
    header('Location: ' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action','info')), 'NONSSL'));
  } elseif ($_GET['action'] == 'updatenew') {
    $insert_query="insert into phesis_poll_desc (timestamp,voters,catID) values (NOW(), '0', '" . (int)$_POST['bigPfad'] . "')";
    $poll_query = go_db_query($insert_query);
    $pollid=go_db_insert_id($poll_query);
    for ($l=0; $l<sizeof($languages); $l++) {
      $language_id = $languages[$l]['id'];
      for ($i=0;$i<9;$i++){
        $h_voteid='voteid'.$i;
        $polltext = $_POST['$h_voteid'][$language_id];
        $insert_query="insert into phesis_poll_data (pollid,optiontext,optioncount,voteid, language_id) values ($pollid, '".$_POST[$h_voteid][$language_id]."', 0, $i, '" . $language_id ."')";
        go_db_query($insert_query);
      }
    }
    header('Location: ' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action')) . 'info=' . (int)$_POST['pollid'], 'NONSSL')); go_exit();
  }
?>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="load_this/style.css">
<script language="javascript" src="load_this/menu.js"></script>
<script language="javascript" src="load_this/general.js"></script>
</head>
<?php
?>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(FOLDER_RELATIV_INCLUDES . 'load_bigware_9.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php echo FRAME_WIDTH; ?>" valign="top"></td>
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 if ($_GET['action'] == 'new') {
?>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageGeneralsign">&nbsp;<?php echo ABOVE_TITLE; ?>&nbsp;</td>
            <td align="right"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
      <td><table border="0" width="70%" cellspacing="0" cellpadding="0">
       <form name="polls" <?php echo 'action="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action', 'bigID')) . 'action=updatenew', 'NONSSL') . '"'; ?> method="post"><input type="hidden" name="pollid" value="NULL">
      <tr>
        <td>&nbsp</td>
      </tr>
        <tr>
        <td class="main"><?php echo TEXT_POLL_CATEGORY; ?>&nbsp;</td>
<?php
$categories = go_get_category_tree();
$categories[0]['text'] = 'All Categories';
?>
        <td><?php echo go_fetch_pull_down_menu('bigPfad', $categories, 0 ); ?></td>
      </tr>
      <tr>
        <td>&nbsp</td>
      </tr>
<?php
    for ($l=0; $l<sizeof($languages); $l++) {
?>
      <tr>
        <td>&nbsp</td>
      </tr>
        <tr>
        <td class="main"><?php echo TEXT_POLL_TITLE; ?>&nbsp;&nbsp;<?php echo go_picture(FOLDER_RELATIV_CATALOG_LANGUAGES . $languages[$l]['directory'] . '/picture/' . $languages[$l]['picture'], $languages[$l]['name']);?></td>
        <td><input type="text" name="voteid0[<?php echo $languages[$l]['id']; ?>]" maxlength="255" size="50" value=""></td>
      </tr>
      <tr>
        <td>&nbsp</td>
      </tr>
<?php
      for ($i=1; $i<9; $i++){
?>
      <tr>
        <td class="main"><?php echo TEXT_OPTION . ' ' . $i?>&nbsp</td>
      <td><input type="text" name="voteid<?php echo $i?>[<?php echo $languages[$l]['id']; ?>]" maxlength="50" size="50" value=""></td>
      </tr>
<?php
        }
       }
?>
        <tr>
        <td align="right" class="main"><br><?php echo go_picture_submit('button_update.gif', PICTURE_UPDATE); ?>&nbsp;<?php echo '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action', 'bigID')) . 'info=' . (int)$_GET['bigID'], 'NONSSL') . '">' . go_picture(FOLDER_RELATIV_PICTURES . 'button_cancel.gif', PICTURE_CANCEL) . '</a>'; ?></td>
      </tr>
        </form>
<?php
  } elseif ($_GET['action'] == 'config' || $_GET['action'] == 'change_config') {
?>
<tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageGeneralsign">&nbsp;<?php echo ABOVE_TITLE; ?>&nbsp;</td>
            <td align="right">&nbsp;<?php echo go_picture(FOLDER_RELATIV_PICTURES . 'tranparentes.gif', '', ABOVE_PICTURE_WIDTH, ABOVE_PICTURE_HEIGHT); ?>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table cellpadding="5" border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" cellpadding="5" cellspacing="1" style="border-collapse: collapse" width="100%" id="AutoNumber1">
              <tr class="tbUPCountData">
                <td class="tbUPDataInside">&nbsp;<?php echo DB_TBL_ABOVE_SET_IT_UP_TITLE; ?>&nbsp;</td>
                <td class="tbUPDataInside">&nbsp;<?php echo DB_TBL_ABOVE_SET_IT_UP_VALUE; ?>&nbsp;</td>
                <td class="tbUPDataInside" align="center">&nbsp;<?php echo DB_TBL_ABOVE_ACTION; ?>&nbsp;</td>
              </tr>
<?php
  $rows = 0;
  $set_it_up_query = go_db_query("select set_it_up_id as cfgID, set_it_up_title as cfgTitle, set_it_up_value as cfgValue from phesis_poll_config");
  while ($set_it_up = go_db_fetch_array($set_it_up_query)) {
    $rows++;
    if (((!$_GET['info']) || (@$_GET['info'] == $set_it_up['cfgID'])) && (!$cfgInfo) && (substr($_GET['action'], 0, 3) != 'new')) {
      $cfg_extra_query = go_db_query("select set_it_up_key as cfgKey, set_it_up_description as cfgDesc, date_added, last_modified from phesis_poll_config where set_it_up_id = '" . $set_it_up['cfgID'] . "'");
      $cfg_extra = go_db_fetch_array($cfg_extra_query);
      $cfgInfo_array = array_merge($set_it_up, $cfg_extra);
      $cfgInfo = new objectInfo($cfgInfo_array);
    }
    if ( (is_object($cfgInfo)) && ($set_it_up['cfgID'] == $cfgInfo->cfgID)) {
      echo '                  <tr class="tbCountDataSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . go_href_link('main_bigware_96.php', 'info=' . $cfgInfo->cfgID . '&action=change_config') . '\'">' . "\n";
    } else {
      echo '                  <tr class="tbCountData" onmouseover="this.className=\'tbCountDataOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'tbCountData\'" onclick="document.location.href=\'' . go_href_link('main_bigware_96.php', 'info=' . $set_it_up['cfgID']. '&action=config') . '\'">' . "\n";
    }
?>
                <td class="smallText">&nbsp;<?php echo $set_it_up['cfgTitle']; ?>&nbsp;</td>
                <td class="smallText">&nbsp;<?php echo $set_it_up['cfgValue']; ?>&nbsp;</td>
<?php
    if ($set_it_up['cfgID'] == $cfgInfo->cfgID) {
?>
                    <td align="center" class="smallText">&nbsp;<?php echo go_picture(FOLDER_RELATIV_PICTURES . 'icon_arrow_right.gif', ''); ?>&nbsp;</td>
<?php
    } else {
?>
                    <td align="center" class="smallText">&nbsp;<?php echo '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('info', 'action')) . 'action=config&info=' . $set_it_up['cfgID'], 'NONSSL') . '">' . go_picture(FOLDER_RELATIV_PICTURES . 'icon_info.gif', PICTURE_ICON_INFO) . '</a>'; ?>&nbsp;</td>
<?php
    }
?>
              </tr>
<?php
  }
?>
            </table></td>
<?php
  $heading = array();
  $contents = array();
  if ($cfgInfo) $heading[] = array('align' => 'left', 'text' => '&nbsp;<b>' . $cfgInfo->cfgTitle . '</b>&nbsp;');
  if ((!$peInfo) && ($_GET['action'] == 'new')) $heading[] = array('align' => 'left', 'text' => '&nbsp;<b>' . TEXT_INFO_ABOVE_NEW_ITEM . '</b>&nbsp;');
  if ($_GET['action'] == 'change_config') {
    $form = '<form name="set_it_up" action="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action')) . 'action=save_config', 'NONSSL') . '" method="post"><input type="hidden" name="set_it_up_id" value="' . $_GET['info'] . '">' . "\n";
    if (go_not_null($cfgInfo->set_function)) {
      $set_function = $cfgInfo->set_function;
      $value_field = $set_function($cfgInfo->cfgValue);
    } else {
      $value_field = '<input type="text" name="set_it_up_value" value="' . $cfgInfo->cfgValue . '">';
    }
    $contents[] = array('text' => $form);
    $contents[] = array('align' => 'left', 'text' => TEXT_INFO_CHANGE_INTRO . '<br>&nbsp;');
    $contents[] = array('align' => 'left', 'text' => '<b>' . $cfgInfo->cfgTitle . '</b><br>' . $cfgInfo->cfgDesc . '<br>' . $value_field . '<br>&nbsp;');
    $contents[] = array('align' => 'center', 'text' => go_picture_submit('button_update.gif', PICTURE_UPDATE) . '&nbsp;<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action')).'action=config', 'NONSSL') . '">' . go_picture_button('button_cancel.gif', PICTURE_CANCEL) . '</a>');
    $contents[] = array('text' => '</form>');
  } else {
    $contents = array('text' => $form);
    $contents[] = array('align' => 'center', 'text' =>                                      
                       '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action', 'info', 'x', 'y')) . 'info=' . $cfgInfo->cfgID . '&action=change_config', 'NONSSL') . '">' . go_picture_button('button_change.gif', PICTURE_CHANGE) . '</a>');
    $contents[] = array('align' => 'left', 'text' => '<br>' . TEXT_INFO_DESCRIPTION . '<br>' . $cfgInfo->cfgDesc);
    $contents[] = array('align' => 'left', 'text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . go_date_short($cfgInfo->date_added) . '<br>' . TEXT_INFO_LAST_MODIFIED . ' ' . go_date_short($cfgInfo->last_modified));
    $contents[] = array('text' => '</<form>');
  }
echo '            <td width="25%" valign="top">' . "\n";
  $frame = new frame;
  echo $frame->infoBox($heading, $contents);
    echo '            </td>' . "\n";
?>
<?php
  } elseif ($_GET['action'] == 'change') {
    $poll_query = go_db_query("select * from phesis_poll_desc where pollid = '" . (int)$_GET['bigID'] . "'");
    $polls = go_db_fetch_array($poll_query);
?>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageGeneralsign">&nbsp;<?php echo ABOVE_TITLE; ?>&nbsp;</td>
            <td align="right">&nbsp;<?php echo go_picture(FOLDER_RELATIV_PICTURES . 'tranparentes.gif', '', ABOVE_PICTURE_WIDTH, ABOVE_PICTURE_HEIGHT); ?>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
      <td><table border="0" width="70%" cellspacing="0" cellpadding="0">
       <form name="polls" <?php echo 'action="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action', 'bigID')) . 'action=update', 'NONSSL') . '"'; ?> method="post"><input type="hidden" name="pollid" value="<?php echo (int)$_GET['bigID']; ?>">
      <tr>
        <td>&nbsp</td>
      </tr>
        <tr>
        <td class="main"><?php echo TEXT_POLL_CATEGORY; ?>&nbsp;</td>
<?php
$categories = go_get_category_tree();
$categories[0]['text'] = 'All Categories';
?>
        <td><?php echo go_fetch_pull_down_menu('bigPfad', $categories, $polls['catID'] ); ?></td>
      </tr>
      <tr>
        <td>&nbsp</td>
      </tr>
<?php
    for ($l=0; $l<sizeof($languages); $l++) {
    $poll_data_query=go_db_query("select * from phesis_poll_data where pollid = '" . (int)$_GET['bigID'] . "' and voteid='0' and language_id = '".$languages[$l]['id']."'");
    $polls_data=go_db_fetch_array($poll_data_query);
?>
      <tr>
        <td>&nbsp</td>
      </tr>
      <tr>
        <td class="main"><?php echo TEXT_POLL_TITLE; ?>&nbsp;&nbsp;<?php echo go_picture(FOLDER_RELATIV_CATALOG_LANGUAGES . $languages[$l]['directory'] . '/picture/' . $languages[$l]['picture'], $languages[$l]['name']);?></td>
        <td><input type="text" name="voteid0[<?php echo $languages[$l]['id']; ?>]" maxlength="255" size="50" value="<?php echo $polls_data['optionText']; ?>"></td>
      </tr>
      <tr>
        <td>&nbsp</td>
      </tr>
<?php
      for ($i=1; $i<9; $i++){
    $poll_data_query=go_db_query("select * from phesis_poll_data where pollid = '" . (int)$_GET['bigID'] . "' and voteid='" .$i . "' and language_id = '".$languages[$l]['id']."'");
    $polls_data=go_db_fetch_array($poll_data_query);
?>
      <tr>
        <td class="main"><?php echo TEXT_OPTION . ' ' . $i?>&nbsp</td>
      <td><input type="text" name="voteid<?php echo $i?>[<?php echo $languages[$l]['id']; ?>]" maxlength="50" size="50" value="<?php echo $polls_data['optionText']; ?>"></td>
      </tr>
<?php
        }
       }
?>
       <tr>
        <td align="right" class="main"><br><?php echo go_picture_submit('button_update.gif', PICTURE_UPDATE); ?>&nbsp;<?php echo '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action', 'bigID')) . 'info=' . (int)$_GET['bigID'], 'NONSSL') . '">' . go_picture(FOLDER_RELATIV_PICTURES . 'button_cancel.gif', PICTURE_CANCEL) . '</a>'; ?></td>
      </tr>
        </form>
<?php
  } else {
?>
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageGeneralsign">&nbsp;<?php echo ABOVE_TITLE; ?>&nbsp;</td>
            <td align="right">&nbsp;<?php echo go_picture(FOLDER_RELATIV_PICTURES . 'tranparentes.gif', '', ABOVE_PICTURE_WIDTH, ABOVE_PICTURE_HEIGHT); ?>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table cellpadding="5" border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" cellpadding="5" cellspacing="1" style="border-collapse: collapse" width="100%" id="AutoNumber1">
              <tr class="tbUPCountData">
                <td class="tbUPDataInside" align="center">&nbsp;<?php echo DB_TBL_ABOVE_ID; ?>&nbsp;</td>
                <td class="tbUPDataInside">&nbsp;<?php echo DB_TBL_ABOVE_TITLE; ?>&nbsp;</td>
                <td class="tbUPDataInside" align="center">&nbsp;<?php echo DB_TBL_ABOVE_VOTES; ?>&nbsp;</td>
                <td class="tbUPDataInside" align="center">&nbsp;<?php echo DB_TBL_ABOVE_CREATED; ?>&nbsp;</td>
                    <td class="tbUPDataInside" align="center">&nbsp;<?php echo DB_TBL_ABOVE_PUBLIC; ?>&nbsp;</td>
                    <td class="tbUPDataInside" align="center">&nbsp;<?php echo DB_TBL_ABOVE_OPEN; ?>&nbsp;</td>
                <td class="tbUPDataInside" align="center">&nbsp;<?php echo DB_TBL_ABOVE_ACTION; ?>&nbsp;</td>
              </tr>
<?php
    $poll_query_raw = "select pollID, voters, timeStamp, poll_type, poll_open from phesis_poll_desc order by pollID asc";
    $polls_split = new splitPageResults($_GET['page'], MAX_SHOW_SEARCH_RESULTS, $poll_query_raw, $poll_query_numrows);
    $poll_query=go_db_query($poll_query_raw);
    $rows = 0;
    while ($polls = go_db_fetch_array($poll_query)) {
      $rows++;
        if (((!$_GET['info']) || (@$_GET['info'] == $polls['pollID'])) && (!$poInfo)) {
      $poInfo = new objectInfo($polls);
      } 
      if ( (is_object($poInfo)) && ($polls['pollID'] == $poInfo->pollID) ) {
?>
          <tr class="tbCountDataSelected" onmouseover="this.style.cursor='hand'" onclick="document.location.href='<?php echo go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action', 'info', 'x', 'y')) . 'action=change&bigID=' . $poInfo->pollID, 'NONSSL'); ?>'">
<?php
      } else {
?>
          <tr class="tbCountData" onmouseover="this.className='tbCountDataOver';this.style.cursor='hand'" onmouseout="this.className='tbCountData'" onclick="document.location.href='<?php echo go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('info', 'action', 'x', 'y')) . 'info=' . $polls['pollID'], 'NONSSL'); ?>'">
<?php
      }
      $title_query = go_db_query("select optionText from phesis_poll_data where voteid = '0' and pollID = '" . $polls['pollID'] . "' and language_id = '" . $languages_id ."'");
      $title = go_db_fetch_array($title_query);
?>
                <td class="TbInsideData" align="center">&nbsp;<?php echo $polls['pollID']; ?>&nbsp;</td>
                <td class="TbInsideData">&nbsp;<?php echo $title['optionText']; ?>&nbsp;</td>
                <td class="TbInsideData" align="center">&nbsp;<?php echo $polls['voters']; ?>&nbsp;</td>
                <td class="TbInsideData" align="center">&nbsp;<?php echo go_date_short($polls['timeStamp']); ?>&nbsp;</td>
                <td class="TbInsideData" align="center">&nbsp;
                        <?php
                        if ($polls['poll_type']==1) {
                                echo '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('info', 'action', 'x', 'y')) . 'action=poll_type&info=' . $polls['pollID'], 'NONSSL') . '">' . go_picture(FOLDER_RELATIV_PICTURES . 'icon_status_red.gif', _ALT_PUBLIC) . '</a>';
                                } else {
                                echo '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('info', 'action', 'x', 'y')) . 'action=poll_type&info=' . $polls['pollID'], 'NONSSL') . '">' . go_picture(FOLDER_RELATIV_PICTURES . 'icon_status_green.gif', _ALT_PRIVATE) . '</a>';
                                }
                  ?>
                &nbsp;</td>
                <td class="TbInsideData" align="center">&nbsp;
                        <?php
                         if ($polls['poll_open']==1) {
                                echo '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('info', 'action', 'x', 'y')) . 'action=poll_open&info=' . $polls['pollID'], 'NONSSL') . '">' . go_picture(FOLDER_RELATIV_PICTURES . 'icon_status_red.gif', _ALT_REOPEN) . '</a>';
                                } else {
                                echo '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('info', 'action', 'x', 'y')) . 'action=poll_open&info=' . $polls['pollID'], 'NONSSL') . '">' . go_picture(FOLDER_RELATIV_PICTURES . 'icon_status_green.gif', _ALT_CLOSE) . '</a>';
                                }
                        ?>
                        &nbsp;</td>
<?php
      if ($polls['pollID'] == $poInfo->pollID) {
?>
                <td class="smallText" align="center">&nbsp;<?php echo go_picture(FOLDER_RELATIV_PICTURES . 'icon_arrow_right.gif', ''); ?>&nbsp;</td>
<?php
      } else {
?>
                <td class="smallText" align="center">&nbsp;<?php echo '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('info', 'action', 'x', 'y')) . 'info=' . $polls['pollID'], 'NONSSL') . '">' . go_picture(FOLDER_RELATIV_PICTURES . 'icon_info.gif', PICTURE_ICON_INFO) . '</a>'; ?>&nbsp;</td>
<?php
      }
?>
              </tr>
<?php
    }
?>
              <tr>
                <td colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smalltext" valign="top">&nbsp;<?php echo $polls_split->display_count($poll_query_numrows, MAX_SHOW_SEARCH_RESULTS, $_GET['page'], TEXT_SHOW_NUMBER_OF_POLLS); ?>&nbsp;&nbsp;</td>
                    <td class="smalltext" align="right">&nbsp;<?php echo $polls_split->display_links($poll_query_numrows, MAX_SHOW_SEARCH_RESULTS, MAX_SHOW_PAGE_LINKS, $_GET['page']); ?>&nbsp;<?php echo '<br><br>&nbsp;<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action', 'info')) . 'action=new', 'NONSSL') . '">' . go_picture(FOLDER_RELATIV_PICTURES . 'button_new_poll.gif', PICTURE_NEW_POLL) . '</a>&nbsp;';?></td>
                        </tr>
                </table></td>
              </tr>
            </table></td>
<?php
  $heading=array();
  $contents=array();
  $heading[] = array('align' => 'left', 'text' => '&nbsp;<b>' . $poInfo->pollTitle . '</b>&nbsp;');
  if ($_GET['action'] == 'confirm') {
    $form = '<form action="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action')) . 'action=deleteconfirm', 'NONSSL') . '" method="post"><input type="hidden" name="bigID" value="' . $poInfo->pollID . '">'  ."\n";
    $contents[] = array('text' => $form);
    $contents[] = array('align' => 'left', 'text' => TEXT_DELETE_INTRO . '<br>&nbsp;<b>' . $poInfo->name . '</b><br>&nbsp;');
    $contents[] = array('align' => 'center', 'text' => go_picture_submit('button_delete.gif', PICTURE_DELETE) . '&nbsp;<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action')), 'NONSSL') . '">' . go_picture_button('button_cancel.gif', PICTURE_CANCEL) . '</a>');
  } else {
        $contents[] = array('align' => 'center', 'text' => '<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action', 'info', 'x', 'y')) . 'action=change&bigID=' . $poInfo->pollID, 'NONSSL') . '">' . go_picture_button('button_change.gif', PICTURE_CHANGE) . '</a>&nbsp;<a href="' . go_href_link(NAME_OF_FILE_POLLS, go_get_all_get_parameter(array('action', 'info', 'x', 'y')) . 'action=confirm&info=' . $poInfo->pollID, 'NONSSL') . '">' . go_picture_button('button_delete.gif', PICTURE_DELETE) . '</a>                      &nbsp;<a href="' . go_href_link('main_bigware_95.php', 'op=results&pollid=' . $poInfo->pollID, 'NONSSL') . '">' . go_picture_button('button_preview.gif', PICTURE_PREVIEW) . '</a>');
}
if ($poll_query_numrows==0){
        $contents[] = array('align' => 'center', 'text' => 'No polls defined');
}
if ($form) $contents[] = array('text' => '</form>');
    echo '            <td width="25%" valign="top">' . "\n";
$frame = new frame;
echo $frame->infoBox($heading, $contents);
    echo '            </td>' . "\n";
}
?>
          </tr>
        </table></td>
      </tr>
<?php
?>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(FOLDER_RELATIV_INCLUDES . 'load_bigware_7.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(FOLDER_RELATIV_INCLUDES . 'load_bigware_6.php'); ?>
