-
Notifications
You must be signed in to change notification settings - Fork 2
/
adddasar.php
104 lines (101 loc) · 2.56 KB
/
adddasar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
session_start();
include "koneksi.php";
error_reporting(0);
$waktu=time()+25200;
$expired=30;
if ($_SESSION[level] == "admin")
{
if (empty($_SESSION['username']) AND empty($_SESSION['password'])){include "formlogin.php";}
else{
?>
<html>
<head>
<link href="css/test.css" type="text/css" rel="stylesheet">
<link href="../images/icon.jpg" rel="shortcut icon" />
<title>ATM Logistic</title>
<style>
table{
border:medium dashed #FFF;
margin-bottom:10px;
}
td.field
{
width:200px;
}
td.field input
{
width:100%;
}
</style>
</head>
</html>
<body>
<div id="header">
</div>
<div id="main_content">
<?php include "atas.php";?>
<br>
<p align="center"><strong>Silahkan isi form dibawah ini untuk menambah dasar</strong></p>
<script type="text/javascript" src="javascript/jquery-1.2.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$().ajaxStart(function() {
$('#loading').show();
$('#result').hide();
}).ajaxStop(function() {
$('#loading').hide();
$('#result').fadeIn('slow');
});
$('#formreg').submit(function() {
$.ajax({
type: 'POST',
url: $(this).attr('action'),
data: $(this).serialize(),
success: function(data) {
$('#result').html(data);
}
})
return false;
});
})
</script>
<div align="center" id="loading" style="display:none;"><img src="images/loading.gif" alt="loading..." /></div>
<div id="result" style="display:none;"></div>
<form id="formreg" action="prosesdasar.php?task=tambah" method="post">
<div align="center">
<table width="400" border="6">
<tr>
<td width="123"><strong>Nama dasar keterangan barang masuk / keluar :</strong></td>
<td class="field" width="255" bgcolor="#FFFFFF">
<input type="text" name="nmdasar" id="nmdasar"></td>
</tr>
<tr>
<td width="123"><strong>Jenis :</strong></td>
<td class="field" width="255" bgcolor="#FFFFFF">
<select name="jenis"><option value="1">Barang Masuk</option><option value="2">Barang Keluar</option></select></td>
</tr>
<tr>
<td colspan="2"><div align="right">
<strong>
<input type="submit" name="tambah" id="tambah" value="Tambah">
<input type="reset" name="reset" id="reset" value="Reset">
</strong></div></td>
</tr>
</table>
</div>
</form>
<p>
<?php include "menu.php"; ?>
</p>
</div>
<?php
}
}
else
{
echo "<script>alert('Maaf anda tidak memiliki akses untuk melihat halaman ini, silakan login sebagai admin terlebih dahulu.');javascript:window.location='formlogin.php';</script>";
}
?>
<div id="footer"></div>
</body>