<div class='row'> <form class='form-horizontal' role='form' method='post' action='classes/crud_kalenderakademik.php?p=edit'> <div class='col-md-12'> <div class='well well-sm'><strong><span class='glyphicon glyphicon-asterisk'></span>Required Field</strong></div> <input type='text' id='kode' name='kode' value='<?php echo $pk; ?> ' > <div class='row'> <div class='col-xs-12 col-sm-3 col-md-3'> <label>Tahun Akademik</label> <div class='input-group'> <select class='form-control col-md-3' name='tahun_angkatan' id='tahun_angkatan'> <option value='0'> Pilih Tahun Akademik </option> <?php $tahun_angkatan = new TahunAngkatan(); $data_tahun = $tahun_angkatan->GetTahunActived(); while ($n_thn = $data_tahun->fetch(PDO::FETCH_ASSOC)) { //# code... if ($n_thn[id] == $schoolyear_id) { echo "<option value={$n_thn['id']} selected> {$n_thn['thn_angkatan']}</option> "; } else { echo "<option value={$n_thn['id']}> {$n_thn['thn_angkatan']}</option> "; } } ?> </select> </div> </div> </div> <div class='row'>
<?php /** * Created by PhpStorm. * User: ekobudisusilo * Date: 22 /07 /15 * Time: 22.52 */ ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(-1); include_once '/Applications/MAMP/htdocs/isias/classes/class.TahunAngkatan.php'; include_once '/Applications/MAMP/htdocs/isias/classes/paginator.class.php'; $tahun = new TahunAngkatan(); $stmt = $tahun->countAll(); $num_rows = $stmt->rowCount(); if ($num_rows > 0) { $pages = new Paginator($num_rows, 19); if (isset($_POST['cari'])) { $cari = $_POST['cari']; $stmt = $tahun->GetListTahun($pages->limit_start, $pages->limit_end); } else { $stmt = $tahun->GetListTahun($pages->limit_start, $pages->limit_end); } } $page = isset($_GET['p']) ? $_GET['p'] : null; switch ($page) { default: echo "\n <div class='container'>\n <div class='row'>\n <input class='btn btn-info' onclick=\"window.location.href='?m=144&p=new';\" value='Tahun Ajaran Baru'></input>\n <div class='input-prepend pull-right'>\n <span class='add-on'><i class='icon-search'></i></span>\n <input class='span2' id='prependedInput' type='text' name='cari' placeholder='Pencarian..'>\n\n </div>\n </div>\n </div>\n </br>\n <div class='box box-info'>\n <div class='box-body'>\n <div class='table-responsive'>\n <table class='table no-margin'>\n <thead>\n <tr>\n <th style='width:220px'>Tahun Angkatan</th>\n <th style='width:80px'>Status</th>\n <th style='width:40px'></th>\n </tr>\n </thead>\n <tbody id='pageData'>"; while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { extract($row);
<?php /** * Created by PhpStorm. * User: ekobudisusilo * Date: 05 /07 /15 * Time: 21.32 */ ob_start(); include 'class.TahunAngkatan.php'; $thnakademik = htmlspecialchars($_POST['tahunangkatan']); $isi = new TahunAngkatan(); switch ($_GET['p']) { case "add": $isi->AddTahun($thnakademik); header('location: ../main.php?m=011'); break; case "edit": $id = $_REQUEST['id']; $status = htmlspecialchars($_POST['status']); $isi->EditTahun($thnakademik, $status, $id); header('location: ../main.php?m=011'); break; case "del": $id = $_REQUEST['id']; $isi->DelTahun($id); header('location: ../main.php?m=011'); break; } ob_end_flush();
<?php /** * Created by PhpStorm. * User: ekobudisusilo * Date: 03 /07 /15 * Time: 18.43 */ ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(-1); include_once '/Applications/MAMP/htdocs/isias/classes/class.TahunAngkatan.php'; include_once '/Applications/MAMP/htdocs/isias/classes/class.Jurusans.php'; include_once '/Applications/MAMP/htdocs/isias/classes/class.PMB.php'; include_once '/Applications/MAMP/htdocs/isias/classes/paginator.class.php'; $tahun = new TahunAngkatan(); $n = $tahun->countAll(); $jrs = new Jurusans(); $j = $jrs->countAll(); $pmb = new PMBS(); //$stmt = $pmb $num_rows = $stmt->rowCount(); if ($num_rows > 0) { $pages = new Paginator($num_rows, 19); if (isset($_POST['cari'])) { //$cari = $_POST['cari']; //$stmt = $pejabat->GetListPejabat($pages->limit_start, $pages->limit_end); } else { //$stmt = $pejabat->GetListPejabat($pages->limit_start, $pages->limit_end); } }
<?php //include config session_start(); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(-1); require_once 'classes/class.Users.php'; require_once 'classes/class.TahunAngkatan.php'; $usr = new Users(); $thn_aktif = new TahunAngkatan(); //check if already logged in move to home page if ($usr->is_logged_in()) { header('Location: index.php'); } //process login form if submitted if (isset($_POST['submit'])) { $user_name = $_POST['userid']; $password = $_POST['password']; if ($usr->login($user_name, $password)) { $stmt = $usr->GetUser($user_name); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { extract($row); $_SESSION['username'] = $user_name; $_SESSION['user_pk'] = $usr_pk; $_SESSION['pk_pegawai'] = $emp_pk; $_SESSION['nama_pegawai'] = $emp_name; $tahun = $thn_aktif->GetTahunActived(); while ($aktif_data = $tahun->fetch(PDO::FETCH_ASSOC)) { $_SESSION['tahun_pk'] = $aktif_data['id']; //echo $_SESSION['tahun_pk'];