function get_bid_invitation_info($passed_id, $param) { //if NO ID if ($passed_id == '') { return NULL; } else { //get user info $query = $this->db->select()->from($this->_tablename)->where($this->_primary_key, $passed_id)->get(); if ($query->result_array()) { foreach ($query->result_array() as $row) { //filter results switch ($param) { case 'procurement_id': $result = $row['procurement_id']; break; case 'procurement': $result = get_procurement_plan_entry_info($row['procurement_id'], 'title'); break; case 'procurement_method': $result = get_procurement_plan_entry_info($row['procurement_id'], 'procurement_method'); break; case 'procurement_value': $result = get_procurement_plan_entry_info($row['procurement_id'], 'estimated_amount'); break; case 'amount': $result = $row['amount']; break; case 'xrate': $result = $row['xrate']; break; case 'currency_id': $result = $row['currency_id']; break; case 'currency': $result = get_currency_info_by_id($row['currency_id'], 'abbrv'); break; case 'dateadded': $result = $row['dateadded']; break; case 'procurement_ref_no': $result = $row['procurement_ref_no']; break; case 'bid_submission_deadline': $result = $row['currency_id']; break; default: $result = $query->result_array(); } } return $result; } } }
?> <tr> <td class="hidden-480"><?php echo get_procurement_plan_entry_info($row['procurement_id'], 'pde'); ?> </td> <td><?php echo $row['procurement_ref_no']; ?> </td> <td class="hidden-480"><?php echo get_procurement_plan_entry_info($row['procurement_id'], 'title'); ?> </td> <td class="hidden-480"><?php echo number_format(get_procurement_plan_entry_info($row['procurement_id'], 'estimated_amount')); ?> </td> <td><?php echo custom_date_format('d-M-Y', $row['invitation_to_bid_date']); ?> </td> <td><?php echo custom_date_format('d-M-Y', $row['bid_submission_deadline']); ?> </td> </tr> <?php }
</td> <td><?php echo $row['total_actual_payments']; ?> </td> <td><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'procurement_ref_no'); ?> </td> <td><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'subject_of_procurement'); ?> </td> <td><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'procurement_method'); ?> </td> </tr> <?php } ?> </tbody> </table> </p>
?> </td> <td><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'procurement_type'); ?> </td> <td><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'procurement_method'); ?> </td> <td><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'subject_of_procurement'); ?> </td> <td style="text-align: right;"><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'estimated_amount'); ?> </td> <td class="hidden-480"><?php echo date('d-F-Y', strtotime($row['commencement_date']) + $row['days_duration'] * 24 * 60 * 60); ?> </td> <td class="hidden-480"><?php echo custom_date_format('d-M-Y', $row['completion_date']); ?> </td> <td class="hidden-480"><?php echo (strtotime(date('d-M-Y', strtotime($row['commencement_date']) + $row['days_duration'] * 24 * 60 * 60)) - strtotime(custom_date_format('d-M-Y', $row['completion_date']))) / 86400 < 0 ? substr((strtotime(date('d-M-Y', strtotime($row['commencement_date']) + $row['days_duration'] * 24 * 60 * 60)) - strtotime(custom_date_format('d-M-Y', $row['completion_date']))) / 86400, 1) . '<span class="label label-important pull-right"> late</span>' : (strtotime(date('d-F-Y', strtotime($row['commencement_date']) + $row['days_duration'] * 24 * 60 * 60)) - strtotime(custom_date_format('d-F-Y', $row['completion_date']))) / 86400 . ' <span class="label label-success pull-right"> early</span>'; ?> </td> </tr>
<div class="controls"> <div class="input-append date date-picker" data-date="<?php echo date('m-d-Y'); ?> " data-date-format="dd-mm-yyyy" data-date-viewmode="years"> <input id="final_acceptance" class=" m-ctrl-medium date-picker" size="16" type="text" value="<?php echo substr(get_procurement_plan_entry_info($entry_id, 'final_acceptance'), 0, 10); ?> "><span class="add-on"><i class="icon-calendar"></i></span> </div> <input value="<?php echo get_procurement_plan_entry_info($entry_id, 'final_acceptance_duration'); ?> " required="" id="final_acceptance_duration" placeholder="duration" type="text" class="span3 "> Days </div> </div> <label class="checkbox line"> <div class="checker" id="uniform-undefined"><span class=""><input id="checkBox" type="checkbox" value="" style="opacity: 0;"></span></div> I confirm that data entered for annual procurement plan is correct </label> <div class="message_alerts">
function procurement_plans_search() { $this->db->order_by("pdename", "asc"); $data['pdes'] = $this->db->get_where('pdes', array('isactive' => 'Y', 'status' => 'in'))->result_array(); //switch by parameter passed switch ($this->uri->segment(3)) { //if its details case "details": //verify that plan exists $plan_info = get_procurement_plan_info(decryptValue($this->uri->segment(4)), ''); if ($plan_info) { //print_array($plan_info); //show active plans $data['pagetitle'] = get_procurement_plan_info(decryptValue($this->uri->segment(4)), 'title'); $data['current_menu'] = 'active_plans'; $data['view_to_load'] = 'public/active_plans/plan_details_v'; $data['plan_id'] = decryptValue($this->uri->segment(4)); $limit = NUM_OF_ROWS_PER_PAGE; $where = array('procurement_plan_id' => decryptValue($this->uri->segment(4)), 'isactive' => 'Y'); $data['all_entries'] = $this->procurement_plan_entry_m->get_where($where); $data['all_entries_paginated'] = $this->procurement_plan_entry_m->get_paginated_by_criteria($num = $limit, $this->uri->segment(5), $where); $this->load->library('pagination'); //pagination configs $config = array('base_url' => base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/' . $this->uri->segment(3) . '/' . $this->uri->segment(4) . '/', 'total_rows' => count($data['all_entries']), 'per_page' => $limit, 'num_links' => $limit, 'use_page_numbers' => TRUE, 'full_tag_open' => '<div class="btn-group">', 'full_tag_close' => '</div>', 'anchor_class' => 'class="btn" ', 'cur_tag_open' => '<div class="btn">', 'cur_tag_close' => '</div>', 'uri_segment' => '5'); //initialise pagination $this->pagination->initialize($config); //add to data array $data['pages'] = $this->pagination->create_links(); //load view //load view $this->load->view('public/home_v', $data); } else { show_404(); } break; //if its to see entry details //if its to see entry details case "entry_details": //show active plans $data['pagetitle'] = get_procurement_plan_entry_info(decryptValue($this->uri->segment(4)), 'title'); $data['current_menu'] = 'active_plans'; $data['view_to_load'] = 'public/active_plans/entry_details_v'; $data['entry_id'] = decryptValue($this->uri->segment(4)); //load view $this->load->view('public/home_v', $data); break; default: $financial_year = mysql_real_escape_string($_POST['procurement_method']); $entity = mysql_real_escape_string($_POST['entity']); //show active plans $data['pagetitle'] = 'Annual Procurement Plans'; $data['current_menu'] = 'procurement_plans'; $where = array('isactive' => 'y', 'financial_year' => 'like "%' . $financial_year . '%"'); #show plans for the current financial year $where['financial_year'] = date('m') > 5 ? date('Y') . '-' . (date('Y') + 1) : date('Y') - 1 . '-' . date('Y'); $data['all_plans'] = $this->procurement_plan_m->get_where($where); $data['all_plans_paginated'] = $this->procurement_plan_m->get_paginated_by_criteria($num = NUM_OF_ROWS_PER_PAGE, $this->uri->segment(3), $where); //pagination configs $config = array('base_url' => base_url() . $this->uri->segment(1) . '/page', 'total_rows' => count($data['all_plans']), 'per_page' => NUM_OF_ROWS_PER_PAGE, 'num_links' => '3', 'use_page_numbers' => TRUE, 'full_tag_open' => '<div class="btn-group">', 'full_tag_close' => '</div>', 'anchor_class' => 'class="btn" ', 'cur_tag_open' => '<div class="btn">', 'cur_tag_close' => '</div>', 'uri_segment' => '3'); //initialise pagination $this->pagination->initialize($config); //add to data array $data['pages'] = $this->pagination->create_links(); //load view $data['view_to_load'] = 'public/active_plans/active_plans_v'; //load view $this->load->view('public/home_v', $data); } }
</span> </td> </tr> <tr> <td>final acceptance</td> <td><?php echo substr(get_procurement_plan_entry_info($entry_id, 'final_acceptance'), 0, 10); ?> <br><small><b>Duration</b>: <?php echo get_procurement_plan_entry_info($entry_id, 'final_acceptance_duration'); ?> day(s)</small></td> <td> <span class=""><?php echo days_time_left(get_procurement_plan_entry_info($entry_id, 'final_acceptance_duration') * 60 * 60 * 60 + date_to_seconds(get_procurement_plan_entry_info($entry_id, 'final_acceptance'))); ?> </span> </td> </tr> </tbody> </table> </div> </div> </div>
function full_report() { //check if person is authorised to view report //load view variables if (get_user_info_by_id($this->session->userdata('userid'), 'pde_id') == get_procurement_plan_entry_info(decryptValue($this->uri->segment(4)), 'pde_id')) { $data['page_title'] = get_procurement_plan_entry_info(decryptValue($this->uri->segment(4)), 'title'); $data['current_menu'] = 'view_procurement_plans'; $data['entry_id'] = decryptValue($this->uri->segment(4)); $data['view_to_load'] = 'procurement/admin/entry_report_v'; $data['view_data']['form_title'] = $data['page_title']; //echo get_procurement_plan_entry_info(decryptValue($this->uri->segment(5)), 'title'); //load view $this->load->view('dashboard_v', $data); } else { //load view variables $data['page_title'] = "Oops"; $data['current_menu'] = 'dashboard'; $data['view_to_load'] = 'error_pages/500_v'; $data['view_data']['form_title'] = $data['page_title']; $data['message'] = 'Only authorised PDU members can view this page'; //load view $this->load->view('dashboard_v', $data); } }
<tr> <td><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'procurement_ref_no'); ?> </td> <td class="hidden-480"><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'pde'); ?> </td> <td class="hidden-480"><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'subject_of_procurement'); ?> </td> <td class="hidden-480"><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'procurement_type'); ?> </td> <td><?php echo $row['final_contract_value']; ?> </td> <td><?php echo $row['total_actual_payments']; ?> </td> </tr> <?php } ?>