- $appointment = $this->db->f('appointment');
- $indiv = $this->db->f('individual');
- $location = $this->db->f('location');
- if(($location == "") && ($indiv > 0)) { $location = "$president_last_name"." home ($president_address)"; }
+ $presidency_name = $this->db->f('name');
+ $presidency_name_array = explode(",",$presidency_name);
+ $presidency_last_name = $presidency_name_array[0];
+ $presidency_id = $this->db->f('presidency');
+ $presidency_address = $this->db->f('address');
+ $presidency_location = "$presidency_last_name"." home ($presidency_address)";
+ $appt_table_data = "";
+
+ // Display a scheduling table for this presidency member
+ $district_number = '*';
+ $district_name = $presidency_name;
+ $table_title = "District ".$district_number.": ".$district_name.": All indivs with Yearly PPI Not Completed";
+ $appt_table_title = "District ".$district_number.": ".$district_name.": Yearly PPI Appointment Slots";
+ $this->t->set_var('table_title',$table_title);
+ $this->t->set_var('appt_table_title',$appt_table_title);
+
+ // query the database for all the appointments
+ $sql = "SELECT * FROM tc_appointment where presidency=".$presidency_id." and date>=CURDATE() ORDER BY date ASC, time ASC";
+ $this->db2->query($sql,__LINE__,__FILE__);
+
+ while ($this->db2->next_record()) {
+ $appointment = $this->db2->f('appointment');
+ $indiv = $this->db2->f('individual');
+ $location = $this->db2->f('location');
+ if(($location == "") && ($indiv > 0)) { $location = $presidency_location; }