<?php
error_reporting(0); session_start();
include "_config/koneksi.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tugas Akhir</title> <!-- CSS -->
<link href="css/main.css" rel="stylesheet"> <link href="css/advanced.css" rel="stylesheet"> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/bootstrap-responsive.min.css"
rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet"> <link href="css/fonts.css" rel="stylesheet"> <!-- End CSS -->
</head> <body>
<div class="opening"> <h2>Selamat Datang</h2> </div>
<div class="row"> <div class="span7">
<div class="login-content">
<form id="login-pop" action="" method="post"> <div class="username-pop">
<input id="username_pop" name="userid" type="text" placeholder="Username">
</div>
<div class="password-pop">
<input id="password_pop" name="psw" type="password" placeholder="Password">
</div>
<div class="login-submit">
<button id="login_submit" name="submit">Login</button> </div>
</form> </div> </div>
<div class="span5">
<div class="welcome-content"> <div class="welcome">
<h1>Web Dasar</h1> <h4>IT 1234</h4>
<h3>Dosen : Ardika Lestyana Putra</h3> </div>
</div> </div> </div> </body> </html>
2.
Script cek_login
<?php
session_start();
$c = mysql_fetch_array($cek); $_SESSION['userid'] = $c['userid']; $_SESSION['level'] = $c['level'];
if($c['level']=="admin"){ header("location:dosen"); }else if($c['level']=="user"){
header("location:mahasiswa");
} }else{ die("password salah <a
href=\"javascript:history.back()\">kembali</a>");
}}else if($op=="out"){ unset($_SESSION['userid']); unset($_SESSION['level']);
header("location:index.php");} ?>
3.
Koneksi.php
<?php
$server = "localhost"; $username = "root"; $password = ""; $database = "ta";
// Koneksi dan memilih database di server
mysql_connect($server,$username,$password) or die("Koneksi gagal");
mysql_select_db($database) or die("Database tidak bisa dibuka");
?>
4.
Halaman utama Dosen
<!doctype html> <html lang="en"> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Portal Tugas</title>
<meta name="keywords" content="scroller, jquery one page scroll, onepagescroll, animated scrolling" />
<meta name="author" content="Author for Tutorial-webdesign.com" />
<script type="text/javascript"
src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript" src="js/jquery.onepage-scroll.js"></script>
<link rel="stylesheet" type="text/css" href="css/onepage-scroll.css" />
<link href='http://fonts.googleapis.com/css?family=Righteous' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Voltaire' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/style.css"> </head>
<body> <header>
<img src="img/twd-logo-mini.png" alt="logo twd mini"> <h1><a href="http://www.tutorial-webdesign.com">Tutorial-WebDesign<small>.com</small></a></h1>
</header>
<div class="main">
<section class="page one"> <div class="pop-content"> <?php
</tr>";
while ($data = mysql_fetch_array($result)) //mysql_fetch_array = get the query data into array
{
echo "<tr align='center'> <td>".$data['no_soal']."</td> <td>".$data['tgl_masuk']."</td> <td>".$data['tgl_sls']."</td> <td>".$data['subjek']."</td> <td>".$data['file_soal']."</td>
<td><i><a href='formupdate.php?no=".$data['no']."'> Update </a></i></td>
</tr>"; }
echo "</table>"; ?>
</div> </section> </div>
<script type="text/javascript"> $(".main").onepage_scroll({ sectionContainer: "section", });
</script> </body> </html>
5.
Halaman Utama Mahasiswa
<!doctype html> <html lang="en"> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Portal Tugas</title>
<meta name="keywords" content="scroller, jquery one page scroll, onepagescroll, animated scrolling" />
<meta name="author" content="Author for Tutorial-webdesign.com" />
<script type="text/javascript"
src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript" src="js/jquery.onepage-scroll.js"></script>
<link rel="stylesheet" type="text/css" href="css/onepage-scroll.css" />
<link href='http://fonts.googleapis.com/css?family=Righteous' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Voltaire' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/style.css"> </head>
<body> <header>
<img src="img/twd-logo-mini.png" alt="logo twd mini"> <h1><a href="http://www.tutorial-webdesign.com">Tutorial-WebDesign<small>.com</small></a></h1>
</header>
<div class="main">
<section class="page one"> <div class="pop-content"> <?php
</tr>";
while ($data = mysql_fetch_array($result)) //mysql_fetch_array = get the query data into array
{
echo "<tr align='center'> <td>".$data['no_soal']."</td> <td>".$data['tgl_masuk']."</td> <td>".$data['tgl_sls']."</td> <td>".$data['subjek']."</td> <td>".$data['file_soal']."</td>
<td><i><a href='formupdate.php?no=".$data['no']."'> Update </a></i></td>
</tr>"; }
echo "</table>"; ?>
</div> </section> </div>
<script type="text/javascript"> $(".main").onepage_scroll({ sectionContainer: "section", });
</script> </body>