unset($sid); $sid = $_SESSION['survey_id']; // load current values from DB if $sid exists (in session) $survey = array(); if(!empty($sid) && $updated) { $sql = "SELECT * FROM ".$GLOBALS['ESPCONFIG']['survey_table']." WHERE id=${sid}"; $result = execute_sql($sql,"",ADODB_FETCH_ASSOC); $survey = fetch_row($result); db_close($result); } else { $fields = array('name','realm','title','subtitle','email','theme','thanks_page','thank_head','thank_body','info','public','auto_num','open_date','close_date'); foreach ($fields as $f) { if(!empty($_POST[$f])) $survey[$f] = _stripslashes($_POST[$f]); else $survey[$f] = ''; } } // if the date values are zeroes, something bad went in -- correct it on the display so as to not panic the user if ('0000-00-00 00:00:00' == $survey['open_date']) { $survey['open_date'] = ''; } if ('0000-00-00 00:00:00' == $survey['close_date']) { $survey['close_date'] = ''; } ?> Fields tab to edit individual fields.')); ?>


MoveNext(); $realms[$r] = $r; } db_close($rr); } else { foreach($_SESSION['acl']['pdesign'] as $r) $realms[$r] = $r; } echo(htmlspecialchars($_SESSION['acl']['username']) . " / "); echo(mkselect('realm',$realms, $survey) . " ". _('Required') ."
\n"); echo(_('User and Group that owns this survey.')); ?>















rewind(); while ($file=$dir->read()) { if (stristr($file,".css")) { $pos = strrpos($file, "."); $name = substr($file, 0,$pos); $themes_array[$file] = $name; } } $dir->close(); echo(mkselect('theme',$themes_array, $survey) . '
' . _('Select a theme (css) to use with this survey.')); ?>

_('Yes'),'N'=>_('No')), $survey) . ''. _('Required') .'
' . _('Select if questions are to be numbered automatically when showing the survey.')); ?>

' . _('The earliest date and time respondents may respond to survey.') . '
' . _('If date given without a time, midnight on the given date is assumed.') . '
' . _('If not supplied, respondents may respond immediately once survey activated.') ?>
' . _('When provided, the latest date and time respondents may respond to survey.') . '
' . _('If date given without a time, midnight on the given date is assumed.') . '
' . _('If not supplied, respondents may respond indefinitely until survey marked as done.') ?>