Exemplo n.º 1
0
?>
</h3>
            </div>
            <div style="clear:both;"><br/><br/></div>
            &nbsp;&nbsp;
            <?php 
echo $filter;
?>
<br/>
            <div style="clear:both;">&nbsp;</div>
            <hr/>
            <div style="clear:both;"><br/></div>
            <table>
            <tr bgcolor="YELLOW" style="height:30px;" ><td>Tipo do Contador</td><td>Data de Leitura</td><td>Medição Final</td><td>Medição Inicial</td><td>Consumo</td><td>Franquia</td><td>Excedente (Págs.)</td><td>Tarifa sobre exced.</td><td>Valor Fixo (R$)</td><td>Valor Variável (R$)</td><td>Valor Total (R$)</td></tr>
            <?php 
BuildRows(false);
?>
            </table>
            <div style="clear:both;"><br/></div>

            <h3 style="border:0; margin:0;" >&nbsp;&nbsp;QUADRO RESUMO</h3>
            <table>
            <tr bgcolor="LIGHTGRAY" ><td>Tipo do Contador</td><td>Consumo</td><td>Franquia</td><td>Excedente</td><td>Valor Fixo (R$)</td><td>Valor Variável (R$)</td><td>Valor Total (R$)</td></tr>
            <?php 
$grandTotal = 0;
foreach ($totalContadores as $billingSummary) {
    if ($billingSummary->valorTotal != 0) {
        echo '<tr bgcolor="WHITE" ><td>' . $calculoFaturamento->GetContadorAsText($billingSummary->tipoContador) . '</td><td>' . $billingSummary->consumo . '</td><td>' . $billingSummary->franquia . '</td><td>' . $billingSummary->excedente . '</td><td>' . formatBrCurrency($billingSummary->valorFixo, 2) . '</td><td>' . formatBrCurrency($billingSummary->valorVariavel, 2) . '</td><td>' . formatBrCurrency($billingSummary->valorTotal, 2) . '</td></tr>';
        $grandTotal += $billingSummary->valorTotal;
    }
}
Exemplo n.º 2
0
function system_packages()
{
    $sock = new sockets();
    $users = new usersMenus();
    $KASPERSKY_APPLIANCE = FALSE;
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $KASPERSKY_APPLIANCE = TRUE;
    }
    if ($users->KASPERSKY_WEB_APPLIANCE) {
        $KASPERSKY_APPLIANCE = TRUE;
    }
    if ($users->OPENVPN_APPLIANCE) {
        $OPENVPN_APPLIANCE = TRUE;
    }
    $MEM_TOTAL_INSTALLEE = $users->MEM_TOTAL_INSTALLEE;
    $GlobalApplicationsStatus = $sock->APC_GET("GlobalApplicationsStatus", 2);
    if ($GlobalApplicationsStatus == null) {
        $GlobalApplicationsStatus = base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));
        $sock->APC_SAVE("GlobalApplicationsStatus", $GlobalApplicationsStatus);
    }
    $html = "\n\n<br>\n<table style='width:100%;padding:2px:margin:3px;border:1px solid #CCCCCC'>\n<tr style='background-color:#CCCCCC'>\n<td>&nbsp;</td>\n<td style='font-size:13px'><strong>{software}</strong></td>\n<td style='font-size:13px'><strong>{current_version}</strong></td>\n<td style='font-size:13px'><strong>{available_version}</strong></td>\n<td style='font-size:13px'>&nbsp;</td>\n<td style='font-size:13px'><strong>{status}</strong></td>\n</tr>";
    if ($users->VMWARE_HOST) {
        $html = $html . BuildRows("APP_VMTOOLS", $GlobalApplicationsStatus, "VMwareTools");
    }
    if ($users->VIRTUALBOX_HOST) {
        $html = $html . BuildRows("APP_VBOXADDITIONS", $GlobalApplicationsStatus, "VBoxLinuxAdditions-{$users->ArchStruct}");
    }
    if ($users->LinuxDistriCode == 'DEBIAN' or $users->LinuxDistriCode == 'UBUNTU') {
        $html = $html . BuildRows("APP_OPENLDAP", $GlobalApplicationsStatus, "openldap");
    }
    //if(!$users->AS_VPS_CLIENT){$html=$html.BuildRows("APP_MYSQL",$GlobalApplicationsStatus,"mysql-cluster-gpl");}
    if (!$KASPERSKY_APPLIANCE) {
        if ($MEM_TOTAL_INSTALLEE > 700000) {
            if (!$users->AS_VPS_CLIENT) {
                $html = $html . BuildRows("APP_LXC", $GlobalApplicationsStatus, "lxc");
            }
        }
    }
    $html = $html . BuildRows("APP_PHPLDAPADMIN", $GlobalApplicationsStatus, "phpldapadmin");
    $html = $html . BuildRows("APP_MYSQL", $GlobalApplicationsStatus, "mysql-server");
    $html = $html . BuildRows("APP_PHPMYADMIN", $GlobalApplicationsStatus, "phpMyAdmin");
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . BuildRows("APP_GREENSQL", $GlobalApplicationsStatus, "greensql-fw");
    }
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . BuildRows("APP_TOMCAT", $GlobalApplicationsStatus, "apache-tomcat");
    }
    //$html=$html.BuildRows("APP_EACCELERATOR",$GlobalApplicationsStatus,"eaccelerator");
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . spacer('{smtp_packages}');
        $html = $html . BuildRows("APP_MSMTP", $GlobalApplicationsStatus, "msmtp");
        if ($MEM_TOTAL_INSTALLEE > 500000) {
            $html = $html . BuildRows("APP_EMAILRELAY", $GlobalApplicationsStatus, "emailrelay");
        }
    }
    $html = $html . spacer('{network_softwares}');
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . BuildRows("APP_DHCP", $GlobalApplicationsStatus, "dhcp");
    }
    if (!$KASPERSKY_APPLIANCE) {
        if ($MEM_TOTAL_INSTALLEE > 700000) {
            $html = $html . BuildRows("APP_PDNS", $GlobalApplicationsStatus, "pdns");
        }
    }
    if (!$KASPERSKY_APPLIANCE) {
        if ($MEM_TOTAL_INSTALLEE > 700000) {
            $html = $html . BuildRows("APP_POWERADMIN", $GlobalApplicationsStatus, "poweradmin");
        }
    }
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . BuildRows("APP_OPENVPN", $GlobalApplicationsStatus, "openvpn");
    }
    $html = $html . BuildRows("APP_IPTACCOUNT", $GlobalApplicationsStatus, "iptaccount");
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . BuildRows("APP_AMACHI", $GlobalApplicationsStatus, "hamachi");
    }
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . BuildRows("APP_PUREFTPD", $GlobalApplicationsStatus, "pure-ftpd");
    }
    if (!$KASPERSKY_APPLIANCE) {
        if (!$OPENVPN_APPLIANCE) {
            $html = $html . BuildRows("APP_MLDONKEY", $GlobalApplicationsStatus, "mldonkey");
        }
    }
    if (!$KASPERSKY_APPLIANCE) {
        if (!$OPENVPN_APPLIANCE) {
            $html = $html . spacer('{storagebakcup_softwares}');
            $html = $html . BuildRows("APP_AMANDA", $GlobalApplicationsStatus, "amanda");
            $html = $html . BuildRows("APP_DROPBOX", $GlobalApplicationsStatus, "dropbox-32");
            $html = $html . BuildRows("APP_FUSE", $GlobalApplicationsStatus, "fuse");
            $html = $html . BuildRows("APP_ZFS_FUSE", $GlobalApplicationsStatus, "zfs-fuse");
            $html = $html . BuildRows("APP_TOKYOCABINET", $GlobalApplicationsStatus, "tokyocabinet");
            $html = $html . BuildRows("APP_LESSFS", $GlobalApplicationsStatus, "lessfs");
            if (!$KASPERSKY_APPLIANCE) {
                $html = $html . BuildRows("APP_DAR", $GlobalApplicationsStatus, "dar");
            }
        }
    }
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . spacer('{secuirty_softwares}');
        if ($MEM_TOTAL_INSTALLEE > 700000) {
            $html = $html . BuildRows("APP_CLAMAV", $GlobalApplicationsStatus, "clamav");
        }
        $html = $html . BuildRows("APP_SNORT", $GlobalApplicationsStatus, "snort");
        $html = $html . BuildRows("APP_NMAP", $GlobalApplicationsStatus, "nmap");
        $html = $html . BuildRows("APP_SMARTMONTOOLS", $GlobalApplicationsStatus, "smartmontools");
        if (!$OPENVPN_APPLIANCE) {
            $html = $html . spacer('{computers_management}');
            $html = $html . BuildRows("APP_WINEXE", $GlobalApplicationsStatus, "winexe-static");
            $html = $html . BuildRows("APP_OCSI", $GlobalApplicationsStatus, "OCSNG_UNIX_SERVER");
            $html = $html . BuildRows("APP_OCSI2", $GlobalApplicationsStatus, "OCSNG_UNIX_SERVER2");
            $html = $html . BuildRows("APP_OCSI_LINUX_CLIENT", $GlobalApplicationsStatus, "OCSNG_LINUX_AGENT");
        }
    }
    if (!$KASPERSKY_APPLIANCE) {
        if (!$OPENVPN_APPLIANCE) {
            $html = $html . spacer('{xapian_packages}');
            $html = $html . BuildRows("APP_XAPIAN", $GlobalApplicationsStatus, "xapian-core");
            $html = $html . BuildRows("APP_XAPIAN_OMEGA", $GlobalApplicationsStatus, "xapian-omega");
            $html = $html . BuildRows("APP_XAPIAN_PHP", $GlobalApplicationsStatus, "xapian-bindings");
            $html = $html . BuildRows("APP_XPDF", $GlobalApplicationsStatus, "xpdf");
            //$html=$html.BuildRows("APP_UNZIP",$GlobalApplicationsStatus,"unzip");
            $html = $html . BuildRows("APP_UNRTF", $GlobalApplicationsStatus, "unrtf");
            $html = $html . BuildRows("APP_CATDOC", $GlobalApplicationsStatus, "catdoc");
            $html = $html . BuildRows("APP_ANTIWORD", $GlobalApplicationsStatus, "antiword");
        }
    }
    $html = $html . "</table>";
    if (posix_getuid() == 0) {
        file_put_contents(dirname(__FILE__) . "/ressources/logs/setup.index." . __FUNCTION__ . ".html", $html);
        return null;
    }
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
Exemplo n.º 3
0
function system_packages()
{
    $sock = new sockets();
    $users = new usersMenus();
    $KASPERSKY_APPLIANCE = FALSE;
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $KASPERSKY_APPLIANCE = TRUE;
    }
    if ($users->KASPERSKY_WEB_APPLIANCE) {
        $KASPERSKY_APPLIANCE = TRUE;
    }
    $GlobalApplicationsStatus = $sock->APC_GET("GlobalApplicationsStatus", 2);
    if ($GlobalApplicationsStatus == null) {
        $GlobalApplicationsStatus = base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));
        $sock->APC_SAVE("GlobalApplicationsStatus", $GlobalApplicationsStatus);
    }
    $html = "\n\n<br>\n<table style='width:100%;padding:2px:margin:3px;border:1px solid #CCCCCC'>\n<tr style='background-color:#CCCCCC'>\n<td>&nbsp;</td>\n<td style='font-size:13px'><strong>{software}</strong></td>\n<td style='font-size:13px'><strong>{current_version}</strong></td>\n<td style='font-size:13px'><strong>{available_version}</strong></td>\n<td style='font-size:13px'>&nbsp;</td>\n<td style='font-size:13px'><strong>{status}</strong></td>\n</tr>";
    if ($users->VMWARE_HOST) {
        $html = $html . BuildRows("APP_VMTOOLS", $GlobalApplicationsStatus, "VMwareTools");
    }
    $html = $html . BuildRows("APP_MYSQL", $GlobalApplicationsStatus, "mysql-cluster-gpl");
    $html = $html . BuildRows("APP_PDNS", $GlobalApplicationsStatus, "pdns");
    //$html=$html.BuildRows("APP_EACCELERATOR",$GlobalApplicationsStatus,"eaccelerator");
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . BuildRows("APP_DAR", $GlobalApplicationsStatus, "dar");
    }
    $html = $html . BuildRows("APP_MSMTP", $GlobalApplicationsStatus, "msmtp");
    $html = $html . BuildRows("APP_EMAILRELAY", $GlobalApplicationsStatus, "emailrelay");
    $html = $html . BuildRows("APP_OCSI_LINUX_CLIENT", $GlobalApplicationsStatus, "OCSNG_LINUX_AGENT");
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . BuildRows("APP_PUREFTPD", $GlobalApplicationsStatus, "pure-ftpd");
    }
    $html = $html . BuildRows("APP_SMARTMONTOOLS", $GlobalApplicationsStatus, "smartmontools");
    $html = $html . BuildRows("APP_PHPLDAPADMIN", $GlobalApplicationsStatus, "phpldapadmin");
    $html = $html . BuildRows("APP_PHPMYADMIN", $GlobalApplicationsStatus, "phpMyAdmin");
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . BuildRows("APP_CLAMAV", $GlobalApplicationsStatus, "clamav");
        $html = $html . BuildRows("APP_AMACHI", $GlobalApplicationsStatus, "hamachi");
        $html = $html . BuildRows("APP_MLDONKEY", $GlobalApplicationsStatus, "mldonkey");
        $html = $html . spacer('{computers_management}');
        $html = $html . BuildRows("APP_NMAP", $GlobalApplicationsStatus, "nmap");
        $html = $html . BuildRows("APP_WINEXE", $GlobalApplicationsStatus, "winexe-static");
        $html = $html . BuildRows("APP_OCSI", $GlobalApplicationsStatus, "OCSNG_UNIX_SERVER");
    }
    if (!$KASPERSKY_APPLIANCE) {
        $html = $html . spacer('{xapian_packages}');
        $html = $html . BuildRows("APP_XAPIAN", $GlobalApplicationsStatus, "xapian-core");
        $html = $html . BuildRows("APP_XAPIAN_OMEGA", $GlobalApplicationsStatus, "xapian-omega");
        $html = $html . BuildRows("APP_XAPIAN_PHP", $GlobalApplicationsStatus, "xapian-bindings");
        $html = $html . BuildRows("APP_XPDF", $GlobalApplicationsStatus, "xpdf");
        //$html=$html.BuildRows("APP_UNZIP",$GlobalApplicationsStatus,"unzip");
        $html = $html . BuildRows("APP_UNRTF", $GlobalApplicationsStatus, "unrtf");
        $html = $html . BuildRows("APP_CATDOC", $GlobalApplicationsStatus, "catdoc");
        $html = $html . BuildRows("APP_ANTIWORD", $GlobalApplicationsStatus, "antiword");
    }
    $html = $html . "</table>";
    if (posix_getuid() == 0) {
        file_put_contents(dirname(__FILE__) . "/ressources/logs/setup.index." . __FUNCTION__ . ".html", $html);
        return null;
    }
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}