This page was exported from Jurusan Ilmu Komputer FMIPA [ http://ilkom.unila.ac.id ]
Export date: Sun Aug 9 0:41:16 2020 / +0000 GMT

Pendaftaran MK Pilihan Semester Genap 2017/2018


Mata Kuliah Pilihan, yaitu:

  1. Keamanan Sistem Informasi

  2. Infrastruktur TI & Arsitektur Enterprise

  3. Komputasi Paralel

  4. Riset Operasi

  5. Temu Kembali Informasi



Untuk itu kapasitas masing-masing bidang dibatasi sebanyak 40 mahasiswa. Isi form berikut untuk mendaftarkan diri anda. Mahasiswa hanya diperkenankan memilih 1 kali, Mata Kuliah yang sudah penuh tidak dapat dipilih lagi.

[insert_php]
extract($_GET);
global $wpdb;
global $table;
global $data_bidang;
$table = $wpdb->prefix . 'bidangmk';
$data_bidang = array("Keamanan Sistem Informasi", "Infrastruktur TI & Arsitektur Enterprise", "Komputasi Paralel",
"Riset Operasi","Temu Kembali Informasi");
function getRealIpAddr()
{
if (!empty($_SERVER['HTTP_CLIENT_IP']))
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}

function printData(){
global $data_bidang;
global $wpdb;
$table = $wpdb->prefix . 'bidangmk';
$query = "SELECT npm, nama, bidang from $table ORDER BY npm";
$results = $wpdb->get_results($query);
if ($results) {
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
foreach ($results as $data) {
echo "";
echo "";
echo "";
echo "";
echo "";
}
echo "
NPMNAMABIDANG
".$data->npm."".$data->nama."".$data_bidang[$data->bidang-1]."
";
}
}

date_default_timezone_set("Asia/Jakarta");
$current = strtotime(date("Y-m-d H:i:s"));
$date = strtotime("2018-02-13 17:00:00");
$datediff = $date - $current;
// die(" ini datediff ".$datediff);
if ($datediff>0){
//if (1>0){
echo "Pendaftaran dibuka pada: Selasa, 13 Februari 2018 pukul 17:00";
// echo "Pendaftaran ditutup
";


// echo "
";

// printData();
} else {
if ($submit) {
//$sesi="mkpilihan_genap2018";
$next=1;
if ($sesi=='mkpilihan2_genap2018') {
$data_sesi=$wpdb->get_row( "SELECT count(*) as jml
FROM $table
WHERE npm = $npm
AND sesi = 'mkpilihan1_genap2018'" );

if ($data_sesi->jml<1) $next=0;
// die($data_sesi->jml." next ".$next);
}
if ($next==0) {
echo "DATA GAGAL DISIMPAN. ISI PILIHAN 1 TERLEBIH DAHULU";
} else {
$data = $wpdb->get_row( "SELECT count(*) as jml
FROM $table
WHERE bidang = $bidang
AND sesi = '$sesi'" );
if ($data->jml<40) {
if ($wpdb->insert(
$table,
array(
'npm' => $npm,
'nama' => $nama,
'bidang' => $bidang,
'sesi' => $sesi,
'ip_address'=>getRealIpAddr()
)
)) {echo "DATA DISIMPAN";} else {echo "DATA GAGAL DISIMPAN. NPM ANDA HANYA BOLEH MENDAFTAR 1 KALI";}

} else {
echo "MAAF KELAS SUDAH PENUH, SILAHKAN PILIH BIDANG LAIN";
}
}
}
function listResult($s) {
global $wpdb;
global $table;
global $data_bidang;
$kuery = "SELECT bidang, COUNT( bidang ) AS jml
FROM $table
WHERE sesi ='$s'
GROUP BY bidang";
//die ("ini ".$kuery);

$results = $wpdb->get_results($kuery);
if ($results) {
foreach ($results as $loc) {
echo "
".$data_bidang[$loc->bidang-1]." : ".$loc->jml;
}
}
}
echo "
Pilihan 1";
listResult('mkpilihan1_genap2018');
echo "
Pilihan 2";
listResult('mkpilihan2_genap2018');

echo "

FORM PENDAFTARAN MK PILIHAN


";
echo "
No Pilihan:
";
echo "NPM : ";
echo "
Nama : ";
echo "
Pilih MK Pilihan: ";
echo"


";
}
[/insert_php]
Post date: 2018-02-12 19:37:31
Post date GMT: 2018-02-12 12:37:31
Post modified date: 2018-02-13 17:07:04
Post modified date GMT: 2018-02-13 10:07:04
Powered by [ Universal Post Manager ] plugin. HTML saving format developed by gVectors Team www.gVectors.com