• Tidak ada hasil yang ditemukan

LAMPIRAN A : LISTING PROGRAM

N/A
N/A
Protected

Academic year: 2019

Membagikan "LAMPIRAN A : LISTING PROGRAM"

Copied!
29
0
0

Teks penuh

(1)

LAMPIRAN A : LISTING PROGRAM

1.listing Admin_index.php Admin

<!--

function MM_popupMsg(msg) { //v1.0 alert(msg);

}

function MM_goToURL() { //v3.0

var i, args=MM_goToURL.arguments; document.MM_returnValue = false;

for (i=0; i<(args.length-1); i+=2)

eval(args[i]+".location='"+args[i+1]+"'"); }

//-->

<!-- a:link {

text-decoration: none; }

a:visited {

text-decoration: none; }

a:hover {

text-decoration: none; }

a:active {

text-decoration: none; }

-->

<< First | <<Previous Next> | Last >>

2.listing Admin_Form.php

<h2><em>I</em>nput <em>A</em>dmin</h2>

<form action="admin/process.php" method="post"> <table width="644" border="0">

<tr>

<td width="205"><div align="left" class="style8">Nama :</div> <input type="text" name="nama" size="32" maxlength="32" ></td> </tr>

<tr>

<td><div align="left" class="style8">Password :</div>

(2)

</tr> <!-- <tr>

<td><div align="left" class="style8">Status :</div> <select name="status">

<option value="admin">Admin</option> <option value="pegawai">Pegawai</option> </select></td>

</tr>-->

<tr><td>&nbsp;</td></tr> <tr>

<td><input name="submit" type="submit" value="Submit" /></td> </tr>

<tr><td></td></tr>

<tr><td> <a

href="javascript:history.back()">&laquo;&laquo;Back </a></td></tr>

</table> </form> <br><br>

3.listing Admin_Form Edit.php <?php

include ("../library/koneksi.php"); $id=$_REQUEST['id'];

$view= mysql_query ("select * from user where id_user='$id'",$koneksi)

or die (mysql_error());

$jumlah = mysql_num_rows($view); echo "<br><br>";

if ($row=mysql_fetch_array ($view)) {

?>

<h2><em>U</em>bah <em>P</em>assword</h2>

<form action="admin/process_edit.php" method="post"> <table width="644" border="0">

<tr>

<td width="205"><div align="left" class="style8">Nama :</div> <input type="text" name="nama" size="32" maxlength="32"

value="<?php echo $row['username']; ?>" /></td> </tr>

<tr>

<td><div align="left" class="style8">Password :</div>

<input type="text" name="password" size="32" maxlength="32" /></td>

</tr>

(3)

<td><input name="id" type="hidden" value="<?php echo $id; ?>" /><input name="submit" type="submit" value="Submit" /></td> </tr>

<tr><td></td></tr>

<tr><td> <a

href="javascript:history.back()">&laquo;&laquo;Back </a></td></tr>

</table> </form> <br><br> <?php } ?>

4.listing Admin_delete.php

<?php include("../library/koneksi.php"); $id=$_REQUEST['id'];

$qry= mysql_query ("delete from user where id='$id'",$koneksi) or die (mysql_error());

if ($qry)

header ("location:../index.php?name=admin/index.php");

?>

5.listing Admin_Process.php <?php

include ("../library/koneksi.php"); $nama=$_REQUEST['nama'];

$password=$_REQUEST['password']; $status=$_REQUEST['status'];

$qry = mysql_query (" insert into

user(username,password,status,first_enter)

values ('$nama','$password','admin',sysdate())",$koneksi) or die (mysql_error());

?>

<script language="javascript"> <!--

window.location = "../index.php?name=admin/index.php";

--></script> </script>

6.listing Admin_Process_Edit.php

<?php

(4)

$password=$_REQUEST['password']; $id=$_REQUEST['id'];

if($password=="") {

?>

<script language="JavaScript">

window.location = "../index.php?name=admin/index.php"; alert('Password Tidak Diubah')

</script> <?php

}

else if ($id!="" and $password!="") {

$qry = mysql_query (" UPDATE user SET username = '$nama', password = '$password' WHERE id_user= $id",$koneksi) or die (mysql_error());

?>

<script language="javascript"> <!--

window.location = "../index.php?name=admin/index.php";

alert('Password Anda telah di ganti, terima kasih')

--></script> </script> <?php

}

else { ?>

<script language="JavaScript">

window.location = "../index.php?name=admin/form_edit&id=<?php echo $id; ?>";

alert('Tidak ada perubahan') </script>

<?php } ?>

7. Listing dosen_Index.php <style type="text/css"> <!--

a:link {

color: #000000;

(5)

a:visited {

text-decoration: none; }

a:hover {

text-decoration: none; }

a:active {

text-decoration: none; }

-->

</style> <h2>LIST DATA DOSEN</h2> <?php

include ("../library/koneksi.php");

$sql = mysql_query("SELECT * FROM dosen"); ?><script type="text/JavaScript">

<!--

function MM_popupMsg(msg) { //v1.0 alert(msg);

}

function MM_goToURL() { //v3.0

var i, args=MM_goToURL.arguments; document.MM_returnValue = false;

for (i=0; i<(args.length-1); i+=2)

eval(args[i]+".location='"+args[i+1]+"'"); }

//-->

</script> <?

//menentukan batas, cek dan posisi data $batas=5;

$halaman = $_REQUEST['halaman'];

if(empty($halaman)){ $posisi=0;

$halaman = 1; } else {

$posisi = ($halaman-1) * $batas; }

//sesuaikan perintah SQL dengan posisi dan batas

$sql= "SELECT * FROM dosen order by nip DESC LIMIT $posisi,$batas";

$result = mysql_query($sql); $test=mysql_num_rows($result); if ($test!=0)

(6)

$no=$posisi+1;

echo" <table width='400' table bordercolordark='#000000' cellpadding='1' cellspacing='1' bordercolor='#000000' border='0' style='color:#000000'>";

echo" <tr align='center'>"; echo "<th>NO</th>";

echo "<th>NIP</th>"; echo "<th>Nama</th>";

echo "<th>Action</th></tr>";

while($row=mysql_fetch_array($result)) {

//pemberian warna berbeda pada tiap baris tampilan if (($no % 2)==0)

{ $warna="#ffffff"; } else { $warna="#EAEAEA";} $id= $row['id'];

echo "<tr bgcolor=$warna align='center' ><td>"; echo $no;

echo "</td><td>"; echo $row['nip'];

echo "</td><td style='text-transform:uppercase'>"; echo $row['nama'];

echo "</td><td>";

echo "<a href='dosen/hapus.php?id=$row[nip]' onClick=\"return confirm('Apakah Anda benar-benar akan menghapus data

ini?')\"><acronym title='Hapus data'><img

src='images/cancel.png' alt='delete'></a>&nbsp;&nbsp;&nbsp;"?>

<!-- <acronym title="Lihat Data"><img src="images/info.png" alt="show"

onClick="MM_goToURL('parent','index.php?name=dosen/tampil_dose n.php&amp;id=<?php echo $row['nip']; ?>');return

document.MM_returnValue" /></acronym>&nbsp;&nbsp; --> <acronym title="Edit Data"><img src="images/info.png" alt="show" width="15" height="15"

onClick="MM_goToURL('parent','index.php?name=dosen/edit_form.p hp&amp;id=<?php echo $row['nip']; ?>&amp;nav= Data Dosen >> Edit Data Dosen');return document.MM_returnValue"

/></acronym>&nbsp;&nbsp;</div>

<style type="text/css"> <!--

a:link {

text-decoration: none; }

a:visited {

(7)

}

a:hover {

text-decoration: none; }

a:active {

text-decoration: none; }

-->

</style>

<? $no++; }

echo "</table><table width='500' align='left' id='tabel_show' cellpadding='1' cellspacing='1'><tr><td></td><td>";

$sql2 = mysql_query("select * from dosen")or die (mysql_error());

$result=mysql_num_rows($sql2); $jmlhalaman=ceil($result/$batas);

/* bangun Previous link */ if($halaman > 1){

$prev = ($halaman - 1); ?>

<a

href="index.php?name=dosen/index.php&amp;halaman=1&amp;nav= Data Dosen >> List Data Dosen"><< First </a> |

<a href="index.php?name=dosen/index.php&amp;<? echo "halaman=$prev"; ?>&amp;nav= Data Dosen >> List Data Dosen">&lt;&lt;Previous &nbsp;</a>

<? } else {

echo "<p>First| < Previous "; } //tampilkan link halaman 1,2,3...

for($i = 1; $i <= $jmlhalaman; $i++){ if($i == $jmlhalaman){

echo "$i "; }

else { ?>

<a href="index.php?name=dosen/index.php&amp;<? echo

"halaman=$i"; ?>&amp;nav= Data Dosen >> List Data Dosen"><? echo $i; ?></a>

(8)

/* bangun Next link */

if($halaman < $jmlhalaman){ $next = $halaman + 1;

?>

<a href="index.php?name=dosen/index.php&amp;<? echo "halaman=$next"; ?>&amp;nav= Data Dosen >> List Data Dosen">Next&gt; |</a>

<A href="index.php?name=dosen/index.php&amp;<? echo

"halaman=$jmlhalaman"; ?>&amp;nav= Data Dosen >> List Data Dosen">Last >></a>

<? }

echo "</td></tr></table>";

}//akhir dari kondisi bahwa data tidak kosong

else { echo "<div align='left'>TIDAK ADA DATA DALAM DATABASE </div>"; }

?> <p>

<a href="index.php?name=dosen/form.php&nav=Data Dosen >> Form Pengisian Data Dosen">Tambah Data</a>

8.listing Dosen_Edit_Form.php

<script type='text/javascript'>

var xmlhttp = createRequestObject();

function createRequestObject() { var ro;

var browser = navigator.appName;

if(browser == "Microsoft Internet Explorer"){ ro = new ActiveXObject("Microsoft.XMLHTTP"); }else{

ro = new XMLHttpRequest(); }

return ro; }

function dinamis(combobox) {

var kode = combobox.value; if (!kode) return;

xmlhttp.open('get', 'mahasiswa/edit_form.php?kode='+kode, true);

xmlhttp.onreadystatechange = function() {

if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200))

{

(9)

}

return false; }

xmlhttp.send(null); }

</script>

<?php include ("../library/koneksi.php"); $id=$_REQUEST['id'];

$view= mysql_query ("select * from dosen where nip='$id'",$koneksi)

or die (mysql_error());

$jumlah = mysql_num_rows($view);

$row=mysql_fetch_array ($view) ?>

<h2>Edit Data Dosen</h2>

<form method="get" action="dosen/edit_process.php"> <table class="form_isi" width="700" cellpadding="3" cellspacing="2" >

<tr>

<td height="28" colspan="3" valign="middle"><strong>Nama Lengkap </strong></td>

<td colspan="2" valign="middle"><input name="nama" type="text" value="<?php echo $row['nama']; ?>"/></td>

<td width="172">&nbsp;</td> </tr>

<tr>

<td height="28" colspan="3"

valign="middle"><strong>NIP</strong></td> <td colspan="2" valign="middle">

<input name="nip" type="hidden" value="<?php echo $row['nip']; ?>" /><?php echo $row['nip']; ?></td> <td width="172">&nbsp;</td>

<tr>

<td height="28" colspan="3"

valign="middle"><strong>Alamat</strong></td>

<td colspan="2" valign="middle"><textarea name="alamat"><?php echo $row['alamat']; ?></textarea></td>

<td width="172">&nbsp;</td> </tr>

<tr>

<td height="28" colspan="3"

valign="middle"><strong>Telepon</strong></td>

(10)

<td width="172">&nbsp;</td> </tr>

<tr>

<td height="47" colspan="3"

valign="middle"><strong>Email</strong></td>

<td colspan="2" valign="middle"><input name="email" type="text" value="<?php echo $row['email']; ?>"/></td> <td width="172">&nbsp;</td>

</tr>

<tr>

<td width="95"></td>

<td colspan="2">&nbsp;</td> <td>

<input name="kirim" type="submit"value="Edit" />

<input name="hapus" type="reset" align="left" value="Hapus" /></td>

<td width="120" colspan="1">&nbsp;</td>

</tr>

<tr><td height="25">&nbsp;</td> </tr>

</table> </form>

9. Listing Dosen_Edit_Process.php <?php

include ("../../library/koneksi.php"); $t= date("Y-m-d");

$nip=$_REQUEST['nip']; $nama=$_REQUEST['nama']; $alamat=$_REQUEST['alamat']; $telepon=$_REQUEST['telepon']; $email=$_REQUEST['email']; $status=$_REQUEST['status'];

$semester=$_REQUEST['semester'];

$qry = mysql_query (" update dosen set nama='$nama',

alamat='$alamat', telepon='$telepon',

(11)

if ($qry==true) {

?>

<script language="javascript"> <!--

window.location =

"../index.php?name=dosen/index.php&nav= Data Dosen >> List Data Dosen";

--></script> </script>

<?php } ?>

10.Listing Dosen_Form.php

<h2>Form Pengisian Data Dosen</h2><br />

<form method="get" action="dosen/process.php">

<table class="form_isi" width="700" cellpadding="3" cellspacing="2" >

<tr>

<td height="28" colspan="3" valign="middle"><strong>Nama Lengkap </strong></td>

<td colspan="2" valign="middle"><input name="nama" type="text" /></td>

<td width="172">&nbsp;</td> </tr>

<tr>

<td height="28" colspan="3"

valign="middle"><strong>NIP</strong></td>

<td colspan="2" valign="middle"><input name="nip" type="text" value="" /></td>

<td width="172">&nbsp;</td> </tr>

<tr>

<tr>

<td height="28" colspan="3"

valign="middle"><strong>Alamat</strong></td> <td colspan="2" valign="middle"><textarea name="alamat"></textarea></td>

(12)

<tr>

<td height="28" colspan="3"

valign="middle"><strong>Telepon</strong></td>

<td colspan="2" valign="middle"><input name="telepon" type="text" /></td>

<td width="172">&nbsp;</td> </tr>

<tr>

<td height="47" colspan="3"

valign="middle"><strong>Email</strong></td>

<td colspan="2" valign="middle"><input name="email" type="text" /></td>

<td width="172">&nbsp;</td> </tr>

<tr>

<td width="95"></td>

<td colspan="2">&nbsp;</td> <td>

<input name="kirim" type="submit"value="Daftar" />

<input name="hapus" type="reset" align="left" value="Hapus" /></td>

<td width="120" colspan="1">&nbsp;</td>

</tr>

<tr><td height="25">&nbsp;</td> </tr>

</table> </form>

11.Listing Dosen_Hapus.php

<?php include("../../library/koneksi.php"); $id=$_REQUEST['id'];

echo $id;

$qry= mysql_query ("delete from dosen where nip='$id'",$koneksi) or die (mysql_error()); if ($qry)?>

<script language="javascript"> <!--

window.location =

"../index.php?name=dosen/index.php&nav= Data Dosen >> List Data Dosen";

--></script> 12.Listing Dosen_Jurusan.php <?php

(13)

$kode=$_REQUEST['kode']; $sql2=mysql_query("SELECT *

FROM jurusan where tingkat='$kode'"); ?>

<select name='jurusan'>

<?php while ($data=mysql_fetch_array($sql2)) {

echo "<option

value=$data[id_jurusan]>$data[nama_jurusan]</option>"; }

echo "</select>";

?>

13. Listing Dosen_Process.php <?php

include ("../../library/koneksi.php"); $t= date("Y-m-d");

$nip=$_REQUEST['nip']; $nama=$_REQUEST['nama']; $alamat=$_REQUEST['alamat']; $telepon=$_REQUEST['telepon']; $email=$_REQUEST['email']; $status=$_REQUEST['status'];

$qry = mysql_query (" insert into dosen ( nip,

nama, alamat, telepon, email

) values ( '$nip', '$nama', '$alamat', '$telepon', '$email'

)" ,$koneksi) or die (mysql_error());

if ($qry==true) {

?>

<script language="javascript"> <!--

window.location = "../index.php?name=dosen/index.php";

(14)

--></script> </script>

<?php

}

?>

14. Listing Dosen_Tampil_Dosen.php <?php

session_start();

if(!isset($_SESSION['pengguna'])) {

?>

<script language="JavaScript"> location.href="../index.php"; </script>

<?php } else {

?>

<?php

include ("../library/koneksi.php"); $id=$_REQUEST['id'];

$view= mysql_query ("select * from dosen,status where dosen.status=status.id_status and nip='$id'",$koneksi) or die (mysql_error());

$jumlah = mysql_num_rows($view);

echo "<br><br>";

if ($row=mysql_fetch_array ($view)) {

?>

<h2>Detail Data Dosen</h2> <table width="277" border="0">

<tr>

<td width="104"><div align="left" class="style8">Nama

</div></td><td width="163" style="border-bottom:#FF9900 solid 1px">:

<span style="style='text-transform:uppercase'"><?php echo $row['nama']; ?></td>

(15)

<tr>

<td><div align="left" class="style8">NIM </div></td><td style="border-bottom:#FF9900 solid 1px">:

<?php echo $row['nip']; ?></td> </tr>

<tr>

<td><div align="left" class="style8">Status </div></td><td style="border-bottom:#FF9900 solid 1px">:

<?php echo $row['status']; ?></td> </tr>

<tr>

<td><div align="justify" class="style8">Alamat </div></td><td style="border-bottom:#FF9900 solid 1px">:

<?php echo $row['alamat']; ?></td> </tr>

<tr>

<td><div align="justify" class="style8">Telepon </div></td><td style="border-bottom:#FF9900 solid 1px">:

<?php echo $row['telepon']; ?></td> </tr><tr>

<td><div align="justify" class="style8">Email </div></td><td style="border-bottom:#FF9900 solid 1px">:

<?php echo $row['email']; ?></td> </tr>

<?php } ?>

<tr><td> <a

href="javascript:history.back()">&laquo;&laquo;Back </a></td></tr>

</table>

<br><br> <?php } ?>

</p>

15. Listing Include_Head.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Jadwal Kuliah Online FAKULTAS KEDOKTERAN USU</title> <meta http-equiv="Content-Type" content="text/html;

charset=utf-8" />

<link href="css/style.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css"

href="css/coin-slider.css" />

<script type="text/javascript" src="js/cufon-yui.js"></script> <script type="text/javascript"

(16)

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="js/script.js"></script> <script type="text/javascript"

src="js/coin-slider.min.js"></script> </head>

<body>

<div class="main"> <div class="header">

<div class="header_resize"> <div class="searchform">

<form id="formsearch" name="formsearch" method="post" action="#">

</form> </div>

16. Listing Include_Menu.php <div class="menu_nav">

<ul>

<li <?php if($_REQUEST[name]==""){?>class="active"<?php } ?>><a href="index.php"><span>Home</span></a></li>

<li <?php

if($_REQUEST[name]=="admin/index.php"){?>class="active"<?php } ?>><a

href="index.php?name=admin/index.php"><span>administrator</spa n></a></li>

<li><a

href="../library/logout.php"><span>Logout</span></a></li>

</ul> </div>

<div class="clr"></div> <div class="logo">

<h1><a href="index.html"><span>Jadwal

Matakuliah</span><small>Fakultas Kedokteran USU</small></a></h1>

</div>

<div class="clr"></div>

17. Listing Include_Sidebar.php <div class="sidebar">

<div class="gadget">

<h2 class="star"><span>Sidebar</span> Menu</h2> <div class="clr"></div>

<ul class="sb_menu">

<li><a href="index.php?name=dosen/index.php">Data Dosen</a></li>

<li><a href="index.php?name=ruang/index.php">Data Ruang</a></li>

<li><a

(17)

<li><a

href="index.php?name=kelas/index.php">Data Kelas</a></li> <li><a href="index.php?name=makul/index.php">Mata

Kuliah</a></li>

<li><a

href="index.php?name=jadwal/index.php">Data Jadwal</a></li> </ul>

</div> </div>

18.Listing include_Slider.php <div class="slider">

<div id="coin-slider"><a href="#"><img

src="include/images/slide1.jpg" width="960" height="360"

alt="" /><span><big>Sed condimentum justo sit amet urna ornare euismod.</big><br />

Tusce nec iaculis risus hasellus nec sem sed tellus malesuada porttitor. Mauris scelerisque feugiat ante in

vulputate. Nam sit amet ullamcorper tortor. Phasellus posuere facilisis cursus. Nunc est lorem, dictum at scelerisque sit amet, faucibus et est. Proin mattis ipsum quis arcu aliquam molestie.</span></a><a href="#"><img

src="include/images/slide2.jpg" width="960" height="360" alt="" /><span><big>Amet urna ornare euismodSed

condimentum.</big><br />

Tusce nec iaculis risus hasellus nec sem sed tellus malesuada porttitor. Mauris scelerisque feugiat ante in

vulputate. Nam sit amet ullamcorper tortor. Phasellus posuere facilisis cursus. Nunc est lorem, dictum at scelerisque sit amet, faucibus et est. Proin mattis ipsum quis arcu aliquam molestie.</span></a><a href="#"><img

src="include/images/slide3.jpg" width="960" height="360"

alt="" /><span><big>Sed condimentum justo sit amet urna ornare euismod.</big><br />

Tusce nec iaculis risus hasellus nec sem sed tellus malesuada porttitor. Mauris scelerisque feugiat ante in

vulputate. Nam sit amet ullamcorper tortor. Phasellus posuere facilisis cursus. Nunc est lorem, dictum at scelerisque sit amet, faucibus et est. Proin mattis ipsum quis arcu aliquam molestie.</span></a></div>

19.Listing Jadwal_Index.php

<h2>List Data Jadwal Mata Kuliah</h2><p>&nbsp;</p> <p>

<?php

include ("../library/koneksi.php"); $sql = mysql_query("SELECT *

FROM jadwal, kelas, makul, ruang, waktu, dosen WHERE jadwal.id_kelas = kelas.id_kelas

(18)

?>

<script type="text/JavaScript"> <!--

function MM_popupMsg(msg) { //v1.0 alert(msg);

}

function MM_goToURL() { //v3.0

var i, args=MM_goToURL.arguments; document.MM_returnValue = false;

for (i=0; i<(args.length-1); i+=2)

eval(args[i]+".location='"+args[i+1]+"'"); }

//-->

</script> <?

//menentukan batas, cek dan posisi data $batas=5;

$halaman = $_REQUEST['halaman'];

if(empty($halaman)){ $posisi=0;

$halaman = 1; } else {

$posisi = ($halaman-1) * $batas; }

//sesuaikan perintah SQL dengan posisi dan batas

$sql= "SELECT *

FROM jadwal, kelas, makul, ruang, waktu, dosen WHERE jadwal.id_kelas = kelas.id_kelas

AND jadwal.id_makul = makul.id_makul AND jadwal.id_ruang = ruang.id_ruang AND jadwal.id_waktu = waktu.id_waktu

AND jadwal.nip_dosen = dosen.nip ORDER BY hari DESC LIMIT $posisi,$batas";

$result = mysql_query($sql); $test=mysql_num_rows($result); if ($test!=0)

{

$no=$posisi+1;

echo" <table width='600' bordercolordark='#000000' cellpadding='1' cellspacing='1' bordercolor='#000000' border='0' style='color:#000000' >";

echo" <tr color='#000000' align=center>"; echo "<th>No</th>";

(19)

echo "<th>Ruang</th>"; echo "<th>Hari</th>"; echo "<th>Waktu</th>"; echo "<th>Kelas</th>"; echo "<th>Dosen</th>"; echo "<th>Aktif</th>";

echo "<th>Action</th></tr>";

while($row=mysql_fetch_array($result)) {

//pemberian warna berbeda pada tiap baris tampilan if (($no % 2)==0)

{ $warna="#ffffff"; } else { $warna="#EAEAEA";}

$id= $row['id_jadwal'];

echo "<tr bgcolor=$warna align=center ><td>"; echo $no;

echo "</td><td width=''>"; echo $row['nama_makul']; echo "</td><td width=''>"; echo $row['kode_ruang']; echo "</td><td width=''>"; include ("library/day.php");

echo $hari;

echo "</td><td width=''>"; echo $row['waktu'];

echo "</td><td width=''>"; echo $row['nama_kelas']; echo "</td><td width=''>"; echo $row['nama'];

echo "</td><td width=''>"; echo $row['aktif'];

echo "</td><td width=''>";

echo "<div align=center><a href='jadwal/delete.php?id=$id' onClick=\"return confirm('Apakah Anda benar-benar akan menghapus data ini?')\"><acronym title='Hapus data'><img

src='images/cancel.png' alt='delete'></a>&nbsp;&nbsp;&nbsp;"?> <style type="text/css">

<!-- a:link {

text-decoration: none; }

a:visited {

text-decoration: none; }

a:hover {

(20)

a:active {

text-decoration: none; }

-->

</style>

<acronym title="Edit Data"><img src="images/info.png" alt="Edit" width="15" height="15"

onClick="MM_goToURL('parent','index.php?name=jadwal/edit_form. php&amp;nav=Mata Kuliah >> Form Edit Mata Kuliah &amp;id=<?php echo $id; ?>');return document.MM_returnValue"

/></acronym>&nbsp;&nbsp;</div>

<?php $no++; }

echo "</table><table width='500' align='left' id='tabel_show' cellpadding='1' cellspacing='1'><tr><td></td><td>";

$sql2 = mysql_query("SELECT *

FROM jadwal, kelas, makul, ruang, waktu, dosen WHERE jadwal.id_kelas = kelas.id_kelas

AND jadwal.id_makul = makul.id_makul AND jadwal.id_ruang = ruang.id_ruang AND jadwal.id_waktu = waktu.id_waktu AND jadwal.nip_dosen = dosen.nip"); $result=mysql_num_rows($sql2);

$jmlhalaman=ceil($result/$batas);

/* bangun Previous link */ if($halaman > 1){

$prev = ($halaman - 1); ?>

<a

href="index.php?name=makul/index.php&amp;halaman=1&amp;nav=Dat a Jadwal Mata Kuliah >> List Data Jadwal Mata Kuliah"><< First </a> |

<a href="index.php?name=makul/index.php&amp;<? echo

"halaman=$prev"; ?>&amp;nav=Data Jadwal Mata Kuliah >> List Data Jadwal Mata Kuliah">&lt;&lt;Previous &nbsp;</a>

<? } else {

echo "<p>First| < Previous "; } //tampilkan link halaman 1,2,3...

for($i = 1; $i <= $jmlhalaman; $i++){ if($i == $jmlhalaman){

echo "$i "; }

(21)

<a href="index.php?name=makul/index.php&amp;<? echo

"halaman=$i"; ?>&amp;nav=Data Jadwal Mata Kuliah >> List Data Jadwal Mata Kuliah"><? echo $i; ?></a>

<? } }

/* bangun Next link */

if($halaman < $jmlhalaman){ $next = $halaman + 1;

?>

<a href="index.php?name=makul/index.php&amp;<? echo

"halaman=$next"; ?>&amp;nav=Data Jadwal Mata Kuliah >> List Data Jadwal Mata Kuliah">Next&gt; |</a>

<A href="index.php?name=makul/index.php&amp;<? echo

"halaman=$jmlhalaman"; ?>&amp;nav=Data Jadwal Mata Kuliah >> List Data Jadwal Mata Kuliah">Last >></a>

<? }

echo "</td></tr></table>";

}//akhir dari kondisi bahwa data tidak kosong else { echo "TIDAK ADA DATA DALAM DATABASE "; }

?> </p>

<p>&nbsp;</p>

<p><a href="index.php?name=jadwal/form.php&amp;nav=Data Jadwal Mata Kuliah >> Form Pengisian Data Jadwal Mata Kuliah">Tambah Jadwal Mata Kuliah</a></p>

<p><a href="index.php?name=jadwal/index.php&status=all">Lihat Seluruh Jadwal Semester Aktif </a> || <a

href="index.php?name=jadwal/index.php&status=hide">Sembunyikan Jadwal</a></p>

<?php if ($_REQUEST[status]=="all") {include ("jadwal/all.php"); }

else if ($_REQUEST[status]=="hide") { }

?>

20.Listing Jadwal_Delete.php

<?php include("../../library/koneksi.php"); $id=$_REQUEST['id'];

$qry= mysql_query ("delete from jadwal where

id_jadwal='$id'",$koneksi) or die (mysql_error());

if ($qry)

header ("location:../index.php?name=jadwal/index.php&nav=Data Jadwal Mata Kuliah >> List Jadwal Data Mata Kuliah");

?>

(22)

<h2> Edit Jadwal Mata Kuliah</h2><p><?php include ("library/koneksi.php");

$sql = mysql_query("SELECT *

FROM jadwal, kelas, makul, ruang, waktu, dosen WHERE jadwal.id_kelas = kelas.id_kelas

AND jadwal.id_makul = makul.id_makul AND jadwal.id_ruang = ruang.id_ruang AND jadwal.id_waktu = waktu.id_waktu AND jadwal.nip_dosen = dosen.nip and id_jadwal=$_REQUEST[id]");

$row=mysql_fetch_array($sql); include ("library/day.php");

?>

<form method=post action=jadwal/edit_process.php> <input type="hidden" name="id" value="<?php echo $_REQUEST[id];?>" />

<table>

<tr><td>Kode Mata Kuliah</td><td> : </td><td> <?php include ("library/koneksi.php");

$sql=mysql_query("select * from makul"); ?>

<select name="makul">

<option value="<?php echo $row['id_makul'];?>"><?php echo $row['nama_makul']; ?></option>

<?php while ($h=mysql_fetch_array($sql)) {?>

<option value="<?php echo $h['id_makul'];?>"><?php echo $h['nama_makul']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Ruang</td><td> : </td><td> <?php include ("library/koneksi.php");

$sql=mysql_query("select * from ruang order by nama_ruang");

?>

<select name="ruang">

<option value="<?php echo $row['id_ruang'];?>"><?php echo $row['nama_ruang']; ?></option>

<?php while ($h=mysql_fetch_array($sql)) {?>

<option value="<?php echo $h['id_ruang'];?>"><?php echo $h['nama_ruang']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Hari</td><td> : </td><td>

(23)

<option value="<?php echo $row['hari'];?>" selected="selected"><?php echo $hari; ?></option>

<option value="1">Senin</option> <option value="2">Selasa</option> <option value="3">Rabu</option> <option value="4">Kamis</option> <option value="5">Jum'at</option> <option value="6">Sabtu</option>

</select></td></tr>

<tr><td>Waktu</td><td> : </td><td> <?php include ("library/koneksi.php");

$sql=mysql_query("select * from waktu order by waktu asc");

?>

<select name="waktu">

<option value="<?php echo $row['id_waktu'];?>"><?php echo $row['waktu']." - ".$h['waktu_akhir']; ?></option>

<?php while ($h=mysql_fetch_array($sql)) {?>

<option value="<?php echo $h['id_waktu'];?>"><?php echo $h['waktu']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Kelas</td><td> : </td><td> <?php include ("library/koneksi.php");

$sql=mysql_query("select * from kelas"); ?>

<select name="kelas">

<option value="<?php echo $row['id_kelas'];?>"><?php echo $row['nama_kelas']; ?></option>

<?php while ($h=mysql_fetch_array($sql)) {?>

<option value="<?php echo $h['id_kelas'];?>"><?php echo $h['nama_kelas']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Dosen Pengajar</td><td> : </td><td> <?php include ("library/koneksi.php");

$sql=mysql_query("select * from dosen order by nama asc");

?>

<select name="dosen">

<option value="<?php echo $row['nip'];?>"><?php echo $row['nama']; ?></option>

(24)

<option value="<?php echo $h['nip'];?>"><?php echo $h['nama']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Semester</td><td>:</td> <td><select name="semester">

<option value="<?php echo $row['semester'];?>"><?php echo $semester; ?></option>

<option value="1">I</option> <option value="2">II</option> <option value="3">III</option> <option value="4">IV</option> <option value="5">V</option>

<option value="6">VI</option>

<option value="7">VII</option>

<option value="8">VIII</option>

</select></td>

<tr><td>Tahun Ajaran</td><td>:</td>

<td><input type="text" name="ta" maxlength="9" size="6" value="<?php echo $row['tahun_ajaran'];?>" /></td>

<tr><td>Status Aktif</td><td> : </td><td>

<select name="aktif">

<option value="<?php echo $row['aktif'];?>"><?php echo $row['aktif'];?></option>

<option value="Ya">Ya</option>

<option value="Tidak">Tidak</option>

</select></td></tr>

<tr><td><input type="submit" value="EDIT"/></td></tr> </table>

</form>

22. Listing Jadwal_Edit_Process.php <?php session_start();

$makul=$_REQUEST['makul']; $waktu=$_REQUEST['waktu']; $kelas=$_REQUEST['kelas']; $dosen=$_REQUEST['dosen']; $ruang=$_REQUEST['ruang']; $hari=$_REQUEST['hari'];

$semester=$_REQUEST['semester']; $ta=$_REQUEST['ta'];

$id=$_REQUEST['id'];

$aktif=$_REQUEST['aktif'];

//Check if the securidy code and the session value are not blank

(25)

$qry = mysql_query (" update jadwal set

id_makul='$makul',id_ruang='$ruang',hari='$hari',id_waktu='$wa ktu',id_kelas='$kelas',nip_dosen='$dosen',semester='$semester' , tahun_ajaran='$ta',aktif='$aktif' where

id_jadwal='$id'",$koneksi) or die (mysql_error()); if ($qry==true)

{ ?>

<script language="javascript"> <!--

window.location =

"../index.php?name=jadwal/index.php&nav=Data Jadwal Mata Kuliah >> List Data Jadwal Mata Kuliah";

alert('Data berhasil dirubah') --></script>

<?php } ?>

23.Listing Jadwal_Form.php

<h2>Form Pengisian Jadwal Mata Kuliah</h2> <form method=post action=jadwal/process.php> <table>

<tr><td>Mata Kuliah</td> <td> : </td><td>

<?php include ("library/koneksi.php");

$sql=mysql_query("select * from makul"); ?>

<select name="makul">

<?php while ($h=mysql_fetch_array($sql)) {?>

<option value="<?php echo $h['id_makul'];?>"><?php echo $h['nama_makul']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Ruang</td><td> : </td><td> <?php include ("library/koneksi.php");

$sql=mysql_query("select * from ruang order by nama_ruang");

?>

<select name="ruang">

<?php while ($h=mysql_fetch_array($sql)) {?>

<option value="<?php echo $h['id_ruang'];?>"><?php echo $h['nama_ruang']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Hari</td><td> : </td><td> <?php //echo date("w");?>

(26)

<option value="1">Senin</option> <option value="2">Selasa</option> <option value="3">Rabu</option> <option value="4">Kamis</option> <option value="5">Jum'at</option> <option value="6">Sabtu</option>

</select></td></tr>

<tr><td>Waktu</td><td> : </td><td> <?php include ("library/koneksi.php");

$sql=mysql_query("select * from waktu order by waktu asc");

?>

<select name="waktu">

<?php while ($h=mysql_fetch_array($sql)) {?>

<option value="<?php echo $h['id_waktu'];?>"><?php echo $h['waktu']." - ".$h['waktu_akhir']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Kelas</td><td> : </td><td> <?php include ("library/koneksi.php");

$sql=mysql_query("select * from kelas"); ?>

<select name="kelas">

<?php while ($h=mysql_fetch_array($sql)) {?>

<option value="<?php echo $h['id_kelas'];?>"><?php echo $h['nama_kelas']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Dosen Pengajar</td><td> : </td><td> <select name="dosen">

<option value="">.:Pilih:.</option> <?php include ("library/koneksi.php");

$sql=mysql_query("select * from dosen order by nama asc");

?>

<?php while ($h=mysql_fetch_array($sql)) {?>

<option value="<?php echo $h['nip'];?>"><?php echo $h['nama']; ?></option>

<?php } ?>

</select></td></tr>

<tr><td>Semester</td><td>:</td> <td><select name="semester">

(27)

<option value="2">II</option> <option value="3">III</option> <option value="4">IV</option> <option value="5">V</option>

<option value="6">VI</option>

<option value="7">VII</option>

<option value="8">VIII</option>

</select></td></tr>

<tr><td>Tahun Ajaran</td><td>:</td>

<td><input type="text" name="ta1" maxlength="4" size="2" value="<?php echo (date("Y")-1); ?>" />/<input type="text" name="ta2" maxlength="4" value="<?php echo date("Y"); ?>" size="2"/></td></tr>

<tr><td>Status Aktif</td><td> : </td><td> <?php //echo date("w");?>

<select name="aktif">

<option value="Ya">YA</option>

<option value="Tidak">Tidak</option>

</select></td></tr>

<tr><td><input type="submit" value="Daftar"/></td></tr> </table>

</form>

24.Listing Jadwal_Izin.php <?php

include ("../library/koneksi.php");

$id=$_REQUEST['id_jadwal'];

$jam_permisi=gmdate("H:i", time()+60*60*7);

if ($id=="") {?>

<script language="javascript"> <!--

window.location =

"index.php?name=jadwal/index.php&nav= Data Jadwal Mata Kuliah >> List Jadwal Mata Kuliah&status=all";

alert('Tidak berhasil melakukan izin jadwal') --></script>

(28)

$qry = mysql_query (" insert into

absensi_jadwal(id_jadwal,tgl_permisi,jam_permisi,status)

values ('$id',sysdate(),'$jam_permisi','off')",$koneksi) or die (mysql_error());

?>

<script language="javascript"> <!--

window.location =

"index.php?name=jadwal/index.php&nav= Data Jadwal Mata Kuliah >> List Jadwal Mata Kuliah&status=all";

alert('Berhasil melakukan izin jadwal') --></script>

<?php } ?>

25.Listing Jadwal_Izin Proses.php <?php

include ("../library/koneksi.php");

$id=$_REQUEST['id_jadwal'];

$jam_permisi=gmdate("H:i", time()+60*60*7);

if ($id=="") {?>

<script language="javascript"> <!--

window.location =

"index.php?name=jadwal/index.php&nav= Data Jadwal Mata Kuliah >> List Jadwal Mata Kuliah&status=all";

alert('Tidak berhasil melakukan izin jadwal') --></script>

<?php } else {

$qry = mysql_query (" update absensi_jadwal set status ='on' where id_jadwal=$id",$koneksi) or die (mysql_error());

?>

<script language="javascript"> <!--

window.location =

"index.php?name=jadwal/index.php&nav= Data Jadwal Mata Kuliah >> List Jadwal Mata Kuliah&status=all";

alert('Berhasil melakukan hadir kembali') --></script>

(29)

Referensi

Dokumen terkait

Laporan Keuangan Balai Besar Pulp dan Kertas yang terdiri dari: Laporan Realisasi Anggaran, Neraca, Laporan Operasional, Laporan Perubahan Ekuitas, dan Catatan

Lalu Psikologi Komunikasi Perspektif Sosiologi melihat Komunikasi merupakan interaksi sosial, dengan melihat definisi Collin Cherry (1964) , Komunikasi merupakan

Jika Anda sudah belajar semua yang Anda bisa pelajari dari tempat kerja Anda dan di sana tidak ada lagi ruang untuk bertumbuh dan Anda telah memberikan segalanya yang Anda butuhkan

Dari uraian di atas penulis tertarik ingin melakukan penelitian yang berjudul “ Pengaruh latihan one-on-one sadhow tag terhadap waktu reaksi pada siswa

Kreteria Penilaian adalah patokan yang digunakan sebagai ukuran atau tolok ukur ketercapaian pembelajaran dalam penilaian berdasarkan indikator-indikator yang

  CS 2 : 082369154000   CS 3 : 085881454000   CS 4 : 087841254000 : Instagram.com/kedaihw   Facebook.com/kedaihw.co : Bukalapak.com/kedaihw

Feugiat vivamus at augue eget arcu dictum varius duis at consectetur lorem donec massa sapien faucibus et molestie ac feugiat sed lectus vestibulum mattis ullamcorper velit sed

(3)aspek yang selanjutnya adalah ideentifikasi soal fungsi aljabar, pada aspek ini taraf kesalahan siswa adalah sebesar 64,70% angka ini berada dalam kategori