Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("include/session.php");
- ?>
- <html>
- <head>
- <title>SocialNeko</title>
- <link href="/fav.ico" rel="icon" type="image/x-icon" />
- <link rel="image_src" href="/image/logo2.png" />
- <meta name="Description" content="SocialNeko: An online community for the Nintendo 3DS!">
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
- <link rel="stylesheet" href="/main.css" type="text/css" />
- </head>
- <body>
- <?php
- if($session->logged_in){
- ?>
- <?php include("header.php"); ?>
- <?php
- $result4 = mysqli_query(db(), "SELECT * FROM onlinechat");
- while($row4 = mysqli_fetch_array($result4))
- {
- $p1 = time();
- $now1 = date("i",$p1);
- $time1 = $row4['time'];
- $tt1 = $now1 - $time1;
- if($tt1 > 02 || $tt1 < -00){
- mysqli_query(db(),"DELETE FROM onlinechat WHERE username='".$row4['username']."'");}}
- ?>
- <?php
- $result2 = mysqli_query(db(), "SELECT * FROM onlinechat");
- $count2 = mysqli_num_rows($result2);
- if($count2 > 0){
- if($count2 < 10){
- $onlinenum = $count2;
- }else{
- $onlinenum = "9+";
- }
- }else{
- $onlinenum = 0;
- }
- ?>
- <p>
- <div id="box2">
- <h2>Important Notice</h2>
- <b>Attention Users!</b><br>
- We gotz a .com domain! :D<br>
- That means no downtimes, no moar! :{D
- <br>Please change your bookmarks to socialneko.com!
- </div>
- <h1>General Sections</h1>
- <div id="box">
- <button type="button" style="border:0px;background:transparent" onclick="window.location='status'"><img src="/image/status.png" class="menuicon"><br>
- <b>Status</b></button>
- <button type="button" style="border:0px;background:transparent" onclick="window.location='forum'"><img src="/image/forum.png" class="menuicon"><br>
- <b>Forum</b></button>
- <button type="button" style="border:0px;background:transparent" onclick="window.location='mail'"><img src="/image/inbox.png" class="menuicon"><br>
- <b>Inbox</b></button>
- <button type="button" style="border:0px;background:transparent" onclick="window.location='store'"><img src="/image/store.png" class="menuicon"><br>
- <b>Store</b></button>
- <button type="button" style="border:0px;background:transparent"><img src="/image/gallery.png" class="menuicon"><br>
- <b style="color:gray">Gallery</b></button>
- <button type="button" style="border:0px;background:transparent" onclick="window.location='chatroom'"><img src="/image/shouts.png" class="menuicon"><br>
- <b><?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'Nintendo DSi')) { ?>
- <font style='letter-spacing:-1px;'>Chat(<?php echo $onlinenum; ?>)</font>
- <? }else{ ?>
- Chat<font style='letter-spacing:-1px;'>(<?php echo $onlinenum; ?>)</font>
- <? } ?></b></button>
- <button type="button" style="border:0px;background:transparent" onclick="window.location='wonderland/game.php'"><img src="/image/wonderland.png" class="menuicon"><br>
- <b>NiW</b></button>
- <button type="button" style="border:0px;background:transparent" onclick="window.location='settings.php'"><img src="/image/settings.png" class="menuicon"><br>
- <b>Settings</b></button>
- <?php if($session->userlevel == 9){ ?><hr style="margin:0px">
- <font size=1>
- <a href="/admin">[Ready-to-Use Mod Tools!]</a>
- </font>
- <? } ?>
- </div>
- <h1>Leaderboard</h1>
- <div id="box">
- <?php
- $leaderboard = mysqli_query(db(), "SELECT * FROM users ORDER BY coins DESC LIMIT 6");
- $i=1;
- while($row = mysqli_fetch_array($leaderboard))
- { ?>
- <table style="display:inline;">
- <td>
- <img src="<?php echo $row[avatar]; ?>" class="leaderboardavatar" width=40 height=40 style="border: 1px solid black;">
- </td>
- <td width="71.2%" class="yolo">
- <a href="/user/<?php echo strtolower($row['username']); ?>"><b><?php echo $row['username']; ?></b></a><br>
- <img src="/image/coin.png"> <?php echo $row['coins']; ?> coins
- </td>
- </table>
- <?php
- if ($i % 2 == 0)
- echo '<br>';
- $i++;
- ?>
- <?php
- }
- ?>
- </div>
- <h1>Latest News</h1>
- <div id="box" style="text-align:left;text-align:justify">
- <?php
- $result = mysqli_query(db(), "SELECT * FROM forum WHERE topic='1' ORDER BY id DESC LIMIT 1");
- while($row = mysqli_fetch_array($result)) { ?>
- <table>
- <tbody>
- <tr>
- <td>
- <img src='<?php
- $useravatar = mysqli_query(db(), "SELECT avatar FROM users WHERE username='".$row['username']."'");
- while ($fila = mysqli_fetch_array($useravatar, MYSQLI_BOTH)) {
- printf ("%s", $fila["avatar"]);}
- ?>' style="width:45px;height:45px;border: 1px solid black;" />
- </td>
- <td>
- <?php echo $row['title']; ?><br>
- By: <a href="/user/<?php echo strtolower($row['username']); ?>"><?php echo $row['username']; ?></a><br>
- <?php echo $row['time']; ?></td>
- </tr>
- </tbody>
- </table>
- <hr style="margin-bottom:2px;margin-top:2px;">
- <div style="margin-left:3px;margin-right:3px;">
- <?php
- $body = mb_substr($row['body'],0,280)."...";
- echo nl2br(BBCode(emoji(filter($body))));
- ?>
- <hr style="margin-bottom:2px;margin-top:2px;">
- <center><a href="/forum/view_topic.php?id=<?php echo $row['id']; ?>">Read More</a></center>
- </div>
- <?php
- }
- ?>
- </div>
- <h1>Users Online</h1>
- <div id="box">
- There are <?php echo $database->num_active_users; ?> online users.
- <hr style="margin:0px">
- <?php
- include("include/view_active.php");
- ?>
- </div>
- <?php
- }
- else{
- ?>
- <?php include("header.php"); ?>
- <p><div id="box2">
- <h2>Important Notice</h2>
- <b>Attention Users!</b><br>
- 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!)
- </div>
- <?php
- if(EMAIL_WELCOME){
- echo "<p>Do you need a Confirmation email? <a href='valid.php'>Send!</a></p>";
- }
- ?>
- <h1>General Sections</h1>
- <div id="box">
- <button type="button" style="border:0px;background:transparent"><img src="/image/status.png" class="menuicon"><br>
- <b style="color:gray">Status</b></button>
- <button type="button" style="border:0px;background:transparent"><img src="/image/forum.png" class="menuicon"><br>
- <b style="color:gray">Forum</b></button>
- <button type="button" style="border:0px;background:transparent"><img src="/image/inbox.png" class="menuicon"><br>
- <b style="color:gray">Inbox</b></button>
- <button type="button" style="border:0px;background:transparent"><img src="/image/store.png" class="menuicon"><br>
- <b style="color:gray">Store</b></button>
- <button type="button" style="border:0px;background:transparent"><img src="/image/gallery.png" class="menuicon"><br>
- <b style="color:gray">Gallery</b></button>
- <button type="button" style="border:0px;background:transparent"><img src="/image/shouts.png" class="menuicon"><br>
- <b style="color:gray">Chat</b></button>
- <button type="button" style="border:0px;background:transparent" onclick="window.location='wonderland/game.php'"><img src="/image/wonderland.png" class="menuicon"><br>
- <b>NiW</b></button>
- <button type="button" style="border:0px;background:transparent"><img src="/image/settings.png" class="menuicon"><br>
- <b style="color:gray">Settings</b></button>
- <hr style="margin:0px">
- <font size=1>
- You must login to have access to these features.
- </font>
- </div>
- <h1>Leaderboard</h1>
- <div id="box">
- <?php
- $leaderboard = mysqli_query(db(), "SELECT * FROM users ORDER BY coins DESC LIMIT 6");
- $i=1;
- while($row = mysqli_fetch_array($leaderboard))
- { ?>
- <table style="display:inline;">
- <td>
- <img src="<?php echo $row[avatar]; ?>" class="leaderboardavatar" width=40 height=40 style="border: 1px solid black;">
- </td>
- <td width="71.2%" class="yolo">
- <b><?php echo $row[username]; ?></b><br>
- <img src="/image/coin.png"> <?php echo $row[coins]; ?> coins
- </td>
- </table>
- <?php
- if ($i % 2 == 0)
- echo '<br>';
- $i++;
- ?>
- <?php
- }
- ?>
- </div>
- <h1>Users Online</h1>
- <div id="box">
- There are <?php echo $database->num_active_users; ?> online users.
- </div>
- <?php
- }
- ?>
- <center><br>---- Ad ----<br>
- <?php
- $ads = array(
- "<a href='http://socialpixel.heliohost.org'><img src='/image/socialpixel.png' style='max-width:95%;max-height:300px;'></a>",
- "<a href='http://3dsplay.pro64.x10.mx'><img src='/image/3dsplay.png' style='max-width:95%;max-height:300px;'></a>",
- "<a href='http://me-twist.3owl.com'><img src='/image/metwist.png' style='max-width:95%;max-height:300px;'></a>",
- "<a href='http://socialcu.be'><img src='/image/socialcube.png' style='max-width:95%;max-height:300px;'></a>"
- );
- print_r($ads[array_rand($ads)]);
- ?></center>
- <?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'Nintendo DSi')) { ?>
- <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;">
- <?php echo $database->getNumMembers(); ?> members and growing!
- </span>
- <? }else{ ?>
- <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;">
- <?php echo $database->getNumMembers(); ?> members and growing!
- </span>
- <? } ?>
- <br><center><a href="http://mobile.twitter.com/sosharuneko"><img src="/image/follow.png"></a></center><br>
- <?php include("footer.php"); ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement