/* Decoded by unphp.net */ Kembali ke menu awal", 403, "Akses Terlarang"); goto Lsm36; dWgBl: $this->load->library("upload"); goto yYYGx; xa59z: redirect("auth"); goto W3gz7; IWPob: $this->form_validation->set_error_delimiters('', ''); goto WuaMb; HoDEe: if (!(!$this->ion_auth->is_admin() && !$this->ion_auth->in_group("guru"))) { goto oQvr7; } goto gqgql; yYYGx: $this->load->library(["datatables", "form_validation"]); goto IWPob; ZFlRa: NRMuC: goto xa59z; W3gz7: SIEli: goto dWgBl; Lsm36: oQvr7: goto Z5D7R; BVC7h: if (!$this->ion_auth->logged_in()) { goto NRMuC; } goto HoDEe; qO1VU: parent::__construct(); goto BVC7h; Z5D7R: goto SIEli; goto ZFlRa; WuaMb: } public function output_json($data, $encode = true) { goto Hgddl; xEuFR: NphVP: goto Lkr1S; Lkr1S: $this->output->set_content_type("application/json")->set_output($data); goto ECfkI; Hgddl: if (!$encode) { goto NphVP; } goto QAlh9; QAlh9: $data = json_encode($data); goto xEuFR; ECfkI: } public function index() { goto mu16V; iMqF2: $this->load->model("Dropdown_model", "dropdown"); goto SPn13; TLk26: $tpAktif = $tp[$searchTp]; goto O4emi; GB0p4: $tp = $this->dashboard->getTahun(); goto lMn6K; eAbpm: $data["tp"] = $tp; goto aCthP; mu16V: $this->load->model("Dashboard_model", "dashboard"); goto iMqF2; SPn13: $user = $this->ion_auth->user()->row(); goto j5u3B; lMn6K: $smt = $this->dashboard->getSemester(); goto eAbpm; hPEjv: $this->load->view("_templates/dashboard/_footer"); goto ykaZC; YyFaz: $data["profile"] = $this->dashboard->getProfileAdmin($user->id); goto ENmoJ; ENmoJ: $data["kelass"] = $this->dropdown->getAllKelas($tpAktif->id_tp, $smtAktif->id_smt); goto jjpie; fa2tk: $data["smt_active"] = $smtAktif; goto YyFaz; XmKGx: $searchTp = array_search("1", array_column($tp, "active")); goto xgplN; xgplN: $searchSmt = array_search("1", array_column($smt, "active")); goto TLk26; O4emi: $smtAktif = $smt[$searchSmt]; goto X56tP; j5u3B: $data = ["user" => $user, "judul" => "Siswa", "subjudul" => "Data Siswa", "setting" => $this->dashboard->getSetting()]; goto GB0p4; aCthP: $data["smt"] = $smt; goto XmKGx; jjpie: $this->load->view("_templates/dashboard/_header", $data); goto KPR0m; KPR0m: $this->load->view("master/siswa/data"); goto hPEjv; X56tP: $data["tp_active"] = $tpAktif; goto fa2tk; ykaZC: } public function data() { goto OY22E; Dhhz7: $tp = $this->dashboard->getTahunActive(); goto ClERr; ClERr: $smt = $this->dashboard->getSemesterActive(); goto qN0_9; OY22E: $this->load->model("Master_model", "master"); goto ouXnU; ouXnU: $this->load->model("Dashboard_model", "dashboard"); goto Dhhz7; qN0_9: $this->output_json($this->master->getDataSiswa($tp->id_tp, $smt->id_smt), false); goto qCIuN; qCIuN: } public function list() { goto Pcazb; EyBJq: $this->load->model("Dashboard_model", "dashboard"); goto NfU_k; TyHOc: $offset = ($page - 1) * $limit; goto oesHc; OraEt: $count_siswa = $this->master->getSiswaTotalPage($search); goto cz2kS; oesHc: $tp = $this->dashboard->getTahunActive(); goto ms1R9; NfU_k: $page = $this->input->post("page", true); goto tQ3Gh; ms1R9: $smt = $this->dashboard->getSemesterActive(); goto OraEt; cz2kS: $lists = $this->master->getSiswaPage($tp->id_tp, $smt->id_smt, $offset, $limit, $search); goto mVJCK; WN0mN: $this->output_json($data); goto Wj0lE; Ol3BR: $search = $this->input->post("search", true); goto TyHOc; mVJCK: $data = ["lists" => $lists, "total" => $count_siswa, "pages" => ceil($count_siswa / $limit), "search" => $search, "perpage" => $limit]; goto WN0mN; Pcazb: $this->load->model("Master_model", "master"); goto EyBJq; tQ3Gh: $limit = $this->input->post("limit", true); goto Ol3BR; Wj0lE: } public function add() { goto PZ5Mo; PZ5Mo: $this->load->model("Dashboard_model", "dashboard"); goto QAZ20; n4BYM: $data["profile"] = $this->dashboard->getProfileAdmin($user->id); goto NFCVx; GNBC2: $data["smt"] = $this->dashboard->getSemester(); goto sFTZa; snQQ0: $this->load->view("master/siswa/add"); goto FgLTv; Xup64: $data["tp_active"] = $this->dashboard->getTahunActive(); goto GNBC2; h0pTv: $this->load->view("_templates/dashboard/_header", $data); goto snQQ0; I5evE: $data = ["user" => $user, "judul" => "Siswa", "subjudul" => "Tambah Data Siswa", "setting" => $this->dashboard->getSetting()]; goto oHP6x; FgLTv: $this->load->view("_templates/dashboard/_footer"); goto mA11f; oHP6x: $data["tp"] = $this->dashboard->getTahun(); goto Xup64; NFCVx: $data["tipe"] = "add"; goto h0pTv; QAZ20: $user = $this->ion_auth->user()->row(); goto I5evE; sFTZa: $data["smt_active"] = $this->dashboard->getSemesterActive(); goto n4BYM; mA11f: } public function create() { goto XAgYb; I5QCH: $username = $this->input->post("username", true); goto zVAUc; mmjrK: $nis = $this->input->post("nis", true); goto ppD_2; hwdv1: $data["text"] = "Data Sudah ada, Pastikan NIS, NISN dan Username belum digunakan siswa lain"; goto mHwoZ; zVAUc: $u_nis = "|is_unique[master_siswa.nis]"; goto MK0H1; kDm2X: $this->form_validation->set_rules("nis", "NIS", "required|numeric|trim|min_length[6]|max_length[30]" . $u_nis); goto Hl3Ms; mX6ph: GzuBf: goto g1zll; fY4ya: if ($this->form_validation->run() == FALSE) { goto GzuBf; } goto z_Rb0; CSMg5: goto z2KPX; goto mX6ph; m90TM: $u_name = "|is_unique[master_siswa.username]"; goto kDm2X; IwDzI: $siswa = $this->master->getSiswaById($id); goto VnfHj; g1zll: $data["insert"] = false; goto hwdv1; ZI5KY: $this->output_json($data); goto iMlW_; rLMKk: $this->db->set("uid", "UUID()", FALSE); goto PHRrh; UMqVV: $this->form_validation->set_rules("username", "Username", "required|trim" . $u_name); goto fY4ya; mHwoZ: z2KPX: goto ZI5KY; MK0H1: $u_nisn = "|is_unique[master_siswa.nisn]"; goto m90TM; VnfHj: $induk = ["id_siswa" => $id, "uid" => $siswa->uid, "status" => 1]; goto tTm7k; ppD_2: $nisn = $this->input->post("nisn", true); goto I5QCH; z_Rb0: $insert = ["nama" => $this->input->post("nama_siswa", true), "nis" => $nis, "nisn" => $nisn, "jenis_kelamin" => $this->input->post("jenis_kelamin", true), "kelas_awal" => $this->input->post("kelas_awal", true), "tahun_masuk" => $this->input->post("tahun_masuk", true), "username" => $username, "password" => $this->input->post("password", true), "foto" => "uploads/foto_siswa/" . $nis . "jpg"]; goto rLMKk; tTm7k: $this->db->insert("buku_induk", $induk); goto jEHrd; Hl3Ms: $this->form_validation->set_rules("nisn", "NISN", "required|numeric|trim|min_length[6]|max_length[20]" . $u_nisn); goto UMqVV; kgJHA: $id = $this->db->insert_id(); goto IwDzI; XAgYb: $this->load->model("Master_model", "master"); goto mmjrK; PHRrh: $data["insert"] = $this->db->insert("master_siswa", $insert); goto kgJHA; jEHrd: $data["text"] = "Siswa berhasil ditambahkan"; goto CSMg5; iMlW_: } public function edit($id) { goto aYnvC; GdEwC: $inputBio = [["name" => "tempat_lahir", "label" => "Tempat Lahir", "value" => $siswa->tempat_lahir, "icon" => "far fa-map", "class" => '', "type" => "text"], ["name" => "tanggal_lahir", "label" => "Tanggal Lahir", "value" => $siswa->tanggal_lahir, "icon" => "far fa-calendar", "class" => "tahun", "type" => "text"], ["class" => '', "name" => "agama", "label" => "Agama", "value" => $siswa->agama, "icon" => "far fa-calendar", "type" => "text"], ["class" => '', "name" => "alamat", "label" => "Alamat", "value" => $siswa->alamat, "icon" => "far fa-user", "type" => "text"], ["class" => '', "name" => "rt", "label" => "Rt", "value" => $siswa->rt, "icon" => "far fa-user", "type" => "text"], ["class" => '', "name" => "rw", "label" => "Rw", "value" => $siswa->rw, "icon" => "far fa-user", "type" => "text"], ["class" => '', "name" => "kelurahan", "label" => "Kelurahan/Desa", "value" => $siswa->kelurahan, "icon" => "far fa-user", "type" => "text"], ["class" => '', "name" => "kecamatan", "label" => "Kecamatan", "value" => $siswa->kecamatan, "icon" => "far fa-user", "type" => "text"], ["class" => '', "name" => "kabupaten", "label" => "Kabupaten/Kota", "value" => $siswa->kabupaten, "icon" => "far fa-user", "type" => "text"], ["class" => '', "name" => "kode_pos", "label" => "Kode Pos", "value" => $siswa->kode_pos, "icon" => "far fa-user", "type" => "text"], ["class" => '', "name" => "hp", "label" => "Hp", "value" => $siswa->hp, "icon" => "far fa-user", "type" => "text"]]; goto Ji_lq; f73qp: $this->load->model("Dashboard_model", "dashboard"); goto RwLQQ; H64rI: $data = ["user" => $user, "judul" => "Siswa", "subjudul" => "Edit Data Siswa", "siswa" => $siswa, "setting" => $this->dashboard->getSetting()]; goto j5YcX; Gn70t: $data["input_ortu"] = json_decode(json_encode($inputOrtu), FALSE); goto c2yPx; D1Tos: $this->load->view("members/guru/templates/footer"); goto YblNB; cyOI4: $data["smt_active"] = $smt; goto w2U2C; iIG6k: $data["guru"] = $this->dashboard->getDataGuruByUserId($user->id, $tp->id_tp, $smt->id_smt); goto dRXmW; c2yPx: $data["input_wali"] = json_decode(json_encode($inputWali), FALSE); goto B9Rvv; RHYNN: $inputWali = [["name" => "nama_wali", "label" => "Nama Wali", "value" => $siswa->nama_wali, "icon" => "far fa-user", "type" => "text"], ["name" => "pekerjaan_wali", "label" => "Pekerjaan Wali", "value" => $siswa->pekerjaan_wali, "icon" => "far fa-user", "type" => "text"], ["name" => "alamat_wali", "label" => "Alamat Wali", "value" => $siswa->alamat_wali, "icon" => "far fa-user", "type" => "text"], ["name" => "nohp_wali", "label" => "No. HP Wali", "value" => $siswa->nohp_wali, "icon" => "far fa-user", "type" => "number"]]; goto bjVrW; bjVrW: $user = $this->ion_auth->user()->row(); goto H64rI; XsDEK: J97Go: goto tiT_J; e0Omq: $data["input_bio"] = json_decode(json_encode($inputBio), FALSE); goto Gn70t; FOt21: $this->load->view("_templates/dashboard/_header", $data); goto UgkdH; Ji_lq: $inputOrtu = [["name" => "status_keluarga", "label" => "Status Keluarga", "value" => $siswa->status_keluarga, "icon" => "far fa-user", "type" => "text"], ["name" => "anak_ke", "label" => "Anak ke", "value" => $siswa->anak_ke, "icon" => "far fa-user", "type" => "number"], ["name" => "nama_ayah", "label" => "Nama Ayah", "value" => $siswa->nama_ayah, "icon" => "far fa-user", "type" => "text"], ["name" => "pekerjaan_ayah", "label" => "Pekerjaan Ayah", "value" => $siswa->pekerjaan_ayah, "icon" => "far fa-user", "type" => "text"], ["name" => "alamat_ayah", "label" => "Alamat Ayah", "value" => $siswa->alamat_ayah, "icon" => "far fa-user", "type" => "text"], ["name" => "nohp_ayah", "label" => "No. HP Ayah", "value" => $siswa->nohp_ayah, "icon" => "far fa-user", "type" => "number"], ["name" => "nama_ibu", "label" => "Nama Ibu", "value" => $siswa->nama_ibu, "icon" => "far fa-user", "type" => "text"], ["name" => "pekerjaan_ibu", "label" => "Pekerjaan Ibu", "value" => $siswa->pekerjaan_ibu, "icon" => "far fa-user", "type" => "text"], ["name" => "alamat_ibu", "label" => "Alamat Ibu", "value" => $siswa->alamat_ibu, "icon" => "far fa-user", "type" => "text"], ["name" => "nohp_ibu", "label" => "No. HP Ibu", "value" => $siswa->nohp_ibu, "icon" => "far fa-user", "type" => "number"]]; goto RHYNN; jRr3B: $inputData = [["label" => "Nama Lengkap", "name" => "nama", "value" => $siswa->nama, "icon" => "far fa-user", "class" => '', "type" => "text"], ["label" => "NIS", "name" => "nis", "value" => $siswa->nis, "icon" => "far fa-id-card", "class" => '', "type" => "number"], ["name" => "nisn", "label" => "NISN", "value" => $siswa->nisn, "icon" => "far fa-id-card", "class" => '', "type" => "text"], ["label" => "Jenis Kelamin", "name" => "jenis_kelamin", "value" => $siswa->jenis_kelamin, "icon" => "fas fa-venus-mars", "class" => '', "type" => "text"], ["name" => "kelas_awal", "label" => "Diterima di kelas", "value" => $siswa->kelas_awal, "icon" => "fas fa-graduation-cap", "class" => '', "type" => "text"], ["name" => "tahun_masuk", "label" => "Tgl diterima", "value" => $siswa->tahun_masuk, "icon" => "tahun far fa-calendar-alt", "class" => "tahun", "type" => "text"], ["name" => "sekolah_asal", "label" => "Sekolah Asal", "value" => $siswa->sekolah_asal, "icon" => "fas fa-graduation-cap", "class" => '', "type" => "text"], ["name" => "status", "label" => "Setatus", "value" => $siswa->status, "icon" => "far fa-user", "class" => "status", "type" => "text"]]; goto GdEwC; B9Rvv: $data["profile"] = $this->dashboard->getProfileAdmin($user->id); goto zhjrb; RwLQQ: $siswa = $this->master->getSiswaById($id); goto jRr3B; d1HfA: $data["smt"] = $this->dashboard->getSemester(); goto MOpdy; BjTt7: $smt = $this->master->getSemesterActive(); goto n11oQ; zhjrb: if ($this->ion_auth->is_admin()) { goto EWLmk; } goto iIG6k; edaY7: $this->load->view("master/siswa/edit"); goto D1Tos; aYnvC: $this->load->model("Master_model", "master"); goto f73qp; Upf_H: $this->load->view("_templates/dashboard/_footer"); goto XsDEK; AtOEd: EWLmk: goto FOt21; YblNB: goto J97Go; goto AtOEd; MOpdy: $data["tp_active"] = $tp; goto cyOI4; w2U2C: $data["input_data"] = json_decode(json_encode($inputData), FALSE); goto e0Omq; n11oQ: $data["tp"] = $this->dashboard->getTahun(); goto d1HfA; dRXmW: $this->load->view("members/guru/templates/header", $data); goto edaY7; UgkdH: $this->load->view("master/siswa/edit"); goto Upf_H; j5YcX: $tp = $this->master->getTahunActive(); goto BjTt7; tiT_J: } public function updateData() { goto Y8icw; nXyMU: $input = ["nisn" => $this->input->post("nisn", true), "nis" => $this->input->post("nis", true), "nama" => $this->input->post("nama", true), "jenis_kelamin" => $this->input->post("jenis_kelamin", true), "tempat_lahir" => $this->input->post("tempat_lahir", true), "tanggal_lahir" => $this->strContains($tgl_lahir, "0000-") ? null : $tgl_lahir, "agama" => $this->input->post("agama", true), "status_keluarga" => $this->input->post("status_keluarga", true), "anak_ke" => $this->input->post("anak_ke", true), "alamat" => $this->input->post("alamat", true), "rt" => $this->input->post("rt", true), "rw" => $this->input->post("rw", true), "kelurahan" => $this->input->post("kelurahan", true), "kecamatan" => $this->input->post("kecamatan", true), "kabupaten" => $this->input->post("kabupaten", true), "provinsi" => $this->input->post("provinsi", true), "kode_pos" => $this->input->post("kode_pos", true), "hp" => $this->input->post("hp", true), "nama_ayah" => $this->input->post("nama_ayah", true), "nohp_ayah" => $this->input->post("nohp_ayah", true), "pendidikan_ayah" => $this->input->post("pendidikan_ayah", true), "pekerjaan_ayah" => $this->input->post("pekerjaan_ayah", true), "alamat_ayah" => $this->input->post("alamat_ayah", true), "nama_ibu" => $this->input->post("nama_ibu", true), "nohp_ibu" => $this->input->post("nohp_ibu", true), "pendidikan_ibu" => $this->input->post("pendidikan_ibu", true), "pekerjaan_ibu" => $this->input->post("pekerjaan_ibu", true), "alamat_ibu" => $this->input->post("alamat_ibu", true), "nama_wali" => $this->input->post("nama_wali", true), "pendidikan_wali" => $this->input->post("pendidikan_wali", true), "pekerjaan_wali" => $this->input->post("pekerjaan_wali", true), "nohp_wali" => $this->input->post("nohp_wali", true), "alamat_wali" => $this->input->post("alamat_wali", true), "tahun_masuk" => $this->strContains($tgl_masuk, "0000-") ? null : $tgl_masuk, "kelas_awal" => $this->input->post("kelas_awal", true), "tgl_lahir_ayah" => $this->input->post("tgl_lahir_ayah", true), "tgl_lahir_ibu" => $this->input->post("tgl_lahir_ibu", true), "tgl_lahir_wali" => $this->input->post("tgl_lahir_wali", true), "sekolah_asal" => $this->input->post("sekolah_asal", true), "foto" => $siswa->foto != null && $siswa->foto != '' ? $siswa->foto : "uploads/foto_siswa/" . $nis . ".jpg"]; goto TMC9u; kBl3J: if ($this->form_validation->run() == FALSE) { goto l1Y96; } goto E3crI; mlGei: $siswa = $this->master->getSiswaById($id_siswa); goto UdMk7; P8G8s: $data["insert"] = false; goto qXNcT; YMI8X: $nisn = $this->input->post("nisn", true); goto mlGei; UdMk7: $u_nis = $siswa->nis === $nis ? '' : "|is_unique[master_siswa.nis]"; goto TZU3X; z4mTm: $data["text"] = "Siswa berhasil diperbaharui"; goto aWMm4; KqgMY: tVDU2: goto hH3Pb; E3crI: $tgl_lahir = $this->input->post("tanggal_lahir", true); goto CcF94; hH3Pb: $this->output_json($data); goto jsjQa; TZU3X: $u_nisn = $siswa->nisn === $nisn ? '' : "|is_unique[master_siswa.nisn]"; goto icU8w; DDgo2: $id_siswa = $this->input->post("id_siswa", true); goto l49ze; qXNcT: $data["text"] = "NIS kurang dari 6 angka, atau data Sudah ada, Pastikan NIS, dan NISN belum digunakan siswa lain"; goto KqgMY; CcF94: $tgl_masuk = $this->input->post("tahun_masuk", true); goto nXyMU; aWMm4: goto tVDU2; goto lOH7t; TMC9u: $this->master->update("master_siswa", $input, "id_siswa", $id_siswa); goto EFqZt; Y8icw: $this->load->model("Master_model", "master"); goto DDgo2; j28SR: $this->db->where("id_siswa", $siswa->id_siswa); goto DMyNx; lOH7t: l1Y96: goto P8G8s; l49ze: $nis = $this->input->post("nis", true); goto YMI8X; MSV0N: $data["insert"] = $input; goto z4mTm; icU8w: $this->form_validation->set_rules("nis", "NIS", "required|numeric|trim|min_length[6]|max_length[30]" . $u_nis); goto kBl3J; DMyNx: $this->db->update("buku_induk"); goto MSV0N; EFqZt: $this->db->set("status", $this->input->post("status", true)); goto j28SR; jsjQa: } function strContains($string, $val) { return strpos($string, $val) !== false; } function uploadFile($id_siswa) { goto G1H7T; xzNzq: $data["status"] = true; goto xOECD; BUxBG: $data["src"] = ''; goto g5fFv; RsWxL: $data["filename"] = pathinfo($result["file_name"], PATHINFO_FILENAME); goto xzNzq; CxTza: if (isset($_FILES["foto"]["name"])) { goto qU1pU; } goto BUxBG; TpFbc: S7lOG: goto J72Yt; ijP60: $data["src"] = $this->upload->display_errors(); goto K0L3K; yuCfa: $config["overwrite"] = true; goto E9OQw; p4FZP: qU1pU: goto ErLCb; pTJXt: $this->db->where("id_siswa", $id_siswa); goto pqZKg; g5fFv: goto c6eLb; goto p4FZP; SIdet: $data["src"] = base_url() . "uploads/foto_siswa/" . $result["file_name"]; goto RsWxL; xOECD: $this->db->set("foto", "uploads/foto_siswa/" . $result["file_name"]); goto pTJXt; T0RVp: $this->output_json($data); goto U17jq; fgGab: $data["type"] = $_FILES["foto"]["type"]; goto xFCbh; KXcVU: c6eLb: goto T0RVp; QLkmx: $config["allowed_types"] = "gif|jpg|png|jpeg|JPEG|JPG|PNG|GIF"; goto yuCfa; ErLCb: $config["upload_path"] = "./uploads/foto_siswa/"; goto QLkmx; vSmzo: if (!$this->upload->do_upload("foto")) { goto S7lOG; } goto OE0ny; J72Yt: $data["status"] = false; goto ijP60; pqZKg: $this->db->update("master_siswa"); goto t2Hqx; OE0ny: $result = $this->upload->data(); goto SIdet; rBcZ3: $this->upload->initialize($config); goto vSmzo; xFCbh: $data["size"] = $_FILES["foto"]["size"]; goto KXcVU; uOsxd: $siswa = $this->master->getSiswaById($id_siswa); goto CxTza; t2Hqx: goto Q20iq; goto TpFbc; G1H7T: $this->load->model("Master_model", "master"); goto uOsxd; E9OQw: $config["file_name"] = $siswa->nis; goto rBcZ3; K0L3K: Q20iq: goto fgGab; U17jq: } function deleteFile($id_siswa) { goto q2zWS; S7Ef1: $this->db->update("master_siswa"); goto rUlnj; q2zWS: $src = $this->input->post("src"); goto UDw8_; KwOG8: vOahp: goto jVMO4; UDw8_: $file_name = str_replace(base_url(), '', $src); goto IizjD; IizjD: if (!($file_name != "assets/img/siswa.png")) { goto usdh2; } goto yXPgf; lJM8d: $this->db->set("foto", ''); goto JmMyr; JmMyr: $this->db->where("id_siswa", $id_siswa); goto S7Ef1; jVMO4: usdh2: goto bIZbW; yXPgf: if (!unlink($file_name)) { goto vOahp; } goto lJM8d; rUlnj: echo "File Delete Successfully"; goto KwOG8; bIZbW: } public function delete() { goto blxGg; ZBLhQ: goto l895P; goto c8yCa; blxGg: $this->load->model("Master_model", "master"); goto cmlLp; wsXGs: $this->output_json(["status" => false]); goto Wx2l6; c8yCa: pA5jZ: goto wsXGs; fRGxk: $this->master->delete("buku_induk", $chk, "id_siswa"); goto jva2M; jva2M: $this->output_json(["status" => true, "total" => count($chk)]); goto NiYQQ; nzjtX: if (!$chk) { goto pA5jZ; } goto w4lJH; Wx2l6: l895P: goto diRfN; NiYQQ: Fs4ra: goto ZBLhQ; cmlLp: $chk = $this->input->post("checked", true); goto nzjtX; w4lJH: if (!$this->master->delete("master_siswa", $chk, "id_siswa")) { goto Fs4ra; } goto fRGxk; diRfN: } public function previewExcel() { goto dhD5_; ju0mh: die; goto mOtbT; dkF2h: aRzao: goto IJh2M; P4EA_: $i++; goto mpAun; hstyT: if (!($sheetData[$i][0] != null)) { goto aRzao; } goto PE37F; INJKG: $spreadsheet = $reader->load($file); goto TpF7v; mpAun: goto rpZMq; goto Nxjoh; hTHvq: GvxSi: goto UeMPT; PrP1w: ga5f1: goto hssh7; MdMbZ: echo json_encode($data); goto GU1lF; cPF_Y: $config["allowed_types"] = "xls|xlsx|csv"; goto E3fap; GU1lF: goto RNR92; goto PrP1w; R90vS: $config["upload_path"] = "./uploads/import/"; goto cPF_Y; IFOVr: echo $error; goto ju0mh; GnJgC: unlink($file); goto fs6nW; KI7vQ: $data["siswa"][] = ["nisn" => $nisn, "nis" => $nis, "nama" => $sheetData[$i][3], "jenis_kelamin" => $sheetData[$i][4], "username" => $username, "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 dkF2h; BnJ1H: $nis = str_replace("'", '', $sheetData[$i][2]); goto uT_Y4; PE37F: $nisn = str_replace("'", '', $sheetData[$i][1]); goto plQdy; mVV65: $username = $sheetData[$i][5]; goto Ayte2; mnRjK: $i = 1; goto Qu2M6; Nxjoh: m2L5n: goto GnJgC; dhD5_: $this->load->model("Master_model", "master"); goto R90vS; TpF7v: $sheetData = $spreadsheet->getActiveSheet()->toArray(); goto WrLCI; IJh2M: ipoA2: goto P4EA_; fYwTA: if (!$this->upload->do_upload("upload_file")) { goto ga5f1; } goto o85n0; fs6nW: $data["exist"] = $this->master->getSiswaByArrNisn($arr_nisn, $arr_nis, $arr_username); goto MdMbZ; NakWK: $config["encrypt_name"] = true; goto LSnOH; WrLCI: $data = []; goto XkZXr; o85n0: $file = $this->upload->data("full_path"); goto URhsZ; UeMPT: UgX4J: goto INJKG; hbEYO: if (!($i < count($sheetData))) { goto m2L5n; } goto hstyT; XkZXr: $arr_nisn = []; goto whGIR; Ayte2: $arr_username[] = $username; goto KI7vQ; whGIR: $arr_nis = []; goto Dq0sM; hssh7: $error = $this->upload->display_errors(); goto IFOVr; LSnOH: $this->upload->initialize($config); goto fYwTA; Dq0sM: $arr_username = []; goto mnRjK; E3fap: $config["max_size"] = 2048; goto NakWK; q03Rt: switch ($ext) { case ".xlsx": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx(); goto UgX4J; case ".xls": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls(); goto UgX4J; case ".csv": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv(); goto UgX4J; default: echo "unknown file ext"; die; } goto hTHvq; uT_Y4: $arr_nis[] = $nis; goto mVV65; mOtbT: RNR92: goto rTTcW; plQdy: $arr_nisn[] = $nisn; goto BnJ1H; URhsZ: $ext = $this->upload->data("file_ext"); goto q03Rt; Qu2M6: rpZMq: goto hbEYO; rTTcW: } public function do_import() { goto lGIT7; Y6gXu: $data = ["status" => true, "errors" => []]; goto vJ39b; r27Om: iLWR2: goto yj0EX; vJ39b: $this->output_json($data); goto dUUKE; lGIT7: $input = json_decode($this->input->post("siswa", true)); goto aFnfm; ZxRUU: jIRbi: goto vmSOU; AP8lI: $this->db->trans_complete(); goto Y6gXu; WGOpV: $this->output_json($data); goto ZxRUU; aFnfm: $errors = []; goto DIszB; DIszB: $duplikat = []; goto YjEmB; goF1J: foreach ($input as $key1 => $val1) { goto zOi2Z; bng17: $save = $this->db->insert("master_siswa", $data); goto zBOnn; zBOnn: Zov0I: goto cMF1W; P6whl: $data["foto"] = "uploads/foto_siswa/" . $data["nis"] . ".jpg"; goto mtnSP; IfuuV: foreach (((array) $input)[$key1] as $key => $val) { goto Hh7yl; PJJEj: YKME_: goto ag9DT; ag9DT: eZ1uo: goto yYG03; zu1Cz: GlFTK: goto sud5q; Hh7yl: if ($key == "status_keluarga" && $val == null) { goto GlFTK; } goto xN0y_; LeV6o: goto YKME_; goto zu1Cz; xN0y_: $data[$key] = $val; goto LeV6o; sud5q: $data[$key] = "1"; goto PJJEj; yYG03: } goto wI10u; wI10u: TdcEb: goto P6whl; mtnSP: $this->db->set("uid", "UUID()", FALSE); goto bng17; zOi2Z: $data = []; goto IfuuV; cMF1W: } goto r27Om; YjEmB: foreach ($input as $key1 => $val1) { goto a3N1k; HWgWk: $u_nisn = "|is_unique[master_siswa.nisn]"; goto kyZxX; I2Arm: $this->form_validation->set_data($data); goto J3lIX; kyZxX: $u_name = "|is_unique[master_siswa.username]"; goto RVPPI; FzxXD: foreach (((array) $input)[$key1] as $key => $val) { $data[$key] = $val; pPoa6: } goto P3bz2; kPrRd: $this->form_validation->set_rules("username", "Username", "required|trim" . $u_name); goto JKGRP; QetWZ: r5FJD: goto Ta1Xa; a3N1k: $data = []; goto FzxXD; kExKY: $this->form_validation->set_rules("nisn", "NISN", "required|numeric|trim|min_length[6]|max_length[20]" . $u_nisn); goto kPrRd; e0Pc1: EE6WP: goto QetWZ; P3bz2: U8mf8: goto I2Arm; J3lIX: $u_nis = "|is_unique[master_siswa.nis]"; goto HWgWk; KvulW: $duplikat[] = $data; goto ZwmE4; JKGRP: if (!($this->form_validation->run() == FALSE)) { goto EE6WP; } goto KvulW; RVPPI: $this->form_validation->set_rules("nis", "NIS", "required|numeric|trim|min_length[6]|max_length[30]" . $u_nis); goto kExKY; ZwmE4: $errors[$data["nama"]] = ["nis" => form_error("nis"), "nisn" => form_error("nisn"), "username" => form_error("username")]; goto e0Pc1; Ta1Xa: } goto PbfTw; f2Y3_: if (count($errors) > 0) { goto Wdf6l; } goto pXQ07; tnNR7: foreach ($uids as $uid) { goto uIDvG; PJYeE: $this->db->insert("buku_induk", $uid); goto mCIl1; mCIl1: nzOot: goto A5qWl; a9ouR: if (!($check->get()->num_rows() == 0)) { goto nzOot; } goto PJYeE; uIDvG: $check = $this->db->select("id_siswa")->from("buku_induk")->where("id_siswa", $uid->id_siswa); goto a9ouR; A5qWl: FRCQz: goto AwOR_; AwOR_: } goto FuL5v; yj0EX: $uids = $this->db->select("id_siswa, uid")->from("master_siswa")->get()->result(); goto tnNR7; pXQ07: $this->db->trans_start(); goto goF1J; PbfTw: T84hj: goto f2Y3_; dUUKE: goto jIRbi; goto c7Vyr; zLW6L: $data = ["status" => false, "errors" => $errors, "duplikat" => $duplikat]; goto WGOpV; FuL5v: hY4bA: goto AP8lI; c7Vyr: Wdf6l: goto zLW6L; vmSOU: } public function update() { goto Pi9O_; drjDc: $this->load->view("master/siswa/update"); goto O1JWl; Pi9O_: $this->load->model("Dashboard_model", "dashboard"); goto IFkHN; O2Sry: $data["tipe"] = "update"; goto HkBg4; UKwfY: $tp = $this->dashboard->getTahunActive(); goto hLA9a; kRQN5: $data["smt"] = $this->dashboard->getSemester(); goto LEIYY; hLA9a: $smt = $this->dashboard->getSemesterActive(); goto GgudU; NRYgK: $data["tp"] = $this->dashboard->getTahun(); goto kRQN5; R07u1: $this->load->view("_templates/dashboard/_header", $data); goto drjDc; IFkHN: $this->load->model("Dropdown_model", "dropdown"); goto PvnKy; GgudU: $data["tp_active"] = $tp; goto EY5LH; EY5LH: $data["smt_active"] = $smt; goto NRYgK; LEIYY: $data["profile"] = $this->dashboard->getProfileAdmin($user->id); goto O2Sry; PvnKy: $user = $this->ion_auth->user()->row(); goto Lys1W; Lys1W: $data = ["user" => $user, "judul" => "Update Data Siswa", "subjudul" => "Update Data Siswa", "setting" => $this->dashboard->getSetting()]; goto UKwfY; O1JWl: $this->load->view("_templates/dashboard/_footer"); goto l2TkH; HkBg4: $data["kelas"] = $this->dropdown->getAllKelas($tp->id_tp, $smt->id_smt); goto R07u1; l2TkH: } public function downloadData($id_kelas) { goto Xfy7w; RXt4r: $kel = []; goto WLfjF; GX4RO: $alamat_siswa[] = $siswa->alamat; goto wCEpq; azhdX: $i = 0; goto pOubm; wHh5B: $tempat_lahir[] = $siswa->tempat_lahir; goto kKFqT; uj1if: $tgl_lahir_ibu[] = $siswa->tgl_lahir_ibu; goto SNOZb; FVLpr: $tgl_lahir = []; goto s1gxM; uwUBw: $kode_pos = []; goto lcLUG; iBAV7: $params = ["[id]" => $ids, "[no]" => $no, "[nis]" => $nis, "[nisn]" => $nisn, "[nama]" => $nama, "[jk]" => $jk, "[username]" => $username, "[password]" => $password, "[kelas_awal]" => $kelas_awal, "[tgl_diterima]" => $tgl_diterima, "[sekolah_asal]" => $sekolah_asal, "[tempat_lahir]" => $tempat_lahir, "[tgl_lahir]" => $tgl_lahir, "[agama]" => $agama, "[tlp_siswa]" => $tlp_siswa, "[email]" => $email, "[anak_ke]" => $anak_ke, "[status_keluarga]" => $status_keluarga, "[alamat_siswa]" => $alamat_siswa, "[rt]" => $rt, "[rw]" => $rw, "[kel]" => $kel, "[kec]" => $kec, "[kab]" => $kab, "[prov]" => $prov, "[kode_pos]" => $kode_pos, "[nama_ayah]" => $nama_ayah, "[tgl_lahir_ayah]" => $tgl_lahir_ayah, "[pendidikan_ayah]" => $pendidikan_ayah, "[pekerjaan_ayah]" => $pekerjaan_ayah, "[tlp_ayah]" => $tlp_ayah, "[alamat_ayah]" => $alamat_ayah, "[nama_ibu]" => $nama_ibu, "[tgl_lahir_ibu]" => $tgl_lahir_ibu, "[pendidikan_ibu]" => $pendidikan_ibu, "[pekerjaan_ibu]" => $pekerjaan_ibu, "[tlp_ibu]" => $tlp_ibu, "[alamat_ibu]" => $alamat_ibu, "[nama_wali]" => $nama_wali, "[tgl_lahir_wali]" => $tgl_lahir_wali, "[pendidikan_wali]" => $pendidikan_wali, "[pekerjaan_wali]" => $pekerjaan_wali, "[tlp_wali]" => $tlp_wali, "[alamat_wali]" => $alamat_wali]; goto tTNem; zQXB3: $email[] = $siswa->email; goto eGp7G; USp7e: $tlp_ibu = []; goto yXCTh; kBlY0: $status_keluarga[] = $siswa->status_keluarga; goto GX4RO; DHEh_: sLw90: goto yBs9J; olEBb: $anak_ke[] = $siswa->anak_ke; goto kBlY0; eGp7G: $jk[] = $siswa->jenis_kelamin; goto pkBu1; hC50W: $nama_wali = []; goto RR8_W; WGvyH: $pendidikan_wali[] = $siswa->pendidikan_wali; goto zzUxx; Rd4S9: $pekerjaan_ibu = []; goto USp7e; Zqd2W: $jk = []; goto eyV7G; rvjzK: $pekerjaan_wali = []; goto EWln1; Xfy7w: $this->load->model("Master_model", "master"); goto HifFF; aE4fc: $kelas_awal = []; goto pXPXb; eyV7G: $username = []; goto Sit9H; Uo_oP: $kab = []; goto PyUKK; MIrM3: $nis = []; goto ANlVZ; Astfp: $tgl_lahir_ayah[] = $siswa->tgl_lahir_ayah; goto W_bfq; z5zNc: $alamat_wali[] = $siswa->alamat_wali; goto DHEh_; GtNbk: $tgl_lahir_ibu = []; goto Fwgfc; STOd_: $tlp_siswa = []; goto B06WP; W8bjA: $pendidikan_ayah = []; goto bP36K; afsLh: $alamat_ibu[] = $siswa->alamat_ibu; goto K6obd; E8Xp_: $pekerjaan_ayah[] = $siswa->pekerjaan_ayah; goto XYLF3; pyv0Z: $rw[] = $siswa->rw; goto YnnMF; yXCTh: $alamat_ibu = []; goto hC50W; mR1FX: $alamat_ayah = []; goto ih1U1; Lyn9V: $sekolah_asal[] = $siswa->sekolah_asal; goto wHh5B; ocaUp: $tgl_diterima[] = $siswa->tahun_masuk; goto Lyn9V; D0XvM: $tlp_ibu[] = "'" . $siswa->nohp_ibu; goto afsLh; wN5NJ: $ids = []; goto MIrM3; tLbCE: $kode_pos[] = $siswa->kode_pos; goto UwgKX; lcLUG: $nama_ayah = []; goto k7nAD; enUDW: $alamat_siswa = []; goto bUTch; DZ7QW: $nama = []; goto Zqd2W; rYQr0: $password[] = $siswa->password; goto biz_6; yBs9J: $i++; goto n3k51; Fwgfc: $pendidikan_ibu = []; goto Rd4S9; HiGDf: $no = []; goto wN5NJ; NTVw0: $alamat_wali = []; goto azhdX; bUTch: $rt = []; goto P2Obk; lSXVt: $no[] = $i + 1; goto ugZGN; wCEpq: $rt[] = $siswa->rt; goto pyv0Z; PyUKK: $prov = []; goto uwUBw; ANlVZ: $nisn = []; goto DZ7QW; zzUxx: $pekerjaan_wali[] = $siswa->pekerjaan_wali; goto zDnoY; lveSd: $nama[] = $siswa->nama; goto zQXB3; P2Obk: $rw = []; goto RXt4r; RpMih: $kelas = $this->master->getKelasById($id_kelas); goto KBnlf; Sit9H: $password = []; goto aE4fc; sHKIi: $nisn[] = "'" . $siswa->nisn; goto lveSd; XHlA2: $alamat_ayah[] = $siswa->alamat_ayah; goto pF1IR; h3L7M: $prov[] = $siswa->provinsi; goto tLbCE; WLfjF: $kec = []; goto Uo_oP; CEBuT: $tgl_lahir_wali[] = $siswa->tgl_lahir_wali; goto WGvyH; RR8_W: $tgl_lahir_wali = []; goto rFXHY; Th0Vq: $tlp_ayah = []; goto mR1FX; XzGhd: $tempat_lahir = []; goto FVLpr; pABjG: HwM_I: goto iBAV7; bP36K: $pekerjaan_ayah = []; goto Th0Vq; pkBu1: $username[] = $siswa->username; goto rYQr0; SNOZb: $pendidikan_ibu[] = $siswa->pendidikan_ibu; goto qvuX9; EWln1: $tlp_wali = []; goto NTVw0; jDkfO: $nis[] = "'" . $siswa->nis; goto sHKIi; k7nAD: $tgl_lahir_ayah = []; goto W8bjA; B06WP: $email = []; goto vKi_P; biz_6: $kelas_awal[] = $siswa->kelas_awal; goto ocaUp; K6obd: $nama_wali[] = $siswa->nama_wali; goto CEBuT; XYLF3: $tlp_ayah[] = "'" . $siswa->nohp_ayah; goto XHlA2; LL12s: $siswa = $siswas[$i]; goto lSXVt; pOubm: oA8jO: goto NxsPr; GaSzL: $smt = $this->master->getSemesterActive(); goto RpMih; FarKF: $kec[] = $siswa->kecamatan; goto JYkfs; qvuX9: $pekerjaan_ibu[] = $siswa->pekerjaan_ibu; goto D0XvM; W_bfq: $pendidikan_ayah[] = $siswa->pendidikan_ayah; goto E8Xp_; rFXHY: $pendidikan_wali = []; goto rvjzK; hpl8Q: $fileName = "Data Siswa Kelas " . $kelas->nama_kelas . ".xlsx"; goto HiGDf; icOrI: $sekolah_asal = []; goto XzGhd; YnnMF: $kel[] = $siswa->kelurahan; goto FarKF; dEb43: $tlp_siswa[] = "'" . $siswa->hp; goto olEBb; n3k51: goto oA8jO; goto pABjG; tTNem: PhpExcelTemplator::outputToFile($template, $fileName, $params); goto o53zP; vKi_P: $anak_ke = []; goto Do8kO; NxsPr: if (!($i < count($siswas))) { goto HwM_I; } goto LL12s; kKFqT: $tgl_lahir[] = $siswa->tanggal_lahir; goto ubtRB; ih1U1: $nama_ibu = []; goto GtNbk; JYkfs: $kab[] = $siswa->kabupaten; goto h3L7M; pXPXb: $tgl_diterima = []; goto icOrI; HifFF: $tp = $this->master->getTahunActive(); goto GaSzL; ugZGN: $ids[] = $siswa->id_siswa; goto jDkfO; UwgKX: $nama_ayah[] = $siswa->nama_ayah; goto Astfp; pF1IR: $nama_ibu[] = $siswa->nama_ibu; goto uj1if; Do8kO: $status_keluarga = []; goto enUDW; KBnlf: $siswas = $this->master->getSiswaByKelas($tp->id_tp, $smt->id_smt, $id_kelas); goto eOkJ9; ubtRB: $agama[] = $siswa->agama; goto dEb43; s1gxM: $agama = []; goto STOd_; zDnoY: $tlp_wali[] = "'" . $siswa->nohp_wali; goto z5zNc; eOkJ9: $template = "./uploads/import/format/format_update_siswa.xlsx"; goto hpl8Q; o53zP: } public function updateAll() { goto Ai8FZ; ZVec7: Mc2UA: goto R8zw_; R8zw_: $this->db->trans_complete(); goto ky0Q0; CTzx1: $this->output_json($data); goto ii33P; k2Vvn: foreach ($input as $key1 => $val1) { goto Xes7x; BxlpL: Yr8Of: goto UCLWY; YeDZA: $kid = "id_siswa"; goto ZvyYH; Mw7lo: $save = $this->db->update("master_siswa", $data, array("id_siswa" => $id_siswa)); goto BxlpL; Vnx1X: foreach (((array) $input)[$key1] as $key => $val) { goto sj0PZ; sj0PZ: if ($key == $kid) { goto OGrru; } goto lHULR; BuS6X: VrdD9: goto t152i; RyDz1: OGrru: goto rStud; rStud: $id_siswa = $val; goto BuS6X; fa4vA: mJ9l5: goto Q_PCt; mW0tm: if (!($key == "nis")) { goto mJ9l5; } goto EFM1H; Q_PCt: goto VrdD9; goto RyDz1; lHULR: $data[$key] = $val; goto mW0tm; t152i: wY6sw: goto NhEug; EFM1H: $data["foto"] = "uploads/foto_siswa/" . $val . ".jpg"; goto fa4vA; NhEug: } goto PYjKU; PYjKU: JWJop: goto Mw7lo; ZvyYH: $id_siswa = "0"; goto Vnx1X; Xes7x: $data = []; goto YeDZA; UCLWY: } goto ZVec7; Ai8FZ: $input = json_decode($this->input->post("siswa", true)); goto ZcCtx; ky0Q0: $data = ["status" => $save, "errors" => []]; goto CTzx1; ZcCtx: $this->db->trans_start(); goto k2Vvn; ii33P: } public function previewExcelNis() { goto akIDQ; eaUkE: $config["max_size"] = 2048; goto uoYoh; Jk9YQ: echo json_encode($data); goto aHmoX; eCBTE: $file = $this->upload->data("full_path"); goto szoc3; aHmoX: goto NVBOc; goto anFYT; yq2_k: NVBOc: goto q7S1t; anFYT: u1DgP: goto N6WLy; lC5LP: $config["allowed_types"] = "xls|xlsx|csv"; goto eaUkE; akIDQ: $config["upload_path"] = "./uploads/import/"; goto lC5LP; XQnuA: if (!($sheetData[$i][0] != null)) { goto qJS0R; } goto C2Xru; spqXF: qJS0R: goto wDTpm; oMXVV: bwFrp: goto WGB_0; QP_iy: $i++; goto q0SUd; mMBcS: SZDW3: goto nntfx; CBtlz: die; goto yq2_k; byn3Q: echo $error; goto CBtlz; N6WLy: $error = $this->upload->display_errors(); goto byn3Q; Lk5kw: $spreadsheet = $reader->load($file); goto XcBOX; wG77M: M41Ku: goto AJO5I; szoc3: $ext = $this->upload->data("file_ext"); goto z6i73; wDTpm: TtlDK: goto QP_iy; geqyx: $i = 1; goto wG77M; UPXsK: if (!$this->upload->do_upload("upload_file")) { goto u1DgP; } goto eCBTE; q0SUd: goto M41Ku; goto mMBcS; z6i73: switch ($ext) { case ".xlsx": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx(); goto Rb0vZ; case ".xls": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls(); goto Rb0vZ; case ".csv": $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv(); goto Rb0vZ; default: echo "unknown file ext"; die; } goto oMXVV; XcBOX: $sheetData = $spreadsheet->getActiveSheet()->toArray(); goto KTjZ_; WGB_0: Rb0vZ: goto Lk5kw; nntfx: unlink($file); goto Jk9YQ; C2Xru: $data[] = ["nisn" => str_replace("'", '', $sheetData[$i][1]), "nis" => str_replace("'", '', $sheetData[$i][2])]; goto spqXF; S9JKE: $this->upload->initialize($config); goto UPXsK; uoYoh: $config["encrypt_name"] = true; goto S9JKE; AJO5I: if (!($i < count($sheetData))) { goto SZDW3; } goto XQnuA; KTjZ_: $data = []; goto geqyx; q7S1t: } public function updateNisByNisn() { goto zK36I; pp6Rc: T9Spz: goto q0eyx; eU85W: foreach ($input as $val) { goto L_oAw; MuCST: NPy0a: goto nfPoA; qkxPI: $save = $this->db->update("master_siswa"); goto MuCST; L_oAw: $this->db->set("nis", trim($val->nis)); goto ltDtg; ltDtg: $this->db->where("nisn", trim($val->nisn)); goto qkxPI; nfPoA: } goto pp6Rc; q0eyx: $this->db->trans_complete(); goto pTWyy; zK36I: $input = json_decode($this->input->post("siswa", true)); goto eU85W; pTWyy: $this->output_json($save); goto Jgf9w; Jgf9w: } public function editLogin() { goto Qp1GE; xPNUo: $pass = $this->input->post("new", true); goto EO1ay; SOcVI: $deleted = true; goto lgzKA; CsEZj: $this->form_validation->set_rules("old", $this->lang->line("change_password_validation_old_password_label"), "required"); goto sC0nJ; E2TTN: $this->db->set("password", $password); goto NASvn; YpjuV: r06tt: goto PrUBm; PrUBm: $data = ["status" => false, "errors" => ["username" => "Username sudah digunakan"]]; goto Psve5; uoKLD: $msg = !$status ? "Gagal mengganti username/passsword." : "berhasil mengganti username/passsword."; goto r2qmC; qWeI8: $additional_data = ["first_name" => $first_name, "last_name" => $last_name]; goto DcYtZ; TCXkr: $this->ion_auth->register($username, $password, $email, $additional_data, $group); goto BVTso; sRN5I: $status = $this->db->update("master_siswa"); goto uoKLD; H7Ncs: kdQDR: goto dPQCd; nC581: $this->load->model("Dashboard_model", "dashboard"); goto BCsPh; MRYSg: r9BQl: goto C7nGf; C7nGf: if ($deleted) { goto iVhWn; } goto dTnmU; XqpHi: $this->output_json($data); goto xcHLG; G6oNz: if ($this->form_validation->run() === FALSE) { goto kdQDR; } goto OZAuL; NASvn: $this->db->where("id_siswa", $id_siswa); goto sRN5I; TML1C: $this->form_validation->set_rules("new_confirm", $this->lang->line("change_password_validation_new_password_confirm_label"), "required"); goto yRYeW; Azzj5: $username = $this->input->post("username", true); goto xPNUo; S8PJz: goto Gn6Ts; goto YpjuV; yRYeW: if ($siswa_lain && $siswa_lain->id_siswa != $id_siswa) { goto r06tt; } goto G6oNz; dPQCd: $data = ["status" => false, "errors" => ["old" => form_error("old"), "new" => form_error("new"), "new_confirm" => form_error("new_confirm")]]; goto pzkoN; FA4Hb: $siswa_lain = $this->dashboard->getDataSiswa($username, $tp->id_tp, $smt->id_smt); goto CsEZj; lIb4Z: $password = trim($pass); goto jh6or; fl4Fk: $smt = $this->master->getSemesterActive(); goto FA4Hb; DcYtZ: $group = array("3"); goto pfPV9; pzkoN: Gn6Ts: goto XqpHi; AXp_5: $nama = explode(" ", $siswa->nama); goto UZL9M; Qp1GE: $this->load->model("Master_model", "master"); goto nC581; bte6g: $data["text"] = $msg; goto S8PJz; Psve5: goto Gn6Ts; goto H7Ncs; pfPV9: $user_siswa = $this->db->get_where("users", "email="" . $email . """)->row(); goto SOcVI; UZL9M: $first_name = $nama[0]; goto MicoT; aQvp0: $data["status"] = $status; goto bte6g; sC0nJ: $this->form_validation->set_rules("new", $this->lang->line("change_password_validation_new_password_label"), "required|min_length[" . $this->config->item("min_password_length", "ion_auth") . "]|matches[new_confirm]"); goto TML1C; EnK9n: $msg = "Gagal mengganti username/passsword."; goto S7vRY; BVTso: $this->db->set("username", $username); goto E2TTN; MicoT: $last_name = end($nama); goto i_8Rg; Gg24s: $deleted = $this->ion_auth->delete_user($user_siswa->id); goto MRYSg; jh6or: $email = $siswa->nis . "@siswa.com"; goto qWeI8; BCsPh: $id_siswa = $this->input->post("id_siswa", true); goto Azzj5; GGEq9: iVhWn: goto TCXkr; dTnmU: $status = false; goto EnK9n; S7vRY: goto NUfjh; goto GGEq9; i_8Rg: $username = trim($username); goto lIb4Z; EO1ay: $tp = $this->master->getTahunActive(); goto fl4Fk; OZAuL: $siswa = $this->db->get_where("master_siswa", "id_siswa="" . $id_siswa . """)->row(); goto AXp_5; r2qmC: NUfjh: goto aQvp0; lgzKA: if (!($user_siswa != null)) { goto r9BQl; } goto Gg24s; xcHLG: } private function registerSiswa($username, $password, $email, $additional_data, $group) { goto YR1jc; hEyNy: $data["status"] = false; goto fylOA; vFfDg: if (!($reg == false)) { goto Abvsn; } goto hEyNy; YR1jc: $reg = $this->ion_auth->register($username, $password, $email, $additional_data, $group); goto o3UMG; veQYF: return $data; goto wuOO0; o3UMG: $data["status"] = true; goto m7RU6; fylOA: Abvsn: goto veQYF; m7RU6: $data["id"] = $reg; goto vFfDg; wuOO0: } } ?>