FetchRow(); $ia = array(0 => $qid, 1 => "FIELDNAME", 2 => $qrows['title'], 3 => $qrows['question'], 4 => $qrows['type'], 5 => $qrows['gid'], 6 => $qrows['mandatory'], 7 => $qrows['other']); $answers = retrieveAnswers($ia); $thistpl="$templaterootdir/".$thissurvey['template']; doHeader(); $dummy_js = '
'; $question=""; $answer=$answers[0][1]; $help=$answers[0][2]; $questioncode=$answers[0][5]; $content = templatereplace(file_get_contents("$thistpl/startpage.pstpl")); $content .= templatereplace(file_get_contents("$thistpl/startgroup.pstpl")); $content .= templatereplace(file_get_contents("$thistpl/question.pstpl")); $content .= templatereplace(file_get_contents("$thistpl/endgroup.pstpl")).$dummy_js; $content .= templatereplace(file_get_contents("$thistpl/endpage.pstpl")); if($qrows['mandatory'] == 'Y') { $mandatory = ' mandatory'; } else { $mandatory = ''; } $content = str_replace('{QUESTION_CLASS}' , question_class($qrows['type']) . $mandatory , $content); echo $content; echo "\n"; exit; ?>