Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 30th August 2009, 21:17
MasteRTriX MasteRTriX is offline
Junior Member
 
Join Date: Aug 2009
Posts: 28
Thanks: 9
Thanked 2 Times in 2 Posts
 
Lightbulb Show MB / GB / TB in statistics page

To show the correct units in the statistics page of the client, Ive patched the code as follows.

File: /home/admispconfig/ispconfig/lib/plugins/check_webspace.plugin.php

Find the line
Code:
$html_out .= '<tr>
       <td width="70%" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">'.$go_api->lng("Speicherplatz gesamt").':</font></td>
       <td width="30%" bgcolor="#FFFFFF" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">'.$web_speicher.'</font></td>
</tr>';
And replace it with
Code:
if (is_numeric($web_speicher))
{
     $number = $web_speicher;
     if ($number < 1024)
          $web_speicher_formatted = number_format($number,2) . ' MB';
     elseif ($number < (1024 * 1024))
          $web_speicher_formatted = number_format($number/(1024),2) . ' GB';
     elseif ($number < (1024 * 1024 * 1024))
          $web_speicher_formatted = number_format($number/(1024*1024),2) . ' TB';
}
else
     $web_speicher_formatted = $web_speicher;

$html_out .= '<tr>
       <td width="70%" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">'.$go_api->lng("Speicherplatz gesamt").':</font></td>
       <td width="30%" bgcolor="#FFFFFF" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">'.$web_speicher_formatted.'</font></td>
</tr>';
Reply With Quote
The Following User Says Thank You to MasteRTriX For This Useful Post:
falko (31st August 2009)
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
URL's show router admin page from inside internal network jopa123 Installation/Configuration 12 1st August 2010 13:14
how to show per domain statistics with webalizer martin1977 Installation/Configuration 4 22nd June 2009 15:02
After the account was established and set up a new page do not show ferasfm General 1 28th April 2009 16:18
It works! Apache2 page show when I put my domain without www. hhhhhh Server Operation 6 25th November 2008 02:59
Errors on the page of statistics Versen Installation/Configuration 13 2nd September 2006 16:07


All times are GMT +2. The time now is 08:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.