load->model('m_website_unlaacid'); $this->load->model(array('Mediatutorialcaptcha')); $this->load->helpers(array('form_helper','url_helper')); //$this->load->libraries(array('form_validation')); $this->load->database(); } function Content() { parent::Controller(); } function index($id=NULL) { $jml = $this->db->get('v_beritanpengumuman'); //pengaturan pagination $config['base_url'] = base_url().'index.php/web/content/index'; $config['total_rows'] = $jml->num_rows(); $config['per_page'] = '5'; $config['num_links'] = '5'; $config['uri_segment'] = 4; /* $config['first_page'] = 'Awal'; $config['last_page'] = 'Akhir'; $config['next_page'] = '«'; $config['prev_page'] = '»'; */ //inisialisasi config $this->pagination->initialize($config); //buat pagination $data['halaman'] = $this->pagination->create_links(); //slider $data['slider']=$this->m_website_unlaacid->getSelectByid('*','slideratas',1,'galeri'); //tamplikan data $data['query'] = $this->m_website_unlaacid->getfPage('v_beritanpengumuman',$config['per_page'], $id); //$data['bnp']= $this->m_website_unlaacid->getAll('v_beritanpengumuman','tglpublish','DESC'); $data['agenda'] =$this->m_website_unlaacid->getAll('v_agenda','',''); $data['tautan']=$this->m_website_unlaacid->getByid('idstpublish','1','tautan'); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $data['menukanan']=$this->m_website_unlaacid->getByid('menukanan','1','menuweb'); $data['kerjasama']=$this->m_website_unlaacid->getByid('idmenuweb','33','menuweb'); $temp = base_url(); $slash=''; for ($i=0; $i < strlen($temp); $i++) { if ($temp[$i]=='/') { $slash .= $temp[$i]; // fungsi menghilangkan url website ini dengan menambahkan karakter slash } } $data['addslash'] = $slash; $data['title'] = "UNLA - Universitas Langlangbuana"; //$this->load->view('web/new/v_index',$data); //$this->load->view('web/index-web',$data); $this->load->view('web/new/v_index',$data); } /* function pendaftaran() { $cek=$this->uri->segment(4); if($cek == ""){ $data['title']="Prosedur Pendaftaran"; $data['pesan']=""; $data['datax']= $this->m_website_unlaacid->getAll('soppmb','',''); } elseif($cek == "loginpmb"){ $data['title']="Login PMB"; $data['datax']= $this->m_website_unlaacid->login_pmb($_POST['nopmb'],$_POST['password']); $jadwalx = $this->m_website_unlaacid->getjadwalpmb($_POST['nopmb']); foreach ($jadwalx as $isij) { $alertjadwal = $isij->jdwl; } if (!$data['datax']) { //jika tidak ada data $data['title']="Prosedur Pendaftaran"; $data['pesan']="DATA TIDAK DITEMUKAN"; $data['datax']= $this->m_website_unlaacid->getAll('soppmb','',''); } else if($alertjadwal) { //jika ada peringatan jadwal $data['title']="Prosedur Pendaftaran"; $data['pesan']=$alertjadwal; $data['datax']= $this->m_website_unlaacid->getAll('soppmb','',''); } } elseif($cek == "periksausm"){ $data['title']="Hasil USM"; $data['datax']= $this->m_website_unlaacid->periksausm(); } elseif($cek == "pendaftar"){ $data['title']="Data Pendaftar"; } $data['pengumumanPmb']= $this->m_website_unlaacid->getByid('idktghalaman','4','halaman'); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/pendaftaran',$data); } */ function prosedurpmb($pesan=null) { $data['title']="Prosedur Pendaftaran"; $data['pesan']=$pesan; $this->m_website_unlaacid->counter_pmb(); $data['datax']= $this->m_website_unlaacid->getAll('soppmb','',''); $data['pengumumanPmb']= $this->m_website_unlaacid->getByid('idktghalaman','4','halaman'); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/pendaftaran',$data); } function _last_login($nopmb) { $datestring = "%Y-%m-%d %h:%i:%s"; $now = time(); $logindata = array("lastlogin" => mdate($datestring, $now)); $this->m_website_unlaacid->last_login($nopmb, $logindata); } function pendaftaran() { $datax = $this->m_website_unlaacid->login_pmb($this->input->post('nopmb',TRUE),$this->input->post('password',TRUE)); $jadwalx = $this->m_website_unlaacid->getjadwalpmb($this->input->post('nopmb')); if (!$datax) { //jika tidak ada data $pesan="DATA TIDAK DITEMUKAN"; $this->prosedurpmb($pesan); } elseif ($datax) { //jika ada data foreach ($jadwalx as $isij) { $alertjadwal = $isij->jdwl; } if($alertjadwal) { //jika ada peringatan jadwal $pesan=$alertjadwal; $this->prosedurpmb($pesan); } else { $pesan=""; foreach ($datax as $isi) { $this->my_usessionpmb->set_userdata('nopmbunla', $isi->nopmb); $this->my_usessionpmb->set_userdata('passwordunla', $isi->password); $this->_last_login($isi->nopmb); } //$this->_last_login($this->input->post('nopmb'); redirect("index.php/web/content/prosedurpmb"); } } } function pendaftar() { if ($this->my_usessionpmb->logged_in) { $data['title']="Biodata Pendaftaran"; $data['datax']= $this->my_usessionpmb->userdata('nopmbunla'); $data['pengumumanPmb']= $this->m_website_unlaacid->getByid('idktghalaman','4','halaman'); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/pendaftaran',$data); } else { $this->prosedurpmb("Silahkan Login Terlebih Dahulu"); } } function periksausm() { if ($this->my_usessionpmb->logged_in) { $data['title']="Hasil USM"; $data['datax']= $this->m_website_unlaacid->periksausm(); $data['pengumumanPmb']= $this->m_website_unlaacid->getByid('idktghalaman','4','halaman'); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/pendaftaran',$data); } else { $this->prosedurpmb("Silahkan Login Terlebih Dahulu"); } } function detail(){ $id=$this->uri->segment(4); $data['data']=$this->m_website_unlaacid->getByid('idhalaman',$id,'v_halaman'); $look=0; if($data['data']!=''){ $look = $this->jumlah($id,'dilihat', 'halaman'); if($look == null){ $look = 1; }else{ $look = $look +1; } $q = "update halaman set dilihat=".$look." where idhalaman = ".$id; $this->db->query($q); } $data['beritalainnya']= $this->m_website_unlaacid->getWithoutid('idhalaman',$id,'v_beritanpengumuman'); $data['agendalainnya']= $this->m_website_unlaacid->getWithoutid('idhalaman',$id,'v_agenda'); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/detail-halaman',$data); } //PROFIL function profil($id=NULL) { $id=$this->uri->segment(4); $data['data']=$this->m_website_unlaacid->getByid('idhalaman',$id,'v_halaman'); $look=0; if($data['data']!=''){ $look = $this->jumlah($id,'dilihat', 'halaman'); if($look == null){ $look = 1; }else{ $look = $look +1; } $q = "update halaman set dilihat=".$look." where idhalaman = ".$id; $this->db->query($q); } $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/profil',$data); } function sejarah(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/profil/detail-halaman-sejarah',$data); } function logobendera(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/profil/detail-halaman-logobendera',$data); } function visimisi(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/profil/detail-halaman-visimisi',$data); } function pimpinan(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/profil/detail-halaman-pimpinan',$data); } //FAKULTAS HUKUM function ilmu_hukum(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fak_hukum/detail-halaman-ilmu-hukum',$data); } //FISIP function ilmu_pemerintahan(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fisip/detail-halaman-ilmu-pemerintahan',$data); } function ilmu_kesejahteraan(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fisip/detail-halaman-ilmu-kesejahteraan',$data); } function ilmu_komunikasi(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fisip/detail-halaman-ilmu-komunikasi',$data); } function kepolisian(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fisip/detail-halaman-kepolisian',$data); } //FAKULTAS EKONOMI function manajemen(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fak_ekonomi/detail-halaman-manajemen',$data); } function akuntansi(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fak_ekonomi/detail-halaman-akuntansi',$data); } //FKIP function ekonomi(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fkip/detail-halaman-pend-ekonomi',$data); } function matematika(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fkip/detail-halaman-pend-matematika',$data); } function sekolah_dasar(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fkip/detail-halaman-pend-sd',$data); } //FAKULTAS TEKNIK function tek_industri(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fak_teknik/detail-halaman-teknik-industri',$data); } function tek_sipil(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fak_teknik/detail-halaman-teknik-sipil',$data); } function arsitektur(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fak_teknik/detail-halaman-arsitektur',$data); } function tek_elektro(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fak_teknik/detail-halaman-teknik-elektro',$data); } function tek_informatika(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/fak_teknik/detail-halaman-teknik-informatika',$data); } //PASCASARJANA function mag_pemerintahan(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/pascasarjana/detail-halaman-mag-pemerintahan',$data); } function mag_hukum(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/pascasarjana/detail-halaman-mag-hukum',$data); } function mag_manajemen(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/pascasarjana/detail-halaman-mag-manajemen',$data); } function mag_tek_informatika(){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/fakultas/pascasarjana/detail-halaman-mag-tek-informatika',$data); } function kerjasama_australia(){ //tamplikan data $data['data']=$this->m_website_unlaacid->kerjasama(); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/kerjasama-australia/detail-halaman-kerjasama-australia',$data); } function galeri($id=NULL){ $jml = $this->db->get('v_galeri'); //pengaturan pagination $config['base_url'] = base_url().'index.php/web/content/galeri'; $config['total_rows'] = $jml->num_rows(); $config['per_page'] = '9'; $config['num_links'] = '5'; $config['uri_segment'] = 4; //inisialisasi config $this->pagination->initialize($config); //buat pagination $data['halaman'] = $this->pagination->create_links(); $data['datax']= $this->m_website_unlaacid->getfPage('v_galeri',$config['per_page'], $id); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/galeri/halaman-galeri', $data); } function detail_galeri(){ $id=$this->uri->segment(4); $data['gbr']= $this->m_website_unlaacid->getByid('idklpgaleri', $id,'v_galeri_list'); $data['nmgaleri']= $this->m_website_unlaacid->getByid('idklpgaleri',$id,'klpgaleri'); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/galeri/detail-halaman-galeri', $data); } function hubungi_kami($cekcap=NULL){ $data['datax']=$this->m_website_unlaacid->getAll('hubkamiinfo','',''); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $data['cap_img']=$this->Mediatutorialcaptcha->make_captcha(); $data['cekcaptcha']=$cekcap; $this->load->view('web/hubungi-kami/detail-halaman-hubungi-kami',$data); } //====================================================================== function jumlah($id,$column,$tbl){ $q = "SELECT max(".$column.") as max FROM ".$tbl." where idhalaman=".$id ; $query = $this->db->query($q); $max = ''; if ($query->num_rows() != 0) { $row = $query->row(); $max=$row->max; } if ($max == null){ $max=0; } return $max; } function jumlahjurnal($id,$column,$tbl){ $q = "SELECT max(".$column.") as max FROM ".$tbl." where kdjurnal=".$id ; $query = $this->db->query($q); $max = ''; if ($query->num_rows() != 0) { $row = $query->row(); $max=$row->max; } if ($max == null){ $max=0; } return $max; } public function logoutpmb() { $this->my_usessionpmb->unset_userdata("nopmbunla"); $this->my_usessionpmb->unset_userdata('passwordunla'); session_destroy(); redirect("index.php/web/content/prosedurpmb/"); } function lowongan($id=NULL) { $data['title']="Lowongan Pekerjaan"; $jml = $this->db->get('v_lowongankerja'); //pengaturan pagination $config['base_url'] = base_url().'index.php/web/content/lowongan'; $config['total_rows'] = $jml->num_rows(); $config['per_page'] = '9'; $config['num_links'] = '5'; $config['uri_segment'] = 4; //inisialisasi config $this->pagination->initialize($config); //buat pagination $data['halaman'] = $this->pagination->create_links(); $data['datax']= $this->m_website_unlaacid->getfPage('v_lowongankerja',$config['per_page'], $id); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/lowongan',$data); } function ejurnal($id=NULL){ $jml = $this->db->get('v_jurnalpublish'); //pengaturan pagination $config['base_url'] = base_url().'index.php/web/content/ejurnal'; $config['total_rows'] = $jml->num_rows(); $config['per_page'] = '5'; $config['num_links'] = '5'; $config['uri_segment'] = 4; //inisialisasi config $this->pagination->initialize($config); //buat pagination $data['halaman'] = $this->pagination->create_links(); //tamplikan data $data['query']= $this->m_website_unlaacid->getfPage('v_jurnalpublish',$config['per_page'], $id); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/e-jurnal/halaman-ejurnal', $data); } function ejurnalcari($id=NULL){ $jml = $this->db->get('v_jurnalpublish'); //pengaturan pagination $config['base_url'] = base_url().'index.php/web/content/ejurnal'; $config['total_rows'] = $jml->num_rows(); $config['per_page'] = '5'; $config['num_links'] = '5'; $config['uri_segment'] = 4; //inisialisasi config $this->pagination->initialize($config); //buat pagination $data['halaman'] = $this->pagination->create_links(); //tamplikan data $data['query']=$this->m_website_unlaacid->caridata(); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); if($data['query']==null) { $this->load->view('web/e-jurnal/hasil-cari-jurnal', $data); }else { $this->load->view('web/e-jurnal/halaman-ejurnal', $data); } } function detail_ejurnal(){ $id=$this->uri->segment(4); $data['data']=$this->m_website_unlaacid->getByid('kdjurnal',$id,'v_jurnalpublish'); $look=0; if($data['data']!=''){ $look = $this->jumlahjurnal($id,'dilihat', 'jurnal'); if($look == null){ $look = 1; }else{ $look = $look +1; } $q = "update jurnal set dilihat=".$look." where kdjurnal = ".$id; $this->db->query($q); } $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/e-jurnal/detail-halaman-ejurnal',$data); } function download_jurnal(){ $kdjurnal=$this->uri->segment(4); $userid=$this->uri->segment(5); $file=$this->uri->segment(6); $this->load->helpers('download_helper'); //jika sudah diaktifkan di autoload, maka tidak perlu di tulis kembali $name = $file; $data = file_get_contents("resources/jurnal/".$file); // letak file pada aplikasi kita force_download($name,$data); $data['data']=$this->m_website_unlaacid->update_download($kdjurnal,$userid); } function kontakhubkami(){ if(($this->input->post('captcha') <> "") AND ($this->Mediatutorialcaptcha->check_captcha()==TRUE)) { $nama = $this->input->post("nama"); $from = $this->input->post("email"); $message = $this->input->post("pesan"); $email; $pass; $query = $this->db->query('SELECT emailadmin,passadmin FROM hubkamiinfo'); foreach ($query->result() as $row){ $email = $row->emailadmin; $pass = base64_decode($row->passadmin); } $this->load->library('email'); $config['protocol'] = 'smtp'; $config['smtp_host'] = 'ssl://smtp.gmail.com'; $config['smtp_port'] = '465'; $config['smtp_timeout'] = '7'; $config['smtp_user'] = $email; $config['smtp_pass'] = $pass; $config['charset'] = 'utf-8'; $config['newline'] = "\r\n"; $config['mailtype'] = 'text'; // or html $config['validation'] = TRUE; // bool whether to validate email or not $this->email->initialize($config); $this->email->from($from, $nama); $this->email->to($email); //$this->email->cc($cc); $this->email->subject($nama); $this->email->message($message); $this->email->send(); $data['query']=$this->m_website_unlaacid->simpanpesan(); //$data['datax']= $this->m_website_unlaacid->getAll('hubkamiinfo','',''); //$data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); //$this->load->view('web/hubungi-kami/detail-halaman-hubungi-kami',$data); $cekcap=''; $this->hubungi_kami($cekcap); redirect('index.php/web/content/hubungi_kami'); }else{ $cekcap=' Captcha salah, coba lagi'; $this->hubungi_kami($cekcap); } } //STAFF AKADEMIK //fakultas function staff_fakultas($id){ //tamplikan data $data['query']= $this->m_website_unlaacid->get_staffFak_byId($id); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/staff-akademik/staff_fakultas', $data); } //prodi function staff_prodi($id){ //tamplikan data $data['query']= $this->m_website_unlaacid->get_staffProd_byId($id); $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/staff-akademik/staff_prodi', $data); } //tracer study function tracerstudy($idmhs,$nim){ $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $data['idmhs']=$idmhs; $data['nim']=$nim; /* if ($isempty) { redirect('web/content'); } if($this->my_usessionpublic->userdata('idqurban')){ $data['page']="success"; } else { $data['page']="daftar"; } */ $this->load->view('web/tracerstudy/vtracerstudy',$data); } //=========================== function downloadfile($id=NULL){ $jml = $this->db->get("v_uploadfile"); //pengaturan pagination $config['base_url'] = base_url().'index.php/web/content/downloadfile'; $config['total_rows'] = $jml->num_rows(); $config['per_page'] = '5'; $config['num_links'] = '5'; $config['uri_segment'] = 4; //inisialisasi config $this->pagination->initialize($config); //buat pagination $data['halaman'] = $this->pagination->create_links(); //tamplikan data $data['key']=$this->input->POST('nama'); if ($data['key']) { $data['query']=$this->m_website_unlaacid->getdatafile(); } else { $data['query']= $this->m_website_unlaacid->getfPage('v_uploadfile',$config['per_page'], $id); } $data['menuatas']=$this->m_website_unlaacid->getByid('menuatas','1','menuweb'); $this->load->view('web/downloadfile', $data); } } /* End of file welcome.php */ /* Location: ./system/application/controllers/welcome.php */