whoami7 - Manager
:
/
home
/
gracious
/
ledgerless.graciousphils.com
/
Upload File:
files >> /home/gracious/ledgerless.graciousphils.com/forFund.php
<!doctype html> <?php include 'connection.php'; if(isset($_SESSION['user']) && $_SESSION['position'] == 2){ ?> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.1/css/bootstrap.min.css"/> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.25/css/jquery.dataTables.min.css"/> <link rel="stylesheet" type="text/css" href="styles.css"> <title>PAL+</title> <style type="text/css"> .dataTables_filter { margin-bottom: 5px; } </style> </head> <body> <?php include 'navBar.php'; ?> <?php $st = $pdo->prepare("select * FROM tblrequests where status = 'For Transfer' ORDER BY dateRequested ASC"); $st->execute(); ?> <br> <div class="container-fluid"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12"> <table id="example" class="table table-bordered display compact" style="width: 100%;"> <thead> <tr class="text-center table-dark"> <th>Client ID</th> <th>Client Name</th> <th>Sales Office</th> <th>Transaction Type</th> <th>Cashout</th> <th>Mode of Transfer</th> <th>Account Number</th> <th>Account Name</th> <th>Call Representative</th> <th>Remarks</th> <th>Service Reference/<br>Reference Number</th> <th>Total Amount</th> <th>Funding Account</th> <th>Actions</th> </tr> </thead> <tbody> <?php while ($data = $st->fetch()) { if($data['clientType'] == "EMPLOYEE REFERRAL"){ ?> <tr class="text-center" style="color: green; font-weight: bold;"> <?php } else{ ?> <tr class="text-center"> <?php } ?> <td><?php echo $data['clientNumber'];?></td> <td><?php echo $data['clientName'];?></td> <td><?php echo $data['salesOffice'];?></td> <td><?php echo $data['transactionType'];?></td> <td><?php echo $data['transactionCashout'];?></td> <?php $query = "select clientNumber, modeTransfer, LAG(modeTransfer) OVER (PARTITION BY clientNumber ORDER BY dateRequested) AS pastMode FROM tblrequests WHERE clientNumber = '" . $data['clientNumber'] . "' and status = 'Completed' ORDER BY dateRequested DESC LIMIT 1"; $st1 = $pdo->prepare($query); $st1->execute(); $prevMode = ""; while($data1 = $st1->fetch()){ $prevMode = $data1['pastMode']; } if($data['modeTransfer'] == $prevMode){ if($data['modeTransfer'] == "PAYMAYA"){ ?> <td style="color:green"><?php echo $data['modeTransfer'];?></td> <?php } else{ ?> <td><?php echo $data['modeTransfer'];?></td> <?php } } else{ if($data['modeTransfer'] == "PAYMAYA"){ ?> <td style="color:green"><?php echo $data['modeTransfer'];?></td> <?php } else{ ?> <td style="color:red"><?php echo $data['modeTransfer'];?></td> <?php } } ?> <?php $query = "select clientNumber, accountNumber, LAG(accountNumber) OVER (PARTITION BY clientNumber ORDER BY dateRequested) AS pastAccount FROM tblrequests WHERE clientNumber = '" . $data['clientNumber'] . "' and status = 'Completed' ORDER BY dateRequested DESC LIMIT 1"; $st1 = $pdo->prepare($query); $st1->execute(); $prevAccountNumber = ""; while($data1 = $st1->fetch()){ $prevAccountNumber = $data1['pastAccount']; } if($data['accountNumber'] == $prevAccountNumber){ ?> <td><?php echo $data['accountNumber'];?></td> <?php } else{ ?> <td style="color:red"><?php echo $data['accountNumber'];?></td> <?php } ?> <td><?php echo $data['accountName'];?></td> <td><?php echo $data['requestedBy'];?></td> <form action="forFundAction.php" method="post"> <td><textarea name="remarks" style="resize: none;"></textarea></td> <td><input type="text" name="serviceRef"><br><br><input type="text" name="referenceNumber"></td> <td><input type="number" name="totalAmount" step="any"></td> <td> <select name="fundingAccount" required> <option disabled selected value> -- select an option -- </option> <?php $st1 = $pdo->prepare("select * from tblfunding"); $st1->execute(); while ($data1 = $st1->fetch()) { ?> <option value="<?php echo $data1['funding_code']; ?>"><?php echo $data1['funding_code'] . '-' . $data1['funding_name']?></option> <?php } ?> </select> </td> <td class="text-left"> <input type="hidden" value="<?php echo $data['request_id']?>" name="requestId"> <input type="hidden" value="<?php echo $data['clientName']?>" name="clientName"> <input type="hidden" value="<?php echo $data['clientType']?>" name="clientType"> <input type="hidden" value="<?php echo $data['agentName']?>" name="agentName"> <input type="hidden" value="<?php echo $data['transactionCashout']?>" name="transactionCashout"> <input type="hidden" value="<?php echo $data['dateCompleted']?>" name="dateCompleted"> <button type="submit" name="btnOk" style="background-color: transparent;border-color: transparent;"> <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-check-square-fill" viewBox="0 0 16 16"> <path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm10.03 4.97a.75.75 0 0 1 .011 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.75.75 0 0 1 1.08-.022z"/> </svg> </button> <br> <button type="submit" name="btnCancel" style="background-color: transparent;border-color: transparent;"> <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-x-square-fill" viewBox="0 0 16 16"> <path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm3.354 4.646L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 1 1 .708-.708"/> </svg> </button> </form> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <!-- Optional JavaScript; choose one of the two! --> <!-- Option 1: Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.5.1.js"></script> <script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script> <script> $(document).ready(function() { $('#example').DataTable({ "ordering": false, }); } ); </script> <!-- Option 2: Separate Popper and Bootstrap JS --> <!-- <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script> --> </body> </html> <?php } else{ header("location:index.php"); session_destroy(); } ?>
Copyright ©2021 || Defacer Indonesia