-
Notifications
You must be signed in to change notification settings - Fork 0
/
inputstockbarang.php
151 lines (144 loc) · 6.68 KB
/
inputstockbarang.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
include 'database.php';
session_start();
if (@$_SESSION['username'] == '') {
echo "<script>
alert('Silahkan Login Dahulu...')
window.location='loginhrd.php';
</script>";
}
if(isset($_POST['submit'])){
$kode_barang=$_POST['kode_barang'];
$nama_barang=$_POST['nama_barang'];
$jenis_barang=$_POST['jenis_barang'];
$pemasukan=$_POST['pemasukan'];
$pengeluaran=$_POST['pengeluaran'];
if(empty($kode_barang) || empty($nama_barang) || empty($jenis_barang) || empty($pemasukan) || empty($pengeluaran)) {
echo "<script>alert('Kolom tidak boleh kosong')</script>";
} else {
$sql="insert into `tb_barang` (kode_barang,nama_barang,jenis_barang,pemasukan,pengeluaran) values
('$kode_barang','$nama_barang','$jenis_barang','$pemasukan','$pengeluaran')";
$result=mysqli_query($conn,$sql);
echo "<script>alert('Data Berhasil Di Submit')</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Input Stok Barang</title>
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="css/ruang-admin.min.css" rel="stylesheet">
</head>
<body id="page-top">
<div id="wrapper">
<!-- Sidebar -->
<ul class="navbar-nav sidebar sidebar-light accordion" id="accordionSidebar">
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.html">
<div class="sidebar-brand-icon">
</div>
<div class="sidebar-brand-text mx-3">HRD</div>
</a>
<hr class="sidebar-divider my-0">
<li class="nav-item active">
<a class="nav-link" href="homehrd.php">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Home</span></a>
</li>
<hr class="sidebar-divider">
<li class="nav-item">
<a class="nav-link" href="inputdatametal.php">
<i class="fas fa-fw fa-chart-area"></i>
<span>Input Data Metal</span>
</a>
</li>
<hr class="sidebar-divider">
<li class="nav-item">
<a class="nav-link" href="inputstockbarang.php">
<i class="fas fa-fw fa-store"></i>
<span>Input Stok Barang</span>
</a>
</li>
<hr class="sidebar-divider">
<li class="nav-item">
<a class="nav-link" href="updatestokbarang.php">
<i class="fas fa-fw fa-check"></i>
<span>Update Stok Barang</span>
</a>
</li>
<hr class="sidebar-divider">
<li class="nav-item">
<a class="nav-link" href="logout.php">
<i class="fas fa-fw fa-closed-captioning"></i>
<span>Logout</span>
</a>
</li>
</ul>
<!-- Sidebar -->
<div id="content-wrapper" class="d-flex flex-column">
<div id="content">
<!-- TopBar -->
<nav class="navbar navbar-expand navbar-light bg-navbar topbar mb-4 static-top">
<button id="sidebarToggleTop" class="btn btn-link rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<ul>
<li>
<h3 style="color: aliceblue; margin-left: 5rem; margin-top: 1rem;">SISTEM INFORMASI
INVENTORY BARANG METAL</h3>
</li>
</ul>
</nav>
<!-- Topbar -->
<div class="text-center">
<span><b>Input</b> Stok Barang</span>
</div>
<div style="margin:1rem; text-align:center; justify-content:center;">
<form method="POST">
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Kode barang</label>
<input type="text" class="form-control" id="exampleFormControlInput1" name="kode_barang">
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Nama barang</label>
<input type="tex" class="form-control" id="exampleFormControlInput1" name="nama_barang">
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Jenis barang</label>
<input type="text" class="form-control" id="exampleFormControlInput1" name="jenis_barang">
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Pemasukan</label>
<input type="text" class="form-control" id="exampleFormControlInput1" name="pemasukan">
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Pengeluaran</label>
<input type="text" class="form-control" id="exampleFormControlInput1" name="pengeluaran">
</div>
<div class="mb-3">
<button type="submit" name='submit' value='submit'
class="btn btn-outline-success">Submit</button>
</div>
</form>
</div>
<!-- Footer -->
</div>
</div>
<!-- Scroll to top -->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<script src="js/ruang-admin.min.js"></script>
<script src="vendor/chart.js/Chart.min.js"></script>
<script src="js/demo/chart-area-demo.js"></script>
</body>
</html>