diff --git a/admin/new.php b/admin/new.php index 89ab8a29..fac19006 100644 --- a/admin/new.php +++ b/admin/new.php @@ -68,12 +68,25 @@ if (isset($_POST['import_file'])) $testing = 0; $rs = 0; $lime_sid = 0; + $respsc = 0; $lime_rs_sid = "NULL"; if (isset($_POST['ras'])) $ras = 1; if (isset($_POST['rws'])) $rws = 1; if (isset($_POST['testing'])) $testing = 1; + if (isset($_POST['respsc'])) $respsc = 1; if ($_POST['selectrs'] != "none") $rs = 1; + $lime_mode = "NULL"; + $lime_template = "NULL"; + $lime_endurl = "NULL"; + + if ($respsc == 1) + { + $lime_mode = $db->qstr($_POST['lime_mode'],get_magic_quotes_gpc()); + $lime_template = $db->qstr($_POST['lime_template'],get_magic_quotes_gpc()); + $lime_endurl = $db->qstr($_POST['lime_endurl'],get_magic_quotes_gpc()); + } + $name = $db->qstr($_POST['description'],get_magic_quotes_gpc()); $rs_intro = $db->qstr(html_entity_decode($_POST['rs_intro'],get_magic_quotes_gpc())); $rs_project_intro = $db->qstr(html_entity_decode($_POST['rs_project_intro'],get_magic_quotes_gpc())); @@ -91,8 +104,8 @@ if (isset($_POST['import_file'])) $lime_rs_sid = bigintval($_POST['selectrs']); } - $sql = "INSERT INTO questionnaire (questionnaire_id,description,lime_sid,restrict_appointments_shifts,restrict_work_shifts,respondent_selection,rs_intro,rs_project_intro,rs_project_end,rs_callback,rs_answeringmachine,testing,lime_rs_sid,info) - VALUES (NULL,$name,'$lime_sid','$ras','$rws','$rs',$rs_intro,$rs_project_intro,$rs_project_end,$rs_callback,$rs_answeringmachine,'$testing',$lime_rs_sid,$info)"; + $sql = "INSERT INTO questionnaire (questionnaire_id,description,lime_sid,restrict_appointments_shifts,restrict_work_shifts,respondent_selection,rs_intro,rs_project_intro,rs_project_end,rs_callback,rs_answeringmachine,testing,lime_rs_sid,info,lime_mode,lime_template,lime_endurl) + VALUES (NULL,$name,'$lime_sid','$ras','$rws','$rs',$rs_intro,$rs_project_intro,$rs_project_end,$rs_callback,$rs_answeringmachine,'$testing',$lime_rs_sid,$info,$lime_mode,$lime_template,$lime_endurl)"; $rs = $db->Execute($sql); @@ -179,6 +192,23 @@ $ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),
+
+