예제 #1
0
 public function profile()
 {
     $select = new \Models\Select();
     $this->view->profile = $select->getProfile();
     if ($this->input->post('salary_wage') == 'true') {
         $data = array('salary' => $this->input->post('salary'), 'wage' => $this->input->post('wage'));
         $update = new \Models\Update();
         $update->userSalary($data);
     }
     if ($this->input->post('bank') == 'true') {
         $bankData = array('bank_name' => $this->input->post('bank_name'), 'value' => $this->input->post('value'));
         $update = new \Models\Update();
         $update->bankData($bankData);
     }
     if ($this->input->post('cash') == 'true') {
         $cashData = array('bank_name' => 'cash', 'value' => $this->input->post('value'));
         $update = new \Models\Update();
         $update->cashMoney($cashData);
     }
     if ($this->input->post('bills') == 'true') {
         $billsData = array('food' => $this->input->post('food'), 'household' => $this->input->post('household'));
         $update = new \Models\Update();
         $update->userBills($billsData);
     }
     $select = new \Models\Select();
     $profile = $select->getProfile();
     $this->view->profile = $profile;
     $money = $select->getMoney();
     $this->view->money = $money;
     $managebudgets = new \Models\Managebudgets();
     $budgets = $managebudgets->getBudgets();
     $this->view->appendToLayout('sidebar', 'index.sidebar');
     $this->view->appendToLayout('mainpanel', 'index.mainpanel');
     $this->view->appendToLayout('userprofile', 'index.userprofile');
     $this->view->appendToLayout('footer', 'index.footer');
     $this->view->display('index_in');
 }
예제 #2
0
 public function cash()
 {
     $cashData = array('bank_name' => 'cash', 'value' => $this->input->post('value'));
     $update = new \Models\Update();
     $update->cashMoney($cashData);
 }