コード例 #1
0
function postfix_network_bubble()
{
    $tpl = new templates();
    $sock = new sockets();
    $PostfixMultiTrustAllInstances = $sock->GET_INFO("PostfixMultiTrustAllInstances");
    $PostfixMultiCreateBubble = $sock->GET_INFO("PostfixMultiCreateBubble");
    if (!is_numeric($PostfixMultiCreateBubble)) {
        $PostfixMultiCreateBubble = 0;
    }
    if (!is_numeric($PostfixMultiTrustAllInstances)) {
        $PostfixMultiTrustAllInstances = 0;
    }
    $html = "<center>\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t<th colspan=4>{networks}</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
    $main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $ipaddr = $main->NetWorksBubble();
    while (list($num, $ligne) = each($ipaddr)) {
        if (trim($num) == null) {
            continue;
        }
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $html = $html . "\n\t\t\t\t<tr class={$classtr}>\n\t\t\t\t\t<td width=1%><img src='img/folder-network-32.png'></td>\n\t\t\t\t\t<td style='font-size:16px'>{$num}</td>\n\t\t\t\t\t<td style='font-size:16px'>&nbsp;</td>\n\t\t\t\t\t<td  width=1%>" . imgtootltip('delete-32-grey.png', "{disabled} {for} {$num}", "blur('{$num}')") . "</td>\n\t\t\t\t</tr>";
    }
    if ($PostfixMultiTrustAllInstances == 1) {
        $MULTINETS = $main->MULTINETS();
    }
    if (is_array($MULTINETS)) {
        while (list($num, $ligne) = each($MULTINETS)) {
            if (trim($num) == null) {
                continue;
            }
            if ($classtr == "oddRow") {
                $classtr = null;
            } else {
                $classtr = "oddRow";
            }
            $html = $html . "\n\t\t\t\t<tr class={$classtr}>\n\t\t\t\t\t<td width=1%><img src='img/folder-network-32.png'></td>\n\t\t\t\t\t<td style='font-size:16px;color:#676767'>{$num} ({trusted})</td>\n\t\t\t\t\t<td style='font-size:16px'>&nbsp;</td>\n\t\t\t\t\t<td  width=1%>&nbsp;</td>\n\t\t\t\t</tr>";
        }
    }
    $html = $html . "\n\t</tbody>\n\t</table>\n\t</center>";
    echo $tpl->_ENGINE_parse_body($html);
}