Advertisement
Guest User

Untitled

a guest
Nov 1st, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.02 KB | None | 0 0
  1. <?php
  2. ob_start();
  3. require_once '../includes/db.php';
  4. require_once '../includes/init.php';
  5. if (!($user -> LoggedIn()))
  6. {
  7. header('location: ../logbackin.php');
  8. die();
  9. }
  10. if (!($user->isAdmin($odb)))
  11. {
  12. header('location: ../notadmin.php');
  13. die();
  14. }
  15. if (!($user -> notBanned($odb)))
  16. {
  17. header('location: ../unset.php');
  18. die();
  19. }
  20. include("header.php");
  21. ?>
  22.  
  23.  
  24.  
  25. <!-- Right side column. Contains the navbar and content of the page -->
  26. <aside class="right-side">
  27. <!-- Content Header (Page header) -->
  28. <section class="content-header">
  29. <h1>
  30. Members
  31. <small>Overview</small>
  32. </h1>
  33. <ol class="breadcrumb">
  34. <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
  35. <li class="active">Members</li>
  36. </ol>
  37. </section>
  38.  
  39. <div class="content-block" role="main">
  40.  
  41.  
  42. <!-- Grid row -->
  43. <div class="row-fluid">
  44. <div class="well well-small">
  45.  
  46. <div class="row">
  47. <div class="col-xs-12">
  48. <div class="box">
  49. <div class="box-header">
  50. <h3 class="box-title">Manage Members</h3>
  51. <div class="box-tools">
  52. <div class="input-group">
  53. <input type="text" name="table_search" class="form-control input-sm pull-right" style="width: 150px;" placeholder="Search"/>
  54. <div class="input-group-btn">
  55. <button class="btn btn-sm btn-default"><i class="fa fa-search"></i></button>
  56. </div>
  57. </div>
  58. </div>
  59. </div><!-- /.box-header -->
  60. <div class="box-body table-responsive no-padding">
  61. <table class="table table-hover">
  62. <tr>
  63.  
  64. <table class="table grid table-striped table-bordered table-condensed">
  65. <thead><tr>
  66. <th class="hidden-phone">Username</th>
  67. <th class="hidden-phone">Email</th>
  68. <th class="hidden-phone">Rank</th>
  69. <th>Status</th>
  70. <th class="hidden-phone">Edit</th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. <tr>
  75. <?php
  76. $SQLGetUsers = $odb -> query("SELECT * FROM `users` ORDER BY `ID` DESC");
  77. while ($getInfo = $SQLGetUsers -> fetch(PDO::FETCH_ASSOC))
  78. {
  79. $id = $getInfo['ID'];
  80. $user = $getInfo['username'];
  81. $email = $getInfo['email'];
  82. $rank = $getInfo['rank'];
  83. $status = ($getInfo['status'] == 0) ? 'Active' : 'Banned';
  84.  
  85. if ($rank > 1) {
  86. $rank = 'Admin';
  87. } elseif ($rank == 1) {
  88. $rank = 'Staff';
  89. } else {
  90. $rank = 'Member';
  91. }
  92. echo '<tr class="gradeX"><td>'.$user.'</td><td>'.$email.'</td><td>'.$rank.'</td><td>'.$status.'</td><td width="50px"><a href="edit.php?id='.$id.'"><button class="btn btn-info">Edit</button></a></td></tr>';
  93. }
  94. ?>
  95. </tbody>
  96. </table>
  97. </div>
  98. </div>
  99.  
  100.  
  101. </div>
  102. </div>
  103.  
  104.  
  105.  
  106. <!-- Scripts -->
  107. <script src="js/navigation.js"></script>
  108.  
  109. <!-- Bootstrap scripts -->
  110. <!--
  111. <script src="js/bootstrap/bootstrap-tooltip.js"></script>
  112. <script src="js/bootstrap/bootstrap-dropdown.js"></script>
  113. <script src="js/bootstrap/bootstrap-button.js"></script>
  114. <script src="js/bootstrap/bootstrap-alert.js"></script>
  115. <script src="js/bootstrap/bootstrap-popover.js"></script>
  116. <script src="js/bootstrap/bootstrap-collapse.js"></script>
  117. <script src="js/bootstrap/bootstrap-transition.js"></script>
  118. -->
  119. <script src="js/bootstrap/bootstrap.js"></script>
  120.  
  121. <!-- Block TODO list -->
  122. <script>
  123. $(document).ready(function() {
  124.  
  125. $('.todo-block input[type="checkbox"]').click(function(){
  126. $(this).closest('tr').toggleClass('done');
  127. });
  128. $('.todo-block input[type="checkbox"]:checked').closest('tr').addClass('done');
  129.  
  130. });
  131. </script>
  132.  
  133.  
  134. <!-- jQuery Visualize -->
  135. <!--[if lte IE 8]>
  136. <script language="javascript" type="text/javascript" src="js/plugins/visualize/excanvas.js"></script>
  137. <![endif]-->
  138. <script src="js/plugins/visualize/jquery.visualize.min.js"></script>
  139. <script src="js/plugins/visualize/jquery.visualize.tooltip.min.js"></script>
  140.  
  141. <script>
  142. $(document).ready(function() {
  143.  
  144. $('table.demo').each(function() {
  145. var chartType = ''; // Set chart type
  146. var chartWidth = $(this).parent().width()*0.95; // Set chart width to 90% of its parent
  147.  
  148. if(chartWidth < 350) {
  149. var chartHeight = chartWidth;
  150. }else{
  151. var chartHeight = chartWidth*0.25;
  152. }
  153.  
  154. $(this).hide().visualize({
  155. type: $(this).attr('data-chart'),
  156. width: chartWidth,
  157. height: chartHeight,
  158. colors: ['#3a87ad','#b94a48', '#468847']
  159. });
  160. });
  161.  
  162. });
  163. </script>
  164.  
  165. <!-- jQuery SparkLines -->
  166. <script src="js/plugins/sparkline/jquery.sparkline.min.js"></script>
  167.  
  168.  
  169.  
  170. </body>
  171. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement