Jump to content

FluxCP Addson: Server Online Users Highest Peak


Recommended Posts

Posted

File Name: FluxCP Addson: Server Online Users Highest Peak

File Submitter: JayPee

File Submitted: 17 Mar 2012

File Category: Web Resources

This allow you to view the Server Online Users Highest Peak in your Server. The addons uses a script which records and determines the Server Online Users Highest Peak.

Note: If the FluxCP Installation doesnt kindly import the cp_highest_peak table in your database manually. The .sql file can be found at the schemas folder.

Click here to download this file

  • Upvote 1
Posted

First off, thank you for the patch JayPee!

However, after applying the patch, my page keeps saying "No Server Highest Peak Found". I checked the sql db though and there is a value stored... it's just not showing on the php.

Posted

First off, thank you for the patch JayPee!

However, after applying the patch, my page keeps saying "No Server Highest Peak Found". I checked the sql db though and there is a value stored... it's just not showing on the php.

Okay, good, I thought it was just me ><! I had the same issue and the problem was on line 40 or so of the actual php script.

  • Upvote 1
Posted

First off, thank you for the patch JayPee!

However, after applying the patch, my page keeps saying "No Server Highest Peak Found". I checked the sql db though and there is a value stored... it's just not showing on the php.

Okay, good, I thought it was just me ><! I had the same issue and the problem was on line 40 or so of the actual php script.

line 40 of which script? i dont see a php file with up to 40 lines.

Posted (edited)

Whoops, I meant in the index.php where the actual script is in the module.

Something with the error on @hp something. Should be like, the last third line.

Edited by Mysterious
Posted

1 18 2012-03-17

Whoops, I meant in the index.php where the actual script is in the module.

Something with the error on @hp something. Should be like, the last third line.

//Highest Peak Table

$hp = Flux::config('FluxTables.HighestPeak');

$sql = "SELECT num_users,peak_date FROM {$server->loginDatabase}.$hp LIMIT 1";

$sth = $server->connection->getStatement($sql);

$sth->execute();

$hp = $sth->fetchAll();

?

Posted

<h2>Server Highest Peak</h2>
<?php if($hp): ?>
<table class="horizontal-table" width="100%">  
<?php foreach($hp as $peak): ?>
<t
<th style="width:30%;">Server Highest Peak:</th>
<td><?php echo $peak->num_users; ?></td>
</t
<t
<th style="width:30%;">Date:</th>
<td><?php echo $peak->peak_date; ?></td>
</t
<?php endforeach;?>
</table>
<?php endif; ?>
<?php if(!$hp): ?>
<i>No Server Highest Peak Found</i>
<?php endif; ?>

<?php if(!$hp): ?> <--- Is the error o_O.

Posted (edited)

<?php if(!$hp): ?> <--- Is the error o_O.

How is that the error? Nothing is wrong with that.

____________

Anyway I found out what was wrong. The addon.php code is supposed to be added to application.php. Maybe you should name it as application.php instead of addon.php

Edited by sizenine
  • 3 months later...
  • 2 weeks later...
Posted

I trieed placing this on the left columns / right column and it kept showing "Highest Peak: " (With no number) and or No highest peak found, when I put in a variable.

  • 11 months later...
  • 4 months later...
  • 6 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...