(GPLv2) or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA02110-1301, USA. ********************************************************************************/ if (stristr(htmlentities($_SERVER['PHP_SELF']), "block_surveys.php")) { die("
Error: This file cannot be opened directly!
"); } global $dblink,$siteConfig; if ($row = $dblink->get_row("SELECT * FROM memht_survey WHERE enabled=1 ORDER BY id DESC LIMIT 1")) { $id = intval($row['id']); $question = outCode($row['question']); $comments = intval($row['usecomments']); echo "
\n"; echo "
$question
\n"; $result = $dblink->get_list("SELECT * FROM memht_survey_data WHERE surveyid='$id' ORDER BY id"); foreach ($result as $row) { $aid = intval($row['id']); $answer = outCode($row['answer']); echo "
$answer
\n"; } echo "
\n"; echo "
"._RESULT_."
\n"; if ($siteConfig['usecomments']==1 AND $comments==1) { echo "
(".$dblink->get_num("SELECT id FROM memht_comments WHERE whr=6 AND wid=$id AND moderate=0")." "._COMMENTS_.")
\n"; } echo "\n"; echo "\n"; echo "
\n"; } else { echo "
"._NOACTIVESURVEY_."
\n"; } ?>