X-Git-Url: http://git.pippins.net/embedvideo/.git/%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%01%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%0F%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD?a=blobdiff_plain;f=inc%2Fclass.tc.inc.php;h=07c0b0e06e97ea6d00a60d641be19ebe2df4867c;hb=868fb3cf0a52bd6d4f613c30e40f75ad35fde4b3;hp=9f3e12ca3c2b25eb6fc140c506b42d23d4ea753b;hpb=cdf97a969659bdd67bf33e61b5ccf7ae042938fd;p=eq%2F.git
diff --git a/inc/class.tc.inc.php b/inc/class.tc.inc.php
index 9f3e12c..07c0b0e 100644
--- a/inc/class.tc.inc.php
+++ b/inc/class.tc.inc.php
@@ -200,11 +200,11 @@ class tc
$i++;
}
- $sql = "SELECT * FROM tc_individual where valid=1 ORDER BY indiv ASC";
+ $sql = "SELECT * FROM tc_individual where valid=1 ORDER BY individual ASC";
$this->db->query($sql,__LINE__,__FILE__);
$i=0;
while ($this->db->next_record()) {
- $individual[$i] = $this->db->f('indiv');
+ $individual[$i] = $this->db->f('individual');
$indiv_name[$i] = $this->db->f('name');
$indiv_phone[$individual[$i]] = $this->db->f('phone');
$i++;
@@ -250,7 +250,7 @@ class tc
// Get this companions information
if($companion_table_entry != "") { $companion_table_entry .= "
$assignment_name | ";
$header_row="Assignments | Willingness | ";
- $sql = "SELECT * FROM tc_willingness WHERE indiv=".$individual." AND assignment=".$assignment;
+ $sql = "SELECT * FROM tc_willingness WHERE individual=".$individual." AND assignment=".$assignment;
$this->db2->query($sql,__LINE__,__FILE__);
$value = $assignment;
@@ -1325,7 +1325,7 @@ class tc
function ppi_sched()
{
$this->t->set_file(array('ppi_sched_t' => 'ppi_sched.tpl'));
- $this->t->set_block('ppi_sched_t','indiv_list','indivlist');
+ $this->t->set_block('ppi_sched_t','individual_list','indivlist');
$this->t->set_block('ppi_sched_t','appt_list','apptlist');
$action = get_var('action',array('GET','POST'));
@@ -1359,17 +1359,17 @@ class tc
$president_name = $this->db->f('name');
$president_name_array = explode(",",$president_name);
$president_last_name = $president_name_array[0];
- $president_id = $this->db->f('indiv');
+ $president_id = $this->db->f('individual');
$presidency_id = $this->db->f('presidency');
- $interviewer = $this->db->f('indiv');
+ $interviewer = $this->db->f('individual');
$district_number = '*';
$district_name = $president_name;
- $sql = "SELECT * FROM tc_individual where indiv='$president_id'";
+ $sql = "SELECT * FROM tc_individual where individual='$president_id'";
$this->db2->query($sql,__LINE__,__FILE__);
if($this->db2->next_record()) {
- $mls_indiv_id = $this->db2->f('mls_indiv_id');
+ $mls_id = $this->db2->f('mls_id');
}
- $sql = "SELECT * FROM tc_individual where mls_indiv_id='$mls_indiv_id'";
+ $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'";
$this->db2->query($sql,__LINE__,__FILE__);
if($this->db2->next_record()) {
$president_address = $this->db2->f('address');
@@ -1384,19 +1384,19 @@ class tc
$new_data = get_var('appt_notes',array('POST'));
if($new_data != "") {
foreach ($new_data as $entry) {
- $indiv = $entry['indiv'];
+ $indiv = $entry['individual'];
$appointment = $entry['appointment'];
$location = $entry['location'];
if($location == "") { $location = "$president_last_name"." home ($president_address)"; }
if($indiv == 0) { $location = ""; }
//Only perform a database update if we have made a change to this appointment
- $sql = "SELECT * FROM tc_appointment where appointment='$appointment' and indiv='$indiv' and location='$location'";
+ $sql = "SELECT * FROM tc_appointment where appointment='$appointment' and individual='$indiv' and location='$location'";
$this->db->query($sql,__LINE__,__FILE__);
if(!$this->db->next_record()) {
// Perform database save actions here
$this->db->query("UPDATE tc_appointment set " .
- " indiv='" . $indiv . "'" .
+ " individual='" . $indiv . "'" .
",location='" . $location . "'" .
" WHERE appointment=" . $appointment,__LINE__,__FILE__);
// Email the appointment
@@ -1406,17 +1406,27 @@ class tc
}
// Save any changes made to the ppi notes table
- $new_data = get_var('ppi_notes',array('POST'));
+ $new_data = get_var('notes',array('POST'));
foreach ($new_data as $entry) {
- $ppi_notes = $entry['notes'];
+ $notes = $entry['notes'];
$individual = $entry['individual'];
- $ppi_pri = $entry['pri'];
+ $priority = $entry['pri'];
// Perform database save actions here
+ $sql = "SELECT * FROM tc_individual WHERE individual='$individual'";
+ $this->db->query($sql,__LINE__,__FILE__);
+ if ($this->db->next_record()) {
+ $scheduling_priority = $this->db->f('scheduling_priority');
+ $this->db2->query("UPDATE tc_scheduling_priority SET priority='$priority' AND notes=\"$notes\" WHERE scheduling_priority='$scheduling_priority'", __LINE__, __FILE__);
+ }
+
+/*
$this->db->query("UPDATE tc_individual set " .
- " ppi_notes='" . $ppi_notes . "'" .
- ",ppi_pri='" . $ppi_pri . "'" .
- " WHERE indiv=" . $individual,__LINE__,__FILE__);
+ " notes='" . $notes . "'" .
+ ",priority='" . $priority . "'" .
+ " WHERE individual=" . $individual,__LINE__,__FILE__);
+*/
+
}
@@ -1433,7 +1443,7 @@ class tc
$indiv_name = NULL;
while ($this->db->next_record()) {
$indiv_name[$i] = $this->db->f('name');
- $individual[$i] = $this->db->f('indiv');
+ $individual[$i] = $this->db->f('individual');
$i++;
}
array_multisort($indiv_name, $individual);
@@ -1462,7 +1472,7 @@ class tc
while ($this->db->next_record()) {
$appointment = $this->db->f('appointment');
- $indiv = $this->db->f('indiv');
+ $indiv = $this->db->f('individual');
$location = $this->db->f('location');
if(($location == "") && ($indiv > 0)) { $location = "$president_last_name"." home ($president_address)"; }
@@ -1479,7 +1489,7 @@ class tc
$appt_table_data.= "$day_string | ";
$appt_table_data.= "$time_string | ";
- $appt_table_data.= ' |
---|