Exemplo n.º 1
0
if (db_numrows($res1) == 0) {
    $feedback .= " Error finding question #" . $question_id;
} else {
    $q_type = db_result($res1, 0, 'question_type');
    $sql2 = "SELECT * FROM survey_radio_choices WHERE question_id='{$question_id}' AND choice_id='{$choice_id}'";
    $res2 = db_query($sql2);
    if (db_numrows($res2) == 0) {
        $feedback .= " Error finding radio button #" . $choice_id;
    }
}
?>

<P>
<H2>
<?php 
if ($q_type == 6) {
    //radio buttons
    echo $Language->getText('survey_admin_update_radio', 'update_r');
} else {
    //select-box
    echo $Language->getText('survey_admin_update_radio', 'update_sb');
}
?>
</H2>
<P>

<?php 
if (db_numrows($res1) != 0 && db_numrows($res2) != 0) {
    survey_utils_show_radio_form($question_id, $choice_id, $q_type);
}
survey_footer(array());
Exemplo n.º 2
0
echo $survey->showTypeBox('question_type', $question_type);
// see if the question is a radio-button type
$qry1 = "SELECT * FROM survey_questions WHERE group_id='" . db_ei($group_id) . "' AND question_id='" . db_ei($question_id) . "'";
$res1 = db_query($qry1);
$question_type = db_result($res1, 0, 'question_type');
?>
<P>

<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="<?php 
echo $Language->getText('survey_admin_update_question', 'subm_changes');
?>
">


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="BUTTON" NAME="none" VALUE="<?php 
echo $Language->getText('survey_admin_add_question', 'show_q');
?>
" ONCLICK="show_questions()">
</FORM>

<?php 
// for radio-button questions, display buttons list and form
if ($question_type == "6" || $question_type == "7") {
    $sql = "SELECT * " . "FROM survey_radio_choices " . "WHERE question_id='" . db_ei($question_id) . "'" . "ORDER BY choice_rank";
    $result = db_query($sql);
    survey_utils_show_radio_list($result, $question_type);
    survey_utils_show_radio_form($question_id, "", $question_type);
}
survey_footer(array());