{
$elder_id[$i] = $this->db->f('elder');
$elder_name[$i] = $this->db->f('name');
+ $elder_phone[$elder_id[$i]] = $this->db->f('phone');
$i++;
}
array_multisort($elder_name, $elder_id);
while ($this->db->next_record())
{
// Get this companions information
- if($companion_table_entry != "") { $companion_table_entry .= " / "; }
+ if($companion_table_entry != "") { $companion_table_entry .= "<td> / </td>"; }
$companionship = $this->db->f('companionship');
$elder_id = $this->db->f('elder');
$aaronic_id = $this->db->f('aaronic');
+ $phone = $elder_phone[$elder_id];
if($elder_id) { $name = $elders[$elder_id]; }
else if($aaronic_id) { $name = $aaronic[$aaronic_id]['name']; }
- $companion_table_entry .= "$name";
+ $companion_table_entry .= "<td title=\"$phone\"><b>$name</b></td>";
}
- $table_data.= "<tr bgcolor=#d3dce3><td colspan=20><b>$companion_table_entry<hr></td></tr>";
+ $table_data.= "<tr bgcolor=#d3dce3><td colspan=20><table><tr>$companion_table_entry</tr></table><hr></td></tr>";
// Get the names of the families assigned this home teaching companionship
$sql = "SELECT * from eq_family where valid=1 AND companionship=".$unique_companionships[$j]['companionship'];
}
// Select all the unique companionship numbers for this district
- $sql = "SELECT distinct companionship FROM eq_companionship where district=". $district;
+ $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $district;
$this->db->query($sql,__LINE__,__FILE__);
$j=0; $unique_companionships='';
while ($this->db->next_record())
$j++;
}
- $comp_width=300; $visit_width=25; $table_width=$comp_width + $num_months*$visit_width;
+ $comp_width=300; $visit_width=25; $table_width=$comp_width + $visit_width;
$table_data=""; $num_companionships = 0; $num_families = 0; $visits=0;
for ($j=0; $j < count($unique_companionships); $j++) {
$companion_table_entry = "";