File manager - Edit - /home/autoph/public_html/connect/home/PRF_Vendors.php
Back
<?php include 'core/init.php'; protected_page(); $uniqueRefID = $user_data['u_id']; //echo $uniqueRefID; $prfDate = date_create() ->format("Y-m-d"); $prtTime =Explode(":", date('H:i:s')); $txDate = explode("-",$prfDate); $refYear = $txDate[0]; $refMonth = $txDate[1]; $refMinute = $prtTime[1]; $refSecond = $prtTime[2]; $NewRefCode = $refMonth.''.$refMinute.''.$refSecond; ?> <!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/> <link rel="stylesheet" type="text/css" href="css/jquery-ui.css"/> <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1"/> </head> <body> <div class='NewPRFHeader'> <p class='PRFBodyTitle'>📝 ACTIVE SUPPLIERS</p> </div> <!--########################## POPUP MESSAGE ############################################--> <!--########################################################################################################--> <div id='saveMessage' style='display:none;background:yellow;border:1px solid orange;padding:0px;width:400px;top:40px;position:fixed;left:50px;position:absolute;z-index:999999999;opacity: 0.95;'> <b style=''></b> <p style='margin:20px;background:yellow;font-family:Yu Gothic;font-size:1.5vw;text-align:center'>New record has been saved.</p> </div> <!--########################################################################################################--> <!--########################## MAIN TABLE WINDOW ############################################--> <div class='NewPRFBody' > <div class='NewPRFBodyMenu'> <div class='searchDIVA'> <!--<b class='BodyTopMenu' id='LoadNewPRFForm' onclick='showActionSlipForm()'>➕ New Purchase </b> --> <b class='BodyTopMenu' onclick="javascript:showAddVendorForm();">➕ Add New Supplier </b> </div> <div class='searchDIVB'> <input type='text' id='searchText' placeholder='Search Record.' class='textSearch' style='width:70%;margin:0px;border:1px solid lightgray;'> <button id='goSearchSupplier' class='searchButton' style='width:25%'> 🔍 Search</button> </div> </div> <div id='mainTable' class='PRFTableBody' style='background: #ffffff;overflow:auto'> <div style='width:200%;height:32px;background:white'> <table> <thead> <th style='width:3%'>REC. NO</th> <th style='width:5%'>VENDOR CODE</th> <th style='width:15%'>SUPPLIER NAME</th> <th style='width:15%'>SUPPLIER ADDRESS</th> <th style='width:5%'>LANDLINE NO.</th> <th style='width:5%'>FAX NO.</th> <th style='width:5%'>TERMS</th> <th style='width:8%'>CONTACT PERSON</th> <th style='width:10%'>E-MAIL</th> <th style='width:5%'>MOBILE</th> <th style='width:5%'>TIN NO.</th> <th style='width:25%'>PRODUCT LINE</th> </thead> </table> </div> <div id='displaySupplier' class='PRFTableItems' style='width:200%;overflow:auto'> <table> <?php /* $totalRows = mysql_result(mysql_query("SELECT COUNT(id) FROM `prf_suppliers` WHERE `deleted`=0 "),0); $noOfRecordPerPage = 2;// mysql_result(mysql_query("SELECT `page_count` FROM `asa_versioning_db` WHERE 1"),0); $myPageCount = ceil($totalRows / $noOfRecordPerPage); $offSet = 0;//($myPageCount-1) * $noOfRecordPerPage; echo "<input type='hidden' id='MyPageCount' value='".$myPageCount."'>"; echo "<input type='hidden' id='MyRowCount' value='".$totalRows."'>"; echo "<input type='hidden' id='myOffSet' value='".$offSet."'>"; echo "<input type='hidden' id='recordPerPage' value='".$noOfRecordPerPage."'>"; */ $getItemHdr = mysql_query("SELECT * FROM `prf_suppliers` WHERE `deleted`=0 ORDER BY sup_name ASC"); while($row=mysql_fetch_array($getItemHdr)){ ?><tr onclick="javascript:showPRFheaderForDeletion(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>"; } ?> <tr><td colspan='12' ><hr style='padding:0px;background:transparent;border:0px;border-bottom:1px solid gray'></td> <tr> <td colspan='2' style='background:white;font-family:Yu Gothic; font-size:13px;color: #f97d43 ;height:20px;font-weight:normal'>Selected Record:</td> <td colspan='10' style='background:white;'> <input type='hidden' id='selectedPRFHeaderID' class='TableBottomLabel'> <input disabled type='text' id='selectedPRFHeaderIDLabel' style='background:white;border:0px;font-family:Yu Gothic;font-size:14px;color: #f97d43 ;font-weight:normal'> </td> </tr> </table> </div> <!--<div style='background:white;width:100%;padding:0px;float:left;'> <center> <button onclick="javascript:pageLess();" id='pageCountViewBack' style='padding:10px;border-radius:10px 0px 0px 10px;font-family:Yu Gothic Light;width:100px;font-size:14px;font-weight:bold;margin-right:0px'>◀ Back</button> <input type='text' disabled id='pageCountView' value ="Page 1 of <?php echo $myPageCount;?>" style='padding:10px;border-radius:0px;font-family:Yu Gothic Light;width:200px;text-align:center;font-size:14px;font-weight:bold;color:gray;margin:0px;'> <input type='hidden' id='pageCount' value='1' style='padding:10px;border-radius:0px;font-family:Yu Gothic Light;width:100px;text-align:center;font-size:14px;font-weight:bold;color:gray'> <button onclick="javascript:pageAdd();" id='pageCountViewNext' style='padding:10px;border-radius:0px 10px 10px 0px;font-family:Yu Gothic Light;width:100px;font-size:14px;font-weight:bold;margin-left:0px'>Next ▶ </button> </center> </div>--> </div> </div> <!--########################## POPUP ACTION WINDOW FOR DELETE AND VIEW DETAILS ############################################--> <!--########################################################################################################--> <div id="addVendorForm" class="supplierForm" style='position:fixed;'> <div class='PopUpWindowTitle'> 🪧 ADD NEW VENDOR <div class='PopUpWindowClose'> <b onclick="javascript:hideAddVendorForm(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:20%;float:left;padding-right:10px;margin-bottom:10px;'> <input type='text' disabled maxlength="8" id='MyVendorCode' 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:10%;float:left;text-align:left;margin-bottom:0px;background:white;padding:1px;border:0px solid red;margin-top:2px'> <b id='getVendorCode' class='pTitle' style='cursor:pointer;color:blue;padding:5px;font-weight:fong-size:38px;normal;margin-top:5px'><abbr title="Click te get vendor code">🔄</abbr></b></div> <div style='width:60%;float:left;background:white;padding:2px'> <b class='pTitle'>Vendor's Name:</b> <input type='text' id='vendorName' class='pTextData'> </div> <div style='width:15%;float:left;background:white;padding:2px'> <b class='pTitle'>Terms:</b> <select id='vendorTerm' 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='vendorTIN' class='pTextData'> </div> <div style='width:60%;float:left;background:white;padding:2px'> <b class='pTitle'>Office Address:</b> <input type='text' id='vendorAddress' class='pTextData'> </div> <div style='width:20%;float:left;background:white;padding:2px'> <b class='pTitle'>Fax Number:</b> <input type='text' id='vendorFax' class='pTextData'> </div> <div style='width:19.9%;float:left;background:white;padding:2px'> <b class='pTitle'>Landline No.:</b> <input type='text' id='vendorLandline' class='pTextData'> </div> <div style='width:40%;float:left;background:white;padding:2px'> <b class='pTitle'>Contact Person:</b> <input type='text' id='vendorContactPerson' 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='vendorEmail' class='pTextData'> </div> <div style='width:20%;float:left;background:white;padding:2px'> <b class='pTitle'>Mobile Number:</b> <input type='text' id='vendorMobile' 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='vendorNotes' style='width:100%'></textarea> </div> </div> <div style='width:90%;float:right;background:transparent;padding:20px'> <button id='closeForm' class='DelPopUpLowerButtonL' onclick="javascript:hideAddVendorForm(this);" style='width:25%;float:right;padding-left:10px;height:40px'>❌ CLOSE</button> <button id='saveForm' class='DelPopUpLowerButtonL' style='width:25%;float:right;padding-left:10px;height:40px'>💾 SAVE</button> </div> </div> </div> </body> </html> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ //====================================================================================================== $("#saveForm").click(function(){ var MyVendorCode = $("#MyVendorCode").val(); var vendorName = $("#vendorName").val(); var vendorTerm = $("#vendorTerm").val(); var vendorTIN = $("#vendorTIN").val(); var vendorAddress = $("#vendorAddress").val(); var vendorFax = $("#vendorFax").val(); var vendorLandline = $("#vendorLandline").val(); var vendorContactPerson = $("#vendorContactPerson").val(); var vendorMobile = $("#vendorMobile").val(); var vendorEmail = $("#vendorEmail").val(); var vendorNotes = $("#vendorNotes").val(); //alert(MyVendorCode); if(MyVendorCode==''){ alert('ERROR: Invalid Vendor Code'); exit; } if(vendorName==''){ alert('ERROR: Vendor name 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; } ShowUploadBar(); $.ajax({ url: "prf_saveNewSupplier.php", type: "POST", async: false, data: { "MyVendorCode": MyVendorCode, "vendorNotes": vendorNotes, "vendorName": vendorName, "vendorTerm": vendorTerm, "vendorTIN": vendorTIN, "vendorAddress": vendorAddress, "vendorFax": vendorFax, "vendorLandline": vendorLandline, "vendorContactPerson": vendorContactPerson, "vendorMobile": vendorMobile, "vendorEmail": vendorEmail, "done": 1 }, success: function(d){ ShowUploadBar(); hideAddVendorForm(); $("#displaySupplier").html(d); //showSaveForm(); //hideSaveForm(); } }) }); //====================================================================================================== //====================================================================================================== $("#getVendorCode").click(function(){ ShowUploadBar(); $.ajax({ url: "prf_getVendorCode.php", type: "POST", async: false, data: { "done": 1 }, success: function(d){ ShowUploadBar(); $("#MyVendorCode").val(d); } }) }); //====================================================================================================== //====================================================================================================== $("#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); } }) }); //====================================================================================================== $("#pageCountViewNext").click(function(){ var MyPageCount = $("#MyPageCount").val(); var MyRowCount = $("#MyRowCount").val(); var myOffSet = $("#myOffSet").val(); var CurrentpageCount = $("#pageCount").val(); var recordPerPage = $("#recordPerPage").val(); //alert(CurrentpageCount); //exit; ShowUploadBar(); $.ajax({ url: "prf_loadSupplierListPaginated.php", type: "POST", async: false, data: { "MyPageCount": MyPageCount, "myOffSet": myOffSet, "MyRowCount": MyRowCount, "CurrentpageCount": CurrentpageCount, "recordPerPage": recordPerPage, "done": 1 }, success: function(d){ ShowUploadBar(); $("#displaySupplier").html(d); } }) }); //================================================================================= $("#pageCountViewBack").click(function(){ var MyPageCount = $("#MyPageCount").val(); var MyRowCount = $("#MyRowCount").val(); var myOffSet = $("#myOffSet").val(); var CurrentpageCount = $("#pageCount").val(); var recordPerPage = $("#recordPerPage").val(); //alert(CurrentpageCount); //exit; ShowUploadBar(); $.ajax({ url: "prf_loadSupplierListPaginated.php", type: "POST", async: false, data: { "MyPageCount": MyPageCount, "myOffSet": myOffSet, "MyRowCount": MyRowCount, "CurrentpageCount": CurrentpageCount, "recordPerPage": recordPerPage, "done": 1 }, success: function(d){ ShowUploadBar(); $("#displaySupplier").html(d); } }) }); }); </script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> function hideActionSlipForm(){ $("#PRFCreateNewRequest").fadeOut(500); }; function showActionSlipForm(){ $("#PRFCreateNewRequest").fadeIn(500); }; function hideAddVendorForm(){ $("#addVendorForm").fadeOut(500); }; function showAddVendorForm(){ $("#addVendorForm").fadeIn(500); }; function hideSaveForm(){ $("#saveMessage").fadeOut(10000); }; function showSaveForm(){ $("#saveMessage").fadeIn(300); }; function pageAdd() { var currentCount = $("#pageCount").val(); var MyPageCountB = $("#MyPageCount").val(); var num = Number(currentCount); var numB = Number(MyPageCountB); var numView = num + 1; if(numView > numB){ //alert(numView); //alert(numB); document.getElementById("pageCountView").value = "Page " + numB + " of " + numB; document.getElementById("pageCount").value = numB; }else{ document.getElementById("pageCount").value = numView; document.getElementById("pageCountView").value = "Page " + numView + " of " + numB; } } function pageLess() { var currentCountX = $("#pageCount").val(); var MyPageCountP = $("#MyPageCount").val(); var numx = Number(currentCountX); var ckhZ = numx -1; document.getElementById("pageCount").value = ckhZ; document.getElementById("pageCountView").value = ckhZ; document.getElementById("pageCount").value = ckhZ; document.getElementById("pageCountView").value = "Page " + ckhZ + " of " + MyPageCountP if(ckhZ < 1){ document.getElementById("pageCountView").value = "Page 1 of " + MyPageCountP; document.getElementById("pageCount").value = 1; } } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings