function pp() { must_login(); if (is_pengajar()) { # panggil colorbox $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-pengajar.js'))); $data['comp_js'] = $html_js; $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css'))); $data['pengajar'] = $this->pengajar_model->retrieve(get_sess_data('user', 'id')); $data['pengajar_login'] = $this->login_model->retrieve(get_sess_data('login', 'id')); $data['status_id'] = get_sess_data('user', 'status_id'); $this->twig->display('pp-pengajar.html', $data); } if (is_siswa()) { $retrieve_siswa = $this->siswa_model->retrieve(get_sess_data('user', 'id')); $retrieve_login = $this->login_model->retrieve(get_sess_data('login', 'id')); $retrieve_all_kelas = $this->kelas_model->retrieve_all_siswa(10, 1, array('siswa_id' => $retrieve_siswa['id'])); $data['siswa'] = $retrieve_siswa; $data['siswa_login'] = $retrieve_login; $data['siswa_kelas'] = $retrieve_all_kelas; $data['status_id'] = get_sess_data('user', 'status_id'); # panggil colorbox $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-siswa.js'))); $data['comp_js'] = $html_js; $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css'))); $data['show'] = !empty($_GET['show']) ? $_GET['show'] : ''; $this->twig->display('pp-siswa.html', $data); } }
function __construct() { parent::__construct(); must_login(); # harus login sebagai admin if (!is_admin()) { redirect('welcome'); } }
function __construct() { parent::__construct(); must_login(); # cek versi $versi = get_pengaturan('versi', 'value'); if ($versi < '1.2') { $this->config_model->update('versi', 'Versi', '1.2'); } }
function __construct() { parent::__construct(); if (!$this->db->table_exists('messages')) { $this->msg_model->create_table(); } # cek versi, kalo masih 1.0 update ke 1.1 $versi = get_pengaturan('versi', 'value'); if ($versi == '1.0') { $this->config_model->update('versi', 'Versi', '1.1'); } must_login(); }
function pp() { must_login(); if (is_pengajar()) { # panggil colorbox $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-pengajar.js'))); $data['comp_js'] = $html_js; $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css'))); $data['pengajar'] = $this->pengajar_model->retrieve(get_sess_data('user', 'id')); $data['pengajar_login'] = $this->login_model->retrieve(get_sess_data('login', 'id')); $data['status_id'] = get_sess_data('user', 'status_id'); $this->twig->display('pp-pengajar.html', $data); } }
function search() { must_login(); if (empty($_GET['q'])) { redirect('welcome'); } $q = (string) $_GET['q']; $q = urldecode($q); if (is_siswa()) { $kelas_aktif = $this->siswa_kelas_aktif; } # cari siswa $retrieve_all_siswa = $this->siswa_model->retrieve_all_filter($nis = '', $nama = $q, $jenis_kelamin = array(), $tahun_masuk = '', $tempat_lahir = '', $tgl_lahir = '', $bln_lahir = '', $thn_lahir = '', $alamat = '', $agama = array(), $kelas_id = array(), $status_id = is_admin() ? array() : array(1, 2, 3), $username = '', $page_no = 1, $pagination = false); foreach ($retrieve_all_siswa as $key => &$val) { $kelas_siswa = $this->kelas_model->retrieve_siswa(null, array('siswa_id' => $val['id'], 'aktif' => 1)); # kelas aktif if (!empty($kelas_siswa) and $val['status_id'] != 3) { $kelas = $this->kelas_model->retrieve($kelas_siswa['kelas_id']); $val['kelas_aktif'] = $kelas; } $retrieve_all_siswa[$key] = $val; } # cari pengajar $retrieve_all_pengajar = $this->pengajar_model->retrieve_all_filter($nip = '', $nama = $q, $jenis_kelamin = array(), $tempat_lahir = '', $tgl_lahir = '', $bln_lahir = '', $thn_lahir = '', $alamat = '', $status_id = is_admin() ? array() : array(1, 2), $username = '', $is_admin = '', $page_no = 1, $pagination = false); # cari materi $retrieve_all_materi = $this->materi_model->retrieve_all($no_of_records = 10, $page_no = 1, $pengajar_id = array(), $siswa_id = array(), $mapel_id = array(), $judul = $q, $konten = null, $tgl_posting = null, $publish = null, $kelas_id = array(), $type = array(), $pagination = false); # cari tugas $retrieve_all_tugas = $this->tugas_model->retrieve_all($no_of_records = 10, $page_no = 1, $mapel_id = array(), $pengajar_id = is_pengajar() ? array(get_sess_data('user', 'id')) : array(), $type_id = array(), $kelas_id = is_siswa() ? array($kelas_aktif['kelas_id']) : array(), $judul = $q, $info = null, $aktif = array(), $pagination = false); # cari pesan $retrieve_all_pesan = $this->msg_model->retrieve_all(10, $page_no, get_sess_data('login', 'id'), array('content' => $q), false); foreach ($retrieve_all_pesan as $key => &$val) { $retrieve_all_pesan[$key] = $this->format_msg($val); } $results = array('siswa' => $retrieve_all_siswa, 'pengajar' => $retrieve_all_pengajar, 'materi' => $retrieve_all_materi, 'tugas' => $retrieve_all_tugas, 'pesan' => $retrieve_all_pesan); $data['results'] = $results; $data['keyword'] = $q; if (is_admin()) { # panggil colorbox $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-siswa.js'), base_url('assets/comp/colorbox/act-pengajar.js'))); $data['comp_js'] = $html_js; $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css'))); } $this->twig->display('search-results.html', $data); }
function __construct() { parent::__construct(); must_login(); }
along with Webfinance; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // // This file is part of « Webfinance » // // Copyright (c) 2004-2006 NBI SARL // Author : Nicolas Bouthors <*****@*****.**> // // You can use and redistribute this file under the term of the GNU GPL v2.0 // // $Id: clients_income.php 531 2007-06-13 12:32:31Z thierry $ #header("Content-type: text/plain"); require "../inc/main.php"; require "../inc/barGraph.php"; must_login(); if (is_numeric($_GET['width'])) { $width = $_GET['width']; } else { $width = 700; } if (is_numeric($_GET['height'])) { $height = $_GET['height']; } else { $height = 300; } if (is_numeric($_GET['nb_months'])) { $nb_months = $_GET['nb_months']; } else { $nb_months = 12; }
function index() { must_login(); $this->twig->display('welcome.html'); }
} if (is_requested('server')) { //echo 'ool'; //pre($_GET); login(); finish(); } if (is_requested('init')) { must_login(); init_search(); finish(); } //END of listeners //@__main__ //check login !! must_login(TRUE); //@Functions function is_requested($key) { // is_set replacement function.. if (!empty($_REQUEST[$key])) { return true; } // $_REQUEST[key] === 0 if (array_key_exists($key, $_REQUEST)) { return true; } return false; } function init_search() {