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\101\x53\105\120\x41\124\110") or die("\x4e\157\x20\x64\151\162\x65\x6..
Decoded Output download
<?php
defined("BASEPATH") or die("No direct script access allowed");
class N_tumbuh 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["admkonid"] = $this->session->userdata($this->sespre . "konid");
$this->d["walikelas"] = $this->session->userdata($this->sespre . "walikelas");
$this->d["url"] = "n_tumbuh";
$get_tasm = $this->db->query("SELECT tahun FROM tahun WHERE aktif = 'Y'")->row_array();
$this->d["tasm"] = $get_tasm["tahun"];
$this->d["ta"] = substr($this->d["tasm"], 0, 4);
$wali = $this->session->userdata($this->sespre . "walikelas");
$this->d["id_kelas"] = $wali["id_walikelas"];
$this->d["nama_kelas"] = $wali["nama_walikelas"];
}
public function ambil_siswa($id_ekstra)
{
$list_data = array();
$strq_sudah_ada_data = "select \xa a.id_siswa ids, c.nama nmsiswa, a.nilai, a.desk
from t_nilai_tumbuh a
inner join t_kelas_siswa b on a.id_siswa = b.id_siswa\xa inner join m_siswa c on b.id_siswa = c.id\xa inner join m_tumbuh d on a.id_ekstra = d.id\xa where a.id_ekstra = '" . $id_ekstra . "' \xa and b.id_kelas = '" . $this->d["id_kelas"] . "' \xa and a.tasm = '" . $this->d["tasm"] . "' \xa and b.ta = '" . $this->d["ta"] . "'";
$strq_belum_ada_data = "select \xa a.id_siswa ids, b.nama nmsiswa, '' nilai, '' desk\xa from t_kelas_siswa a
inner join m_siswa b on a.id_siswa = b.id
where a.id_kelas = '" . $this->d["id_kelas"] . "' and a.ta = '" . $this->d["ta"] . "'";
$ambil_nilai = $this->db->query($strq_sudah_ada_data)->result_array();
if (empty($ambil_nilai)) {
$list_data = $this->db->query($strq_belum_ada_data)->result_array();
$d["ambil_mana"] = "data nilai kosong";
} else {
$list_data = $ambil_nilai;
$d["ambil_mana"] = "data nilai real";
}
$d["status"] = "ok";
$d["data"] = $list_data;
j($d);
}
public function simpan_nilai()
{
$p = $this->input->post();
$jumlah_sudah = 0;
$i = 0;
foreach ($p["nilai"] as $s) {
$cek = $this->db->query("SELECT id FROM t_nilai_tumbuh WHERE tasm = '" . $this->d["tasm"] . "' AND id_ekstra = '" . $p["id_ekstra"] . "' AND id_siswa = '" . $p["id_siswa"][$i] . "'")->num_rows();
if ($cek > 0) {
$jumlah_sudah++;
$this->db->query("UPDATE t_nilai_tumbuh SET nilai = '{$s}', desk = '" . $p["nilai_d"][$i] . "' WHERE tasm = '" . $this->d["tasm"] . "' AND id_ekstra = '" . $p["id_ekstra"] . "' AND id_siswa = '" . $p["id_siswa"][$i] . "'");
} else {
$this->db->query("INSERT INTO t_nilai_tumbuh (tasm, id_ekstra, id_siswa, nilai, desk) VALUES ('" . $this->d["tasm"] . "', '" . $p["id_ekstra"] . "', '" . $p["id_siswa"][$i] . "', '" . $s . "', '" . $p["nilai_d"][$i] . "')");
}
$i++;
}
$d["status"] = "ok";
$d["data"] = "Data berhasil disimpan";
j($d);
}
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 index()
{
$this->d["list_kd"] = $this->db->query("SELECT * FROM m_tumbuh")->result_array();
$this->d["p"] = "list";
$this->load->view("template_utama", $this->d);
}
} ?>
Did this file decode correctly?
Original Code
<?php
defined("\102\101\x53\105\120\x41\124\110") or die("\x4e\157\x20\x64\151\162\x65\x63\x74\40\x73\x63\162\x69\x70\x74\40\x61\x63\x63\x65\x73\163\40\x61\x6c\154\x6f\x77\145\144");
class N_tumbuh extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->sespre = $this->config->item("\x73\145\163\x73\x69\157\x6e\x5f\x6e\x61\x6d\145\x5f\x70\162\x65\146\151\170");
$this->d["\x61\144\x6d\154\145\x76\145\x6c"] = $this->session->userdata($this->sespre . "\154\x65\166\145\154");
$this->d["\x61\144\155\x6b\157\x6e\x69\x64"] = $this->session->userdata($this->sespre . "\x6b\157\x6e\x69\x64");
$this->d["\x77\141\154\151\153\145\154\x61\x73"] = $this->session->userdata($this->sespre . "\167\x61\154\x69\153\145\154\141\163");
$this->d["\x75\162\x6c"] = "\x6e\137\x74\165\x6d\142\x75\150";
$get_tasm = $this->db->query("\x53\105\x4c\105\103\x54\x20\164\x61\150\165\x6e\x20\106\x52\117\x4d\x20\x74\141\150\165\156\40\127\x48\105\122\105\40\141\153\x74\x69\146\40\75\x20\x27\x59\x27")->row_array();
$this->d["\x74\x61\x73\155"] = $get_tasm["\164\141\x68\x75\156"];
$this->d["\x74\141"] = substr($this->d["\x74\141\163\155"], 0, 4);
$wali = $this->session->userdata($this->sespre . "\167\x61\x6c\151\x6b\x65\154\141\163");
$this->d["\151\x64\x5f\x6b\145\154\x61\x73"] = $wali["\x69\x64\137\167\141\x6c\x69\x6b\145\154\141\x73"];
$this->d["\x6e\x61\x6d\141\137\153\x65\154\x61\x73"] = $wali["\x6e\141\155\x61\x5f\167\x61\154\151\x6b\x65\x6c\141\163"];
}
public function ambil_siswa($id_ekstra)
{
$list_data = array();
$strq_sudah_ada_data = "\163\145\154\145\143\x74\40\xa\40\x20\40\x20\x20\x20\x20\40\x20\40\x20\40\x20\40\40\40\141\x2e\151\x64\x5f\x73\151\163\167\x61\40\x69\x64\163\54\x20\x63\56\x6e\x61\155\x61\x20\x6e\155\x73\151\x73\167\141\54\x20\x61\56\x6e\151\154\x61\151\x2c\x20\x61\x2e\144\145\163\153\12\x20\40\40\40\x20\x20\x20\x20\x20\x20\40\x20\40\x20\40\40\146\x72\157\x6d\40\x74\x5f\x6e\151\154\141\151\x5f\164\x75\x6d\142\x75\150\x20\x61\x20\12\40\x20\40\x20\40\40\x20\x20\40\x20\40\40\40\x20\x20\x20\x69\156\156\145\162\x20\x6a\x6f\x69\156\x20\164\137\153\145\154\x61\163\x5f\x73\x69\x73\167\141\40\142\x20\x6f\x6e\x20\x61\x2e\x69\144\137\163\151\x73\x77\141\x20\x3d\x20\x62\x2e\x69\144\x5f\163\151\x73\x77\x61\xa\40\x20\x20\40\x20\40\40\40\x20\x20\x20\x20\x20\40\x20\x20\151\156\156\x65\x72\x20\152\157\151\156\40\x6d\x5f\163\x69\x73\167\141\40\143\x20\x6f\x6e\x20\142\x2e\151\144\137\163\151\163\167\141\x20\x3d\40\143\x2e\x69\x64\xa\x20\x20\x20\40\x20\40\x20\40\40\40\x20\x20\40\x20\x20\40\x69\x6e\156\145\162\x20\152\157\x69\x6e\40\x6d\x5f\x74\165\155\142\165\150\40\144\x20\157\156\40\141\56\151\144\x5f\145\x6b\x73\164\x72\x61\40\x3d\x20\x64\x2e\x69\144\xa\x20\x20\40\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\40\x20\x20\x77\150\x65\162\145\40\x61\56\151\144\x5f\145\153\x73\x74\162\x61\x20\75\x20\47" . $id_ekstra . "\x27\40\xa\x20\x20\x20\40\x20\40\40\40\40\40\40\40\x20\x20\40\x20\x61\156\144\40\x62\x2e\x69\x64\x5f\153\x65\x6c\x61\163\x20\x3d\x20\x27" . $this->d["\151\x64\137\153\x65\x6c\141\x73"] . "\x27\x20\xa\x20\x20\40\x20\x20\40\x20\40\40\x20\x20\40\x20\40\40\x20\141\156\144\x20\141\56\164\x61\163\155\x20\x3d\40\x27" . $this->d["\164\x61\163\x6d"] . "\x27\40\xa\40\x20\40\x20\40\x20\40\x20\x20\x20\x20\40\40\x20\x20\40\x61\x6e\144\x20\142\56\164\x61\40\x3d\x20\x27" . $this->d["\x74\x61"] . "\47";
$strq_belum_ada_data = "\163\145\154\x65\x63\164\40\xa\x20\40\x20\x20\x20\40\x20\40\x20\x20\40\x20\x20\x20\40\x20\141\56\x69\144\x5f\x73\x69\163\167\x61\40\151\144\x73\x2c\x20\x62\56\156\x61\x6d\141\40\156\155\163\151\x73\167\x61\54\40\x27\47\x20\156\x69\x6c\x61\151\x2c\x20\x27\x27\x20\144\145\x73\x6b\xa\x20\40\40\40\x20\x20\40\40\40\40\40\x20\40\40\x20\x20\146\162\x6f\155\40\164\137\x6b\145\154\x61\x73\x5f\163\151\x73\x77\x61\x20\x61\x20\12\40\x20\x20\40\x20\x20\x20\40\x20\x20\x20\x20\x20\40\40\x20\x69\x6e\156\x65\162\40\x6a\x6f\x69\156\40\155\x5f\163\x69\x73\x77\141\x20\142\40\157\x6e\x20\141\x2e\x69\x64\x5f\x73\151\x73\x77\x61\x20\x3d\x20\142\x2e\x69\x64\12\x20\x20\x20\x20\x20\x20\40\40\40\x20\40\x20\40\40\40\40\167\x68\145\162\145\40\141\56\x69\144\x5f\x6b\145\x6c\141\163\x20\x3d\x20\x27" . $this->d["\151\x64\137\x6b\145\x6c\141\x73"] . "\47\x20\141\156\x64\40\x61\x2e\164\x61\40\x3d\x20\x27" . $this->d["\x74\x61"] . "\47";
$ambil_nilai = $this->db->query($strq_sudah_ada_data)->result_array();
if (empty($ambil_nilai)) {
$list_data = $this->db->query($strq_belum_ada_data)->result_array();
$d["\141\x6d\142\151\x6c\x5f\155\141\156\x61"] = "\144\x61\x74\x61\40\x6e\x69\x6c\141\x69\40\153\157\x73\x6f\156\147";
} else {
$list_data = $ambil_nilai;
$d["\x61\155\x62\x69\154\x5f\x6d\141\x6e\141"] = "\x64\x61\x74\141\x20\156\x69\x6c\141\151\x20\162\145\141\154";
}
$d["\x73\164\x61\164\165\x73"] = "\x6f\153";
$d["\x64\141\164\x61"] = $list_data;
j($d);
}
public function simpan_nilai()
{
$p = $this->input->post();
$jumlah_sudah = 0;
$i = 0;
foreach ($p["\156\151\154\x61\151"] as $s) {
$cek = $this->db->query("\x53\x45\114\x45\103\124\x20\151\x64\x20\x46\x52\117\115\x20\x74\137\156\x69\154\x61\x69\x5f\164\x75\x6d\142\x75\x68\40\x57\110\105\x52\x45\x20\x74\141\x73\155\40\x3d\x20\47" . $this->d["\164\x61\163\155"] . "\47\x20\x41\116\x44\40\x69\x64\137\x65\x6b\163\164\162\x61\x20\x3d\40\47" . $p["\151\x64\x5f\x65\153\163\164\x72\x61"] . "\47\40\x41\x4e\x44\x20\151\x64\137\163\151\x73\x77\141\x20\75\x20\47" . $p["\151\x64\x5f\163\x69\x73\167\x61"][$i] . "\47")->num_rows();
if ($cek > 0) {
$jumlah_sudah++;
$this->db->query("\125\120\x44\x41\124\x45\x20\x74\x5f\x6e\151\x6c\141\x69\137\164\165\155\142\165\x68\40\123\x45\x54\x20\x6e\151\154\141\151\x20\x3d\x20\47{$s}\47\x2c\x20\x64\x65\163\153\40\75\40\47" . $p["\x6e\x69\x6c\x61\151\137\x64"][$i] . "\47\40\127\110\x45\122\x45\x20\164\x61\x73\x6d\40\x3d\x20\47" . $this->d["\x74\141\x73\155"] . "\x27\40\x41\116\x44\40\151\x64\x5f\x65\x6b\163\x74\x72\x61\40\75\40\x27" . $p["\151\x64\137\x65\x6b\163\x74\x72\141"] . "\x27\40\101\116\x44\x20\x69\x64\137\163\151\x73\167\x61\x20\x3d\40\x27" . $p["\151\144\137\163\x69\x73\x77\x61"][$i] . "\47");
} else {
$this->db->query("\111\116\123\x45\122\x54\x20\x49\x4e\x54\117\40\x74\137\156\x69\x6c\141\x69\x5f\164\165\x6d\x62\x75\150\x20\50\x74\x61\163\155\54\x20\151\x64\137\145\x6b\163\164\162\x61\54\40\151\144\x5f\x73\151\x73\x77\x61\54\40\156\151\x6c\x61\151\54\x20\x64\145\x73\x6b\51\x20\126\x41\114\x55\105\x53\40\50\x27" . $this->d["\x74\141\163\x6d"] . "\x27\54\40\x27" . $p["\x69\x64\137\145\x6b\x73\x74\x72\141"] . "\x27\54\40\x27" . $p["\x69\x64\137\163\151\163\x77\141"][$i] . "\x27\x2c\x20\x27" . $s . "\47\x2c\x20\47" . $p["\x6e\x69\x6c\x61\x69\137\144"][$i] . "\x27\x29");
}
$i++;
}
$d["\163\x74\x61\x74\165\x73"] = "\x6f\x6b";
$d["\x64\x61\164\x61"] = "\104\x61\x74\x61\x20\142\145\x72\x68\x61\x73\x69\x6c\40\x64\x69\x73\151\x6d\x70\x61\x6e";
j($d);
}
public function hapus($id)
{
$this->db->query("\x44\105\x4c\105\x54\105\40\x46\x52\x4f\x4d\x20\x74\x5f\x67\x75\162\165\x5f\x6d\141\160\145\x6c\40\127\x48\105\122\105\x20\x69\x64\40\75\40\x27{$id}\x27");
$d["\163\x74\x61\164\165\x73"] = "\157\153";
$d["\x64\x61\x74\x61"] = "\104\x61\164\141\x20\x62\145\x72\150\141\163\151\154\40\144\x69\150\141\x70\165\x73";
j($d);
}
public function index()
{
$this->d["\x6c\x69\x73\164\137\x6b\x64"] = $this->db->query("\123\x45\114\105\x43\x54\40\x2a\x20\x46\x52\117\115\x20\x6d\x5f\164\165\x6d\x62\x75\150")->result_array();
$this->d["\x70"] = "\154\151\x73\164";
$this->load->view("\x74\x65\x6d\x70\x6c\x61\x74\x65\x5f\x75\164\141\x6d\141", $this->d);
}
}
Function Calls
None |
Stats
MD5 | d77e87dbf60ad4bf09ff6a406ca156c0 |
Eval Count | 0 |
Decode Time | 60 ms |