Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Wake the sleeping giant
- // **********************************************************************
- // Basic Configuration Info
- // **********************************************************************
- include("inc/functions.php");
- include("inc/config.php");
- include("inc/bbcode.php");
- $themeurl = grabanysetting("themeurl");
- // **********************************************************************
- // Define our top links by calling getlinks()
- // **********************************************************************
- $links = getlinks();
- // **********************************************************************
- // Define our ads by calling getads()
- // **********************************************************************
- $ads = getads("any");
- // **********************************************************************
- // Grab any dynamic article content from the content table
- // **********************************************************************
- $article_title = $pagecontent[title];
- $article_content = $pagecontent[content];
- // Convert the BBCODE to HTML
- $article_content = bbconvert($article_content);
- // Convert line breaks to <br>
- $article_content = nl2br($article_content);
- // **********************************************************************
- // Grab any settings that we will need for the current page from the DB
- // **********************************************************************
- $browsertitle = grabanysetting("browsertitle");
- $sitename = grabanysetting("sitename");
- $slogan = grabanysetting("slogan");
- // **********************************************************************
- // Check and see if the user is logged in to the site
- // **********************************************************************
- $loginstatus = logincheck();
- $isloggedin = $loginstatus[loginstatus];
- $loggedinname = $loginstatus[username];
- // **********************************************************************
- // End Prepwork - Output the page to the user
- // **********************************************************************
- //header("refresh:300");
- $article_title = "Who's Online";
- $article_content = "<div style='text-align:center;'>This page shows you all online users within the last 5 minutes. After 5 minutes of inactivity they will be marked as offline and will not be shown here</div><br /><hr /><br /><p><span style='color: red;'>Username</span><span style='color: green; margin-left: 33.5%;'>Number of Adoptables</span><span style='color: blue;margin-left:33.5%;'>Cash</span><br /><hr /><br /><p>";
- $sql3="SELECT ".$prefix."online.username, ".$prefix."users.dollar FROM ".$prefix."online, ".$prefix."users WHERE ".$prefix."online.username = ".$prefix."users.username AND ".$prefix."online.username!='Visitor' ORDER BY ".$prefix."online.username";
- $result3=mysql_query($sql3);
- $userarray = array();
- while($row = mysql_fetch_array($result3))
- {
- if($row['username'] != "Visitor")
- {
- $userarray[] = $row['username'];
- $article_content = $article_content."<a href='/profile.php?user=".$row['username']."' class='onlinelist'><span class='onlinelistt'>".$row['username']."</span><span class='onlinelistj'>".getadoptables()."</span><span class='onlinelistp'>".$row['dollar']."</span></a><br />";
- }
- }
- $article_content = $article_content."</p></p><br /><hr /><br />";
- $result = mysql_query("SELECT * FROM ".$prefix."online WHERE username = 'Visitor'");
- $total = mysql_num_rows($result);
- $article_content = $article_content."Total Visitors: ".$total;
- function getadoptables()
- {
- global $prefix;
- global $userarray;
- global $row;
- $res = mysql_query("SELECT COUNT(*) AS cnt FROM ".$prefix."owned_adoptables WHERE owner = '".$row['username']."'");
- while($poke = mysql_fetch_array($res))
- {
- $cnt = $poke['cnt'];
- }
- return $cnt;
- }
- // **********************************************************************
- // Begin Template Definition
- // **********************************************************************
- //Define our current theme
- $file = $themeurl;
- // Do the template changes and echo the ready template
- $template = file_get_contents($file);
- $article_date = getpmnotif();
- $template = replace(':ARTICLETITLE:',$article_title,$template);
- $template = replace(':ARTICLECONTENT:',$article_content,$template);
- $template = replace(':ARTICLEDATE:',$article_date,$template);
- $template = replace(':BROWSERTITLE:',$browsertitle,$template);
- $template = replace(':SITENAME:',$sitename,$template);
- //Define our links
- $template = replace(':LINKSBAR:',$links,$template);
- //Get the content for the side bar...
- $sidebar = getsidebar();
- $template = replace(':SIDEFEED:',$sidebar,$template);
- //Get the ad content...
- $template = replace(':ADS:',$ads,$template);
- //Get the slogan info
- $template = replace(':SLOGAN:',$slogan,$template);
- echo $template;
- // **********************************************************************
- // End Template Definition
- // **********************************************************************
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement