<?php
try{
$queryamil = $conn->prepare("SELECT * FROM amil");
$queryamil->execute();
$rsamil=$queryamil->fetch(PDO::FETCH_ASSOC);
}
catch (PDOException $e) {
echo $e->getMessage();
}
?>
<style type="text/css">
body,td,th {
color: #000;
}
</style>
<h3>Data amil</h3>
<a href="?mod=mod-amil/simpanamil">+Tambah Data</a>
<table width="100%" border="1" cellpadding="5" cellspacing="0">
<tr>
<th>No</th>
<th>Id Amil</th>
<th>Nama Amil</th>
<th>Alamat Amil</th>
<th>Aksi</th>
</tr>
<?php $no=1; do{ ?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $rsamil['id_amil']; ?></td>
<td><?php echo $rsamil['nama_amil']; ?></td>
<td><?php echo $rsamil['alamat_amil']; ?></td>
<td><a href="?mod=mod-amil/detilamil&id_amil=<?php echo $rsamil['id_amil']; ?>">Detil |</a>
<a href="?mod=mod-amil/editamil&id_amil=<?php echo $rsamil['id_amil']; ?>">Edit|</a>
<a href="?mod=mod-amil/aksiamil&id_amil=<?php echo $rsamil['id_amil']; ?>&del=y" onClick="return confirm('Apakah anda mau menghapus data <?php echo addslashes ($rsamil['nama_amil']);?>?')" >Hapus|</a></td>
</tr>
<?php }while($rsamil=$queryamil->fetch(PDO::FETCH_ASSOC)); ?>
</table>
<?php
session_start();
include('header.php');
$iibf_id = $_POST['iibf_id'];
//query untuk mendaptkan record dari id
$cekuser = mysql_query("SELECT * FROM id WHERE iibf_id = '$iibf_id'");
$cekid = mysql_query("SELECT * FROM reg_member WHERE iibf_id = '$iibf_id'");
//$cekuser = mysql_query("SELECT * from id inner join reg_member on reg_member.iibf_id=id.iibf_id");
//cek kesesuaian id
if(mysql_num_rows ($cekuser) > 0 and ($cekid) != 0 ){
session_start();
$_SESSION['id']=$_POST['iibf_id'];
?>
<script language="JavaScript">
alert('silakan aktivasi !');
document.location='form.php';
</script>
<?php
}
elseif(mysql_num_rows ($cekuser) > 0 and ($cekid) < 0 ) {
?>
<script language="JavaScript">
alert('sudah aktivasi !');
document.location='index.php';
</script>
<?php
}
else {
echo "<div align='center'>ID Anda Tidak Terdaftar!</div>";
}
?>
<script type="text/javascript">
String.prototype.trim = function() {a = this.replace(/^\s+/,'');return a.replace(/\s+$/, '');};
var emailvalreg_member = /^.+\@(\[?)[a-zA-Z0-9\-\_\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
function cekAngka(obj){
var x = obj.value;
var list = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
var status = true;
for (i=0; i<=x.length-1; i++){
// jika karakter ke-i termasuk dalam array, maka nilainya TRUE jika treg_memberak, nilai FALSE
if (x[i] in list) cek = true; else cek = false;
status = status && cek;
}
return !status;
}
function cekJumlah(obj){
var x = obj.value;
var list = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
var status = true;
for (i=0; i<=x.length-1; i++){
// jika karakter ke-i termasuk dalam array, maka nilainya TRUE jika treg_memberak, nilai FALSE
if (x > 0) cek = true; else cek = false;
status = status && cek;
}
return !status;
}
function cekJumlah2(obj){
var x = obj.value;
var list = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
var status = true;
for (i=0; i<=x.length-1; i++){
// jika karakter ke-i termasuk dalam array, maka nilainya TRUE jika treg_memberak, nilai FALSE
if (x[i] in list) cek = true; else cek = false;
status = status && cek;
}
return !status;
}
function valreg_memberasi (){
var vfn = document.frm_reg.fn;
var viibf_reg_member = document.frm_reg.iibf_reg_member;
var fnama = document.frm_reg.nama;
// var viibf_reg_member = document.frm_reg.iibf_reg_member;
// var vno_reg_memberentitas = document.frm_reg.no_reg_memberentitas;
//pengecekan
if(vfn.value.trim().length == 0){
alert("Nama harus diisi ");
vfn.focus();
return false;
}
else if(viibf_reg_member.value.trim().length == 0){
alert("iibf_reg_member harus diisi ");
viibfreg_member.focus();
return false;
}
// else if(viibfreg_member.value.trim().length == 0){
// alert("IIBF reg_member harus diisi ");
// viibfreg_member.focus();
// return false;
// }
// else if(cekAngka(viibf_reg_member)){
// alert("IIBF reg_member harus diisi dengan Angka");
// viibf_id.focus();
// return false;
// }
// else if(vno_identitas.value.trim().length == 0){
// alert("No. Identitas harus diisi ");
// vno_identitas.focus();
// return false;
// }
// else if(cekAngka(vno_identitas)){
// alert("No. Identitas harus diisi dengan Angka");
// vno_identitas.focus();
// return false;
// }
// else if(vjumlah.value.trim().length == 0){
// alert("Jumlah orang harus diisi ");
// vfn.focus();
// return false;
// }
// else if(cekJumlah2(vjumlah)){
// alert("Jumlah orang harus diisi dengan Angka");
// vjumlah.focus();
// return false;
// }
// else if(cekJumlah(vjumlah)){
// alert("Jumlah orang tidak boleh 0");
// vjumlah.focus();
// return false;
// }
else{
return true;
}
}
</script>
<body>
<div class="navbar navbar-fixed-top navbar-inverse">
</div>
</div>
<br/>
<div class="container" style="margin-top: 5px;">
<div class="navbar">
<div class="navbar-inner">
<span class="brand"><strong><i class="icon-group icon-large"></i> FORM PENGECEKAN ID IIBF</strong></span>
</div>
</div>
<div class="thumbnail">
<div class="row">
<div class="span8">
<br/>
<div class="alert alert-info"><strong><i class="icon-file"></i> Silahkan Input ID IIBF Anda</strong></div>
<br/>
<form class="form-vertical" name="frm_reg" method="POST" onSubmit="return validasi() ;" enctype="multipart/form-data">
<div class="control-group">
<div style="margin-bottom:12px;"></div>
</div>
<form action="login.php" method="post">
<div class="control-group">
<label class="control-label" for="inputEmail">ID IIBF</label>
<div class="controls">
<input type="text" class="span9" name="iibf_id" id="inputEmail" placeholder="iibf_id" >
</div>
</div>
<button type="submit" name="submit" class="btn btn-success" style="margin-center:40px;"><i class="icon-save icon-large"></i> Submit</button>
</form>
[code=php]
<fieldset>
<form name="form2" method="post" action="">
<tr>
<td>id</td>
<td><input type="text" name="id_hasil_kuisioner" required /></td>
</tr>
<tr>
<td>Nama Dosen/Instruktur</td>
<td><input type="text" name="nama_pendidik" required /></td>
</tr>
<tr>
<td>Nama Matkul</td>
<td><input type="text" name="nama_matkul" required /></td>
</tr>
<table width="746" border="1" cellspacing="2" cellpadding="1" style="font-family:Georgia, 'Times New Roman', Times, serif;">
<tr>
<th width="40" scope="col">No</th>
<th width="734" scope="col">Aspek yang Dinilai </th>
<th width="150" scope="col" colspan="5">Skala Penilaian</th>
</tr>
<tr style="height:70;">
<th scope="row">1</th>
<td align="justify">Dosen/Instruktur menyampaikan Silabus dan Kontrak Perkuliahan kepada mahasiswa pada awal perkuliahan</td>
<td width="30"><p align="center">
<label>
1 <br>
<input type="radio" name="nil_5" value="5" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
2 <br>
<input type="radio" name="nil_5" value="4" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
3<br>
<input type="radio" name="nil_5" value="3" onClick="isi_bil1(this)">
</label>
</p></td>
<td width="30"><p align="center">
<label>
4<br>
<input type="radio" name="nil_5" value="2" onClick="isi_bil1(this)">
</label>
</p></td>
<td width="30"><p align="center">
<label>
5<br>
<input type="radio" name="nil_5" value="1" onClick="isi_bil1(this)">
</label>
</p></td>
</tr>
<tr style="height:70;">
<th scope="row">2</th>
<td align="justify">Materi kuliah yang disampaikan Dosen/Instruktur sesuai dengan Silabus </td>
<td width="30"><p align="center">
<label>
1 <br>
<input type="radio" name="nil_4" value="5" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
2 <br>
<input type="radio" name="nil_4" value="4" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
3 <br>
<input type="radio" name="nil_4" value="3" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
4 <br>
<input type="radio" name="nil_4" value="2" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
5 <br>
<input type="radio" name="nil_4" value="1" onClick="isi_bil1(this)" >
</label>
</p></td>
</tr>
<tr style="height:70;">
<th scope="row">3</th>
<td align="justify">Apabila Dosen/Instruktur melakukan perubahan jadwal perkuliahan telah disepakati dengan mahasiswa </td>
<td width="30"><p align="center">
<label>
1 <br>
<input type="radio" name="nil_3" value="5" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
2 <br>
<input type="radio" name="nil_3" value="4" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
3 <br>
<input type="radio" name="nil_3" value="3" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
4 <br>
<input type="radio" name="nil_3" value="2" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
5 <br>
<input type="radio" name="nil_3" value="1" onClick="isi_bil1(this)" >
</label>
</p></td>
</tr>
<tr style="height:70;">
<th scope="row">4</th>
<td align="justify">Dosen/Instruktur menyiapkan dan mengisi absensi perkuliahan setiap kali pertemuan </td>
<td width="30"><p align="center">
<label>
1 <br>
<input type="radio" name="nil_2" value="5" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
2 <br>
<input type="radio" name="nil_2" value="4" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
3 <br>
<input type="radio" name="nil_2" value="3" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
4 <br>
<input type="radio" name="nil_2" value="2" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
5 <br>
<input type="radio" name="nil_2" value="1" onClick="isi_bil1(this)" >
</label>
</p></td>
</tr>
<tr style="height:70;">
<th scope="row">5</th>
<td align="justify">Dosen/Instruktur menyiapkan dan mengisi absensi perkuliahan setiap kali pertemuan </td>
<td width="30"><p align="center">
<label>
1 <br>
<input type="radio" name="nil_1" value="5" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
2 <br>
<input type="radio" name="nil_1" value="4" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
3 <br>
<input type="radio" name="nil_1" value="3" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
4 <br>
<input type="radio" name="nil_1" value="2" onClick="isi_bil1(this)" >
</label>
</p></td>
<td width="30"><p align="center">
<label>
5 <br>
<input type="radio" name="nil_1" value="1" onClick="isi_bil1(this)" >
</label>
</p></td>
</tr>
</table>
<input type="submit" name="SIMPAN" value="SIMPAN" />
</form>
<p> </p>
<div class="clear"></div>
<?php
include "../INCL/koneksi.php";
$id_hasil_kuisioner=@$_POST['id_hasil_kuisioner'];
$nama_pendidik=@$_POST['nama_pendidik'];
$nama_matkul=@$_POST['nama_matkul'];
$nil_5 = @$_POST['nil_5'];
$nil_4 = @$_POST['nil_4'];
$nil_3 = @$_POST['nil_3'];
$nil_2 = @$_POST['nil_2'];
$nil_1 = @$_POST['nil_1'];
$total= $nil_5+$nil_4+$nil_3+$nil_2+$nil_1;
$SIMPAN = @$_POST['SIMPAN'];
if($SIMPAN){
mysql_query("insert into tb_hasil_kuisioner
values('$id_hasil_kuisioner','$nama_pendidik','$nama_matkul','$nil_5','$nil_4',
'$nil_3','$nil_2', '$nil_1', '$total')") or die (mysql_error());
?>
<script type="text/javascript">
alert("DATA BERHASIL DISIMPAN");
window.location.href="?page=kuisioner&action=simpan";
</script>
<?php
}
?>
</fieldset>