status != "Not Started" && $task->status != "In Progress" && $task->status != "Pending Input") { $history_list[] = Array('name' => $task->name, 'id' => $task->id, 'type' => "Task", 'module' => "Activities", 'status' => $task->status, 'parent_id' => $task->parent_id, 'parent_type' => $task->parent_type, 'parent_name' => $task->parent_name, 'contact_id' => $task->contact_id, 'contact_name' => $task->contact_name, 'date_modified' => $task->date_modified ); } else { if ($task->date_due == '0000-00-00') $date_due = ''; else $date_due = $task->date_due; $open_activity_list[] = Array('name' => $task->name, 'id' => $task->id, 'type' => "Task", 'module' => "Activities", 'status' => $task->status, 'parent_id' => $task->parent_id, 'parent_type' => $task->parent_type, 'parent_name' => $task->parent_name, 'contact_id' => $task->contact_id, 'contact_name' => $task->contact_name, 'date_due' => $date_due ); } } foreach ($focus_meetings_list as $meeting) { if ($meeting->status != "Planned") { $history_list[] = Array('name' => $meeting->name, 'id' => $meeting->id, 'type' => "Meeting", 'module' => "Meetings", 'status' => $meeting->status, 'parent_id' => $meeting->parent_id, 'parent_type' => $meeting->parent_type, 'parent_name' => $meeting->parent_name, 'contact_id' => $meeting->contact_id, 'contact_name' => $meeting->contact_name, 'date_modified' => $meeting->date_modified ); } else { $open_activity_list[] = Array('name' => $meeting->name, 'id' => $meeting->id, 'type' => "Meeting", 'module' => "Meetings", 'status' => $meeting->status, 'parent_id' => $meeting->parent_id, 'parent_type' => $meeting->parent_type, 'parent_name' => $meeting->parent_name, 'contact_id' => $meeting->contact_id, 'contact_name' => $meeting->contact_name, 'date_due' => $meeting->date_start ); } } foreach ($focus_calls_list as $call) { if ($call->status != "Planned") { $history_list[] = Array('name' => $call->name, 'id' => $call->id, 'type' => "Call", 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_modified' => $call->date_modified ); } else { $open_activity_list[] = Array('name' => $call->name, 'id' => $call->id, 'type' => "Call", 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_due' => $call->date_start ); } } foreach ($focus_emails_list as $email) { $history_list[] = Array('name' => $email->name, 'id' => $email->id, 'type' => "Email", 'module' => "Emails", 'status' => '', 'parent_id' => $email->parent_id, 'parent_type' => $email->parent_type, 'parent_name' => $email->parent_name, 'contact_id' => $email->contact_id, 'contact_name' => $email->contact_name, 'date_modified' => $email->date_modified ); } foreach ($focus_notes_list as $note) { $history_list[] = Array('name' => $note->name, 'id' => $note->id, 'type' => "Note", 'module' => "Notes", 'status' => '', 'parent_id' => $note->parent_id, 'parent_type' => $note->parent_type, 'parent_name' => $note->parent_name, 'contact_id' => $note->contact_id, 'contact_name' => $note->contact_name, 'date_modified' => $note->date_modified ); } if ($currentModule == 'Contacts' || $currentModule == 'Leads') { $xtpl=new XTemplate ('modules/Activities/SubPanelViewContacts.html'); $xtpl->assign("CONTACT_ID", $focus->id); } else $xtpl=new XTemplate ('modules/Activities/SubPanelView.html'); $xtpl->assign("MOD", $current_module_strings); $xtpl->assign("APP", $app_strings); $button = "