2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Bug fix when list empty

This commit is contained in:
azammitdcarf
2010-01-15 01:55:50 +00:00
parent d58d632bd3
commit dd164ae5ff

View File

@@ -120,11 +120,14 @@ $sql = "SELECT s.sid as sid, sl.surveyls_title AS title
WHERE s.active = 'Y'";
$surveys = $db->GetAll($sql);
foreach($surveys as $s)
{
print "<option value=\"{$s['sid']}\">" . T_("Existing questionnaire:") . " {$s['title']}</option>";
}
if (!empty($surveys))
{
foreach($surveys as $s)
{
print "<option value=\"{$s['sid']}\">" . T_("Existing questionnaire:") . " {$s['title']}</option>";
}
}
?></select></p>
<p><? echo T_("Restrict appointments to shifts?"); ?> <input name="ras" type="checkbox" checked="checked"/></p>
<p><? echo T_("Restrict work to shifts?"); ?> <input name="rws" type="checkbox" checked="checked"/></p>