Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.27 KB | None | 0 0
  1. <?php
  2.  
  3. set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] . "/PHP/Includes");
  4. include("PageSnippets/header.php");
  5. require_once("jupikd_discord_database.php");
  6. require_once("jupikd_discord_api_key.php");
  7.  
  8. $query = "SELECT * FROM default_command_permissions";
  9. $stmt = $db->prepare($query);
  10.  
  11. $stmt->execute();
  12. $result = $stmt->get_result();
  13.  
  14. if($result->num_rows > 0) {
  15.  
  16. ?>
  17.  
  18.         <div id="main-container">
  19.             <p style="text-align: justify;"></p>
  20.             <div style="text-align: right;">
  21.                 </div>
  22.                 <br><br>
  23.         <table class='table table-striped table-hover '>
  24.             <tr>
  25.                 <th>Name</th>
  26.                 <th>Description</th>
  27.                 <th>Usage</th>
  28.                 <th>Default Permission</th>
  29.                 <th>Uses</th>
  30.                 <th>Aliases</th>
  31.             </tr>
  32.             <?php while($row = $result->fetch_assoc()) { ?>
  33.             <tr>
  34.                 <td><button class="btn btn-primary" type="button" data-toggle="modal" data-target="#commandModal-<?php echo htmlentities($row["name"]); ?>"><?php echo htmlentities($row["name"]); ?></button></td>
  35.                 <td><?php echo htmlentities($row["description"]); ?></td>
  36.                 <td><?php echo htmlentities($row["command_usage"]); ?></td>
  37.                 <td><?php echo htmlentities($row["permission"]); ?></td>
  38.                 <td><?php echo htmlentities($row["uses"]); ?></td>
  39.                 <td><?php echo htmlentities($row["aliases"]); ?></td>
  40.             </tr>
  41.             <?php } ?>
  42.         </table>
  43.             </div>
  44.  
  45.             <?php while($row = $result->fetch_assoc()) { ?>
  46.             <div class="modal fade" id="commandModal-<?php echo htmlentities($row["name"]); ?>">
  47.                 <div class="modal-dialog" role="document">
  48.                     <div class="modal-content">
  49.                         <div class="modal-header">
  50.                             <h5 class="modal-title"><?php echo htmlentities($row["name"]); ?></h5>
  51.                             <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  52.                                 <span aria-hidden="true">&times;</span>
  53.                             </button>
  54.                         </div>
  55.                         <div class="modal-body">
  56.                             <p>
  57.                                 Add more shit here
  58.                             </p>
  59.                         </div>
  60.                         <div class="modal-footer">
  61.                             <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  62.                         </div>
  63.                     </div>
  64.                 </div>
  65.             </div>
  66.             <?php } ?>
  67.         </div>
  68.  
  69. <?php
  70.  
  71. include("PageSnippets/footer.php");
  72.  
  73.     }
  74. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement