Location: PHPKode > projects > Absolut Engine > absolut-engine-33870/showsurvey.php
<?
define(TEMPDIR,'admin/');
require(TEMPDIR."coreclass.php");
require(TEMPDIR."modules/surveys/coreclass.php");
$aepublic=new CSurveys();
$aepublic->PublicInitialize();
$aepublic->RequestVariables();
$aepublic->GetSurvey();
if ($aepublic->DBAccess())
   {
   $aepublic->GetSurveyVariables();
   if (!$_COOKIE["survey".$aepublic->surveyID])
   {
   echo '<form action="guestmodify.php?command=surveys1" method="post">';
   echo '<input type="hidden" name="surveyID" value="',$aepublic->GetSurveyID(),'">';
   }
   echo '<table class="ae_tablesurvey">';
   echo '<tr><td colspan="2" class="ae_surveytitle">';
   $aepublic->GetSurveyTitle();
   echo '</td></tr>';
   $aepublic->GetSurveyChoices('<tr><td class="ae_surveycontent">','</td><td class="ae_surveycontent">','</td></tr>');
   if ($_COOKIE["survey".$aepublic->surveyID]) echo '<tr><td colspan="2">Total vote count is ';
   if ($_COOKIE["survey".$aepublic->surveyID]) $aepublic->GetSurveyTotal();
   echo '</td></tr>';
   echo '</table>';
   if (!$_COOKIE["survey".$aepublic->surveyID])
   {
   echo '<input type="submit" name="submit" value="Vote!">';
   echo '</form>';
   }
   }
?>
Return current item: Absolut Engine