diff --git a/client/index.php b/client/index.php index c3b0728c..3e3ab9ca 100644 --- a/client/index.php +++ b/client/index.php @@ -41,7 +41,7 @@ include_once(dirname(__FILE__).'/../db.inc.php'); /** * Authentication */ -include ("auth-client.php"); +require ("auth-client.php"); /** @@ -62,11 +62,11 @@ include ("../functions/functions.client.php"); $client_id = get_client_id(); -xhtml_head(T_("Questionnaire Outcomes"),true,array("css/table.css")); +xhtml_head(T_("Questionnaire Outcomes"),true,array("../include/bootstrap/css/bootstrap.min.css", "../css/custom.css")); if ($client_id) { - $sql = "SELECT q.questionnaire_id,q.description + $sql = "SELECT q.questionnaire_id,q.description,q.lime_sid FROM questionnaire as q, client_questionnaire as cq WHERE cq.questionnaire_id = q.questionnaire_id AND q.enabled = 1 @@ -75,14 +75,17 @@ if ($client_id) $qs = $db->GetAll($sql); if (empty($qs)) - print "

" . T_("There are no questionnaires assigned to you") . "

"; + print "

" . T_("There are no questionnaires assigned to you") . "

"; else { + print "
"; + foreach($qs as $q) { - print "

{$q['description']}

"; + print "

{$q['description']}

"; $questionnaire_id = $q['questionnaire_id']; + $qsid=$q['lime_sid']; $sql = "SELECT o.calc, count( c.case_id ) FROM `case` AS c, `outcome` AS o @@ -91,15 +94,15 @@ if ($client_id) GROUP BY o.calc"; $a = $db->GetAssoc($sql); + $a = aapor_clean($a); - - print ""; + print "
" . T_("Outcome") . "" . T_("Rate") . "
"; print ""; print ""; print ""; print ""; - print "
" . T_("Outcome") . "" . T_("Rate") . "
" . T_("Response Rate 1") . "" . round(aapor_rr1($a),2) . "
" . T_("Refusal Rate 1") . "" . round(aapor_ref1($a),2) . "
" . T_("Cooperation Rate 1") . "" . round(aapor_coop1($a),2) . "
" . T_("Contact Rate 1") . "" . round(aapor_con1($a),2) . "
"; + print "
"; $sql = "SELECT o.description as des, o.outcome_id, count( c.case_id ) as count @@ -115,20 +118,24 @@ if ($client_id) translate_array($rs,array("des")); xhtml_table($rs,array("des","count"),array(T_("Outcome"),T_("Count")),"tclass",array("des" => "Complete")); } - else - print "

" . T_("No outcomes recorded for this questionnaire") . "

"; - + else print "

" . T_("No outcomes recorded for this questionnaire") . "

"; + + print "
" . T_("Lime results") . "
"; } + + $page =''; if (isset($_GET['page'])) $page = $_GET['page'] . "?action=browse&sid=$qsid"; +?> +
+ +
+ +
+" . T_("You are not a valid client") . "

"; - - + print "

" . T_("You are not a valid client") . "

"; xhtml_foot(); diff --git a/css/custom.css b/css/custom.css index 8dc3463f..9e2441bd 100644 --- a/css/custom.css +++ b/css/custom.css @@ -74,4 +74,8 @@ text-shadow: 1px 2px 1px #ababab; .h1, .h2, .h3, h1, h2, h3 { margin-bottom: 0.4em; margin-top: 0.25em; +} +.full { + width:100%; + height:100%; } \ No newline at end of file