function parse_message_shortcodes($message) { switch ($this->module) { case 'timesheet': $find = array('[first_name]', '[last_name]', '[email]', '[manager_first_name]', '[manager_last_name]', '[period_start]', '[period_end]', '[chargable_hours]', '[holiday]', '[unpaid_time_off]', '[personal_time]', '[total_hours]', '[vacation]', '[sicktime]', '[birthday]', '[other]', '[date_created]'); $replace = array($this->user->meta['first_name'], $this->user->meta['last_name'], $this->user->user_email, $this->manager->meta['first_name'], $this->manager->meta['last_name'], date_for_display($this->data['period_start']), date_for_display($this->data['period_end']), $this->data['chargable_hours'], $this->data['holiday'], $this->data['unpaid_time_off'], $this->data['personal_time'], $this->data['total_hours'], $this->data['vacation'], $this->data['sicktime'], $this->data['birthday'], $this->data['other'], date_for_display($this->data['date_created'])); break; case 'timeoff': $find = array('[first_name]', '[last_name]', '[email]', '[manager_first_name]', '[manager_last_name]', '[current_status]', '[request_type]', '[combination]', '[days_or_hours]', '[request_start]', '[request_end]', '[comments]', '[date_created]'); $replace = array($this->user->meta['first_name'], $this->user->meta['last_name'], $this->user->user_email, $this->manager->meta['first_name'], $this->manager->meta['last_name'], $this->data['current_status'], $this->data['request_type'], $this->data['combination'], $this->data['days_or_hours'], date_for_display($this->data['request_start']), date_for_display($this->data['request_end']), $this->data['comments'], date_for_display($this->data['date_created'])); break; case 'travel': $find = array('[first_name]', '[last_name]', '[email]', '[manager_first_name]', '[manager_last_name]', '[current_status]', '[month_of]', '[date_created]'); $replace = array($this->user->meta['first_name'], $this->user->meta['last_name'], $this->user->user_email, $this->manager->meta['first_name'], $this->manager->meta['last_name'], $this->data['current_status'], $this->data['for_month'], date_for_display($this->data['date_created'])); break; default: $find = $replace = array(); break; } return str_replace($find, $replace, $message); }
</td> </tr> <tr> <th style="width: 330px;"> <label for="office">Office</label><br /> (care consultatn's location / office) </th> <td><?php echo form_dropdown('office', $locations, $office); ?> </td> </tr> <tr> <th><label for="date">Date</label></th> <td><?php echo form_input('event_date', date_for_display($event_date), 'class="datepicker"'); ?> </td> </tr> <tr> <th><label for="month">Month</label></th> <td><?php echo form_dropdown('month', getMonthList(), $month); ?> </td> </tr> <tr> <th> <label for="quarter">Quarter</label><br /> <div class="note"> (current quarter: July-Sept = Q1; Oct-Dec = Q2;<br />
?> </td> <td><?php echo $procurement->current_status; ?> </td> <td><?php echo $procurement->order_id; ?> </td> <td><?php echo date_for_display($procurement->date_inv_rec); ?> </td> <td><?php echo date_for_display($procurement->chk_req_sub); ?> </td> <td>$<?php echo number_format($procurement->aprox_total, 2, '.', ''); ?> </td> <td> <?php echo anchor('procurement/order/' . $procurement->template_id . '/' . $procurement->ID, 'edit'); ?> /<?php echo anchor('procurement/delete/' . $procurement->template_id . '/' . $procurement->ID, 'delete', array('class' => 'delete')); ?> </td>
foreach ($timesheets['rows'] as $timesheet) { ?> <tr> <td><a href="<?php echo site_url('timesheet/edit/' . $timesheet->ID); ?> "><?php echo $timesheet->first_name . ' ' . $timesheet->last_name; ?> </a></td> <td><?php echo date_for_display($timesheet->period_start); ?> </td> <td><?php echo date_for_display($timesheet->period_end); ?> </td> <td><?php echo $timesheet->current_status; ?> </td> </tr> <?php } } ?> </tbody> </table> </div> </div>
?> </td> <td><?php echo date_for_display($timesheet->period_start); ?> </td> <td><?php echo date_for_display($timesheet->period_end); ?> </td> <td><?php echo $timesheet->current_status; ?> </td> <td><?php echo date_for_display($timesheet->last_edit); ?> </td> <td> <?php if (can_this_user('timesheet/edit/all') || can_this_user('timesheet/edit') && ($timesheet->user_id == $this->user->ID || $timesheet->manager == $this->user->ID) && $timesheet->current_status == 'In Process') { ?> <?php echo anchor('timesheet/edit/' . $timesheet->ID, 'edit'); ?> <?php } else { ?> <?php
<td><?php echo @form_input('date_of_request', date_for_display($data->date_of_request), 'class="datepicker"'); ?> </td> </tr> <tr> <th style="width: 250px;">Decision Date</th> <td><?php echo @form_input('decision_date', date_for_display($data->decision_date), 'class="datepicker"'); ?> </td> </tr> <tr> <th style="width: 250px;">Fund Date</th> <td><?php echo @form_input('fund_date', date_for_display($data->fund_date), 'class="datepicker"'); ?> </td> </tr> <tr> <th style="width: 250px;">Approved Account List</th> <td> <?php echo form_upload('account_list', $data->account_list); ?> <?php if (isset($data->account_list) && strlen($data->account_list)) { echo anchor('uploads/' . $data->account_list, $data->account_list); } ?> </td>
<th>Total # attn.</th> <th>By SPA</th> <th>By ETH</th> <th>Grant / Program</th> <th></th> </tr> </thead> <tbody> <?php if (isset($items) && sizeof($items) > 0) { foreach ($items as $education_program) { ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($education_program->date); ?> </td> <td><?php echo $education_program->office; ?> </td> <td><?php echo $education_program->quarter; ?> </td> <td><?php echo $education_program->fiscial_year; ?> </td> <td><?php
<th>Total # Att.</th> <th>Total Und</th> <th></th> </tr> </thead> <tbody> <?php if (isset($items) && sizeof($items) > 0) { foreach ($items as $support_group) { ?> <?php $user = $this->users_model->get_user($support_group->created_by); ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($support_group->date); ?> </td> <td><?php echo $support_group->name_of_group; ?> </td> <td><?php echo $support_group->group_type; ?> </td> <td><?php echo $support_group->office; ?> </td> <td><?php
public function download($value = '') { $FileName = 'timesheets-' . date("d-m-y") . '.csv'; header('Content-Type: application/csv'); header('Content-Disposition: attachment; filename="' . $FileName . '"'); header("Pragma: no-cache"); header("Expires: 0"); $list = $this->timesheet_model->get_timesheets($this->input->get('user_id'), $this->config->item('pagination_per_page'), 0, $this->input->get_post(NULL, TRUE)); $timesheets = $list['rows']; $headers = array_keys(get_object_vars($timesheets[0])); unset($headers[9], $headers[10], $headers[11], $headers[12], $headers[13], $headers[26]); echo implode(',', $headers) . "\n"; foreach ($timesheets as $request) { $request = get_object_vars($request); $manager = $this->users_model->get_user_meta($request['manager']); $request['date_created'] = date_for_display($request['date_created']); unset($request['accounts'], $request['gweek1'], $request['gweek2'], $request['week1'], $request['week2'], $request['type']); $request['manager'] = @$manager['first_name'] . ' ' . @$manager['last_name']; $request['period_start'] = date_for_display($request['period_start']); $request['period_end'] = date_for_display($request['period_end']); $request['last_edit'] = date_for_display($request['last_edit']); echo implode(',', $request) . "\n"; } }
<th>Prefered Contact <?php echo get_sort_link('volunteers', 'called', ''); ?> </th> <th></th> </tr> </thead> <tbody> <?php if (isset($volunteers) && sizeof($volunteers) > 0) { foreach ($volunteers as $volunteer) { ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($volunteer->date); ?> </td> <td><?php echo $volunteer->name; ?> </td> <td><?php echo $volunteer->email; ?> </td> <td><?php echo $volunteer->address; ?> </td> <td><?php
echo form_dropdown('nce_status', array('To Submit' => 'To Submit', 'On Deck' => 'On Deck', 'Funded' => 'Funded', 'Pending' => 'Pending', 'Declined' => 'Declined', 'Prospect' => 'Prospect', 'Approved' => 'Approved')); ?> </td> <th><label for="nce_duration">Duration:</label></th> <td><?php echo form_input('nce_duration', $nce_duration); ?> </td> <th><label for="nce_aprvl_date">Aprvl Date:</label></th> <td><?php echo form_input('nce_aprvl_date', date_for_display($nce_aprvl_date), 'class="datepicker"'); ?> </td> <th><label for="nce_submission_date">Submission Date:</label></th> <td><?php echo form_input('nce_submission_date', date_for_display($nce_submission_date), 'class="datepicker"'); ?> </td> </tr> </table> <br> <table cellspacing="0" border="0"> <tr> <th style="vertical-align: top; padding-top: 3px;"><label for="">Notes:</label></th> <td><?php echo form_textarea('nce_notes', $nce_notes, 'style="width: 92%"'); ?> </td> </tr> <tr> <th><label for="attachments">Attachments</label></th>
<div class="ui-block wide"> <h3><a href="#">General Info</a></h3> <div> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td style="width: 180px;">Prior year Carry Forward:</td> <td>$<?php echo form_input('prior_year', $prior_year, ''); ?> </td> </tr> <tr> <td>Expected Completion Date:</td> <td> <?php echo form_input('ex_comp_date', date_for_display($ex_comp_date), 'class="datepicker"'); ?> </td> </tr> <tr> <td>Current Status:</td> <td> <?php echo form_dropdown('status', array('' => 'Select One', 'In Process' => 'In Process', 'Submitted Budget' => 'Submitted Budget', 'Approved Budget' => 'Approved Budget'), $status); ?> </td> </tr> <tr> <td>Budget Manager</td> <td> <select name="manager"> <?php foreach ($users as $u) {
?> </td> <td><?php echo $project->current_status; ?> </td> <td><?php echo $project->order_id; ?> </td> <td><?php echo date_for_display($project->date_inv_rec); ?> </td> <td><?php echo date_for_display($project->chk_req_sub); ?> </td> <td>$<?php echo number_format($project->aprox_total, 2, '.', ''); ?> </td> <td> <?php echo anchor('project/order/' . $project->template_id . '/' . $project->ID, 'edit'); ?> /<?php echo anchor('project/delete/' . $project->template_id . '/' . $project->ID, 'delete', array('class' => 'delete')); ?> </td>
<thead> <tr> <th>Date Created</th> <th>Template Name</th> <th></th> </tr> </thead> <tbody> <?php if (isset($templates)) { foreach ($templates as $template) { ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($template->date_created); ?> </td> <td><?php echo $template->template_name; ?> </td> <td> <?php echo anchor('procurement/edit/' . $template->ID, 'edit'); ?> /<?php echo anchor('procurement/delete/' . $template->ID, 'delete', array('class' => 'delete')); ?> /<?php
?> </td> <td><?php echo $project->grant_title; ?> </td> <td>$<?php echo number_format($total_amt_grant, 2, '.', ','); ?> </td> <td><?php echo date_for_display($project->start_date); ?> </td> <td><?php echo date_for_display($project->end_date); ?> </td> <?php $t = 0; foreach ($project->cumulative_total as $total) { $t += $total; } ?> <td>$<?php echo number_format($t, 2, '.', ''); ?> </td>
?> </td> </tr> <tr class="ui-helper-reset"> <th>From</th> <td><?php echo form_input('request_start', date_for_display($timeoff_request->request_start), 'class="datepicker"'); ?> </td> </tr> <tr class="ui-helper-reset"> <th>To</th> <td><?php echo form_input('request_end', date_for_display($timeoff_request->request_end), 'class="datepicker"'); ?> </td> </tr> <tr class="ui-helper-reset"> <th valign="top" style="padding-top: 5px;">Comments</th> <td><?php echo form_textarea('comments', $timeoff_request->comments); ?> </td> </tr> </tbody> </table> <?php
<th>Education Program</th> <th>Created By</th> <th></th> </tr> </thead> <tbody> <?php if (isset($items) && sizeof($items) > 0) { foreach ($items as $online_education_program) { ?> <?php $user = $this->users_model->get_user($online_education_program->created_by); ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($online_education_program->date); ?> </td> <td><?php echo $online_education_program->office; ?> </td> <td><?php echo $online_education_program->quarter; ?> </td> <td><?php echo $online_education_program->fiscial_year; ?> </td> <td><?php
<h3><a href="#">Out of Town Expenses</a></h3> <div> <?php $i = 0; foreach ($travel_request['ot'] as $ot) { ?> <table cellpadding="0" cellspacing="0" border="0" <?php echo $i == 0 ? 'id="ot_travel"' : 'style="border-top: 40px solid #aaa;"'; ?> class="ot_travel_table"> <tbody> <tr> <td style="width: 200px; vertical-align: top;"> <strong>Date</strong><br /> <?php echo form_input('ot_travel_date[]', date_for_display($ot->travel_date), 'class="datepicker" style="width: 150px;"'); ?> </td> <td style="width: 200px;"> <strong>Purpose</strong><br /> <?php echo form_textarea(array('name' => 'ot_purpose[]', 'value' => $ot->purpose, 'style' => 'width: 150px', 'rows' => 3)); ?> </td> <td style="vertical-align: top;"> <strong>Account Number</strong><br /> <?php if (!isset($ot_accounts[$ot->account_number])) { $ot_accounts[$ot->account_number] = $ot->account_number;
?> <label for="training_type2">Workshop Observation</label> <?php echo form_radio(array('name' => 'training_type', 'value' => 'Onsite Training', 'id' => 'training_type3', 'checked' => $training_type == 'Onsite Training' ? 'checked' : '')); ?> <label for="training_type3">Onsite Training</label> </div> </td> </tr> <tr> <th style="border-bottom: none;"><?php echo form_checkbox(array('name' => 'orientation_on', 'id' => 'orientation_on', 'value' => 'orientation_on', 'checked' => $orientation_on == 1 ? 'checked' : '')); ?> <label for="schedule_on">This Volunteer has already attended a general orientation on</label><?php echo form_input('orientation_on_date', date_for_display($orientation_on_date), 'style="width: auto;" class="datepicker"'); ?> </th> </tr> </table> </div> <br><br> <div> <table> <tr> <th style="border-bottom: none;"><label for="comments">Comments</label></th> </tr> <tr style="border-bottom: none;"> <th><?php echo form_textarea('comments', $comments, 'style="width: 100%"'); ?>
echo form_input('inv_amount', $order->inv_amount, 'class="datepicker"'); ?> </td> </tr> <?php } ?> <?php if ($template->show_chk_req_sub == 'Yes') { ?> <tr> <th style="width: 250px;">Date Check Request Submitted</th> <td> <?php echo form_input('chk_req_sub', date_for_display($order->chk_req_sub), 'class="datepicker"'); ?> </td> </tr> <?php } ?> <?php if ($template->show_comm == 'Yes') { ?> <tr> <th style="width: 250px; vertical-align: top; padding-top: 3px;">Comments</th> <td> <?php echo form_textarea('comments', $order->comments);
<th>Face To Face</th> <th>Walk By</th> <th>Network</th> <th>SO Total</th> <th></th> </tr> </thead> <tbody> <?php if (isset($items) && sizeof($items) > 0) { foreach ($items as $outreach) { ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($outreach->date_of_event); ?> </td> <td><?php echo $outreach->office; ?> </td> <td><?php echo $outreach->quarter; ?> </td> <td><?php echo $outreach->fiscial_year; ?> </td> <td><?php
<th>Created By</th> <th>Total # of contacts</th> <th></th> </tr> </thead> <tbody> <?php if (isset($items) && sizeof($items) > 0) { foreach ($items as $care_consultation) { ?> <?php $user = $this->users_model->get_user($care_consultation->created_by); ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($care_consultation->date); ?> </td> <td><?php echo $care_consultation->office; ?> </td> <td><?php echo $care_consultation->quarter; ?> </td> <td><?php echo $care_consultation->fiscial_year; ?> </td> <td><?php
<td><?php echo form_dropdown('quarter', array(1 => 1, 2, 3, 4), $quarter); ?> </td> </tr> <tr> <th><label for="fiscial_year">Fiscal Year<br><small>(current fiscal year)</small></label></th> <td><?php echo form_dropdown('fiscial_year', getYearList(), $fiscial_year); ?> </td> </tr> <tr> <th style="width: 330px;"><label for="date_of_event">Date of Event</label></th> <td><?php echo form_input('date_of_event', date_for_display($date_of_event), 'class="datepicker" style="width: 100px;"'); ?> </td> </tr> <tr> <th><label for="created_by">Name of Person Completing this form</label></th> <td><?php echo form_dropdown('created_by', $staff, $created_by); ?> </td> </tr> <tr> <th><label for="representative_for_event">Representative(s) for the event</label></th> <td><?php echo form_input('representative_for_event', $representative_for_event); ?>
<td><?php echo form_dropdown('pwd_ethnicity', $ethnicity, $caller->pwd_ethnicity); ?> </td> </tr> <tr> <th>PWD's Education:</th> <td><?php echo form_dropdown('pwd_education', $education, $caller->pwd_education); ?> </td> </tr> <tr> <th>Date of Diagnosis:</th> <td><?php echo form_input('pwd_diagnosis_date', date_for_display($caller->pwd_diagnosis_date)); ?> </td> </tr> <tr> <th>Type of Diagnosis</th> <td><?php echo form_input('pwd_diagnosis_type', $caller->pwd_diagnosis_type); ?> </td> </tr> </tbody> </table> <?php echo $this->pagination->create_links();
echo form_dropdown('fiscial_year', getYearList(), $fiscial_year); ?> </td> </tr> </table> </div> </div> <div class="ui-block wide"> <h3><a href="#">Individule Entry</a></h3> <div> <table cellspacing="0" border="0"> <tr> <th style="width: 330px;"><label for="date_of_program">Date of Program</label></th> <td><?php echo form_input('date_of_program', date_for_display($date_of_program), 'class="datepicker" style="width: 100px;"'); ?> </td> </tr> <tr> <th><label for="name_of_education_program">Name of the Education Program</label></th> <td><?php echo form_dropdown('name_of_education_program', $education_programs, $name_of_education_program); ?> </td> </tr> <tr> <th><label for="name_of_presenters">Date Names of Presenter(s)</label></th> <td><?php echo form_input('name_of_presenters', $name_of_presenters); ?>
<th>Total # Att.</th> <th>Total Und</th> <th></th> </tr> </thead> <tbody> <?php if (isset($items) && sizeof($items) > 0) { foreach ($items as $engagement_program) { ?> <?php $user = $this->users_model->get_user($engagement_program->created_by); ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($engagement_program->date); ?> </td> <td><?php echo $engagement_program->name_of_program; ?> </td> <td><?php echo $engagement_program->group_type; ?> </td> <td><?php echo $engagement_program->office; ?> </td> <td><?php
public function download($value = '') { $FileName = 'timeoff-requests-' . date("d-m-y") . '.csv'; header('Content-Type: application/csv'); header('Content-Disposition: attachment; filename="' . $FileName . '"'); header("Pragma: no-cache"); header("Expires: 0"); $list = $this->procurement_model->get_orders($this->input->get('user_id'), $this->config->item('pagination_per_page'), 0, $this->input->get_post(NULL, TRUE)); $timeoff_requests = $list['rows']; $headers = array_keys(get_object_vars($timeoff_requests[0])); // echo '<pre>'.print_r($headers, true).'</pre>'; echo implode(',', $headers) . "\n"; foreach ($timeoff_requests as $request) { $request = get_object_vars($request); $manager = $this->users_model->get_user_meta($request['created_by']); $request['created_by'] = $manager['first_name'] . ' ' . $manager['last_name']; $request['date_created'] = date_for_display($request['date_created']); $request['date_rec_com'] = date_for_display($request['date_rec_com']); $request['date_inv_rec'] = date_for_display($request['date_inv_rec']); $request['chk_req_sub'] = date_for_display($request['chk_req_sub']); unset($request['form_data']); echo implode(',', $request) . "\n"; } }
<th>Created</th> <th>Name</th> <th>For the month of</th> <th>Status</th> <th></th> </tr> </thead> <tbody> <?php if (isset($travel_requests) && sizeof($travel_requests) > 0) { foreach ($travel_requests as $travel_request) { ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($travel_request['details']->date_created); ?> </td> <td><?php echo $travel_request['details']->first_name . ' ' . $travel_request['details']->last_name; ?> </td> <td><?php echo $travel_request['details']->for_month; ?> </td> <td><?php echo $travel_request['details']->current_status; ?> </td>
<tr class="ui-helper-reset"> <td><?php echo date_for_display($timeoff_request->date_created); ?> </td> <td><?php echo $timeoff_request->first_name . ' ' . $timeoff_request->last_name; ?> </td> <td><?php echo date_for_display($timeoff_request->request_start); ?> </td> <td><?php echo date_for_display($timeoff_request->request_end); ?> </td> <td><?php echo $timeoff_request->current_status; ?> </td> <td> <?php if (can_this_user('timeoff/edit/all') || can_this_user('timeoff/edit') && ($timeoff_request->user_id == $this->user->ID || $timeoff_request->manager == $this->user->ID) && $timeoff_request->current_status == 'In Process') { ?> <?php echo anchor('timeoff/edit/' . $timeoff_request->ID, 'edit'); ?>
<th>Total # of contacts</th> <th>Wandering Events</th> <th></th> </tr> </thead> <tbody> <?php if (isset($items) && sizeof($items) > 0) { foreach ($items as $safe_return) { ?> <?php $user = $this->users_model->get_user($safe_return->created_by); ?> <tr class="ui-helper-reset"> <td><?php echo date_for_display($safe_return->date); ?> </td> <td><?php echo $safe_return->office; ?> </td> <td><?php echo $safe_return->quarter; ?> </td> <td><?php echo $safe_return->fiscial_year; ?> </td> <td><?php