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

Signing you up...

Thank you for signing up!

PHP Decode

<?php defined("\102\x41\x53\x45\x50\101\x54\110") or die("\x4e\x6f\40\144\x69\162\x65\x63..

Decoded Output download

<?php 
defined("BASEPATH") or die("No direct script access allowed"); 
class Set_mapel extends CI_Controller 
{ 
    function __construct() 
    { 
        parent::__construct(); 
        $this->sespre = $this->config->item("session_name_prefix"); 
        $this->d["admlevel"] = $this->session->userdata($this->sespre . "level"); 
        $this->d["url"] = "set_mapel"; 
        $this->d["idnya"] = "setmapel"; 
        $this->d["nama_form"] = "f_setmapel"; 
        $get_tasm = $this->db->query("SELECT tahun FROM tahun WHERE aktif = 'Y'")->row_array(); 
        $this->d["tasm"] = $get_tasm["tahun"]; 
    } 
    public function datatable() 
    { 
        $start = $this->input->post("start"); 
        $length = $this->input->post("length"); 
        $draw = $this->input->post("draw"); 
        $search = $this->input->post("search"); 
        $d_total_row = $this->db->query("SELECT\xa                                        a.id, b.nama nmguru, c.nama nmkelas, d.nama nmmapel
                                        FROM t_guru_mapel a
                                        INNER JOIN m_guru b ON a.id_guru = b.id\xa                                        INNER JOIN m_kelas c ON a.id_kelas = c.id\xa                                        INNER JOIN m_mapel d ON a.id_mapel = d.id\xa                                        WHERE a.tasm = '" . $this->d["tasm"] . "'
                                        ORDER BY nmguru ASC, nmmapel ASC, nmkelas ASC")->num_rows(); 
        $q_datanya = $this->db->query("SELECT\xa                                    a.id, b.nama nmguru, c.nama nmkelas, d.nama nmmapel
                                    FROM t_guru_mapel a\xa                                    INNER JOIN m_guru b ON a.id_guru = b.id\xa                                    INNER JOIN m_kelas c ON a.id_kelas = c.id\xa                                    INNER JOIN m_mapel d ON a.id_mapel = d.id\xa                                    WHERE a.tasm = '" . $this->d["tasm"] . "' AND \xa                                    (b.nama LIKE '%" . $search["value"] . "%' \xa                                    OR c.nama LIKE '%" . $search["value"] . "%'\xa                                    OR d.nama LIKE '%" . $search["value"] . "%')
                                    ORDER BY nmguru ASC, nmmapel ASC, nmkelas ASC\xa                                    LIMIT " . $start . ", " . $length . '')->result_array(); 
        $data = array(); 
        $no = $start + 1; 
        foreach ($q_datanya as $d) { 
            $data_ok = array(); 
            $data_ok[0] = $no++; 
            $data_ok[1] = $d["nmguru"]; 
            $data_ok[2] = $d["nmmapel"] . " - " . $d["nmkelas"]; 
            $data_ok[3] = "<a href="#" onclick="return hapus('" . $d["id"] . "');" class="btn btn-xs btn-danger"><i class="fa fa-remove"></i> Hapus</a> "; 
            $data[] = $data_ok; 
        } 
        $json_data = array("draw" => $draw, "iTotalRecords" => $d_total_row, "iTotalDisplayRecords" => $d_total_row, "data" => $data); 
        j($json_data); 
        die; 
    } 
    public function edit($id) 
    { 
        $q = $this->db->query("SELECT id, nama FROM m_guru ORDER BY id ASC"); 
        $r = $this->db->query("SELECT id, nama FROM m_mapel ORDER BY id ASC"); 
        $s = $this->db->query("SELECT id, nama FROM m_kelas ORDER BY nama ASC"); 
        $this->d["r_guru"] = $q->result_array(); 
        $this->d["r_mapel"] = $r->result_array(); 
        $this->d["r_kelas"] = $s->result_array(); 
        $this->d["p"] = "form"; 
        $this->load->view("template_utama", $this->d); 
    } 
    public function simpan() 
    { 
        $p = $this->input->post(); 
        $tasm = substr($this->d["tasm"], 0, 4); 
        $jumlah_sudah = 0; 
        foreach ($p["data_pilih"] as $s) { 
            foreach ($p["mapel_pilih"] as $mp) { 
                $cek = $this->db->query("SELECT id FROM t_guru_mapel WHERE tasm = '" . $this->d["tasm"] . "' AND id_mapel = '" . $mp . "' AND id_kelas = '{$s}'")->num_rows(); 
                if ($cek > 0) { 
                    $jumlah_sudah++; 
                } else { 
                    $this->db->query("INSERT INTO t_guru_mapel (tasm, id_guru, id_kelas, id_mapel) VALUES ('" . $this->d["tasm"] . "', '" . $p["guru"] . "', '" . $s . "', '" . $mp . "')"); 
                } 
            } 
            $cek = $this->db->query("SELECT id FROM t_walikelas WHERE id_kelas = '" . $s . "' AND tasm = '" . $tasm . "'")->num_rows(); 
            if ($cek == 0) { 
                $this->db->query("INSERT INTO t_walikelas (tasm, id_guru, id_kelas) VALUES ('" . $tasm . "', '" . $p["guru"] . "', '" . $s . "')"); 
            } 
        } 
        if ($jumlah_sudah > 0) { 
            $this->session->set_flashdata("k", "<div class="alert alert-danger">" . $jumlah_sudah . " mata pelajaran, sudah ada gurunya. Data tidak masuk..</div>"); 
        } else { 
            $this->session->set_flashdata("k", "<div class="alert alert-success">Berhasil disimpan</div>"); 
        } 
        redirect($this->d["url"]); 
    } 
    public function hapus($id) 
    { 
        $this->db->query("DELETE FROM t_guru_mapel WHERE id = '{$id}'"); 
        $d["status"] = "ok"; 
        $d["data"] = "Data berhasil dihapus"; 
        j($d); 
    } 
    public function copy_semester_lalu() 
    { 
        $sekarang = $this->d["tasm"]; 
        $tahun_lalu = intval(substr($sekarang, 0, 4)); 
        $semester_lalu = intval(substr($sekarang, 4, 1)); 
        if ($semester_lalu == 1) { 
            $tahun_lalu = $tahun_lalu - 1; 
            $semester_lalu = 2; 
        } else { 
            $tahun_lalu = $tahun_lalu; 
            $semester_lalu = 1; 
        } 
        $semester_yll = $tahun_lalu . $semester_lalu; 
        $queri = $this->db->query("SELECT * FROM t_guru_mapel WHERE tasm = '" . $semester_yll . "'")->result_array(); 
        $arre_input = array(); 
        if (!empty($queri)) { 
            foreach ($queri as $d) { 
                $teks1 = "('" . $sekarang . "', '" . $d["id_guru"] . "', '" . $d["id_kelas"] . "', '" . $d["id_mapel"] . "')"; 
                $arre_input[] = $teks1; 
            } 
        } 
        $hapus_sekarang = $this->db->query("DELETE FROM t_guru_mapel WHERE tasm = '" . $sekarang . "'"); 
        $queri_input = "INSERT INTO t_guru_mapel (tasm, id_guru, id_kelas, id_mapel) VALUES " . implode(",", $arre_input) . ";"; 
        $this->db->query($queri_input); 
        redirect("set_mapel"); 
    } 
    public function index() 
    { 
        $this->d["p"] = "list"; 
        $this->load->view("template_utama", $this->d); 
    } 
} ?>

Did this file decode correctly?

Original Code

<?php
defined("\102\x41\x53\x45\x50\101\x54\110") or die("\x4e\x6f\40\144\x69\162\x65\x63\x74\x20\163\143\x72\151\x70\x74\40\x61\143\143\x65\x73\x73\40\x61\154\154\x6f\167\145\x64");
class Set_mapel extends CI_Controller
{
    function __construct()
    {
        parent::__construct();
        $this->sespre = $this->config->item("\163\x65\163\163\x69\x6f\x6e\x5f\x6e\141\155\145\x5f\160\162\145\146\x69\170");
        $this->d["\141\144\x6d\x6c\145\166\145\154"] = $this->session->userdata($this->sespre . "\154\x65\166\145\x6c");
        $this->d["\x75\x72\154"] = "\x73\x65\x74\137\x6d\141\160\145\x6c";
        $this->d["\151\x64\x6e\x79\141"] = "\x73\x65\164\x6d\x61\x70\x65\x6c";
        $this->d["\x6e\x61\x6d\x61\x5f\x66\157\162\155"] = "\x66\x5f\163\x65\x74\x6d\141\x70\x65\x6c";
        $get_tasm = $this->db->query("\123\x45\114\x45\103\x54\40\164\x61\150\165\x6e\40\106\122\117\x4d\40\x74\x61\x68\165\x6e\x20\127\110\x45\x52\105\x20\141\x6b\164\151\146\x20\75\40\47\x59\x27")->row_array();
        $this->d["\164\141\163\x6d"] = $get_tasm["\164\x61\x68\x75\156"];
    }
    public function datatable()
    {
        $start = $this->input->post("\163\164\141\162\164");
        $length = $this->input->post("\154\x65\156\x67\x74\150");
        $draw = $this->input->post("\x64\x72\141\x77");
        $search = $this->input->post("\x73\x65\x61\162\143\x68");
        $d_total_row = $this->db->query("\x53\105\114\105\103\124\xa\40\x20\x20\x20\40\40\40\x20\40\40\40\x20\x20\40\x20\40\x20\x20\40\x20\x20\x20\x20\x20\40\x20\x20\x20\40\40\x20\40\40\40\40\x20\40\40\40\40\x61\x2e\x69\144\54\x20\142\56\x6e\x61\155\x61\x20\156\155\147\x75\162\165\x2c\40\x63\x2e\x6e\x61\x6d\141\x20\156\155\x6b\145\154\x61\163\54\x20\144\56\156\141\x6d\141\x20\156\x6d\x6d\x61\160\x65\154\12\40\x20\x20\x20\x20\40\x20\40\40\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\40\40\40\x20\x20\x20\x20\40\x20\40\40\x20\x20\40\x20\x20\40\40\x20\x20\x20\x46\122\x4f\x4d\x20\164\137\147\165\x72\x75\137\x6d\141\x70\145\x6c\40\x61\12\x20\x20\x20\x20\40\x20\x20\40\40\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\40\40\40\x20\40\40\x20\x20\x20\40\x20\x20\40\x20\40\x20\40\x20\x20\x20\x49\x4e\x4e\105\122\40\112\x4f\111\116\40\155\137\147\165\x72\x75\x20\142\40\x4f\x4e\40\x61\56\151\144\137\x67\x75\x72\165\40\x3d\x20\x62\56\151\144\xa\40\x20\40\40\40\40\x20\40\40\40\x20\x20\x20\40\40\x20\x20\x20\40\40\40\x20\40\x20\40\40\x20\40\x20\x20\40\40\x20\x20\x20\x20\x20\x20\x20\40\111\116\x4e\105\122\40\112\x4f\111\x4e\x20\155\x5f\153\x65\154\141\163\x20\x63\x20\117\x4e\x20\x61\x2e\151\x64\x5f\153\145\154\x61\163\x20\75\x20\143\x2e\x69\x64\xa\40\x20\x20\x20\40\40\40\x20\40\x20\x20\x20\40\x20\x20\40\40\x20\40\x20\x20\40\x20\x20\x20\x20\x20\40\40\x20\x20\x20\40\x20\40\40\40\x20\40\40\111\116\116\105\122\x20\x4a\x4f\x49\x4e\x20\155\137\x6d\x61\x70\x65\x6c\x20\x64\40\x4f\x4e\x20\x61\56\151\144\x5f\155\x61\x70\145\154\40\x3d\40\x64\x2e\151\x64\xa\40\x20\x20\40\x20\40\x20\40\40\x20\x20\40\x20\40\40\40\x20\x20\40\x20\40\40\40\40\40\40\x20\40\40\40\40\x20\40\x20\x20\x20\x20\40\40\40\x57\x48\105\122\x45\x20\x61\56\164\x61\x73\155\x20\x3d\40\47" . $this->d["\164\x61\x73\155"] . "\x27\12\x20\40\40\x20\x20\40\40\40\x20\x20\40\x20\x20\x20\x20\x20\40\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\40\x20\x20\40\40\40\x20\40\x20\x20\x20\40\x20\117\x52\104\x45\122\40\x42\131\40\x6e\155\147\x75\162\165\40\x41\x53\x43\54\x20\x6e\x6d\155\x61\x70\145\x6c\x20\101\123\x43\54\x20\156\x6d\x6b\x65\154\x61\x73\40\x41\x53\103")->num_rows();
        $q_datanya = $this->db->query("\123\105\114\105\x43\124\xa\40\40\40\40\x20\x20\40\40\x20\x20\x20\40\x20\40\40\40\40\x20\x20\x20\x20\x20\40\40\40\40\x20\40\40\40\x20\40\40\40\x20\40\141\56\x69\x64\54\x20\x62\56\156\141\x6d\x61\x20\156\x6d\x67\165\x72\x75\x2c\x20\143\x2e\156\141\x6d\x61\40\x6e\x6d\153\145\x6c\x61\163\54\40\144\56\x6e\x61\155\x61\x20\x6e\155\155\141\x70\145\154\12\40\x20\40\40\x20\x20\x20\x20\40\40\x20\x20\40\40\40\x20\x20\x20\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\40\x20\40\40\x20\x20\x46\122\x4f\115\x20\x74\x5f\147\165\x72\165\x5f\155\x61\x70\145\154\x20\x61\xa\x20\40\x20\x20\x20\x20\40\40\x20\x20\x20\x20\x20\x20\x20\40\40\40\40\x20\40\x20\40\40\x20\40\x20\x20\40\40\40\40\40\40\x20\40\111\116\116\105\x52\40\112\x4f\111\x4e\x20\x6d\x5f\x67\165\x72\x75\x20\142\40\117\116\x20\x61\x2e\x69\x64\137\x67\165\x72\165\40\x3d\40\x62\56\151\144\xa\x20\40\40\x20\x20\x20\x20\x20\x20\40\x20\x20\40\40\x20\40\40\x20\x20\40\x20\40\x20\40\x20\40\40\x20\x20\40\x20\40\x20\40\40\x20\x49\x4e\116\105\x52\40\x4a\117\111\x4e\40\x6d\137\x6b\x65\154\x61\163\40\143\x20\x4f\x4e\x20\x61\56\x69\x64\137\153\x65\x6c\141\163\40\75\x20\x63\56\151\x64\xa\x20\x20\40\x20\x20\40\40\40\40\40\x20\x20\40\40\x20\40\40\40\40\x20\40\x20\40\40\40\40\x20\40\40\x20\x20\40\x20\40\x20\40\x49\x4e\x4e\105\x52\x20\112\117\x49\x4e\40\155\x5f\x6d\141\160\145\154\x20\144\x20\x4f\116\40\x61\x2e\151\x64\137\x6d\141\x70\x65\154\x20\x3d\40\144\56\151\144\xa\40\x20\x20\x20\40\40\40\x20\x20\x20\x20\x20\40\40\x20\x20\x20\40\x20\40\x20\40\x20\x20\40\x20\x20\40\x20\40\40\40\40\x20\40\40\x57\x48\105\x52\105\40\141\x2e\x74\141\163\x6d\x20\x3d\40\47" . $this->d["\164\141\x73\155"] . "\x27\x20\x41\116\104\x20\xa\x20\x20\40\x20\40\40\x20\40\x20\x20\40\x20\x20\40\40\40\40\x20\40\x20\40\x20\40\x20\40\x20\x20\40\40\x20\x20\40\40\x20\40\40\50\142\56\x6e\x61\155\x61\x20\x4c\x49\x4b\105\40\47\x25" . $search["\x76\x61\154\165\x65"] . "\45\47\x20\xa\x20\x20\x20\40\x20\x20\x20\40\x20\x20\x20\40\x20\x20\x20\40\x20\40\40\x20\40\x20\40\x20\40\40\x20\40\40\40\x20\x20\x20\40\x20\40\117\x52\40\143\56\156\x61\155\x61\40\x4c\x49\x4b\105\x20\47\x25" . $search["\x76\141\x6c\x75\x65"] . "\45\47\xa\40\40\x20\x20\40\x20\x20\40\40\x20\x20\40\40\x20\40\40\40\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\40\40\40\x20\x20\40\40\x20\117\x52\40\144\56\156\141\155\141\40\114\111\x4b\x45\x20\x27\x25" . $search["\x76\141\154\165\145"] . "\45\x27\51\12\40\x20\40\x20\40\x20\40\40\x20\x20\x20\x20\40\x20\x20\40\40\x20\x20\40\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\117\122\104\x45\x52\40\102\x59\x20\156\155\147\165\162\165\40\101\x53\103\54\x20\x6e\x6d\155\141\x70\145\x6c\x20\x41\123\103\x2c\x20\x6e\155\x6b\145\x6c\x61\x73\40\101\123\x43\xa\40\x20\x20\x20\40\40\40\40\x20\x20\40\40\x20\x20\40\40\x20\40\x20\x20\x20\40\x20\x20\x20\40\40\x20\x20\40\x20\x20\x20\40\40\40\x4c\x49\x4d\111\124\40" . $start . "\x2c\40" . $length . '')->result_array();
        $data = array();
        $no = $start + 1;
        foreach ($q_datanya as $d) {
            $data_ok = array();
            $data_ok[0] = $no++;
            $data_ok[1] = $d["\156\155\147\x75\x72\x75"];
            $data_ok[2] = $d["\156\155\155\x61\160\145\154"] . "\x20\55\x20" . $d["\x6e\x6d\153\x65\x6c\x61\x73"];
            $data_ok[3] = "\x3c\x61\x20\150\x72\x65\x66\x3d\x22\x23\x22\x20\x6f\156\x63\154\151\x63\153\75\x22\x72\x65\164\x75\162\156\40\150\141\x70\165\x73\50\47" . $d["\x69\x64"] . "\47\51\73\42\40\x63\154\x61\163\x73\75\42\142\x74\156\x20\x62\164\x6e\55\170\x73\40\142\164\156\x2d\x64\141\156\147\145\x72\42\x3e\x3c\x69\40\143\x6c\141\163\x73\x3d\x22\x66\x61\x20\146\x61\55\162\145\x6d\157\x76\x65\42\x3e\x3c\57\x69\76\x20\x48\x61\160\165\163\x3c\57\x61\76\x20";
            $data[] = $data_ok;
        }
        $json_data = array("\x64\x72\141\x77" => $draw, "\x69\124\x6f\164\x61\x6c\122\x65\x63\x6f\162\x64\163" => $d_total_row, "\151\124\x6f\x74\x61\154\104\151\163\x70\154\x61\171\122\145\143\157\162\x64\x73" => $d_total_row, "\x64\141\164\141" => $data);
        j($json_data);
        die;
    }
    public function edit($id)
    {
        $q = $this->db->query("\x53\105\114\x45\103\124\40\151\144\54\x20\156\x61\x6d\x61\x20\106\x52\x4f\115\40\155\137\147\165\x72\165\x20\117\122\x44\105\x52\40\x42\131\40\x69\144\x20\101\123\103");
        $r = $this->db->query("\x53\x45\114\x45\x43\x54\40\151\x64\54\x20\x6e\141\x6d\x61\x20\106\x52\x4f\x4d\40\x6d\137\x6d\x61\160\x65\x6c\40\x4f\x52\x44\105\x52\40\x42\x59\x20\151\x64\x20\101\x53\x43");
        $s = $this->db->query("\x53\x45\114\105\103\124\x20\x69\144\54\x20\156\141\x6d\x61\40\x46\122\117\115\40\x6d\137\x6b\145\154\x61\163\40\117\122\104\x45\122\x20\102\131\40\x6e\x61\155\x61\x20\101\x53\103");
        $this->d["\162\137\x67\165\x72\165"] = $q->result_array();
        $this->d["\162\x5f\x6d\x61\x70\x65\x6c"] = $r->result_array();
        $this->d["\162\137\153\145\154\x61\163"] = $s->result_array();
        $this->d["\x70"] = "\x66\x6f\162\155";
        $this->load->view("\x74\x65\x6d\160\x6c\141\164\x65\x5f\165\164\141\x6d\141", $this->d);
    }
    public function simpan()
    {
        $p = $this->input->post();
        $tasm = substr($this->d["\164\x61\163\x6d"], 0, 4);
        $jumlah_sudah = 0;
        foreach ($p["\x64\x61\x74\141\137\160\x69\x6c\x69\150"] as $s) {
            foreach ($p["\x6d\141\160\145\154\x5f\160\151\x6c\151\150"] as $mp) {
                $cek = $this->db->query("\x53\105\x4c\105\x43\124\40\x69\144\x20\106\x52\x4f\115\x20\x74\x5f\147\165\162\x75\x5f\x6d\x61\x70\145\154\40\127\110\105\122\105\x20\x74\141\163\x6d\40\75\40\47" . $this->d["\164\141\163\x6d"] . "\47\40\101\x4e\104\40\151\x64\137\155\x61\160\145\154\40\x3d\40\47" . $mp . "\x27\x20\101\x4e\x44\x20\x69\x64\137\x6b\145\x6c\x61\163\x20\75\40\x27{$s}\47")->num_rows();
                if ($cek > 0) {
                    $jumlah_sudah++;
                } else {
                    $this->db->query("\x49\x4e\x53\105\x52\124\x20\x49\x4e\x54\117\x20\x74\137\147\x75\162\165\137\x6d\x61\160\145\x6c\40\50\164\141\163\x6d\54\x20\151\144\x5f\x67\x75\162\x75\54\40\x69\x64\x5f\153\145\x6c\141\x73\x2c\x20\151\144\137\155\x61\160\x65\x6c\51\40\x56\101\x4c\x55\x45\x53\x20\50\x27" . $this->d["\x74\141\x73\155"] . "\47\54\40\x27" . $p["\x67\x75\162\165"] . "\47\x2c\40\x27" . $s . "\47\54\40\47" . $mp . "\x27\x29");
                }
            }
            $cek = $this->db->query("\x53\x45\114\x45\x43\124\40\x69\144\40\106\x52\x4f\x4d\40\164\137\x77\x61\154\x69\153\x65\x6c\x61\163\x20\x57\x48\105\122\x45\40\151\144\137\153\145\154\x61\x73\40\x3d\x20\x27" . $s . "\47\x20\x41\116\x44\40\x74\141\x73\x6d\40\x3d\x20\47" . $tasm . "\47")->num_rows();
            if ($cek == 0) {
                $this->db->query("\x49\x4e\123\105\x52\124\40\x49\116\124\117\x20\x74\x5f\167\141\154\x69\x6b\x65\x6c\x61\163\x20\50\x74\141\x73\x6d\54\40\x69\x64\x5f\x67\x75\162\x75\54\x20\151\x64\x5f\x6b\x65\154\x61\163\x29\x20\x56\x41\x4c\x55\105\x53\40\50\x27" . $tasm . "\47\x2c\40\47" . $p["\147\165\x72\165"] . "\x27\x2c\x20\x27" . $s . "\x27\x29");
            }
        }
        if ($jumlah_sudah > 0) {
            $this->session->set_flashdata("\153", "\74\x64\x69\166\x20\143\154\141\x73\163\75\x22\x61\x6c\x65\162\164\x20\141\154\x65\x72\x74\55\144\141\x6e\x67\x65\x72\42\76" . $jumlah_sudah . "\40\x6d\x61\164\x61\x20\x70\145\x6c\x61\x6a\141\162\141\x6e\x2c\x20\x73\165\144\141\150\x20\141\144\141\40\x67\165\x72\x75\x6e\171\141\x2e\x20\104\141\164\x61\40\x74\x69\144\141\153\x20\x6d\141\x73\x75\153\x2e\x2e\x3c\x2f\x64\151\x76\76");
        } else {
            $this->session->set_flashdata("\x6b", "\x3c\x64\x69\x76\40\143\154\x61\163\x73\75\x22\141\154\x65\x72\164\x20\x61\154\145\x72\164\x2d\163\165\143\x63\145\x73\x73\42\76\x42\145\162\150\x61\x73\151\x6c\40\144\151\x73\151\x6d\x70\x61\x6e\x3c\x2f\x64\x69\166\76");
        }
        redirect($this->d["\x75\162\x6c"]);
    }
    public function hapus($id)
    {
        $this->db->query("\x44\105\x4c\105\x54\x45\40\106\x52\117\115\40\x74\x5f\x67\x75\162\165\x5f\155\141\x70\x65\x6c\40\127\x48\x45\122\105\40\151\x64\x20\x3d\x20\x27{$id}\47");
        $d["\163\x74\x61\164\x75\x73"] = "\x6f\153";
        $d["\144\141\x74\x61"] = "\104\x61\164\x61\x20\x62\x65\162\x68\x61\x73\151\154\40\144\151\x68\141\160\165\163";
        j($d);
    }
    public function copy_semester_lalu()
    {
        $sekarang = $this->d["\164\141\x73\x6d"];
        $tahun_lalu = intval(substr($sekarang, 0, 4));
        $semester_lalu = intval(substr($sekarang, 4, 1));
        if ($semester_lalu == 1) {
            $tahun_lalu = $tahun_lalu - 1;
            $semester_lalu = 2;
        } else {
            $tahun_lalu = $tahun_lalu;
            $semester_lalu = 1;
        }
        $semester_yll = $tahun_lalu . $semester_lalu;
        $queri = $this->db->query("\123\x45\114\x45\x43\x54\x20\x2a\40\x46\122\x4f\x4d\40\x74\137\147\165\x72\x75\x5f\155\141\160\145\154\40\x57\x48\105\x52\105\x20\164\141\163\x6d\x20\x3d\40\47" . $semester_yll . "\x27")->result_array();
        $arre_input = array();
        if (!empty($queri)) {
            foreach ($queri as $d) {
                $teks1 = "\50\47" . $sekarang . "\47\x2c\40\x27" . $d["\x69\x64\x5f\x67\165\162\x75"] . "\47\x2c\40\x27" . $d["\151\144\137\153\x65\x6c\x61\163"] . "\47\54\40\x27" . $d["\x69\x64\137\x6d\x61\160\145\x6c"] . "\47\51";
                $arre_input[] = $teks1;
            }
        }
        $hapus_sekarang = $this->db->query("\104\x45\x4c\105\x54\105\40\x46\122\117\x4d\x20\x74\x5f\147\165\x72\165\x5f\x6d\141\160\145\154\40\x57\110\105\122\x45\x20\164\x61\x73\x6d\x20\75\x20\47" . $sekarang . "\47");
        $queri_input = "\x49\116\x53\105\x52\x54\x20\x49\x4e\124\117\x20\164\137\x67\x75\x72\165\x5f\x6d\x61\x70\x65\x6c\x20\x28\164\x61\x73\155\x2c\40\151\144\x5f\147\165\x72\x75\x2c\x20\x69\144\137\153\145\x6c\x61\x73\x2c\40\151\144\137\x6d\141\x70\145\154\x29\40\126\101\x4c\x55\x45\x53\40" . implode("\54", $arre_input) . "\73";
        $this->db->query($queri_input);
        redirect("\x73\x65\x74\137\155\x61\x70\x65\x6c");
    }
    public function index()
    {
        $this->d["\160"] = "\x6c\151\163\164";
        $this->load->view("\164\x65\155\x70\x6c\x61\164\x65\137\x75\164\x61\x6d\141", $this->d);
    }
}

Function Calls

None

Variables

None

Stats

MD5 cb3322f75e89412274ae8e8df74bb163
Eval Count 0
Decode Time 128 ms