File manager - Edit - /home/autoph/public_html/connect/home/prf_SearchSuppliers.php
Back
<?php include_once 'core/init.php'; $prfDate = date_create() ->format("Y-m-d"); $prfTime = date('H:i:s'); $myDate = date_create() ->format("Y-m-d"); $prfDateTime=$prfDate. " ".$prfTime; //$myUID = $user_data['u_id']; if(isset($_POST['done'])){ $searchText = mysql_escape_string($_POST['searchText']); ?> <table> <?php $getItemHdr = mysql_query("SELECT * FROM `prf_suppliers` WHERE `deleted`=0 AND `sup_code`='$searchText' || `deleted`=0 AND `sup_name` like '%$searchText%' ORDER BY sup_name ASC "); while($row=mysql_fetch_array($getItemHdr)){ ?><tr onclick="javascript:getRecordID(this);" onDblclick="javascript:viewEditForm(this);" ><?php echo "<td style='width:3%'>".$row['id']."</td>"; echo "<td style='width:5%'>".strtoupper($row['sup_code'])."</td>"; echo "<td style='width:15%'>".strtoupper($row['sup_name'])."</td>"; echo "<td style='width:15%'>".strtoupper($row['address'])."</td>"; echo "<td style='width:5%'>".strtoupper($row['landline'])."</td>"; echo "<td style='width:5%'>".strtoupper($row['vendor_fax'])."</td>"; echo "<td style='width:5%;text-align:left'>".strtoupper($row['terms'])."</td>"; echo "<td style='width:8%;text-align:left'>".strtoupper($row['contact_person'])."</td>"; echo "<td style='width:10%'>".$row['contact_person_email']."</td>"; echo "<td style='width:5%'>".$row['contact_person_mobile']."</td>"; echo "<td style='width:5%'>".$row['tin_number']."</td>"; echo "<td style='width:25%;text-align:left'>".strtoupper($row['supplied_items'])."</td>"; echo "</tr>"; } ?> </table> <!--########################## POPUP FOR ENDORSING CANVASS TO GENERATE CANVASS SHEET ############################################--> <!--###################################################################################################################################--> <div id="SupplierEditForm" class="PopUpActionWindow" style='position:fixed;top:100px;left:100px;height:600px;width:900px;z-index:10'> <div class='DelPopUpWindowTitle'> 🪧 SUPPLIER INFORMATION <div class='PopUpWindowClose'> <b onclick="javascript:hideEditForm(this);" style='font-weight:bold'> ✕ </b> </div> </div> <div style='padding:10px;width:100%;background: #f0f0f3 ;height:93%;'> <div style='padding:1px;width:100%;background:white;height:80%;'> <div style='width:70%;float:left;text-align:right;margin-bottom:10px;'><b class='pTitle'>Vendor Code:</b></div> <div style='width:30%;float:left;padding-right:10px;margin-bottom:10px;'> <input type='text' disabled maxlength="8" id='EMyVendorCode' style='text-transform: uppercase;float:left;text-align:center;padding:0px;;font-family:Yu Gothic Light;margin:5px;font-size:1.2vw;color:gray;font-weight:bold;height:30px'> </div> <div style='width:60%;float:left;background:white;padding:2px'> <b class='pTitle'>Vendor's Name:</b> <input type='hidden' id='vendorID' class='pTextData'> <input type='text' id='EvendorName' class='pTextData'> </div> <div style='width:15%;float:left;background:white;padding:2px'> <b class='pTitle'>Terms:</b> <select id='EvendorTerm' class='pTextData' style='margin-top:8px'> <option value='0'>COD</option> <option value='7'>7 Days</option> <option value='14'>14 Days</option> <option value='30'>30 Days</option> <option value='60'>60 Days</option> <option value='90'>90 Days</option> </select> </div> <div style='width:24.8%;float:left;background:white;padding:2px'> <b class='pTitle'>TIN No.</b> <input type='text' id='EvendorTIN' class='pTextData'> </div> <div style='width:60%;float:left;background:white;padding:2px'> <b class='pTitle'>Office Address:</b> <input type='text' id='EvendorAddress' class='pTextData'> </div> <div style='width:20%;float:left;background:white;padding:2px'> <b class='pTitle'>Fax Number:</b> <input type='text' id='EvendorFax' class='pTextData'> </div> <div style='width:19.9%;float:left;background:white;padding:2px'> <b class='pTitle'>Landline No.:</b> <input type='text' id='EvendorLandline' class='pTextData'> </div> <div style='width:40%;float:left;background:white;padding:2px'> <b class='pTitle'>Contact Person:</b> <input type='text' id='EvendorContactPerson' class='pTextData'> </div> <div style='width:39.8%;float:left;background:white;padding:2px'> <b class='pTitle'>E-mail Address:</b> <input type='text' id='EvendorEmail' class='pTextData'> </div> <div style='width:20%;float:left;background:white;padding:2px'> <b class='pTitle'>Mobile Number:</b> <input type='text' id='EvendorMobile' class='pTextData'> </div> <div style='width:99.8%;float:left;background:white;padding:2px'> <b class='pTitle'>Supplied Items(Separated by comma):</b> <textarea placeholder='Ex. Computer, Oil, Paper, Ink etc.,' rows =2 id='EvendorNotes' style='width:100%'></textarea> </div> </div> <div style='width:90%;float:right;background:transparent;padding:20px'> <button id='EcloseForm' class='DelPopUpLowerButtonL' onclick="javascript:hideEditForm(this);" style='width:25%;float:right;padding-left:10px;height:40px'>❌ CLOSE</button> <button id='EsaveForm' class='DelPopUpLowerButtonL' style='width:25%;float:right;padding-left:10px;height:40px'>💾 SAVE</button> </div> </div> </div> <!--########################## POPUP FOR ENDORSING CANVASS TO GENERATE CANVASS SHEET ############################################--> <!--###################################################################################################################################--> <?php } ?> <!--<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>--> <!--<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> --> <!-- add jquery https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.js"></script> <script type="text/javascript"> $(document).ready(function(){ //====================================================================================================== $("#goSearchSupplier").click(function(){ var searchText = $("#searchText").val(); //alert(CurrentpageCount); //exit; ShowUploadBar(); $.ajax({ url: "prf_SearchSuppliers.php", type: "POST", async: false, data: { "searchText": searchText, "done": 1 }, success: function(d){ ShowUploadBar(); $("#displaySupplier").html(d); } }) }); $("#EsaveForm").click(function(){ var vendorID = $("#vendorID").val(); var EMyVendorCode = $("#EMyVendorCode").val(); var EvendorName = $("#EvendorName").val(); var EvendorTerm = $("#EvendorTerm").val(); var EvendorTIN = $("#EvendorTIN").val(); var EvendorAddress = $("#EvendorAddress").val(); var EvendorFax = $("#EvendorFax").val(); var EvendorLandline = $("#EvendorLandline").val(); var EvendorContactPerson = $("#EvendorContactPerson").val(); var EvendorMobile = $("#EvendorMobile").val(); var EvendorEmail = $("#EvendorEmail").val(); var EvendorNotes = $("#EvendorNotes").val(); //alert('test'); if(MyVendorCode==''){ alert('ERROR: Invalid Vendor Code'); exit; } if(EMyVendorCode==''){ alert('ERROR: Vendor CODE is required.'); exit; } if(vendorName==''){ alert('ERROR: Vendor name is required.'); exit; } if(vendorEmail==''){ alert('ERROR: E-mail address is required'); exit; } if(vendorMobile==''){ alert('ERROR: Mobile number s is required'); exit; } if(EvendorNotes==''){ alert('ERROR: Product Line is required'); exit; } ShowUploadBar(); $.ajax({ url: "prf_UpdateSupplier.php", type: "POST", async: false, data: { "vendorID": vendorID, "EMyVendorCode": EMyVendorCode, "EvendorNotes": EvendorNotes, "EvendorName": EvendorName, "EvendorTerm": EvendorTerm, "EvendorTIN": EvendorTIN, "EvendorAddress": EvendorAddress, "EvendorFax": EvendorFax, "EvendorLandline": EvendorLandline, "EvendorContactPerson": EvendorContactPerson, "EvendorMobile": EvendorMobile, "EvendorEmail": EvendorEmail, "done": 1 }, success: function(d){ ShowUploadBar(); $("#displaySupplier").html(d); hideEditForm(); Swal.fire('Record has been saved.') } }) }); }); </script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> function hideEditForm(){ $("#SupplierEditForm").fadeOut(500); }; function viewEditForm(){ $("#SupplierEditForm").fadeIn(500); }; function getRecordID(row) { var x=row.cells; document.getElementById("vendorID").value = x[0].innerHTML; document.getElementById("EMyVendorCode").value = x[1].innerHTML; document.getElementById("EvendorName").value = x[2].innerHTML; document.getElementById("EvendorTerm").value = x[6].innerHTML; document.getElementById("EvendorTIN").value = x[10].innerHTML; document.getElementById("EvendorAddress").value = x[3].innerHTML; document.getElementById("EvendorFax").value = x[5].innerHTML; document.getElementById("EvendorLandline").value = x[4].innerHTML; document.getElementById("EvendorMobile").value = x[9].innerHTML; document.getElementById("EvendorEmail").value = x[8].innerHTML; document.getElementById("EvendorContactPerson").value = x[7].innerHTML; document.getElementById("EvendorNotes").value = x[11].innerHTML; } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings