home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / KOMUNIK / progweb / progweb.exe / phpnuke / html / pollBooth.php < prev    next >
PHP Script  |  2000-12-05  |  2KB  |  59 lines

  1. <?php
  2.  
  3. ######################################################################
  4. # PHP-NUKE: Web Portal System
  5. # ===========================
  6. #
  7. # Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)
  8. # http://phpnuke.org
  9. #
  10. # This modules is to manage the Surveys/Polls for your site
  11. #
  12. # This program is free software. You can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; either version 2 of the License.
  15. ######################################################################
  16.  
  17. if(!isset($mainfile)) { include("mainfile.php"); }
  18.  
  19. if(!isset($pollID)) {
  20.   include ('header.php');
  21.   pollList();
  22.   include ('footer.php');
  23. }
  24. elseif(isset($forwarder)) {
  25.   pollCollector($pollID, $voteID, $forwarder);
  26. }
  27. elseif($op == "results" && $pollID > 0) {
  28.     include ("header.php");
  29.     echo "<center><table cellpadding=0 cellspacing=2 border=0 bgcolor=000000><tr><td colspan=2>";
  30.     echo "<table cellpadding=5 cellspacing=2 border=0 bgcolor=FFFFFF><tr><td><center>";
  31.     pollResults($pollID);
  32.     echo "</td></tr></table></td></tr></table></center><br><br>";
  33.     cookiedecode($user);
  34.     if (($pollcomm) AND ($mode != "nocomments")) {
  35.     if ($anonpost==1 OR $admin OR $user) {
  36.         echo "<p><center><a href=pollcomments.php?op=Reply&pid=0&pollID=$pollID><img src=$uimages/comment.gif border=0></a></p></center>";
  37.     }
  38.     include("pollcomments.php");
  39.     }
  40.     include ("footer.php");
  41. }
  42. elseif($voteID > 0) {
  43.     pollCollector($pollID, $voteID);
  44. }
  45. elseif($pollID != pollLatest()) {
  46.   include ('header.php');
  47.   echo "<center><table border=0 width=200><tr><td>";
  48.   pollMain($pollID);
  49.   echo "</td></tr></table></center>";
  50.   include ('footer.php');
  51. } else {
  52.   include ('header.php');
  53.   echo "<center><table border=0 width=160><tr><td>";
  54.   pollNewest();
  55.   echo "</td></tr></table><br>".translate("Current Survey Voting Booth")."";
  56.   include ('footer.php');
  57. }
  58.  
  59. ?>