Advertisement
Guest User

Untitled

a guest
Jul 14th, 2013
664
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.20 KB | None | 0 0
  1. <?php
  2. include("include/session.php");
  3. ?>
  4.  
  5. <html>
  6. <head>
  7. <title>SocialNeko</title>
  8. <link href="/fav.ico" rel="icon" type="image/x-icon" />
  9. <link rel="image_src" href="/image/logo2.png" />
  10. <meta name="Description" content="SocialNeko: An online community for the Nintendo 3DS!">
  11. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  12. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
  13. <link rel="stylesheet" href="/main.css" type="text/css" />
  14. </head>
  15.  
  16. <body>
  17.  
  18. <?php
  19. if($session->logged_in){
  20.     ?>
  21.    
  22. <?php include("header.php"); ?>
  23. <?php
  24. $result4 = mysqli_query(db(), "SELECT * FROM onlinechat");
  25. while($row4 = mysqli_fetch_array($result4))
  26. {
  27. $p1 = time();
  28. $now1 = date("i",$p1);
  29. $time1 = $row4['time'];
  30. $tt1 = $now1 - $time1;
  31. if($tt1 > 02 || $tt1 < -00){
  32. mysqli_query(db(),"DELETE FROM onlinechat WHERE username='".$row4['username']."'");}}
  33. ?>
  34. <?php
  35. $result2 = mysqli_query(db(), "SELECT * FROM onlinechat");
  36. $count2 = mysqli_num_rows($result2);
  37. if($count2 > 0){
  38. if($count2 < 10){
  39. $onlinenum = $count2;
  40. }else{
  41. $onlinenum = "9+";
  42. }
  43. }else{
  44. $onlinenum = 0;
  45. }
  46. ?>
  47.  
  48. <p>
  49. <div id="box2">
  50. <h2>Important Notice</h2>
  51. <b>Attention Users!</b><br>
  52. We gotz a .com domain! :D<br>
  53. That means no downtimes, no moar! :{D
  54. <br>Please change your bookmarks to socialneko.com!
  55. </div>
  56.  
  57. <h1>General Sections</h1>
  58. <div id="box">
  59.  
  60. <button type="button" style="border:0px;background:transparent" onclick="window.location='status'"><img src="/image/status.png" class="menuicon"><br>
  61. <b>Status</b></button>
  62.  
  63. <button type="button" style="border:0px;background:transparent" onclick="window.location='forum'"><img src="/image/forum.png" class="menuicon"><br>
  64. <b>Forum</b></button>
  65.  
  66. <button type="button" style="border:0px;background:transparent" onclick="window.location='mail'"><img src="/image/inbox.png" class="menuicon"><br>
  67. <b>Inbox</b></button>
  68.  
  69. <button type="button" style="border:0px;background:transparent" onclick="window.location='store'"><img src="/image/store.png" class="menuicon"><br>
  70. <b>Store</b></button>
  71.  
  72. <button type="button" style="border:0px;background:transparent"><img src="/image/gallery.png" class="menuicon"><br>
  73. <b style="color:gray">Gallery</b></button>
  74.  
  75. <button type="button" style="border:0px;background:transparent" onclick="window.location='chatroom'"><img src="/image/shouts.png" class="menuicon"><br>
  76. <b><?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'Nintendo DSi')) { ?>
  77. <font style='letter-spacing:-1px;'>Chat(<?php echo $onlinenum; ?>)</font>
  78. <? }else{ ?>
  79. Chat<font style='letter-spacing:-1px;'>(<?php echo $onlinenum; ?>)</font>
  80. <? } ?></b></button>
  81.  
  82. <button type="button" style="border:0px;background:transparent" onclick="window.location='wonderland/game.php'"><img src="/image/wonderland.png" class="menuicon"><br>
  83. <b>NiW</b></button>
  84.  
  85. <button type="button" style="border:0px;background:transparent" onclick="window.location='settings.php'"><img src="/image/settings.png" class="menuicon"><br>
  86. <b>Settings</b></button>
  87.  
  88. <?php if($session->userlevel == 9){ ?><hr style="margin:0px">
  89. <font size=1>
  90. <a href="/admin">[Ready-to-Use Mod Tools!]</a>
  91. </font>
  92. <? } ?>
  93.  
  94. </div>
  95.  
  96. <h1>Leaderboard</h1>
  97. <div id="box">
  98. <?php
  99. $leaderboard = mysqli_query(db(), "SELECT * FROM users ORDER BY coins DESC LIMIT 6");
  100. $i=1;
  101. while($row = mysqli_fetch_array($leaderboard))
  102.   { ?>
  103.  
  104. <table style="display:inline;">
  105. <td>
  106. <img src="<?php echo $row[avatar]; ?>" class="leaderboardavatar" width=40 height=40 style="border: 1px solid black;">
  107. </td>
  108. <td width="71.2%" class="yolo">
  109. <a href="/user/<?php echo strtolower($row['username']); ?>"><b><?php echo $row['username']; ?></b></a><br>
  110. <img src="/image/coin.png"> <?php echo $row['coins']; ?> coins
  111. </td>
  112. </table>
  113.  
  114.     <?php
  115.   if ($i % 2 == 0)
  116.         echo '<br>';
  117.     $i++;
  118.     ?>
  119.  
  120.  <?php
  121.  }
  122.  ?>
  123.   </div>
  124.  
  125. <h1>Latest News</h1>
  126. <div id="box" style="text-align:left;text-align:justify">
  127.  
  128. <?php
  129. $result = mysqli_query(db(), "SELECT * FROM forum WHERE topic='1' ORDER BY id DESC LIMIT 1");
  130.  
  131. while($row = mysqli_fetch_array($result)) { ?>
  132.  
  133. <table>
  134. <tbody>
  135. <tr>
  136. <td>
  137. <img src='<?php
  138. $useravatar = mysqli_query(db(), "SELECT avatar FROM users WHERE username='".$row['username']."'");
  139. while ($fila = mysqli_fetch_array($useravatar,  MYSQLI_BOTH)) {
  140. printf ("%s", $fila["avatar"]);}
  141. ?>' style="width:45px;height:45px;border: 1px solid black;" />
  142. </td>
  143. <td>
  144. <?php echo $row['title']; ?><br>
  145. By: <a href="/user/<?php echo strtolower($row['username']); ?>"><?php echo $row['username']; ?></a><br>
  146. <?php echo $row['time']; ?></td>
  147. </tr>
  148. </tbody>
  149. </table>
  150. <hr style="margin-bottom:2px;margin-top:2px;">
  151. <div style="margin-left:3px;margin-right:3px;">
  152. <?php
  153. $body = mb_substr($row['body'],0,280)."...";
  154. echo nl2br(BBCode(emoji(filter($body))));
  155. ?>
  156. <hr style="margin-bottom:2px;margin-top:2px;">
  157. <center><a href="/forum/view_topic.php?id=<?php echo $row['id']; ?>">Read More</a></center>
  158. </div>
  159. <?php
  160. }
  161. ?>
  162. </div>
  163.  
  164. <h1>Users Online</h1>
  165. <div id="box">
  166.  
  167. There are <?php echo $database->num_active_users; ?> online users.
  168. <hr style="margin:0px">
  169. <?php
  170. include("include/view_active.php");
  171. ?>
  172. </div>
  173.  
  174. <?php
  175. }
  176.  
  177. else{
  178. ?>
  179.  
  180. <?php include("header.php"); ?>
  181.  
  182. <p><div id="box2">
  183. <h2>Important Notice</h2>
  184. <b>Attention Users!</b><br>
  185. Please change your bookmarks to socialneko.kd.io! Why you may ask? Well socialneko.koding.com is shutting down in 1 week! (No, SocialNeko isn't shutting down. The URL is just changing!)
  186. </div>
  187.  
  188. <?php
  189. if(EMAIL_WELCOME){
  190. echo "<p>Do you need a Confirmation email? <a href='valid.php'>Send!</a></p>";
  191. }
  192. ?>
  193.  
  194.  
  195. <h1>General Sections</h1>
  196. <div id="box">
  197.  
  198. <button type="button" style="border:0px;background:transparent"><img src="/image/status.png" class="menuicon"><br>
  199. <b style="color:gray">Status</b></button>
  200.  
  201. <button type="button" style="border:0px;background:transparent"><img src="/image/forum.png" class="menuicon"><br>
  202. <b style="color:gray">Forum</b></button>
  203.  
  204. <button type="button" style="border:0px;background:transparent"><img src="/image/inbox.png" class="menuicon"><br>
  205. <b style="color:gray">Inbox</b></button>
  206.  
  207. <button type="button" style="border:0px;background:transparent"><img src="/image/store.png" class="menuicon"><br>
  208. <b style="color:gray">Store</b></button>
  209.  
  210. <button type="button" style="border:0px;background:transparent"><img src="/image/gallery.png" class="menuicon"><br>
  211. <b style="color:gray">Gallery</b></button>
  212.  
  213. <button type="button" style="border:0px;background:transparent"><img src="/image/shouts.png" class="menuicon"><br>
  214. <b style="color:gray">Chat</b></button>
  215.  
  216. <button type="button" style="border:0px;background:transparent" onclick="window.location='wonderland/game.php'"><img src="/image/wonderland.png" class="menuicon"><br>
  217. <b>NiW</b></button>
  218.  
  219. <button type="button" style="border:0px;background:transparent"><img src="/image/settings.png" class="menuicon"><br>
  220. <b style="color:gray">Settings</b></button>
  221.  
  222. <hr style="margin:0px">
  223. <font size=1>
  224. You must login to have access to these features.
  225. </font>
  226.  
  227. </div>
  228.  
  229. <h1>Leaderboard</h1>
  230. <div id="box">
  231. <?php
  232. $leaderboard = mysqli_query(db(), "SELECT * FROM users ORDER BY coins DESC LIMIT 6");
  233. $i=1;
  234. while($row = mysqli_fetch_array($leaderboard))
  235.   { ?>
  236.  
  237. <table style="display:inline;">
  238.   <td>
  239.   <img src="<?php echo $row[avatar]; ?>" class="leaderboardavatar" width=40 height=40 style="border: 1px solid black;">
  240.   </td>
  241.   <td width="71.2%" class="yolo">
  242.   <b><?php echo $row[username]; ?></b><br>
  243.   <img src="/image/coin.png"> <?php echo $row[coins]; ?> coins
  244.   </td>
  245.   </table>
  246.  
  247.     <?php
  248.   if ($i % 2 == 0)
  249.         echo '<br>';
  250.     $i++;
  251.     ?>
  252.  
  253.  <?php
  254.  }
  255.  ?>
  256.   </div>
  257.  
  258. <h1>Users Online</h1>
  259. <div id="box">
  260.  
  261. There are <?php echo $database->num_active_users; ?> online users.
  262.  
  263. </div>
  264.  
  265. <?php
  266. }
  267. ?>
  268.  
  269. <center><br>---- Ad ----<br>
  270.  
  271. <?php
  272. $ads = array(
  273. "<a href='http://socialpixel.heliohost.org'><img src='/image/socialpixel.png' style='max-width:95%;max-height:300px;'></a>",
  274. "<a href='http://3dsplay.pro64.x10.mx'><img src='/image/3dsplay.png' style='max-width:95%;max-height:300px;'></a>",
  275. "<a href='http://me-twist.3owl.com'><img src='/image/metwist.png' style='max-width:95%;max-height:300px;'></a>",
  276. "<a href='http://socialcu.be'><img src='/image/socialcube.png' style='max-width:95%;max-height:300px;'></a>"
  277. );
  278.  
  279. print_r($ads[array_rand($ads)]);
  280. ?></center>
  281.  
  282. <?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'Nintendo DSi')) { ?>
  283. <span style="position:absolute;top:50px;left:115px;font-size:10px;color:gray;letter-spacing:-1px;-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;">
  284. <?php echo $database->getNumMembers(); ?> members and growing!
  285. </span>
  286. <? }else{ ?>
  287. <span style="position:absolute;top:60px;left:180px;font-size:10px;color:gray;letter-spacing:-1px;-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;">
  288. <?php echo $database->getNumMembers(); ?> members and growing!
  289. </span>
  290. <? } ?>
  291.  
  292. <br><center><a href="http://mobile.twitter.com/sosharuneko"><img src="/image/follow.png"></a></center><br>
  293.  
  294. <?php include("footer.php"); ?>
  295.  
  296. </body>
  297. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement