Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
public function previewExcel() { goto c95wq; HFIpI: $sheetData = $spreadsheet->getActiveSh..
Decoded Output download
<? public function previewExcel() { goto c95wq; HFIpI: $sheetData = $spreadsheet->getActiveSheet()->toArray(); goto r17eN; HAf1e: cIp5B: goto B4VOx; aa_ta: goto AfOjH; goto ST_jy; etf12: uzsEX: goto A24_w; B4VOx: unlink($file); goto mcWsd; UPsxH: $config["allowed_types"] = "xls|xlsx|csv"; goto oaF5q; EWCar: switch ($ext) { case ".xlsx": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx(); goto L3s3C; case ".xls": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls(); goto L3s3C; case ".csv": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv(); goto L3s3C; default: echo "unknown file ext"; die; } goto hmGjN; R9RtV: $i = 1; goto Py21L; oaF5q: $config["max_size"] = 2048; goto fwVEN; j2lUW: EMusj: goto etf12; LhmN1: if (!($sheetData[$i][0] != null)) { goto EMusj; } goto L3NlC; X70s2: $file = $this->upload->data("full_path"); goto phLz3; fwVEN: $config["encrypt_name"] = true; goto tNRbK; IWYZn: $error = $this->upload->display_errors(); goto WcDXo; q46uz: if (!($i < count($sheetData))) { goto cIp5B; } goto LhmN1; c95wq: $config["upload_path"] = "./uploads/import/"; goto UPsxH; ST_jy: LIbYK: goto IWYZn; uj4OW: L3s3C: goto x2xC5; WcDXo: echo $error; goto P7MSm; P7MSm: die; goto Atpnq; Atpnq: AfOjH: goto eYTzu; mcWsd: echo json_encode($data); goto aa_ta; LXi3r: goto Nj_Lt; goto HAf1e; hmGjN: dhyFx: goto uj4OW; x2xC5: $spreadsheet = $reader->load($file); goto HFIpI; Py21L: Nj_Lt: goto q46uz; A24_w: $i++; goto LXi3r; qLzH3: if (!$this->upload->do_upload("upload_file")) { goto LIbYK; } goto X70s2; phLz3: $ext = $this->upload->data("file_ext"); goto EWCar; r17eN: $data = []; goto R9RtV; L3NlC: $data[] = ["nisn" => str_replace("'", '', $sheetData[$i][1]), "nis" => str_replace("'", '', $sheetData[$i][2]), "nama" => $sheetData[$i][3], "jenis_kelamin" => $sheetData[$i][4], "username" => $sheetData[$i][5], "password" => $sheetData[$i][6], "tempat_lahir" => $sheetData[$i][10], "tanggal_lahir" => $sheetData[$i][11], "agama" => $sheetData[$i][12], "status_keluarga" => $sheetData[$i][16], "anak_ke" => $sheetData[$i][15], "alamat" => $sheetData[$i][17], "rt" => $sheetData[$i][18], "rw" => $sheetData[$i][19], "kelurahan" => $sheetData[$i][20], "kecamatan" => $sheetData[$i][21], "kabupaten" => $sheetData[$i][22], "provinsi" => $sheetData[$i][23], "kode_pos" => $sheetData[$i][24], "hp" => str_replace("'", '', $sheetData[$i][13]), "nama_ayah" => $sheetData[$i][25], "nohp_ayah" => str_replace("'", '', $sheetData[$i][29]), "pendidikan_ayah" => $sheetData[$i][27], "pekerjaan_ayah" => $sheetData[$i][28], "alamat_ayah" => $sheetData[$i][30], "nama_ibu" => $sheetData[$i][31], "nohp_ibu" => str_replace("'", '', $sheetData[$i][35]), "pendidikan_ibu" => $sheetData[$i][33], "pekerjaan_ibu" => $sheetData[$i][34], "alamat_ibu" => $sheetData[$i][36], "nama_wali" => $sheetData[$i][37], "pendidikan_wali" => $sheetData[$i][39], "pekerjaan_wali" => $sheetData[$i][40], "nohp_wali" => str_replace("'", '', $sheetData[$i][41]), "alamat_wali" => $sheetData[$i][42], "tahun_masuk" => $sheetData[$i][8], "kelas_awal" => $sheetData[$i][7], "tgl_lahir_ayah" => $sheetData[$i][26], "tgl_lahir_ibu" => $sheetData[$i][32], "tgl_lahir_wali" => $sheetData[$i][38], "sekolah_asal" => $sheetData[$i][9], "id_siswa" => isset($sheetData[$i][43]) ? $sheetData[$i][43] : '']; goto j2lUW; tNRbK: $this->upload->initialize($config); goto qLzH3; eYTzu: } ?>
Did this file decode correctly?
Original Code
public function previewExcel() { goto c95wq; HFIpI: $sheetData = $spreadsheet->getActiveSheet()->toArray(); goto r17eN; HAf1e: cIp5B: goto B4VOx; aa_ta: goto AfOjH; goto ST_jy; etf12: uzsEX: goto A24_w; B4VOx: unlink($file); goto mcWsd; UPsxH: $config["\141\x6c\x6c\x6f\167\145\144\x5f\164\x79\160\145\x73"] = "\x78\154\163\x7c\170\154\x73\x78\x7c\x63\163\166"; goto oaF5q; EWCar: switch ($ext) { case "\x2e\x78\x6c\163\x78": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx(); goto L3s3C; case "\56\170\154\163": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls(); goto L3s3C; case "\x2e\143\163\166": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv(); goto L3s3C; default: echo "\165\156\x6b\156\x6f\x77\156\40\146\x69\x6c\145\x20\145\170\164"; die; } goto hmGjN; R9RtV: $i = 1; goto Py21L; oaF5q: $config["\155\x61\170\x5f\x73\x69\172\145"] = 2048; goto fwVEN; j2lUW: EMusj: goto etf12; LhmN1: if (!($sheetData[$i][0] != null)) { goto EMusj; } goto L3NlC; X70s2: $file = $this->upload->data("\x66\x75\x6c\x6c\x5f\x70\x61\x74\150"); goto phLz3; fwVEN: $config["\145\x6e\143\162\171\160\164\137\x6e\x61\x6d\x65"] = true; goto tNRbK; IWYZn: $error = $this->upload->display_errors(); goto WcDXo; q46uz: if (!($i < count($sheetData))) { goto cIp5B; } goto LhmN1; c95wq: $config["\165\160\x6c\x6f\x61\144\137\160\141\164\x68"] = "\x2e\x2f\x75\x70\154\x6f\x61\x64\163\57\x69\155\x70\x6f\x72\164\x2f"; goto UPsxH; ST_jy: LIbYK: goto IWYZn; uj4OW: L3s3C: goto x2xC5; WcDXo: echo $error; goto P7MSm; P7MSm: die; goto Atpnq; Atpnq: AfOjH: goto eYTzu; mcWsd: echo json_encode($data); goto aa_ta; LXi3r: goto Nj_Lt; goto HAf1e; hmGjN: dhyFx: goto uj4OW; x2xC5: $spreadsheet = $reader->load($file); goto HFIpI; Py21L: Nj_Lt: goto q46uz; A24_w: $i++; goto LXi3r; qLzH3: if (!$this->upload->do_upload("\165\160\x6c\x6f\141\144\137\146\x69\154\x65")) { goto LIbYK; } goto X70s2; phLz3: $ext = $this->upload->data("\146\151\154\x65\137\x65\x78\164"); goto EWCar; r17eN: $data = []; goto R9RtV; L3NlC: $data[] = ["\x6e\x69\163\156" => str_replace("\x27", '', $sheetData[$i][1]), "\x6e\151\x73" => str_replace("\47", '', $sheetData[$i][2]), "\x6e\141\155\x61" => $sheetData[$i][3], "\152\145\x6e\x69\x73\137\153\x65\x6c\141\x6d\x69\156" => $sheetData[$i][4], "\165\163\x65\162\156\141\155\x65" => $sheetData[$i][5], "\x70\141\163\x73\167\157\162\144" => $sheetData[$i][6], "\x74\x65\x6d\x70\x61\x74\137\x6c\x61\150\151\162" => $sheetData[$i][10], "\x74\141\156\147\x67\x61\x6c\137\x6c\x61\x68\x69\x72" => $sheetData[$i][11], "\x61\147\x61\x6d\141" => $sheetData[$i][12], "\x73\164\x61\164\165\x73\137\x6b\x65\x6c\x75\x61\x72\147\x61" => $sheetData[$i][16], "\x61\x6e\141\153\x5f\x6b\145" => $sheetData[$i][15], "\141\154\141\x6d\x61\x74" => $sheetData[$i][17], "\x72\x74" => $sheetData[$i][18], "\x72\167" => $sheetData[$i][19], "\153\x65\154\x75\x72\x61\150\141\156" => $sheetData[$i][20], "\153\145\143\141\155\141\x74\x61\x6e" => $sheetData[$i][21], "\x6b\141\x62\x75\160\141\164\145\x6e" => $sheetData[$i][22], "\x70\x72\157\166\x69\156\163\151" => $sheetData[$i][23], "\x6b\x6f\x64\145\x5f\x70\x6f\x73" => $sheetData[$i][24], "\150\160" => str_replace("\47", '', $sheetData[$i][13]), "\x6e\x61\155\141\x5f\x61\171\x61\x68" => $sheetData[$i][25], "\156\157\x68\160\137\x61\171\141\x68" => str_replace("\x27", '', $sheetData[$i][29]), "\160\145\156\144\151\144\151\x6b\141\156\x5f\x61\x79\x61\150" => $sheetData[$i][27], "\x70\145\153\145\162\x6a\x61\141\156\x5f\x61\171\141\150" => $sheetData[$i][28], "\x61\154\x61\155\x61\x74\x5f\x61\x79\x61\x68" => $sheetData[$i][30], "\156\141\x6d\x61\x5f\151\142\165" => $sheetData[$i][31], "\x6e\157\x68\160\x5f\151\142\x75" => str_replace("\47", '', $sheetData[$i][35]), "\160\145\156\144\x69\x64\151\x6b\141\x6e\137\151\142\x75" => $sheetData[$i][33], "\160\145\x6b\x65\162\152\141\x61\156\137\151\x62\x75" => $sheetData[$i][34], "\141\154\x61\x6d\x61\164\x5f\151\x62\x75" => $sheetData[$i][36], "\x6e\x61\155\x61\137\167\x61\x6c\x69" => $sheetData[$i][37], "\x70\145\x6e\x64\151\144\151\153\x61\x6e\x5f\167\141\x6c\x69" => $sheetData[$i][39], "\x70\x65\153\145\162\x6a\141\141\x6e\137\x77\x61\x6c\151" => $sheetData[$i][40], "\x6e\157\x68\160\x5f\x77\x61\154\x69" => str_replace("\47", '', $sheetData[$i][41]), "\141\x6c\x61\155\x61\164\137\167\x61\x6c\151" => $sheetData[$i][42], "\x74\141\150\x75\x6e\137\155\x61\x73\165\153" => $sheetData[$i][8], "\x6b\145\x6c\141\x73\x5f\141\x77\x61\x6c" => $sheetData[$i][7], "\x74\x67\154\137\154\x61\150\x69\x72\137\141\171\x61\x68" => $sheetData[$i][26], "\164\x67\x6c\137\x6c\141\150\151\162\x5f\x69\142\165" => $sheetData[$i][32], "\164\147\x6c\x5f\154\141\150\x69\162\137\x77\x61\x6c\151" => $sheetData[$i][38], "\163\145\x6b\x6f\154\x61\x68\137\x61\x73\x61\x6c" => $sheetData[$i][9], "\151\144\x5f\163\x69\x73\x77\x61" => isset($sheetData[$i][43]) ? $sheetData[$i][43] : '']; goto j2lUW; tNRbK: $this->upload->initialize($config); goto qLzH3; eYTzu: }
Function Calls
None |
Stats
MD5 | 42ad74eaec7513afd357c76e9660957e |
Eval Count | 0 |
Decode Time | 49 ms |