summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9a75791)
Added comments to cross link its value in both config files.
Added missing steward qualifer to a number of queries.
$this->t->set_var('assignment_data',$assignment_data);
// Create individual selection boxes
$this->t->set_var('assignment_data',$assignment_data);
// Create individual selection boxes
- $sql = "SELECT * FROM tc_individual";
+ $sql = "SELECT * FROM tc_individual WHERE steward='$this->default_stewardship'";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->t->set_block('par_view_t','header_list','list1');
$this->t->set_block('par_view_t','individual_list','list2');
$this->t->set_block('par_view_t','header_list','list1');
$this->t->set_block('par_view_t','individual_list','list2');
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual where steward='Elder' and valid=1";
+ $sql = "SELECT * FROM tc_individual where steward='$this->default_stewardship' and valid=1";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
}
$this->t->set_var('filter_input',$filter_input);
}
$this->t->set_var('filter_input',$filter_input);
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual where steward='Elder' and valid=1";
+ $sql = "SELECT * FROM tc_individual where steward='$this->default_stewardship' and valid=1";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
}
// create the individual id -> individual name mapping
}
// create the individual id -> individual name mapping
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual where valid=1 and steward='Elder' ORDER BY name ASC";
+ $sql = "SELECT * FROM tc_individual where valid=1 and steward='$this->default_stewardship' ORDER BY name ASC";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
$individual = NULL;
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
$individual = NULL;
$this->t->set_var('appt_table_width',$appt_table_width);
// PPI SCHEDULING TABLE
$this->t->set_var('appt_table_width',$appt_table_width);
// PPI SCHEDULING TABLE
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual AS ti JOIN tc_scheduling_priority AS tsp WHERE ti.scheduling_priority=tsp.scheduling_priority AND steward='Elder' AND valid=1 ORDER BY tsp.priority ASC, ti.name ASC";
+ $sql = "SELECT * FROM tc_individual AS ti JOIN tc_scheduling_priority AS tsp WHERE ti.scheduling_priority=tsp.scheduling_priority AND steward='$this->default_stewardship' AND valid=1 ORDER BY tsp.priority ASC, ti.name ASC";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
//print "year: $year month: $month quarter_start: $quarter_start quarter_end: $quarter_end<br>";
// create the individual id -> individual name mapping
//print "year: $year month: $month quarter_start: $quarter_start quarter_end: $quarter_end<br>";
// create the individual id -> individual name mapping
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual where steward='Elder' and valid=1 ORDER BY name ASC";
+ $sql = "SELECT * FROM tc_individual where steward='$this->default_stewardship' and valid=1 ORDER BY name ASC";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
$individual_data = NULL;
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
$individual_data = NULL;
$year = date('Y');
// create the family id -> family name mapping
$year = date('Y');
// create the family id -> family name mapping
- $sql = "SELECT * FROM tc_family AS tf JOIN tc_individual AS ti WHERE tf.individual=ti.individual AND tf.valid=1 AND tf.individual != 0 AND tf.companionship != 0 ORDER BY ti.name ASC";
+ $sql = "SELECT * FROM tc_family AS tf JOIN tc_individual AS ti WHERE tf.individual=ti.individual AND tf.valid=1 AND tf.individual != 0 AND tf.companionship != 0 AND ti.steward='$this->default_stewardship' ORDER BY ti.name ASC";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
$family_id = NULL;
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
$family_id = NULL;
$this->db->query("SELECT * FROM tc_family WHERE family='$family'",__LINE__,__FILE__);
if ($this->db->next_record()) {
$scheduling_priority = $this->db->f('scheduling_priority');
$this->db->query("SELECT * FROM tc_family WHERE family='$family'",__LINE__,__FILE__);
if ($this->db->next_record()) {
$scheduling_priority = $this->db->f('scheduling_priority');
- //$this->logToFile("vis_sched", "UPDATE tc_scheduling_priority SET priority='$visit_pri', notes=\"$visit_notes\" WHERE scheduling_priority='$scheduling_priority'");
$this->db2->query("UPDATE tc_scheduling_priority SET priority='$visit_pri', notes=\"$visit_notes\" WHERE scheduling_priority='$scheduling_priority'", __LINE__, __FILE__);
}
}
$this->db2->query("UPDATE tc_scheduling_priority SET priority='$visit_pri', notes=\"$visit_notes\" WHERE scheduling_priority='$scheduling_priority'", __LINE__, __FILE__);
}
}
// VISIT SCHEDULING TABLE
// VISIT SCHEDULING TABLE
- $sql = "SELECT * FROM tc_family AS tf JOIN (tc_scheduling_priority AS tsp, tc_individual as ti) WHERE tf.scheduling_priority=tsp.scheduling_priority AND tf.individual=ti.individual AND tf.valid=1 AND tf.individual != 0 AND tf.companionship != 0 ORDER BY tsp.priority ASC, ti.name ASC";
+ $sql = "SELECT * FROM tc_family AS tf JOIN (tc_scheduling_priority AS tsp, tc_individual as ti) WHERE tf.scheduling_priority=tsp.scheduling_priority AND tf.individual=ti.individual AND tf.valid=1 AND tf.individual != 0 AND tf.companionship != 0 AND ti.steward='$this->default_stewardship' ORDER BY tsp.priority ASC, ti.name ASC";
$this->db->query($sql,__LINE__,__FILE__);
$total_families=0; $families_with_yearly_visit=0;
$this->db->query($sql,__LINE__,__FILE__);
$total_families=0; $families_with_yearly_visit=0;
$this->t->set_var('district_number','*');
$this->t->set_var('district_name',$president_name);
$this->t->set_var('district_number','*');
$this->t->set_var('district_name',$president_name);
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual AS ti JOIN tc_scheduling_priority as tsp where ti.scheduling_priority=tsp.scheduling_priority and ti.steward='Elder' and ti.valid=1 ORDER BY ti.individual ASC";
+ $sql = "SELECT * FROM tc_individual AS ti JOIN tc_scheduling_priority as tsp where ti.scheduling_priority=tsp.scheduling_priority and ti.steward='$this->default_stewardship' and ti.valid=1 ORDER BY ti.individual ASC";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
for ($i=0; $i < count($visit_list); $i++) {
$this->nextmatchs->template_alternate_row_color(&$this->t);
for ($i=0; $i < count($visit_list); $i++) {
$this->nextmatchs->template_alternate_row_color(&$this->t);
- $sql = "SELECT * FROM tc_family AS tf JOIN tc_individual AS ti WHERE tf.individual=ti.individual AND tf.family=".$visit_list[$i]['family'];
+ $sql = "SELECT * FROM tc_family AS tf JOIN tc_individual AS ti WHERE tf.individual=ti.individual AND tf.family=".$visit_list[$i]['family']." AND ti.steward='$this->default_stewardship'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
}
// List the families that are available to record a visit against
}
// List the families that are available to record a visit against
- $sql = "SELECT * FROM tc_family AS tf JOIN tc_individual AS ti WHERE tf.individual=ti.individual AND tf.companionship != 0 and tf.valid=1";
+ $sql = "SELECT * FROM tc_family AS tf JOIN tc_individual AS ti WHERE tf.individual=ti.individual AND tf.companionship != 0 AND tf.valid=1 AND ti.steward='$this->default_stewardship'";
$this->db->query($sql,__LINE__,__FILE__);
$total_records = $this->db->num_rows();
$this->db->query($sql,__LINE__,__FILE__);
$total_records = $this->db->num_rows();
else if($current_month >= 7 && $current_month <= 9) { $current_month=9; }
else if($current_month >= 10 && $current_month <= 12) { $current_month=12; }
else if($current_month >= 7 && $current_month <= 9) { $current_month=9; }
else if($current_month >= 10 && $current_month <= 12) { $current_month=12; }
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual where steward='Elder' and valid=1";
+ $sql = "SELECT * FROM tc_individual where steward='$this->default_stewardship' and valid=1";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual where steward='Elder' and valid=1";
+ $sql = "SELECT * FROM tc_individual where steward='$this->default_stewardship' and valid=1";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
//Header('Location: ' . $take_me_to_url);
}
//Header('Location: ' . $take_me_to_url);
}
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual where steward='Elder' and valid=1 ORDER BY individual ASC";
+ $sql = "SELECT * FROM tc_individual where steward='$this->default_stewardship' and valid=1 ORDER BY individual ASC";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->t->pfp('out','admin_t');
$this->t->pfp('out','admin_t');
- // TODO: changed this so it picks the quorum dynamically
- $sql = "SELECT * FROM tc_individual where steward='Elder' and valid=1 ORDER BY individual ASC";
+ $sql = "SELECT * FROM tc_individual where steward='$this->default_stewardship' and valid=1 ORDER BY individual ASC";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
# This will prevent your settings from being overwritten by future code updates.
################################################################################
# This will prevent your settings from being overwritten by future code updates.
################################################################################
+# Set the default stewardship: "High Priest" or "Elder"
+# Remember to set this same variable in the tc_config file to the same value as well
+# EX: For an Elder's Quorum, stewardship should be set to "Elder"
+# EX: For a High Priest Group, stewardship should be set to "High Priest"
+$default_stewardship = "Elder";
+
# Database variables/settings/configuration
$dbname = "phpgroupware";
$dbhost = "192.168.0.4"; # This can be an IP address or name
# Database variables/settings/configuration
$dbname = "phpgroupware";
$dbhost = "192.168.0.4"; # This can be an IP address or name
# Set the default interview priority (1=highest 30=lowest)
$default_interview_pri = 30;
# Set the default interview priority (1=highest 30=lowest)
$default_interview_pri = 30;
-# Set the default stewardship: "High Priest" or "Elder"
-$default_stewardship = "Elder";
-
// This will prevent your settings from being overwritten by future code updates.
///////////////////////////////////////////////////////////////////////////////////
// This will prevent your settings from being overwritten by future code updates.
///////////////////////////////////////////////////////////////////////////////////
+// Set the default stewardship of this tool: "High Priest" or "Elder"
+// Remember to set this same variable in the db_config file to the same value as well
+// EX: For an Elder's Quorum, stewardship should be set to "Elder"
+// EX: For a High Priest Group, stewardship should be set to "High Priest"
+$this->default_stewardship = "Elder";
+
// The full path to a directory readable and writable by your webserver user
// that will be used to dump the MLS data uploaded via the web interface to.
$this->upload_target_path = "/home/users/pres/tc_data";
// The full path to a directory readable and writable by your webserver user
// that will be used to dump the MLS data uploaded via the web interface to.
$this->upload_target_path = "/home/users/pres/tc_data";