function postfix_network_table() { $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; } if ($PostfixMultiCreateBubble == 1) { postfix_network_bubble(); return; } $q = new mysql(); $main = new maincf_multi($_GET["hostname"], $_GET["ou"]); $nets = unserialize($main->GET_BIGDATA("mynetworks")); $sock = new sockets(); if ($PostfixMultiTrustAllInstances == 1) { $MULTINETS = $main->MULTINETS(); } $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'>"; if (is_array($nets)) { while (list($num, $val) = each($nets)) { if (trim($val) == null) { continue; } if ($classtr == "oddRow") { $classtr = null; } else { $classtr = "oddRow"; } $sql = "SELECT netinfos FROM networks_infos WHERE ipaddr='{$val}'"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); $ligne["netinfos"] = htmlspecialchars($ligne["netinfos"]); $ligne["netinfos"] = nl2br($ligne["netinfos"]); if ($ligne["netinfos"] == null) { $ligne["netinfos"] = "{no_info}"; } $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'>{$val}</td>\n\t\t\t\t\t<td style='font-size:16px'><a href=\"javascript:blur();\" OnClick=\"javascript:GlobalSystemNetInfos('{$val}')\" style='font-size:12px;text-decoration:underline'><i>{$ligne["netinfos"]}</i></a></td>\n\t\t\t\t\t<td width=1%>" . imgtootltip('delete-32.png', '{delete} {network}', "PostFixDeleteMyNetwork({$num})") . "</td>\n\t\t\t\t</tr>"; } } 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'> </td>\n\t\t\t\t\t<td width=1%> </td>\n\t\t\t\t</tr>"; } } $html = $html . "\n\t</tbody>\n\t</table>\n\t</center>"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }