Advertisement
Guest User

Avaclub Global

a guest
Jul 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. <?php
  2. if($usr['Admin'] == "false"){
  3. header('location:/maintenance.html');
  4. }
  5.  
  6. ob_start();
  7. $mysqli = new mysqli("localhost","loriasne_user","chez1","loriasne_main");
  8. global $mysqli;
  9.  
  10.  
  11.  
  12. $shoutquery = $mysqli->query("SELECT * FROM `shout`");
  13. $shout = $shoutquery->fetch_array();
  14. $shoutmsg = $shout['shout'];
  15. $shouterid = $shout['shouter'];
  16. $shouterquery = $mysqli->query("SELECT * FROM `accounts` WHERE `id`='$shouterid'");
  17. $shouter = $shouterquery->fetch_array();
  18.  
  19. function thetime()
  20. {
  21. $thetime = getdate();
  22. print_r($thetime);
  23. }
  24.  
  25. $logged = false;
  26. if($_COOKIE['username'] && $_COOKIE['password']){
  27. $username = strip_tags($_COOKIE['username']);
  28. $password = strip_tags($_COOKIE['password']);
  29. $usrquery = $mysqli->query("SELECT * FROM `accounts` WHERE `password`='$password'");
  30. $usr = $usrquery->fetch_array();
  31. if($usr != 0){
  32. $logged = true;
  33. }
  34. }
  35. $uID = $usr['id'];
  36. $timey = time();
  37. $timer = $timey - $usr['status'];
  38. $mysqli->query("UPDATE `accounts` SET `status`='$timey' WHERE `id`='$uID'");
  39. if($timer < 20) {
  40. $mysqli->query("UPDATE `accounts` SET `isstatus`='true' WHERE `id`='$uID'");
  41. }
  42. else{
  43. $mysqli->query("UPDATE `accounts` SET `isstatus`='false' WHERE `id`='$uID'");
  44. }
  45.  
  46.  
  47.  
  48. $numpmcheck = $mysqli->query("SELECT * FROM `messages` WHERE `recieverID`='$uID' AND `read`='0'");
  49. $numpm = $numpmcheck->num_rows;
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. ?>
  58. <html>
  59. <head>
  60. <title>Lorias</title>
  61. <link href="/img/favicon.ico" rel="icon" type="image/x-icon" />
  62. <!-- <script src="/snowstorm.js"></script> -->
  63.  
  64. <link rel="stylesheet" type="text/css" href="/major.css">
  65. <link rel="stylesheet" type="text/css" href="/major2.css">
  66.  
  67. </head>
  68. <?php
  69. if($usr['banned'] == "1"){
  70. header('Location: /banned.php');
  71. }
  72.  
  73. ?>
  74. <?php if($logged) { ?>
  75. <div class="account-bar">
  76.  
  77. <span style="position:absolute;left:15%;">
  78. <b>Hello,</b> <?php echo $usr['username']; ?>!
  79. <a href="/Settings/">Settings</a>
  80. <a href="/User/">My Profile</a>
  81. <a href="/Account/FR/">Friend Requests</a>
  82. <a href="/Inbox/">Inbox (<?php echo $numpm; ?>)</a>
  83. <a href="http://www.anneximages.x10.mx/">Paste Bin</a>
  84. <b>Lors:</b> <font color="green"><?php echo $usr['Lors']; ?></font>
  85. <a href="/logout.php">Logout</a>
  86. </span>
  87. <? } ?>
  88. </div>
  89. <div class="nav">
  90. <span style="position:absolute;left:7%;font-size:30px;">Lorias</span>
  91. <?php if($logged) { ?>
  92. <span style="margin-left:300px;">
  93. <a href="http://www.lorias.tk">Home</a>
  94. <a href="/Forum/">Forum</a>
  95. <a href="/Browse/">Browse</a>
  96. <a href="/Catalog/">Catalog</a>
  97. <a href="/donate.php">Donate</a>
  98. <a href="/Blog/">Blog</a>
  99.  
  100. <?php if($usr['Admin'] == "true" || $usr['forumMod'] == "1" || $usr['imageMod'] == "1" || $usr['globalMod'] == "1" ) { ?>
  101. <a href="/Admin/" style="font-weight: bold;">Admin</a>
  102. <? } ?>
  103. <? } ?>
  104. </div>
  105.  
  106. <?php if($shoutmsg == ''){
  107. ?>
  108. <br><br>
  109. <?php
  110. }else{
  111. ?>
  112. <div class="shout">
  113. <?php echo $shoutmsg . " - " . $shouter['username']; ?>
  114. </div>
  115. <?php } ?>
  116.  
  117. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement