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 Cbtanalisis extends CI_Controller
{
public function __construct()
{
parent::__construct();
if (!$this->ion_auth->logged_in()) {
redirect('auth');
} else if ( !$this->ion_auth->is_admin() && !$this->ion_auth->in_group('guru')){
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();
$data = [
'user' => $user,
'judul' => 'Analisa Soal',
'subjudul' => 'Analisa Soal Ujian',
'setting' => $this->dashboard->getSetting()
];
$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;
$jadwal = $this->input->get('jadwal');
$thn_sel = $this->input->get('thn');
$smt_sel = $this->input->get('smt');
$thn_sel = $thn_sel == null ? $tp->id_tp : $thn_sel;
$smt_sel = $smt_sel == null ? $smt->id_smt : $smt_sel;
$data['tp_selected'] = $thn_sel;
$data['smt_selected'] = $smt_sel;
$data['jadwal_selected'] = $jadwal;
if ($jadwal != null) {
$info = $this->cbt->getJadwalById($jadwal);
$all_jawaban = $this->cbt->getJawabanByBank($info->id_bank);
$jawabans_siswa = [];
$ids = [];
foreach ($all_jawaban as $jawaban_siswa) {
array_push($ids, $jawaban_siswa->id_siswa);
$jawabans_siswa[$jawaban_siswa->jenis_soal][$jawaban_siswa->nomor_soal][$jawaban_siswa->id_siswa] = $jawaban_siswa->jawaban_siswa;
}
$nilai_pg = $this->cbt->getAllNilaiSiswa($jadwal);
$all_soals = $this->cbt->getSoalByBank($info->id_bank);
if (isset($all_soals[1])) {
foreach ($all_soals[1] as $no => $soal) {
$soal->jawaban_siswa = [];
$soal->skor_siswa = [];
$soal->jumlah_benar = 0;
$soal->jumlah_salah = 0;
$total_siswa = 0;
$x = [];
$jwbn_siswa = isset($jawabans_siswa[1][$no]) && isset($jawabans_siswa[1][$no]) ? $jawabans_siswa[1][$no] : [];
foreach ($jwbn_siswa as $id => $jawab_siswa) {
$total_siswa++;
if ($jawab_siswa == $soal->jawaban) {
$soal->jumlah_benar++;
array_push($x, 1);
} else {
$soal->jumlah_salah++;
array_push($x, 0);
}
if ($jawab_siswa == 'A') {
$soal->jawaban_siswa['jawab_a'][$id] = $jawab_siswa;
} elseif ($jawab_siswa == 'B') {
$soal->jawaban_siswa['jawab_b'][$id] = $jawab_siswa;
} elseif ($jawab_siswa == 'C') {
$soal->jawaban_siswa['jawab_c'][$id] = $jawab_siswa;
} elseif ($jawab_siswa == 'D') {
$soal->jawaban_siswa['jawab_d'][$id] = $jawab_siswa;
} elseif ($jawab_siswa == 'E') {
$soal->jawaban_siswa['jawab_e'][$id] = $jawab_siswa;
}
}
$benar = $soal->jumlah_benar;
$salah = $soal->jumlah_salah;
$jml_siswa = $total_siswa;
$kesukaran = 0;
$status_soal = '';
if ($jml_siswa > 0) {
$kesukaran = round($benar / $jml_siswa, 2);
if ($kesukaran >= 0.70) {
$status_soal = "mudah";
} else if ($kesukaran >= 0.30) {
$status_soal = "sedang";
} else {
$status_soal = "sukar";
}
}
$soal->tingkat_kesukaran = $kesukaran;
$soal->status_kesukaran = $status_soal;
$cek = $jml_siswa % 2;
if ($cek == 1) {
$jml_siswa--;
}
$bagi = $jml_siswa / 2;
$pos_a = 0;
$pos_b = $bagi;
$y = [];
$yng_benar_golonganatas = 0;
$yng_benar_golonganbawah = 0;
$no = 1;
foreach ($nilai_pg as $id => $nilai) {
array_push($y, $nilai->pg_benar);
if (isset($jwbn_siswa[$id])) {
$siswa_menjawab = $jwbn_siswa[$id];
if ($no <= $bagi) {
if ($siswa_menjawab == $soal->jawaban) {
$yng_benar_golonganatas++;
}
} else {
if ($siswa_menjawab == $soal->jawaban) {
$yng_benar_golonganbawah++;
}
}
}
$no++;
}
$soal->total_siswa = $total_siswa;
$soal->benar_atas = $yng_benar_golonganatas;
$soal->benar_bawah = $yng_benar_golonganbawah;
$pearson = $this->pearson($x, $y);
$soal->nilai_valid = $pearson;
$soal->table_r = $this->nilaiSignifikansi($total_siswa, 5);
$validitas = $this->nilaiSignifikansi($total_siswa, 5) <= $pearson ? 'Valid' : 'Tidak valid';
$soal->status_valid = $validitas;
$bagi_daya = $bagi > 0 ? $bagi : 1;//$bagi > 3 && $bagi < 10 ? $bagi : 10;
if (($yng_benar_golonganatas == 0) && (($yng_benar_golonganbawah != 0))) {
$daya_pembeda = 0 - ($yng_benar_golonganbawah / $bagi_daya);
} else if (($yng_benar_golonganatas != 0) && (($yng_benar_golonganbawah == 0))) {
$daya_pembeda = $yng_benar_golonganatas / $bagi_daya;
} else if (($yng_benar_golonganatas == 0) && (($yng_benar_golonganbawah == 0))) {
$daya_pembeda = 0;
} else {
$daya_pembeda = ($yng_benar_golonganatas / $bagi_daya) - ($yng_benar_golonganbawah / $bagi_daya);
}
$soal->daya_pembeda = $daya_pembeda;//round($daya_pembeda, 2);
if ($daya_pembeda >= 0.70) {
$soal->status_daya = "Baik Sekali";
} else if ($daya_pembeda >= 0.40) {
$soal->status_daya = "Baik";
} else if ($daya_pembeda >= 0.20) {
$soal->status_daya = "Cukup";
} else {
$soal->status_daya = "Jelek";
}
}
}
$data['info'] = $info;
$data['soals'] = $all_soals;
$data['nilai'] = $nilai_pg;
}
if ($this->ion_auth->is_admin()) {
$data['profile'] = $this->dashboard->getProfileAdmin($user->id);
$data['kodejadwal'] = $this->dropdown->getAllJadwal($thn_sel, $smt_sel);
$this->load->view('_templates/dashboard/_header', $data);
$this->load->view('cbt/analisis/data');
$this->load->view('_templates/dashboard/_footer');
} else {
$guru = $this->dashboard->getDataGuruByUserId($user->id, $thn_sel, $smt_sel);
$nguru[$guru->id_guru] = $guru->nama_guru;
$data['guru'] = $guru;
$data['kodejadwal'] = $this->dropdown->getAllJadwalGuru($thn_sel, $smt_sel, $guru->id_guru);
$this->load->view('members/guru/templates/header', $data);
$this->load->view('cbt/analisis/data');
$this->load->view('members/guru/templates/footer');
}
}
private function pearson($x, $y){
$cx = count($x);
$cy = count($y);
if ($cx === 0 || $cy === 0) return -1;
if ($cx < $cy) {
$d = $cy - $cx;
for ($i = 0; $i < $d; $i++) {
array_pop($y);
}
}
if ($cx > $cy) {
$d = $cx - $cy;
for ($i = 0; $i < $d; $i++) {
array_pop($x);
}
}
if (count($x) !== count($y)) {
return -1;
}
$x = array_values($x);
$y = array_values($y);
$xs = array_sum($x) / count($x);
$ys = array_sum($y) / count($y);
$a = 0;
$bx = 0;
$by = 0;
for ($i = 0; $i < count($x); $i++) {
$xr = $x[$i] - $xs;
$yr = $y[$i] - $ys;
$a += $xr * $yr;
$bx += pow($xr, 2);
$by += pow($yr, 2);
}
$b = sqrt($bx * $by);
$ret = -1;
if ($b > 0) {
$ret = $a / $b;
}
return $ret;
}
public function getNilaiKelas()
{
$kelas = $this->input->get('kelas');
$sesi = $this->input->get('sesi');
$jadwal = $this->input->get('jadwal');
$tp = $this->dashboard->getTahunActive();
$smt = $this->dashboard->getSemesterActive();
$info = $this->cbt->getJadwalById($jadwal, $sesi);
$siswas = $this->cbt->getSiswaByKelas($tp->id_tp, $smt->id_smt, $kelas);
$arrDur = [];
foreach ($siswas as $siswa) {
$arrJawab_pg = [];
$arrJawab_essai = [];
for ($i = 0; $i < $info->tampil_pg; $i++) {
$arrJawab_pg[$siswa->id_siswa][] = $this->cbt->getJawabanSiswa($siswa->id_siswa . $jadwal . $info->id_bank . 1 . ($i + 1));
}
for ($j = 0; $j < $info->tampil_esai; $j++) {
$jawaban = $this->cbt->getJawabanSiswa($siswa->id_siswa . $jadwal . $info->id_bank . 2 . ($j + 1));
if ($jawaban != null) {
$arrJawab_essai[$siswa->id_siswa][] = $jawaban;
} else {
$arrJawab_essai[$siswa->id_siswa][] = array(
'id_jawaban' => 0,
'jawaban' => '',
'jawaban_benar' => '',
'koreksi' => 0,
);
}
}
$jawab_essai = isset($arrJawab_essai[$siswa->id_siswa]) ? $arrJawab_essai[$siswa->id_siswa] : [];
$arrDur[$siswa->id_siswa] = [
'dur' => $this->cbt->getDurasiSiswa($siswa->id_siswa . $jadwal),
'jawab_pg' => $arrJawab_pg[$siswa->id_siswa],
'jawab_essai' => $jawab_essai,
'log' => $this->cbt->getLogUjian($siswa->id_siswa, $jadwal)
];
}
$data['siswa'] = $siswas;
$data['jawaban'] = $arrDur;
$data['info'] = $info;
$this->output_json($data);
}
public function getJadwalUjianByJadwal()
{
$jadwal = $this->input->get('jadwal');
$tp = $this->input->get('thn');
$smt = $this->input->get('smt');
$info = $this->cbt->getJadwalById($jadwal);
$kelas = unserialize($info->bank_kelas);
$kelases = [];
foreach ($kelas as $key => $value) {
$kelases[$value['kelas_id']] = $this->dropdown->getNamaKelasById($info->id_tp, $info->id_smt, $value['kelas_id']);
}
$this->output_json($kelases);
}
public function kalkulasi(){
$jadwal = $this->input->get('jadwal');
$update = $this->generateNilaiUjian($jadwal);
$this->output_json($update);
}
public function generateNilaiUjian($jadwal) {
$info = $this->cbt->getJadwalById($jadwal);
$bagi_pg = $info->tampil_pg / 100;
$bobot_pg = $info->bobot_pg / 100;
$bagi_pg2 = $info->tampil_kompleks / 100;
$bobot_pg2 = $info->bobot_kompleks / 100;
$bagi_jodoh = $info->tampil_jodohkan / 100;
$bobot_jodoh = $info->bobot_jodohkan / 100;
$bagi_isian = $info->tampil_isian / 100;
$bobot_isian = $info->bobot_isian / 100;
$bagi_essai = $info->tampil_esai / 100;
$bobot_essai = $info->bobot_esai / 100;
$kelas_bank = unserialize($info->bank_kelas);
$kelases = [];
foreach ($kelas_bank as $key => $value) {
array_push($kelases, $value['kelas_id']);
}
$siswas = $this->cbt->getSiswaByKelas($info->id_tp, $info->id_smt, $kelases);
$ids = [];
foreach ($siswas as $key => $value) {
array_push($ids, $value->id_siswa);
}
$jawabans = $this->cbt->getJawabanByBank($info->id_bank);
//$jawabans = $this->cbt->getJawabanSiswaByJadwal($jadwal);
$soal = [];
$jawabans_siswa = [];
foreach ($jawabans as $jawaban_siswa) {
if ($jawaban_siswa->jenis_soal == '2') {
$jawaban_siswa->opsi_a = @unserialize($jawaban_siswa->opsi_a);
$jawaban_siswa->jawaban_siswa = @unserialize($jawaban_siswa->jawaban_siswa);
$jawaban_siswa->jawaban_benar = @unserialize($jawaban_siswa->jawaban_benar);
$jawaban_siswa->jawaban_benar = array_map('strtoupper', $jawaban_siswa->jawaban_benar);
$jawaban_siswa->jawaban_benar = array_filter($jawaban_siswa->jawaban_benar, 'strlen');
}
if ($jawaban_siswa->jenis_soal == '3') {
$jawaban_siswa->jawaban_siswa = @unserialize($jawaban_siswa->jawaban_siswa);
$jawaban_siswa->jawaban_benar = @unserialize($jawaban_siswa->jawaban_benar);
$jawaban_siswa->jawaban_siswa = json_decode(json_encode($jawaban_siswa->jawaban_siswa));
$jawaban_siswa->jawaban_benar = json_decode(json_encode($jawaban_siswa->jawaban_benar));
}
$jawabans_siswa[$jawaban_siswa->id_siswa][$jawaban_siswa->jenis_soal][] = $jawaban_siswa;
$soal[$jawaban_siswa->jenis_soal][] = $jawaban_siswa;
}
$insets = [];
foreach ($siswas as $siswa) {
$ada_jawaban = isset($jawabans_siswa[$siswa->id_siswa]);
$ada_jawaban_pg = $ada_jawaban && isset($jawabans_siswa[$siswa->id_siswa]['1']);
$ada_jawaban_pg2 = $ada_jawaban && isset($jawabans_siswa[$siswa->id_siswa]['2']);
$ada_jawaban_jodoh = $ada_jawaban && isset($jawabans_siswa[$siswa->id_siswa]['3']);
$ada_jawaban_isian = $ada_jawaban && isset($jawabans_siswa[$siswa->id_siswa]['4']);
$ada_jawaban_essai = $ada_jawaban && isset($jawabans_siswa[$siswa->id_siswa]['5']);
// PG
$jawaban_pg = $ada_jawaban_pg ? $jawabans_siswa[$siswa->id_siswa]['1'] : [];
$benar_pg = 0;
$salah_pg = 0;
if ($info->tampil_pg > 0) {
if (count($jawaban_pg) > 0) {
foreach ($jawaban_pg as $jwb_pg) {
if ($jwb_pg != null && $jwb_pg->jawaban_siswa != null) {
if (strtoupper($jwb_pg->jawaban_siswa) == strtoupper($jwb_pg->jawaban_benar)) {
$benar_pg += 1;
} else {
$salah_pg += 1;
}
}
}
}
}
$skor_pg = $bagi_pg == 0 ? 0 : ($benar_pg / $bagi_pg) * $bobot_pg;
$jawaban_pg2 = $ada_jawaban_pg2 ? $jawabans_siswa[$siswa->id_siswa]['2'] : [];
$benar_pg2 = 0;
$skor_koreksi_pg2 = 0.0;
$otomatis_pg2 = 0;
if ($info->tampil_kompleks > 0) {
if (count($jawaban_pg2) > 0) {
foreach ($jawaban_pg2 as $num => $jawab_pg2) {
$otomatis_pg2 = $jawab_pg2->nilai_otomatis;
$skor_koreksi_pg2 += $jawab_pg2->nilai_koreksi;
$arr_benar = [];
foreach ($jawab_pg2->jawaban_siswa as $js) {
if (in_array($js, $jawab_pg2->jawaban_benar)) {
array_push($arr_benar, true);
}
}
$benar_pg2 += (1 / count($jawab_pg2->jawaban_benar)) * count($arr_benar);
}
}
}
$s_pg2 = $bagi_pg2 == 0 ? 0 : ($benar_pg2 / $bagi_pg2) * $bobot_pg2;
$skor_pg2 = $otomatis_pg2 == 0 ? $s_pg2 : $skor_koreksi_pg2;
$jawaban_jodoh = $ada_jawaban_jodoh ? $jawabans_siswa[$siswa->id_siswa]['3'] : [];
$benar_jod = 0;
$skor_koreksi_jod = 0.0;
$otomatis_jod = 0;
if ($info->tampil_jodohkan > 0) {
if (count($jawaban_jodoh) > 0) {
foreach ($jawaban_jodoh as $num => $jawab_jod) {
$skor_koreksi_jod += $jawab_jod->nilai_koreksi;
$arrSoal = $jawab_jod->jawaban_benar->jawaban;
$headSoal = array_shift($arrSoal);
$arrJwbSoal = [];
$items = 0;
foreach ($arrSoal as $kolSoal) {
$jwb = new stdClass();
foreach ($kolSoal as $pos => $kol) {
if ($kol == '1') {
$jwb->subtitle[] = $headSoal[$pos];
$items++;
}
}
$jwb->title = array_shift($kolSoal);
array_push($arrJwbSoal, $jwb);
}
$arrJawab = $jawab_jod->jawaban_siswa->jawaban;
$headJawab = array_shift($arrJawab);
$arrJwbJawab = [];
foreach ($arrJawab as $kolJawab) {
$jwbs = new stdClass();
foreach ($kolJawab as $po => $kol) {
if ($kol == '1') {
$sub = $headJawab[$po];
$jwbs->subtitle[] = $sub;
}
}
array_push($arrJwbJawab, $jwbs);
}
$item_benar = 0;
$item_salah = 0;
foreach ($arrJwbJawab as $p => $ajjs) {
foreach ($ajjs->subtitle as $pp => $ajs) {
if (in_array($ajs, $arrJwbSoal[$p]->subtitle)) {
$item_benar++;
} else {
$item_salah++;
}
}
}
$benar_jod += (1 / $items) * $item_benar;
$otomatis_jod = $jawab_jod->nilai_otomatis;
}
}
}
$s_jod = $bagi_jodoh == 0 ? 0 : ($benar_jod / $bagi_jodoh) * $bobot_jodoh;
$skor_jod = $otomatis_jod == 0 ? $s_jod : $skor_koreksi_jod;
$jawaban_is = $ada_jawaban_isian ? $jawabans_siswa[$siswa->id_siswa]['4'] : [];
$benar_is = 0;
$skor_koreksi_is = 0.0;
$otomatis_is = 0;
if ($info->tampil_isian > 0) {
if (count($jawaban_is) > 0) {
foreach ($jawaban_is as $num => $jawab_is) {
$skor_koreksi_is += $jawab_is->nilai_koreksi;
$benar = $jawab_is != null && strtolower($jawab_is->jawaban_siswa) == strtolower($jawab_is->jawaban_benar);
if ($benar) {
$benar_is++;
}
$otomatis_is = $jawab_is->nilai_otomatis;
}
}
}
$s_is = $bagi_isian == 0 ? 0 : ($benar_is / $bagi_isian) * $bobot_isian;
$skor_is = $otomatis_is == 0 ? $s_is : $skor_koreksi_is;
$jawaban_es = $ada_jawaban_essai ? $jawabans_siswa[$siswa->id_siswa]['5'] : [];
$benar_es = 0;
$skor_koreksi_es = 0.0;
$otomatis_es = 0;
if ($info->tampil_esai > 0) {
if (count($jawaban_es) > 0) {
foreach ($jawaban_es as $num => $jawab_es) {
$skor_koreksi_es += $jawab_es->nilai_koreksi;
$benar = $jawab_es != null && strtolower($jawab_es->jawaban_siswa) == strtolower($jawab_es->jawaban_benar);
if ($benar) {
$benar_es++;
}
$otomatis_es = $jawab_es->nilai_otomatis;
}
}
}
$s_es = $bagi_essai == 0 ? 0 : ($benar_es / $bagi_essai) * $bobot_essai;
$skor_es = $otomatis_es == 0 ? $s_es : $skor_koreksi_es;
$insert['id_nilai'] = $siswa->id_siswa . $jadwal;
$insert['id_siswa'] = $siswa->id_siswa;
$insert['id_jadwal'] = $jadwal;
$insert['pg_benar'] = $benar_pg;
$insert['pg_nilai'] = round($skor_pg, 2);
$insert['kompleks_nilai'] = round($skor_pg2, 2);
$insert['jodohkan_nilai'] = round($skor_jod, 2);
$insert['isian_nilai'] = round($skor_is, 2);
$insert['essai_nilai'] = round($skor_es, 2);
array_push($insets, $insert);
}
$update = $this->db->update_batch('cbt_nilai', $insets, 'id_nilai');
return $update;
}
private function nilaiSignifikansi($jml, $persen){
$list = [
3 => [5 => 0.997], [1 => 0.999],
4 => [5 => 0.95], [1 => 0.99],
5 => [5 => 0.878], [1 => 0.959],
6 => [5 => 0.811], [1 => 0.917],
7 => [5 => 0.754], [1 => 0.874],
8 => [5 => 0.707], [1 => 0.834],
9 => [5 => 0.666], [1 => 0.798],
10 => [5 => 0.632], [1 => 0.765],
11 => [5 => 0.602], [1 => 0.735],
12 => [5 => 0.576], [1 => 0.708],
13 => [5 => 0.553], [1 => 0.684],
14 => [5 => 0.532], [1 => 0.661],
15 => [5 => 0.514], [1 => 0.641],
16 => [5 => 0.497], [1 => 0.623],
17 => [5 => 0.482], [1 => 0.606],
18 => [5 => 0.468], [1 => 0.59],
19 => [5 => 0.456], [1 => 0.575],
20 => [5 => 0.444], [1 => 0.561],
21 => [5 => 0.433], [1 => 0.549],
22 => [5 => 0.423], [1 => 0.537],
23 => [5 => 0.413], [1 => 0.526],
24 => [5 => 0.404], [1 => 0.515],
25 => [5 => 0.396], [1 => 0.505],
26 => [5 => 0.388], [1 => 0.496],
27 => [5 => 0.381], [1 => 0.487],
28 => [5 => 0.374], [1 => 0.478],
29 => [5 => 0.367], [1 => 0.47],
30 => [5 => 0.361], [1 => 0.463],
31 => [5 => 0.355], [1 => 0.456],
32 => [5 => 0.349], [1 => 0.449],
33 => [5 => 0.344], [1 => 0.442],
34 => [5 => 0.339], [1 => 0.436],
35 => [5 => 0.334], [1 => 0.43],
36 => [5 => 0.329], [1 => 0.424],
37 => [5 => 0.325], [1 => 0.418],
38 => [5 => 0.32], [1 => 0.413],
39 => [5 => 0.316], [1 => 0.408],
40 => [5 => 0.312], [1 => 0.403],
41 => [5 => 0.308], [1 => 0.398],
42 => [5 => 0.304], [1 => 0.393],
43 => [5 => 0.301], [1 => 0.389],
44 => [5 => 0.297], [1 => 0.384],
45 => [5 => 0.294], [1 => 0.38],
46 => [5 => 0.291], [1 => 0.376],
47 => [5 => 0.288], [1 => 0.372],
48 => [5 => 0.284], [1 => 0.368],
49 => [5 => 0.281], [1 => 0.364],
50 => [5 => 0.279], [1 => 0.361],
55 => [5 => 0.266], [1 => 0.345],
60 => [5 => 0.254], [1 => 0.330],
65 => [5 => 0.244], [1 => 0.317],
70 => [5 => 0.235], [1 => 0.306],
75 => [5 => 0.227], [1 => 0.296],
80 => [5 => 0.220], [1 => 0.286],
85 => [5 => 0.213], [1 => 0.278],
90 => [5 => 0.207], [1 => 0.270],
95 => [5 => 0.202], [1 => 0.263],
100 => [5 => 0.195], [1 => 0.256],
125 => [5 => 0.176], [1 => 0.230],
150 => [5 => 0.159], [1 => 0.210],
175 => [5 => 0.149], [1 => 0.194],
200 => [5 => 0.138], [1 => 0.191],
300 => [5 => 0.113], [1 => 0.181],
400 => [5 => 0.098], [1 => 0.148],
500 => [5 => 0.088], [1 => 0.128],
600 => [5 => 0.080], [1 => 0.115],
700 => [5 => 0.074], [1 => 0.105],
800 => [5 => 0.070], [1 => 0.091],
900 => [5 => 0.065], [1 => 0.086],
1000 => [5 => 0.062], [1 => 0.081]
];
if (isset($list[$jml]) && isset($list[$jml][$persen])) {
return $list[$jml][$persen];
} else {
$keys = $this->getClosest($jml, array_keys($list));
if ($keys < 4) $keys = 4;
return $list[$keys-1][$persen];
}
}
function getClosest($search, $arr) {
$closest = null;
foreach ($arr as $item) {
if ($closest === null || abs($search - $closest) > abs($item - $search)) {
$closest = $item;
}
}
return $closest;
/*
$dist = INF;
$last = false;
foreach($arr as $k=>$v){
$dist2 = abs($search - $k);
if($dist2 > $dist){
return $arr[$last-1][5];
}
$dist = $dist2;
$last = $k;
}
return $arr[$last-1][5];
*/
}
}
Did this file decode correctly?
Original Code
eval(base64_decode('DQovKioNCiAqIENyZWF0ZWQgYnkgSW50ZWxsaUogSURFQS4NCiAqIFVzZXI6IG11bHRhemFtDQogKiBEYXRlOiAwNy8wNy8yMA0KICogVGltZTogMTQ6MjQNCiAqLw0KDQpjbGFzcyBDYnRhbmFsaXNpcyBleHRlbmRzIENJX0NvbnRyb2xsZXINCnsNCg0KICAgIHB1YmxpYyBmdW5jdGlvbiBfX2NvbnN0cnVjdCgpDQogICAgew0KICAgICAgICBwYXJlbnQ6Ol9fY29uc3RydWN0KCk7DQogICAgICAgIGlmICghJHRoaXMtPmlvbl9hdXRoLT5sb2dnZWRfaW4oKSkgew0KICAgICAgICAgICAgcmVkaXJlY3QoJ2F1dGgnKTsNCiAgICAgICAgfSB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gICAgICAgICRhbGxfc29hbHMgPSAkdGhpcy0+Y2J0LT5nZXRTb2FsQnlCYW5rKCRpbmZvLT5pZF9iYW5rKTsNCiAgICAgICAgICAgIGlmIChpc3NldCgkYWxsX3NvYWxzWzFdKSkgew0KICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRhbGxfc29hbHNbMV0gYXMgJG5vID0+ICRzb2FsKSB7DQogICAgICAgICAgICAgICAgICAgICRzb2FsLT5qYXdhYmFuX3Npc3dhID0gW107DQogICAgICAgICAgICAgICAgICAgICRzb2FsLT5za29yX3Npc3dhID0gW107DQogICAgICAgICAgICAgICAgICAgICRzb2FsLT5qdW1sYWhfYmVuYXIgPSAwOw0KICAgICAgICAgICAgICAgICAgICAkc29hbC0+anVtbGFoX3NhbGFoID0gMDsNCiAgICAgICAgICAgICAgICAgICAgJHRvdGFsX3Npc3dhID0gMDsNCg0KICAgICAgICAgICAgICAgICAgICAkeCA9IFtdOw0KDQogICAgICAgICAgICAgICAgICAgICRqd2JuX3Npc3dhID0gaXNzZXQoJGphd2FiYW5zX3Npc3dhWzFdWyRub10pICYmIGlzc2V0KCRqYXdhYmFuc19zaXN3YVsxXVskbm9dKSA/ICRqYXdhYmFuc19zaXN3YVsxXVskbm9dIDogW107DQogICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRqd2JuX3Npc3dhIGFzICRpZCA9PiAkamF3YWJfc2lzd2EpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICR0b3RhbF9zaXN3YSsrOw0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRqYXdhYl9zaXN3YSA9PSAkc29hbC0+amF3YWJhbikgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzb2FsLT5qdW1sYWhfYmVuYXIrKzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnJheV9wdXNoKCR4LCAxKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNvYWwtPmp1bWxhaF9zYWxhaCsrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFycmF5X3B1c2goJHgsIDApOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoJGphd2FiX3Npc3dhID09ICdBJykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzb2FsLT5qYXdhYmFuX3Npc3dhWydqYXdhYl9hJ11bJGlkXSA9ICRqYXdhYl9zaXN3YTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZWlmICgkamF3YWJfc2lzd2EgPT0gJ0InKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNvYWwtPmphd2FiYW5fc2lzd2FbJ2phd2FiX2InXVskaWRdID0gJGphd2FiX3Npc3dhOw0KICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlaWYgKCRqYXdhYl9zaXN3YSA9PSAnQycpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc29hbC0+amF3YWJhbl9zaXN3YVsnamF3YWJfYyddWyRpZF0gPSAkamF3YWJfc2lzd2E7DQogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2VpZiAoJGphd2FiX3Npc3dhID09ICdEJykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzb2FsLT5qYXdhYmFuX3Npc3dhWydqYXdhYl9kJ11bJGlkXSA9ICRqYXdhYl9zaXN3YTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZWlmICgkamF3YWJfc2lzd2EgPT0gJ0UnKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNvYWwtPmphd2FiYW5fc2lzd2FbJ2phd2FiX2UnXVskaWRdID0gJGphd2FiX3Npc3dhOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgJGJlbmFyID0gJHNvYWwtPmp1bWxhaF9iZW5hcjsNCiAgICAgICAgICAgICAgICAgICAgJHNhbGFoID0gJHNvYWwtPmp1bWxhaF9zYWxhaDsNCiAgICAgICAgICAgICAgICAgICAgJGptbF9zaXN3YSA9ICR0b3RhbF9zaXN3YTsNCiAgICAgICAgICAgICAgICAgICAgJGtlc3VrYXJhbiA9IDA7DQogICAgICAgICAgICAgICAgICAgICRzdGF0dXNfc29hbCA9ICcnOw0KICAgICAgICAgICAgICAgICAgICBpZiAoJGptbF9zaXN3YSA+IDApIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICRrZXN1a2FyYW4gPSByb3VuZCgkYmVuYXIgLyAkam1sX3Npc3dhLCAyKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgka2VzdWthcmFuID49IDAuNzApIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc3RhdHVzX3NvYWwgPSAibXVkYWgiOw0KICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgka2VzdWthcmFuID49IDAuMzApIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc3RhdHVzX3NvYWwgPSAic2VkYW5nIjsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHN0YXR1c19zb2FsID0gInN1a2FyIjsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICRzb2FsLT50aW5na2F0X2tlc3VrYXJhbiA9ICRrZXN1a2FyYW47DQogICAgICAgICAgICAgICAgICAgICRzb2FsLT5zdGF0dXNfa2VzdWthcmFuID0gJHN0YXR1c19zb2FsOw0KDQogICAgICAgICAgICAgICAgICAgICRjZWsgPSAkam1sX3Npc3dhICUgMjsNCiAgICAgICAgICAgICAgICAgICAgaWYgKCRjZWsgPT0gMSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgJGptbF9zaXN3YS0tOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICRiYWdpID0gJGptbF9zaXN3YSAvIDI7DQogICAgICAgICAgICAgICAgICAgICRwb3NfYSA9IDA7DQogICAgICAgICAgICAgICAgICAgICRwb3NfYiA9ICRiYWdpOw0KDQogICAgICAgICAgICAgICAgICAgICR5ID0gW107DQogICAgICAgICAgICAgICAgICAgICR5bmdfYmVuYXJfZ29sb25nYW5hdGFzID0gMDsNCiAgICAgICAgICAgICAgICAgICAgJHluZ19iZW5hcl9nb2xvbmdhbmJhd2FoID0gMDsNCiAgICAgICAgICAgICAgICAgICAgJG5vID0gMTsNCiAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCAoJG5pbGFpX3BnIGFzICRpZCA9PiAkbmlsYWkpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIGFycmF5X3B1c2goJHksICRuaWxhaS0+cGdfYmVuYXIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzc2V0KCRqd2JuX3Npc3dhWyRpZF0pKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNpc3dhX21lbmphd2FiID0gJGp3Ym5fc2lzd2FbJGlkXTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJG5vIDw9ICRiYWdpKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkc2lzd2FfbWVuamF3YWIgPT0gJHNvYWwtPmphd2FiYW4pIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR5bmdfYmVuYXJfZ29sb25nYW5hdGFzKys7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJHNpc3dhX21lbmphd2FiID09ICRzb2FsLT5qYXdhYmFuKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkeW5nX2JlbmFyX2dvbG9uZ2FuYmF3YWgrKzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICRubysrOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICRzb2FsLT50b3RhbF9zaXN3YSA9ICR0b3RhbF9zaXN3YTsNCiAgICAgICAgICAgICAgICAgICAgJHNvYWwtPmJlbmFyX2F0YXMgPSAkeW5nX2JlbmFyX2dvbG9uZ2FuYXRhczsNCiAgICAgICAgICAgICAgICAgICAgJHNvYWwtPmJlbmFyX2Jhd2FoID0gJHluZ19iZW5hcl9nb2xvbmdhbmJhd2FoOw0KICAgICAgICAgICAgICAgICAgICAkcGVhcnNvbiA9ICR0aGlzLT5wZWFyc29uKCR4LCAkeSk7DQoNCiAgICAgICAgICAgICAgICAgICAgJHNvYWwtPm5pbGFpX3ZhbGlkID0gJHBlYXJzb247DQogICAgICAgICAgICAgICAgICAgICRzb2FsLT50YWJsZV9yID0gJHRoaXMtPm5pbGFpU2lnbmlmaWthbnNpKCR0b3RhbF9zaXN3YSwgNSk7DQogICAgICAgICAgICAgICAgICAgICR2YWxpZGl0YXMgPSAkdGhpcy0+bmlsYWlTaWduaWZpa2Fuc2koJHRvdGFsX3Npc3dhLCA1KSA8PSAkcGVhcnNvbiA/ICdWYWxpZCcgOiAnVGlkYWsgdmFsaWQnOw0KICAgICAgICAgICAgICAgICAgICAkc29hbC0+c3RhdHVzX3ZhbGlkID0gJHZhbGlkaXRhczsNCg0KICAgICAgICAgICAgICAgICAgICAkYmFnaV9kYXlhID0gJGJhZ2kgPiAwID8gJGJhZ2kgOiAxOy8vJGJhZ2kgPiAzICYmICRiYWdpIDwgMTAgPyAkYmFnaSA6IDEwOw0KICAgICAgICAgICAgICAgICAgICBpZiAoKCR5bmdfYmVuYXJfZ29sb25nYW5hdGFzID09IDApICYmICgoJHluZ19iZW5hcl9nb2xvbmdhbmJhd2FoICE9IDApKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgJGRheWFfcGVtYmVkYSA9IDAgLSAoJHluZ19iZW5hcl9nb2xvbmdhbmJhd2FoIC8gJGJhZ2lfZGF5YSk7DQogICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKCR5bmdfYmVuYXJfZ29sb25nYW5hdGFzICE9IDApICYmICgoJHluZ19iZW5hcl9nb2xvbmdhbmJhd2FoID09IDApKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgJGRheWFfcGVtYmVkYSA9ICR5bmdfYmVuYXJfZ29sb25nYW5hdGFzIC8gJGJhZ2lfZGF5YTsNCiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgoJHluZ19iZW5hcl9nb2xvbmdhbmF0YXMgPT0gMCkgJiYgKCgkeW5nX2JlbmFyX2dvbG9uZ2FuYmF3YWggPT0gMCkpKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAkZGF5YV9wZW1iZWRhID0gMDsNCiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICRkYXlhX3BlbWJlZGEgPSAoJHluZ19iZW5hcl9nb2xvbmdhbmF0YXMgLyAkYmFnaV9kYXlhKSAtICgkeW5nX2JlbmFyX2dvbG9uZ2FuYmF3YWggLyAkYmFnaV9kYXlhKTsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAkc29hbC0+ZGF5YV9wZW1iZWRhID0gJGRheWFfcGVtYmVkYTsvL3JvdW5kKCRkYXlhX3BlbWJlZGEsIDIpOw0KDQogICAgICAgICAgICAgICAgICAgIGlmICgkZGF5YV9wZW1iZWRhID49IDAuNzApIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICRzb2FsLT5zdGF0dXNfZGF5YSA9ICJCYWlrIFNla2FsaSI7DQogICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoJGRheWFfcGVtYmVkYSA+PSAwLjQwKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAkc29hbC0+c3RhdHVzX2RheWEgPSAiQmFpayI7DQogICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoJGRheWFfcGVtYmVkYSA+PSAwLjIwKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAkc29hbC0+c3RhdHVzX2RheWEgPSAiQ3VrdXAiOw0KICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICAgICAgJHNvYWwtPnN0YXR1c19kYXlhID0gIkplbGVrIjsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgJGRhdGFbJ2luZm8nXSA9ICRpbmZvOw0KICAgICAgICAgICAgJGRhdGFbJ3NvYWxzJ10gPSAkYWxsX3NvYWxzOw0KICAgICAgICAgICAgJGRhdGFbJ25pbGFpJ10gPSAkbmlsYWlfcGc7DQogICAgICAgIH0NCg0KICAgICAgICBpZiAoJHRoaXMtPmlvbl9hdXRoLT5pc19hZG1pbigpKSB7DQogICAgICAgICAgICAkZGF0YVsncHJvZmlsZSddID0gJHRoaXMtPmRhc2hib2FyZC0+Z2V0UHJvZmlsZUFkbWluKCR1c2VyLT5pZCk7DQogICAgICAgICAgICAkZGF0YVsna29kZWphZHdhbCddID0gJHRoaXMtPmRyb3Bkb3duLT5nZXRBbGxKYWR3YWwoJHRobl9zZWwsICRzbXRfc2VsKTsNCg0KICAgICAgICAgICAgJHRoaXMtPmxvYWQtPnZpZXcoJ190ZW1wbGF0ZXMvZGFzaGJvYXJkL19oZWFkZXInLCAkZGF0YSk7DQogICAgICAgICAgICAkdGhpcy0+bG9hZC0+dmlldygnY2J0L2FuYWxpc2lzL2RhdGEnKTsNCiAgICAgICAgICAgICR0aGlzLT5sb2FkLT52aWV3KCdfdG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gICAgfQ0KICAgICAgICBpZiAoJGN4ID4gJGN5KSB7DQogICAgICAgICAgICAkZCA9ICRjeCAtICRjeTsNCiAgICAgICAgICAgIGZvciAoJGkgPSAwOyAkaSA8ICRkOyAkaSsrKSB7DQogICAgICAgICAgICAgICAgYXJyYXlfcG9wKCR4KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KDQogICAgICAgIGlmIChjb3VudCgkeCkgIT09IGNvdW50KCR5KSkgew0KICAgICAgICAgICAgcmV0dXJuIC0xOw0KICAgICAgICB9DQogICAgICAgICR4ID0gYXJyYXlfdmFsdWVzKCR4KTsNCiAgICAgICAgJHkgPSBhcnJheV92YWx1ZXMoJHkpOw0KICAgICAgICAkeHMgPSBhcnJheV9zdW0oJHgpIC8gY291bnQoJHgpOw0KICAgICAgICAkeXMgPSBhcnJheV9zdW0oJHkpIC8gY291bnQoJHkpOw0KICAgICAgICAkYSA9IDA7DQogICAgICAgICRieCA9IDA7DQogICAgICAgICRieSA9IDA7DQogICAgICAgIGZvciAoJGkgPSAwOyAkaSA8IGNvdW50KCR4KTsgJGkrKykgew0KICAgICAgICAgICAgJHhyID0gJHhbJGldIC0gJHhzOw0KICAgICAgICAgICAgJHlyID0gJHlbJGldIC0gJHlzOw0KICAgICAgICAgICAgJGEgKz0gJHhyICogJHlyOw0KICAgICAgICAgICAgJGJ4ICs9IHBvdygkeHIsIDIpOw0KICAgICAgICAgICAgJGJ5ICs9IHBvdygkeXIsIDIpOw0KICAgICAgICB9DQogICAgICAgICRiID0gc3FydCgkYnggKiAkYnkpOw0KICAgICAgICAkcmV0ID0gLTE7DQogICAgICAgIGlmICgkYiA+IDApIHsNCiAgICAgICAgICAgICRyZXQgPSAkYSAvICRiOw0KICAgICAgICB9DQogICAgICAgIHJldHVybiAkcmV0Ow0KICAgIH0NCg0KICAgIHB1YmxpYyBmdW5jdGlvbiBnZXROaWxhaUtlbGFzKCkNCiAgICB7DQogICAgICAgICRrZWxhcyA9ICR0aGlzLT5p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fc2lzd2EgLiAkamFkd2FsIC4gJGluZm8tPmlkX2JhbmsgLiAyIC4gKCRqICsgMSkpOw0KICAgICAgICAgICAgICAgIGlmICgkamF3YWJhbiAhPSBudWxsKSB7DQogICAgICAgICAgICAgICAgICAgICRhcnJKYXdhYl9lc3NhaVskc2lzd2EtPmlkX3Npc3dhXVtdID0gJGphd2FiYW47DQogICAgICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICAgICAgJGFyckphd2FiX2Vzc2FpWyRzaXN3YS0+aWRfc2lzd2FdW10gPSBhcnJheSgNCiAgICAgICAgICAgICAgICAgICAgICAgICdpZF9qYXdhYmFuJyA9PiAwLA0KICAgICAgICAgICAgICAgICAgICAgICAgJ2phd2FiYW4nID0+ICcnLA0KICAgICAgICAgICAgICAgICAgICAgICAgJ2phd2FiYW5fYmVuYXInID0+ICcnLA0KICAgICAgICAgICAgICAgICAgICAgICAgJ2tvcmVrc2knID0+IDAsDQogICAgICAgICAgICAgICAgICAgICk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICAkamF3YWJfZXNzYWkgPSBpc3NldCgkYXJySmF3YWJfZXNzYWlbJHNpc3dhLT5pZF9zaXN3YV0pID8gJGFyckphd2FiX2Vzc2FpWyRzaXN3YS0+aWRfc2lzd2FdIDogW107DQoNCiAgICAgICAgICAgICRhcnJEdXJbJHNpc3dhLT5pZF9zaXN3YV0gPSBbDQogICAgICAgICAgICAgICAgJ2R1cicgPT4gJHRoaXMtPmNidC0+Z2V0RHVyYXNpU2lzd2EoJHNpc3dhLT5pZF9zaXN3YSAuICRqYWR3YWwpLA0KICAgICAgICAgICAgICAgICdqYXdhYl9wZycgPT4gJGFyckphd2FiX3BnWyRzaXN3YS0+aWRfc2lzd2FdLA0KICAgICAgICAgICAgICAgICdqYXdhYl9lc3NhaScgPT4gJGphd2FiX2Vzc2FpLA0KICAgICAgICAgICAgICAgICdsb2cnID0+ICR0aGlzLT5j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gJHNhbGFoX3BnID0gMDsNCiAgICAgICAgICAgIGlmICgkaW5mby0+dGFtcGlsX3BnID4gMCkgew0KICAgICAgICAgICAgICAgIGlmIChjb3VudCgkamF3YWJhbl9wZykgPiAwKSB7DQogICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRqYXdhYmFuX3BnIGFzICRqd2JfcGcpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkandiX3BnICE9IG51bGwgJiYgJGp3Yl9wZy0+amF3YWJhbl9zaXN3YSAhPSBudWxsKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0cnRvdXBwZXIoJGp3Yl9wZy0+amF3YWJhbl9zaXN3YSkgPT0gc3RydG91cHBlcigkandiX3BnLT5qYXdhYmFuX2JlbmFyKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYmVuYXJfcGcgKz0gMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc2FsYWhfcGcgKz0gMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9DQogICAgICAgICAgICAkc2tvcl9wZyA9ICRiYWdpX3BnID09IDAgPyAwIDogKCRiZW5hcl9wZyAvICRiYWdpX3BnKSAqICRib2JvdF9wZzsNCg0KICAgICAgICAgICAgJGphd2FiYW5fcGcyID0gJGFkYV9qYXdhYmFuX3BnMiA/ICRqYXdhYmFuc19zaXN3YVskc2lzd2EtPmlkX3Npc3dhXVsnMiddIDogW107DQogICAgICAgICAgICAkYmVuYXJfcGcyID0gMDsNCiAgICAgICAgICAgICRza29yX2tvcmVrc2lfcGcyID0gMC4wOw0KICAgICAgICAgICAgJG90b21hdGlzX3BnMiA9IDA7DQogICAgICAgICAgICBpZiAoJGluZm8tPnRhbXBpbF9rb21wbGVrcyA+IDApIHsNCiAgICAgICAgICAgICAgICBpZiAoY291bnQoJGphd2FiYW5fcGcyKSA+IDApIHsNCiAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCAoJGphd2FiYW5fcGcyIGFzICRudW0gPT4gJGphd2FiX3BnMikgew0KICAgICAgICAgICAgICAgICAgICAgICAgJG90b21hdGlzX3BnMiA9ICRqYXdhYl9wZzItPm5pbGFpX290b21hdGlzOw0KICAgICAgICAgICAgICAgICAgICAgICAgJHNrb3Jfa29yZWtzaV9wZzIgKz0gJGphd2FiX3BnMi0+bmlsYWlfa29yZWtzaTsNCiAgICAgICAgICAgICAgICAgICAgICAgICRhcnJfYmVuYXIgPSBbXTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRqYXdhYl9wZzItPmphd2FiYW5fc2lzd2EgYXMgJGpzKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGluX2FycmF5KCRqcywgJGphd2FiX3BnMi0+amF3YWJhbl9iZW5hcikpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyYXlfcHVzaCgkYXJyX2JlbmFyLCB0cnVlKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAkYmVuYXJfcGcyICs9ICgxIC8gY291bnQoJGphd2FiX3BnMi0+amF3YWJhbl9iZW5hcikpICogY291bnQoJGFycl9iZW5hcik7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9DQogICAgICAgICAgICAkc19wZzIgPSAkYmFnaV9wZzIgPT0gMCA/IDAgOiAoJGJlbmFyX3BnMiAvICRiYWdpX3BnMikgKiAkYm9ib3RfcGcyOw0KICAgICAgICAgICAgJHNrb3JfcGcyID0gJG90b21hdGlzX3BnMiA9PSAwID8gJHNfcGcyIDogJHNrb3Jfa29yZWtzaV9wZzI7DQoNCiAgICAgICAgICAgICRqYXdhYmFuX2pvZG9oID0gJGFkYV9qYXdhYmFuX2pvZG9oID8gJGphd2FiYW5zX3Npc3dhWyRzaXN3YS0+aWRfc2lzd2FdWyczJ10gOiBbXTsNCiAgICAgICAgICAgICRiZW5hcl9qb2QgPSAwOw0KICAgICAgICAgICAgJHNrb3Jfa29yZWtzaV9qb2QgPSAwLjA7DQogICAgICAgICAgICAkb3RvbWF0aXNfam9kID0gMDsNCiAgICAgICAgICAgIGlmICgkaW5mby0+dGFtcGlsX2pvZG9oa2FuID4gMCkgew0KICAgICAgICAgICAgICAgIGlmIChjb3VudCgkamF3YWJhbl9qb2RvaCkgPiAwKSB7DQogICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRqYXdhYmFuX2pvZG9oIGFzICRudW0gPT4gJGphd2FiX2pvZCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgJHNrb3Jfa29yZWtzaV9qb2QgKz0gJGphd2FiX2pvZC0+bmlsYWlfa29yZWtzaTsNCiAgICAgICAgICAgICAgICAgICAgICAgICRhcnJTb2FsID0gJGphd2FiX2pvZC0+amF3YWJhbl9iZW5hci0+amF3YWJhbjsNCg0KICAgICAgICAgICAgICAgICAgICAgICAgJGhlYWRTb2FsID0gYXJyYXlfc2hpZnQoJGFyclNvYWwpOw0KICAgICAgICAgICAgICAgICAgICAgICAgJGFyckp3YlNvYWwgPSBbXTsNCiAgICAgICAgICAgICAgICAgICAgICAgICRpdGVtcyA9IDA7DQogICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgkYXJyU29hbCBhcyAka29sU29hbCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICRqd2IgPSBuZXcgc3RkQ2xhc3MoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgka29sU29hbCBhcyAkcG9zID0+ICRrb2wpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRrb2wgPT0gJzEnKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkandiLT5zdWJ0aXRsZVtdID0gJGhlYWRTb2FsWyRwb3NdOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGl0ZW1zKys7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJGp3Yi0+dGl0bGUgPSBhcnJheV9zaGlmdCgka29sU29hbCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyYXlfcHVzaCgkYXJySndiU29hbCwgJGp3Yik7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQoNCg0KICAgICAgICAgICAgICAgICAgICAgICAgJGFyckphd2FiID0gJGphd2FiX2pvZC0+amF3YWJhbl9zaXN3YS0+amF3YWJhbjsNCiAgICAgICAgICAgICAgICAgICAgICAgICRoZWFkSmF3YWIgPSBhcnJheV9zaGlmdCgkYXJySmF3YWIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgJGFyckp3Ykphd2FiID0gW107DQogICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgkYXJySmF3YWIgYXMgJGtvbEphd2FiKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJGp3YnMgPSBuZXcgc3RkQ2xhc3MoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgka29sSmF3YWIgYXMgJHBvID0+ICRrb2wpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRrb2wgPT0gJzEnKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc3ViID0gJGhlYWRKYXdhYlskcG9dOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGp3YnMtPnN1YnRpdGxlW10gPSAkc3ViOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFycmF5X3B1c2goJGFyckp3Ykphd2FiLCAkandicyk7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICRpdGVtX2JlbmFyID0gMDsNCiAgICAgICAgICAgICAgICAgICAgICAgICRpdGVtX3NhbGFoID0gMDsNCiAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRhcnJKd2JKYXdhYiBhcyAkcCA9PiAkYWpqcykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRhampzLT5zdWJ0aXRsZSBhcyAkcHAgPT4gJGFqcykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5fYXJyYXkoJGFqcywgJGFyckp3YlNvYWxbJHBdLT5zdWJ0aXRsZSkpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRpdGVtX2JlbmFyKys7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaXRlbV9zYWxhaCsrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICAgICAgICAgICAgICAkYmVuYXJfam9kICs9ICgxIC8gJGl0ZW1zKSAqICRpdGVtX2JlbmFyOw0KICAgICAgICAgICAgICAgICAgICAgICAgJG90b21hdGlzX2pvZCA9ICRqYXdhYl9qb2QtPm5pbGFpX290b21hdGlzOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgJHNfam9kID0gJGJhZ2lfam9kb2ggPT0gMCA/IDAgOiAoJGJlbmFyX2pvZCAvICRiYWdpX2pvZG9oKSAqICRib2JvdF9qb2RvaDsNCiAgICAgICAgICAgICRza29yX2pvZCA9ICRvdG9tYXRpc19qb2QgPT0gMCA/ICRzX2pvZCA6ICRza29yX2tvcmVrc2lfam9kOw0KDQogICAgICAgICAgICAkamF3YWJhbl9pcyA9ICRhZGFfamF3YWJhbl9pc2lhbiA/ICRqYXdhYmFuc19zaXN3YVskc2lzd2EtPmlkX3Npc3dhXVsnNCddIDogW107DQogICAgICAgICAgICAkYmVuYXJfaXMgPSAwOw0KICAgICAgICAgICAgJHNrb3Jfa29yZWtzaV9pcyA9IDAuMDsNCiAgICAgICAgICAgICRvdG9tYXRpc19pcyA9IDA7DQogICAgICAgICAgICBpZiAoJGluZm8tPnRhbXBpbF9pc2lhbiA+IDApIHsNCiAgICAgICAgICAgICAgICBpZiAoY291bnQoJGphd2FiYW5faXMpID4gMCkgew0KICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgkamF3YWJhbl9pcyBhcyAkbnVtID0+ICRqYXdhYl9pcykgew0KICAgICAgICAgICAgICAgICAgICAgICAgJHNrb3Jfa29yZWtzaV9pcyArPSAkamF3YWJfaXMtPm5pbGFpX2tvcmVrc2k7DQogICAgICAgICAgICAgICAgICAgICAgICAkYmVuYXIgPSAkamF3YWJfaXMgIT0gbnVsbCAmJiBzdHJ0b2xvd2VyKCRqYXdhYl9pcy0+amF3YWJhbl9zaXN3YSkgPT0gc3RydG9sb3dlcigkamF3YWJfaXMtPmphd2FiYW5fYmVuYXIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRiZW5hcikgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICRiZW5hcl9pcysrOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgJG90b21hdGlzX2lzID0gJGphd2FiX2lzLT5uaWxhaV9vdG9tYXRpczsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgICRzX2lzID0gJGJhZ2lfaXNpYW4gPT0gMCA/IDAgOiAoJGJlbmFyX2lzIC8gJGJhZ2lfaXNpYW4pICogJGJvYm90X2lzaWFuOw0KICAgICAgICAgICAgJHNrb3JfaXMgPSAkb3RvbWF0aXNfaXMgPT0gMCA/ICRzX2lzIDogJHNrb3Jfa29yZWtzaV9pczsNCg0KICAgICAgICAgICAgJGphd2FiYW5fZXMgPSAkYWRhX2phd2FiYW5fZXNzYWkgPyAkamF3YWJhbnNfc2lzd2FbJHNpc3dhLT5pZF9zaXN3YV1bJzUnXSA6IFtdOw0KICAgICAgICAgICAgJGJlbmFyX2VzID0gMDsNCiAgICAgICAgICAgICRza29yX2tvcmVrc2lfZXMgPSAwLjA7DQogICAgICAgICAgICAkb3RvbWF0aXNfZXMgPSAwOw0KICAgICAgICAgICAgaWYgKCRpbmZvLT50YW1waWxfZXNhaSA+IDApIHsNCiAgICAgICAgICAgICAgICBpZiAoY291bnQoJGphd2FiYW5fZXMpID4gMCkgew0KICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgkamF3YWJhbl9lcyBhcyAkbnVtID0+ICRqYXdhYl9lcykgew0KICAgICAgICAgICAgICAgICAgICAgICAgJHNrb3Jfa29yZWtzaV9lcyArPSAkamF3YWJfZXMtPm5pbGFpX2tvcmVrc2k7DQogICAgICAgICAgICAgICAgICAgICAgICAkYmVuYXIgPSAkamF3YWJfZXMgIT0gbnVsbCAmJiBzdHJ0b2xvd2VyKCRqYXdhYl9lcy0+amF3YWJhbl9zaXN3YSkgPT0gc3RydG9sb3dlcigkamF3YWJfZXMtPmphd2FiYW5fYmVuYXIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRiZW5hcikgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICRiZW5hcl9lcysrOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgJG90b21hdGlzX2VzID0gJGphd2FiX2VzLT5uaWxhaV9vdG9tYXRpczsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgICRzX2VzID0gJGJhZ2lfZXNzYWkgPT0gMCA/IDAgOiAoJGJlbmFyX2VzIC8gJGJhZ2lfZXNzYWkpICogJGJvYm90X2Vzc2FpOw0KICAgICAgICAgICAgJHNrb3JfZXMgPSAkb3RvbWF0aXNfZXMgPT0gMCA/ICRzX2VzIDogJHNrb3Jfa29yZWtzaV9lczsNCg0KICAgICAgICAgICAgJGluc2VydFsnaWRfbmlsYWknXSA9ICRzaXN3YS0+aWRfc2lzd2EgLiAkamFkd2FsOw0KICAgICAgICAgICAgJGluc2VydFsnaWRfc2lzd2EnXSA9ICRzaXN3YS0+aWRfc2lzd2E7DQogICAgICAgICAgICAkaW5zZXJ0WydpZF9qYWR3YWwnXSA9ICRqYWR3YWw7DQogICAgICAgICAgICAkaW5zZXJ0WydwZ19iZW5hciddID0gJGJlbmFyX3BnOw0KICAgICAgICAgICAgJGluc2VydFsncGdfbmlsYWknXSA9IHJvdW5kKCRza29yX3BnLCAyKTsNCiAgICAgICAgICAgICRpbnNlcnRbJ2tvbXBsZWtzX25pbGFpJ10gPSByb3VuZCgkc2tvcl9wZzIsIDIpOw0KICAgICAgICAgICAgJGluc2VydFsnam9kb2hrYW5fbmlsYWknXSA9IHJvdW5kKCRza29yX2pvZCwgMik7DQogICAgICAgICAgICAkaW5zZXJ0Wydpc2lhbl9uaWxhaSddID0gcm91bmQoJHNrb3JfaXMsIDIpOw0KICAgICAgICAgICAgJGluc2VydFsnZXNzYWlfbmlsYWknXSA9IHJvdW5kKCRza29yX2VzLCAyKTsNCg0KICAgICAgICAgICAgYXJyYXlfcHVzaCgkaW5zZXRzLCAkaW5zZXJ0KTsNCiAgICAgICAgfQ0KICAgICAgICAkdXBkYXRlID0gJHRoaXMtPmRiL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A9PiAwLjA5MV0sDQogICAgICAgICAgICA5MDAgPT4gWzUgPT4gMC4wNjVdLCBbMSA9PiAwLjA4Nl0sDQogICAgICAgICAgICAxMDAwID0+IFs1ID0+IDAuMDYyXSwgWzEgPT4gMC4wODFdDQogICAgICAgIF07DQoNCiAgICAgICAgaWYgKGlzc2V0KCRsaXN0WyRqbWxdKSAmJiBpc3NldCgkbGlzdFskam1sXVskcGVyc2VuXSkpIHsNCiAgICAgICAgICAgIHJldHVybiAkbGlzdFskam1sXVskcGVyc2VuXTsNCiAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICRrZXlzID0gJHRoaXMtPmdldENsb3Nlc3QoJGptbCwgYXJyYXlfa2V5cygkbGlzdCkpOw0KICAgICAgICAgICAgaWYgKCRrZXlzIDwgNCkgJGtleXMgPSA0Ow0KICAgICAgICAgICAgcmV0dXJuICRsaXN0WyRrZXlzLTFdWyRwZXJzZW5dOw0KICAgICAgICB9DQogICAgfQ0KDQogICAgZnVuY3Rpb24gZ2V0Q2xvc2VzdCgkc2VhcmNoLCAkYXJyKSB7DQogICAgICAgICRjbG9zZXN0ID0gbnVsbDsNCiAgICAgICAgZm9yZWFjaCAoJGFyciBhcyAkaXRlbSkgew0KICAgICAgICAgICAgaWYgKCRjbG9zZXN0ID09PSBudWxsIHx8IGFicygkc2VhcmNoIC0gJGNsb3Nlc3QpID4gYWJzKCRpdGVtIC0gJHNlYXJjaCkpIHsNCiAgICAgICAgICAgICAgICAkY2xvc2VzdCA9ICRpdGVtOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAgICAgIHJldHVybiAkY2xvc2VzdDsNCiAgICAgICAgLyoNCiAgICAgICAgJGRpc3QgPSBJTkY7DQogICAgICAgICRsYXN0ID0gZmFsc2U7DQoNCiAgICAgICAgZm9yZWFjaCgkYXJyIGFzICRrPT4kdil7DQogICAgICAgICAgICAkZGlzdDIgPSBhYnMoJHNlYXJjaCAtICRrKTsNCiAgICAgICAgICAgIGlmKCRkaXN0MiA+ICRkaXN0KXsNCiAgICAgICAgICAgICAgICByZXR1cm4gJGFyclskbGFzdC0xXVs1XTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgICRkaXN0ID0gJGRpc3QyOw0KICAgICAgICAgICAgJGxhc3QgPSAkazsNCiAgICAgICAgfQ0KICAgICAgICByZXR1cm4gJGFyclskbGFzdC0xXVs1XTsNCiAgICAgICAgKi8NCiAgICB9DQp9DQo='))
Function Calls
base64_decode | 1 |
Stats
MD5 | 7a80713c233d20e05d04d28809dafb92 |
Eval Count | 1 |
Decode Time | 167 ms |