Server IP : 162.240.98.243 / Your IP : 18.220.139.168 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/btiyawmy/public_html/login.easenup.in/ |
Upload File : |
<?php session_start(); require_once('../dbconnection.php'); include('header.php'); include('menu.php'); if(isset($_POST['signup'])) { $sql="UPDATE medicine_inventory SET invoice_no='$_POST[invoice_no]',date_of_purchase='$_POST[date_of_purchase]',vendor='$_POST[vendor]',date_invoice='$_POST[date_invoice]',Cmrp='$_POST[Cmrp]',cost_gst='$_POST[cost_gst]',Batch_number='$_POST[Batch_number]',HSN_No='$_POST[HSN_No]',mrp='$_POST[mrp]',gst='$_POST[gst]',Quantity='$_POST[Quantity]',totalQuatity='$_POST[totalQuatity]',Expiry_Date='$_POST[Expiry_Date]' WHERE inventory_id='$_GET[inventory_id]'"; if($qsql = mysqli_query($con,$sql)) { echo "<script>alert('Update successfully');</script><script> window.history.go(-2)</script>"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#myForm').submit(function() { $('#loaderImg').show(); return true; }); }); </script> <style> #loaderImg { position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; border: 10px solid grey; border-radius: 50%; border-top: 10px solid black; width: 100px; height: 100px; animation: spin 1s linear infinite; z-index:10000000; } @keyframes spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } </style> </head> <body> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <div style = "display:none;" id = "loaderImg"> <div class="loader"> </div> </div> <form name='signup' id="myForm" method="POST"> <table id='example2' class='table table-bordered table-hover'> <?php $sql ="SELECT * FROM medicine_inventory WHERE inventory_id='$_GET[inventory_id]'"; $qsql = mysqli_query($con,$sql); while($rs = mysqli_fetch_array($qsql)) { echo " <tr> <td width='50%'>Invoice No :</td><td width='50%'><input type='text' placeholder='Invoice No' name='invoice_no' value='$rs[invoice_no]' class='form-control'> </td> </tr> <tr> <td width='50%'>Date of Purchase :</td><td width='50%'><input type='date' placeholder='Invoice No' name='date_of_purchase' value='$rs[date_of_purchase]' class='form-control'> </td> </tr> <tr> <td width='50%'>vendor:</td><td width='50%'> <select id='select-state' name='vendor' required='true'>"; $narayan=LoginManager::currentUser(); $hari=LoginManager::getUserTypeByuname("$narayan"); $sql ="SELECT * FROM site_users WHERE userno='$hari'"; $qsql = mysqli_query($con,$sql); if($re = mysqli_fetch_array($qsql)) $VenderList=$con->query("SELECT * FROM `list_vendor` where adminid='$re[entered_by]'"); while($RowVL=$VenderList->fetch_array()){ ?> <option value='<?php echo $RowVL['vid'] ?>' <?php echo($rs[vendor]==$RowVL[vid])? 'selected':''; ?> ><?php echo $RowVL[name] ?></option> <? } echo" </select> </td> </tr> <tr> <td width='50%'>Rate Per Unit:</td><td width='50%'><input type='text' placeholder='Cost Price' name='Cmrp' value='$rs[Cmrp]' class='form-control'> </td> </tr> <tr> <td width='50%'>Batch Number :</td><td width='50%'><input type='text' placeholder='Batch number' name='Batch_number' value='$rs[Batch_number]' id='Batch_number' class='form-control'> </td> </tr> <tr> <td width='50%'>HSN No :</td><td width='50%'><input type='text' placeholder='HSN No' name='HSN_No' value='$rs[HSN_No]' id='HSN_No' class='form-control'> </td> </tr> <tr> </td> </tr><tr> <td width='50%'>MRP :</td><td width='50%'><input type='text' placeholder='Price' name='mrp' id='mrp' value='$rs[mrp]' class='form-control'></td></tr> <tr> <td width='50%'>GST % :</td><td width='50%'><input type='text' placeholder='GST in %' name='gst' id='gst' value='$rs[gst]' class='form-control'></td></tr><tr> <td width='50%'>Expiry Date : </td> <td width='50%'><input type='date' value='$rs[Expiry_Date]' placeholder='price' name='Expiry_Date' id='Expiry_Date' class='form-control'></td></tr><tr> <td width='50%'>Quantity :</td><td width='50%'><input type='text' placeholder='Quantity' name='Quantity' id='Quantity' value='$rs[Quantity]' class='form-control' readonly /></td></tr><tr> <td width='50%'>Total Quantity :</td><td width='50%'><input type='text' placeholder='Total Quantity' name='totalQuatity' id='totalQuatity' value='$rs[totalQuatity]' class='form-control'></td> </tr> "; } ?> </table> <input type="submit" value="Update" name="signup"> </form> </div></div>