whoami7 - Manager
:
/
home
/
gracious
/
mail
/
ledgerless.graciousphils.com
/
Upload File:
files >> /home/gracious/mail/ledgerless.graciousphils.com/textPool.php
<!doctype html> <?php include 'connection.php'; //SALES OFFICE UPGRADE if(isset($_SESSION['user']) && ($_SESSION['position'] == 2 || $_SESSION['position'] == 3 || $_SESSION['position'] == 4)){ if(isset($_POST["btnOk"])){ try{ $textId = $_POST['textId']; $dateProcessed = date("Y-m-d H:i:s"); $stmt = $pdo->prepare("select * from tbltextpool where text_id = ?"); $stmt->bindParam(1, $textId); $stmt->execute(); while($data = $stmt->fetch()){ $processedBy = $data['processedBy']; } if($processedBy==""){ $stmt = $pdo->prepare("update tbltextpool set status = 'Processed', processedBy = ?, processedTime = ? where text_id = ?"); $stmt->bindParam(1, $_SESSION['user']); $stmt->bindParam(2, $dateProcessed); $stmt->bindParam(3, $textId); $stmt->execute(); echo "<script>alert('Client Text is assigned to you for assistance!');window.location.href='myTexts.php'</script>"; } else{ echo "<script>alert('Client Text is already assigned to a Call Representative.');</script>"; } } catch(PDOException $e) { echo $query . "<br>" . $e->getMessage(); } } ?> <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 $requestedBy = $_SESSION['user']; $st = $pdo->prepare("select * from tbltextpool where status = 'Pending' and (message like '%#LC%' or message like '%#PPS%' or message like '%#ER%') and message not like '%posting%' order by tbltextpool.text_id ASC;"); $st->execute(); ?> <br> <div class="container"> <div class="row"> <h2 class="col-lg-8 offset-lg-2 text-center">New Client Text Pool</h2> </div> <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>Text Message</th> <th>Actions</th> </tr> </thead> <tbody> <?php while ($data = $st->fetch()) { ?> <tr class="text-center"> <td style = "color: green;font-weight:bold;"><?php echo htmlspecialchars($data['message']);?></td> <td> <form action="textPool.php" method="post"> <input type="hidden" value="<?php echo $data['text_id']?>" name="textId"> <input type="hidden" value="<?php echo $data['message']?>" name="message"> <button type='submit' name='btnOk' class='btn btn-sm' style='background-color:#343a40;color:white;'> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check" viewBox="0 0 16 16"> <path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 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.267.267 0 0 1 .02-.022z"/> </svg> </button> </form> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <?php $requestedBy = $_SESSION['user']; $st1 = $pdo->prepare("select * from tbltextpool where status = 'Pending' and message like '%#PAL%' order by tbltextpool.text_id ASC;"); $st1->execute(); ?> <div class="row"> <h2 class="col-lg-8 offset-lg-2 text-center">Existing Client Text Pool</h2> </div> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <table id="example1" class="table table-bordered display compact" style="width: 100%;"> <thead> <tr class="text-center table-dark"> <th>Text Message</th> <th>Actions</th> </tr> </thead> <tbody> <?php while ($data1 = $st1->fetch()) { ?> <tr class="text-center"> <td><?php echo $data1['message'];?></td> <td> <form action="textPool.php" method="post"> <input type="hidden" value="<?php echo $data1['text_id']?>" name="textId"> <input type="hidden" value="<?php echo $data1['message']?>" name="message"> <button type='submit' name='btnOk' class='btn btn-sm' style='background-color:#343a40;color:white;'> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check" viewBox="0 0 16 16"> <path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 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.267.267 0 0 1 .02-.022z"/> </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,pageLength: 100}); } ); $(document).ready(function() { $('#example1').DataTable({ordering:false,pageLength: 100}); } ); </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{ session_destroy(); header("location:index.php"); } ?>
Copyright ©2021 || Defacer Indonesia