/* Decoded by unphp.net */ load->model("Log_model", "logging"); goto nUDaz; WLXpK: redirect("auth"); goto TLsuY; thATj: $this->load->model("Master_model", "master"); goto gYoRV; UmQ_f: $this->load->library(["datatables", "form_validation"]); goto thATj; RZxya: goto z3b9N; goto Nu1Tl; E1jTV: show_error("Hanya Administrator yang diberi hak untuk mengakses halaman ini, Kembali ke menu awal", 403, "Akses Terlarang"); goto JJZ1R; TLsuY: z3b9N: goto UmQ_f; T6Doq: if (!$this->ion_auth->logged_in()) { goto NNsGz; } goto EnhOd; EnhOd: if (!(!$this->ion_auth->is_admin() && !$this->ion_auth->in_group("guru"))) { goto QRGV6; } goto E1jTV; dkzAl: $this->load->model("Cbt_model", "cbt"); goto xEJna; JJZ1R: QRGV6: goto RZxya; Nu1Tl: NNsGz: goto WLXpK; TR3Uf: parent::__construct(); goto KqDTd; KqDTd: $this->load->dbforge(); goto T6Doq; gYoRV: $this->load->model("Dashboard_model", "dashboard"); goto dkzAl; nUDaz: $this->form_validation->set_error_delimiters('', ''); goto mj_sK; mj_sK: } public function output_json($data, $encode = true) { goto CxwQB; GGO30: $this->output->set_content_type("application/json")->set_output($data); goto d8vXA; DfWH7: nWcw0: goto GGO30; CxwQB: if (!$encode) { goto nWcw0; } goto uxda0; uxda0: $data = json_encode($data); goto DfWH7; d8vXA: } public function index() { goto o8dUN; CDUpc: $this->load->view("_templates/dashboard/_header", $data); goto uZQ0o; kdCtl: $data["tp"] = $this->dashboard->getTahun(); goto AK6Gf; hrTKj: $smt = $this->master->getSemesterActive(); goto kdCtl; uGdvt: O7qc9: goto DSArU; f3pF3: $this->load->view("_templates/dashboard/_footer"); goto A_8fN; Us79g: $this->load->view("members/guru/templates/footer"); goto vrq4b; GFaSN: $token = $this->cbt->getToken(); goto k3eKB; xIIWh: $this->load->view("members/guru/cbt/token/data"); goto Us79g; o8dUN: $user = $this->ion_auth->user()->row(); goto S0mRy; d8wEg: $data["smt_active"] = $smt; goto GFaSN; DSArU: $data["profile"] = $this->dashboard->getProfileAdmin($user->id); goto CDUpc; k3eKB: $tkn["token"] = ''; goto tWz52; EgC04: if ($this->ion_auth->is_admin()) { goto O7qc9; } goto Aca_b; Aca_b: $guru = $this->dashboard->getDataGuruByUserId($user->id, $tp->id_tp, $smt->id_smt); goto OR4Qo; VJVPu: $this->load->view("members/guru/templates/header", $data); goto xIIWh; vrq4b: goto vrINN; goto uGdvt; S0mRy: $data = ["user" => $user, "judul" => "Token Ujian", "subjudul" => "Token", "setting" => $this->dashboard->getSetting()]; goto r9Fix; tWz52: $tkn["auto"] = "0"; goto s5SLZ; A_8fN: vrINN: goto yFwEr; OR4Qo: $data["guru"] = $guru; goto VJVPu; AK6Gf: $data["tp_active"] = $tp; goto FwAWx; uruvi: $data["token"] = $token != null ? $token : json_decode(json_encode($tkn)); goto EgC04; FwAWx: $data["smt"] = $this->dashboard->getSemester(); goto d8wEg; r9Fix: $tp = $this->master->getTahunActive(); goto hrTKj; s5SLZ: $tkn["jarak"] = "1"; goto itRJx; itRJx: $tkn["elapsed"] = "00:00:00"; goto uruvi; uZQ0o: $this->load->view("cbt/token/data"); goto f3pF3; yFwEr: } public function generateToken() { goto rV5ab; CQurb: $this->output_json($token); goto Dau0T; d0a_p: $new = $this->createNewToken(); goto HYMEI; OYfTd: $mulai = new DateTime($token->updated); goto wSBFA; sTioh: if (!($total_minutes >= $post_token->jarak)) { goto VTQnX; } goto d0a_p; rLAK6: goto qBets; goto I_thV; UUxLr: VTQnX: goto rLAK6; I_thV: z4D8_: goto Bd2u2; zbJMe: $this->cbt->saveToken($post_token); goto UUxLr; NIGUf: $token = $this->cbt->getToken(); goto U9rEf; qQaLL: $post_token->updated = $updated; goto hk0yq; rV5ab: $post_token = json_decode($this->input->get("data")); goto MhnOv; IAqPO: if ($force == "1") { goto z4D8_; } goto OYfTd; f2Uo4: $total_minutes += $diff->i; goto sTioh; rV9N0: $updated = date("Y-m-d H:i:s"); goto IAqPO; U66rH: $total_minutes = $diff->days * 24 * 60; goto k8jIG; hk0yq: $this->cbt->saveToken($post_token); goto Ms523; ScmHY: $post_token->token = $new; goto qQaLL; U9rEf: $token->now = $updated; goto CQurb; MhnOv: $force = $this->input->get("force"); goto MUX0E; HYMEI: $post_token->token = $new; goto BSiif; BSiif: $post_token->updated = $updated; goto zbJMe; Ms523: qBets: goto NIGUf; wSBFA: $diff = $mulai->diff(new DateTime()); goto U66rH; Bd2u2: $new = $this->createNewToken(); goto ScmHY; MUX0E: $token = $this->cbt->getToken(); goto rV9N0; k8jIG: $total_minutes += $diff->h * 60; goto f2Uo4; Dau0T: } public function loadToken() { goto LkJzE; ObnF_: jg1je: goto d5jb9; wO5gu: goto jg1je; goto gnvhh; gnvhh: hgi2G: goto bnxAs; m8_62: $data["auto"] = "0"; goto acCPw; b6Rqm: foreach ($dataflds as $fild) { goto zMKwL; fcOdr: $table_changed = $this->dbforge->modify_column("cbt_token", $field); goto g4O32; bd8m5: hPJ4p: goto Yyscj; zMKwL: if (!($fild->name == "updated")) { goto hPJ4p; } goto yTGwf; WbqQe: $field = ["updated" => array("type" => "VARCHAR", "constraint" => 20, "default" => '')]; goto fcOdr; yTGwf: if (!($fild->type != "varchar")) { goto moL0y; } goto WbqQe; g4O32: moL0y: goto bd8m5; Yyscj: t3PQK: goto tr4ZZ; tr4ZZ: } goto YSNxl; TPdH7: $token->now = date("Y-m-d H:i:s"); goto hB3vz; RDqFK: $table_changed = false; goto b6Rqm; hB3vz: $this->output_json($token); goto wO5gu; YSNxl: g4u0O: goto Xdfyj; Xdfyj: $token = $this->cbt->getToken(); goto V2Ycz; O072Q: $this->output_json($data); goto ObnF_; acCPw: $data["elapsed"] = "00:00:00"; goto O072Q; bnxAs: $data["token"] = ''; goto m8_62; V2Ycz: if ($token == null) { goto hgi2G; } goto TPdH7; LkJzE: $dataflds = $this->db->field_data("cbt_token"); goto RDqFK; d5jb9: } private function createNewToken() { goto e9Oyr; EYqIL: $new_token .= $random_character; goto fT40n; pRIFy: OQn15: goto gAul2; iAcsD: $new_token = ''; goto e61WI; fT40n: uY_MT: goto ASIyX; e1Xma: goto YLdD4; goto pRIFy; iKSaW: $random_character = $chars[mt_rand(0, $input_length - 1)]; goto EYqIL; kyS2c: YLdD4: goto LgOy3; yIgmq: $input_length = strlen($chars); goto iAcsD; LgOy3: if (!($i < 6)) { goto OQn15; } goto iKSaW; ASIyX: $i++; goto e1Xma; e61WI: $i = 0; goto kyS2c; gAul2: return $new_token; goto hHhPW; e9Oyr: $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; goto yIgmq; hHhPW: } } ?>