Raksaka Indra
Frontend Web Developer and @WordPress Theme Developer — Blogger — Student of Electronics & Intrumentations in Gadjah Mada University, Indonesia
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'root';
$dbname = 'stock_material';
$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
?>
<?php
$pengacak = "NDJS3289JSKS190JISJI";
if (md5($pengacak.md5($password).$pengacak) == $data['password']) {
$_SESSION['username'] = $username;
header("location:home.php?v=Moulding");
} else {
require "head.php";
} ?>
<?php
session_start();
if (!isset($_SESSION['username'])) {
$usr = $_SESSION['username'];
$result = mysqli_query($conn, "SELECT level FROM en_user WHERE username = '$usr'");
while($row = mysqli_fetch_array($result)) {
$level = $row['level'];
} } ?>
<?php
$sql = "SELECT sap_number, material, unit, type, q_start, $rq q_end, price, val_tot_stock FROM material WHERE type = '$v'";
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_row($result)) { ?>
<tr>
<td><?php echo "$nmb" ;?></td>
<?php foreach($row as $value)
echo '<td>' .$value. '</td>'; ?>
</tr>
<?php } ?>
<?php
if(isset($_POST['send'])) {
$sap_number = $_POST['sap_number'];
$usr = $_POST['username'];
$qo = $_POST['qo'];
} else { ?>
<form class="entry" method="post" action="">
<p>Material Number</p>
<input name="sap_number" type="text" id="sap_number"> <p>Qty Out<p>
<input name="qo" type="text" id="qty_out">
<input name="send" type="submit" id="update" value="Send"> </form>
<?php } ?>
<?php
$file_type = array('doc','docx','xls','xlsx','ppt','pptx','pdf');
$max_size = 2000000; // 2MB
?>
<?php date_default_timezone_set("Asia/Jakarta"); $rand = date("mdY_His", time()); $file_name = $rand."_".$_FILES['data_upload']['name'];
?>
var tableToExcel = (function() {
var uri = 'data:application/vnd.ms-excel;base64,'
, template = '{table}
'
, base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
, format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) }
return function(table, name) {
if (!table.nodeType) table = document.getElementById(table)
var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML}
window.location.href = uri + base64(format(template, ctx))
}
})()
User-agent: *
Disallow: /
By Raksaka Indra
Stock Material Information System
Frontend Web Developer and @WordPress Theme Developer — Blogger — Student of Electronics & Intrumentations in Gadjah Mada University, Indonesia