Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Uas Sia

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

1.

Mode Login

2. Login Sebagai Mahasiswa


3. Tampilan Menu Utama atau Dashboard Mahasiswa

4. Data Pribadi
5. Edit Akun

6. KRS Mahasiswa
7. Error Handling Custom

8. Rangkuman Nilai
9. Error Handlin2

10. Login Sebaai Dosen


11. Menu Utama SIA dosen

12. Insert Data Niai


13. View Nilai

14. Edit Nilai


15. View User Dosen

16. Edit User


Source Code :

1.Login Mode.php
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<title>UAS SIA</title>
<link rel="stylesheet" type="text/css" href="login_style.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/c
ss/all.css">
</head>

<body>
<div class="container">

<form class="toggle">

<input type="radio" id="but1" name="but" />


<label for="but1"><a href="login_mahasiswa.php">Mahasiswa</a></lab
el>

<input type="radio" id="but2" name="but" />


<label for="but2"><a href="login_dosen.php"> Dosen</a> </label>

<div id="flap"><span class="content"></span></div>

</form>
</div>

<script>
let st = {};

st.flap = document.querySelector("#flap");
st.toggle = document.querySelector(".toggle");

st.but1 = document.querySelector("#but1");
st.but2 = document.querySelector("#but2");

st.flap.addEventListener("transitionend", () => {

if (st.but1.checked) {
st.toggle.style.transform = "rotateY(-15deg)";
setTimeout(() => st.toggle.style.transform = "", 400);
} else {
st.toggle.style.transform = "rotateY(15deg)";
setTimeout(() => st.toggle.style.transform = "", 400)
}

})

st.clickHandler = (e) => {


if (e.target.tagName === "LABEL") {
setTimeout(() => {
st.flap.children[0].textContent = e.target.textContent;
}, 250);
}
}

document.addEventListener("DOMContentLoaded", () => {
st.flap.children[0].textContent = st.but2.nextElementSibling.textC
ontent;
});
document.addEventListener("click", (e) => st.clickHandler(e))
</script>

</body>

</html>

2.cssnya
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
font-family: sans-serif;
background: #262626;
}

.container {
perspective: 800px;
}

.toggle {
position: relative;
border: solid 6px #8a3a00;
border-radius: 55px;
transition: transform cubic-bezier(0, 0, 0.30, 2) .4s;
transform-style: preserve-3d;
perspective: 800px;
}

.toggle>input[type="radio"] {
display: none;
}

.toggle>#but1:checked~#flap {
transform: rotateY(-180deg);
}

.toggle>#but1:checked~#flap>.content {
transform: rotateY(-180deg)
}

.toggle>#but2:checked~#flap {
transform: rotateY(0deg);
}

.toggle>label {
display: inline-block;
min-width: 170px;
padding: 30px;
font-size: 30px;
text-align: center;
color: #040d8f;
cursor: pointer;
}

.toggle>label,
.toggle>#flap {
font-weight: bold;
text-transform: capitalize;
color: white;
}

.toggle>#flap {
position: absolute;
top: calc(0px - 6px);
left: 50%;
height: calc(100% + 12px);
width: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
background: #8a3a00;
border-top-right-radius: 55px;
border-bottom-right-radius: 55px;
transform-style: preserve-3d;
transform-origin: left;
transition: transform cubic-bezier(0.4, 0, 0.2, 1) .5s;
}

.toggle>#flap>.content {
color: #262626;
transition: transform 0s linear .25s;
transform-style: preserve-3d;
}

3.Login Mahasiswa
<?php

session_start();
include("includes/db.php");

?>

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width-device-width,initial-scale=1">
<title>UAS SIA</title>
<link rel="stylesheet" type="text/css" href="JS CLASS - Login System.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/c
ss/all.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3
.1/css/bootstrap.min.css">
</head>
<style>
body {
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
background: #000;
}

.login-form {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 400px;
padding: 10px 10px;
background: rgba(255, 255, 255, 1);

.login-form h2 {
margin: 0 0 40px;
padding: 0;
text-align: center;
}

.login-form .form-input {
position: relative;
margin: 20px 0;
}

.login-form .form-input input {


outline: none;
height: 40px;
padding: 10px;
box-sizing: border-box;
width: 100%;
border: 1px solid rgba(0, 0, 0, .8);
background: transparent;
font-size: 18px;
}

.login-form .form-input input[type="submit"] {


background: #e91e63;
color: #fff;
border: none;
cursor: pointer;
text-transform: uppercase;
}

.login-form .form-input input[type="submit"]:hover {


background: #0090ff;
}

.login-form .forget {
display: block;
margin-top: 30px;
color: #000;
font-weight: bold;
}
</style>
<body data-vide-bg="loginbg">
<div class="login-form">
<!-- container awal -->
<form action="" class="form-login" method="post">
<!-- form-login awal -->

<h2 class="form-login-heading"> Login Mahasiswa </h2>


<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-
user"></i></span>
</div>
<input type="text" class="form-
control" id="username" name="nama" placeholder="Username" aria-
label="Username" aria-describedby="basic-addon1">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-lock-
open"></i></span>
</div>
<input type="password" class="form-
control" id="password" name="passnya" placeholder="Password" aria-
label="Username" aria-describedby="basic-addon1">
</div>

<div class="form-input">
<button type="submit" class="btn btn-lg btn-primary btn-
block" name="admin_login">
<!-- btn btn-lg btn-primary btn-block awal -->

Login

</button><!-- btn btn-lg btn-primary btn-block akhir -->


</div>

</form><!-- form-login akhir -->


</div><!-- container akhir -->

<script src="js/jquery/dist/jquery.min.js"></script>
<script src="js/Vide-master/dist/jquery.vide.min.js"></script>
</body>

</html>

<?php

if (isset($_POST['admin_login'])) {
$mahasiswa = mysqli_real_escape_string($con, $_POST['nama']);
$pass = mysqli_real_escape_string($con, $_POST['passnya']);
$get_mahasiswa = "select * from akun where Nama='$mahasiswa' AND Password=
'$pass'";
$run_mahasiswa = mysqli_query($con, $get_mahasiswa);
$count = mysqli_num_rows($run_mahasiswa);
if ($count == 1) {
$_SESSION['Nama'] = $mahasiswa;
echo "<script>alert('Selamat Datang Di Web Aplikasi SIA')</script>";
echo "<script>window.open('index.php?dashboard','_self')</script>";
} else {
echo "<script>alert('Email atau Password anda Salah !')</script>";
}
}

?>

4.Login Dosen
<?php

session_start();
include("includes/db.php");

?>

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width-device-width,initial-scale=1">
<title>UAS SIA</title>
<link rel="stylesheet" type="text/css" href="JS CLASS - Login System.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/c
ss/all.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3
.1/css/bootstrap.min.css">
</head>
<style>
body {
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
background: #000;
}
.login-form {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 400px;
padding: 10px 10px;
background: rgba(255, 255, 255, 1);

.login-form h2 {
margin: 0 0 40px;
padding: 0;
text-align: center;
}

.login-form .form-input {
position: relative;
margin: 20px 0;
}

.login-form .form-input input {


outline: none;
height: 40px;
padding: 10px;
box-sizing: border-box;
width: 100%;
border: 1px solid rgba(0, 0, 0, .8);
background: transparent;
font-size: 18px;
}

.login-form .form-input input[type="submit"] {


background: #e91e63;
color: #fff;
border: none;
cursor: pointer;
text-transform: uppercase;
}

.login-form .form-input input[type="submit"]:hover {


background: #0090ff;
}

.login-form .forget {
display: block;
margin-top: 30px;
color: #000;
font-weight: bold;
}
</style>

<body data-vide-bg="loginbg">
<div class="login-form">
<!-- container awal -->
<form action="" class="form-login" method="post">
<!-- form-login awal -->

<h2 class="form-login-heading"> Login Dosen </h2>


<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-
user"></i></span>
</div>
<input type="text" class="form-
control" id="username" name="user" placeholder="Username" aria-
label="Username" aria-describedby="basic-addon1">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-lock-
open"></i></span>
</div>
<input type="password" class="form-
control" id="password" name="pass" placeholder="Password" aria-
label="Username" aria-describedby="basic-addon1">
</div>

<div class="form-input">
<button type="submit" class="btn btn-lg btn-primary btn-
block" name="dosen_login">
<!-- btn btn-lg btn-primary btn-block awal -->

Login

</button><!-- btn btn-lg btn-primary btn-block akhir -->


</div>

</form><!-- form-login akhir -->


</div><!-- container akhir -->

<script src="js/jquery/dist/jquery.min.js"></script>
<script src="js/Vide-master/dist/jquery.vide.min.js"></script>
</body>
</html>

<?php

if (isset($_POST['dosen_login'])) {

$username = mysqli_real_escape_string($con, $_POST['user']);

$password = mysqli_real_escape_string($con, $_POST['pass']);

$get_dosen = "select * from dosen where Username='$username' AND password=


'$password'";

$run_dosen = mysqli_query($con, $get_dosen);

$count = mysqli_num_rows($run_dosen);

if ($count == 1) {

$_SESSION['Username'] = $username;

echo "<script>alert('Selamat Datang Di Web Aplikasi SIA')</script>";

echo "<script>window.open('menu_utama.php?dashboard_dosen','_self')</s
cript>";
} else {

echo "<script>alert('Email atau Password anda Salah !')</script>";


}
}

?>
5.Index.php untuk link mahasiswa
<?php

session_start();
include("includes/db.php");

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

echo "<script>window.open('login_mode.php','_self')</script>";
} else {

$session_mahasiswa = $_SESSION['Nama'];
$get_mahasiswa = "select * from akun where Nama='$session_mahasiswa'";
$run_mahasiswa = mysqli_query($con, $get_mahasiswa);
$baris = mysqli_fetch_array($run_mahasiswa);
$nim = $baris['nim'];
$mahasiswa = $baris['Nama'];
$pass = $baris['password'];

?>

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1">
<title>UAS SIA</title>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<script src="js/jquery.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="font-awesome-4.7.0/css/font-
awesome.min.css">
<link rel="stylesheet" href="css/style.css">
</head>

<body>

<div id="wrapper">
<!-- #wrapper awal -->
<?php include("includes/sidebar.php"); ?>

<div id="page-wrapper">
<!-- #page-wrapper awal -->
<div class="container-fluid">
<!-- container-fluid awal -->
<?php

if (isset($_GET['dashboard'])) {

include("dashboard.php");
}
if (isset($_GET['view_mahasiswa'])) {

include("view_mahasiswa.php");
}
if (isset($_GET['delete_mahasiswa']))
{

include("delete_mahasiswa.php"
);
}
if (isset($_GET['edit_mahasiswa'])) {

include("edit_mahasiswa.php");
}
if (isset($_GET['view_krs_mhs'])) {

include("view_krs_mhs.php");
}
if (isset($_GET['view_jadwal_kuliah'])
) {

include("view_jadwal_kuliah.ph
p");
}
if (isset($_GET['view_nilai_mhs'])) {

include("view_nilai_mhs.php");
}
?>

</div><!-- container-fluid akhir -->


</div><!-- #page-wrapper akhir -->
</div><!-- wrapper akhir -->

<script src="js/jquery-331.min.js"></script>
<script src="js/bootstrap-337.min.js"></script>
</body>

</html>

<?php } ?>
6.menu_utama.php untuk link dosen

<?php

session_start();
include("includes/db.php");

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

echo "<script>window.open('login_mode.php','_self')</script>";
} else {

$dosen_session = $_SESSION['Username'];

$get_dosen = "select * from dosen where Username='$dosen_session'";

$run_dosen = mysqli_query($con, $get_dosen);

$baris = mysqli_fetch_array($run_dosen);

$id_dosen = $baris['id_dosen'];

$nama_dosen = $baris['Username'];

$email_dosen = $baris['password'];

?>

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>UAS SIA</title>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<script src="js/jquery.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="font-awesome-4.7.0/css/font-
awesome.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div id="wrapper">
<!-- #wrapper awal -->
<?php include("includes/sidebar_dosen.php"); ?>
<div id="page-wrapper">
<!-- #page-wrapper awal -->
<div class="container-fluid">
<!-- container-fluid awal -->
<?php

if (isset($_GET['dashboard_dosen'])) {

include("dashboard_dosen.php");
}
if (isset($_GET['insert_data_nilai'])) {

include("insert_data_nilai.php");
}
if (isset($_GET['delete_data_nilai'])) {

include("delete_data_nilai.php");
}
if (isset($_GET['edit_data_nilai'])) {

include("edit_data_nilai.php");
}
if (isset($_GET['view_nilai'])) {

include("view_nilai.php");
}
if (isset($_GET['view_users'])) {

include("view_users.php");
}
if (isset($_GET['edit_dosen'])) {

include("edit_dosen.php");
}
if (isset($_GET['delete_dosen'])) {

include("delete_dosen.php");
}
?>
</div><!-- container-fluid akhir -->
</div><!-- #page-wrapper akhir -->
</div><!-- wrapper akhir -->
<script src="js/jquery-331.min.js"></script>
<script src="js/bootstrap-337.min.js"></script>
</body>
</html>
<?php } ?>
7.Sidebar.php untuk Mahasiswa

<style>
.text-nama {
font-size: 30px;
transform: translate(-10%, -10%);
text-align: center;
color: black;
}

.top-nav li a {
color: #000000;
font-style: italic;
font-weight: bold;
margin-top: 17px;
}

.top-nav li a:hover {
background: black;
color: white;
}

nav {
background: linear-
gradient(to bottom, #2b62a1 0%, rgb(0, 247, 255) 100%);
}

#text-head {
font-weight: bold;
color: black;
font-family: Verdana, Geneva, Tahoma, sans-serif;
margin-top: 17px;
}

.side-nav {
background: linear-
gradient(to bottom, #2b62a1 0%, rgb(0, 247, 255) 100%);
margin-top: 19px;
}

.side-nav li a {
font-size: 17px;
font-weight: 700;
color: black;
margin: 1px;
}
.side-nav li ul li a {
color: black;
font-size: 14px;
font-weight: bold;

.side-nav li ul li a:hover {
font-size: 17px;
font-weight: 700;
color: whitesmoke;
background: black;

.side-nav li a:hover {
color: white;
}

.side-nav li i {
font-size: 20px;
font-weight: 900;
color: #d1ff06;
margin-right: 7px;
}

.navbar-right {
margin-right: 10px;
font-size: 20px;
}

.navbar-right:hover {
background: #d1ff06;
}

.col-md-1 {
left: 0%;
margin-top: 10px;
margin-bottom: 10px;
}

.col-md-3 {
right: 4%;
margin-top: 17px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: black;
}
.col-md-3 h4 {
font-weight: bold;
font-style: italic;
font-size: 20px;
}

.col-md-5 {
margin-top: 15px;
}
</style>
<nav class="navbar navbar-inverse navbar-fixed-top">
<!-- navbar navbar-inverse navbar-fixed-top awal -->
<div class="navbar-header">
<!-- navbar-header awal -->

<button type="button" class="navbar-toggle" data-


toggle="collapse" data-target=".navbar-ex1-collapse">
<!-- navbar-toggle awal -->
<span class="sr-only">Toggle Navigation</span>

<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button><!-- navbar-toggle akhir -->

</div><!-- navbar-header akhir -->


<div class="col-md-1"><img claas="icon" src="admin-
images/icon.png" alt=""></div>
<div class="col-md-3">
<h4>Universitas Pamulang</h4>
</div>
<div class="col-md-5">
<h4 id="text-head" align="center">SISTEM INFORMASI AKADEMIK</h4>
</div>
<ul class="nav navbar-right top-nav">
<!-- nav navbar-right top-nav awal -->
<li>
<!-- li awal -->
<a href="logout.php">
<!-- a href awal -->
<i class="fa fa-fw fa-power-off"></i> LogOut
</a><!-- a href akhir -->
</li><!-- li akhir -->
</ul><!-- nav navbar-right top-nav akhir -->

<div class="collapse navbar-collapse navbar-ex1-collapse">


<!-- collapse navbar-collapse navbar-ex1-collapse awal -->
<ul class="nav side-nav">
<!-- nav navbar-nav side-nav awal -->
<?php
$akun_session = $_SESSION['Nama'];
$get_akun = "select * from akun where Nama='$akun_session'";
$run_akun = mysqli_query($con, $get_akun);
$row_akun = mysqli_fetch_array($run_akun);
$user_id = $row_akun['nim'];
$username = $row_akun['Nama'];
$user_pass = $row_akun['password'];
$image_akun = $row_akun['Photo'];
if (!isset($_SESSION['Nama'])) {

echo "<script>window.open('login_mahasiswa.php','_self')</scri
pt>";
} else {
echo "
<img src='admin-images/$image_akun' class='img-responsive'>
<br>
<h3 class='text-nama' align='left'>
$username
</h3>
<br>
";
?>
<li>
<!-- li awal -->
<a href="index.php?dashboard">
<!-- a href awal -->

<i class="fa fa-fw fa-dashboard"></i> Dashboard


</a><!-- a href akhir -->
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="index.php?view_mahasiswa">
<!-- a href awal -->
<i class="fa fa-fw fa-user"></i> Data Pribadi
</a><!-- a href akhir -->
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="#" data-toggle="collapse" data-
target="#products">
<!-- a href awal -->

<i class="fa fa-fw fa-edit"></i> Akademik


<i class="fa fa-fw fa-caret-down"></i>
</a><!-- a href akhir -->

<ul id="products" class="collapse">


<!-- collapse awal -->
<li>
<!-- li awal -->
<a href="index.php?view_krs_mhs"> KRS </a>
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="index.php?view_jadwal_kuliah"> Jadwal Kul
iah </a>
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="index.php?view_nilai_mhs"> Rangkuman Nila
i </a>
</li><!-- li akhir -->
</ul><!-- collapse akhir -->

</li><!-- li akhir -->


<li>
<!-- li awal -->
<a href="Keuangan.php">
<!-- a href awal -->
<i class="fa fa-fw fa-money"></i> Keuangan
</a><!-- a href akhir -->
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="dokumen.php">
<!-- a href awal -->
<i class="fa fa-fw fa-book"></i> Dokumen
</a><!-- a href akhir -->
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="logout.php">
<!-- a href awal -->
<i class="fa fa-fw fa-power-off"></i> Keluar
</a><!-- a href akhir -->

</li><!-- li akhir -->


</ul><!-- nav navbar-nav side-nav akhir -->
</div><!-- collapse navbar-collapse navbar-ex1-collapse akhir -->
</nav><!-- navbar navbar-inverse navbar-fixed-top akhir -->
<?php } ?>
7.Sidebar_dosen.php untuk Dosen

<style>
.text-nama {
font-size: 30px;
transform: translate(-10%, -10%);
text-align: center;
color: black;
}

.text-matkul {
font-size: 12px;
transform: translate(-10%, -10%);
text-align: center;
color: black;
}

.top-nav li a {
color: #000000;
font-style: italic;
font-weight: bold;
margin-top: 17px;
}

.top-nav li a:hover {
background: black;
color: white;
}

nav {
background: linear-
gradient(to bottom, #2b62a1 0%, rgb(0, 247, 255) 100%);
}

#text-head {
font-weight: bold;
color: black;
font-family: Verdana, Geneva, Tahoma, sans-serif;
margin-top: 17px;
}

.side-nav {
background: linear-
gradient(to bottom, #2b62a1 0%, rgb(0, 247, 255) 100%);
margin-top: 19px;
}
.side-nav li a {
font-size: 17px;
font-weight: 700;
color: black;
margin: 1px;
}

.side-nav li ul li a {
color: black;
font-size: 14px;
font-weight: bold;

.side-nav li ul li a:hover {
font-size: 17px;
font-weight: 700;
color: whitesmoke;
background: black;

.side-nav li a:hover {
color: white;
}

.side-nav li i {
font-size: 20px;
font-weight: 900;
color: #d1ff06;
margin-right: 7px;
}

.navbar-right {
margin-right: 10px;
font-size: 20px;
}

.navbar-right:hover {
background: #d1ff06;
}
.col-md-1 {
left: 0%;
margin-top: 10px;
margin-bottom: 10px;
}
.col-md-3 {
right: 4%;
margin-top: 17px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: black;
}

.col-md-3 h4 {
font-weight: bold;
font-style: italic;
font-size: 20px;
}

.col-md-5 {
margin-top: 15px;
}
</style>
<nav class="navbar navbar-inverse navbar-fixed-top">
<!-- navbar navbar-inverse navbar-fixed-top awal -->
<div class="navbar-header">
<!-- navbar-header awal -->

<button type="button" class="navbar-toggle" data-


toggle="collapse" data-target=".navbar-ex1-collapse">
<!-- navbar-toggle awal -->
<span class="sr-only">Toggle Navigation</span>

<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button><!-- navbar-toggle akhir -->

</div><!-- navbar-header akhir -->


<div class="col-md-1"><img claas="icon" src="admin-
images/icon.png" alt=""></div>
<div class="col-md-3">
<h4>Universitas Pamulang</h4>
</div>
<div class="col-md-5">
<h4 id="text-head" align="center">SISTEM INFORMASI AKADEMIK</h4>
</div>

<ul class="nav navbar-right top-nav">


<!-- nav navbar-right top-nav awal -->
<li>
<!-- li awal -->
<a href="logout.php">
<!-- a href awal -->
<i class="fa fa-fw fa-power-off"></i> LogOut
</a><!-- a href akhir -->
</li><!-- li akhir -->
</ul><!-- nav navbar-right top-nav akhir -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<!-- collapse navbar-collapse navbar-ex1-collapse awal -->
<ul class="nav side-nav">
<!-- nav navbar-nav side-nav awal -->
<?php
$dosen_session = $_SESSION['Username'];
$get_dosen = "select * from dosen where Username='$dosen_session'"
;
$run_dosen = mysqli_query($con, $get_dosen);
$row_dosen = mysqli_fetch_array($run_dosen);
$user_id = $row_dosen['id_dosen'];
$user_image = $row_dosen['Photo_Profile'];
$user_name = $row_dosen['Username'];
$matkul = $row_dosen['Matkul'];
if (!isset($_SESSION['Username'])) {
echo "<script>window.open('login_dosen.php','_self')</script>"
;
} else {
echo "
<img src='admin-images/$user_image' class='img-responsive'>
<br>
<h3 class='text-nama' align='left'>
$user_name
</h3>
<p class='text-matkul' align='left'>
$matkul
</p>
<br>
";
?>
<li>
<!-- li awal -->
<a href="menu_utama.php?dashboard_dosen">
<!-- a href awal -->
<i class="fa fa-fw fa-dashboard"></i> Dashboard
</a><!-- a href akhir -->
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="#" data-toggle="collapse" data-
target="#products">
<!-- a href awal -->

<i class="fa fa-fw fa-edit"></i> Nilai Mahasiswa


<i class="fa fa-fw fa-caret-down"></i>
</a><!-- a href akhir -->
<ul id="products" class="collapse">
<!-- collapse awal -->
<li>
<!-- li awal -->
<a href="menu_utama.php?insert_data_nilai"> Insert
Nilai </a>
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="menu_utama.php?view_nilai"> View Nilai </
a>
</li><!-- li akhir -->
</ul><!-- collapse akhir -->
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="#" data-toggle="collapse" data-target="#users">
<!-- a href awal -->
<i class="fa fa-fw fa-users"></i> Users
<i class="fa fa-fw fa-caret-down"></i>
</a><!-- a href akhir -->
<ul id="users" class="collapse">
<!-- collapse awal -->
<li>
<!-- li awal -->
<a href="menu_utama.php?view_users"> View Users </
a>
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="menu_utama.php?edit_user=<?php echo $user
_id; ?>"> Edit User </a>
</li><!-- li akhir -->
</ul><!-- collapse akhir -->
</li><!-- li akhir -->
<li>
<!-- li awal -->
<a href="logout.php">
<!-- a href awal -->
<i class="fa fa-fw fa-power-off"></i> Log Out
</a><!-- a href akhir -->
</li><!-- li akhir -->
</ul><!-- nav navbar-nav side-nav akhir -->
</div><!-- collapse navbar-collapse navbar-ex1-collapse akhir -->
</nav><!-- navbar navbar-inverse navbar-fixed-top akhir -->
<?php } ?>
9.Dashboard.php untuk Mahasiswa

<?php

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

echo "<script>window.open('login_mode.php','_self')</script>";
} else {

?>

<div class="row">
<!-- row no: 1 awal -->
<div class="col-lg-12">
<!-- col-lg-12 awal -->
<h1 class="page-header"> </h1>

<ol class="breadcrumb">
<!-- breadcrumb awal -->
<li class="active">
<!-- active awal -->

<i class="fa fa-fw fa-user"></i> Dashboard

</li><!-- active akhir -->


</ol><!-- breadcrumb akhir -->

</div><!-- col-lg-12 akhir -->


</div><!-- row no: 1 akhir -->

<div class="panel-body">
<div class="row">
<!-- row no: 2 awal -->
<div class="col-lg-12">
<!-- col-lg-12 awal -->
<div class="panel panel-primary">
<!-- panel panel-default awal -->
<div class="panel-heading">
<!-- panel-heading awal -->
<h3 class="panel-title">
<!--h3 panel-title awal -->
<i class="fa fa-tags"></i> Data Nilai Mahasiswa
</h3>
<!--h3 panel-title akhir -->
</div><!-- panel-heading akhir -->
<div class="panel-body">
<!-- panel-body awal -->
<div class="table-responsive">
<!-- table-responsive awal -->
<table class="table table-striped table-
bordered table-hover">
<!-- table table-striped table-bordered table-
hover awal -->

<thread>
<!--thread awal-->
<tr>
<!--tr awal-->
<th> No </th>
<th> Mata Kuliah </th>
<th> Absensi </th>
<th> Tugas </th>
<th> UTS </th>
<th> UAS </th>
<th> Nilai Akhir </th>
<th>Huruf Mutu </th>
</tr>
<!--tr finsih-->
</thread>
<!--thread finsih-->

<tbody>
<!--tbody awal-->

<?php

$mahasiswa_session = $_SESSION['Nama'];
$get_mahasiswa = "select * from akun where
Nama='$mahasiswa_session'";
$run_mahasiswa = mysqli_query($con, $get_m
ahasiswa);
$row_mahasiswa = mysqli_fetch_array($run_m
ahasiswa);
$nimnya = $row_mahasiswa['nim'];
$get_nil = "select * from nilai_Mahasiswa
where nim=$nimnya";
$run_nil = mysqli_query($con, $get_nil);
$i = 0;
while ($baris_nil = mysqli_fetch_array($ru
n_nil)) {
$matakul = $baris_nil['Matkul'];
$absen = $baris_nil['Absensi'];
$tugas = $baris_nil['Tugas'];
$uts = $baris_nil['UTS'];
$uas = $baris_nil['UAS'];
$n_akhir = $baris_nil['Nilai_Akhir'];
$h_mutu = $baris_nil['Huruf_Mutu'];
$i++;

?>

<tr>
<!--tr awal-->

<td> <?php echo $i; ?> </td>


<td> <?php echo $matakul; ?> </td>
<td> <?php echo $absen; ?> </td>
<td> <?php echo $tugas; ?> </td>
<td> <?php echo $uts; ?> </td>
<td> <?php echo $uas; ?> </td>
<td> <?php echo $n_akhir; ?> </td>
<td> <?php echo $h_mutu; ?> </td>

</tr>
<!--tr akhir-->
<?php } ?>
</tbody>
<!--tbody akhir-->
<tfoot>
<!--tr awal-->
<tr>
<th colspan="7">
<p align="center"> Total IPK</p>
</th>
<th colspan="1">.....</th>
</tr>
<!--tr finish-->
</tfoot>
</table><!-- ptable table-striped table-
bordered table-hover akhir -->
</div><!-- panel panel-default akhir -->
</div><!-- panel-body akhir -->
</div><!-- row no: 2 akhir -->

<?php } ?>
10. Dashboard_dosen untuk dosen

<style>
.form-pencarian {
margin-left: 78%;

}
</style>
<div class="row">
<!-- row no: 1 awal -->
<div class="col-lg-12">
<!-- col-lg-12 awal -->
<h1 class="page-header"> </h1>

<ol class="breadcrumb">
<!-- breadcrumb awal -->
<li class="active">
<!-- active awal -->
<i class="fa fa-fw fa-user"></i> Dashboard
</li><!-- active akhir -->
</ol><!-- breadcrumb akhir -->
</div><!-- col-lg-12 akhir -->
</div><!-- row no: 1 akhir -->
<div class="row">
<!-- row no: 3 awal -->
<div class="col-lg-12">
<!-- col-lg-8 awal -->
<div class="panel panel-primary">
<!-- panel panel-primary awal -->
<div class="panel-heading">
<!-- panel-heading awal -->
<h3 class="panel-title">
<!-- panel-title awal -->

<i class="fa fa-fw fa-edit"></i> Nilai Mahasiswa

</h3><!-- panel-title akhir -->


</div><!-- panel-heading akhir -->
<br>
<div class="form-pencarian">
<form method="GET" action="dashboard_dosen.php">
<input type="text" name="kata_cari" placeholder="Masukan N
im" value="<?php if (isset($_GET['kata_cari'])) {

echo $_GET['kata_cari'];

} ?>" />
<input type="submit" class="btn btn-primary" value="Cari">

</form>
</div>
<div class="panel-body">
<!-- panel-body start -->
<div class="table-responsive">
<!-- table-responsive start -->
<table class="table table-striped table-bordered table-
hover">
<!-- table table-striped table-bordered table-
hover start -->
<thread>
<!--thread start-->
<tr>
<!--tr start-->
<th> Nil Id</th>
<th> Nim </th>
<th> Nama </th>
<th> Absensi </th>
<th> Tugas </th>
<th> UTS </th>
<th> UAS</th>
<th> Nilai Akhir</th>
<th>Huruf Mutu</th>
<th> Delete Data </th>
<th> Edit Data </th>
</tr>
<!--tr finsih-->
</thread>
<!--thread finsih-->
<tbody>
<!--tbody start-->
<?php
$mahasiswa_session = $_SESSION['Username'];
$get_mahasiswa = "select * from dosen where Userna
me='$mahasiswa_session'";
$run_mahasiswa = mysqli_query($con, $get_mahasiswa
);
$row_mahasiswa = mysqli_fetch_array($run_mahasiswa
);
$nimnya = $row_mahasiswa['id_dosen'];
$get_nil = "SELECT * FROM `nilai_mahasiswa` WHERE
id_dosen=$nimnya";
$run_nil = mysqli_query($con, $get_nil);
$i = 0;
while ($baris_nil = mysqli_fetch_array($run_nil))
{
$nilid = $baris_nil['Nil_Id'];
$nimnya = $baris_nil['nim'];
$nama = $baris_nil['Nama'];
$absen = $baris_nil['Absensi'];
$tugas = $baris_nil['Tugas'];
$uts = $baris_nil['UTS'];
$uas = $baris_nil['UAS'];
$n_akhir = $baris_nil['Nilai_Akhir'];
$h_mutu = $baris_nil['Huruf_Mutu'];
$i++;

?>
<tr>
<!--tr start-->

<td> <?php echo $nilid; ?> </td>


<td> <?php echo $nimnya; ?> </td>
<td> <?php echo $nama; ?> </td>
<td> <?php echo $absen; ?> </td>
<td> <?php echo $tugas; ?> </td>
<td> <?php echo $uts; ?> </td>
<td> <?php echo $uas; ?> </td>
<td> <?php echo $n_akhir; ?> </td>
<td> <?php echo $h_mutu; ?> </td>
<td>
<a href="menu_utama.php?delete_data_ni
lai=<?php echo $nilid; ?>">
<i class="fa fa-trash-
o"></i> Delete
</a>
</td>
<td> <a href="menu_utama.php?edit_data_nil
ai=<?php echo $nilid; ?>">
<i class="fa fa-pencil"></i> Edit
</a>
</td>
</tr>
<!--tr finsih-->
<?php } ?>
</tbody>
<!--tbody finsih-->
</table><!-- ptable table-striped table-bordered table-
hover akhir -->
</div><!-- panel panel-default akhir -->
</div><!-- panel-body akhir -->
<br>
Source Code CRUD SIA

1.insert_data_nilai.php
<?php

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

echo "<script>window.open('login_dosen.php','_self')</script>";
} else {

?>

<div class="row">
<!-- row awal -->
<div class="col-lg-12">
<!-- col-lg-12 awal -->

<ol class="breadcrumb">
<!-- breadcrumb awal -->

<li class="active">
<!-- active awal -->

<i class="fa fa-dashboard"></i> Dashboard / Insert Data

</li><!-- active akhir -->

</ol><!-- breadcrumb akhir -->

</div><!-- col-lg-12 akhir -->

</div><!-- row akhir -->

<div class="row">
<!-- row awal -->

<div class="col-lg-12">
<!-- col-lg-12 awal -->

<div class="panel panel-default">


<!-- panel panel-default awal -->

<div class="panel-heading">
<!-- panel-heading awal -->

<h3 class="panel-title">
<!-- panel-title awal -->

<i class="fa fa-money fa-fw"></i> Input Data Nilai

</h3><!-- panel-title akhir -->

</div> <!-- panel-heading akhir -->

<div class="panel-body">
<!-- panel-body awal -->

<form method="post" class="form-


horizontal" enctype="multipart/form-data">
<!-- form-horizontal awal -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-
label"> Nil ID </label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input name="id_nilai" type="text" class="form
-control" required>
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-
label"> NIM </label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input name="nim" type="text" class="form-
control" required>
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-
label"> Dosen Id </label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input name="id_dosen" type="text" class="form
-control" required>
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-
label"> Nama </label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input name="nama" type="text" class="form-
control" required>
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-
label"> Mata Kuliah </label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input value="<?php echo $matkul; ?>" name="ma
tkul" type="text" class="form-control" required>
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-
label"> Absensi </label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input name="absen" type="text" class="form-
control" required>
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-
label"> Tugas </label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input name="n_tugas" type="text" class="form-
control" required>
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-
label"> UTS </label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input name="n_uts" type="text" class="form-
control" required>
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-
label"> UAS </label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input name="n_uas" type="text" class="form-
control" required>
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

<div class="form-group">
<!-- form-group awal -->
<label class="col-md-3 control-label"></label>
<div class="col-md-6">
<!-- col-md-6 awal -->
<input name="submit" value="Submit" type="subm
it" class="btn btn-primary form-control">
</div><!-- col-md-6 akhir -->
</div><!-- form-group akhir -->

</form><!-- form-horizontal akhir -->


</div><!-- panel-body akhir -->
</div><!-- canel panel-default akhir -->
</div><!-- col-lg-12 akhir -->
</div><!-- row akhir -->

<?php
if (isset($_POST['submit'])) {

$nilid = $_POST['id_nilai'];
$id = $_POST['nim'];
$iddos = $_POST['id_dosen'];
$matkul = $_POST['Matkul'];
$nama = $_POST['nama'];
$absensi = $_POST['absen'];
$tugas = $_POST['n_tugas'];
$uts = $_POST['n_uts'];
$uas = $_POST['n_uas'];

$n_akhir = ($absensi * 0.1) + ($tugas * 0.2) + ($uts * 0.3) + ($uas


* 0.4);
if ($n_akhir <= 100) {
$grade = "A";
}
if ($n_akhir < 80) {
$grade = "B";
}
if ($n_akhir < 70) {
$grade = "C";
}
if ($n_akhir < 60) {
$grade = "D";
}
if ($n_akhir < 50) {
$grade = "E";
}
$grade =
$insert_nilai = "insert into nilai_mahasiswa (Nil_Id,nim,id_dosen,
Matkul,Nama,Absensi,Tugas,UTS,UAS,Nilai_Akhir,Huruf_Mutu) values ('$nilid', '$
id','$iddos','$matkul','$nama','$absensi','$tugas','$uts','$uas','$n_akhir','$
grade')";
$run_emostore = mysqli_query($con, $insert_product);
if ($run_emostore) {
echo "<script>alert('Data Nilai Mahasiswa Berhasil Di Input')</scr
ipt>";
echo "<script>window.open('menu_utama.php?dashboard_dosen','_self'
)</script>";
}
}
?>

<?php } ?>

You might also like