Guest User

Untitled

a guest
Apr 16th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.51 KB | None | 0 0
  1. <?php
  2.  
  3. include "inc/header.php";
  4.  
  5. $result = mysqli_query($con, "SELECT * FROM `subscriptions` WHERE `username` = '$username' AND `active` = '1' AND `expires` >= '$date'") or die(mysqli_error($con));
  6. if (mysqli_num_rows($result) < 1 && $_SESSION['rank'] != "5") {
  7. header('Location: purchase.php');
  8. }
  9. if($_SESSION['rank'] == "5"){
  10. $expires = "Lifetime";
  11. }else{
  12. while($row = mysqli_fetch_assoc($result)) {
  13. $expires = "Untill ".$row["expires"];
  14. }
  15. }
  16.  
  17. $totalalts = 0;
  18.  
  19. $result = mysqli_query($con, "SELECT * FROM `generators`") or die(mysqli_error($con));
  20. while($row = mysqli_fetch_assoc($result)) {
  21. $result2 = mysqli_query($con, "SELECT * FROM `generator$row[id]` WHERE `status` != '0'") or die(mysqli_error($con));
  22. $totalalts = $totalalts + mysqli_num_rows($result2);
  23. }
  24.  
  25. $result = mysqli_query($con, "SELECT * FROM `users`") or die(mysqli_error($con));
  26. $totalusers = mysqli_num_rows($result);
  27.  
  28. ?>
  29.  
  30. <!DOCTYPE html>
  31. <html lang="en">
  32. <head>
  33. <meta charset="utf-8">
  34. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  35. <meta name="description" content="">
  36. <meta name="author" content="24/7">
  37. <meta name="keyword" content="">
  38. <link rel="shortcut icon" href="<?php echo $favicon;?>">
  39.  
  40. <title><?php echo $website;?> - Dashboard</title>
  41.  
  42. <!-- Bootstrap core CSS -->
  43. <link href="css/bootstrap.min.css" rel="stylesheet">
  44. <link href="css/bootstrap-reset.css" rel="stylesheet">
  45. <!--external css-->
  46. <link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
  47. <!-- Custom styles for this template -->
  48. <link href="css/style.css" rel="stylesheet">
  49. <link href="css/style-responsive.css" rel="stylesheet" />
  50.  
  51. <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
  52. <!--[if lt IE 9]>
  53. <script src="js/html5shiv.js"></script>
  54. <script src="js/respond.min.js"></script>
  55. <![endif]-->
  56. </head>
  57.  
  58. <body>
  59.  
  60. <section id="container" >
  61. <!--header start-->
  62. <header class="header white-bg">
  63. <div class="sidebar-toggle-box">
  64. <div data-original-title="Toggle Navigation" data-placement="right" class="icon-reorder tooltips"></div>
  65. </div>
  66. <!--logo start-->
  67. <a href="index.php" class="logo"><?php echo $website;?></a>
  68. <!--logo end-->
  69. <div class="nav notify-row" id="top_menu">
  70. <!-- notification start -->
  71. <ul class="nav top-menu">
  72. <!-- inbox dropdown start-->
  73. <?php
  74. $result = mysqli_query($con, "SELECT * FROM `support` WHERE `to` = '$username' AND `read` = '0' ORDER BY `id`");
  75. $messages = mysqli_num_rows($result);
  76. if($messages > 0){
  77. echo '
  78. <li id="header_inbox_bar" class="dropdown">
  79. <a data-toggle="dropdown" class="dropdown-toggle" href="#">
  80. <i class="icon-envelope-alt"></i>
  81. <span class="badge bg-important">'.$messages.'</span>
  82. </a>
  83. <ul class="dropdown-menu extended inbox">
  84. <div class="notify-arrow notify-arrow-red"></div>
  85. <li>
  86. <p class="red">You have '.$messages.' new messages</p>
  87. </li>
  88. ';
  89. while ($row = mysqli_fetch_assoc($result)) {
  90. echo '
  91. <li>
  92. <a href="support.php">
  93. <span class="subject">
  94. <span class="from">'.$row['subject'].'</span>
  95. <span class="time">'.$row['date'].'</span>
  96. </span>
  97. <span class="message">
  98. '.$row['message'].'
  99. </span>
  100. </a>
  101. </li>
  102. ';
  103. }
  104. echo '
  105. <li>
  106. <a href="support.php">See all messages</a>
  107. </li>
  108. </ul>
  109. </li>
  110. ';
  111. }else{
  112. echo '
  113. <li id="header_inbox_bar" class="dropdown">
  114. <a data-toggle="dropdown" class="dropdown-toggle" href="#">
  115. <i class="icon-envelope-alt"></i>
  116. <span class="badge bg-important">0</span>
  117. </a>
  118. <ul class="dropdown-menu extended inbox">
  119. <div class="notify-arrow notify-arrow-red"></div>
  120. <li>
  121. <p class="red">You have '.$messages.' new messages</p>
  122. </li>
  123. <li>
  124. <a href="support.php">See all messages</a>
  125. </li>
  126. </ul>
  127. </li>
  128. ';
  129. }
  130. ?>
  131. <!-- inbox dropdown end -->
  132. </div>
  133. <div class="top-nav ">
  134. <!--user info start-->
  135. <ul class="nav pull-right top-menu">
  136. <!-- user login dropdown start-->
  137. <li class="dropdown">
  138. <a data-toggle="dropdown" class="dropdown-toggle" href="#">
  139. <img alt="" src="img/avatar_small.png">
  140. <span class="username"><?php echo $username;?></span>
  141. <b class="caret"></b>
  142. </a>
  143. <ul class="dropdown-menu extended logout">
  144. <div class="log-arrow-up"></div>
  145. <li><a href="#"><i class=" icon-suitcase"></i>Profile</a></li>
  146. <li><a href="#"><i class="icon-cog"></i> Settings</a></li>
  147. <li><a href="support.php"><i class="icon-envelope-alt"></i> Messages</a></li>
  148. <li><a href="lib/logout.php"><i class="icon-key"></i> Log Out</a></li>
  149. </ul>
  150. </li>
  151. <!-- user login dropdown end -->
  152. </ul>
  153. <!--user info end-->
  154. </div>
  155. </header>
  156. <!--header end-->
  157. <!--sidebar start-->
  158. <aside>
  159. <div id="sidebar" class="nav-collapse ">
  160. <!-- sidebar menu start-->
  161. <ul class="sidebar-menu" id="nav-accordion">
  162. <li>
  163. <a class="active" href="index.php">
  164. <i class="icon-dashboard"></i>
  165. <span>Dashboard</span>
  166. </a>
  167. </li>
  168. <li>
  169. <a href="purchase.php">
  170. <i class="icon-shopping-cart"></i>
  171. <span>Purchase</span>
  172. </a>
  173. </li>
  174. <li>
  175. <a href="generator.php">
  176. <i class="icon-refresh"></i>
  177. <span>Generator</span>
  178. </a>
  179. </li>
  180. <li>
  181. <a href="support.php">
  182. <i class="icon-envelope"></i>
  183. <span>Support</span>
  184. </a>
  185. </li>
  186. <?php
  187. if (($_SESSION['rank']) == "5") {
  188. echo '
  189. <legend style="margin-bottom: 5px;"></legend>
  190. <li class="sub-menu">
  191. <a href="javascript:;" >
  192. <i class="icon-laptop"></i>
  193. <span>Administration</span>
  194. </a>
  195. <ul class="sub">
  196. <li><a href="admin-manage.php">Manage</a></li>
  197. <li><a href="admin-support.php">Support</a></li>
  198. <li><a href="admin-statistics.php">Statistics</a></li>
  199. <li><a href="admin-flagged.php">Flagged</a></li>
  200. <li><a href="admin-news.php">News</a></li>
  201. <li><a href="admin-subscriptions.php">Subscriptions</a></li>
  202. <li><a href="admin-users.php">Users</a></li>
  203. </ul>
  204. </li>
  205. ';
  206. }
  207. ?>
  208. </ul>
  209. <!-- sidebar menu end-->
  210. </div>
  211. </aside>
  212. <!--sidebar end-->
  213. <!--main content start-->
  214. <section id="main-content">
  215. <section class="wrapper">
  216. <!--state overview start-->
  217. <div class="row state-overview">
  218. <div class="col-lg-3 col-sm-6">
  219. <section class="panel">
  220. <div class="symbol terques">
  221. <i class="icon-user"></i>
  222. </div>
  223. <div class="value">
  224. <h1 class="count">
  225. <?php echo $totalusers;?>
  226. </h1>
  227. <p>Total Users</p>
  228. </div>
  229. </section>
  230. </div>
  231. <div class="col-lg-3 col-sm-6">
  232. <section class="panel">
  233. <div class="symbol red">
  234. <i class="icon-th-list"></i>
  235. </div>
  236. <div class="value">
  237. <h1 class=" count2">
  238. <?php echo $totalalts;?>
  239. </h1>
  240. <p>Total Alts</p>
  241. </div>
  242. </section>
  243. </div>
  244. <div class="col-lg-3 col-sm-6">
  245. <section class="panel">
  246. <div class="symbol yellow">
  247. <i class="icon-refresh"></i>
  248. </div>
  249. <div class="value">
  250. <h1 class=" count3">
  251. <?php echo $generated;?>
  252. </h1>
  253. <p>Total Generated</p>
  254. </div>
  255. </section>
  256. </div>
  257. <div class="col-lg-3 col-sm-6">
  258. <section class="panel">
  259. <div class="symbol blue">
  260. <i class="icon-tags"></i>
  261. </div>
  262. <div class="value">
  263. <h1 class=" count4">
  264. Premium
  265. </h1>
  266. <p><?php echo $expires;?></p>
  267. </div>
  268. </section>
  269. </div>
  270. </div>
  271. <!--state overview end-->
  272.  
  273. <div class="row">
  274. <div class="col-lg-12">
  275. <!--user info table start-->
  276. <section class="panel">
  277. <div class="panel-body">
  278. <div class="task-thumb-details">
  279. <h1>News Feed</h1>
  280. </div>
  281. </div>
  282. <table class="table table-hover personal-task">
  283. <tbody>
  284. <?php
  285. $result = mysqli_query($con, "SELECT * FROM `news` ORDER BY `id` DESC");
  286. while ($row = mysqli_fetch_assoc($result)) {
  287. echo '
  288. <tr>
  289. <td>
  290. <i class=" icon-bell-alt"></i>
  291. </td>
  292. <td>'.$row['message'].'</td>
  293. <td> '.$row['date'].'</td>
  294. </tr>
  295. ';
  296. }
  297. ?>
  298. </tbody>
  299. </table>
  300. </section>
  301. <!--user info table end-->
  302. </div>
  303. </div>
  304.  
  305. </section>
  306.  
  307. <?php
  308. if($_GET['error'] == "no-admin"){
  309. echo '
  310. <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">
  311. <div class="modal-dialog modal-sm">
  312. <div class="modal-content panel-warning">
  313. <div class="modal-header panel-heading">
  314. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  315. <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Error!</h3></center>
  316. </div>
  317. <div class="modal-body">
  318. <center>
  319. <strong>You must be an admin to do that.</strong>
  320. </center>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. ';
  326. }
  327. ?>
  328. </section>
  329. <!--main content end-->
  330. <!--footer start-->
  331. <footer class="site-footer">
  332. <div class="text-center">
  333. <?php echo $footer;?>
  334. <a href="#" class="go-top">
  335. <i class="icon-angle-up"></i>
  336. </a>
  337. </div>
  338. </footer>
  339. <!--footer end-->
  340. </section>
  341.  
  342. <!-- js placed at the end of the document so the pages load faster -->
  343. <script src="js/jquery.js"></script>
  344. <script src="js/jquery-1.8.3.min.js"></script>
  345. <script src="js/bootstrap.min.js"></script>
  346. <script src="js/jquery.scrollTo.min.js"></script>
  347. <script src="js/jquery.nicescroll.js" type="text/javascript"></script>
  348. <script src="js/jquery.customSelect.min.js" ></script>
  349. <script src="js/respond.min.js" ></script>
  350.  
  351. <script class="include" type="text/javascript" src="js/jquery.dcjqaccordion.2.7.js"></script>
  352.  
  353. <!--common script for all pages-->
  354. <script src="js/common-scripts.js"></script>
  355.  
  356. <?php
  357. if(isset($_GET['error'])){
  358. echo "<script type='text/javascript'>
  359. $(document).ready(function(){
  360. $('#error').modal('show');
  361. });
  362. </script>"
  363. ;
  364. }
  365. ?>
  366.  
  367. </body>
  368. </html>
Add Comment
Please, Sign In to add comment