$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()) {
$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; }
", 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>";
", 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__);
$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));
- $sql = "SELECT tp.email AS email, ti.name AS name FROM tc_presidency AS tp JOIN tc_individual AS ti WHERE tp.individual=ti.individual AND tp.presidency='$presidency'";
+ $sql = "SELECT tp.email AS email1, ti.email AS email2, ti.name AS name FROM tc_presidency AS tp JOIN tc_individual AS ti WHERE tp.individual=ti.individual AND tp.presidency='$presidency'";
$this->db2->query($sql,__LINE__,__FILE__);
if($this->db2->next_record()) {
$this->db2->query($sql,__LINE__,__FILE__);
if($this->db2->next_record()) {