403Webshell
Server IP : 23.111.136.34  /  Your IP : 216.73.216.136
Web Server : Apache
System : Linux servidor.eurohost.com.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : meusitei ( 1072)
PHP Version : 5.6.40
Disable Function : show_source, system, shell_exec, passthru, proc_open
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/meusitei/public_html/central/modules/reports/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/meusitei/public_html/central/modules/reports/disk_usage_summary.php
<?php

if (!defined("WHMCS"))
    die("This file cannot be accessed directly");

$reportdata["title"] = "Disk Space & Bandwidth Usage Summary";
$reportdata["description"] = "This report shows the Disk Space & Bandwidth Usage Statistics for hosting accounts";

$reportdata["tableheadings"] = array("Client Name/Domain","Disk Usage","Disk Limit","% Used","BW Usage","BW Limit","% Used");

if ($_GET["action"]=="updatestats") {
    require("../includes/modulefunctions.php");
    ServerUsageUpdate();
}

$query2 = "SELECT * FROM tblservers ORDER BY `name` ASC"; 
$result2=full_query($query2);
while($data = mysql_fetch_array($result2)) {
    $serverid = $data["id"];
    $name = $data["name"];
    $ipaddress = $data["ipaddress"];
    $reportdata["tablevalues"][] = array("**<B>$name</B> - $ipaddress");
    $query = "SELECT tblhosting.domain,tblhosting.diskusage,tblhosting.disklimit,tblhosting.bwlimit,tblhosting.bwusage,tblhosting.domainstatus,tblclients.firstname,tblclients.lastname,tblclients.companyname,tblhosting.lastupdate FROM tblhosting INNER JOIN tblclients ON tblclients.id=tblhosting.userid WHERE tblhosting.server=".(int)$serverid." AND tblhosting.lastupdate!='0000-00-00 00:00:00' AND (domainstatus='Active' OR domainstatus='Suspended') ORDER BY tblhosting.domain ASC"; 
    $result=full_query($query);
    while($data = mysql_fetch_array($result)) {
        $firstname = $data["firstname"];
        $lastname = $data["lastname"];
        $companyname = $data["companyname"];
        $name = "$firstname $lastname";
        if ($companyname!="") { $name.=" (".$companyname.")"; }
        $domain = $data["domain"];
        $diskusage = $data["diskusage"];
        $disklimit = $data["disklimit"];
        $bwusage = $data["bwusage"];
        $bwlimit = $data["bwlimit"];
        $lastupdate = $data["lastupdate"];
        if ($disklimit=="0") { $percentused = "N/A"; } else { @$percentused = number_format((($diskusage/$disklimit)*100), 0, '.', ''); }
        if ($disklimit=="0") { $disklimit="Unlimited"; }
        if ($bwlimit=="0") { $bwpercentused = "N/A"; } else { @$bwpercentused = number_format((($bwusage/$bwlimit)*100), 0, '.', ''); }
        if ($bwlimit=="0") { $bwlimit="Unlimited"; }
        if ($percentused!="N/A") { $percentused.="%"; }
        if ($bwpercentused!="N/A") { $bwpercentused.="%"; }
        $reportdata["tablevalues"][] = array("$name<br>$domain","$diskusage MB","$disklimit MB","$percentused","$bwusage MB","$bwlimit MB","$bwpercentused");
    }
}

$data["footertext"]="<p>Disk Space Usage Stats Last Updated at ".fromMySQLDate($lastupdate,"time")." - <a href=\"".$_SERVER["PHP_SELF"]."?report=".$_GET["report"]."&action=updatestats\">Update Now</a></p>";

?>

Youez - 2016 - github.com/yon3zu
LinuXploit