public function get_county_email($county_id) { !isset($county_id) ? exit : null; // added function on user $county = Districts::get_county_id($county_id); $county_email = Users::get_county_details($county[0]['county']); if ($this->test_mode) { return null; } //check to ensure the demo site wount start looking for county admin if ($county[0]['county'] == 1) { return 'kelvinmwas@gmail.com,'; } else { if (count($county_email) > 0) { return $county_email[0]['email'] . ','; } else { return ""; } } }
<?php $attributes = array('name' => 'myform', 'id' => 'myform'); foreach ($facilities as $facility) { $facility_name = $facility['facility_name']; $district = $facility['district']; $county_id = Districts::get_county_id($district); $district_name = Districts::get_district_name($district); $county_name = Counties::get_county_name($county_id['county']); } $facility_code = $this->session->userdata('facility_id'); $fname = $this->session->userdata('fname'); $lname = $this->session->userdata('lname'); $username = $fname . ' ' . $lname; ?> <div style="width: 65%; margin-left: auto; margin-right: auto; font-size: 14px;"> <div id="dialog-form" title="Enter the evaluation information here."> <h4>Kindly provide information in all the fields indicated for proper analysis and assessment to be performed. This evaluation will take at least 15 minutes.</h4> <form> <table id="eval" width="100%" class="table table-bordered"> <input type="hidden" name="facility_name" colspan = "3" style = "color:#000; border:none" value="<?php echo $facility_name; ?> "></td> <input type="hidden" name="facility_code" colspan = "2" style = "color:#000; border:none" value="<?php echo $facility_code; ?> "></td> <input type="hidden" name="district_name" colspan = "2" style = "color:#000; border:none" value="<?php echo $district; ?>