diff --git a/admin/clientquestionnaire.php b/admin/clientquestionnaire.php index d2a2372d..58384ad5 100644 --- a/admin/clientquestionnaire.php +++ b/admin/clientquestionnaire.php @@ -62,8 +62,10 @@ function vq($client_id,$questionnaire_id) $vq = $db->Execute($sql); - return $vq->RecordCount(); - + if ($vq) + return $vq->RecordCount(); + else + return 0; } /** diff --git a/admin/new.php b/admin/new.php index c832164c..bac360ff 100644 --- a/admin/new.php +++ b/admin/new.php @@ -55,7 +55,7 @@ include("../functions/functions.input.php"); global $ldb; global $db; -xhtml_head(T_("New: Create new questionnaire")); +xhtml_head(T_("New: Create new questionnaire"),true,false,array("../js/new.js")); if (isset($_POST['import_file'])) { @@ -139,13 +139,15 @@ foreach($surveys as $s)
echo T_("Restrict appointments to shifts?"); ?>
echo T_("Restrict work to shifts?"); ?>
echo T_("Questionnaire for testing only?"); ?>
-echo T_("Use respondent selection text?"); ?>
-echo T_("Respondent selection introduction:"); ?>
-echo T_("Respondent selection project introduction:"); ?>
-echo T_("Respondent selection project end:"); ?>
-echo T_("Respondent selection callback (already started questionnaire):"); ?>
-echo T_("Message to leave on an answering machine:"); ?>
- +echo T_("Use respondent selection text?"); ?>
+echo T_("Respondent selection introduction:"); ?>
+echo T_("Respondent selection project introduction:"); ?>
+echo T_("Respondent selection project end:"); ?>
+echo T_("Respondent selection callback (already started questionnaire):"); ?>
+echo T_("Message to leave on an answering machine:"); ?>
+"/>
xhtml_foot(); diff --git a/admin/operatorquestionnaire.php b/admin/operatorquestionnaire.php index f43b2c80..170791aa 100644 --- a/admin/operatorquestionnaire.php +++ b/admin/operatorquestionnaire.php @@ -62,8 +62,10 @@ function vq($operator_id,$questionnaire_id) $vq = $db->Execute($sql); - return $vq->RecordCount(); - + if ($vq) + return $vq->RecordCount(); + else + return 0; } /** diff --git a/admin/operatorskill.php b/admin/operatorskill.php index 71592e86..1da0f6d7 100644 --- a/admin/operatorskill.php +++ b/admin/operatorskill.php @@ -62,8 +62,10 @@ function vq($operator_id,$outcome_type_id) $vq = $db->Execute($sql); - return $vq->RecordCount(); - + if ($vq) + return $vq->RecordCount(); + else + return 0; } /** diff --git a/functions/functions.calendar.php b/functions/functions.calendar.php index e24f6b95..2393f932 100644 --- a/functions/functions.calendar.php +++ b/functions/functions.calendar.php @@ -496,7 +496,7 @@ function display_calendar($respondent_id, $questionnaire_id, $year = false, $mon AND MONTH(CONVERT_TZ(s.start,'UTC',r.Time_zone_name)) = '{$Day->thisMonth()}' AND YEAR(CONVERT_TZ(s.start,'UTC',r.Time_zone_name)) = '{$Day->thisYear()}'"); - if ($rs->RecordCount() == 0) + if (!empty($rs) && $rs->RecordCount() == 0) { echo ( "