File manager - Edit - /home/autoph/public_html/connect/home/PRF_PostedForDeptHeadApproval.php
Back
<?php include 'core/init.php'; $activeID=$user_data['u_id']; if(isset($_POST['done'])){ $UpdatePRFReferenceNumber = mysql_escape_string($_POST['ActionReferenceID']); $approvalCode = mysql_escape_string($_POST['approvalCode']); $DisApprovalCode = mysql_escape_string($_POST['DisApprovalCode']); $getCompanyID = mysql_result(mysql_query("SELECT comp_id FROM prf_request_hdr WHERE reference_code='$UpdatePRFReferenceNumber'"),0); $getCompanyName = mysql_result(mysql_query("SELECT comp_name FROM vts_company WHERE comp_id='$getCompanyID'"),0); $getDealerID = mysql_result(mysql_query("SELECT deal_id FROM prf_request_hdr WHERE reference_code='$UpdatePRFReferenceNumber'"),0); $getDealerName = mysql_result(mysql_query("SELECT deal_name FROM vts_dealerships WHERE deal_id='$getDealerID'"),0); $getCategoryID = mysql_result(mysql_query("SELECT category_id FROM prf_request_hdr WHERE reference_code='$UpdatePRFReferenceNumber'"),0); $getCategoryName = mysql_result(mysql_query("SELECT description FROM prf_expensecategory WHERE id='$getCategoryID'"),0); $getSubCatID = mysql_result(mysql_query("SELECT sub_category_id FROM prf_request_hdr WHERE reference_code='$UpdatePRFReferenceNumber'"),0); $getSubCatName = mysql_result(mysql_query("SELECT description FROM prf_expenseitems WHERE id='$getSubCatID'"),0); $getdeptHeadID = mysql_result(mysql_query("SELECT dept_head_id FROM prf_request_hdr WHERE reference_code='$UpdatePRFReferenceNumber'"),0); $getdeptHeadFName = mysql_result(mysql_query("SELECT u_fname FROM vts_users WHERE u_id ='$getdeptHeadID'"),0); $getdeptHeadLName = mysql_result(mysql_query("SELECT u_lname FROM vts_users WHERE u_id ='$getdeptHeadID'"),0); $dateNeeded = mysql_result(mysql_query("SELECT date_needed FROM prf_request_hdr WHERE reference_code='$UpdatePRFReferenceNumber'"),0); $purpose = mysql_result(mysql_query("SELECT purpose_of_request FROM prf_request_hdr WHERE reference_code='$UpdatePRFReferenceNumber'"),0); } ?> <input type='hidden' id="UpdateReferenceHeaderCode" value='<?php echo $UpdatePRFReferenceNumber;?>'> <input type='hidden' id="myApprovalCode" value='<?php echo $approvalCode;?>'> <input type='hidden' id="myDisApprovalCode" value='<?php echo $DisApprovalCode;?>'> <div class='PRFdropItemSelectionContainer'> <div class='PRFdropItemSelection'> <p class='buttonTitle'>Select Company:</p> <select disabled id='UpdateprfCompanySelected' class='DropDownButton' onchange="showDealership(this.value)"> <?php echo "<option value='".$getCompanyID."'>".strToupper($getCompanyName)."</option>"; ?> </select> </div> <div class='PRFdropItemSelection'> <p class='buttonTitle'>Select Dealer:</p> <select disabled id='UpdatemyDealerList' class='DropDownButton' > <?php echo "<option value='".$getDealerID."'>".strToupper($getDealerName)."</option>"; ?> </select> </div> <div class='PRFdropItemSelection'> <p class='buttonTitle'>Select Expense Category:</p> <select disabled id='UpdateprfCategorySelected' class='DropDownButton' onchange="showCategoryItems(this.value)"> <?php echo "<option value='".$getSubCatID."'>".strToupper($getCategoryName)."</option>"; ?> </select> </div> <div class='PRFdropItemSelection'> <p class='buttonTitle'>Expense Type:</p> <select disabled id='UpdateCategorySubItem' class='DropDownButton' > <?php echo "<option value='".$getCategoryID."'>".strToupper($getSubCatName)."</option>"; ?> </select> </div> </div> <div class='PRFdropItemSelectionContainer'> <div class='PRFdropItemSelection' style='width:50%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Purpose of Request:</p> <input disabled type='text' id='UpdatePurposeOfReqeust' class='DropDownButton' value='<?php echo $purpose;?>'style='margin:0px;'> </div> <div class='PRFdropItemSelection' style='width:25%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Date Needed:</p> <input disabled type='date' id='UpdateDateNeeded' value='<?php echo $dateNeeded;?>'> </div> <div class='PRFdropItemSelection' style='width:25%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Approving Head:</p> <select disabled id='UpdateprfApprovingHead' class='DropDownButton' style='margin:0px;' > <?php echo "<option value='".$getdeptHeadID."'>".strToupper($getdeptHeadLName).", ".strToupper($getdeptHeadFName)."</option>"; ?> </select> </div> </div> <div class='PRFAddNewItem'> <div class='PRFdropItemSelection' style='width:50%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Item Description:</p> <input type='text' disabled id='UpdatetxtAddItemDesc' class='DropDownButton' style='margin:0px;'> </div> <div class='PRFdropItemSelection' style='width:15%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Quantity:</p> <input type='number' disabled value='1' id='UpdatetxtAddItemQty' min="1" class='DropDownButton' style='margin:0px;'> </div> <div class='PRFdropItemSelection' style='width:15%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>UoM:</p> <select disabled id='UpdateUnitOfMeasure' class='DropDownButton' style='margin:0px;' > <option value='0'>-- Select --</option> <?php $getCompanyAccess = mysql_query("SELECT * FROM PRF_UoM WHERE status =1 ORDER BY Description ASC "); while($row=mysql_fetch_array($getCompanyAccess)){ echo "<option value='".$row['description']."'>".strToupper($row['description'])."</option>"; } ?> </select> </div> <div class='PRFdropItemSelection' style='width:20%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'></p> <button disabled class='InsertButton' style='background:lightgray;color:gray'>➕ Add Item</button> </div> </div> <div class='PRFNewTableBody' id='UpdatePRFItemBody'> <?php $getItemDetl = mysql_query("SELECT * FROM prf_request_detl WHERE header_ref_code='$UpdatePRFReferenceNumber' AND `deleted` = 0"); echo "<table>"; echo "<thead>"; echo "<th style='width:100px'>Rec.#</th>"; echo "<th style='width:160px'>REF. #</th>"; echo "<th style='width:320px'>ITEM DESCRIPTION</th>"; echo "<th style='width:50px'>UoM</th>"; echo "<th style='width:50px'>QUANTITY</th>"; echo "</thead>"; while($row=mysql_fetch_array($getItemDetl)){ $count = $count + 1; ?><tr onClick ="javascript:showPRFUpdateItemOnly(this);" onDblclick="javascript:showFollowUpAssetItemOnly(this);"><?php echo "<td>".$row['id']."</td>"; echo "<td>".strtoupper($row['header_ref_code'])."</td>"; echo "<td>".strtoupper($row['item_description'])."</td>"; echo "<td>".strtoupper($row['uom'])."</td>"; echo "<td style='text-align:center'>".strtoupper($row['quantity'])."</td>"; echo "</tr>"; } echo "</table>"; ?> </div> <script type="text/javascript"> function hideActionViewDelete(){ $("#showActionViewDelete").fadeOut(500); }; function hideDeleteAction(){ $("#PRFDELETENewRequest").fadeOut(500); }; function showDeleteAction(){ $("#PRFDELETENewRequest").fadeIn(500); }; function hideDisApprovedConfirmationBox(){ $("#PRFDisApprovedCOnfirmation").fadeOut(500); }; function showDisApprovedConfirmationBox(){ $("#PRFDisApprovedCOnfirmation").fadeIn(500); }; function hideApprovedConfirmationBox(){ $("#PRFApprovedCOnfirmation").fadeOut(500); }; function showApprovedConfirmationBox(){ $("#PRFApprovedCOnfirmation").fadeIn(500); }; function showPRFUpdateItemOnly(row) { var x=row.cells; //document.getElementById("cancelThisItem").innerHTML = x[1].innerHTML; document.getElementById("cancelThisItem").value = x[0].innerHTML; document.getElementById("cancelThisRefCode").value = x[1].innerHTML; document.getElementById("updateReqQTY").value = x[4].innerHTML; } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings