Professional Documents
Culture Documents
Tugas Responsi Pemrograman Web: Teknik Informatika Institut Sains & Teknologi Akprind Yogyakarta
Tugas Responsi Pemrograman Web: Teknik Informatika Institut Sains & Teknologi Akprind Yogyakarta
PEMROGRAMAN WEB
TEKNIK INFORMATIKA
INSTITUT SAINS & TEKNOLOGI AKPRIND
YOGYAKARTA
I.
Source Code
Style.css
body {
font-family:"maiandra GD";
}
#tabel{
margin:0;
max-width: 500px;
padding:0;
margin:100px auto;
background: #f9f9f9;
#header h1,
h2,
#footer,
#login h3{
#header p {
text-align: center;
text-align: center;
margin-left:2%;
background-color: #2b2f3e;
padding-right:2%;
color: #FFFFFF;
#active {
fieldset{
text-decoration:none;
margin: 0;
color:#000;
border: none;
#container {
form{
width:100%;
padding: 0;
overflow:hidden;
margin: 0;
background:#4F9EBA;
padding: 10px;
#col {
input[type='text'],
text-align: center;
input[type="password"]{
width:80%;
width: 90%;
position:relative;
padding: 1em;
left:10%;
margin-top: 0.2em;
overflow:hidden;
color: #888;
#login{
input[type="submit"],
max-width: 340px;
input[type="button"]{
margin:100px auto;
width: 146px;
background: #f9f9f9;
padding: 1em;
margin: 1em 0;
color: #888;
background-color:#4F9EBA;
border:none;
color:#FFF;
border-bottom: 4px solid transparent;
}
input[type="submit"]:hover,
input[type="button"]:hover{
opacity: 0.8;
border-color: #00adb1;
}
form p{
text-align: center;
color: #888;
width: 30px;
margin: 10px auto 0;
background: #f9f9f9;
position: relative;
bottom: 20px;
}
Login.php
<!DOCTYPE html>
<head>
include "connect.php";
$pass=md5($_POST['password']);
$sql=mysql_query("SELECT nama_user,password,level
FROM user
<div id="header">
<div id="container">
<div id="login">
$hasil=mysql_num_rows($sql);
<fieldset>
<form method="POST" action="ceklogin.php">
<input type="text" name="username"
placeholder="Username">
<input type="password" name="password"
placeholder="Password">
<input type="submit" name="submit"
value="LOGIN">
</form>
</fieldset>
</div>
if ($hasil > 0 )
{
header('location:admin.php');
}
else
{
echo "<p>Login gagal! username tidak terdaftar atau
password salah</p><p><a href=\"index.php\">Ulangi
Lagi</a></p>";
}
</div>
?>
<div id="footer">
<p> @Dibuat oleh Saya </p>
</div>
</body>
Ceklogin.php
Index.php
<?php
<!DOCTYPE html>
<head>
</head>
</head>
<body id="active">
<div id="header">
<h1> GUDANG MAYA </h1>
<body id="active">
<?php
require_once "connect.php";
</div>
if(isset($_POST['jual'])){
<div id="container">
<div id="login">
<fieldset>
$query=pg_query($sql);
<form action="">
<input type="submit" name="submit"
value="USER">
<input type="button" value="ADMIN"
onclick="window.location='login.php';">
if($query){
?><script
language="javascript">document.location.href='admin.php'
</script><?php
}
<div class="border-p"></div>
else{
</form>
</fieldset>
}
</div>
}
</div>
<div id="footer">
<p> @Dibuat oleh Saya </p>
?>
<div id="header">
<h1> GUDANG MAYA </h1>
</div>
</div>
<div id="container">
</body>
<div id="tabel">
<fieldset>
<h2>Tabel Penjualan</h2>
<form method="POST" action="admin.php">
<input type="text" name="id" placeholder="ID
Barang">
Admin.php
<!DOCTYPE html>
<head>
<?php
$server = "localhost";
$username = "root";
$password = "";
$database = "gudang";
Connect.php
II.
BROWSER RUNNING
mysql_connect($server,$username,$password);
mysql_select_db($database);
?>
III.
IV.
V.
VI.
VII.
VIII.
IX.
X.
XI.
XII.
XIII.
XIV.
XV.
XVI.
XVII.
XVIII.
XIX.
XX.
XXI.
XXII.
XXIII.
XXIV.
XXV.
XXVI.
XXVII.
XXVIII.
PHPMYADMIN
XXIX.
XXX.
XXXI.
XXXII.
XXXIII.
XXXIV.
XXXV.
XXXVIII.
XXXVI.
XXXIX.
XXXVII.