/* Decoded by unphp.net */
defined("BASEPATH") or exit("No direct script access allowed"); class Dataguru extends CI_Controller { public function __construct() { goto ECaUQ; ECaUQ: parent::__construct(); goto vYJMj; Os06B: goto l0SbO; goto vrNnf; mOt2D: $this->form_validation->set_error_delimiters('', ''); goto fHSRY; fWGst: QN4l3: goto Os06B; vYJMj: if (!$this->ion_auth->logged_in()) { goto WdCg1; } goto FsoKm; FsoKm: if ($this->ion_auth->is_admin()) { goto QN4l3; } goto r5EQr; XwDbb: l0SbO: goto rhHnI; r5EQr: show_error("Hanya Administrator yang diberi hak untuk mengakses halaman ini, Kembali ke menu awal", 403, "Akses Terlarang"); goto fWGst; rhHnI: $this->load->library(["datatables", "form_validation"]); goto mOt2D; aBcoQ: redirect("auth"); goto XwDbb; vrNnf: WdCg1: goto aBcoQ; fHSRY: } public function output_json($data, $encode = true) { goto Mb0Vb; Cc1_g: JP8IY: goto zgVAH; UgAgQ: $data = json_encode($data); goto Cc1_g; Mb0Vb: if (!$encode) { goto JP8IY; } goto UgAgQ; zgVAH: $this->output->set_content_type("application/json")->set_output($data); goto UJLiP; UJLiP: } public function index() { goto AzEVB; PszSy: if (!$mapels) { goto AXcdz; } goto bTr9_; sWKnl: AXcdz: goto VOGd0; wH80m: $this->load->view("master/guru/data"); goto smgM4; smgM4: $this->load->view("_templates/dashboard/_footer"); goto e3QPS; al0zD: $data["smt"] = $this->dashboard->getSemester(); goto P3hck; E8NkX: $this->load->model("Master_model", "master"); goto F3fWr; VOGd0: $data["mapels"] = $ret; goto mfQsM; lmltA: $setting = $this->dashboard->getSetting(); goto I08zs; XunVa: PXOHU: goto sWKnl; zWHjs: $data["kelass"] = $this->master->getAllKelas($tp->id_tp, $smt->id_smt); goto k9hLR; vrnUa: $data["tp_active"] = $tp; goto al0zD; iZ98F: $tp = $this->dashboard->getTahunActive(); goto pUyMj; I08zs: $data = ["user" => $user, "judul" => "Guru", "subjudul" => "Data Guru", "profile" => $this->dashboard->getProfileAdmin($user->id), "setting" => $setting]; goto iZ98F; P3hck: $data["smt_active"] = $smt; goto ZOuZ7; k9hLR: $data["gurus"] = $this->master->getAllDataGuru($tp->id_tp, $smt->id_smt); goto Yifrz; wdGFo: $mode = $this->input->get("mode", true); goto dU5Ny; ZOuZ7: $mapels = $this->master->getAllMapel(); goto mroHR; Yifrz: $this->load->view("_templates/dashboard/_header", $data); goto wH80m; dU5Ny: $user = $this->ion_auth->user()->row(); goto lmltA; mfQsM: $data["extras"] = $this->dropdown->getAllKodeEkskul(); goto zWHjs; mwOVO: $data["tp"] = $this->dashboard->getTahun(); goto vrnUa; mroHR: $ret = []; goto PszSy; bTr9_: foreach ($mapels as $key => $row) { $ret[$row->id_mapel] = $row; Bo84k: } goto XunVa; NGoGH: $data["mode"] = $mode == null ? "1" : "2"; goto mwOVO; AzEVB: $this->load->model("Dropdown_model", "dropdown"); goto E8NkX; F3fWr: $this->load->model("Dashboard_model", "dashboard"); goto wdGFo; pUyMj: $smt = $this->dashboard->getSemesterActive(); goto NGoGH; e3QPS: } public function data() { goto oeXKZ; VE8IK: $this->output_json($this->master->getDataGuru($tp->id_tp, $smt->id_smt), false); goto C3Mbq; y1YRQ: $smt = $this->dashboard->getSemesterActive(); goto VE8IK; FcmEs: $this->load->model("Dashboard_model", "dashboard"); goto BLp46; oeXKZ: $this->load->model("Master_model", "master"); goto FcmEs; BLp46: $tp = $this->dashboard->getTahunActive(); goto y1YRQ; C3Mbq: } public function edit($id) { goto On4gX; E6x55: $data["smt_active"] = $smt; goto jKa1q; lTGQE: $data["tp_active"] = $tp; goto JsDby; X5_Rm: $inputsProfile = [["label" => "Nama Lengkap", "name" => "nama_guru", "value" => $guru->nama_guru, "icon" => "far fa-user", "type" => "text"], ["label" => "Email", "name" => "email", "value" => $guru->email, "icon" => "far fa-envelope", "type" => "text"], ["label" => "NIP / NUPTK", "name" => "nip", "value" => $guru->nip, "icon" => "far fa-id-card", "type" => "text"], ["label" => "Jenis Kelamin", "name" => "jenis_kelamin", "value" => $guru->jenis_kelamin, "icon" => "fas fa-venus-mars", "type" => "text"], ["label" => "No. Handphone", "name" => "no_hp", "value" => $guru->no_hp, "icon" => "fa fa-phone", "type" => "number"], ["label" => "Agama", "name" => "agama", "value" => $guru->agama, "icon" => "far fa-user", "type" => "text"]]; goto u0QcQ; udj1A: $data["tp"] = $this->dashboard->getTahun(); goto lTGQE; RhyCO: $smt = $this->master->getSemesterActive(); goto tjxoh; tjxoh: $guru = $this->master->getGuruById($id, $tp->id_tp, $smt->id_smt); goto OD_a0; laLyE: $user = $this->ion_auth->user()->row(); goto Tb6v7; pnhTL: $this->load->view("_templates/dashboard/_header", $data); goto lI6jM; jKa1q: $data["id_active"] = $id; goto X5_Rm; On4gX: $this->load->model("Master_model", "master"); goto XTKPa; Tb6v7: $setting = $this->dashboard->getSetting(); goto Ckq34; JsDby: $data["smt"] = $this->dashboard->getSemester(); goto E6x55; ZD8PD: $data["input_alamat"] = json_decode(json_encode($inputsAlamat), FALSE); goto pnhTL; Ckq34: $tp = $this->master->getTahunActive(); goto RhyCO; XTKPa: $this->load->model("Dashboard_model", "dashboard"); goto laLyE; u0QcQ: $inputsAlamat = [["label" => "NIK", "name" => "no_ktp", "value" => $guru->no_ktp, "icon" => "far fa-id-card", "type" => "number"], ["label" => "Tempat Lahir", "name" => "tempat_lahir", "value" => $guru->tempat_lahir, "icon" => "fa fa-map-marker", "type" => "text"], ["label" => "Tgl. Lahir", "name" => "tgl_lahir", "value" => $guru->tgl_lahir, "icon" => "fa fa-calendar", "type" => "text"], ["label" => "Alamat", "name" => "alamat_jalan", "value" => $guru->alamat_jalan, "icon" => "fa fa-map-marker", "type" => "text"], ["label" => "Kecamatan", "name" => "kecamatan", "value" => $guru->kecamatan, "icon" => "fa fa-map-marker", "type" => "text"], ["label" => "Kota/Kab.", "name" => "kabupaten", "value" => $guru->kabupaten, "icon" => "fa fa-map-marker", "type" => "text"], ["label" => "Provinsi", "name" => "provinsi", "value" => $guru->provinsi, "icon" => "fa fa-map-marker", "type" => "text"], ["label" => "Kode Pos", "name" => "kode_pos", "value" => $guru->kode_pos, "icon" => "fa fa-envelope", "type" => "number"]]; goto L0qLY; Re5kB: $this->load->view("_templates/dashboard/_footer"); goto sVzUO; OD_a0: $data = ["user" => $user, "judul" => "Edit Guru", "subjudul" => "Edit Data Guru", "mapel" => $this->master->getAllMapel(), "guru" => $guru, "profile" => $this->dashboard->getProfileAdmin($user->id), "setting" => $setting]; goto udj1A; lI6jM: $this->load->view("master/guru/edit"); goto Re5kB; L0qLY: $data["input_profile"] = json_decode(json_encode($inputsProfile), FALSE); goto ZD8PD; sVzUO: } public function create() { goto AMGDO; pgQXs: $nip = $this->input->post("nip", true); goto XejjB; YJy_O: $username = $this->input->post("username", true); goto r55ta; C1_sc: $u_nip = "is_unique[master_guru.nip]"; goto hXw16; XejjB: $nama_guru = $this->input->post("nama_guru", true); goto YJy_O; hXw16: $u_username = "|is_unique[master_guru.username]"; goto DrxPh; DrxPh: $this->form_validation->set_rules("nip", "NIP", "required|numeric|trim|" . $u_nip); goto a3zgp; odq_W: $input = ["nip" => trim($nip), "nama_guru" => trim($nama_guru), "username" => trim($username), "password" => trim($password), "foto" => "uploads/profiles/" . trim($nip) . ".jpg"]; goto F2312; F2312: $action = $this->master->create("master_guru", $input); goto XzMvU; wHrUt: goto fxN2j; goto PrASF; bLJW5: $this->output_json(["status" => true]); goto W6Xme; BMUuM: S33kS: goto bLJW5; PrASF: GNhAX: goto OUAKU; fQvoj: fxN2j: goto hL3vP; dcCZI: $this->output_json($data); goto fQvoj; b27vM: $this->form_validation->set_rules("password", "Password", "required"); goto tacJ_; a3zgp: $this->form_validation->set_rules("nama_guru", "Nama Guru", "required|trim|min_length[2]"); goto gxIGQ; r55ta: $password = $this->input->post("password", true); goto C1_sc; XzMvU: if ($action) { goto S33kS; } goto zqRYe; hGwrQ: goto yQpN2; goto BMUuM; W6Xme: yQpN2: goto wHrUt; AMGDO: $this->load->model("Master_model", "master"); goto pgQXs; zqRYe: $this->output_json(["status" => false]); goto hGwrQ; tacJ_: if ($this->form_validation->run() == FALSE) { goto GNhAX; } goto odq_W; OUAKU: $data = ["status" => false, "errors" => ["nip" => form_error("nip"), "nama_guru" => form_error("nama_guru"), "username" => form_error("username"), "password" => form_error("password")]]; goto dcCZI; gxIGQ: $this->form_validation->set_rules("username", "Username", "required|trim" . $u_username); goto b27vM; hL3vP: } public function save() { goto hMjZ7; F2nUn: $this->output_json(["status" => false]); goto zOlHv; FpTT_: ASjuT: goto PxSqN; URg4b: $action = $this->master->create("master_guru", $input); goto FwKjX; hMjZ7: $this->load->model("Master_model", "master"); goto vuycm; ZOe1U: if ($method == "add") { goto RAE2p; } goto ss8qb; VHQd1: $u_email = $dbdata->email === $email ? '' : "|is_unique[guru.email]"; goto BIwqd; nH28R: g7blI: goto URg4b; vuycm: $method = $this->input->post("method", true); goto h7w7u; eQlP1: $this->form_validation->set_rules("mapel", "Mata Kuliah", "required"); goto eCaTJ; Zd8Zy: if ($action) { goto ASjuT; } goto F2nUn; de1K1: $u_nip = $dbdata->nip === $nip ? '' : "|is_unique[guru.nip]"; goto VHQd1; kiss6: $input = ["nip" => $nip, "nama_guru" => $nama_guru, "email" => $email, "mapel_id" => $mapel]; goto cqOBn; pLz6V: yguKe: goto WYnNY; qhOv6: $email = $this->input->post("email", true); goto ikGjR; C9MOB: $u_email = "|is_unique[guru.email]"; goto yZle6; FwKjX: iifEe: goto Zd8Zy; K2n9I: RAE2p: goto nI9Q1; PxSqN: $this->output_json(["status" => true]); goto uIV3e; uIV3e: qb_v4: goto VQlh4; vaByl: xcUlc: goto x_GBN; h7w7u: $id_guru = $this->input->post("id_guru", true); goto NBxMY; Avihf: k2JX2: goto AStPa; cUncB: $this->form_validation->set_rules("nama_guru", "Nama Guru", "required|trim|min_length[3]"); goto iTHsG; Yucox: $action = $this->master->update("master_guru", $input, "id_guru", $id_guru); goto Avihf; BIwqd: goto vVLiu; goto K2n9I; nI9Q1: $u_nip = "|is_unique[guru.nip]"; goto C9MOB; iTHsG: $this->form_validation->set_rules("email", "Email", "required|trim|valid_email" . $u_email); goto eQlP1; w_o3m: $this->form_validation->set_rules("nip", "NIP", "required|trim|min_length[8]" . $u_nip); goto cUncB; eCaTJ: if ($this->form_validation->run() == FALSE) { goto yguKe; } goto kiss6; VQlh4: goto xcUlc; goto pLz6V; cqOBn: if ($method === "add") { goto g7blI; } goto pbTfr; ss8qb: $dbdata = $this->master->getGuruById($id_guru); goto de1K1; tU9AZ: $this->output_json($data); goto vaByl; AStPa: goto iifEe; goto nH28R; pbTfr: if (!($method === "edit")) { goto k2JX2; } goto Yucox; MOEOz: $nama_guru = $this->input->post("nama_guru", true); goto qhOv6; ikGjR: $mapel = $this->input->post("password", true); goto ZOe1U; NBxMY: $nip = $this->input->post("nip", true); goto MOEOz; yZle6: vVLiu: goto w_o3m; WYnNY: $data = ["status" => false, "errors" => ["nip" => form_error("nip"), "nama_guru" => form_error("nama_guru"), "email" => form_error("email"), "mapel" => form_error("mapel")]]; goto tU9AZ; zOlHv: goto qb_v4; goto FpTT_; x_GBN: } public function deleteGuru() { goto hW1tV; MOl0i: $this->output_json($data); goto itirC; Ykngb: foreach ($tables as $table) { goto hJ4u4; hJ4u4: if (!($table != "master_guru")) { goto SEKbx; } goto Z9suF; bJANI: $num = $this->db->count_all_results($table); goto D3duC; hhEbD: $this->db->where("id_guru", $chk); goto bJANI; MWTD6: SEKbx: goto gXRhN; A6WJu: F8kUQ: goto AWbJ1; gs6XA: mKbeI: goto qjjo_; Z9suF: if ($table == "master_kelas") { goto mKbeI; } goto hhEbD; Qg6lq: UKbGL: goto MWTD6; D3duC: goto F8kUQ; goto gs6XA; AWbJ1: if (!($num > 0)) { goto UKbGL; } goto w_9rp; w_9rp: array_push($messages, $table); goto Qg6lq; Bytza: $num = $this->db->count_all_results($table); goto A6WJu; gXRhN: YxuJk: goto yrvTT; qjjo_: $this->db->where("guru_id", $chk); goto Bytza; yrvTT: } goto VKHiV; inhG4: Cet5P: goto XzlGv; hW1tV: $this->load->model("Master_model", "master"); goto adkbg; RdUOy: Z2fNv: goto Ykngb; GpRHR: $tables = []; goto XuLk4; XuLk4: $tabless = $this->db->list_tables(); goto UjaAH; OUVpk: $messages = []; goto GpRHR; NiKUx: $data["status"] = $this->master->delete("master_guru", $chk, "id_guru"); goto MOl0i; adkbg: $chk = $this->input->post("id_guru", true); goto OUVpk; AU1Mb: if (count($messages) > 0) { goto Cet5P; } goto NiKUx; itirC: goto kcYre; goto inhG4; XzlGv: $this->output_json(["count" => count($messages), "status" => false, "message" => "Data guru digunakan di " . count($messages) . " tabel:
" . implode("
", $messages)]); goto lX2We; VKHiV: KIe69: goto AU1Mb; UjaAH: foreach ($tabless as $table) { goto xAUn3; TqRGq: GB_Gc: goto Afz6q; Afz6q: JoWIX: goto HXlE9; xAUn3: $fields = $this->db->field_data($table); goto AfDQQ; AfDQQ: foreach ($fields as $field) { goto DFLAn; jGp_j: bf8aE: goto I1RvX; V_J2c: array_push($tables, $table); goto jGp_j; DFLAn: if (!($field->name == "id_guru" || $field->name == "guru_id")) { goto bf8aE; } goto V_J2c; I1RvX: oBjEa: goto piAwK; piAwK: } goto TqRGq; HXlE9: } goto RdUOy; lX2We: kcYre: goto MyHW_; MyHW_: } public function detail($id_guru) { goto t5rsv; oaqLh: $data["kelas"] = $this->master->getAllKelas(); goto P03xu; v1wo1: $data = ["user" => $user, "judul" => "Detail Guru", "subjudul" => "Info Jabatan Guru", "mapel" => $this->master->getAllMapel(), "profile" => $this->dashboard->getProfileAdmin($user->id), "setting" => $setting]; goto N6WUJ; VMWo4: $data["guru"] = ["detail" => $this->master->getGuruByArrId([$id_guru])[0], "jabatan" => $this->master->getDetailJabatanGuru($id_guru), "materi" => $this->db->get_where("kelas_materi", "id_guru=" . $id_guru)->num_rows(), "catatan_mapel" => $this->db->get_where("kelas_catatan_mapel", "id_guru=" . $id_guru)->num_rows(), "bank_soal" => $this->db->get_where("cbt_bank_soal", "bank_guru_id=" . $id_guru)->num_rows(), "pengawas" => $this->db->get_where("cbt_pengawas", "id_guru LIKE "%" . $id_guru . "%"")->num_rows(), "posts" => $this->db->get_where("post", "dari=" . $id_guru)->num_rows(), "comments" => $this->db->get_where("post_comments", "dari=" . $id_guru)->num_rows(), "replies" => $this->db->get_where("post_reply", "dari=" . $id_guru)->num_rows()]; goto dy1aO; sNdWD: $data["smt_active"] = $this->dashboard->getSemesterActive(); goto oaqLh; N6WUJ: $data["tp"] = $this->dashboard->getTahun(); goto eeC1U; NOx10: $user = $this->ion_auth->user()->row(); goto fmD2K; t5rsv: $this->load->model("Master_model", "master"); goto H9Bh3; rmwHk: $this->load->view("_templates/dashboard/_footer"); goto HVxHD; H9Bh3: $this->load->model("Dashboard_model", "dashboard"); goto NOx10; fmD2K: $setting = $this->dashboard->getSetting(); goto v1wo1; dy1aO: $this->load->view("_templates/dashboard/_header", $data); goto t7hb6; P03xu: $data["id_guru"] = $id_guru; goto VMWo4; Clwvi: $data["smt"] = $this->dashboard->getSemester(); goto sNdWD; t7hb6: $this->load->view("master/guru/detail"); goto rmwHk; eeC1U: $data["tp_active"] = $this->dashboard->getTahunActive(); goto Clwvi; HVxHD: } public function delete() { goto tbYnk; gqIu0: V21Ie: goto hbUXQ; Gwhdy: i8SKj: goto c6le_; iMta5: $this->output_json(["status" => true, "total" => count($chk)]); goto Gwhdy; HrwMA: $chk = $this->input->post("checked", true); goto Agbs4; Agbs4: if (!$chk) { goto lv0FE; } goto MoIEz; T17RJ: $this->output_json(["status" => false]); goto gqIu0; tbYnk: $this->load->model("Master_model", "master"); goto HrwMA; Lu1Lq: lv0FE: goto T17RJ; MoIEz: if (!$this->master->delete("master_guru", $chk, "id_guru")) { goto i8SKj; } goto iMta5; c6le_: goto V21Ie; goto Lu1Lq; hbUXQ: } public function forceDelete() { goto eioOu; jBfK5: $data["status"] = $this->master->delete("master_guru", $id_guru, "id_guru"); goto fU_0a; eioOu: $this->load->model("Master_model", "master"); goto ncDhS; ncDhS: $id_guru = $this->input->post("id_guru", true); goto jBfK5; fU_0a: $this->output_json($data); goto DaEiz; DaEiz: } public function create_user() { goto gbegz; SCgny: dQfAy: goto FCpsB; aS35t: if ($this->ion_auth->email_check($email)) { goto yLqih; } goto EVoh9; Prqak: $group = array("2"); goto vThg7; TzidH: $first_name = $nama[0]; goto zoPp5; EVoh9: $this->ion_auth->register($username, $password, $email, $additional_data, $group); goto orNOY; jQTpI: $password = $data->nip; goto IGFpX; II4lS: yyg8P: goto jbB5v; FCpsB: $this->output_json($data); goto ErD41; gbegz: $this->load->model("Master_model", "master"); goto YySjl; zoPp5: $last_name = end($nama); goto RDNDl; PHd9L: $nama = explode(" ", $data->nama_guru); goto TzidH; IGFpX: $email = $data->email; goto wI7tS; gLpT3: $data = $this->master->getGuruById($id); goto PHd9L; RDNDl: $username = $data->nip; goto jQTpI; vThg7: if ($this->ion_auth->username_check($username)) { goto Og70l; } goto aS35t; ygpJL: yLqih: goto UhWTV; orNOY: $data = ["status" => true, "msg" => "User berhasil dibuat. NIP digunakan sebagai password pada saat login."]; goto t7N2m; jbB5v: goto dQfAy; goto wPDQX; t7N2m: goto yyg8P; goto ygpJL; uN3sI: $data = ["status" => false, "msg" => "Username tidak tersedia (sudah digunakan)."]; goto SCgny; wPDQX: Og70l: goto uN3sI; UhWTV: $data = ["status" => false, "msg" => "Email tidak tersedia (sudah digunakan)."]; goto II4lS; YySjl: $id = $this->input->get("id", true); goto gLpT3; wI7tS: $additional_data = ["first_name" => $first_name, "last_name" => $last_name]; goto Prqak; ErD41: } public function previewExcel() { goto to8_V; KjpK3: $config["max_size"] = 2048; goto crNMN; ob2jp: echo json_encode($data); goto LakdC; B0aU_: $this->load->library("upload", $config); goto Sdfxt; QYCZQ: die; goto gSlG6; HrHsL: ZwPfk: goto DCWg4; AXfzD: rZEFp: goto Ae4y9; ZQdIB: unlink($file); goto ob2jp; Sdfxt: if (!$this->upload->do_upload("upload_file")) { goto ZwPfk; } goto ovBiy; BVcPP: mDtPp: goto OgDlB; dm8Lm: $i = 1; goto LjUJd; DAr33: $ext = $this->upload->data("file_ext"); goto uolV4; LjUJd: AhrFg: goto TuM8n; to8_V: $config["upload_path"] = "./uploads/import/"; goto dKYf7; uolV4: switch ($ext) { case ".xlsx": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx(); goto rZEFp; case ".xls": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls(); goto rZEFp; case ".csv": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv(); goto rZEFp; default: echo "unknown file ext"; die; } goto PsQZE; XqxM2: $sheetData = $spreadsheet->getActiveSheet()->toArray(); goto LW20d; PsQZE: BEYIL: goto AXfzD; TuM8n: if (!($i < count($sheetData))) { goto SyeUD; } goto JIkwk; JIkwk: if (!($sheetData[$i][0] != null)) { goto mDtPp; } goto JbfyA; Ae4y9: $spreadsheet = $reader->load($file); goto XqxM2; QdpET: $i++; goto bDUKV; LakdC: goto Kqcpc; goto HrHsL; xMP6G: echo $error; goto QYCZQ; OgDlB: i9XVK: goto QdpET; gSlG6: Kqcpc: goto Vgj2d; JbfyA: $data[] = ["nama" => $sheetData[$i][1], "nip" => $sheetData[$i][2], "kode" => $sheetData[$i][3], "username" => $sheetData[$i][4], "password" => $sheetData[$i][5]]; goto BVcPP; ovBiy: $file = $this->upload->data("full_path"); goto DAr33; bDUKV: goto AhrFg; goto UAkbk; LW20d: $data = []; goto dm8Lm; DCWg4: $error = $this->upload->display_errors(); goto xMP6G; UAkbk: SyeUD: goto ZQdIB; dKYf7: $config["allowed_types"] = "xls|xlsx|csv"; goto KjpK3; crNMN: $config["encrypt_name"] = true; goto B0aU_; Vgj2d: } public function previewWord() { goto dCzAO; K0QgC: $dom = new DOMDocument(); goto bLpNL; mukTV: $htmlWriter = new \PhpOffice\PhpWord\Writer\HTML($phpWord); goto uQgP7; yQjDX: $text = file_get_contents("./uploads/temp/doc.html"); goto K0QgC; uzKW6: unlink($file); goto yQjDX; fmnXD: die; goto djTgA; Pt4p_: $i = 1; goto iF6ky; dCzAO: $config["upload_path"] = "./uploads/import/"; goto qfftD; ocRCW: echo $error; goto fmnXD; IKqQ2: ga0jl: goto X7YFf; ADjRi: $config["max_size"] = 2048; goto SDy94; SDy94: $config["encrypt_name"] = true; goto uIwav; KYIph: $rows = $tables->item(0)->getElementsByTagName("tr"); goto Pt4p_; HWK13: $error = $this->upload->display_errors(); goto ocRCW; oYzTJ: echo json_encode($data); goto r7dFF; AcDug: $data = []; goto h4s0w; i0P5s: $data[] = ["nama" => $cols->item(1)->nodeValue, "nip" => $cols->item(2)->nodeValue, "kode" => $cols->item(3)->nodeValue, "username" => $cols->item(4)->nodeValue, "password" => $cols->item(5)->nodeValue]; goto IKqQ2; AJWo0: if (!($i < $rows->count())) { goto spdS5; } goto T0p7m; ZkEM_: $phpWord = \PhpOffice\PhpWord\IOFactory::load($file); goto mukTV; fqKbZ: spdS5: goto oYzTJ; RuXY9: goto W27oV; goto fqKbZ; LxtO4: $file = $this->upload->data("full_path"); goto ZkEM_; h4s0w: $dom->preserveWhiteSpace = false; goto TC2CG; TC2CG: $tables = $dom->getElementsByTagName("table"); goto KYIph; uIwav: $this->load->library("upload", $config); goto UJZuY; uQgP7: try { $htmlWriter->save("./uploads/temp/doc.html"); } catch (\PhpOffice\PhpWord\Exception\Exception $e) { } goto uzKW6; iF6ky: W27oV: goto AJWo0; bLpNL: $dom->loadHTML($text); goto AcDug; djTgA: wTIhz: goto U2qtJ; r7dFF: goto wTIhz; goto gUv_s; T0p7m: $cols = $rows[$i]->getElementsByTagName("td"); goto i0P5s; UJZuY: if (!$this->upload->do_upload("upload_file")) { goto bUoFO; } goto LxtO4; X7YFf: $i++; goto RuXY9; gUv_s: bUoFO: goto HWK13; qfftD: $config["allowed_types"] = "docx"; goto ADjRi; U2qtJ: } public function import($import_data = null) { goto v1GrH; smyog: if (!($import_data != null)) { goto TyJHT; } goto UUA9D; UUA9D: $data["import"] = $import_data; goto mh_OZ; GdLI9: $data["tp"] = $this->dashboard->getTahun(); goto UhIzB; XWQ85: $this->load->view("_templates/dashboard/_footer"); goto y3ICs; UhIzB: $data["tp_active"] = $this->dashboard->getTahunActive(); goto K3wLF; mh_OZ: TyJHT: goto GdLI9; v1GrH: $this->load->model("Master_model", "master"); goto veRpT; GcW9i: $user = $this->ion_auth->user()->row(); goto J52vX; qusO6: $data["smt_active"] = $this->dashboard->getSemesterActive(); goto rYkwq; veRpT: $this->load->model("Dashboard_model", "dashboard"); goto GcW9i; J52vX: $setting = $this->dashboard->getSetting(); goto zEkLG; rYkwq: $this->load->view("_templates/dashboard/_header", $data); goto M9F4e; K3wLF: $data["smt"] = $this->dashboard->getSemester(); goto qusO6; M9F4e: $this->load->view("master/guru/add"); goto XWQ85; zEkLG: $data = ["user" => $user, "judul" => "Guru", "subjudul" => "Tambah Data Guru", "mapel" => $this->master->getAllMapel(), "profile" => $this->dashboard->getProfileAdmin($user->id), "setting" => $setting]; goto smyog; y3ICs: } public function preview() { goto HXaHe; U2quZ: $config["max_size"] = 2048; goto ZbNSA; vzq2K: $config["allowed_types"] = "xls|xlsx|csv"; goto U2quZ; nIoQU: goto MHCGs; goto Yr5FU; MymFt: echo $error; goto YsGJ8; rP6mp: unlink($file); goto dhBmy; Kb3rr: $i = 1; goto NZRG6; KEKHL: jVJDB: goto NiQXW; NiQXW: Wr40N: goto F7GHq; LLrJC: $ext = $this->upload->data("file_ext"); goto DsJXi; IIrkG: $data[] = ["nip" => $sheetData[$i][0], "nama_guru" => $sheetData[$i][1], "email" => $sheetData[$i][2], "mapel_id" => $sheetData[$i][3]]; goto JAF70; ZbNSA: $config["encrypt_name"] = true; goto nZyUu; NZRG6: MHCGs: goto tXK_y; YsGJ8: die; goto ggeXg; dhBmy: $this->import($data); goto zKzFO; qtrc6: wv932: goto JduUu; Yr5FU: oqVsv: goto rP6mp; JduUu: $error = $this->upload->display_errors(); goto MymFt; DsJXi: switch ($ext) { case ".xlsx": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx(); goto Wr40N; case ".xls": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls(); goto Wr40N; case ".csv": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv(); goto Wr40N; default: echo "unknown file ext"; die; } goto KEKHL; nZyUu: $this->load->library("upload", $config); goto NdC_V; HXaHe: $config["upload_path"] = "./uploads/import/"; goto vzq2K; tXK_y: if (!($i < count($sheetData))) { goto oqVsv; } goto IIrkG; KWCD2: $file = $this->upload->data("full_path"); goto LLrJC; NdC_V: if (!$this->upload->do_upload("upload_file")) { goto wv932; } goto KWCD2; F7GHq: $spreadsheet = $reader->load($file); goto CTw3Z; I5_zY: $data = []; goto Kb3rr; eBwyh: $i++; goto nIoQU; zKzFO: goto zmNp8; goto qtrc6; ggeXg: zmNp8: goto wOcGz; JAF70: oHEW7: goto eBwyh; CTw3Z: $sheetData = $spreadsheet->getActiveSheet()->toArray(); goto I5_zY; wOcGz: } public function do_import() { goto d1VB8; UZNMS: $input = json_decode($this->input->post("guru", true)); goto qzHzX; MeoLV: $this->output->set_content_type("application/json")->set_output($save); goto hWTjm; qzHzX: $data = []; goto GNAO0; vhO12: qltTb: goto JUlQt; JUlQt: $save = $this->master->create("master_guru", $data, true); goto MeoLV; d1VB8: $this->load->model("Master_model", "master"); goto UZNMS; GNAO0: foreach ($input as $d) { $data[] = ["nama_guru" => trim($d->nama), "nip" => trim($d->nip), "username" => trim($d->username), "password" => trim($d->password), "foto" => "uploads/profiles/" . trim($d->nip) . ".jpg"]; rNPRc: } goto vhO12; hWTjm: } public function editJabatan($id) { goto Dzxly; Dzxly: $this->load->model("Dropdown_model", "dropdown"); goto KvcyT; pC5pa: $data["kur"] = $smt; goto OFZYd; gUzHq: $tp = $this->dashboard->getTahunActive(); goto Vi0p4; kORl4: $data = ["user" => $user, "judul" => "Jabatan Guru", "subjudul" => "Edit Jabatan Guru", "profile" => $this->dashboard->getProfileAdmin($user->id), "setting" => $this->dashboard->getSetting()]; goto iHPx2; tudlL: $data["mapels"] = $this->dropdown->getAllMapel(); goto Pm3rz; e2aUR: $user = $this->ion_auth->user()->row(); goto kORl4; HeLeN: $this->load->view("_templates/dashboard/_header", $data); goto J3eHB; OAUDX: $guru_before->mapel_kelas = json_decode(json_encode(unserialize($guru_before->mapel_kelas))); goto Hsu3q; RgfNN: NNEfU: goto U3Ip3; DiBmE: $data["smt_active"] = $smt; goto UE_9q; Zry8w: $guru_before = $this->master->getJabatanGuru($id, $tp2, $smt2); goto OAUDX; Pm3rz: $data["levels"] = $this->dropdown->getAllLevelGuru(); goto UZb2F; RzIoZ: $data["tp"] = $this->dashboard->getTahun(); goto HN2qT; Vi0p4: $smt = $this->dashboard->getSemesterActive(); goto pklWa; Hsu3q: $guru_before->ekstra_kelas = json_decode(json_encode(unserialize($guru_before->ekstra_kelas))); goto ADQIF; U3Ip3: $data["kelass"] = $this->dropdown->getAllKelas($tp->id_tp, $smt->id_smt); goto tudlL; PtW0x: if (!($group === "admin")) { goto NNEfU; } goto LBeZZ; iHPx2: $data["guru"] = $guru; goto RzIoZ; j9FW_: $data["smt"] = $this->dashboard->getSemester(); goto DiBmE; yOoJd: $this->load->view("_templates/dashboard/_footer"); goto LetbB; J3eHB: $this->load->view("master/guru/editmapel"); goto yOoJd; ADQIF: $data["before"] = ["kelass" => $this->dropdown->getAllKelas($tp2, $smt2), "guru" => $guru_before]; goto HeLeN; pklWa: $guru = $this->master->getJabatanGuru($id, $tp->id_tp, $smt->id_smt); goto e2aUR; UZb2F: $data["ekskul"] = $this->dropdown->getAllEkskul(); goto pC5pa; FJREZ: $this->load->model("Dashboard_model", "dashboard"); goto gUzHq; h6pvw: $tp2 = $smt->id_smt == "1" ? $tp->id_tp - 1 : $tp->id_tp; goto Zry8w; LBeZZ: $data["groups"] = $this->ion_auth->groups()->result(); goto RgfNN; HN2qT: $data["tp_active"] = $tp; goto j9FW_; OFZYd: $smt2 = $smt->id_smt == "1" ? "2" : "1"; goto h6pvw; KvcyT: $this->load->model("Master_model", "master"); goto FJREZ; UE_9q: $group = $this->ion_auth->get_users_groups($user->id)->row()->name; goto PtW0x; LetbB: } public function saveJabatan() { goto T7y1F; dGztq: goto k8EJc; goto vMhBv; EzyVs: if (!$check) { goto P4pLl; } goto dzT99; zfT5A: $kelass1 = $this->kelas->getNamaKelasByNama($tp->id_tp, $smt->id_smt); goto a10Sk; dzT99: $row_kelas = count($this->input->post("kelasmapel" . $mapel, true)); goto digfN; f7o1y: $smt2 = $smt->id_smt == "1" ? "2" : "1"; goto zF4jR; lUxOm: frz84: goto AG4vz; orpgZ: sKLrL: goto zYYKg; ku4Xk: if (!($j <= $row_kelas)) { goto y_mlU; } goto z91sn; v7yN7: if ($copy) { goto XIjNS; } goto nN4yK; Fg82S: $kelas = []; goto ado1z; MnEXq: $ekstra = $this->input->post("ekstra[" . $i . "]", true); goto noBeZ; mm2hd: k8EJc: goto jWUyM; NVWyz: $kelas_wali = $kelass1[$tmp_wali]; goto gLpgo; xWtT8: Mu9Qw: goto ku4Xk; noBeZ: $nama_ekstra = $this->input->post("nama_ekstra" . $ekstra, true); goto rO38V; sAFzJ: $check_ekstra = $this->input->post("ekstra", true); goto BThno; bnNCX: $check = $this->input->post("kelasmapel" . $mapel, true); goto EzyVs; d02xE: $i = 0; goto n6tTB; mVfwe: rgAVH: goto ILIM2; e11Dk: goto fOL9r; goto abLMJ; L8ZPW: goto ow4lj; goto weaZ3; J3JYr: $tmp_nama2 = $kelass2[$kelasekstra]; goto UumJ4; AdRC8: P4pLl: goto X2m1D; Vtx2E: $ekstras[] = ["id_ekstra" => $ekstra, "nama_ekstra" => $nama_ekstra, "kelas_ekstra" => $kelas]; goto EKahx; SvPAL: if ($this->input->post()) { goto ivFfb; } goto eMKS9; wo85L: $mapel = $this->input->post("mapel[" . $i . "]", true); goto WmxYD; weaZ3: XIjNS: goto jBNx3; r1LUx: $mapels = []; goto L8tMl; G90oJ: $id_level = $this->input->post("level", true); goto hKrVn; e9L8n: EUYwK: goto JKZ_3; IoBoh: if (!isset($kelass2[$kelasekstra])) { goto rgAVH; } goto J3JYr; G7BTA: $mapels[] = ["id_mapel" => $mapel, "nama_mapel" => $nama_mapel, "kelas_mapel" => $kelas]; goto AdRC8; WasuP: $data = ["id_jabatan_guru" => $id_guru . $tp->id_tp . $smt->id_smt, "id_guru" => $id_guru, "id_jabatan" => $id_level, "id_kelas" => $kelas_wali == null ? 0 : $kelas_wali, "mapel_kelas" => $kelas_mapel_guru, "ekstra_kelas" => $kelas_ekstra_guru, "id_tp" => $tp->id_tp, "id_smt" => $smt->id_smt]; goto SvPAL; vNDhO: if (!isset($kelass1[$tmp_nama])) { goto lk6_5; } goto oh1CW; iXxyz: $kelas[] = ["kelas" => $kelasmapel]; goto dGztq; fBlJq: $this->load->model("Kelas_model", "kelas"); goto xbjC_; H10Os: HIwLM: goto mm2hd; brxw2: $i = 0; goto H6O1B; tNtf8: $this->load->model("Master_model", "master"); goto fBlJq; rO38V: $check = $this->input->post("kelasekstra" . $ekstra, true); goto zfdzr; vbPvE: goto igD1Y; goto orpgZ; ado1z: $j = 0; goto tqQrz; DY9Pt: $res["msg"] = "Error post data"; goto ehIfy; L8tMl: $check_mapel = $this->input->post("mapel", true); goto QOOdb; WmxYD: $nama_mapel = $this->input->post("nama_mapel" . $mapel, true); goto bnNCX; AG4vz: $kelas_mapel_guru = serialize($mapels); goto V_kAY; V_kAY: $ekstras = []; goto sAFzJ; abLMJ: O5vjZ: goto lUxOm; zF4jR: $tp2 = $smt->id_smt == "1" ? $tp->id_tp - 1 : $tp->id_tp; goto zfT5A; QePw7: $row_kelas = count($this->input->post("kelasekstra" . $ekstra, true)); goto Fg82S; zfdzr: if (!$check) { goto JefZ9; } goto QePw7; vMhBv: FtVvt: goto dcW20; Pyhwg: $tp = $this->master->getTahunActive(); goto iqIoa; iqIoa: $smt = $this->master->getSemesterActive(); goto f7o1y; zYYKg: gSY41: goto mS6bk; a10Sk: $kelass2 = $this->dropdown->getAllKelas($tp2, $smt2); goto v7yN7; H2bYE: $i++; goto vbPvE; H6O1B: fOL9r: goto n3bie; jBNx3: $tmp_wali = $kelass2[$wali]; goto NVWyz; rIhcv: goto Tzsx6; goto F1v4k; zgo2Y: goto Mu9Qw; goto fnP6J; oBe_3: if ($copy) { goto irfN4; } goto vTSjc; pHUTe: $j++; goto zgo2Y; eMKS9: $res["status"] = FALSE; goto DY9Pt; F1v4k: irfN4: goto IoBoh; H2hUN: $update = $this->db->replace("jabatan_guru", $data); goto hlI1S; ehIfy: goto pjxP2; goto r3qX3; n6tTB: igD1Y: goto aYlde; xbjC_: $id_guru = $this->input->post("id_guru", true); goto G90oJ; QOOdb: if (!$check_mapel) { goto frz84; } goto CPQom; BTNHj: Z1gJv: goto H2bYE; digfN: $kelas = []; goto kE35t; gLpgo: ow4lj: goto r1LUx; UC0IU: $res["msg"] = $update ? "Data berhasil disimpan" : "Gagal menyimpan data"; goto QceMl; tqQrz: FZx7g: goto GrvtJ; hKrVn: $wali = $this->input->post("kelas_wali", true); goto sYUj_; hlI1S: $res["status"] = $update; goto UC0IU; UumJ4: $kelas[] = ["kelas" => $kelass1[$tmp_nama2]]; goto mVfwe; uorKN: $kelasekstra = $this->input->post("kelasekstra" . $ekstra . "[" . $j . "]", true); goto oBe_3; At61J: $row_ekstras = count($this->input->post("ekstra", true)); goto d02xE; loSaf: pXCa2: goto Vtx2E; n3bie: if (!($i <= $row_mapels)) { goto O5vjZ; } goto wo85L; k608x: goto FZx7g; goto loSaf; QvIn1: $i++; goto e11Dk; r3qX3: ivFfb: goto H2hUN; ILIM2: Tzsx6: goto e9L8n; BThno: if (!$check_ekstra) { goto gSY41; } goto At61J; nN4yK: $kelas_wali = $wali; goto L8ZPW; CPQom: $row_mapels = count($this->input->post("mapel", true)); goto brxw2; BaE9q: $tmp_nama = $kelass2[$kelasmapel]; goto vNDhO; kdBYC: $this->output_json($res); goto eb42m; z91sn: $kelasmapel = $this->input->post("kelasmapel" . $mapel . "[" . $j . "]", true); goto WrlcO; aYlde: if (!($i <= $row_ekstras)) { goto sKLrL; } goto MnEXq; sYUj_: $copy = $this->input->post("copy", true) != null; goto Pyhwg; QceMl: pjxP2: goto kdBYC; mS6bk: $kelas_ekstra_guru = serialize($ekstras); goto WasuP; dcW20: if (!isset($kelass2[$kelasmapel])) { goto HIwLM; } goto BaE9q; GrvtJ: if (!($j <= $row_kelas)) { goto pXCa2; } goto uorKN; jWUyM: IFqor: goto pHUTe; JKZ_3: $j++; goto k608x; T7y1F: $this->load->model("Dropdown_model", "dropdown"); goto tNtf8; EKahx: JefZ9: goto BTNHj; WrlcO: if ($copy) { goto FtVvt; } goto iXxyz; fnP6J: y_mlU: goto G7BTA; vTSjc: $kelas[] = ["kelas" => $kelasekstra]; goto rIhcv; v1Eun: lk6_5: goto H10Os; kE35t: $j = 0; goto xWtT8; oh1CW: $kelas[] = ["kelas" => $kelass1[$tmp_nama]]; goto v1Eun; X2m1D: ozxGQ: goto QvIn1; eb42m: } public function getDataKelas() { goto mYsNI; fJFfv: $data["jabatan"] = $jbtn; goto ouLM7; Nl2L7: $this->load->model("Dashboard_model", "dashboard"); goto mXxcE; SS2pA: ObG1k: goto fJFfv; eR_rr: $ekstra_terisi = []; goto SL7KB; aFvkg: $jabatans = $this->master->getGuruMapel($tp->id_tp, $smt->id_smt); goto Oy2cY; ZGUtd: $smt = $this->dashboard->getSemesterActive(); goto aFvkg; ouLM7: $data["mpl_terisi"] = $mapel_terisi; goto Rr9bO; G6VYg: $data["kelas"] = $this->users->getKelas($tp->id_tp, $smt->id_smt); goto d0tTw; o5hFB: $tp = $this->dashboard->getTahunActive(); goto ZGUtd; mXxcE: $this->load->model("Users_model", "users"); goto o5hFB; Rr9bO: $data["eks_terisi"] = $ekstra_terisi; goto G6VYg; d0tTw: $this->output_json($data); goto IoGTW; Oy2cY: $mapel_terisi = []; goto eR_rr; HoL83: foreach ($jabatans as $jabatan) { goto CIuSS; ZIpQ5: KwQI6: goto egiam; kGwzX: foreach ($mpl_kls as $mpls) { goto Nfrm2; oDYi0: $mapel_terisi[$mpls->id_mapel][$jabatan->id_guru] = ["id_guru" => $jabatan->id_guru, "guru" => $jabatan->nama_guru, "kelas" => $klss]; goto YJgp9; TQstL: foreach ($mpls->kelas_mapel as $mpl) { $klss[] = $mpl->kelas; P5T4y: } goto a9KNP; YJgp9: T0Ope: goto GiLUg; a9KNP: fHsJG: goto oDYi0; Nfrm2: $klss = []; goto TQstL; GiLUg: } goto ZIpQ5; UiH6o: $jbtn[$jabatan->id_jabatan][$jabatan->id_kelas] = ["nama" => $jabatan->nama_guru, "id" => $jabatan->id_guru]; goto SeKcJ; egiam: foreach ($eks_kls as $eks) { goto Rue1F; owNTe: Kn8k3: goto b7eo0; Rue1F: $klse = []; goto TjNHl; YIs80: OrSZB: goto u3KrF; TjNHl: foreach ($eks->kelas_ekstra as $ek) { $klse[] = $ek->kelas; BnJ_3: } goto YIs80; u3KrF: $ekstra_terisi[$eks->id_ekstra][$jabatan->id_guru] = ["id_guru" => $jabatan->id_guru, "guru" => $jabatan->nama_guru, "kelas" => $klse]; goto owNTe; b7eo0: } goto FRM2u; CIuSS: $mpl_kls = $jabatan->mapel_kelas = json_decode(json_encode(unserialize($jabatan->mapel_kelas))); goto Ygrs5; FRM2u: ezVFz: goto UiH6o; Ygrs5: $eks_kls = $jabatan->ekstra_kelas = json_decode(json_encode(unserialize($jabatan->ekstra_kelas))); goto kGwzX; SeKcJ: k_W1j: goto v_Di1; v_Di1: } goto SS2pA; mYsNI: $this->load->model("Master_model", "master"); goto Nl2L7; SL7KB: $jbtn = []; goto HoL83; IoGTW: } public function addjabatan() { goto VHJ9g; odfiE: $replaced = $this->db->delete("level_guru", "id_level=" . $id); goto xr3lY; VHJ9g: $mode = $this->input->post("mode", true); goto RhNKv; zHwBJ: $this->output_json($data); goto a6o_h; IgjU4: $insert = ["id_level" => $id, "level" => $this->input->post("level", true)]; goto tKhNh; OsIHZ: $data = ["success" => $replaced, "msg" => $replaced ? "Sukses " . $s_mode . " jabatan" : "Gagal " . $s_mode . " jabatan"]; goto zHwBJ; tKhNh: $replaced = $this->db->replace("level_guru", $insert); goto buDZU; YX7ZT: kBaK2: goto IgjU4; w2lBC: if ($mode == "1") { goto kBaK2; } goto odfiE; buDZU: YZr7l: goto OsIHZ; RhNKv: $id = $this->input->post("id_level", true); goto bvcMt; xr3lY: goto YZr7l; goto YX7ZT; bvcMt: $s_mode = $mode == "1" ? "menyimpan" : "menghapus"; goto w2lBC; a6o_h: } } ?>