• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pourcentage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中pourcentage函数的典型用法代码示例。如果您正苦于以下问题:PHP pourcentage函数的具体用法?PHP pourcentage怎么用?PHP pourcentage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pourcentage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: stats_var_spool

function stats_var_spool()
{
    $sock = new sockets();
    $array = unserialize(base64_decode($sock->getFrameWork("postfix.php?stats-var-spool=yes")));
    if (!is_array($array)) {
        return;
    }
    $html = "\n\t<table style='width:99%' class=form>\n\t\t<tr>\n\t\t<td class=legend style='font-size:14px'>{size}:</td>\n\t\t<td>" . pourcentage($array["POURC"], "{$array["DISP"]}/{$array["SIZE"]}") . "</td>\n\t\t<td class=legend style='font-size:14px'>{$array["DISP"]}/{$array["SIZE"]}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td class=legend style='font-size:14px'>Inodes:</td>\n\t\t<td>" . pourcentage($array["IPOURC"]) . "</td>\n\t\t<td class=legend style='font-size:14px'>{$array["IDISP"]}/{$array["INODES"]}</td>\n\t\t</tr>\t\t\t\t\n\t</table>\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:11,代码来源:postfix.varspool.php


示例2: popup

function popup()
{
    $sock = new sockets();
    $tpl = new templates();
    $page = CurrentPageName();
    $dev = $_GET["dev"];
    $devenc = base64_encode($dev);
    $array = unserialize(base64_decode($sock->getFrameWork("system.php?tune2fs-values={$devenc}")));
    $t = time();
    $LAST_MOUNTED_ON = $array["LAST_MOUNTED_ON"];
    $WARNING_LOOSE_DATA = $tpl->javascript_parse_text("{WARNING_LOOSE_DATA}");
    $INODES_SIZEZ[128] = 128;
    $INODES_SIZEZ[256] = 256;
    $INODES_SIZEZ[1024] = 1024;
    $html = "\n\t<div id='{$t}'></div>\t\t\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{used}:</td>\t\t\n\t\t<td style='font-size:16px;font-weight:bold'>{$array["INODES_USED"]}&nbsp;{files}</td>\n\t\t<td style='font-size:16px;font-weight:bold'>" . pourcentage($array["INODES_POURC"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{inode_size}:</td>\t\t\n\t\t<td style='font-size:16px;font-weight:bold'>" . Field_array_Hash($INODES_SIZEZ, "INODE_SIZE", $array["INODE_SIZE"], null, '', 0, "font-size:16px") . "</td>\n\t\t<td style='font-size:16px;font-weight:bold'></td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>Max:</td>\t\t\n\t\t<td style='font-size:16px;font-weight:bold'>" . Field_text("INODES_MAX", $array["INODES_MAX"], "font-size:16px;width:100px") . "&nbsp;{files}</td>\n\t\t<td style='font-size:16px;font-weight:bold'></td>\n\t</tr>\n\t<tr><td colspan=3 align='right'><hr>" . button("{apply}", "Save{$t}()", 18) . "</td></tr>\n\t\n\t</table>\t\n\n\t\t\t\t\n\t\t\t\t\n\t<script>\n\n\t\tfunction check{$t}(){\n\t\t\tvar LAST_MOUNTED_ON='{$LAST_MOUNTED_ON}';\n\t\t\tif(LAST_MOUNTED_ON=='/'){\n\t\t\t\tdocument.getElementById('INODES_MAX').disabled=true;\n\t\t\t\tdocument.getElementById('INODE_SIZE').disabled=true;\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tvar x_save{$t}= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>5){alert(results);}\n\t\t\tLoadjs('{$page}?dev={$dev}');\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfunction Save{$t}(){\n\t\t\tvar LAST_MOUNTED_ON='{$LAST_MOUNTED_ON}';\n\t\t\tif(LAST_MOUNTED_ON=='/'){return;}\n\t\t\tif(confirm('{$WARNING_LOOSE_DATA}')){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('dev','{$devenc}');\n\t\t\t\tXHR.appendData('INODES_MAX',document.getElementById('INODES_MAX').value);\n\t\t\t\tXHR.appendData('INODE_SIZE',document.getElementById('INODE_SIZE').value);\n\t\t\t\tAnimateDiv('{$t}');\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_save{$t});\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\tcheck{$t}();";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:17,代码来源:system.internal.partition.inodes.php


示例3: squid_booster_smp

function squid_booster_smp($encoded)
{
    $sock = new sockets();
    $array = unserialize(base64_decode($encoded));
    if (!is_array($array)) {
        return;
    }
    if (count($array) == 0) {
        return;
    }
    $html[] = "\n\t\t\t<div style='min-height:115px'>\n\t\t\t<table>\n\t\t\t<tr><td colspan=2 style='font-size:14px;font-weight:bold'>Cache(s) Booster</td></tr>\n\t\t\t";
    while (list($proc, $pourc) = each($array)) {
        $html[] = "<tr>\n\t\t<td width=1% nowrap style='font-size:13px;font-weight:bold'>Proc #{$proc}</td><td width=1% nowrap>" . pourcentage($pourc) . "</td></tr>";
    }
    $html[] = "</table></div>";
    return RoundedLightGreen(@implode("\n", $html));
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:17,代码来源:nodes.squid.status.php


示例4: mem_status

function mem_status()
{
    $tpl = new templates();
    $sock = new sockets();
    $datas = unserialize(base64_decode($sock->getFrameWork("cmd.php?postfix-mem-disk-status={$_GET["hostname"]}")));
    $MOUTED = $datas["MOUTED"];
    $TOTAL_MEMORY_MB = $datas["TOTAL_MEMORY_MB"];
    $TOTAL_MEMORY_MB_FREE = $datas["TOTAL_MEMORY_MB_FREE"];
    $pourc = round($TOTAL_MEMORY_MB_FREE / $TOTAL_MEMORY_MB * 100);
    $pourc_used = pourcentage($pourc);
    if ($MOUTED > 0) {
        $pourc = round($MOUTED / $TOTAL_MEMORY_MB_FREE * 100);
        $purc_mounted = pourcentage($pourc);
    }
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='font-size:11px'>{free}: </td>\n\t</tr>\n\t<td valign='top'>{$pourc_used}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' align='right'><i>{$TOTAL_MEMORY_MB_FREE}MB/{$TOTAL_MEMORY_MB}MB</i></td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2><hr></td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:11px'>{postfix_tmpfs}:</td>\n\t</tr>\n\t\t<td valign='top'>{$purc_mounted}</td>\n\t</tr>\n\t</tr>\n\t\t<td valign='top' align='right'><i>{$MOUTED}MB/{$TOTAL_MEMORY_MB_FREE}MB</td>\n\t</tr>\t\n\t</table>\n\t\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-24.png", "{refresh}", "mem_status()") . "</div>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:17,代码来源:domains.postfix.memory.php


示例5: squid_cache_status

function squid_cache_status()
{
    $page = CurrentPageName();
    $squid = new squidnodes($_GET["nodeid"]);
    $tpl = new templates();
    $q = new mysql_blackbox();
    $t = $_GET["t"];
    $sql = "SELECT * FROM cachestatus WHERE nodeid='{$_GET["nodeid"]}'";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo "<H3>Error: {$q->mysql_error}</H3>";
        return;
    }
    //$squid->
    $tr[] = "\n\t\t\t<table style='width:99%' class=form>\n\t\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=1%><img src='img/parameters2-64.png'></td>\n\t\t\t\t<td valign='top'>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign=top><strong style='font-size:14px'>\n\t\t\t\t\t\t\t<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('nodes.squid.caches32.parms.php?hostid={$_GET["hostid"]}&nodeid={$_GET["nodeid"]}');\"\n\t\t\t\t\t\t\tstyle='font-size:14px;text-decoration:underline;font-weight:bold'>\n\t\t\t\t\t\t\t{caches_parameters}</a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign='top'><span style='font-size:14px'>{cache_parameters_node_explain}</span></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>";
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $tr[] = "\n\t\t\t<table style='width:99%' class=form>\n\t\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=1%><img src='img/disk-64.png'></td>\n\t\t\t\t<td valign='top'>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign=top><strong style='font-size:14px'>" . basename($ligne["cachedir"]) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign='top'><strong style='font-size:14px'>" . FormatBytes($ligne["currentsize"]) . "/" . FormatBytes($ligne["maxsize"]) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign='top'>" . pourcentage($ligne["pourc"]) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>";
    }
    $html = CompileTr2($tr);
    $html = $html . "<div style='width:100%;text-align:right'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('squid-caches-status{$t}','{$page}?squid-caches-status=yes&nodeid={$_GET["nodeid"]}');") . "</div>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:22,代码来源:nodes.squid.caches32.php


示例6: popup_events

function popup_events()
{
    $sock = new sockets();
    $tpl = new templates();
    $datas = unserialize(base64_decode($sock->getFrameWork("cmd.php?smtp-import-events=yes&ou={$_GET["ou"]}")));
    if (!is_array($datas)) {
        echo $tpl->_ENGINE_parse_body("<center><H3>{please_wait}</H3></center>");
        return;
    }
    $pourcent = $datas["POURC"];
    $html_pource = pourcentage($pourcent);
    krsort($datas["EVENTS"]);
    while (list($num, $line) = each($datas["EVENTS"])) {
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $tr = $tr . "\n\t\t<tr class={$classtr}>\n\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t<td width=99% style='font-size:13px'>{$line}</td>\n\t\t</tr>\n\t\t";
    }
    $html = $html . "<hr>\n{$html_pource}\n<hr>\n<div style='height:350px;overflow:auto'>\n<table cellspacing='0' cellpadding='0' border='0' class='tableView'>\n<thead class='thead'>\n\t<tr>\n\t<th colspan=2>{events}</th>\n\t\n\t</tr>\n</thead>\n<tbody class='tbody'>{$tr}</tbody></table></div>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:23,代码来源:domains.import.domains.php


示例7: popup

function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $t = $_GET["t"];
    $cachefile = "/usr/share/artica-postfix/ressources/logs/web/squidlogs.stats";
    $array = unserialize(@file_get_contents($cachefile));
    if (!isset($array["squidlogs"])) {
        @unlink($cachefile);
    }
    $array = unserialize(@file_get_contents($cachefile));
    if (!is_array($array)) {
        $sock = new sockets();
        $sock->getFrameWork("squid.php?squidlogs-stats=yes");
        $tt = time();
        $html = "<center>\n\t\t\t\t<p style='font-size:18px;font-weight:bold'>{please_wait_while_calculate_informations}</p>\n\t\t\t\t<p>squidlogs.stats no such file...</p>\n\t\t\t\t<img src='img/wait_verybig_mini_red.gif'></center>\n\t\t\t</center>\n\t\t\t\t<script>\n\t\t\t\t\tfunction Wait{$tt}(){\n\t\t\t\t\t\tLoadAjax('main-{$t}','{$page}?popup=yes&t={$t}');\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(\" Wait{$tt}()\",5000);\n\t\t\t\t</script>\n\t\t";
        echo $tpl->_ENGINE_parse_body($html);
        return;
    }
    $array = unserialize(@file_get_contents("ressources/logs/web/squidlogs.stats"));
    $html = "\n\t<div class=explain style='font-size:14px'>{squidlogs_explain}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td>\n\t\t\t<table style='width:100%' class=form>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px' valign='top'>{hard_drive}:</td>\n\t\t\t\t<td><strong style='font-size:14px;font-weight:bold'>{$array["squidlogs"]["DEV"]} </td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px' valign='top'>{hard_drive_status}:</td>\n\t\t\t\t<td><strong style='font-size:14px;font-weight:bold'>{$array["squidlogs"]["OC"]}/{$array["squidlogs"]["SIZE"]}</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px' valign='top'></td>\n\t\t\t\t<td><strong style='font-size:14px;font-weight:bold'>" . pourcentage($array["squidlogs"]["POURC"]) . "</td>\n\t\t\t</tr>\t\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px' valign='top'>{database_size}:</td>\n\t\t\t\t<td><strong style='font-size:14px;font-weight:bold'>{$array["squidlogs"]["REALPATH"]}:<span style='text-align:right'><i>" . FormatBytes($array["squidlogs"]["PATHSIZE"] / 1024) . "</span></td>\n\t\t\t</tr>\t\n\t\t\t</table>\n\t\t</td>\n\t\t<td>\n\t\n\t\t</td>\n\t\t</tr>\n\t</table>\n\t<div class=explain style='font-size:14px'>{syslogstore_explain}</div>\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td>\n\t\t\t<table style='width:100%' class=form>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px' valign='top'>{hard_drive}:</td>\n\t\t\t\t<td><strong style='font-size:14px;font-weight:bold'>{$array["syslogstore"]["DEV"]} </td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px' valign='top'>{hard_drive_status}:</td>\n\t\t\t\t<td><strong style='font-size:14px;font-weight:bold'>{$array["syslogstore"]["OC"]}/{$array["syslogstore"]["SIZE"]}</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px' valign='top'></td>\n\t\t\t\t<td><strong style='font-size:14px;font-weight:bold'>" . pourcentage($array["syslogstore"]["POURC"]) . "</td>\n\t\t\t</tr>\t\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px' valign='top'>{database_size}:</td>\n\t\t\t\t<td><strong style='font-size:14px;font-weight:bold'>{$array["syslogstore"]["REALPATH"]}:<span style='text-align:right'><i>" . FormatBytes($array["syslogstore"]["PATHSIZE"] / 1024) . "</span></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t\t\t<td valign='top'>\n\t\n\t\t\t</td>\n\t\t</tr>\n\t</table>\t\t\t\t\t\t\t\t\t\t\t\t\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:24,代码来源:squidlogs.php


示例8: progress_build

function progress_build()
{
    $tpl = new templates();
    echo "<center>";
    echo pourcentage($_GET["progress"]);
    echo "</center>";
    if ($_GET["progress"] == 100) {
        $tpl = new templates();
        echo $tpl->_ENGINE_parse_body("<center><hr><strong style='font-size:16px;color:#d32d2d;margin:15px'>{success}</strong><hr></center>");
        $_SESSION["WIZINSTANCE"] = array();
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:12,代码来源:postfix.multiple.instances.wizard.php


示例9: SafeBoxInfos

function SafeBoxInfos($mapper)
{
    $sock = new sockets();
    $array = unserialize(base64_decode($sock->getFrameWork("cmd.php?DiskInfos={$mapper}")));
    $html = "<table style='width:100%'>\n\t<tr>\n\t\t<td>" . pourcentage($array["POURC"]) . "</td>\n\t</tr>\n\t<tr>\n\t<td align='left'>{free}:{$array["FREE"]}&nbsp;|&nbsp;{size}:{$array["SIZE"]}&nbsp;|&nbsp;{used}:{$array["USED"]}<br>\n\t<code>{$array["MOUNTED"]}</td>\n\t</tr>\n\t</table>\t\n\t\n\t";
    return $html;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:7,代码来源:domains.edit.user.safebox.php


示例10: pourcentage

        echo pourcentage($nombre['npai'], $nombre['fait']);
        ?>
%;"><span>Adresse&nbsp;erronée&nbsp;:&nbsp;<?php 
        echo floor(pourcentage($nombre['npai'], $nombre['fait']));
        ?>
&nbsp;%</span></div><!--
    	 --></div>
    	    <?php 
    }
    ?>
    	    
    		<h4>Statistiques</h4>
    		
    		<ul class="statistiquesMission">
    			<li>Mission réalisée à <strong><?php 
    echo ceil(pourcentage($nombre['fait'], $nombre['total']));
    ?>
</strong>&nbsp;%.</li>
    			<li><strong><?php 
    echo number_format($nombre['total'], 0, ',', ' ');
    ?>
</strong>&nbsp;<?php 
    echo $data->get('mission_type') == 'porte' ? 'électeurs' : 'immeubles';
    ?>
 concernés par cette mission.</li>
    			<li>Il reste <strong><?php 
    echo number_format($nombre['attente'], 0, ',', ' ');
    ?>
</strong>&nbsp;<?php 
    echo $data->get('mission_type') == 'porte' ? 'électeurs' : 'immeubles';
    ?>
开发者ID:leqg,项目名称:leqg,代码行数:31,代码来源:mission.tpl.php


示例11: squid_cache_status

function squid_cache_status()
{
    $sock = new sockets();
    $DisableAnyCache = $sock->GET_INFO("DisableAnyCache");
    if (!is_numeric($DisableAnyCache)) {
        $DisableAnyCache = 0;
    }
    if ($DisableAnyCache == 1) {
        return;
    }
    $page = CurrentPageName();
    $squid = new squidbee();
    $tpl = new templates();
    $t = time();
    $q = new mysql_squid_builder();
    $sql = "SELECT * FROM cachestatus WHERE uuid='{$_GET["uuid"]}'";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo "<H3>Error: {$this->mysql_error}</H3>";
        return;
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $strong = "<strong style='font-size:14px'>";
        if (basename($ligne["cachedir"]) == "cache_booster") {
            $strong = "<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.booster.php')\" style='font-size:14px;text-decoration:underline;font-weight:bold'>";
        }
        $delete = imgtootltip("disk-64-delete.png", "{delete_cache}", "squid32DeleteCache('" . base64_encode($ligne["cachedir"]) . "')");
        $NICKEL[$ligne["cachedir"]] = true;
        if ($ligne["cachedir"] == $squid->CACHE_PATH) {
            $cache_type = $squid->CACHE_TYPE;
            $delete = imgtootltip("disk-64-config.png", "{apply}", "Loadjs('{$page}?add-new-disk-js=yes&chdef=yes')");
        } else {
            $cache_type = $squid->cache_list[$ligne["cachedir"]]["cache_type"];
        }
        if ($ligne["cachedir"] != $squid->CACHE_PATH) {
            if (!isset($squid->cache_list[$ligne["cachedir"]])) {
                $delete = "<img src='img/disk-64-hide.png'>";
            }
        }
        $html = $html . "\n\t\t\t\n\t\t\t<table style='width:99%' class=form>\n\t\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=1%>{$delete}</td>\n\t\t\t\t<td valign='top'>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign=top>{$strong}" . basename($ligne["cachedir"]) . "&nbsp;({$cache_type})</strong></a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign='top'><strong style='font-size:14px'>" . FormatBytes($ligne["currentsize"]) . "/" . FormatBytes($ligne["maxsize"]) . "</strong><div>{$ligne["cachedir"]}</div></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign='top'>" . pourcentage($ligne["pourc"]) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>";
    }
    while (list($path, $array) = each($squid->cache_list)) {
        if (isset($NICKEL[$path])) {
            continue;
        }
        $unit = "&nbsp;MB";
        $maxcachesize = null;
        if ($array["cache_type"] == "rock") {
            $maxcachesize = "&nbsp;({max_objects_size} {$array["cache_maxsize"]}{$unit})";
        }
        if (is_numeric($array["cache_size"])) {
            if ($array["cache_size"] > 1000) {
                $array["cache_size"] = $array["cache_size"] / 1000;
                $unit = "&nbsp;GB";
            }
        }
        if ($array["cache_type"] == "rock") {
            continue;
        }
        $html = $html . "\n\t\t\t<table style='width:99%' class=form>\n\t\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=1%><img src='img/disk-64-hide.png'></td>\n\t\t\t\t<td valign='top'>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign=top>{$strong}" . basename($path) . " ({$array["cache_type"]})</strong></a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign='top'><strong style='font-size:14px'>{$array["cache_size"]}{$unit}/{$maxcachesize}</strong><div>{$path}</div></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign='top'>&nbsp;</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>";
    }
    $html = $html . "\n\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('squid-caches-status','{$page}?squid-caches-status=yes&uuid={$_GET["uuid"]}');") . "</div>\n\t\n\t<script>\n\t\tfunction Squid32RefreshCacheStatusAuto{$t}(){\n\t\t\tif(document.getElementById('squid-caches-status')){\n\t\t\t\tLoadAjax('squid-caches-status','{$page}?squid-caches-status=yes&uuid={$_GET["uuid"]}');\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\tsetTimeout('Squid32RefreshCacheStatusAuto{$t}',10000);\n\t\t\n\t</script>\n\t\n\n\t\t\n\t\n\t";
    $sock = new sockets();
    $sock->getFrameWork("squid.php?refresh-caches-infos=yes");
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:66,代码来源:squid.cache-central.php


示例12: ptx_status

function ptx_status()
{
    $tpl = new templates();
    $sock = new sockets();
    $SquidBoosterMem = $sock->GET_INFO("SquidBoosterMem");
    if (!is_numeric($SquidBoosterMem)) {
        $SquidBoosterMem = 0;
    }
    $ptxt = "<a href=\"javascript:blur();\" \n\t\tOnClick=\"javascript:Loadjs('squid.booster.php');\" \n\t\tstyle='font-size:12px;text-decoration:underline'>{squid_booster}</a>";
    if ($SquidBoosterMem > 0) {
        $pourc = $sock->getFrameWork("squid.php?boosterpourc=yes");
        $ptxt = "\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td>{$ptxt}</td>\n\t\t\t\t<td>" . pourcentage($pourc) . "</td>\n\t\t\t</tr>\n\t\t</table>";
    }
    echo $tpl->_ENGINE_parse_body($ptxt);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:15,代码来源:squid.webstats.quicklinks.php


示例13: categories_details_list

function categories_details_list()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $sql = "SELECT * FROM updates_categories  WHERE filesize>0 AND categories='{$_GET["category-details-md"]}' ORDER BY progress";
    $q = new mysql();
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo "<H2>Fatal error {$sql}</H2>";
    }
    $num = mysql_num_rows($results);
    $html = "<center style='width:100%;height:450px;overflow:auto'>\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t\t<th width=1%>" . imgtootltip("refresh-24.png", "{refresh}", "RefreshCategoryDetails()") . "</th>\n\t\t<th>{database}</th>\n\t\t<th>{filesize}</th>\n\t\t<th colspan=2>{status}</th>\n\t\t\n\t</tr>\n</thead>\n<tbody class='tbody'>";
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $color = "black";
        $filesize = FormatBytes($ligne["filesize"] / 1024);
        $purc = pourcentage(round($ligne["progress"]));
        $html = $html . "\n\t\t<tr class={$classtr}>\n\t\t\t<td width=1%><img src=img/Database32.png></td>\n\t\t\t<td style='font-size:14px;font-weight:bold;color:{$color}'>{$ligne["filename"]}</td>\n\t\t\t<td style='font-size:14px;font-weight:bold;color:{$color}'>{$filesize}</td>\n\t\t\t<td style='font-size:14px;font-weight:bold;color:{$color}'>{$purc}</td>\n\t\t\t<td style='font-size:14px;font-weight:bold;color:{$color}'>{$ligne["subject"]}</td>\t\n\t\t</tr>";
    }
    $html = $html . "</table>\n\t\n\t<script>\n\t\tRefreshCategoryDetailsTitle();\n\t</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:26,代码来源:squid.blacklist.php


示例14: main_cache_list

function main_cache_list()
{
    $squid = new squidbee();
    $usermenus = new usersMenus();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $cacheinfo = unserialize(base64_decode($sock->getFrameWork("cmd.php?squid-cache-infos=yes")));
    $stats = "<table style=width:100%>";
    if (is_array($cacheinfo)) {
        while (list($path, $array) = each($cacheinfo)) {
            $pourc = pourcentage($array["POURC"]);
            $currentsize = FormatBytes($array["CURRENT"]);
            $max = FormatBytes($array["MAX"]);
            $stats = $stats . "\n\t\t\t<tr>\n\t\t\t\t<td valign='top' style='font-size:11px;font-weight:bold' nowrap>{$path} ({$max})</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td valign='top'>{$pourc}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td valign='top' style='font-size:10px' align='right'>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'><i>{used}:{$currentsize}</i>&nbsp;</td>\n\t\t\t\t\t<td width=1%>" . imgtootltip("ed_delete.gif", "{delete}", "DeleteCache('{$path}')") . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign='top'><hr></td>\n\t\t\t</tr>\n\t\t\t";
        }
    }
    $stats = $stats . "\n\t\t<tr>\n\t\t\t<td align='right' colspan=2>" . imgtootltip("database-48-add.png", "{add_cache_dir}", "AddCache('');") . "</td>\n\t\t</tr>\t\t\n\t\t</table>";
    echo $tpl->_ENGINE_parse_body($stats);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:20,代码来源:squid.newbee.php


示例15: main_artica_apt_config

function main_artica_apt_config()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql();
    $packagesNumber = $q->COUNT_ROWS("syspackages_updt", "artica_backup");
    $updatenowtext = $tpl->javascript_parse_text("{update_now}");
    if (!$q->ok) {
        echo "<H2>{$q->mysql_error}</H2>";
        return;
    }
    if ($packagesNumber == 0) {
        echo $tpl->_ENGINE_parse_body("<table style='width:100%'><tr><td width=1%><img src='img/ok64.png'></td><td><H2>{system_is_uptodate}</H2></td></tr></table>");
        return;
    }
    $html = "<div style='font-size:16px'>{$packagesNumber} {system_packages_can_be_upgraded}</div>";
    $q = new mysql();
    $sql = "SELECT COUNT(*) as tcount FROM syspackages_updt WHERE upgrade=1";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    $coche = $ligne["tcount"];
    if ($coche == $packagesNumber) {
        $coche = 1;
    } else {
        $coche = 0;
    }
    $refresh = imgtootltip('refresh-24.png', "{refresh}", "RefreshTab('main_config_artica_update');");
    $sql = "SELECT AVG(progress) AS tcount FROM syspackages_updt  WHERE upgrade=1";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    $global_progress = $ligne["tcount"];
    $html = "<center>\n<div id='sys-update-button' style='text-align:center;margin:5px'></div>\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t\t<th width=1%>" . Field_checkbox("EnableDisableAllUpgradePackage", 1, $coche, "EnableDisableAllUpgradePackage()") . "</th>\n\t\t<th colspan=2>{packages}</th>\n\t\t<th style='background-color:white;margin:0;padding:0;border:1px solid black'>" . pourcentage(round($global_progress)) . "</th>\n\t\t<th width=1% align='center'>{$refresh}</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
    $q = new mysql();
    $sql = "SELECT * FROM syspackages_updt ORDER BY package";
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo "<H2>{$q->mysql_error}</H2>";
    }
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $progress = "&nbsp;";
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $md = md5($ligne["package"]);
        $select = Field_checkbox("{$md}", 1, $ligne["upgrade"], "EnableDisableUpgradePackage('{$md}','{$ligne["package"]}')");
        if ($ligne["upgrade"] == 1) {
            $progress = pourcentage($ligne["progress"]);
        }
        $color = "black";
        $html = $html . "\n\t\t<tr class={$classtr}>\n\t\t\t<td width=1%>{$select}</td>\n\t\t\t<td style='font-size:16px;font-weight:bold;color:{$color}' width=99%>{$ligne["package"]}</td>\n\t\t\t<td width=1% colspan=3>{$progress}</td>\n\t\t</tr>\n\t\t";
    }
    $html = $html . "</tbody></table>\n\t\n\t<script>\n\t\n\tvar x_EnableDisableAllUpgradePackage= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tRefreshTab('main_config_artica_update');\n\t\t\t}\n\tvar x_EnableDisableUpgradePackage= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tsysbutton();\n\t\t\t}\t\t\t\t\t\t\n\t\n\t\n\tfunction EnableDisableAllUpgradePackage(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tif(document.getElementById('EnableDisableAllUpgradePackage').checked){XHR.appendData('EnableDisableAllUpgradePackage',1);}else{XHR.appendData('EnableDisableAllUpgradePackage',0);}\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_EnableDisableAllUpgradePackage);\n    \t}\n    \t\n    function sysbutton(){\n    \tLoadAjaxTiny('sys-update-button','{$page}?sys-update-button=yes');\n    \n    }\n    \n    function EnableDisableUpgradePackage(id,pkg){\n    \tvar XHR = new XHRConnection();\n    \tif(document.getElementById(id).checked){XHR.appendData('enabled',1);}else{XHR.appendData('enabled',0);}\n    \tXHR.appendData('pkg',pkg);\n    \tXHR.sendAndLoad('{$page}', 'POST',x_EnableDisableUpgradePackage);\n    }\n    \n    function SysUpdateNow(){\n    \tif(confirm('{$updatenowtext} ?')){\n     \t\tvar XHR = new XHRConnection();\n    \t\tXHR.appendData('pkg-upgrade','yes');\n    \t\tXHR.sendAndLoad('{$page}', 'POST',x_EnableDisableAllUpgradePackage);   \t\n    \t}\n    }\n\t\t\t\t\n\tsysbutton();\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:54,代码来源:artica.update.php


示例16: status

function status()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $lvs = $_GET["lvs"];
    $vg = $_GET["vg"];
    $md = md5("{$vg}{$lvs}");
    $groupnamemd = md5($vg);
    $current_text = $tpl->javascript_parse_text("{current}:");
    $give_new_size_in_mb = $tpl->javascript_parse_text("{give_new_size_in_mb}:");
    $array = unserialize(base64_decode($sock->getFrameWork("lvm.php?lvdisplay=" . urlencode($vg))));
    $status = $array["/dev/{$vg}/{$lvs}"];
    $crrentsize = $status["CURRENT_SIZE"];
    if (is_numeric($crrentsize["POURC"])) {
        $free = FormatBytes($crrentsize["FREE"]);
        $currentsize = "\n\t<tr class=oddRow>\n\t\t<td style='font-size:14px' class=legend>{used}:</td>\n\t\t<td style='font-size:14px;font-weight:bold'>" . pourcentage($crrentsize["POURC"]) . "</td>\n\t\t</tr>\n\t\t\n\t<tr class=>\n\t\t<td style='font-size:14px' class=legend>{free}:</td>\n\t\t<td style='font-size:14px;font-weight:bold'>{$free}</td>\n\t\t</tr>\t\t\n\t\t";
    }
    $sizeMB = round($status["SIZE"] / 1024);
    $size = FormatBytes($status["SIZE"]);
    $status["INFOS"]["UUID"];
    if ($status["INFOS"]["UUID"] != null) {
        $autofs = new autofs();
        $hash = $autofs->list_byuuid($status["INFOS"]["UUID"]);
        if (count($hash) > 0) {
            $automount = "\n\t\t\t\t<tr class=oddRow>\n\t\t\t\t<td style='font-size:14px' class=legend>{automount}:</td>\n\t\t\t\t<td style='font-size:14px;font-weight:bold'>/automounts/{$vg}-{$lvs}</td>\n\t\t\t\t</tr>";
        }
    }
    if ($status["INFOS"]["UUID"] == null) {
        $status["INFOS"]["UUID"] = "&nbsp;";
    }
    $resize = "<a href=\"javascript:blur()\" OnClick=\"javascript:lvsresize()\" style='font-size:14px;font-weight:bold;text-decoration:underline'>";
    $html = "\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t\t<th colspan=2>{$vg}&nbsp;&raquo;&nbsp;{$lvs}</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>\n<tr class=oddRow>\n\t<td style='font-size:14px' class=legend>{size}:</td>\n\t<td style='font-size:14px;font-weight:bold'>{$resize}&laquo;&nbsp;{$size}&nbsp;&raquo;</a></td>\n</tr>\n{$currentsize}\n<tr class=>\n\t<td style='font-size:14px' class=legend>{uuid}:</td>\n\t<td style='font-size:14px;font-weight:bold'>{$status["UUID"]}</td>\n</tr>\n<tr class=oddRow>\n\t<td style='font-size:14px' class=legend>{uuid}:</td>\n\t<td style='font-size:14px;font-weight:bold'>{$status["INFOS"]["UUID"]}</td>\n</tr>\n<tr class=>\n\t<td style='font-size:14px' class=legend>dev:</td>\n\t<td style='font-size:14px;font-weight:bold'>/dev/{$vg}/{$lvs}</td>\n</tr>\n{$automount}\n</table>\n\n<script>\n\tvar x_lvsresize= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tRefreshTab('{$md}');\n\t\tExpanVG_{$groupnamemd}();\n\t}\t\n\n\tfunction lvsresize(){\n\t\tvar newsize=prompt('{$current_text}{$sizeMB}MB: {$give_new_size_in_mb}');\n\t\tif(newsize){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('lvsresize','yes');\n\t\t\tXHR.appendData('vg','{$vg}');\n\t\t\tXHR.appendData('lvs','{$lvs}');\n\t\t\tXHR.appendData('size',newsize);\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_lvsresize);\n\t\t\n\t\t}\n\t\n\t}\n\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:35,代码来源:system.disks.lvs.php


示例17: status

function status()
{
    $t = $_GET["t"];
    $ini = new Bs_IniHandler();
    $sock = new sockets();
    $page = CurrentPageName();
    $ini->loadString(base64_decode($sock->getFrameWork('mimedefang.php?status=yes')));
    $APP_MIMEDEFANG = DAEMON_STATUS_ROUND("APP_MIMEDEFANG", $ini, null);
    $APP_MIMEDEFANGX = DAEMON_STATUS_ROUND("APP_MIMEDEFANGX", $ini, null);
    $Param = unserialize(base64_decode($sock->GET_INFO("MimeDefangServiceOptions")));
    if (!is_numeric($Param["MX_TMPFS"])) {
        $Param["MX_TMPFS"] = 0;
    }
    $tpl = new templates();
    if ($Param["MX_TMPFS"] > 5) {
        $array = unserialize(base64_decode($sock->getFrameWork("mimedefang.php?getramtmpfs=yes")));
        if (!is_numeric($array["PURC"])) {
            $array["PURC"] = 0;
        }
        if (!isset($array["SIZE"])) {
            $array["SIZE"] = "0M";
        }
        $tmpfs[] = "\n\t\t<tr>\n\t\t\t<td colspan=2 style='font-size:16px' align='left'>tmpfs:</td>\n\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td valing='middle'>" . pourcentage($array["PURC"]) . "</td>\n\t\t\t\t<td style='font-size:14px'>{$array["PURC"]}%/{$array["SIZE"]}</td>\n\t\t\t</tr>\n\n\t\t\t";
    }
    $q = new mysql_mimedefang_builder();
    $attachments_storage = $q->COUNT_ROWS("storage");
    if ($attachments_storage > 0) {
        $sql = "SELECT SUM(filesize) as tcount FROM `storage`";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
        $size = FormatBytes($ligne["tcount"] / 1024);
        $tmpfs[] = "\n\t<tr>\n\t\t<td colspan=2>\n\t\t<hr>\n\t<table>\n\t\t<tr>\n\t\t\t<td style='font-size:16px' align='left'>{attachments_storage}:</td>\n\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td style='font-size:16px'><a href=\"javascript:blur();\" \n\t\t\t\tOnClick=\"javascript:Loadjs('mimedefang.filehosting.table.php');\"\n\t\t\t\tstyle='font-size:16px;text-decoration:underline'>{$attachments_storage} {items} ({$size})</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</td>\n\t</tr>\n\t\n\n\t\t\t";
    }
    if (count($tmpfs) > 0) {
        $tmpfs_builded = "<table style='width:30%;margin-top:15px' class=form>" . @implode("\n", $tmpfs) . "</table>";
    }
    $html = "<table style='width:99%' class=form>\n\t<tr>\n\t<td>{$APP_MIMEDEFANG}{$APP_MIMEDEFANGX}\n\t\t<center style='margin-top:10px;margin-bottom:10px;width:95%' class=form>\n\t\t<table style='width:70%'>\n\t\t<tbody>\n\t\t<tr>\n\t\t\t<td width=10% align='center;'>" . imgtootltip("32-stop.png", "{stop}", "Loadjs('{$page}?service-cmds=stop')") . "</td>\n\t\t\t<td width=10% align='center'>" . imgtootltip("restart-32.png", "{stop} & 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pow函数代码示例发布时间:2022-05-24
下一篇:
PHP postget函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap