<?php
  /**
   * Copyright 2011 Zazavi - http://www.zazavi.com
   * Zazavi is free software released under the terms of the GNU General Public License.
   * You should have received a copy of the license.  If not, see <http://www.gnu.org/licenses/>.
   */
  define("_VALID_PHP", true);
  require_once("../../init.php");
  
  require_once(ZAZAVILITE . "admin/modules/poll/lang/" . $core->language . ".lang.php");
  require_once(ZAZAVILITE . "admin/modules/poll/admin_class.php");
  $poll = new poll();
?>
<?php
  if (!isset($_POST['poll']) || !isset($_POST['pollid'])) {
      print $poll->showPollQuestion();
  } else {
      if (isset($_COOKIE["voted" . $_POST['pollid']]) != 'yes')
          $poll->updatePollResult();
      
      print $poll->getPollResults(intval($_POST['pollid']));
  }
?>