Spaces:
Running
Running
Download application/controllers/c_setting/C_globalsetting.php from cappucaine/ERP: direct link, hf CLI and curl.
- Browser
- Download file 2.94 kB
-
https://huggingface.co/spaces/cappucaine/ERP/resolve/main/application/controllers/c_setting/C_globalsetting.php
- Command line
-
hf download hf://spaces/cappucaine/ERP/application/controllers/c_setting/C_globalsetting.php
-
curl -L -o C_globalsetting.php https://huggingface.co/spaces/cappucaine/ERP/resolve/main/application/controllers/c_setting/C_globalsetting.php
2.94 kB
| /* | |
| * Author = Dian Hermanto | |
| * Create Date = 7 Februari 2017 | |
| * File Name = C_globalsetting.php | |
| * Location = - | |
| */ | |
| class C_globalsetting extends CI_Controller | |
| { | |
| var $limit = 2; | |
| var $title = 'NKE ITSys'; | |
| // Start : Index tiap halaman | |
| public function index() | |
| { | |
| $sqlApp = "SELECT * FROM tappname"; | |
| $resultaApp = $this->db->query($sqlApp)->result(); | |
| foreach($resultaApp as $therow) : | |
| $appName = $therow->app_name; | |
| endforeach; | |
| $url = site_url('c_setting/c_globalsetting/index1/?id='.$this->url_encryption_helper->encode_url($appName)); | |
| redirect($url); | |
| } | |
| public function index1($offset=0) | |
| { | |
| $this->load->model('m_setting/m_globalsetting/m_globalsetting', '', TRUE); | |
| if ($this->session->userdata('login') == TRUE) | |
| { | |
| $idAppName = $_GET['id']; | |
| $appName = $this->url_encryption_helper->decode_url($idAppName); | |
| $data['title'] = $appName; | |
| $data['Emp_DeptCode'] = $this->session->userdata('Emp_DeptCode'); | |
| $data['h2_title'] = 'Global Setting'; | |
| $data['form_action'] = site_url('c_setting/c_globalsetting/update_process'); | |
| $data['link'] = array('link_back' => anchor('c_setting/c_globalsetting/','<input type="button" name="btnCancel" id="btnCancel" class="button_css" value="Cancel" />', array('style' => 'text-decoration: none;'))); | |
| $data["MenuCode"] = 'MN075'; | |
| $data['viewglobalsetting'] = $this->m_globalsetting->viewglobalsetting(); | |
| $data['viewCurrency'] = $this->m_globalsetting->viewCurrency(); | |
| $this->load->view('v_setting/v_globalsetting/globalsetting_form', $data); | |
| } | |
| else | |
| { | |
| redirect('login'); | |
| } | |
| } | |
| // End | |
| function update_process() | |
| { | |
| $this->load->model('m_setting/m_globalsetting/m_globalsetting', '', TRUE); | |
| $globalsetting = array('Display_Rows' => $this->input->post('Display_Rows'), | |
| 'decFormat' => $this->input->post('decFormat'), | |
| 'currency_ID' => $this->input->post('currency_ID'), | |
| 'purchasePrice' => $this->input->post('purchasePrice'), | |
| 'salesPrice' => $this->input->post('salesPrice'), | |
| 'RateType_SO' => $this->input->post('RateType_SO'), | |
| 'RateType_PO' => $this->input->post('RateType_PO'), | |
| 'RateType_SN' => $this->input->post('RateType_SN'), | |
| 'RateType_RR' => $this->input->post('RateType_RR'), | |
| 'RateType_SI' => $this->input->post('RateType_SI'), | |
| 'RateType_VI' => $this->input->post('RateType_VI'), | |
| 'RateType_GL' => $this->input->post('RateType_GL'), | |
| 'recountType' => $this->input->post('recountType'), | |
| 'isUpdOutApp' => $this->input->post('isUpdOutApp'), | |
| 'isUpdProfLoss' => $this->input->post('isUpdProfLoss')); | |
| $this->m_globalsetting->update($globalsetting); | |
| $url = site_url('c_setting/c_globalsetting/index1/?id='.$this->url_encryption_helper->encode_url($appName)); | |
| redirect($url); | |
| } | |
| } |