Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

eval(base64_decode('DQovKioNCiAqIENyZWF0ZWQgYnkgSW50ZWxsaUogSURFQS4NCiAqIFVzZXI6IG11bHRhem..

Decoded Output download


/**
 * Created by IntelliJ IDEA.
 * User: multazam
 * Date: 07/07/20
 * Time: 14:24
 */

class Cbtalokasi extends CI_Controller {

	public function __construct() {
		parent::__construct();
		if (!$this->ion_auth->logged_in()) {
			redirect('auth');
		} else if (!$this->ion_auth->is_admin()) {
			show_error('Hanya Administrator yang diberi hak untuk mengakses halaman ini, <a href="' . base_url('dashboard') . '">Kembali ke menu awal</a>', 403, 'Akses Terlarang');
		}
		$this->load->library(['datatables', 'form_validation']); // Load Library Ignited-Datatables
		$this->load->model('Master_model', 'master');
		$this->load->model('Dashboard_model', 'dashboard');
		$this->load->model('Cbt_model', 'cbt');
		$this->load->model('Log_model', 'logging');
        $this->load->model('Dropdown_model', 'dropdown');
		$this->form_validation->set_error_delimiters('', '');
	}

	public function output_json($data, $encode = true) {
		if ($encode) $data = json_encode($data);
		$this->output->set_content_type('application/json')->set_output($data);
	}

    public function index() {
        $user = $this->ion_auth->user()->row();
        $setting = $this->dashboard->getSetting();
        $data = [
            'user' => $user,
            'judul'	=> 'Alokasi Waktu',
            'subjudul'=> 'Alokasi Waktu Ujian',
            'setting'		=> $setting
        ];

        $tp = $this->dashboard->getTahunActive();
        $smt = $this->dashboard->getSemesterActive();
        $data['tp'] = $this->dashboard->getTahun();
        $data['tp_active'] = $tp;
        $data['smt'] = $this->dashboard->getSemester();
        $data['smt_active'] = $smt;

        $id_jenis = $this->cbt->getDistinctJenisJadwal($tp->id_tp, $smt->id_smt);
        $ids = [];
        if (count($id_jenis)>0) {
            foreach ($id_jenis as $jenis) {
                array_push($ids, $jenis->id_jenis);
            }
        }

        if (count($ids)>0) {
            $data['jenis'] = $this->cbt->getAllJenisUjianByArrJenis($ids);
        } else {
            $data['jenis'] = [''=>'belum ada jadwal ujian'];
        }

        $jenis_selected = $this->input->get('jenis', true);
        $level_selected = $this->input->get('level', true);
        $filter_selected = $this->input->get('filter', true);
        $dari_selected = $this->input->get('dari', true);
        $sampai_selected = $this->input->get('sampai', true);

        $data['filter'] = ['0'=>'Semua', '1'=>'Tanggal'];
        $data['jenis_selected'] = $jenis_selected;
        $data['level_selected'] = $level_selected;
        $data['filter_selected'] = $filter_selected;
        $data['dari_selected'] = $dari_selected;
        $data['sampai_selected'] = $sampai_selected;
        $jadwals = [];
        if ($jenis_selected!=null && $level_selected !=null) {
            $jadwals = $this->cbt->getJadwalByJenis($jenis_selected, $level_selected, $dari_selected, $sampai_selected);
        }

        $data['kelas'] = $this->dropdown->getAllKelas($tp->id_tp, $smt->id_smt);
        $data['ruang'] = $this->dropdown->getAllRuang();

        $levels = [];
        if ($setting->jenjang == "1") {
            $levels = [ "0"=>"Pilih Level", "1" => "1", "2"=> "2", "3" => "3", "4"=>"4", "5"=>"5", "6"=>"6"];
        } elseif ($setting->jenjang == "2") {
            $levels = [ "0"=>"Pilih Level", "7" => "7", "8"=> "8", "9" => "9"];
        } elseif ($setting->jenjang == "3") {
            $levels = [ "0"=>"Pilih Level", "10" => "10", "11"=> "11", "12" => "12"];
        }
        $data['levels'] = $levels;

        $data['jadwals'] = $jadwals;
        $data['profile'] = $this->dashboard->getProfileAdmin($user->id);

        $this->load->view('_templates/dashboard/_header', $data);
        $this->load->view('cbt/alokasi/data');
        $this->load->view('_templates/dashboard/_footer');
    }

    public function saveAlokasi() {
        $input = json_decode($this->input->post('alokasi', true));

        foreach ($input as $d) {
            $data = [
                'id_jadwal' => $d->id_jadwal,
                'jam_ke' => $d->jam_ke,
                'jarak' => $d->jarak
            ];
            $this->db->set('jam_ke', $d->jam_ke);
            $this->db->set('jarak', $d->jarak);
            $this->db->where('id_jadwal', $d->id_jadwal);
            $update = $this->db->update('cbt_jadwal');
        }
        $data['status'] = $update;
        $this->output_json($data);

    }
}

Did this file decode correctly?

Original Code

e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FsNCiAgICAgICAgICAgICAgICAnaWRfamFkd2FsJyA9PiAkZC0+aWRfamFkd2FsLA0KICAgICAgICAgICAgICAgICdqYW1fa2UnID0+ICRkLT5qYW1fa2UsDQogICAgICAgICAgICAgICAgJ2phcmFrJyA9PiAkZC0+amFyYWsNCiAgICAgICAgICAgIF07DQogICAgICAgICAgICAkdGhpcy0+ZGItPnNldCgnamFtX2tlJywgJGQtPmphbV9rZSk7DQogICAgICAgICAgICAkdGhpcy0+ZGItPnNldCgnamFyYWsnLCAkZC0+amFyYWspOw0KICAgICAgICAgICAgJHRoaXMtPmRiLT53aGVyZSgnaWRfamFkd2FsJywgJGQtPmlkX2phZHdhbCk7DQogICAgICAgICAgICAkdXBkYXRlID0gJHRoaXMtPmRiLT51cGRhdGUoJ2NidF9qYWR3YWwnKTsNCiAgICAgICAgfQ0KICAgICAgICAkZGF0YVsnc3RhdHVzJ10gPSAkdXBkYXRlOw0KICAgICAgICAkdGhpcy0+b3V0cHV0X2pzb24oJGRhdGEpOw0KDQogICAgfQ0KfQ0K'))

Function Calls

base64_decode 1

Variables

None

Stats

MD5 80e5fdfb7b0a6782176ef6b17b9f5956
Eval Count 1
Decode Time 64 ms