Example #1
0
 function add()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     if (!empty($_POST)) {
         $result = $this->_link->add($_POST);
         if (!$result['boolean']) {
             echo "ERROR: The link could not be added. " . $result['reason'];
         }
     } else {
         $this->load->view('links/new_link', $data);
     }
 }
Example #2
0
 function manage()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     # Updating the report parameters
     if (!empty($_POST)) {
         $data['list'] = $this->_report->lists(array('type' => $_POST['report__reporttypes'], 'quarter' => $_POST['report__financialperiods'] . '-' . $_POST['report__quarters'], 'pde' => $_POST['pde_id']));
         $data['report_type'] = $_POST['report__reporttypes'];
         $this->native_session->set('__report_type', $data['report_type']);
         $this->load->view('reports/report_list', $data);
     } else {
         $data['list'] = $this->_report->lists();
         $this->load->view('reports/manage', $data);
     }
 }
Example #3
0
 function add()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     # user has posted the permission form
     if (!empty($_POST)) {
         $result = $this->_faq->add($_POST);
         if (!$result['boolean']) {
             echo "ERROR: The FAQ could not be added. " . $result['reason'];
         }
     } else {
         if (!empty($data['d'])) {
             $data['faq'] = $this->_faq->details($data['d']);
         }
         $this->load->view('faqs/new_faq', $data);
     }
 }
 function add()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     if (!empty($_POST)) {
         $result = $this->_procurement_plan->add($_POST);
         if (!$result['boolean']) {
             echo "ERROR: The procurement plan could not be added. " . $result['reason'];
         }
     } else {
         if (!empty($data['d'])) {
             $data['plan'] = $this->_procurement_plan->all_details($data['d']);
             $this->native_session->set('plan_id', $data['d']);
         }
         $this->load->view('procurement_plans/new_plan', $data);
     }
 }
Example #5
0
 function settings()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     # user has posted the organization settings
     if (!empty($_POST)) {
         # Upload the logo if any exists before you proceed with the rest of the process
         $_POST['logo_url'] = !empty($_FILES) ? upload_file($_FILES, 'newlogo__fileurl', 'logo_' . $this->native_session->get('__organization_id') . '_', 'png,jpg,jpeg,tiff') : '';
         $result = $this->_organization->settings($_POST);
         if ($result['boolean']) {
             $this->native_session->set('msg', 'Your organization settings have been updated');
         } else {
             echo "ERROR: The settings could not be updated. " . $result['reason'];
         }
     } else {
         $data['organization'] = $this->_organization->details();
         $this->load->view('organizations/settings', $data);
     }
 }
Example #6
0
 function add()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     if (!empty($_POST)) {
         # Upload the file before you proceed with the rest of the process
         $fileUrl = upload_file($_FILES, 'document__fileurl', 'document_', 'pdf,doc,docx,zip,zipx,rar');
         if (!empty($fileUrl)) {
             $_POST['document'] = $fileUrl;
             $result = $this->_document->add($_POST);
         } else {
             $result = array('boolean' => FALSE, 'reason' => 'File could not be uploaded.');
         }
         if (!$result['boolean']) {
             echo "ERROR: The document could not be added. " . $result['reason'];
         }
     } else {
         $data['area'] = !empty($data['a']) ? $data['a'] : 'system';
         $this->load->view('documents/new_document', $data);
     }
 }
Example #7
0
 function add()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     # use has posted the contract form
     if (!empty($_POST)) {
         # Upload the file before you proceed with the rest of the process
         $fileUrls = upload_many_files($_FILES, 'document__fileurl', 'document_', 'pdf,doc,docx');
         if (!empty($fileUrls)) {
             $_POST['documents'] = $fileUrls;
             $result = $this->_contract->add($_POST);
         } else {
             $result = array('boolean' => FALSE, 'reason' => 'Files could not be uploaded.');
         }
         if (!$result['boolean']) {
             echo "ERROR: The contract could not be added. " . $result['reason'];
         }
     } else {
         $this->load->model('_bid');
         $data['award'] = $this->_bid->details(array('bid_id' => $data['t']));
         $this->load->view('contracts/new_contract', $data);
     }
 }
Example #8
0
 function best_evaluated()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     # user has posted the new bid information
     if (!empty($_POST)) {
         $response = $this->_bid->best_evaluated($_POST);
         if (!$response['boolean']) {
             echo "ERROR: Best evaluated bidder could not be commited.";
         }
     } else {
         $this->load->view('bids/best_evaluated', $data);
     }
 }
Example #9
0
 function update_permissions()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     # user has posted
     if (!empty($_POST)) {
         $response = $this->_user->update_permissions($_POST);
         # there was an error
         if (!(!empty($response) && $response['boolean'])) {
             echo 'ERROR: There was an error updating the user permission group.';
         }
     } else {
         if (!empty($data['result'])) {
             $data['msg'] = 'The user permission group has been updated';
             $data['area'] = 'refresh_list_msg';
             $this->load->view('addons/basic_addons', $data);
         } else {
             $data['id_list'] = !empty($data['list']) ? implode(',', explode('--', $data['list'])) : '';
             $this->load->view('users/update_permissions', $data);
         }
     }
 }
Example #10
0
 function add()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     if (!empty($_POST)) {
         # Upload the document if any exists before you proceed with the rest of the process
         $_POST['document'] = !empty($_FILES) ? upload_file($_FILES, 'document__fileurl', 'document_', 'pdf,doc,docx,jpeg,jpg,png,tiff') : '';
         $result = $this->_forum->add($_POST);
         if ($result['boolean']) {
             $this->native_session->set('msg', 'The forum has been added');
         } else {
             echo "ERROR: The forum data could not be added. " . $result['reason'];
         }
     } else {
         if (!empty($data['d'])) {
             $data['forum'] = $this->_forum->details($data['d']);
         }
         $this->load->view('forums/new_forum', $data);
     }
 }
Example #11
0
 function generate_certificate()
 {
     $data = filter_forwarded_data($this);
     logout_invalid_user($this);
     if (!empty($_POST)) {
         $this->native_session->set('providerid', $_POST['providerid']);
         $this->native_session->set('amount_paid', $_POST['amount_paid']);
         $this->native_session->set('valid_until', $_POST['valid_until']);
     } else {
         if (!empty($data['a'])) {
             $response = $this->_provider->generate_certificate(array('providerid' => $this->native_session->get('providerid'), 'amount_paid' => $this->native_session->get('amount_paid'), 'valid_until' => $this->native_session->get('valid_until')));
             $data['msg'] = !empty($response) && $response['boolean'] ? 'The certificate has been generated.' : 'ERROR: The certificate could not be generated.';
             $data['area'] = 'refresh_list_msg';
             $this->load->view('addons/basic_addons', $data);
         } else {
             $this->load->view('providers/certificate_specs', $data);
         }
     }
 }
Example #12
0
 function provider_dashboard()
 {
     $data = filter_forwarded_data($this);
     $this->load->model('_tender');
     logout_invalid_user($this);
     $data['list'] = $this->_tender->lists(array('display_type' => 'public', 'offset' => 0, 'limit' => NUM_OF_ROWS_PER_PAGE));
     $this->load->view('accounts/provider_dashboard', $data);
 }