ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/cf.schmorp.de/www/src/template/links.php
Revision: 1.6
Committed: Sat Apr 3 01:28:53 2010 UTC (16 years, 7 months ago) by sf-dustfinger
Branch: MAIN
Changes since 1.5: +1 -21 lines
Log Message:
Improved the effeciency of the users online counter by making it read a smaller file rather than parsing the entire recent.json on every page load.

File Contents

# User Rev Content
1 sf-dustfinger 1.1 <div id="linkBar">
2 sf-dustfinger 1.2 <a href='index.html'>Home</a>
3     <a href='about.html'>About</a>
4     <a href='download.html'>Download</a>
5 sf-dustfinger 1.5 <a href='hiscores.html'>High Scores</a>
6 sf-dustfinger 1.1 <a href='#'>Contact</a>
7 sf-dustfinger 1.4
8     <?php
9 sf-dustfinger 1.6 $onlineCount = file_get_contents("usercount.crossfire.schmorp.de");
10 sf-dustfinger 1.4
11     echo "<a style='float: right;' href='recent.html'>$onlineCount Players Online</a>\n";
12     ?>
13    
14 sf-dustfinger 1.1 </div>