$this->db->query("UPDATE tc_activity set " .
" assignment='" . $activity['assignment'] .
"', date='" . $activity['date'] . "'" .
$this->db->query("UPDATE tc_activity set " .
" assignment='" . $activity['assignment'] .
"', date='" . $activity['date'] . "'" .
" WHERE activity=" . $activity['activity'],__LINE__,__FILE__);
// Delete all the individuals who have particiapted in this activity
" WHERE activity=" . $activity['activity'],__LINE__,__FILE__);
// Delete all the individuals who have particiapted in this activity
$activity['notes']= get_var('notes',array('POST'));
$this->db->query("INSERT INTO tc_activity (assignment,date,notes) " .
"VALUES ('" . $activity['assignment'] . "','" .
$activity['notes']= get_var('notes',array('POST'));
$this->db->query("INSERT INTO tc_activity (assignment,date,notes) " .
"VALUES ('" . $activity['assignment'] . "','" .
- $activity['date'] . "','" . $activity['notes'] . "')",__LINE__,__FILE__);
+ $activity['date'] . "',\"" . $activity['notes'] . "\")",__LINE__,__FILE__);
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->next_record()) {
//print "activity: " . $this->db->f('activity') . "<br>";
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->next_record()) {
//print "activity: " . $this->db->f('activity') . "<br>";
// If this individual has had a yearly PPI this year, don't show him on the schedule list
$year_start = $year - 1 . "-12-31"; $year_end = $year + 1 . "-01-01";
$sql = "SELECT * FROM tc_interview WHERE date > '$year_start' AND date < '$year_end' ".
// If this individual has had a yearly PPI this year, don't show him on the schedule list
$year_start = $year - 1 . "-12-31"; $year_end = $year + 1 . "-01-01";
$sql = "SELECT * FROM tc_interview WHERE date > '$year_start' AND date < '$year_end' ".
$this->db2->query($sql,__LINE__,__FILE__);
if(!$this->db2->next_record()) {
$this->db2->query($sql,__LINE__,__FILE__);
if(!$this->db2->next_record()) {
$supervisor_last_name = $supervisor_array[0];
$sql = "SELECT * FROM tc_individual where individual='$supervisor'";
$this->db2->query($sql,__LINE__,__FILE__);
$supervisor_last_name = $supervisor_array[0];
$sql = "SELECT * FROM tc_individual where individual='$supervisor'";
$this->db2->query($sql,__LINE__,__FILE__);
- if($this->db2->next_record()) {
- $mls_id = $this->db2->f('mls_id');
- }
- $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'";
- $this->db2->query($sql,__LINE__,__FILE__);
$hti_pri = $entry['pri'];
//print "hti_notes: $hti_notes indiv_name: $indiv_name <Br>";
// Perform database save actions here
$hti_pri = $entry['pri'];
//print "hti_notes: $hti_notes indiv_name: $indiv_name <Br>";
// Perform database save actions here
- $this->db->query("SELECT * FROM tc_companionship WHERE individual=$individual and valid=1",__LINE__,__FILE__);
+ $this->db->query("SELECT * FROM tc_companion WHERE individual=$individual and valid=1",__LINE__,__FILE__);
if ($this->db->next_record()) {
$scheduling_priority = $this->db->f('scheduling_priority');
//$this->logToFile("int_sched", "UPDATE tc_scheduling_priority SET priority='$hti_pri', notes=\"$hti_notes\" WHERE scheduling_priority='$scheduling_priority'");
if ($this->db->next_record()) {
$scheduling_priority = $this->db->f('scheduling_priority');
//$this->logToFile("int_sched", "UPDATE tc_scheduling_priority SET priority='$hti_pri', notes=\"$hti_notes\" WHERE scheduling_priority='$scheduling_priority'");
$supervisor_last_name = $supervisor_array[0];
$sql = "SELECT * FROM tc_individual where individual='$supervisor'";
$this->db2->query($sql,__LINE__,__FILE__);
$supervisor_last_name = $supervisor_array[0];
$sql = "SELECT * FROM tc_individual where individual='$supervisor'";
$this->db2->query($sql,__LINE__,__FILE__);
- if($this->db2->next_record()) {
- $mls_id = $this->db2->f('mls_id');
- }
- $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'";
- $this->db2->query($sql,__LINE__,__FILE__);
$this->db2->query($sql,__LINE__,__FILE__);
if(!$this->db2->next_record()) {
$this->db2->query($sql,__LINE__,__FILE__);
if(!$this->db2->next_record()) {
$this->db3->query($sql,__LINE__,__FILE__);
if($this->db3->next_record()) {
$date = $this->db3->f('date');
$this->db3->query($sql,__LINE__,__FILE__);
if($this->db3->next_record()) {
$date = $this->db3->f('date');
$year = date('Y') - $m;
$year_start = $year - 1 . "-12-31"; $year_end = $year + 1 . "-01-01";
$sql = "SELECT * FROM tc_interview WHERE date > '$year_start' AND date < '$year_end' ".
$year = date('Y') - $m;
$year_start = $year - 1 . "-12-31"; $year_end = $year + 1 . "-01-01";
$sql = "SELECT * FROM tc_interview WHERE date > '$year_start' AND date < '$year_end' ".
$this->db2->query($sql,__LINE__,__FILE__);
if(!$total_ppis[$m]) { $total_ppis[$m] = 0; }
$this->db2->query($sql,__LINE__,__FILE__);
if(!$total_ppis[$m]) { $total_ppis[$m] = 0; }
$indiv = $this->db2->f('individual');
$interviewer_name = $this->db2->f('name');
if($indiv == $interviewer) {
$indiv = $this->db2->f('individual');
$interviewer_name = $this->db2->f('name');
if($indiv == $interviewer) {
$this->t->set_var('interviewer_name',$interviewer_name);
$this->t->set_var('eqpresppi_checked','checked');
$this->t->fp('int_list','interviewer_list',True);
}
$this->t->set_var('interviewer_name',$interviewer_name);
$this->t->set_var('eqpresppi_checked','checked');
$this->t->fp('int_list','interviewer_list',True);
}
if($action == 'save') {
$notes = get_var('notes',array('POST'));
$this->db->query("UPDATE tc_interview set " .
if($action == 'save') {
$notes = get_var('notes',array('POST'));
$this->db->query("UPDATE tc_interview set " .
", interviewer='" . $interviewer . "'" .
", individual='" . $individual . "'" .
", date='" . $date . "'" .
", interviewer='" . $interviewer . "'" .
", individual='" . $individual . "'" .
", date='" . $date . "'" .
", interview_type='" . $interview_type . "'" .
" WHERE interview=" . $interview,__LINE__,__FILE__);
$this->ppi_view();
", interview_type='" . $interview_type . "'" .
" WHERE interview=" . $interview,__LINE__,__FILE__);
$this->ppi_view();
$notes = get_var('notes',array('POST'));
$this->db->query("INSERT INTO tc_interview (interviewer,individual,date,notes,interview_type) " .
"VALUES ('" . $interviewer . "','" . $individual . "','" .
$notes = get_var('notes',array('POST'));
$this->db->query("INSERT INTO tc_interview (interviewer,individual,date,notes,interview_type) " .
"VALUES ('" . $interviewer . "','" . $individual . "','" .
- $date . "','" . $notes . "','" . $interview_type ."')",__LINE__,__FILE__);
+ $date . "',\"" . $notes . "\",'" . $interview_type ."')",__LINE__,__FILE__);
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
$this->t->set_var('interview',$interview);
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
$this->t->set_var('interview',$interview);
$month_end = "$year"."-"."$month"."-"."31";
$month = "$month"."/"."$year";
$sql = "SELECT * FROM tc_interview WHERE date >= '$month_start' AND date <= '$month_end' ".
$month_end = "$year"."-"."$month"."-"."31";
$month = "$month"."/"."$year";
$sql = "SELECT * FROM tc_interview WHERE date >= '$month_start' AND date <= '$month_end' ".
$this->db2->query($sql,__LINE__,__FILE__);
$header_row .= "<th width=$int_width><font size=-2>$month</th>";
$this->db2->query($sql,__LINE__,__FILE__);
$header_row .= "<th width=$int_width><font size=-2>$month</th>";
$indiv = $this->db2->f('individual');
$interviewer_name = $this->db2->f('name');
if($indiv == $interviewer) {
$indiv = $this->db2->f('individual');
$interviewer_name = $this->db2->f('name');
if($indiv == $interviewer) {
}
$this->t->set_var('interviewer_name',$interviewer_name);
$this->t->fp('int_list','interviewer_list',True);
}
$this->t->set_var('interviewer_name',$interviewer_name);
$this->t->fp('int_list','interviewer_list',True);
", interviewer='" . $interviewer . "'" .
", individual='" . $individual . "'" .
", date='" . $date . "'" .
", interviewer='" . $interviewer . "'" .
", individual='" . $individual . "'" .
", date='" . $date . "'" .
", interview_type='" . $interview_type . "'" .
" WHERE interview=" . $interview,__LINE__,__FILE__);
$this->int_view();
", interview_type='" . $interview_type . "'" .
" WHERE interview=" . $interview,__LINE__,__FILE__);
$this->int_view();
$notes = get_var('notes',array('POST'));
$this->db->query("INSERT INTO tc_interview (interviewer,individual,date,notes,interview_type) " .
"VALUES ('" . $interviewer . "','" . $individual . "','" .
$notes = get_var('notes',array('POST'));
$this->db->query("INSERT INTO tc_interview (interviewer,individual,date,notes,interview_type) " .
"VALUES ('" . $interviewer . "','" . $individual . "','" .
- $date . "','" . $notes ."','" . $interview_type . "')",__LINE__,__FILE__);
+ $date . "',\"" . $notes ."\",'" . $interview_type . "')",__LINE__,__FILE__);
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
$this->t->set_var('interview',$interview);
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
$this->t->set_var('interview',$interview);
$notes = get_var('notes',array('POST'));
$this->db->query("UPDATE tc_visit set " .
" date='" . $date . "'" .
$notes = get_var('notes',array('POST'));
$this->db->query("UPDATE tc_visit set " .
" date='" . $date . "'" .
$notes = get_var('notes',array('POST'));
$this->db->query("INSERT INTO tc_visit (family,companionship,date,notes) " .
"VALUES ('" . $family . "','" . $companionship . "','" .
$notes = get_var('notes',array('POST'));
$this->db->query("INSERT INTO tc_visit (family,companionship,date,notes) " .
"VALUES ('" . $family . "','" . $companionship . "','" .
- $date . "','" . $notes . "')",__LINE__,__FILE__);
+ $date . "',\"" . $notes . "\")",__LINE__,__FILE__);
$this->t->set_var('schedule_ppi_link',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.ppi_sched'));
$this->t->set_var('schedule_ppi_link_title','Schedule Yearly PPIs');
$this->t->set_var('schedule_ppi_link',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.ppi_sched'));
$this->t->set_var('schedule_ppi_link_title','Schedule Yearly PPIs');
$table_width=$date_width + $time_width + $indiv_width + $family_width + $location_width;
$header_row = "<th width=$date_width><font size=-2>Date</th>";
$header_row.= "<th width=$time_width><font size=-2>Time</th>";
$table_width=$date_width + $time_width + $indiv_width + $family_width + $location_width;
$header_row = "<th width=$date_width><font size=-2>Date</th>";
$header_row.= "<th width=$time_width><font size=-2>Time</th>";
$presidency_data[$i]['name'] = $this->db->f('name');
$presidency_data[$i]['indiv'] = $this->db->f('individual');
$presidency2name[$presidency_data[$i]['id']] = $presidency_data[$i]['name'];
$presidency_data[$i]['name'] = $this->db->f('name');
$presidency_data[$i]['indiv'] = $this->db->f('individual');
$presidency2name[$presidency_data[$i]['id']] = $presidency_data[$i]['name'];
} else if($indiv > 0) {
$supervisor_name_array = explode(",",$presidency2name[$presidency]);
$supervisor_last_name = $supervisor_name_array[0];
} else if($indiv > 0) {
$supervisor_name_array = explode(",",$presidency2name[$presidency]);
$supervisor_last_name = $supervisor_name_array[0];
$sql = "SELECT * FROM tc_individual where individual='$presidency2indiv[$presidency]'";
$this->db2->query($sql,__LINE__,__FILE__);
$sql = "SELECT * FROM tc_individual where individual='$presidency2indiv[$presidency]'";
$this->db2->query($sql,__LINE__,__FILE__);
- if($this->db2->next_record()) {
- $mls_id = $this->db2->f('mls_id');
- }
- $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'";
- $this->db2->query($sql,__LINE__,__FILE__);
$supervisor_last_name = $supervisor_name_array[0];
$sql = "SELECT * FROM tc_individual where individual='$presidency2indiv[$presidency]'";
$this->db2->query($sql,__LINE__,__FILE__);
$supervisor_last_name = $supervisor_name_array[0];
$sql = "SELECT * FROM tc_individual where individual='$presidency2indiv[$presidency]'";
$this->db2->query($sql,__LINE__,__FILE__);
- if($this->db2->next_record()) {
- $mls_id = $this->db2->f('mls_id');
- }
- $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'";
- $this->db2->query($sql,__LINE__,__FILE__);
$dtstart = gmdate("Ymd"."\T"."His"."\Z", mktime($hour,$minute,$seconds,$month,$day,$year));
$dtstartstr = date("l, F d, o g:i A", mktime($hour,$minute,$seconds,$month,$day,$year));
$dtstart = gmdate("Ymd"."\T"."His"."\Z", mktime($hour,$minute,$seconds,$month,$day,$year));
$dtstartstr = date("l, F d, o g:i A", mktime($hour,$minute,$seconds,$month,$day,$year));
$this->db2->query($sql,__LINE__,__FILE__);
if($this->db2->next_record()) {
$this->db2->query($sql,__LINE__,__FILE__);
if($this->db2->next_record()) {