$is_admin_page='y';
$group_id = getIntFromRequest('group_id');
$survey_id = getIntFromRequest('survey_id');
-survey_header(array('title'=>$Language->getText('survey_edit','title')));
+survey_header(array('title'=>_('Edit A Survey')));
if (!session_loggedin() || !user_ismember($group_id,'A')) {
- echo "<h1>" .$Language->getText('survey_edit','permission_denied')."</h1>";
+ echo "<h1>" ._('Permission Denied')."</h1>";
survey_footer(array());
exit;
}
if (!isset($survey_title) || $survey_title == "")
{
- $feedback .= $Language->getText('survey_edit','survey_title_required');
+ $feedback .= _('UPDATE FAILED: Survey Title Required');
}
elseif (!isset($survey_questions) || $survey_questions == "")
{
- $feedback .= $Language->getText('survey_edit','survey_question_required');
+ $feedback .= _('UPDATE FAILED: Survey Questions Required');
}
if (!isset($survey_id) || !isset($group_id) || $survey_id == "" || $group_id == "")
{
- $feedback .= $Language->getText('survey_edit','missing_date');
+ $feedback .= _('UPDATE FAILED: Missing Data');
}
else
{
"WHERE survey_id='$survey_id' AND group_id='$group_id'";
$result=db_query($sql);
if (db_affected_rows($result) < 1) {
- $feedback .= $Language->getText('survey_edit','update_failed');
+ $feedback .= _('UPDATE FAILED');
echo db_error();
} else {
- $feedback .= $Language->getText('survey_edit','update_successful');
+ $feedback .= _('UPDATE SUCCESSFUL');
}
}
}
// -->
</script>
-<span class="warning"><?php echo $Language->getText('survey_edit','warning_survey_after_response'); ?></span>
+<span class="warning"><?php echo _('WARNING! It is a bad idea to edit a survey after responses have been posted'); ?></span>
-<p><?php echo $Language->getText('survey_edit','change_after_already_response'); ?>.</p>
+<p><?php echo _('If you change a survey after you already have responses, your results pages could be misleading or messed up'); ?>.</p>
<p>
<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
<input type="hidden" name="post_changes" value="y" />
-<strong><?php echo $Language->getText('survey_edit','name_off_survey'); ?>:</strong>
+<strong><?php echo _('Name of Survey'); ?>:</strong>
<br />
<input type="hidden" name="survey_id" value="<?php echo $survey_id; ?>" />
<input type="text" name="survey_title" value="<?php echo $survey_title; ?>" length="60" maxlength="150" />
<p>
-<strong><?php echo $Language->getText('survey_edit','question'); ?>:</strong>
+<strong><?php echo _('Questions'); ?>:</strong>
<br />
-<?php echo $Language->getText('survey_edit','list_question_numbers'); ?>
+<?php echo _('List question numbers, in desired order, separated by commas. <strong>Refer to your list of questions</strong> so you can view the question id\'s. Do <strong>not</strong> include spaces or end your list with a comma.<br /> Ex: 1,2,3,4,5,6,7'); ?>
<br /><input type="text" name="survey_questions" value="<?php echo $survey_questions; ?>" length="90" maxlength="1500" /></p>
<p>
-<strong><?php echo $Language->getText('survey_edit','is_active'); ?></strong>
-<br /><input type="radio" name="is_active" value="1"<?php if ($is_active=='1') { echo ' checked="checked"'; } ?> /> <?php echo $Language->getText('survey_edit','yes'); ?>
-<br /><input type="radio" name="is_active" value="0"<?php if ($is_active=='0') { echo ' hecked="checked"'; } ?> /> <?php echo $Language->getText('survey_edit','no'); ?></p>
+<strong><?php echo _('Is Active'); ?></strong>
+<br /><input type="radio" name="is_active" value="1"<?php if ($is_active=='1') { echo ' checked="checked"'; } ?> /> <?php echo _('Yes'); ?>
+<br /><input type="radio" name="is_active" value="0"<?php if ($is_active=='0') { echo ' hecked="checked"'; } ?> /> <?php echo _('No'); ?></p>
<p>
-<input type="submit" name="submit" value="<?php echo $Language->getText('survey_edit','submit_changes'); ?>"></p>
+<input type="submit" name="submit" value="<?php echo _('Submit Changes'); ?>"></p>
</form></p>
<?php
?>
<p>
<form>
-<input type="button" name="none" value="<?php echo $Language->getText('survey_edit','show_existing_questions'); ?>" onclick="show_questions()" />
+<input type="button" name="none" value="<?php echo _('Show Existing Questions'); ?>" onclick="show_questions()" />
</form></p>
<p> </p>
-<h2><?php echo $Language->getText('survey_edit','existing_surveys'); ?></h2>
+<h2><?php echo _('Existing Surveys'); ?></h2>
<?php
ShowResultsEditSurvey($result);