コード例 #1
0
ファイル: indextest.php プロジェクト: vishusahu/dgh
 public function showContent()
 {
     $objPurchaseModel = $this->load->model('admin/purchases_model');
     $objPurchaseModel = new purchases_model();
     $objPurchaseModel->setId($_GET['id']);
     $data['purchase'] = $objPurchaseModel->getAllData();
     //print_r($data);die;
     $data['header'] = array('view' => 'templates/header', 'data' => array());
     $data['main_content'] = array('view' => 'purchase_content.php', 'data' => array());
     $data['footer'] = array('view' => 'templates/footer', 'data' => array());
     $this->load->view('templates/common_template', $data);
 }
コード例 #2
0
ファイル: dghDashboard.php プロジェクト: vishusahu/dgh
 public function pepdata()
 {
     $objPurchaseModel = $this->load->model('purchases_model');
     $objPurchaseModel = new purchases_model();
     if ($this->input->post('submitPass') == 'Save') {
         //echo "<pre>";print_r($_POST);die;
         $objPurchaseModel->setId($this->input->post('editId'));
         $objPurchaseModel->savePurchases($_POST);
         $this->session->set_userdata('msg', 'Data added successfully');
         redirect('admin/pepdata');
     }
     $data['purchase'] = $objPurchaseModel->getAllData();
     if ($_GET['editRowId'] != '') {
         $objPurchaseModel->setId($_GET['editRowId']);
         $data['editDetails'] = $objPurchaseModel->getAllData();
     }
     if ($_GET['deleteId'] != '') {
         $objPurchaseModel->setId($_GET['deleteId']);
         $data['editDetails'] = $objPurchaseModel->deletedata();
         $this->session->set_userdata('msg', 'Data deleted successfully');
         redirect('admin/pepdata');
     }
     $data['header'] = array('view' => 'templates/header', 'data' => $data);
     $data['main_content'] = array('view' => 'dgh_admin/eapdata.php', 'data' => $data);
     $this->load->view('templates/common_template', $data);
 }