File manager - Edit - /home/autoph/public_html/connect/home/prf_CancellAllPRFAndItems.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['loadSelectedPRF']); echo "<input type='hidden' id='userID' value='".$activeID."'>"; echo "<input type='hidden' id='activePRF' value='".$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; echo "<tr>"; 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>"; } echo "<tr>"; echo "<td colspan='5' style='width:100%;border:0px solid gray;padding:10px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:left;'>"; echo "<h4 style='margin-bottom:0px'>REASON / NOTES: </h4><textarea rows='2' type='text' placeholder='REASON IS REQUIRED' id='reasonsNiX' style='width:100%;border:1px solid red;background:yellow;padding:5px;padding-top:0px'></textarea>"; echo "</td>"; echo "</tr>"; ?> </table> </div> <?php if($counter > 0){ ?> <div style='width:100%;float:right;height:50px;padding:10px;background:white'> <button id='cancelPRFandItems' class='PopUpLowerButtonR' style='height:30px;padding:0px;width:140px;'>📑 CANCEL PRF</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#############################################################--> $("#cancelPRFandItems").click(function(){ // var activePRF= $("#activePRF").val(); var reasonsNiX= $("#reasonsNiX").val(); if(reasonsNiX===""){ alert("Invalid reason: Please input your reason to continue..."); return false; } if(confirm("WARNING: \n\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_CANCELPRfandItems.php", type: "POST", async: false, data: { "activePRF":activePRF, "reasonsNiX":reasonsNiX, "done": 1 }, success: function(d){ $("#prfItems").html(d); ShowUploadBar(); //alert('test'); } }) } }); }); function changePRFCatShow(){ $("#changePRFCatForm").fadeIn(500); } function changePRFCatHide(){ $("#changePRFCatForm").fadeOut(500); } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings