File manager - Edit - /home/autoph/public_html/connect/home/prfvendorview.php
Back
<?php include_once 'core/init.php'; $signedDate = date_create() ->format("Y-m-d"); $signedTime =date('H:i:s'); $ts = $signedDate ." ".$signedTime; if(isset($_GET['pid'])){ $myUID = $_GET['vid']; $poNum=$_GET['pid']; $poNumber=trim(str_replace(' ', '', $poNum)); //$myPONumber = str_replace(' ', '', $myPONumberA); $myToken=$_GET['token']; $key = $_GET['key']; $companyID = mysql_result(mysql_query("SELECT `comp_id` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $companyName = mysql_result(mysql_query("SELECT `comp_name` FROM `vts_company` WHERE `comp_id`='$companyID'"),0); $companyAddress = mysql_result(mysql_query("SELECT `comp_address` FROM `vts_company` WHERE `comp_id`='$companyID'"),0); $getPRFNumberFromDetl = mysql_result(mysql_query("SELECT `header_ref_code` FROM `prf_request_detl` WHERE `po_code`='$poNumber'"),0); $getPRFDealerID = mysql_result(mysql_query("SELECT `deal_id` FROM `prf_request_hdr` WHERE `reference_code`='$getPRFNumberFromDetl'"),0); $companyTIN = mysql_result(mysql_query("SELECT `comp_tin` FROM `vts_company` WHERE `comp_id`='$companyID'"),0); $dealerTIN = mysql_result(mysql_query("SELECT `deal_tin` FROM `vts_dealerships` WHERE `deal_id`='$getPRFDealerID'"),0); if($dealerTIN == ''){ $poTINNumber = $companyTIN; }else{ $poTINNumber = $dealerTIN; } $companyFax = mysql_result(mysql_query("SELECT `comp_fax` FROM `vts_company` WHERE `comp_id`='$companyID'"),0); $companyTel = mysql_result(mysql_query("SELECT `comp_tel` FROM `vts_company` WHERE `comp_id`='$companyID'"),0); $companyEmail = mysql_result(mysql_query("SELECT `comp_email` FROM `vts_company` WHERE `comp_id`='$companyID'"),0); $PODate = mysql_result(mysql_query("SELECT `date_posted` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $POTerms = mysql_result(mysql_query("SELECT `terms` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $POInstructions = mysql_result(mysql_query("SELECT `remarks` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $deliverDate = mysql_result(mysql_query("SELECT `delivery_date` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $supplierID = mysql_result(mysql_query("SELECT `vendor_id` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $SupplierName = mysql_result(mysql_query("SELECT `sup_name` FROM `prf_suppliers` WHERE `id`='$supplierID'"),0); $SupplierTIN = mysql_result(mysql_query("SELECT `tin_number` FROM `prf_suppliers` WHERE `id`='$supplierID'"),0); $SupplierAddress = mysql_result(mysql_query("SELECT `address` FROM `prf_suppliers` WHERE `id`='$supplierID'"),0); $SupplierContact = mysql_result(mysql_query("SELECT `contact_person` FROM `prf_suppliers` WHERE `id`='$supplierID'"),0); $SupplierTel = mysql_result(mysql_query("SELECT `landline` FROM `prf_suppliers` WHERE `id`='$supplierID'"),0); $SupplierContactMobile = mysql_result(mysql_query("SELECT `contact_person_mobile` FROM `prf_suppliers` WHERE `id`='$supplierID'"),0); $poApprovedByID =mysql_result(mysql_query("SELECT `approved_by` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $poApprovedByFName=mysql_result(mysql_query("SELECT `u_fname` FROM `vts_users` WHERE `u_id`='$poApprovedByID'"),0); $poApprovedByLName=mysql_result(mysql_query("SELECT `u_lname` FROM `vts_users` WHERE `u_id`='$poApprovedByID'"),0); $chkBy = mysql_result(mysql_query("SELECT `checked_by` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $MyAPIcode = mysql_result(mysql_query("SELECT `SMSAPICode` FROM `asa_versioning_db` WHERE `type`='Live'"),0); $MyPasswd = mysql_result(mysql_query("SELECT `SMSAPIPass` FROM `asa_versioning_db` WHERE `type`='Live'"),0); $ckhToken = $_GET['token']; $liveToken = mysql_result(mysql_query("SELECT `token` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); //echo $ckhToken ." - ".$liveToken; if($liveToken != $ckhToken){ echo "<center><p style='font-family:Yu Gothic Light;font-size:1.5vw;color:red;padding-top:100px'>This record does not exist. <br><br>Please contact your system administrator for assistance. Thank you <br><br> Date: ".date("m/d/Y")." | ".date("h:m:s AM/PM")."</p></center>"; exit; } $sendKey = mysql_result(mysql_query("SELECT COUNT(id) FROM `prf_validate_links` WHERE `uid`='$myUID' AND `code`='$key' AND `po_code`=$poNumber"),0); if($sendKey == 0){ echo "<center><p style='font-family:Yu Gothic Light;font-size:1.5vw;color:red;padding-top:100px'>This record does not exist. <br><br>Please contact your system administrator for assistance. Thank you <br><br> Date: ".date("m/d/Y")." | ".date("h:m:s AM/PM")."</p></center>"; exit; } mysql_query("UPDATE `prf_purchase_order` SET `vendor_confirm_ts`='$ts' WHERE `po_number`=$poNumber AND `vendor_confirm_ts`=''"); $otpDate = mysql_result(mysql_query("SELECT `otp_approval_start` FROM `prf_purchase_order` WHERE `po_number`=$poNumber AND `token`='$myToken'"),0); //echo $otpDate ." -".$signedDate; if($signedDate != $otpDate){ $otp= Rand(100001, 999999); //echo $otp; mysql_query("UPDATE `prf_purchase_order` SET `max_otp_approval`='0',`otp_approval`='$otp',`otp_approval_start`='$signedDate' WHERE `po_number`=$poNumber AND `token`='$myToken'"); $SMSMessage = "Your OTP Code is ".$otp. ". Valid within 24 hours only."; $empMobile = mysql_result(mysql_query("SELECT `usr_mobile` FROM `vts_users` WHERE `u_id`='$chkBy'"),0); //$result = itexmo($empMobile, $SMSMessage,$MyAPIcode,$MyPasswd); $result = itexmoAA($empMobile, $SMSMessage,$MyAPIcode,$MyPasswd); if ($result == ""){ //echo '<script>alert("No response from SMS server. SMS failed to send")</script>'; }else if ($result == 0){ //echo "SMS Sent!"; } else{ //echo "Error Num ". $result . " was encountered!"; } } $myOTPC = mysql_result(mysql_query("SELECT `otp_validation` FROM `prf_purchase_order` WHERE `po_number`=$poNumber AND `token`='$myToken'"),0); ?><center> <style> .aprbutton{ float:right; width:100%; border-radius:5px; font-family:Yu Gothic Light; font-size:14px; color: #ffffff; font-weight:normal; margin:3px; cursor:pointer; background:#ef4901; padding:5px; border:2px solid white; margin-bottom:5px; } .aprbutton:hover{ float:right; width:100%; border-radius:5px; font-family:Yu Gothic Light; font-size:14px; color:#ffffff; font-weight:bold; margin:3px; margin-bottom:5px; cursor:pointer; background:#ef2901; padding:5px; border:2px solid white; } .popup { position: fixed; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); height:200px; padding:10px; border-radius:10px; width:350px; background:#fff; border:1px solid red; display:none; } .buttonOTP{ padding:10px; border-radius:5px;border:1px solid #f11806;background:#f0670e;color:white;width:80%;margin-left:30px;margin-right:30px;font-size:14px } .buttonOTP:hover{ padding:10px; border-radius:5px;border:1px solid #f11806;background:#f11806;color:white;font-weight:bold;width:80%;margin-left:30px;margin-right:30px;font-size:14px; } .buttonOTPX{ float:right;padding:5px;border-radius:5px;border:1px solid #f11806;background:#fff;color:white } .buttonOTPX:hover{ float:right;padding:5px;border-radius:5px;border:1px solid #f11806;background:#fff;color:white;font-weight:bold } </style> <input type='hidden' id='myUID' value='<?php echo $myUID;?>'> <input type='hidden' id='SignedDate' value='<?php echo $signedDate;?>'> <input type='hidden' id='SignedTime' value='<?php echo $signedTime;?>'> <input type='hidden' id='tokenKey' value='<?php echo $myToken;?>'> <input type='hidden' id='myPONumber' value='<?php echo $poNumber;?>'> <!--####################################################################--> <!--####################################################################--> <div id='topMessage' style='border-radius:5px;z-index:9999999999999;position:fixed; top:10px;left:10px;width:400px;height:60px;background:yellow;border:solid 2px #efdd01 ;display:none;padding:15px;font-family:Yu Gothic Light;font-size:1vw;color:black'> PO Validation LINK has been sent to all officers using their register mobile and e-mail address. </div> <!--####################################################################--> <?php $poStatus = mysql_result(mysql_query("SELECT `po_status` FROM `prf_purchase_order` WHERE `po_number`='$poNumber'"),0); if($poStatus == 9){ echo "<div style='display:block;position:absolute;top:45%;left:0%;width:100%;height:35%;border:0px solid red;background:transparent;-webkit-transform: rotate(-30deg); -moz-transform: rotate(-30deg); '> <p style='font-family:Tamoma;font-size:100px;color:red;padding:5px;margin:0px;opacity:9;text-shadow:1px 1px black'>Cancelled P.O</p> </div>"; } ?> <!--####################################################################--> <div style='padding:10px;margin:0%;width:60%;min-width:750px;border:0px solid gray;min-height:950px;background:white'> <div style='float:left;width:100%;height:auto;background:white;border:0px solid gray;margin-bottom:2px'> <div style='width:40%;min-width:200px;height:100px;float:left;border:0px solid gray;padding:10px;text-align;left'> <img src='images/autohub_logo_2016.png' width="auto" height="auto" style='float:left' /> <p style='float:left;width:100%; text-align:left;margin-top:5px;font-family:Yu Gothic Light;font-size:10px'>Website: https://www.autohubgroup.com</p> </div> <div style='width:55%;min-width:400px;height:100px;float:right;border:0px solid gray;padding:0px;text-align;right'> <div style='background:white;width:50%;height:100px;float:right;border:0px solid gray;padding:10px;text-align;left'> <?php echo "<b style='font-family:Yu Gothic Light;font-size:12px;font-weight:normal;float:left;text-align:left'> ".$companyAddress."</b>"; echo "<b style='font-family:Yu Gothic Light;font-size:12px;font-weight:normal;float:left;text-align:left'>TEL. NO. ".$companyTel." Fax." .$companyFax."</b>"; echo "<b style='font-family:Yu Gothic Light;font-size:12px;font-weight:normal;float:left;text-align:left'>E-MAIL: ".$companyEmail."</b>"; ?> </div> </div> </div> <div style='float:left;width:100%;height:auto;background:white;border:0px solid gray;margin-bottom:5px'> <div style='width:99.2%;padding:3px;font-family:Yu Gothic Bold;font-size:18px;font-weight:bold;color:black;border:1px solid gray'> - PURCHASE ORDER - </div> <div style='width:99.2%;padding:3px;font-family:Yu Gothic Bold;font-size:1.5vw;font-weight:bold;color:black;border:0px solid gray'> <table style='width:100%;border-collapse:collapse'> <tr> <td style='width:18%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold'>SUPPLIER NAME:</td> <td style='width:42%;border:0px;border-bottom:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px'><?php echo $SupplierName;?></td> <td style='width:15%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;text-align:right;font-weight:bold'>PO NUMBER:</td> <td style='width:20%;border:0px;border-bottom:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px;padding-left:10px'><?php echo $poNumber;?></td> </tr> <tr> <td style='width:18%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold'>ADDRESS:</td> <td style='width:42%;border:0px;border-bottom:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px'><?php echo $SupplierAddress;?></td> <td style='width:15%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;text-align:right;font-weight:bold'>PO DATE:</td> <td style='width:20%;border:0px;border-bottom:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px;padding-left:10px'><?php echo $PODate;?></td> </tr> <tr> <td style='width:18%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold'>CONTACT PERSON:</td> <td style='width:42%;border:0px;border-bottom:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px'><?php echo $SupplierContact;?></td> <td style='width:15%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;text-align:right;font-weight:bold'>TERMS:</td> <td style='width:20%;border:0px;border-bottom:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px;padding-left:10px'><?php echo $POTerms." Days";?> </td> </tr> <tr> <td style='width:18%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold'>TEL. NUMBER:</td> <td style='width:42%;border:0px;border-bottom:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px'><?php echo $SupplierTel;?></td> <td style='width:15%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;text-align:right;font-weight:bold'>CONTACT MOBILE #:</td> <td style='width:20%;border:0px;border-bottom:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px;padding-left:10px'><?php echo $SupplierContactMobile;?></td> </tr> </table> </div> </div> <div style='float:left;width:99.2%;height:100px;background:white;border:1px solid gray;margin-bottom:2px'> <table style='width:100%;border-collapse:collapse;height:auto'> <tr> <td style='width:18%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold'>PLEASE INVOICE TO:</td> <td style='width:60%;border:1px solid gray;border-top:0px;padding:1px;font-family:Yu Gothic Light;font-size:16px;font-weight:bold;text-align:center'><?php echo strtoupper($companyName);?></td> <td style='width:20%;border:0px;border-bottom:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;'></td> </tr> <tr> <td style='width:18%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold'>TIN NUMBER:</td> <td style='width:60%;border:0px;border-bottom:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px'><?php echo $poTINNumber;?></td> <td style='width:20%;border:0px;border-bottom:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;padding-left:10px'></td> </tr> <tr> <td style='width:18%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold'>DELIVERY DATE:</td> <td style='width:60%;border:0px;border-bottom:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px'><?php echo $deliverDate;?></td> <td style='width:20%;border:0px;border-bottom:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;padding-left:10px'> </td> </tr> <tr> <td style='width:18%;border:0px;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold'>INSTRUCTIONS:</td> <td style='width:60%;border:0px;border-bottom:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:13px'><?php echo $POInstructions;?></td> <td style='width:20%;border:0px;border-bottom:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;padding-left:10px'> </td> </tr> </table> </div> <div style='float:left;width:100%;height:485px;background:white;border:0px solid gray;margin-bottom:2px'> <div style='width:100%;padding:0px;font-family:Yu Gothic Bold;font-size:0.8vw;font-weight:bold;color:black;border:0px solid gray;height:25px;background:lightgray'> <table style='width:100%;border-collapse:collapse'> <tr> <td style='width:8%;border:1px solid gray;padding:2px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold;text-align:center'>QTY</td> <td style='width:8%;border:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold;text-align:center'>UNIT</td> <td style='width:60%;border:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold;text-align:center'>DESCRIPTION</td> <td style='width:10%;border:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold;text-align:center'>UNIT COST</td> <td style='width:14%;border:1px solid gray; padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold;text-align:center'>AMOUNT</td> </tr> </table> </div> <div style='float:left;width:99.8%;margin-bottom:2px;padding:0px;font-family:Yu Gothic Bold;font-size:1.5vw;font-weight:bold;color:black;border:1px solid gray;height:430px'> <table style='width:100%;border-collapse:collapse'> <?php $getPOItems = mysql_query("SELECT * FROM `prf_request_detl` WHERE `po_code`=$poNumber AND `deleted`=0 AND `po_code_posted`=1"); while($row=mysql_fetch_array($getPOItems)){ $itmID=$row['id']; $itemSpecs = mysql_result(mysql_query("SELECT `item_specs` FROM `prf_canvass_sheet` WHERE `item_id` = '$itmID' AND `item_specs`=''"),0); echo "<tr>"; echo "<td style='width:8%;border:0px solid gray;border-right:1px solid gray;padding:5px;font-family:Yu Gothic Light;font-size:12px;font-weight:normal;text-align:center;border-bottom:1px solid gray;'>".$row['approved_qty']."</td>"; echo "<td style='width:8%;border:0px solid gray;border-right:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:normal;text-align:center;border-bottom:1px solid gray;'>".$row['uom']."</td>"; echo "<td style='width:60%;border:0px solid gray;border-right:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:normal;text-align:left;border-bottom:1px solid gray;padding-left:5px'>".strtoupper($row['item_description'])." ".$itemSpecs."</td>"; echo "<td style='width:10%;border:0px solid gray;border-right:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:normal;text-align:right;padding-right:5px;border-bottom:1px solid gray;'>".number_format($row['approved_amount'],2,'.',',')."</td>"; echo "<td style='width:14%;border:0px solid gray;border-right:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:normal;text-align:right;padding-right:5px;border-bottom:1px solid gray;'>".number_format(($row['approved_amount'] * $row['approved_qty']),2,'.',',') ."</td>"; echo "</tr>"; $CostPrice = $row['approved_amount']* $row['approved_qty']; $totalAmount = $totalAmount + $CostPrice; } ?> </table> <p style='text-align:center;font-family:Yu Gothic Light;font-size:12px'>* * * NOTHING FOLLOWS * * *</p> <?php $getPRFNumber=mysql_query("SELECT * FROM `prf_request_detl` WHERE `po_code`=$poNumber GROUP BY `header_ref_code`"); echo "<p style='font-family:Yu Gothic Light;font-size:12px;color:gray;padding:10px;padding-bottom:0px;margin:2px;float:left;margin-right:20px;font-weight:bold;width:100%;text-align:left'>PRF NUMBER:</p>"; while($prf = mysql_fetch_array($getPRFNumber)){ $refCode= $prf['header_ref_code']; echo "<p style='font-family:Yu Gothic Light;font-size:12px;color:gray;padding:10px;padding-top:0px;margin:2px;float:left;margin-right:20px;font-weight:normal'>#".$refCode.",</p>"; } ?> </div> <div style='float:left;width:100%;padding:0px;font-family:Yu Gothic Bold;font-size:0.8vw;font-weight:bold;color:black;border:0px solid gray;height:25px;background:lightgray;margin-bottom:0px'> <table style='width:100%;border-collapse:collapse'> <tr> <td style='width:8%;border:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold'></td> <td style='width:8%;border:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;font-weight:bold;'></td> <td style='width:60%;border:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:12px;'></td> <td style='width:10%;border:1px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:14px;font-weight:bold;text-align:center'>TOTAL</td> <td style='width:14%;border:1px solid gray; padding:1px;font-family:Yu Gothic Light;font-size:14px;font-weight:bold;text-align:right;padding-right:10px'><?php echo number_format($totalAmount,2,'.',',');?></td> </tr> </table> </div> </div> <!--<div style='float:left;width:97.8%;height:100px;background:white;border:0px solid gray;margin-bottom:2px;margin-top:0px;padding:10px'> <p style='font-family:Yu Gothic Light;font-size:10px;padding:1px;margin:0px;float:left;width:100%;text-align:left;font-weight:bold'>CONDITIONS:</p> <p style='font-family:Yu Gothic Light;font-size:10px;padding:1px;margin:0px;float:left;width:100%;text-align:left;padding-left:20px;'>1) All items and/or services shall b e in accordance with specifications stated and/or qouted.</p> <p style='font-family:Yu Gothic Light;font-size:10px;padding:1px;margin:0px;float:left;width:100%;text-align:left;padding-left:20px;'>2) All prices stated are protected from any increase and advice us immediately of any shortage or delay in delivery.</p> <p style='font-family:Yu Gothic Light;font-size:10px;padding:1px;margin:0px;float:left;width:100%;text-align:left;padding-left:20px;'>3) We reserve the right to return any goods or reject any service upon discovery of defects not apparent at time of receipt</p> <p style='font-family:Yu Gothic Light;font-size:10px;padding:1px;margin:0px;float:left;width:100%;text-align:left;padding-left:20px;'>4) To ensure payment according to above terms, submit a duplicate of the origanal invoice immediately upon delivery and acceptance.</p> <p style='font-family:Yu Gothic Light;font-size:10px;padding:1px;margin:0px;float:left;width:100%;text-align:left;padding-left:20px;'>5) Terms of payment shall commence from date order has been fully delivered.</p> <i style='font-family:Yu Gothic Light;font-size:9px;padding:1px;margin:0px;float:left;width:100%;text-align:left;padding-left:0px;'>*The Seller/Provider unconditionally warrants that the provision of service and /or products is made in good faith and in full compliance with existing laws. The Seller / Provider shall be solely liable for, indemnity and hold Autohub Group Holdings, Inc. and its affiliates free and harmless from any and all liability, claim, causes of action, less and or damage arising from any provisions of service.</i> </div> --> <div style='float:left;width:100%;height:100px;background:white;border:0px solid gray;margin-bottom:2px'> <div style='float:left;width:27%;height:90px;background:white;border:0px solid gray;margin:5px;margin-right:15px'> <div style='font-family:Yu Gothic Light;font-size:12px;text-align:left;float:left;width:95%;height:20px;background:white;border:0px solid gray;margin:1px;margin-bottom:0px;margin-top:15px'> Prepared By: </div> <div style='font-family:Yu Gothic Light;font-size:13px;text-align:center;float:left;width:95%;height:15px;background:white;border:0px solid gray;margin:1px;margin-top:0px;border-bottom:1px solid gray;;margin-top:10px;padding:5px'> <?php $datePosted = mysql_result(mysql_query("SELECT `date_posted` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $timePosted = mysql_result(mysql_query("SELECT `time_created` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); echo "Signed: ".$datePosted." - ".$timePosted; ?> </div> <div style='font-family:Yu Gothic Light;font-size:13px;text-align:center;float:left;width:95%;height:15px;background:white;border:0px solid gray;margin:1px;margin-top:0px'> <?php $getPreparedPOBy = mysql_result(mysql_query("SELECT `created_by` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $getPreparedByFNAme =mysql_result(mysql_query("SELECT `u_fname` FROM `vts_users` WHERE `u_id`='$getPreparedPOBy'"),0); $getPreparedByLNAme =mysql_result(mysql_query("SELECT `u_lname` FROM `vts_users` WHERE `u_id`='$getPreparedPOBy'"),0); echo strtoupper($getPreparedByLNAme).", ".strtoupper($getPreparedByFNAme); ?> </div> </div> <div style='float:left;width:27%;height:90px;background:white;border:0px solid gray;margin:5px;margin-right:15px'> <div style='font-family:Yu Gothic Light;font-size:12px;text-align:left;float:left;width:95%;height:20px;background:white;border:0px solid gray;margin:1px;margin-bottom:0px;margin-top:15px'> Checked By: </div> <div style='font-family:Yu Gothic Light;font-size:13px;text-align:center;float:left;width:95%;height:15px;background:white;border:0px solid gray;margin:1px;margin-top:0px;border-bottom:1px solid gray;;margin-top:10px;padding:5px'> <?php $dateChecked = mysql_result(mysql_query("SELECT `date_checked` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $timeChecked = mysql_result(mysql_query("SELECT `time_checked` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); if($dateChecked!=''){ echo "Signed: ".$dateChecked." - ".$timeChecked; }else{ ?><button id='checkButtonUID' class='aprButton' onclick="javascript:showsmsOTP();">Checked & Validated</button><?php } ?> </div> <div style='font-family:Yu Gothic Light;font-size:12px;text-align:center;float:left;width:95%;height:15px;background:white;border:0px solid gray;margin:1px;margin-top:0px'> <?php $getCheckedBy = mysql_result(mysql_query("SELECT `checked_by` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $getPreparedByFNAme =mysql_result(mysql_query("SELECT `u_fname` FROM `vts_users` WHERE `u_id`='$getCheckedBy'"),0); $getPreparedByLNAme =mysql_result(mysql_query("SELECT `u_lname` FROM `vts_users` WHERE `u_id`='$getCheckedBy'"),0); echo strtoupper($getPreparedByLNAme).", ".strtoupper($getPreparedByFNAme); ?> </div> </div> <div style='float:left;width:27%;height:90px;background:white;border:0px solid gray;margin:5px'> <div style='font-family:Yu Gothic Light;font-size:12px;text-align:left;float:left;width:95%;height:20px;background:white;border:0px solid gray;margin:1px;margin-bottom:0px;margin-top:15px'> Approved By: </div> <div style='font-family:Yu Gothic Light;font-size:13px;text-align:center;float:left;width:95%;height:15px;background:white;border:0px solid gray;margin:1px;margin-top:0px;border-bottom:1px solid gray;;margin-top:10px;padding:5px'> <?php $dateApproved = mysql_result(mysql_query("SELECT `date_approved` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $timeApproved = mysql_result(mysql_query("SELECT `time_approved` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); $approvedBy = mysql_result(mysql_query("SELECT `approved_by` FROM `prf_purchase_order` WHERE `po_number`=$poNumber"),0); if($approvedBy != 0 && $dateApproved!=''){ echo "Signed: ".$dateApproved." - ".$timeApproved; }else{ ?><button id='checkButtonUID' class='aprButton' onclick="javascript:showsmsOTP();">Sign & Approve PO</button><?php } ?> </div> <div style='font-family:Yu Gothic Light;font-size:12px;text-align:center;float:left;width:95%;height:25px;background:white;border:0px solid gray;margin:1px;margin-top:0px'> <?php echo strtoupper($poApprovedByLName).", ".strtoupper($poApprovedByFName); ?> </div> </div> </div> </div> <div id='OTPStatus' style='width:100%;height:10px;float:left;padding:5px;font-family:Yu Gothic Light;font-size:14px;background:white;padding:10px;font-weight:normal;color:black'> ***This is a System Generated document. Physical Signature might not be required*** </div> </center> <div id='smsOTP' class='popup'> <div style='width:100%;height:20%;float:left;padding:5px;padding-top:0px'> <button id='sendOTPXXX' onclick="javascript:hidesmsOTP();" class='buttonOTPX'>❌</button> </div> <div style='width:100%;height:50%;float:left;padding:5px'> <input type='text' id='MyTOPCode' style='margin-left:30px;margin-right:30px;padding:8px;font-family:Yu Gothic Light;font-weight:bold;font-size:18px;color:blue;border:1px solid gray;width:80%;text-align:center'> <p style='font-family:Yu Gothic Light;font-size:13px;color:black;font-weight:normal;width:80%;margin-right:30px;margin-left:30px;padding-top:0px;margin-top:0px'>Type the OTP Code sent to your registered Mobile Number. <b id='resendOTP' style='padding:2px;margin:2px;cursor:pointer'>♻ Resend OTP</b></p> </div> <div style='width:100%;height:30%;float:left;padding:5px'> <button id='sendOTP' class='buttonOTP'>SUBMIT</button> </div> </div> <?php } ?> <!--#########################################################################--> <div id="loadBaraData" style="display:none;position:absolute;top:40%;left:45%;width:50px;padding:5px;padding-left:2px;padding-right:2px;height:50px;background:transparent;z-index:9999;border:0px solid gray;z-index:999999999999999999"> <div id="uploadBar" style="font-family:Calibri;font-size:14px;color:gray;text-align:center;margin-top:0px;background:white;display:block;width:100px;height:95px;border-radius:10px;position:relative;left:5px;padding:8px;z-index:999999999999999999;border:1px solid lightgray"> <img src='images/ajaxLoader2.gif' width="auto" height="auto" /><br><br><center>Please wait<center></div> </div> </div> <!--#########################################################################--> <!--- 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="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#sendOTP").click(function(){ var SignedDate = $("#SignedDate").val(); var SignedTime = $("#SignedTime").val(); var MyTOPCode = $("#MyTOPCode").val(); var tokenKey = $("#tokenKey").val(); var myPONumber = $("#myPONumber").val(); var myUID = $("#myUID").val(); //alert(myUID); //exit; if(MyTOPCode == ''){ alert('ERROR: Invalid OTP Code.'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_approvedPO.php", type: "POST", async: false, data: { "myUID": myUID, "SignedDate": SignedDate, "SignedTime": SignedTime, "tokenKey": tokenKey, "myPONumber": myPONumber, "MyTOPCode": MyTOPCode, "done": 1 }, success: function(d){ hidesmsOTP(); ShowUploadBar(); showtopMessage(); $("#topMessage").html(d); $('#checkButtonUID').hide(); } }) }); //########################################################################################################################################### //########################################################################################################################################### $("#resendOTP").click(function(){ var tokenKey = $("#tokenKey").val(); var myPONumber = $("#myPONumber").val(); var myUID = $("#myUID").val(); var myUID = $("#myUID").val(); //alert(myUID); //exit; if(MyTOPCode == ''){ alert('ERROR: Invalid OTP Code.'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_resendOTP.php", type: "POST", async: false, data: { "myUID": myUID, "tokenKey": tokenKey, "myPONumber": myPONumber, "done": 1 }, success: function(d){ hidesmsOTP(); ShowUploadBar(); msgFadeOut(); $("#OTPStatus").html(d); } }) }); //########################################################################################################################################### //########################################################################################################################################### }); function hidetopMessage(){ $("#topMessage").fadeOut(20800); } function showtopMessage(){ $("#topMessage").fadeIn(100); hidetopMessage(); } function msgFadeOut(){ $("#OTPStatus").fadeOut(15000); } function hidesmsOTP(){ $("#smsOTP").fadeOut(500); } function showsmsOTP(){ $("#smsOTP").fadeIn(500); } function ShowUploadBar() { var div = document.getElementById("loadBaraData"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none' } } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings