function procurement_plan_details() { //verify that plan exists $id = decryptValue($this->uri->segment(3)); $plan_info = get_procurement_plan_info($id, ''); if ($plan_info) { //print_array($plan_info); //show active plans $data['pagetitle'] = get_procurement_plan_info($id, 'title'); $data['current_menu'] = 'active_plans'; $data['view_to_load'] = 'public/active_plans/plan_details_export_v'; $data['plan_id'] = $id; $limit = NUM_OF_ROWS_PER_PAGE; $where = array('procurement_plan_id' => $id, '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(); } }
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); } }
<div class="widget-body"> <div class="space20"></div> <div class="row-fluid invoice-list"> <div class="span4"> <p> <b>Financial Year: </b> <?php echo get_procurement_plan_info($plan_id, 'financial_year'); ?> <br> <b>Entity: </b> <?php echo get_procurement_plan_info($plan_id, 'pde'); ?> <br> <!-- <b>Date Added: </b> <?php echo substr(get_procurement_plan_info($plan_id, 'dateadded'), 0, 10); ?> --> </p> </div> </div> <?php //print_array($all_entries_paginated); ?>
function plan_details() { //echo decryptValue($this->uri->segment(3)); //verify plan if (get_procurement_plan_info(decryptValue($this->uri->segment(3)), '')) { $data['page_title'] = get_procurement_plan_info(decryptValue($this->uri->segment(3)), 'title'); $data['current_menu'] = 'view_procurement_plans'; $data['plan_id'] = decryptValue($this->uri->segment(3)); $data['view_to_load'] = 'procurement/admin/plan_details_v'; $data['view_data']['form_title'] = $data['page_title']; //load view $this->load->view('dashboard_v', $data); } else { //if pde does not exist show_404(); } }
<p> <b>Financial year: </b> <?php echo get_procurement_plan_info($plan_id, 'financial_year'); ?> <br> <b>Entity: </b> <?php echo get_procurement_plan_info($plan_id, 'pde'); ?> <br> <b>Date added: </b> <?php echo get_procurement_plan_info($plan_id, 'dateadded'); ?> </b><br> <b>Added by: </b><?php echo get_procurement_plan_info($plan_id, 'author') . ' <small>' . get_usergroup_by_user(get_procurement_plan_info($plan_id, 'author_id')) . '</small>'; ?> <br> </p> </div> <div class="space20"></div> <div class="space20"></div> <div class="row-fluid"> <?php if (get_active_procurement_plan_entries_by($plan_id)) {
function get_plan_entry_info_by_ref_num($id = '', $param = '') { if ($id == '') { return NULL; } else { $this->db->cache_on(); $query = $this->db->select()->from($this->_tablename)->where('procurement_ref_no', $id)->get(); } if ($query->result_array()) { foreach ($query->result_array() as $row) { switch ($param) { case 'title': $result = $row['subject_of_procurement']; break; case 'subject_of_procurement': $result = $row['subject_of_procurement']; break; case 'procurement_type_id': $result = $row['procurement_type']; break; case 'procurement_type': $result = get_procurement_type_info_by_id($row['procurement_type'], 'title'); break; case 'procurement_method_id': $result = $row['procurement_method']; break; case 'procurement_method': $result = get_procurement_method_info_by_id($row['procurement_method'], 'title'); break; case 'department_id': $result = $row['pde_department']; break; case 'department': $result = get_pde_department_info_by_id($row['pde_department'], 'title'); break; case 'funding_source_id': $result = $row['funding_source']; break; case 'funding_source': $result = get_source_funding_info_by_id($row['funding_source'], 'title'); break; case 'source_funding_id': $result = $row['funding_source']; break; case 'source_funding': $result = get_source_funding_info_by_id($row['funding_source'], 'title'); break; case 'id': $result = $row['id']; break; case 'estimated_amount': $result = $row['estimated_amount']; break; case 'currency': $result = $result = get_currency_info_by_id($row['currency'], 'abbrv'); break; case 'currency_id': $result = $result = $row['currency']; break; case 'pre_bid_events_date': $result = $row['pre_bid_events_date']; break; case 'pre_bid_events_duration': $result = $row['pre_bid_events_duration']; break; case 'contracts_committee_approval_date': $result = $row['contracts_committee_approval_date']; break; case 'contracts_committee_approval_date_duration': $result = $row['contracts_committee_approval_date_duration']; break; case 'publication_of_pre_qualification_date': $result = $row['publication_of_pre_qualification_date']; break; case 'publication_of_pre_qualification_date_duration': $result = $row['publication_of_pre_qualification_date_duration']; break; case 'proposal_submission_date': $result = $row['proposal_submission_date']; break; case 'proposal_submission_date_duration': $result = $row['proposal_submission_date_duration']; break; case 'contracts_committee_approval_of_shortlist_date': $result = $row['contracts_committee_approval_of_shortlist_date']; break; case 'contracts_committee_approval_of_shortlist_date_duration': $result = $row['contracts_committee_approval_of_shortlist_date_duration']; break; case 'bid_issue_date_duration': $result = $row['bid_issue_date_duration']; break; case 'bid_submission_opening_date': $result = $row['bid_submission_opening_date']; break; case 'bid_submission_opening_date_duration': $result = $row['bid_submission_opening_date_duration']; break; case 'bid_issue_date': $result = $row['bid_issue_date']; break; case 'secure_necessary_approval_date': $result = $row['secure_necessary_approval_date']; break; case 'secure_necessary_approval_date_duration': $result = $row['secure_necessary_approval_date_duration']; break; case 'contract_award': $result = $row['contract_award']; break; case 'contract_award_duration': $result = $row['contract_award_duration']; break; case 'best_evaluated_bidder_date': $result = $row['best_evaluated_bidder_date']; break; case 'best_evaluated_bidder_date_duration': $result = $row['best_evaluated_bidder_date_duration']; break; case 'contract_sign_date': $result = $row['bid_issue_date']; break; case 'contract_sign_date_duration': $result = $row['contract_sign_duration']; break; case 'cc_approval_of_evaluation_report': $result = $row['cc_approval_of_evaluation_report']; break; case 'cc_approval_of_evaluation_report_duration': $result = $row['cc_approval_of_evaluation_report_duration']; break; case 'negotiation_date': $result = $row['negotiation_date']; break; case 'negotiation_date_duration': $result = $row['negotiation_date_duration']; break; case 'negotiation_approval_date': $result = $row['negotiation_approval_date']; break; case 'negotiation_approval_date_duration': $result = $row['negotiation_approval_date_duration']; break; case 'advanced_payment_date': $result = $row['advanced_payment_date']; break; case 'advanced_payment_date_duration': $result = $row['advanced_payment_date_duration']; break; case 'mobilise_advance_payment': $result = $row['mobilise_advance_payment']; break; case 'mobilise_advance_payment_duration': $result = $row['mobilise_advance_payment_duration']; break; case 'substantial_completion': $result = $row['substantial_completion']; break; case 'substantial_completion_duration': $result = $row['substantial_completion_duration']; break; case 'final_acceptance': $result = $row['final_acceptance']; break; case 'final_acceptance_duration': $result = $row['final_acceptance_duration']; break; case 'procurement_plan_id': $result = $row['procurement_plan_id']; break; case 'procurement_plan': $result = get_procurement_plan_info($row['procurement_plan_id'], 'title'); break; case 'pde_id': $result = get_procurement_plan_info($row['procurement_plan_id'], 'pde_id'); break; case 'pde': $result = get_procurement_plan_info($row['procurement_plan_id'], 'pde'); break; case 'author_id': $result = $row['author']; break; case 'updated_by': $result = $row['updated_by']; break; case 'author': $result = get_user_info($row['author'], 'fullname'); break; case 'isactive': $result = $row['active']; break; case 'dateadded': $result = $row['dateadded']; break; default: $result = $query->result_array(); } } return $result; } else { return NULL; } }
<input class=" span2 date-picker2" id="start_year" type="text" value="<?php echo substr(get_procurement_plan_info($plan_id, 'financial_year'), 0, 4); ?> " /> - <input class=" span2 date-picker2" id="end_year" type="text" value="<?php echo substr(get_procurement_plan_info($plan_id, 'financial_year'), 5, 4); ?> " /> </div> </div> <div class="control-group"> <label class="control-label">Description</label> <div class="controls"> <textarea class="span12 wysihtml5" id="description" rows="6"> <?php echo get_procurement_plan_info($plan_id, 'description'); ?> </textarea> </div> </div> <div class="form-actions"> <button id="submit_plan" type="submit" class="btn btn-success">Submit</button> <a class="btn" href="<?php echo base_url() . $this->uri->segment(1); ?> ">Cancel</a> </div>