في ملف mainfile.php وتحت القسم المسمى /* poll functions تاكد من صحة الاسطر التالية :
كود:
function pollMain($pollID) {
global $boxTitle, $boxContent, $pollcomm, $user, $cookie, $prefix;
if(!isset($pollID))
$pollID = 1;
if(!isset($url))
$url = sprintf("pollBooth.php?op=results&pollID=%d", $pollID);
$boxContent .= "<form action=\"pollBooth.php\" method=\"post\">";
$boxContent .= "<input type=\"hidden\" name=\"pollID\" value=\"".$pollID."\">";
$boxContent .= "<input type=\"hidden\" name=\"forwarder\" value=\"".$url."\">";
$result = mysql_query("SELECT pollTitle, voters FROM $prefix"._poll_desc." WHERE pollID=$pollID");
list($pollTitle, $voters) = mysql_fetch_row($result);
$boxTitle = _SURVEY;
$boxContent .= "<font class=\"content\"><b>$pollTitle</b></font><br><br>\n";
$boxContent .= "<table border=\"0\" width=\"100%\">";
for($i = 1; $i <= 12; $i++) {
$result = mysql_query("SELECT pollID, optionText, optionCount, voteID FROM $prefix"._poll_data." WHERE (pollID=$pollID) AND (voteID=$i)");
$object = mysql_fetch_object($result);
if(is_object($object)) {
$optionText = $object->optionText;
if($optionText != "") {
$boxContent .= "<tr><td valign=\"top\"><input type=\"radio\" name=\"voteID\" value=\"".$i."\"></td><td width=\"100%\"><font class=\"content\">$optionText</font></td></tr>\n";
}
}
}
$boxContent .= "</table><br><center><font class=\"content\"><input type=\"submit\" value=\""._VOTE."\"></font><br>";