File manager - Edit - /home/autoph/public_html/connect/home/prf_CancellPRItemOnly.php
Back
<?php include 'core/init.php'; //$connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; //mysql_connect('localhost','root','aee1024') or die ($connect_error); //mysql_select_db('db_vts') or die($connect_error); //error_reporting(1); 193 * 1067 * 215 $prfDate = date_create() ->format("Y-m-d"); $prfTime = date('H:i:s'); $myDate = date_create() ->format("Y-m-d"); $activeID=$user_data['u_id']; if(isset($_POST['done'])){ $loadSelectedPRF = mysql_escape_string($_POST['loadSelectedPRFItemOnly']); echo "<input type='hidden' id='userID' value='".$activeID."'>"; echo "<input type='hidden' id='activePRF' value='".$loadSelectedPRF."'>"; echo "<input type='hidden' id='activeItem'>"; //echo "adfas" .$loadSelectedPRF; ?> <div style='width:100%;height:33px;background:white;float:left'> <table> <thead> <th style='width:5%'>REC.#</th> <th style='width:12%'>PRF.</th> <th style='width:60%'>ITEM DESCRIPTION</th> <th style='width:8%'>QTY</th> <th style='width:15%'>STATUS</th> </thead> </table> </div> <div id='prfItems' style='float:left;width:100%;margin-bottom:2px;padding:0px;font-family:Yu Gothic Bold;;color:black;border:1px solid gray;'> <table style='width:100%;border-collapse:collapse'> <?php $getItems = mysql_query("SELECT * FROM `prf_request_detl` WHERE `header_ref_code`='$loadSelectedPRF'"); while($row=mysql_fetch_array($getItems)){ $counter = $counter + 1; ?><tr onclick="javascript:getInfoX(this);" ><?php echo "<td style='width:5%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['id']."</td>"; echo "<td style='width:12%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['header_ref_code']."</td>"; echo "<td style='width:60%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:left;'>".$row['item_description']."</td>"; echo "<td style='width:8%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['quantity']."</td>"; echo "<td style='width:15%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:left;'>"; $stat=$row['item_status']; $staName = mysql_result(mysql_query("SELECT `status_name` FROM `prf_status` WHERE `sequence`='$stat'"),0); echo $staName; echo "</td>"; echo "</tr>"; } ?> </table> </div> <?php if($counter > 0){ ?> <div style='width:100%;float:right;height:50px;padding:10px;background:white'> <p id='activeDesription' style='float:left;width:100%;background:yellow;font-family:Calibri;height:30px;color:black;padding:4px;font-size:14px;margin-bottom:0px'></p> </div> <div style='width:100%;float:right;height:50px;padding:10px;background:white'> <textarea placeholder='Comment for cancellation' id='reasonForCancellation' rows=2 style='float:left;width:60%'></textarea> <button id='cancelPRFItemOnly' class='PopUpLowerButtonR' style='width:20%;float:right;height:50px;padding:0px;width:200px;margin-top:1px;margin-left:10%'>📑 CANCEL SELECTED ITEM</button> </div> <?php } else{ ?> <p style='text-align:center;padding:10px;margin:40px'>-- No Record Found --</p> <?php } } ?> <!-- 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 language="javascript" type="text/javascript"> $(document).ready(function(){ <!--######################################################################prf_changePRFExpenseSubType.php#############################################################--> $("#cancelPRFItemOnly").click(function(){ var activePRF= $("#activePRF").val(); var activeItem= $("#activeItem").val(); var reasonForCancellation= $("#reasonForCancellation").val(); //alert(reasonForCancellation); //return false; if(reasonForCancellation ==''){ Swal.fire('Error: You need to indicate the reasons why this item has been cancelled.') return false; } //alert(activeItem); if(confirm("WARNING: \n This action will cancel the selected PRF and all items associated to it. Please click OK to proceed or CANCEL to abort. .")){ ShowUploadBar(); $.ajax({ url: "prf_CANCELItemInPRF.php", type: "POST", async: false, data: { "reasonForCancellation":reasonForCancellation, "activePRF":activePRF, "activeItem":activeItem, "done": 1 }, success: function(d){ $("#prfItems").html(d); ShowUploadBar(); //alert('test'); } }) } }); }); function changePRFCatShow(){ $("#changePRFCatForm").fadeIn(500); } function changePRFCatHide(){ $("#changePRFCatForm").fadeOut(500); } function getInfoX(row) { var x=row.cells; document.getElementById("activeDesription").innerHTML = x[2].innerHTML; document.getElementById("activeItem").value = x[0].innerHTML; } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings