1.1 Perancangan Database
Perancangan database yang akan diimplementasikan pada DBMS adalah sebagai berikut:
Gambar 1 Perancangan Database yang Akan Digunakan
Di dalam database terdapat 5 tabel yang saling berelasi. Tabel-tabelnya terdiri dari: Tabel Peserta, Tabel Kursus, Tabel Nilai, Tabel Ruangan, Tabel Jadwal, Tabel Pengajar.
1.2 Implementasi SQL pada Aplikasi
Dalam Aplikasi Sistem Informasi Akademik Lembaga Kursus terdapat beberapa form yang dapat diakses oleh beberapa hak akses tertentu. Hak Akses Administrasi dapat mengakses seluruh form aplikasi. Hak Akses Pengajar dapat mengakses jadwal dan nilai. Hak Akses Peserta dapat mengakses jadwal dan nilai. Berikut adalah screenshot dari form-form Aplikasi Sistem Informasi Akademik Lembaga Kursus.
1.2.1 Form Login dan Tampilan Awal
Gambar 15 Form Login
Source code pada Form Login
<?php
session_start();
include "koneksi.php";
// Notif Error
$Err = "";
if(isset ($_GET ["Err"]) && !empty ($_GET ["Err"])){
switch ($_GET ["Err"]){
case 1:
$Err = "Username dan Password Kosong";
break;
case 2:
$Err = "Username Kosong";
break;
case 3:
$Err = "Password Kosong";
break;
case 4:
$Err = "Password Salah";
break;
case 5:
$Err = "Username dan Password Salah";
break;
case 6:
$Err = "Maaf, Terjadi Kesalahan";
break;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SIA Lembaga Kursus</title>
<!-- Icon -->
<link rel="shortcut icon" type="image/icon" href="favicon.jpg">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="assets/fa/css/font-awesome.css">
<!-- Theme style -->
<link rel="stylesheet" href="assets/dist/css/AdminLTE.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="assets/plugins/iCheck/square/blue.css">
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<b>SIA Lembaga Kursus</b>
</div><!-- /.login-logo -->
<div class="login-box-body">
<b><p class="login-box-msg">Login Form</p></b>
<form action="vl_user.php" method="post">
<div class="form-group has-feedback">
<input type="text" name="Username" class="form-control" placeholder="Username" maxlength="30" />
<span class="form-control-feedback"><i class="fa fa-user"></i></span>
</div>
<div class="form-group has-feedback">
<input type="password" name="Password" class="form-control" placeholder="Password" maxlength="255" />
<span class="form-control-feedback"><i class="fa fa-unlock"></i></span>
</div>
<div class="row">
<div class="col-xs-8">
</div><!-- /.col -->
<div class="col-xs-4">
<button type="submit" class="btn btn-success">Login<i class="fa fa-sign-in"></i></button>
</div><!-- /.col -->
</div>
<br>
<center><font style="color:red;"><?php echo $Err ?></font></center>
</br>
</form>
</div><!-- /.login-box-body -->
</div><!-- /.login-box -->
<!-- jQuery 2.1.4 -->
<script src="assets/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<!-- iCheck -->
<script src="assets/plugins/iCheck/icheck.min.js"></script>
</body>
</html>
Gambar 16 Tampilan Awal Aplikasi
Source code pada Tampilan Awal Aplikasi
<?php
session_start();
include "../koneksi.php";
include "auth_user.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SIA Lembaga Kursus</title>
<!-- Icon -->
<link rel="shortcut icon" type="image/icon" href="../favicon.jpg">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="../assets/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="../assets/fa/css/font-awesome.css">
<!-- DataTables -->
<link rel="stylesheet" href="../assets/plugins/datatables/dataTables.bootstrap.css">
<!-- Theme style -->
<link rel="stylesheet" href="../assets/dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="../assets/dist/css/skins/_all-skins.min.css">
</head>
<body class="sidebar-mini wysihtml5-supported skin-green-light">
<div class="wrapper">
<?php
include "content_header.php";
?>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<p></p>
</div>
</div><!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li class="header"><h4><b><center>Menu Panel</center></b></h4></li>
<li class="active"><a href="index.php"><i class="fa fa-home"></i><span>Dashboard</span></a></li>
<li><a href="pengajar.php"><i class="fa fa-user"></i><span>Pengajar</span></a></li>
<li><a href="peserta.php"><i class="fa fa-users"></i><span>Peserta</span></a></li>
<li><a href="ruangan.php"><i class="fa fa-columns"></i><span>Ruangan</span></a></li>
<li><a href="kursus.php"><i class="fa fa-book"></i><span>Kursus</span></a></li>
<li><a href="jadwal.php"><i class="fa fa-calendar"></i><span>Jadwal</span></a></li>
<li><a href="user.php"><i class="fa fa-user-circle-o"></i><span>User</span></a></li>
<li><a href="about.php"><i class="fa fa-info-circle"></i><span>Tentang Aplikasi</span></a></li>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Dashboard
</h1>
<ol class="breadcrumb">
<li><i class="fa fa-home"></i> Dashboard</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h1><center><b>SIA Lembaga Kursus</b></center></h1>
<center><img src="../assets/foto/logo.png" width="225" height="225" /></center>
</div><!-- /.box-header -->
<div class="box-body">
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<?php
include "content_footer.php";
?>
</div><!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script src="../assets/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="../assets/bootstrap/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="../assets/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../assets/plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="../assets/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="../assets/plugins/fastclick/fastclick.min.js"></script>
<!-- AdminLTE App -->
<script src="../assets/dist/js/app.min.js"></script>
</body>
</html>
1.2.2 Form Pengajar
Gambar 17 Form Pengajar
Source code Form Pengajar
<?php
session_start();
include "../koneksi.php";
include "auth_user.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SIA Lembaga Kursus</title>
<!-- Library CSS -->
<?php
include "bundle_css.php";
?>
</head>
<body class="sidebar-mini wysihtml5-supported skin-green-light">
<div class="wrapper">
<?php
include 'content_header.php';
?>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<p></p>
</div>
</div><!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li class="header"><h4><b><center>Menu Panel</center></b></h4></li>
<li class="active"><a href="index.php"><i class="fa fa-home"></i><span>Dashboard</span></a></li>
<li><a href="pengajar.php"><i class="fa fa-user"></i><span>Pengajar</span></a></li>
<li><a href="peserta.php"><i class="fa fa-users"></i><span>Peserta</span></a></li>
<li><a href="ruangan.php"><i class="fa fa-columns"></i><span>Ruangan</span></a></li>
<li><a href="kursus.php"><i class="fa fa-book"></i><span>Kursus</span></a></li>
<li><a href="jadwal.php"><i class="fa fa-calendar"></i><span>Jadwal</span></a></li>
<li><a href="user.php"><i class="fa fa-user-circle-o"></i><span>User</span></a></li>
<li><a href="about.php"><i class="fa fa-info-circle"></i><span>Tentang Aplikasi</span></a></li>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Pengajar
</h1>
<ol class="breadcrumb">
<li><i class="fa fa-user"></i> Pengajar</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
</div><!-- /.box-header -->
<div class="box-body">
<a href="#"><button class="btn btn-success" type="button" data-target="#ModalAdd" data-toggle="modal"><i class="fa fa-plus"></i> Add</button></a>
<a style="margin-bottom:10px" href="cetak_dt_pengajar.php" target="_blank" class="btn btn-default pull-right"><span class='glyphicon glyphicon-print'></span> Cetak</a>
<br></br>
<table id="data" class="table table-bordered table-striped table-scalable">
<?php
include "dt_pengajar.php";
?>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
<!-- Modal Popup Pengajar -->
<div id="ModalAdd" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Tambah Pengajar</h4>
</div>
<div class="modal-body">
<form action="pengajar_add.php" name="modal_popup" enctype="multipart/form-data" method="post">
<div class="form-group">
<label>Kode Pengajar</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-id-card"></i>
</div>
<input name="kd_pengajar" type="text" class="form-control" placeholder="Kode Pengajar"/>
</div>
</div>
<div class="form-group">
<label>Pengajar</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-user"></i>
</div>
<input name="nm_pengajar" type="text" class="form-control" placeholder="Nama Pengajar"/>
</div>
</div>
<div class="form-group">
<label>Tanggal Lahir</label>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input id="Tanggal_Lahir" name="tgl_lhr" type="text" class="form-control" placeholder="Tanggal Lahir">
</div>
</div>
<div class="form-group">
<label>Jenis Kelamin</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-user-o"></i>
</div>
<select name="jekel" class="form-control">
<option selected>Pilih Jenis Kelamin</option>
<option value="L">Laki - laki</option>
<option value="P">Perempuan</option>
</select>
</div>
</div>
<div class="form-group">
<label>No. Telp</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-phone"></i>
</div>
<input name="no_telp" type="text" class="form-control" placeholder="No Telpon"/>
</div>
</div>
<div class="form-group">
<label>Alamat</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-flag"></i>
</div>
<input name="alamat" type="text" class="form-control" placeholder="Alamat"/>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="submit">
Add
</button>
<button type="reset" class="btn btn-danger" data-dismiss="modal" aria-hidden="true">
Cancel
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal Popup Pengajar Edit -->
<div id="ModalEditPengajar" class="modal fade" tabindex="-1" role="dialog"></div>
<!-- Modal Popup untuk delete-->
<div class="modal fade" id="modal_delete">
<div class="modal-dialog">
<div class="modal-content" style="margin-top:100px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" style="text-align:center;">Are you sure to delete this information ?</h4>
</div>
<div class="modal-footer" style="margin:0px; border-top:0px; text-align:center;">
<a href="#" class="btn btn-danger" id="delete_link">Delete</a>
<button type="button" class="btn btn-success" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div><!-- /.content-wrapper -->
<?php
include "content_footer.php";
?>
</div><!-- ./wrapper -->
<!-- Library Scripts -->
<?php
include "bundle_script.php";
?>
</body>
</html>
Gambar 18 Form Tambah Pengajar
Source code Form Tambah Pengajar
<?php
include "../koneksi.php";
$kd_pengajar = $_POST["kd_pengajar"];
$nm_pengajar = $_POST["nm_pengajar"];
$tgl_lhr = $_POST["tgl_lhr"];
$jekel = $_POST["jekel"];
$alamat = $_POST["alamat"];
$no_telp = $_POST["no_telp"];
if ($add = sqlsrv_query($konek, "INSERT INTO pengajar (kd_pengajar, nm_pengajar, tgl_lhr, jekel, no_telp, alamat) VALUES ('$kd_pengajar', '$nm_pengajar', '$tgl_lhr', '$jekel', '$no_telp', '$alamat')")){
header("Location: pengajar.php");
exit();
}
die ("Terdapat kesalahan : ".sqlsrv_errors($konek));
?>
Gambar 19 Form Edit Pengajar
Source code Form Edit Pengajar
<?php
include "../koneksi.php";
$kd_pengajar = $_POST["kd_pengajar"];
$nm_pengajar = $_POST["nm_pengajar"];
$tgl_lhr = $_POST["tgl_lhr"];
$jekel = $_POST["jekel"];
$alamat = $_POST["alamat"];
$no_telp = $_POST["no_telp"];
if ($edit = sqlsrv_query($konek, "UPDATE pengajar SET nm_pengajar='$nm_pengajar', tgl_lhr='$tgl_lhr', jekel='$jekel', no_telp='$no_telp', alamat='$alamat' WHERE kd_pengajar='$kd_pengajar'")){
header("Location: pengajar.php");
exit();
}
die ("Terdapat kesalahan : ".sqlsrv_errors($konek));
?>
Gambar 20 Form Delete Pengajar
Source code Form Delete Pengajar
<?php
include "../koneksi.php";
$kd_pengajar = $_GET["kd_pengajar"];
if($delete = sqlsrv_query($konek, "DELETE FROM pengajar WHERE kd_pengajar='$kd_pengajar'")){
header("Location: pengajar.php");
exit();
}
die ("Terdapat Kesalahan : ".sqlsrv_errors($konek));
?>
Gambar 21 Laporan Data Pengajar
Source code pada Laporan Data Pengajar
<?php
include '../koneksi.php';
require('../assets/pdf/fpdf.php');
$pdf = new FPDF("L","cm","A4");
$pdf->SetMargins(2,1,1);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','B',11);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Laporan Pengajar',0,'L');
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Sistem Informasi Akademik',0,'L');
$pdf->SetFont('Arial','B',10);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Lembaga Kursus',0,'L');
$pdf->SetX(4);
$pdf->SetLineWidth(0.1);
$pdf->Line(1,3.2,28.5,3.2);
$pdf->SetLineWidth(0);
$pdf->ln(1);
$pdf->SetFont('Arial','B',14);
$pdf->Cell(25.5,0.7,"Pengajar",0,10,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(5,0.7,"Dicetak pada : ".date("D-d/m/Y"),0,0,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(5, 0.8, 'Pengajar', 1, 0, 'C');
$pdf->Cell(5, 0.8, 'Tanggal Lahir', 1, 0, 'C');
$pdf->Cell(4, 0.8, 'Jenis Kelamin', 1, 0, 'C');
$pdf->Cell(4, 0.8, 'No. Telp', 1, 0, 'C');
$pdf->Cell(5, 0.8, 'Alamat', 1, 1, 'C');
$pdf->SetFont('Arial','',10);
$querypengajar = sqlsrv_query ($konek, "SELECT kd_pengajar, nm_pengajar, FORMAT(tgl_lhr, 'dd-MM-yyyy', 'en-US') AS tgl_lhr, jekel, no_telp, alamat FROM pengajar");
if($querypengajar == false){
die ("Terjadi Kesalahan : ". sqlsrv_errors($konek));
}
while ($pengajar = sqlsrv_fetch_array ($querypengajar)){
$pdf->Cell(5, 0.8, $pengajar['nm_pengajar'] , 1, 0, 'C');
$pdf->Cell(5, 0.8, $pengajar['tgl_lhr'],1, 0, 'C');
$pdf->Cell(4, 0.8, $pengajar['jekel'], 1, 0,'C');
$pdf->Cell(4, 0.8, $pengajar['no_telp'],1, 0, 'C');
$pdf->Cell(5, 0.8, $pengajar['alamat'], 1, 1,'C');
}
$pdf->Output("cetak_pengajar.pdf","I");
?>
1.2.3 Form Peserta
Gambar 21 Form Peserta
Source code Form Peserta
<?php
session_start();
include "../koneksi.php";
include "auth_user.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SIA Lembaga Kursus</title>
<!-- Library CSS -->
<?php
include "bundle_css.php";
?>
</head>
<body class="sidebar-mini wysihtml5-supported skin-green-light">
<div class="wrapper">
<?php
include 'content_header.php';
?>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<p></p>
</div>
</div><!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li class="header"><h4><b><center>Menu Panel</center></b></h4></li>
<li class="active"><a href="index.php"><i class="fa fa-home"></i><span>Dashboard</span></a></li>
<li><a href="pengajar.php"><i class="fa fa-user"></i><span>Pengajar</span></a></li>
<li><a href="peserta.php"><i class="fa fa-users"></i><span>Peserta</span></a></li>
<li><a href="ruangan.php"><i class="fa fa-columns"></i><span>Ruangan</span></a></li>
<li><a href="kursus.php"><i class="fa fa-book"></i><span>Kursus</span></a></li>
<li><a href="jadwal.php"><i class="fa fa-calendar"></i><span>Jadwal</span></a></li>
<li><a href="user.php"><i class="fa fa-user-circle-o"></i><span>User</span></a></li>
<li><a href="about.php"><i class="fa fa-info-circle"></i><span>Tentang Aplikasi</span></a></li>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Peserta
</h1>
<ol class="breadcrumb">
<li><i class="fa fa-users"></i> Peserta</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
</div><!-- /.box-header -->
<div class="box-body">
<a href="#"><button class="btn btn-success" type="button" data-target="#ModalAdd" data-toggle="modal"><i class="fa fa-plus"></i> Add</button></a>
<a style="margin-bottom:10px" href="cetak_dt_peserta.php" target="_blank" class="btn btn-default pull-right"><span class='glyphicon glyphicon-print'></span> Cetak</a>
<br></br>
<table id="data" class="table table-bordered table-striped table-scalable">
<?php
include "dt_peserta.php";
?>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
<!-- Modal Popup Dosen -->
<div id="ModalAdd" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Tambah Peserta</h4>
</div>
<div class="modal-body">
<form action="peserta_add.php" name="modal_popup" enctype="multipart/form-data" method="post">
<div class="form-group">
<label>kd_peserta</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-id-card"></i>
</div>
<input name="kd_peserta" type="text" class="form-control" placeholder="Kode Peserta"/>
</div>
</div>
<div class="form-group">
<label>Peserta</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-user"></i>
</div>
<input name="nm_peserta" type="text" class="form-control" placeholder="Nama Peserta"/>
</div>
</div>
<div class="form-group">
<label>Tanggal Lahir</label>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input id="Tanggal_Lahir" name="tgl_lhr" type="text" class="form-control" placeholder="Tanggal Lahir">
</div>
</div>
<div class="form-group">
<label>Jenis Kelamin</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-user-o"></i>
</div>
<select name="jekel" class="form-control">
<option selected>Pilih Jenis Kelamin</option>
<option value="L">Laki - laki</option>
<option value="P">Perempuan</option>
</select>
</div>
</div>
<div class="form-group">
<label>No. Telp</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-phone"></i>
</div>
<input name="no_telp" type="text" class="form-control" placeholder="No Telpon"/>
</div>
</div>
<div class="form-group">
<label>Alamat</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-flag"></i>
</div>
<input name="alamat" type="text" class="form-control" placeholder="Alamat"/>
</div>
</div>
<div class="form-group">
<label>Kursus</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-graduation-cap"></i>
</div>
<select name="kd_kursus" class="form-control">
<?php
$querykursus = sqlsrv_query($konek, "SELECT * FROM kursus");
if($querykursus == false){
die ("Terdapat Kesalahan : ". sqlsrv_errors($konek));
}
while($kursus = sqlsrv_fetch_array($querykursus)){
echo "
<option value='$kursus[kd_kursus]'>$kursus[nm_kursus]</option>";
}
?>
</select>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="submit">
Add
</button>
<button type="reset" class="btn btn-danger" data-dismiss="modal" aria-hidden="true">
Cancel
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal Popup Dosen Edit -->
<div id="ModalEditPeserta" class="modal fade" tabindex="-1" role="dialog"></div>
<!-- Modal Popup untuk delete-->
<div class="modal fade" id="modal_delete">
<div class="modal-dialog">
<div class="modal-content" style="margin-top:100px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" style="text-align:center;">Are you sure to delete this information ?</h4>
</div>
<div class="modal-footer" style="margin:0px; border-top:0px; text-align:center;">
<a href="#" class="btn btn-danger" id="delete_link">Delete</a>
<button type="button" class="btn btn-success" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div><!-- /.content-wrapper -->
<?php
include "content_footer.php";
?>
</div><!-- ./wrapper -->
<!-- Library Scripts -->
<?php
include "bundle_script.php";
?>
</body>
</html>
Gambar 22 Form Tambah Peserta
Source code Form Tambah Peserta
<?php
include "../koneksi.php";
$kd_peserta = $_POST["kd_peserta"];
$nm_peserta = $_POST["nm_peserta"];
$tgl_lhr = $_POST["tgl_lhr"];
$jekel = $_POST["jekel"];
$alamat = $_POST["alamat"];
$no_telp = $_POST["no_telp"];
$kd_kursus = $_POST["kd_kursus"];
if ($add = sqlsrv_query($konek, "INSERT INTO peserta (kd_peserta, nm_peserta, tgl_lhr, jekel, alamat, no_telp, kd_kursus) VALUES
('$kd_peserta', '$nm_peserta', '$tgl_lhr', '$jekel', '$alamat', '$no_telp', '$kd_kursus')")){
header("Location: peserta.php");
exit();
}
die ("Terdapat kesalahan : ".sqlsrv_errors($konek));
?>
Gambar 23 Form Ubah Peserta
Source code Form Ubah Peserta
<?php
include "../koneksi.php";
$kd_peserta = $_POST["kd_peserta"];
$nm_peserta = $_POST["nm_peserta"];
$tgl_lhr = $_POST["tgl_lhr"];
$jekel = $_POST["jekel"];
$no_telp = $_POST["no_telp"];
$alamat = $_POST["alamat"];
$kd_kursus = $_POST["kd_kursus"];
if($edit = sqlsrv_query($konek, "UPDATE peserta SET nm_peserta='$nm_peserta', tgl_lhr='$tgl_lhr', jekel='$jekel', no_telp='$no_telp', alamat='$alamat', kd_kursus='$kd_kursus' WHERE kd_peserta='$kd_peserta'")){
header("Location: peserta.php");
exit();
}
die("Terdapat Kesalahan : ".sqlsrv_errors($konek));
?>
Gambar 24 Form Hapus Peserta
Source code Form Hapus Peserta
<?php
include "../koneksi.php";
$kd_peserta = $_GET["kd_peserta"];
if($delete = sqlsrv_query($konek, "DELETE FROM peserta WHERE kd_peserta='$kd_peserta'")){
header("Location: peserta.php");
exit();
}
die ("Terdapat Kesalahan : ".sqlsrv_errors($konek));
?>
Gambar 25 Laporan Data Peserta
Source code Laporan Data Peserta
<?php
include '../koneksi.php';
require('../assets/pdf/fpdf.php');
$pdf = new FPDF("L","cm","A4");
$pdf->SetMargins(2,1,1);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','B',11);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Laporan Peserta',0,'L');
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Sistem Informasi Akademik',0,'L');
$pdf->SetFont('Arial','B',10);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Lembaga Kursus',0,'L');
$pdf->SetX(4);
$pdf->SetLineWidth(0.1);
$pdf->Line(1,3.2,28.5,3.2);
$pdf->SetLineWidth(0);
$pdf->ln(1);
$pdf->SetFont('Arial','B',14);
$pdf->Cell(25.5,0.7,"Peserta",0,10,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(5,0.7,"Dicetak pada : ".date("D-d/m/Y"),0,0,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(2, 0.8, 'Kode', 1, 0, 'C');
$pdf->Cell(5, 0.8, 'Peserta', 1, 0, 'C');
$pdf->Cell(3, 0.8, 'Tanggal Lahir', 1, 0, 'C');
$pdf->Cell(3, 0.8, 'Jenis Kelamin', 1, 0, 'C');
$pdf->Cell(3, 0.8, 'No. Telp', 1, 0, 'C');
$pdf->Cell(5, 0.8, 'Alamat', 1, 0, 'C');
$pdf->Cell(5, 0.8, 'Kursus', 1, 1, 'C');
$pdf->SetFont('Arial','',10);
$querypeserta = sqlsrv_query ($konek, "SELECT kd_peserta, nm_peserta, FORMAT(tgl_lhr, 'dd-MM-yyyy', 'en-US') AS tgl_lhr, jekel, no_telp, alamat, kursus.nm_kursus FROM peserta INNER JOIN kursus ON peserta.kd_kursus = kursus.kd_kursus ORDER BY kd_peserta");
if($querypeserta == false){
die ("Terjadi Kesalahan : ". sqlsrv_errors($konek));
}
while ($peserta = sqlsrv_fetch_array ($querypeserta)){
$pdf->Cell(2, 0.8, $peserta['kd_peserta'] , 1, 0, 'C');
$pdf->Cell(5, 0.8, $peserta['nm_peserta'] , 1, 0, 'C');
$pdf->Cell(3, 0.8, $peserta['tgl_lhr'],1, 0, 'C');
$pdf->Cell(3, 0.8, $peserta['jekel'], 1, 0,'C');
$pdf->Cell(3, 0.8, $peserta['no_telp'],1, 0, 'C');
$pdf->Cell(5, 0.8, $peserta['alamat'],1, 0, 'C');
$pdf->Cell(5, 0.8, $peserta['nm_kursus'], 1, 1,'C');
}
$pdf->Output("cetak_pengajar.pdf","I");
?>
1.2.4 Form Ruangan
Gambar 26 Form Ruangan
Source code Form Ruangan
<?php
session_start();
include "../koneksi.php";
include "auth_user.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SIA Lembaga Kursus</title>
<!-- Library CSS -->
<?php
include "bundle_css.php";
?>
</head>
<body class="sidebar-mini wysihtml5-supported skin-green-light">
<div class="wrapper">
<?php
include 'content_header.php';
?>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<p></p>
</div>
</div><!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li class="header"><h4><b><center>Menu Panel</center></b></h4></li>
<li class="active"><a href="index.php"><i class="fa fa-home"></i><span>Dashboard</span></a></li>
<li><a href="pengajar.php"><i class="fa fa-user"></i><span>Pengajar</span></a></li>
<li><a href="peserta.php"><i class="fa fa-users"></i><span>Peserta</span></a></li>
<li><a href="ruangan.php"><i class="fa fa-columns"></i><span>Ruangan</span></a></li>
<li><a href="kursus.php"><i class="fa fa-book"></i><span>Kursus</span></a></li>
<li><a href="jadwal.php"><i class="fa fa-calendar"></i><span>Jadwal</span></a></li>
<li><a href="user.php"><i class="fa fa-user-circle-o"></i><span>User</span></a></li>
<li><a href="about.php"><i class="fa fa-info-circle"></i><span>Tentang Aplikasi</span></a></li>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Ruangan
</h1>
<ol class="breadcrumb">
<li><i class="fa fa-columns"></i> Ruangan</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
</div><!-- /.box-header -->
<div class="box-body">
<a href="#"><button class="btn btn-success" type="button" data-target="#ModalAdd" data-toggle="modal"><i class="fa fa-plus"></i> Add</button></a>
<a style="margin-bottom:10px" href="cetak_dt_ruangan.php" target="_blank" class="btn btn-default pull-right"><span class='glyphicon glyphicon-print'></span> Cetak</a>
<br></br>
<table id="data" class="table table-bordered table-striped table-scalable">
<?php
include "dt_ruangan.php";
?>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
<!-- Modal Popup Dosen -->
<div id="ModalAdd" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Tambah Ruangan</h4>
</div>
<div class="modal-body">
<form action="ruangan_add.php" name="modal_popup" enctype="multipart/form-data" method="post">
<div class="form-group">
<label>Kode Ruangan</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-columns"></i>
</div>
<input name="kd_ruangan" type="text" class="form-control" placeholder="Kode Ruangan"/>
</div>
</div>
<div class="form-group">
<label>Ruangan</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-columns"></i>
</div>
<input name="nm_ruangan" type="text" class="form-control" placeholder="Ruangan"/>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="submit">
Add
</button>
<button type="reset" class="btn btn-danger" data-dismiss="modal" aria-hidden="true">
Cancel
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal Popup Dosen Edit -->
<div id="ModalEditRuangan" class="modal fade" tabindex="-1" role="dialog"></div>
<!-- Modal Popup untuk delete-->
<div class="modal fade" id="modal_delete">
<div class="modal-dialog">
<div class="modal-content" style="margin-top:100px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" style="text-align:center;">Are you sure to delete this information ?</h4>
</div>
<div class="modal-footer" style="margin:0px; border-top:0px; text-align:center;">
<a href="#" class="btn btn-danger" id="delete_link">Delete</a>
<button type="button" class="btn btn-success" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div><!-- /.content-wrapper -->
<?php
include "content_footer.php";
?>
</div><!-- ./wrapper -->
<!-- Library Scripts -->
<?php
include "bundle_script.php";
?>
</body>
</html>
Source code Form Tambah Ruangan
<?php
include "../koneksi.php";
$kd_ruangan = $_POST["kd_ruangan"];
$nm_ruangan = $_POST["nm_ruangan"];
if($add = sqlsrv_query($konek, "INSERT INTO ruangan (kd_ruangan, nm_ruangan) VALUES ('$kd_ruangan', '$nm_ruangan')")){
header("Location: ruangan.php");
exit();
}
die ("Terdapat Kesalahan : ". sqlsrv_errors($konek));
?>
Gambar 28 Form Edit Ruangan
Source code Form Edit Ruangan
<?php
include "../koneksi.php";
$kd_ruangan = $_POST["kd_ruangan"];
$nm_ruangan = $_POST["nm_ruangan"];
if ($edit = sqlsrv_query($konek, "UPDATE ruangan SET nm_ruangan='$nm_ruangan' WHERE kd_ruangan='$kd_ruangan'")){
header("Location: ruangan.php");
exit();
}
die ("Terdapat Kesalahan : ". sqlsrv_errors($konek));
?>
Gambar 29 Form Hapus Ruangan
Source code Form Hapus Ruangan
<?php
include "../koneksi.php";
$kd_ruangan = $_GET["kd_ruangan"];
if($delete = sqlsrv_query($konek, "DELETE FROM ruangan WHERE kd_ruangan='$kd_ruangan'")){
header("Location: ruangan.php");
exit();
}
die("Terdapat Kesalahan : ". sqlsrv_errors($konek));
?>
Gambar 30 Laporan Data Ruangan
Source code Laporan Data Ruangan
<?php
include '../koneksi.php';
require('../assets/pdf/fpdf.php');
$pdf = new FPDF("P","cm","A4");
$pdf->SetMargins(2,1,1);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','B',11);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Laporan Ruangan',0,'L');
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Sistem Informasi Akademik',0,'L');
$pdf->SetFont('Arial','B',10);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Lembaga Kursus',0,'L');
$pdf->SetX(4);
$pdf->SetLineWidth(0.1);
$pdf->Line(1,3.2,20,3.2);
$pdf->SetLineWidth(0);
$pdf->ln(1);
$pdf->SetFont('Arial','B',14);
$pdf->Cell(18,0.7,"Ruangan",0,10,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(5,0.7,"Dicetak pada : ".date("D-d/m/Y"),0,0,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(2, 0.8, 'Kode', 1, 0, 'C');
$pdf->Cell(5, 0.8, 'Ruangan', 1, 1, 'C');
$pdf->SetFont('Arial','',10);
$queryruangan = sqlsrv_query ($konek, "SELECT * FROM ruangan");
if($queryruangan == false){
die ("Terjadi Kesalahan : ". sqlsrv_errors($konek));
}
while ($ruangan = sqlsrv_fetch_array ($queryruangan)){
$pdf->Cell(2, 0.8, $ruangan['kd_ruangan'] , 1, 0, 'C');
$pdf->Cell(5, 0.8, $ruangan['nm_ruangan'] , 1, 1, 'C');
}
$pdf->Output("cetak_ruangan.pdf","I");
?>
1.2.5 Form Kursus
Gambar 31 Form Kursus
Source code Form Kursus
<?php
session_start();
include "../koneksi.php";
include "auth_user.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SIA Lembaga Kursus</title>
<!-- Library CSS -->
<?php
include "bundle_css.php";
?>
</head>
<body class="sidebar-mini wysihtml5-supported skin-green-light">
<div class="wrapper">
<?php
include 'content_header.php';
?>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<p></p>
</div>
</div><!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li class="header"><h4><b><center>Menu Panel</center></b></h4></li>
<li class="active"><a href="index.php"><i class="fa fa-home"></i><span>Dashboard</span></a></li>
<li><a href="pengajar.php"><i class="fa fa-user"></i><span>Pengajar</span></a></li>
<li><a href="peserta.php"><i class="fa fa-users"></i><span>Peserta</span></a></li>
<li><a href="ruangan.php"><i class="fa fa-columns"></i><span>Ruangan</span></a></li>
<li><a href="kursus.php"><i class="fa fa-book"></i><span>Kursus</span></a></li>
<li><a href="jadwal.php"><i class="fa fa-calendar"></i><span>Jadwal</span></a></li>
<li><a href="user.php"><i class="fa fa-user-circle-o"></i><span>User</span></a></li>
<li><a href="about.php"><i class="fa fa-info-circle"></i><span>Tentang Aplikasi</span></a></li>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Kursus
</h1>
<ol class="breadcrumb">
<li><i class="fa fa-book"></i> Kursus</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
</div><!-- /.box-header -->
<div class="box-body">
<a href="#"><button class="btn btn-success" type="button" data-target="#ModalAdd" data-toggle="modal"><i class="fa fa-plus"></i> Add</button></a>
<a style="margin-bottom:10px" href="cetak_dt_kursus.php" target="_blank" class="btn btn-default pull-right"><span class='glyphicon glyphicon-print'></span> Cetak</a>
<br></br>
<table id="data" class="table table-bordered table-striped table-scalable">
<?php
include "dt_kursus.php";
?>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
<!-- Modal Popup Dosen -->
<div id="ModalAdd" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Tambah Kursus</h4>
</div>
<div class="modal-body">
<form action="kursus_add.php" name="modal_popup" enctype="multipart/form-data" method="post">
<div class="form-group">
<label>Kode Kursus</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-book"></i>
</div>
<input name="kd_kursus" type="text" class="form-control" placeholder="Kode Kursus"/>
</div>
</div>
<div class="form-group">
<label>Kursus</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-book"></i>
</div>
<input name="nm_kursus" type="text" class="form-control" placeholder="Kursus"/>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="submit">
Add
</button>
<button type="reset" class="btn btn-danger" data-dismiss="modal" aria-hidden="true">
Cancel
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal Popup Dosen Edit -->
<div id="ModalEditKursus" class="modal fade" tabindex="-1" role="dialog"></div>
<!-- Modal Popup untuk delete-->
<div class="modal fade" id="modal_delete">
<div class="modal-dialog">
<div class="modal-content" style="margin-top:100px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" style="text-align:center;">Are you sure to delete this information ?</h4>
</div>
<div class="modal-footer" style="margin:0px; border-top:0px; text-align:center;">
<a href="#" class="btn btn-danger" id="delete_link">Delete</a>
<button type="button" class="btn btn-success" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div><!-- /.content-wrapper -->
<?php
include "content_footer.php";
?>
</div><!-- ./wrapper -->
<!-- Library Scripts -->
<?php
include "bundle_script.php";
?>
</body>
</html>
Gambar 32 Form Tambah Kursus
Source code Form Tambah Kursus
<?php
include "../koneksi.php";
$kd_kursus = $_POST["kd_kursus"];
$nm_kursus = $_POST["nm_kursus"];
if($add = sqlsrv_query($konek,"INSERT INTO kursus (kd_kursus, nm_kursus) VALUES ('$kd_kursus', '$nm_kursus')")){
header("Location: kursus.php");
exit();
}
die ("Terdapat Kesalahan : ". sqlsrv_errors($konek));
?>
Gambar 33 Form Ubah Kursus
Source code Form Ubah Kursus
<?php
include "../koneksi.php";
$kd_kursus = $_POST["kd_kursus"];
$nm_kursus = $_POST["nm_kursus"];
if($edit = sqlsrv_query($konek,"UPDATE kursus SET nm_kursus='$nm_kursus' WHERE kd_kursus='$kd_kursus'")){
header("Location: kursus.php");
exit();
}
die ("Terdapat Kesalahan : ". sqlsrv_errors($konek));
?>
Gambar 34 Form Hapus Kursus
Source code Form Hapus Kursus
<?php
include "../koneksi.php";
$kd_kursus = $_GET["kd_kursus"];
if($delete = sqlsrv_query($konek, "DELETE FROM kursus WHERE kd_kursus='$kd_kursus'")){
header("Location: kursus.php");
exit();
}
die ("Terdapat Kesalahan : ".sqlsrv_errors($konek));
?>
Gambar 35 Laporan Data Kursus
Source code Laporan Data Kursus
<?php
include '../koneksi.php';
require('../assets/pdf/fpdf.php');
$pdf = new FPDF("P","cm","A4");
$pdf->SetMargins(2,1,1);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','B',11);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Laporan Kursus',0,'L');
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Sistem Informasi Akademik',0,'L');
$pdf->SetFont('Arial','B',10);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Lembaga Kursus',0,'L');
$pdf->SetX(4);
$pdf->SetLineWidth(0.1);
$pdf->Line(1,3.2,20,3.2);
$pdf->SetLineWidth(0);
$pdf->ln(1);
$pdf->SetFont('Arial','B',14);
$pdf->Cell(18,0.7,"Kursus",0,10,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(5,0.7,"Dicetak pada : ".date("D-d/m/Y"),0,0,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(2, 0.8, 'Kode', 1, 0, 'C');
$pdf->Cell(5, 0.8, 'Kursus', 1, 1, 'C');
$pdf->SetFont('Arial','',10);
$querykursus = sqlsrv_query ($konek, "SELECT * FROM kursus");
if($querykursus == false){
die ("Terdapat Kesalahan : ". sqlsrv_errors($konek));
}
while($kursus = sqlsrv_fetch_array($querykursus)){
$pdf->Cell(2, 0.8, $kursus['kd_kursus'] , 1, 0, 'C');
$pdf->Cell(5, 0.8, $kursus['nm_kursus'] , 1, 1, 'C');
}
$pdf->Output("cetak_kursus.pdf","I");
?>
1.2.6 Form Jadwal
Gambar 36 Form Jadwal
Source code Form Jadwal
<?php
session_start();include "../koneksi.php";include "auth_user.php";
$daftarhari[] = "Senin";$daftarhari[] = "Selasa";$daftarhari[] = "Rabu";$daftarhari[] = "Kamis";$daftarhari[] = "Jumat";$daftarhari[] = "Sabtu";$daftarhari[] = "Ahad";
?><!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>SIA Lembaga Kursus</title> <!-- Library CSS --> <?php include "bundle_css.php"; ?> </head> <body class="sidebar-mini wysihtml5-supported skin-green-light"> <div class="wrapper"> <?php include 'content_header.php'; ?> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- Sidebar user panel --> <div class="user-panel"> <div class="pull-left image"> <p></p> </div> </div><!-- sidebar menu: : style can be found in sidebar.less --> <ul class="sidebar-menu"> <li class="header"><h4><b><center>Menu Panel</center></b></h4></li> <li class="active"><a href="index.php"><i class="fa fa-home"></i><span>Dashboard</span></a></li> <li><a href="pengajar.php"><i class="fa fa-user"></i><span>Pengajar</span></a></li> <li><a href="peserta.php"><i class="fa fa-users"></i><span>Peserta</span></a></li> <li><a href="ruangan.php"><i class="fa fa-columns"></i><span>Ruangan</span></a></li> <li><a href="kursus.php"><i class="fa fa-book"></i><span>Kursus</span></a></li> <li><a href="jadwal.php"><i class="fa fa-calendar"></i><span>Jadwal</span></a></li> <li><a href="user.php"><i class="fa fa-user-circle-o"></i><span>User</span></a></li> <li><a href="about.php"><i class="fa fa-info-circle"></i><span>Tentang Aplikasi</span></a></li> </ul> </section> <!-- /.sidebar --> </aside>
<!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Jadwal </h1> <ol class="breadcrumb"> <li><i class="fa fa-calendar"></i> Jadwal</li> </ol> </section>
<!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header">
</div><!-- /.box-header --> <div class="box-body"> <a href="#"><button class="btn btn-success" type="button" data-target="#ModalAdd" data-toggle="modal"><i class="fa fa-plus"></i> Add</button></a> <a style="margin-bottom:10px" href="cetak_dt_jadwal.php" target="_blank" class="btn btn-default pull-right"><span class='glyphicon glyphicon-print'></span> Cetak</a> <br></br> <table id="data" class="table table-bordered table-striped table-scalable"> <?php include "dt_jadwal.php"; ?> </table> </div><!-- /.box-body --> </div><!-- /.box --> </div><!-- /.col --> </div><!-- /.row --> </section><!-- /.content -->
<!-- Modal Popup Dosen --> <div id="ModalAdd" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Tambah Jadwal</h4> </div> <div class="modal-body"> <form action="jadwal_add.php" name="modal_popup" enctype="multipart/form-data" method="post"> <div class="form-group"> <label>Kode Jadwal</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-book"></i> </div> <input name="kd_jadwal" type="text" class="form-control" placeholder="Kode Jadwal"/> </div> </div> <div class="form-group"> <label>Pengajar</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-user"></i> </div> <select name="kd_pengajar" class="form-control"> <?php
$querypengajar = sqlsrv_query($konek, "SELECT * FROM pengajar"); if ($querypengajar == false){ die ("Terdapat Kesalahan : ". sqlsrv_errors($konek)); } while ($pengajar = sqlsrv_fetch_array($querypengajar)){ echo "<option value='$pengajar[kd_pengajar]'>$pengajar[nm_pengajar]</option>"; } ?> </select> </div> </div> <div class="form-group"> <label>Kursus</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-book"></i> </div> <select name="kd_kursus" class="form-control"> <?php
$querykursus = sqlsrv_query ($konek, "SELECT * FROM kursus"); if ($querykursus == false){ die ("Terdapat Kesalahan : ". sqlsrv_errors($konek)); } while ($kursus = sqlsrv_fetch_array($querykursus)){ echo "<option value='$kursus[kd_kursus]'>$kursus[nm_kursus]</option>"; } ?> </select> </div> </div> <div class="form-group"> <label>Ruangan</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-columns"></i> </div> <select name="kd_ruangan" class="form-control"> <?php
$queryruang = sqlsrv_query($konek, "SELECT * FROM ruangan"); if($queryruang == false){ die ("Terdapat Kesalahan : ". sqlsrv_errors($konek)); } while ($ruang = sqlsrv_fetch_array($queryruang)){ echo "<option value='$ruang[kd_ruangan]'>$ruang[nm_ruangan]</option>"; } ?> </select> </div> </div> <div class="form-group"> <label>Hari</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div> <select name="hari" class="form-control"> <?php for($hari=0; $hari<count($daftarhari); $hari++) { echo "<option value='$daftarhari[$hari]'>$daftarhari[$hari]</option>"; } ?> </select> </div> </div> <div class="form-group"> <label>Jam Mulai</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-clock-o"></i> </div> <input id="Jam_Mulai" name="Jam_Mulai" type="text" class="form-control" placeholder="Jam Mulai"> </div> </div> <div class="form-group"> <label>Jam Selesai</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-clock-o"></i> </div> <input id="Jam_Selesai" name="Jam_Selesai" type="text" class="form-control" placeholder="Jam Selesai"> </div> </div> <div class="modal-footer"> <button class="btn btn-success" type="submit"> Add </button> <button type="reset" class="btn btn-danger" data-dismiss="modal" aria-hidden="true"> Cancel </button> </div> </form> </div> </div> </div> </div>
<!-- Modal Popup Dosen Edit --> <div id="ModalEditJadwal" class="modal fade" tabindex="-1" role="dialog"></div>
<!-- Modal Popup untuk delete--> <div class="modal fade" id="modal_delete"> <div class="modal-dialog"> <div class="modal-content" style="margin-top:100px;"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" style="text-align:center;">Are you sure to delete this information ?</h4> </div> <div class="modal-footer" style="margin:0px; border-top:0px; text-align:center;"> <a href="#" class="btn btn-danger" id="delete_link">Delete</a> <button type="button" class="btn btn-success" data-dismiss="modal">Cancel</button> </div> </div> </div> </div>
</div><!-- /.content-wrapper --> <?php include "content_footer.php"; ?> </div><!-- ./wrapper --> <!-- Library Scripts --> <?php include "bundle_script.php"; ?> </body></html>
session_start();include "../koneksi.php";include "auth_user.php";
$daftarhari[] = "Senin";$daftarhari[] = "Selasa";$daftarhari[] = "Rabu";$daftarhari[] = "Kamis";$daftarhari[] = "Jumat";$daftarhari[] = "Sabtu";$daftarhari[] = "Ahad";
?><!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>SIA Lembaga Kursus</title> <!-- Library CSS --> <?php include "bundle_css.php"; ?> </head> <body class="sidebar-mini wysihtml5-supported skin-green-light"> <div class="wrapper"> <?php include 'content_header.php'; ?> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- Sidebar user panel --> <div class="user-panel"> <div class="pull-left image"> <p></p> </div> </div><!-- sidebar menu: : style can be found in sidebar.less --> <ul class="sidebar-menu"> <li class="header"><h4><b><center>Menu Panel</center></b></h4></li> <li class="active"><a href="index.php"><i class="fa fa-home"></i><span>Dashboard</span></a></li> <li><a href="pengajar.php"><i class="fa fa-user"></i><span>Pengajar</span></a></li> <li><a href="peserta.php"><i class="fa fa-users"></i><span>Peserta</span></a></li> <li><a href="ruangan.php"><i class="fa fa-columns"></i><span>Ruangan</span></a></li> <li><a href="kursus.php"><i class="fa fa-book"></i><span>Kursus</span></a></li> <li><a href="jadwal.php"><i class="fa fa-calendar"></i><span>Jadwal</span></a></li> <li><a href="user.php"><i class="fa fa-user-circle-o"></i><span>User</span></a></li> <li><a href="about.php"><i class="fa fa-info-circle"></i><span>Tentang Aplikasi</span></a></li> </ul> </section> <!-- /.sidebar --> </aside>
<!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Jadwal </h1> <ol class="breadcrumb"> <li><i class="fa fa-calendar"></i> Jadwal</li> </ol> </section>
<!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header">
</div><!-- /.box-header --> <div class="box-body"> <a href="#"><button class="btn btn-success" type="button" data-target="#ModalAdd" data-toggle="modal"><i class="fa fa-plus"></i> Add</button></a> <a style="margin-bottom:10px" href="cetak_dt_jadwal.php" target="_blank" class="btn btn-default pull-right"><span class='glyphicon glyphicon-print'></span> Cetak</a> <br></br> <table id="data" class="table table-bordered table-striped table-scalable"> <?php include "dt_jadwal.php"; ?> </table> </div><!-- /.box-body --> </div><!-- /.box --> </div><!-- /.col --> </div><!-- /.row --> </section><!-- /.content -->
<!-- Modal Popup Dosen --> <div id="ModalAdd" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Tambah Jadwal</h4> </div> <div class="modal-body"> <form action="jadwal_add.php" name="modal_popup" enctype="multipart/form-data" method="post"> <div class="form-group"> <label>Kode Jadwal</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-book"></i> </div> <input name="kd_jadwal" type="text" class="form-control" placeholder="Kode Jadwal"/> </div> </div> <div class="form-group"> <label>Pengajar</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-user"></i> </div> <select name="kd_pengajar" class="form-control"> <?php
$querypengajar = sqlsrv_query($konek, "SELECT * FROM pengajar"); if ($querypengajar == false){ die ("Terdapat Kesalahan : ". sqlsrv_errors($konek)); } while ($pengajar = sqlsrv_fetch_array($querypengajar)){ echo "<option value='$pengajar[kd_pengajar]'>$pengajar[nm_pengajar]</option>"; } ?> </select> </div> </div> <div class="form-group"> <label>Kursus</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-book"></i> </div> <select name="kd_kursus" class="form-control"> <?php
$querykursus = sqlsrv_query ($konek, "SELECT * FROM kursus"); if ($querykursus == false){ die ("Terdapat Kesalahan : ". sqlsrv_errors($konek)); } while ($kursus = sqlsrv_fetch_array($querykursus)){ echo "<option value='$kursus[kd_kursus]'>$kursus[nm_kursus]</option>"; } ?> </select> </div> </div> <div class="form-group"> <label>Ruangan</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-columns"></i> </div> <select name="kd_ruangan" class="form-control"> <?php
$queryruang = sqlsrv_query($konek, "SELECT * FROM ruangan"); if($queryruang == false){ die ("Terdapat Kesalahan : ". sqlsrv_errors($konek)); } while ($ruang = sqlsrv_fetch_array($queryruang)){ echo "<option value='$ruang[kd_ruangan]'>$ruang[nm_ruangan]</option>"; } ?> </select> </div> </div> <div class="form-group"> <label>Hari</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div> <select name="hari" class="form-control"> <?php for($hari=0; $hari<count($daftarhari); $hari++) { echo "<option value='$daftarhari[$hari]'>$daftarhari[$hari]</option>"; } ?> </select> </div> </div> <div class="form-group"> <label>Jam Mulai</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-clock-o"></i> </div> <input id="Jam_Mulai" name="Jam_Mulai" type="text" class="form-control" placeholder="Jam Mulai"> </div> </div> <div class="form-group"> <label>Jam Selesai</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-clock-o"></i> </div> <input id="Jam_Selesai" name="Jam_Selesai" type="text" class="form-control" placeholder="Jam Selesai"> </div> </div> <div class="modal-footer"> <button class="btn btn-success" type="submit"> Add </button> <button type="reset" class="btn btn-danger" data-dismiss="modal" aria-hidden="true"> Cancel </button> </div> </form> </div> </div> </div> </div>
<!-- Modal Popup Dosen Edit --> <div id="ModalEditJadwal" class="modal fade" tabindex="-1" role="dialog"></div>
<!-- Modal Popup untuk delete--> <div class="modal fade" id="modal_delete"> <div class="modal-dialog"> <div class="modal-content" style="margin-top:100px;"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" style="text-align:center;">Are you sure to delete this information ?</h4> </div> <div class="modal-footer" style="margin:0px; border-top:0px; text-align:center;"> <a href="#" class="btn btn-danger" id="delete_link">Delete</a> <button type="button" class="btn btn-success" data-dismiss="modal">Cancel</button> </div> </div> </div> </div>
</div><!-- /.content-wrapper --> <?php include "content_footer.php"; ?> </div><!-- ./wrapper --> <!-- Library Scripts --> <?php include "bundle_script.php"; ?> </body></html>
Gambar 37 Form Tambah Jadwal
Source Code Form Tambah Jadwal
<?php
include "../koneksi.php";
$kd_jadwal = $_POST["kd_jadwal"];
$kd_kursus = $_POST["kd_kursus"];
$kd_pengajar = $_POST["kd_pengajar"];
$kd_ruangan = $_POST["kd_ruangan"];
$hari = $_POST["hari"];
$Jam_Mulai = $_POST["Jam_Mulai"];
$Jam_Selesai = $_POST["Jam_Selesai"];
$jam = $Jam_Mulai."-".$Jam_Selesai;
if($add = sqlsrv_query($konek, "INSERT INTO jadwal(kd_jadwal, kd_kursus, kd_pengajar, kd_ruangan, hari, jam) VALUES ('$kd_jadwal', '$kd_kursus', '$kd_pengajar', '$kd_ruangan', '$hari', '$jam')")){
header("Location: jadwal.php");
exit();
}
die ("Terdapat Kesalahan : ". sqlsrv_errors($konek));
?>
Gambar 38 Form Edit Jadwal
Source Code Form Edit Jadwal
<?php
include "../koneksi.php";
$kd_jadwal = $_POST["kd_jadwal"];
$kd_pengajar = $_POST["kd_pengajar"];
$kd_kursus = $_POST["kd_kursus"];
$kd_ruangan = $_POST["kd_ruangan"];
$hari = $_POST["hari"];
$Jam_Mulai = $_POST["Jam_Mulai"];
$Jam_Selesai = $_POST["Jam_Selesai"];
$jam = $Jam_Mulai."-".$Jam_Selesai;
if($edit = sqlsrv_query($konek, "UPDATE jadwal SET kd_pengajar='$kd_pengajar', kd_kursus='$kd_kursus', kd_ruangan='$kd_ruangan', hari='$hari', jam='$jam' WHERE kd_jadwal='$kd_jadwal'")){
header("Location: jadwal.php");
exit();
}
die("Terdapat Kesalahan : ". sqlsrv_errors($konek));
?>
Gambar 39 Form Hapus Jadwal
Source Code Form Hapus Jadwal
<?php
include "../koneksi.php";
$kd_jadwal = $_GET["kd_jadwal"];
if($delete = sqlsrv_query($konek, "DELETE FROM jadwal WHERE kd_jadwal='$kd_jadwal'")){
header("Location: jadwal.php");
exit();
}
die ("Terdapat Kesalahan : ". sqlsrv_errors($konek));
?>
Gambar 40 Laporan Data Jadwal
Source Code Laporan Data Jadwal
<?php
include '../koneksi.php';
require('../assets/pdf/fpdf.php');
$pdf = new FPDF("L","cm","A4");
$pdf->SetMargins(2,1,1);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','B',11);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Laporan Jadwal',0,'L');
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Sistem Informasi Akademik',0,'L');
$pdf->SetFont('Arial','B',10);
$pdf->SetX(4);
$pdf->MultiCell(19.5,0.5,'Lembaga Kursus',0,'L');
$pdf->SetX(4);
$pdf->SetLineWidth(0.1);
$pdf->Line(1,3.2,28.5,3.2);
$pdf->SetLineWidth(0);
$pdf->ln(1);
$pdf->SetFont('Arial','B',14);
$pdf->Cell(25.5,0.7,"Jadwal",0,10,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(5,0.7,"Dicetak pada : ".date("D-d/m/Y"),0,0,'C');
$pdf->ln(1);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(5, 0.8, 'Kursus', 1, 0, 'C');
$pdf->Cell(5, 0.8, 'Pengajar', 1, 0, 'C');
$pdf->Cell(5, 0.8, 'Ruangan', 1, 0, 'C');
$pdf->Cell(4, 0.8, 'Hari', 1, 0, 'C');
$pdf->Cell(4, 0.8, 'Jam', 1, 1, 'C');
$pdf->SetFont('Arial','',10);
$queryjadwal = sqlsrv_query ($konek, "SELECT kd_jadwal, kursus.nm_kursus, pengajar.nm_pengajar, ruangan.nm_ruangan, hari, jam FROM jadwal INNER JOIN kursus ON kursus.kd_kursus=jadwal.kd_kursus INNER JOIN pengajar ON pengajar.kd_pengajar=jadwal.kd_pengajar INNER JOIN ruangan ON ruangan.kd_ruangan=jadwal.kd_ruangan ORDER BY hari DESC");
if($queryjadwal == false){
die ("Terjadi Kesalahan : ". sqlsrv_errors($konek));
}
while ($jadwal = sqlsrv_fetch_array($queryjadwal)){
$pdf->Cell(5, 0.8, $jadwal['nm_kursus'] , 1, 0, 'C');
$pdf->Cell(5, 0.8, $jadwal['nm_pengajar'],1, 0, 'C');
$pdf->Cell(5, 0.8, $jadwal['nm_ruangan'], 1, 0,'C');
$pdf->Cell(4, 0.8, $jadwal['hari'],1, 0, 'C');
$pdf->Cell(4, 0.8, $jadwal['jam'], 1, 1,'C');
}
$pdf->Output("cetak_jadwal.pdf","I");
?>
Aplikasi lengkapnya dapat diunduh di sini.
Anggota Kelompok:
Erlina Nofianti : 201553006
Iman Ardhi Prabowo : 201553013
Nurul Mashfufah : 201553041
Rita Suryana : 201553050
bisa kirim sourcecode dan database nya ke email gan ? untuk bahan pembelajaran thanks.
ReplyDeletejimmipurnama97@gmail.com
sama
Deleteiwan_laya@yahoo.co.id
iya kak, sama
Deletevikimif05@gmail.com
robysetiawan2409@gmail.com tolong kirimin jg gan buat belajar
ReplyDeleteIlham.skanpel2@gmail.com tolong kirim juga gan buat belajar
ReplyDeleteBang, minta tolong kirim source DB nya buat bahan belajar
ReplyDeletejeffniazegla@gmail.com
Deletefirmanusn@gmail.com tolong yah gan mau belajar pemrograman web juga
ReplyDeleteBang boleh mintak sourcodenya gk
ReplyDeleteLambangh07@gmail.com