作者:BillTheBes
项目:1.6.
function RULES()
{
$page = CurrentPageName();
$uid = $_SESSION["uid"];
$ldap = new clladp();
$u = $ldap->UserDatas($uid);
$fr = new Fetchmail_settings();
$tpl = new templates();
if (is_array($u["FetchMailsRulesSources"])) {
while (list($num, $ligne) = each($u["FetchMailsRulesSources"])) {
$arr = $fr->parse_config($ligne);
$id = md5($line);
$arr = $arr[1];
if ($arr["ssl"]) {
$ssl = "{using_ssl}";
}
if ($arr["port"] != null) {
$port = "{with_port} {$arr["port"]}";
} else {
$port = null;
}
$img_disabled = "42-green.png";
if ($arr["disabled"]) {
$img_disabled = "42-red.png";
}
$line = "\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td width=1% valign='top'><img src='img/{$img_disabled}'></td>\n\t\t\t\t<td nowrap>\n\t\t\t\t<H5>{fetch} "{$arr["poll"]}" {$disabled}</H5>\n\t\t\t\t\t<div style='font-size:11px' id='{$id}'>\n\t\t\t\t\t\t{fetch_address} "<strong>" . $arr["user"] . "</strong>"<br>\n\t\t\t\t\t\t{protocol}: <strong>{$arr["proto"]} {$port} {$ssl}</strong><br>\n\t\t\t\t\t\t{and_send_to} <strong>"" . $arr["is"] . ""</strong>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr><td colspan=2 align='right'>\n\t\t\t\t<table style='width:1%'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . imgtootltip('32-zoom-in.png', '{view}', "LoadAjax('{$id}','{$page}?ViewScript={$num}&id={$id}');") . "</td>\n\t\t\t\t\t\t<td>" . imgtootltip('32-edit.png', '{apply}', "UserFetchMailRule({$num},'{$uid}');") . "</td>\n\t\t\t\t\t\t<td>" . imgtootltip('32-cancel.png', '{delete}', "UserDeleteFetchMailRule({$num});") . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>";
$left = RoundedLightGrey($tpl->_ENGINE_parse_body($line));
$res[] = $left;
}
}
if (is_array($res)) {
echo $tpl->_ENGINE_parse_body(implode("<br>", $res));
}
echo $list;
}
作者:brucewu1689
项目:artic
function PostfixLogs()
{
include_once 'ressources/class.mysql.inc';
$sql = "SELECT * FROM events WHERE event_id={$_GET["event"]} ORDER BY zDate DESC LIMIT 0,100";
$my = new mysql();
$html = "<table style='width:100%'>";
$html = $html . "<tr style='background-color:#005447'>\n\t <td width=1%> </td>\n\t <td width=1% nowrap> </td>\n\t <td> </td>\n\t </tr>";
$resultat = $my->QUERY_SQL($sql, 'artica_events');
while ($ligne = @mysql_fetch_array($resultat, MYSQL_ASSOC)) {
switch ($ligne["event_type"]) {
case 0:
$img = "icon_mini_warning.gif";
break;
case 1:
$img = "icon-mini-ok.gif";
break;
case 2:
$img = "icon-mini-info.gif";
break;
default:
$img = "icon-mini-info.gif";
break;
}
$html = $html . "<tr " . CellRollOver() . ">\n\t <td width=1%><img src='img/{$img}' style='margin:2px'></td>\n\t <td width=1% nowrap>{$ligne["zDate"]}</td>\n\t <td>{$ligne["text"]}</td>\n\t </tr>";
}
$html = $html . "</table>";
$html = RoundedLightGrey($html);
$page = $html;
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($page);
}
作者:BillTheBes
项目:1.6.
function LoadRblist($ou)
{
$ldap = new clladp();
$oudat = $ldap->OUDatas($ou);
if (!is_array($oudat["SURBLServers"])) {
echo " ";
exit;
}
$cell = CellRollOver() . " style='font-size:12px'";
$serverlist = RblForm(1);
$html = "\n\t<H5>{rbl_servers}</H5>\n\t<table style='width:90%'>";
while (list($num, $val) = each($oudat["SURBLServers"])) {
if (strpos($val, ':') > 0) {
$tb = explode(":", $val);
$rbl = $tb[0];
$purc = $tb[1];
$count = $count + $purc;
} else {
$country = $val;
$action = "delete";
}
$html = $html . "\n\t\t\t<tr>\n\t\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t\t<td {$cell}><strong>{$rbl}</strong></td>\n\t\t\t<td {$cell} width=1%'><img src='img/i16.gif'></td>\n\t\t\t<td {$cell}><strong><a href='{$serverlist["{$rbl}"]["uri"]}' target='_new'>{$serverlist["{$rbl}"]["name"]}</a></strong></td>\n\t\t\t<td {$cell}><strong>" . Field_text("{$num}", $purc, 'width:50px', null, 'EditSurblRblServer(this)') . "</strong></td>\n\t\t\t<td {$cell} width=1%>" . imgtootltip('x.gif', '{delete}', "SURblDelete({$num})") . "</td>\n\t\t\t</tr>";
}
$html = $html . "<tr><td colspan=4 align='right' style='color:#005447;font-size:12px;border-top:1px solid black;padding:5px'><strong>{$count}%</strong></td></tr>";
$tpl = new templates();
echo "<br>" . RoundedLightGrey($tpl->_ENGINE_parse_body($html . "</table>"));
}
作者:BillTheBes
项目:1.6.
function main_disks_discover()
{
$users = new usersMenus();
$Disks = $users->disks_size;
$sock = new sockets();
$sock->getFrameWork("cmd.php?usb-scan-write=yes");
if (!file_exists('ressources/usb.scan.inc')) {
return $tpl->_ENGINE_parse_body("<H1>{error_no_socks}</H1>");
}
include_once "ressources/usb.scan.inc";
if ($Disks != null) {
$tbl = explode(";", $Disks);
while (list($num, $val) = each($tbl)) {
if (trim($val) != null) {
$values = explode(",", $val);
if (is_array($values)) {
$dc = $dc + 1;
$disk = $values[0];
$size = $values[1];
$occ = $values[2];
$disp = $values[3];
$pourc = $values[4];
$path = Get_mounted_path($disk, $_GLOBAL["usb_list"]);
$html = $html . "\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<table style='width:220px;margin:3px'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td width=1%>\n\t\t\t\t\t\t" . imgtootltip('scan-disk-48.png', $disk, "Loadjs('TreeBrowse.php?jdisk={$disk}&mounted={$path}&t={$_GET["t"]}');Loadjs('Tree.js');") . "</td>\n\t\t\t\t\t<td style='font-size:11px' valign='top'>\n\t\t\t\t\t\t{$disk} ({$pourc}% {used}).\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\t\n\t\t\t\t\t\n\t\t\t\t\t";
}
}
}
}
$html = "<H5>{select_disk}</H5><br>" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t{$html}\n\t</table>\n\t");
$tpl = new templates();
return $tpl->_ENGINE_parse_body($html);
}
作者:brucewu1689
项目:artic
function INDEX()
{
$ldap = new clladp();
$ou = $_GET["ou"];
$Hash_datas = $ldap->OUDatas($ou);
$h_type = array("spam" => "spam", "ham" => "ham");
$domains1 = $ldap->hash_get_domains_ou($ou);
$domainsF1 = Field_array_Hash($domains1, 'bogo_spam_domain', null, null, null, 0, 'width:150px');
$type = Field_array_Hash($h_type, 'bogo_type', null, null, null, 0, 'width:100px');
$hash_action = array("delete" => "{bogo_delete}", "quarantine" => "{bogo_quarantine}", "prepend" => "{bogo_prepend}");
$form_email = "\n\t<input type='hidden' id='ou' value='{$ou}'>\n\t<H5>{bogo_robots}</H5>\n\t<table style='width:100%'>\n\t<tr>\n\t<td align='right' nowrap><strong>{add_bogo_spam}:</strong></td>\n\t<td>" . Field_text('bogo_spam') . "</td>\n\t<td>{$domainsF1}</td>\n\t<td>{$type}</td>\n\t<td><input type='button' value='{add} »' OnClick=\"javascript:bogoAddSpamUser();\"></td>\n\t</tr>\n\t</table>\n\t\n\t";
for ($i = 1; $i < 10; $i++) {
$h_level[$i . '0'] = $i . '0 %';
}
$actions_datas = explode(';', $Hash_datas["BogoFilterAction"]);
$action = "\n\t<H5>{spam_action}</H5>\n\t{spam_action_text} " . Field_array_Hash($h_level, 'exceed', $actions_datas[0], null, null, 0, 'width:60px') . " {then} " . Field_array_Hash($hash_action, 'action', $actions_datas[1], null, null, 0, 'width:160px') . "<br><br>\n\t{if_bogo_prepend} " . Field_text('bogo_prepend', $actions_datas[2], 'width:150px') . "\n\t<div style='width:100%;text-align:right'><input type='button' value='{edit} »»' OnClick=\"javascript:BogoFilterAction();\"></div>\n\t\n\t";
$area_robots = "<div id='robots'></div><script>LoadAjax('robots','{$page}?GetRobots={$ou}')</script>";
$area_robots = RoundedLightGrey($area_robots);
$action = RoundedLightGrey($action);
$form_email = RoundedLightGrey($form_email);
$page = CurrentPageName();
$html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%><img src='img/bg_bogofilter.jpg'></td>\n\t<td valign='top' width=99%>" . RoundedLightGreen("{bogo_intro}") . "</td>\n\t</tr>\n\t</table>\n\t{$form_email}\n\t<br>\n\t{$action}\n\t<br>\n\t{$area_robots}\n\t";
$cfg["JS"][] = "js/bogofilter.js";
$tpl = new template_users('{APP_BOGOFILTER}', $html, 0, 0, 0, 0, $cfg);
echo $tpl->web_page;
}
作者:BillTheBes
项目:1.6.
function page()
{
$main = new main_cf();
$html = "\n\t<script type=\"text/javascript\" language=\"javascript\" src=\"postfix.js\"></script>\n\t<div id='postfix_security_rules'>" . RoundedLightGrey(postfix_security_rules()) . "</div>";
$tpl = new template_users('{security_rules}', $html);
echo $tpl->web_page;
}
作者:brucewu1689
项目:artic
function sub_page()
{
$dkim = new dkimfilter();
$filteraction_array = array("a" => "accept the message", "d" => "discard the message", "t" => "temp-fail the message", "r" => "reject the message");
$form = "\n<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:10px'><strong>{On-BadSignature}: </strong></td>\n\t\t\t\t\t<td>" . Field_array_Hash($filteraction_array, 'On-BadSignature', $dkim->main_array["On-BadSignature"]) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:10px'><strong>{On-DNSError}: </strong></td>\n\t\t\t\t\t<td>" . Field_array_Hash($filteraction_array, 'On-DNSError', $dkim->main_array["On-DNSError"]) . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:10px'><strong>{On-InternalError}: </strong></td>\n\t\t\t\t\t<td>" . Field_array_Hash($filteraction_array, 'On-InternalError', $dkim->main_array["On-InternalError"]) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:10px'><strong>{On-NoSignature}: </strong></td>\n\t\t\t\t\t<td>" . Field_array_Hash($filteraction_array, 'On-NoSignature', $dkim->main_array["On-NoSignature"]) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:10px'><strong>{On-Security}: </strong></td>\n\t\t\t\t\t<td>" . Field_array_Hash($filteraction_array, 'On-Security', $dkim->main_array["On-Security"]) . "</td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:10px'><strong>{On-SignatureMissing}: </strong></td>\n\t\t\t\t\t<td>" . Field_array_Hash($filteraction_array, 'On-SignatureMissing', $dkim->main_array["On-SignatureMissing"]) . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:ParseForm('ffm1','{$page}',true);\" value='« {save} »'></td>\n\t\t\t\t\t\t\t\n\t\t\t</table>\n\n";
$form = "<br>" . RoundedLightGrey($form);
return "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t<td valign='top' width=1%><img src='img/cpanel.png'></td>\n\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t<H5>{select_action}</H5>\n\t\t\t\t\t\t<form name='ffm1'>\n\t\t\t\t\t\t{$form}\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\t\n\t\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t\n\t";
}
作者:brucewu1689
项目:artic
function TemplatesForms()
{
//ArticaReportQuarantineTemplate
$messages_deleted = RoundedLightGrey("<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>" . imgtootltip('icon_settings-64.png', '{edit}', "LoadQuarantineTemplate('ArticaMaxDayTemplate')") . "</td>\n\t<td valign='top'>\n\t\t<H5>{template_deleted}</h5>\n\t\t{template_deleted_text}\n\t\n\t</td>\n\t</tr>\n\t</table>", null, 1);
$messages_report = RoundedLightGrey("<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>" . imgtootltip('icon_settings-64.png', '{edit}', "LoadQuarantineTemplate('ArticaReportQuarantineTemplate')") . "</td>\n\t<td valign='top'>\n\t\t<H5>{ArticaReportQuarantineTemplate}</h5>\n\t\t{ArticaReportQuarantineTemplate_text}\n\t\n\t</td>\n\t</tr>\n\t</table>", null, 1);
$intro = "<H4>{templates}</h4>\n\t<p>{templates_explain}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=50% valign='top'>{$messages_deleted}</td>\n\t<td width=50% valign='top'>{$messages_report}</td>\n\t</tr>\n\t</table>\n\t\n\t";
return "<br>" . $intro;
}
作者:BillTheBes
项目:1.6.
function step1()
{
$html = "\n\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/artica_wizard.js\"></script>\n\t<script type=\"text/javascript\" language=\"javascript\" src=\"postfix.js\"></script>\n\t<table style='width:600px' align=center>\n<tr>\n<td width=1% valign='top'><img src='img/bg_wizard.jpg'>\n</td>\n<td valign='top'>\n\t<table>\n\t";
$html = $html . "<tr><td valign='top'> " . Paragraphe('folder-update.jpg', '{create_org_postfix}', '{create_org_postfix_text}', "artica.wizard.org.php") . "</td></tr>";
$html = $html . "</table>\n</td>\n</tr>\n<tr>\n<td><span id='wizardpme'>" . RoundedLightGrey(Wizardpme()) . "</spam></td>\n</tr>\n\n</table>";
$tpl = new template_users('{artica_wizard}', $html, 0, 0, 0, 0, $array);
echo $tpl->web_page;
}
作者:BillTheBes
项目:1.6.
function mem_status()
{
$t = $_GET["t"];
$tpl = new templates();
include_once "ressources/class.os.system.tools.inc";
$os = new os_system();
$html = RoundedLightGrey($os->html_Memory_usage()) . "<br>";
echo $tpl->_ENGINE_parse_body($html);
echo "<script>LoadAjax('squid-stats-{$t}','android.squid.stats.status.php');</script>";
}
作者:BillTheBes
项目:1.6.
function main_page()
{
$from = array("TO" => "{q_to}", "FROM" => "{q_from}", "" => "{dont_know}");
$dir = Field_array_Hash($from, 'direction');
$b = new backup_email($_SESSION["ou"]);
$messagenumber = $b->MessageNumber();
$html = "\n\t<script language=\"JavaScript\"> \nvar timerID = null;\nvar timerID1 = null;\nvar tant=0;\nvar reste=0;\n\nfunction whatsnew(){\nif(document.getElementById('leftpanel_content')){\n\tLoadAjax('leftpanel_content','users.whatsnew-backup.php');\n}\n\n}\n\nfunction demarre(){\n tant = tant+1;\n reste=10-tant;\n\tif (tant < 10 ) { \n timerID = setTimeout(\"demarre()\",5000);\n } else {\n tant = 0;\n //document.getElementById('wait').innerHTML='<img src=img/wait.gif>';\n ChargeLogs();\n demarre(); //la boucle demarre !\n }\n}\n\n\nfunction ChargeLogs(){\n\twhatsnew();\n\t}\n\n</script>\n<script>demarre();</script>\n<script>;setTimeout(\"whatsnew()\",3000);</script>\n\t\n\t<H2>Query Manager ({$messagenumber} emails)</H2>\n\t<code>{backup_text}</code>\n\t<input type='hidden' id='ou' value='{$_SESSION["ou"]}'>\n\t\n\t" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{search_messages_that}:</strong></td>\n\t\t<td>{$dir}</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap align='right'><strong>{with_email}:</strong></td>\n\t\t<td>" . Field_text('email') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap align='right'><strong>{with_subject}:</strong></td>\n\t\t<td>" . Field_text('subject') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{with_body}:</strong></td>\n\t\t<td>" . Field_text('body') . "</td>\n\t</tr>\t\n\t<tr>\n\t<tr>\n\t<td colspan=2 align='right'>\n\t\t<input type='button' OnClick=\"javascript:findBackuphtml();\" value='{search} »'>\n\t</td>\n\t</tr>\t\n\t</table>") . "\n\t\n\t<div id='query_list'></div>\n\t\n\t\n\t\n\t";
$cfg["JS"][] = "js/users.backup.js";
$tpl = new template_users("{backup}", $html, 0, 0, 0, 0, $cfg);
echo $tpl->web_page;
}
作者:BillTheBes
项目:1.6.
function StartPage()
{
$usersmenus = new usersMenus();
if ($usersmenus->dnsmasq_installed == true) {
$dnsmasq = '{infos_dnsmasq}';
}
$searchname = RoundedLightGrey("<H5>{nic_dns_search}</H5>\n<p>{nic_dns_search_text}</p>\n<center>\n<input type=button value='{add_search_domains} »' OnClick=\"javascript:NicAddSearchDomain();\">\n<input type='hidden' id='add_search_domain_text' value='{add_search_domain_text}'>\n<div id='searchTable' style='padding:20px'>\n\t\t" . SearchTable() . "\n\t</div>\n</center>") . ($page = "\n\n<table style='width:100%'>\n<tr>\n<td valign='top'><img align='left' src='img/bg_static-dns.jpg' style='margin:3px'></td>\n<td valign='top'><p>{nic_static_dns_text} <strong>{$dnsmasq}</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=2>\n<br>" . RoundedLightGrey("\n\n\n\n<H5>{nic_nameserver}</H5>\n<p>{nic_nameserver_text}</p>\n<center>\n<input type=button value='{add_nameserver} »' OnClick=\"javascript:NicAddNameServer()\";>\n<input type='hidden' id='add_nameserver_text' value='{add_nameserver_text}'>\n<div id='nametable' style='padding:20px'>\n\t" . nameserverTable() . "\n</div>\n\n") . "</td></tr></table>");
$JS["JS"][] = 'js/system.staticdns.js';
$tpl = new template_users('{nic_static_dns}', $page, 0, 0, 0, 0, $JS);
echo $tpl->web_page;
}
作者:brucewu1689
项目:artic
function Page()
{
$main = new main_cf();
$page = CurrentPageName();
$intro = RoundedLightGreen('<img src="img/infowarn-64.png" align=left style="margin:3px">{send_isp_relay_text3}');
$form = "" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t<td>\n\t\t<H5>{servername}</H5>\n\t\t<br>\n\t\t{send_isp_relay_text2}\n\t</td>\n\t</tr>\n\t<tr>\n\t\t\t<td colspan=2>" . Field_text('isp_server_ip', $main->main_array["relayhost"]) . "</td>\n\t\t</tr>\t\n\t<tr>\n\t\t<td align='right' colspan=2><input type='button' OnClick=\"javascript:EditRelayhost();\" value='{edit} »'></td>\n\t</tr>\n\t</table>") . "\n\t<br>";
$html = "\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' style='width:50%'>\n\n\t{$form}</td>\n\t<td valign='top'>\n\t\t" . RoundedLightGreen("<table style='width:100%'>\n\t<tr><td width=1%>" . imgtootltip('restore-on.png', '{go_back}', "MyHref('artica.wizard.php')") . "</td>\n\t<td><H5>{return_to} {artica_wizard}</H5></td>\n\t</tr></table>") . "<br>" . applysettings("postfix") . "<br>{$intro}</td>\n\t</tr>\n\t</table>";
$cfg["LANG_FILE"] = "artica.wizard.php";
$cfg["JS"][] = "js/postfix-sasl.js";
$tpl = new template_users('{send_isp_relay}', $html, 0, 0, 0, 0, $cfg);
echo $tpl->web_page;
}
作者:BillTheBes
项目:1.6.
function Page()
{
$main = new main_cf();
$smtp_sasl_auth_enable = $main->main_array["smtp_sasl_auth_enable"];
$page = CurrentPageName();
$intro = applysettings("postfix") . RoundedLightBlue('<p style="text-align:justify;"><img src="img/infowarn-64.png" align=left style="margin:3px">{smtp_sasl_auth_enable_text}</p>');
$intro = $intro . "<br>" . "" . "<script>LoadAjax('sasllist','{$page}?loadsaslList=yes');</script>";
$form = "" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>" . Field_yesno_checkbox_img('smtp_sasl_auth_enable', $smtp_sasl_auth_enable, '{enable_disable}') . "</td>\n\t<td>\n\t\t<H5>{smtp_sasl_auth_enable}</H5>\n\t\t<br>\n\t\t{smtp_sasl_auth_enable_text2}\n\t</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' colspan=2><input type='button' OnClick=\"javascript:EditSasl();\" value='{apply} »'></td>\n\t</tr>\n\t</table>") . "\n\t<br>\n\t" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'><img src='img/klakcon_285.png'></td>\n\t<td>\n\t\t<H5>{add_credentials}</H5>\n\t<br>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td colspan=2><strong>{isp_server_name}:</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2>" . Field_text('isp_server_name', null) . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td width=1% nowrap align='right'><strong>{username}:</strong></td>\n\t\t\t<td>" . Field_text('username', null) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td align='right'><strong>{password}:</strong></td>\n\t\t\t<td>" . Field_text('password', null) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=2 align='right'><input type='button' value='{add} »' OnClick=\"javascript:sasl_add_isp_relay();\">\n\t\t</tr>\t\t\t\n\t\t</table>\n\t</td>\n\t</tr>\n\t</table>") . "<br>" . RoundedLightGrey("<H5>{table}</H5><div id='sasllist'></div>");
$html = "\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=50%>\t\n\t{$form}</td>\n\t<td valign='top' width=50%>" . RoundedLightGreen("<table style='width:100%'>\n\t<tr><td width=1%>" . imgtootltip('restore-on.png', '{go_back}', "MyHref('artica.wizard.php')") . "</td>\n\t<td><H5>{return_to} {artica_wizard}</H5></td>\n\t</tr></table>") . "<br>{$intro}</td>\n\t</tr>\n\t</table>";
$cfg["LANG_FILE"] = "artica.wizard.php";
$cfg["JS"][] = "js/postfix-sasl.js";
$tpl = new template_users('{send_to_isp}', $html, 0, 0, 0, 0, $cfg);
echo $tpl->web_page;
}
作者:BillTheBes
项目:1.6.
function popup()
{
if (trim($_GET["MONTH"]) == null) {
if ($_SESSION["ARTICA_SMTP_DAYS_GRAPH_MONTH"] != null) {
$_GET["MONTH"] = $_SESSION["ARTICA_SMTP_DAYS_GRAPH_MONTH"];
} else {
$_GET["MONTH"] = calcul_month();
$_SESSION["ARTICA_SMTP_DAYS_GRAPH_MONTH"] = $_GET["MONTH"];
}
}
$field = ArrayDays();
$html = "<h1>{monthly_statistics} {$_GET["MONTH"]}</H1>\n\t<div style='text-align:right;padding-bottom:9px;'>{$field}</div>\n\t" . RoundedLightWhite("<div style='width:100%;height:450px;overflow:auto'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td align='center'>" . RoundedBlack("<a href='#' OnClick=\"javascript:ZoomCourbeParMois()\"><img src='" . courbeparmois() . "'></a>") . "</td>\n\t\t</tr>\n\t\t<tr><td> </td></tR>\n\t\t<tr>\n\t\t<td align='center'>" . RoundedLightGrey("<a href='#' OnClick=\"javascript:ZoomCamParMois()\"><img src='" . camparmois() . "'>") . "</a></td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td valign='top'>\n\t\t\t<hr>\n\t\t\t\n\t\t\t<div style='width:100%;height:300px;overflow;auto'>" . tableaudomains() . "</div></td>\n\t\t</tR>\n\t</table></div>");
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
作者:brucewu1689
项目:artic
function PageAveServerUpdateConfig()
{
$yum = new usersMenus();
$tpl = new templates();
if ($yum->AsPostfixAdministrator == false) {
return $tpl->_ENGINE_parse_body("<h3>{not allowed}</H3>");
}
include_once dirname(__FILE__) . '/ressources/kav4mailservers.inc';
$kav = new kav4mailservers(1);
$array_conf = $kav->array_conf["updater.options"];
$cron = $kav->CronTask();
$UseUpdateServerUrl = Field_yesno_checkbox_img('UseUpdateServerUrl', $array_conf["UseUpdateServerUrl"]);
$UseUpdateServerUrlOnly = Field_yesno_checkbox_img('UseUpdateServerUrlOnly', $array_conf["UseUpdateServerUrlOnly"]);
$PassiveFtp = Field_yesno_checkbox_img('PassiveFtp', $array_conf["PassiveFtp"]);
$html = "\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='top'><img src='img/bg_download.jpg'></td>\n\t\t<td valign='top'>\n\t\t" . RoundedLightGreen("<strong>{schedule}:« {$cron} »</strong>") . "<br>" . RoundedLightGrey("<form name=ffmupdate>\n\t\t<input type='hidden' value='{$array_conf["PostUpdateCmd"]}' name='PostUpdateCmd'>\n\t\t<H4>{keepup2date settings}</H4>\n\t\t<table>\n\t\t<tr>\n\t\t<td>{$UseUpdateServerUrl}</td>\n\t\t<td align='left' nowrap>{UseUpdateServerUrl}</td>\n\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t<td>{$UseUpdateServerUrlOnly}</td>\n\t\t<td align='left'>{UseUpdateServerUrlOnly}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td>{$PassiveFtp}</td>\n\t\t<td align='left'>{PassiveFtp}</td>\n\t\t</tr>\t\t\t\n\t\t</table>\n\t\t<table>\n\t\t<tr>\n\t\t<td align='right' nowrap>{UpdateServerUrl}:</td>\n\t\t<td align='left'>" . Field_text('UpdateServerUrl', $array_conf["UpdateServerUrl"]) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td align='right'>{ProxyAddress}:</td>\n\t\t<td align='left'>" . Field_text('ProxyAddress', $array_conf["ProxyAddress"]) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td align='right'>{ConnectTimeout}:</td>\n\t\t<td align='left'>" . Field_text('ConnectTimeout', $array_conf["ConnectTimeout"], '') . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:ParseForm('ffmupdate','users.kav.php',true);\" value='{submit} »'></td>\n\t\t</tr>\n\t\t</table>\n\t\t</form>") . "<br>\n\n\t\t\n\t\t\t\n\t\t<br>\n\t\t</td>\n\t\t</tr>\n\t\t<tr><td align='center' colspan=2><input type='button' OnClick=\"javascript:KavUpdates()\" value='« {update_now} »'></td></tr>\n\t\t<tr><td colspan=2>" . UpdatesError() . UpdatesSuccess() . "</td>\n\t\t</tr>\n\t\t</table>\n\t\t";
return $tpl->_ENGINE_parse_body($html);
}
作者:BillTheBes
项目:1.6.
function PostfixLogs()
{
$sock = new sockets();
$styletd = "style='color:white;font-weight:bold;font-size:11px'";
$datas = $sock->getfile('iptables_events');
writelogs(strlen($datas) . ' bytes', __FUNCTION__, __FILE__);
$tbl = explode("\n", $datas);
$html = $html . "<table style='width:100%'>\n\t\t<tr style='background-color:#005447'>\n\t\t\t\t<td width=1% nowrap {$styletd}>date</td>\n\t\t\t\t<td width=1% nowrap {$styletd}>NIC</td>\n\t\t\t\t<td nowrap {$styletd}>MAC</td>\n\t\t\t\t<td nowrap {$styletd}>ip</td>\n\t\t\t\t<td nowrap {$styletd}>proto</td>\n\t\t\t\t<td nowrap {$styletd}>port</td>\n\t\t\t\t</tr>";
$tbl = array_reverse($tbl, TRUE);
while (list($num, $val) = each($tbl)) {
if (preg_match('#(.+?)([\\s0-9\\:]+).+?kernel:.+?:IN=(.+?)\\s+OUT=.*?MAC=([0-9\\:a-z]+)\\s+SRC=([0-9\\.]+).+?PROTO=(.+?)\\s+.+DPT=([0-9]+)#', $val, $re)) {
$html = $html . "<tr " . CellRollOver() . ">\n\t\t\t\t<td width=1% nowrap>{$re[1]} {$re[2]}</td>\n\t\t\t\t<td width=1% nowrap>{$re[3]}</td>\n\t\t\t\t<td nowrap>{$re[4]}</td>\n\t\t\t\t<td nowrap>{$re[5]}</td>\n\t\t\t\t<td nowrap width=1% >{$re[6]}</td>\n\t\t\t\t<td nowrap width=1% >{$re[7]}</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t";
}
}
$html = $html . "</table>";
echo RoundedLightGrey($html);
}
作者:BillTheBes
项目:1.6.
function wizard2()
{
$sys = new systeminfos();
while (list($num, $val) = each($sys->array_ip)) {
$arr[$num] = $num;
}
$arr["all"] = "all";
$arr[""] = '{select}';
$nics = Field_array_Hash($arr, 'nic_hook', $user->ChangeAutoInterface);
$main = new main_cf();
if (is_array($main->array_mynetworks)) {
$mynetwork = implode(',', $main->array_mynetworks);
}
$hash_relay = array("mail" => "mail", "relay" => "relay", "single" => "Hub");
$fieldrelay = Field_array_Hash($hash_relay, 'relay', $relay_behavior, null, null, 0, 'width:100%;');
$html = "\n\t<div style='padding:5px;margin:5px;width:100%'>\n\t\t\n\t" . RoundedLightGrey("\t\n\t<H4>{network_settings}</H4>\n\t<table width=100%>\n\t<tr>\n\t<td><img src='img/150-nic.png'></td>\n\t<td valign='top'>\t\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td width=60% class='caption'><H5>{inet_interfaces_title}</H5>{network_settings_text}</td>\n\t\t\t\t<td align='left'>{$nics}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td width=60% class='caption'><h5>{mynetworks_title}:</h5>{mynetworks_single_text}<p class=caption>{$mynetwork}</p></td >\n\t\t\t\t<td style='padding-left:5px' align='left'><input type='button' value='{add} »' OnClick=\"javascript:postfix_add_network_v2();\"></td>\n\t\t\t</tr>\t\t\n\t\t\t<tr>\n\t\t\t<tr><td colspan=2> </td></tr>\n\t\t\t<td align='left'> </td>\n\t\t\t\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n</table>") . "\n\n<br>" . RoundedLightGrey("\n<H4>{organization}</h4>\t\n<table width=100%>\n\t<tr>\n\t<td colspan=3>\n\t\t<table width=100%>\n\t\t\t<td valign='top'><img src='img/150-org.png'></td>\n\t\t\t<td valign='top'>\t\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=60% class='caption' valign='top' align='right'><h5>{question_company_name}:</H5>\n\t\t\t\t\t\t<td style='padding-left:5px' align='left' class='caption' >" . Field_text('company_name', $_GET["company_name"]) . "</td>\n\t\t\t\t\t</tr>\t\t\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t</table>\n\t</td>\n\t<tr><td align='right' colspan=3><input type='button' value='{finish} »' OnClick=\"javascript:EditWizar1();\"></td></tr>\n\t</tr>\n\t</table>") . "\n\t\n\t\n\t</div>\n\t";
$tpl = new templates();
return $tpl->_ENGINE_parse_body($html);
}
作者:brucewu1689
项目:artic
function PageSystem_interfaces()
{
$tpl = new templates();
$sys = new systeminfos();
if (!is_array($sys->array_ip)) {
return $tpl->_ENGINE_parse_body('{system error} line' . __LINE__);
}
while (list($num, $val) = each($sys->array_ip)) {
$ip = $ip . "<tr>\n\t\t<td width=1%><img src='img/nic-table.jpg'></td>\n\t\t<td width=1%>{$num}</td>\n\t\t<td>{$val["MAC"]}</td>\n\t\t<td >{$val["IP"]}</td>\n\t\t</tr>";
}
if (is_array($sys->array_dns_servers)) {
while (list($num, $val) = each($sys->array_dns_servers)) {
$count = $count + 1;
$dns = $dns . "<tr>\n\t\t<td width=1%><img src='img/nic-table.jpg'></td>\n\t\t<td width=50%>{dns_server} {$count}</td>\n\t\t<td width=49%>{$val}</td>\n\t\t</tr>";
}
}
$html = "<table style='width:600px' align=center>\n<tr>\n<td valign='top'>\n\t<img src='img/150-nic.jpg'>\n\t<table style='width:100%;margin-top:5px'>\n\t<tr>\n\t<td valign='top' >" . Paragraphe('folder-equerre-64.jpg', '{nic_static_dns}', '{nic_static_dns_text}', 'system.nic.staticdns.php') . "</td>\n\t</tr>\n\t<tr>\n\t<td valign='top' >" . Paragraphe('64-ip-settings.png', '{net_settings}', '{net_settings_text}', 'system.nic.config.php') . "</td>\n\t</tr>\t\n\t\n\t\n\t\n\t</table>\n\t\n</td>\n<td valign='top'>\t\n" . RoundedLightGrey("\n\t<h5>{nic_interfaces}</H5>\n\t\t<table style='width:70%' align='center'>\n\t\t{$ip}\n\t\t</table>\n\t") . "<br>" . RoundedLightGreen("\n\t<h5>{dns_servers}</H5>\n\t\t<table style='width:70%' align='center'>\n\t\t{$dns}\n\t\t</table>\t\t\n\t\t") . "\n\t</td>\n\t</tr>\n\t</table>";
return $tpl->_ENGINE_parse_body($html);
}
作者:BillTheBes
项目:1.6.
function INDEX()
{
if (!isset($_GET["ou"])) {
header('location:domains.index.php');
exit;
}
$page = CurrentPageName();
$ou = $_GET["ou"];
$ldap = new clladp();
$hash = $ldap->OUDatas($ou);
$ArticaFakedMailFrom_table = array("pass" => '{pass}', "quarantine" => "{quarantine}", "delete" => "{delete}");
$ArticaFakedMailFrom_field = Field_array_Hash($ArticaFakedMailFrom_table, "ArticaFakedMailFrom", $hash["ArticaFakedMailFrom"], null, null, null, 'width:100px');
$ArticaDenyNoMXRecords_table = array('pass' => '{pass}', "reject" => "{reject}");
$ArticaDenyNoMXRecords_field = Field_array_Hash($ArticaDenyNoMXRecords_table, "ArticaDenyNoMXRecords", $hash["ArticaDenyNoMXRecords"], null, null, null, 'width:100px');
$ArticaOuTrustMyUSers_field = Field_yesno_checkbox_img('OuTrustMyUSers', $hash["OuTrustMyUSers"], '{enable_disable}');
$ArticaOuTrustMyUSers = "<H5>{trust_users}</H5>\n\t<div class=caption>{trust_users_text}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td align='right' valign='top' nowrap><strong>{trust_users}</strong></td>\n\t\t<td align='left' valign='top'>{$ArticaOuTrustMyUSers_field}</td>\n\t\t\n\t</tr>\t\n\t</table>\n\t\n\t";
$ArticaOuTrustMyUSers = RoundedLightGreen($ArticaOuTrustMyUSers);
$html = "\n\t<form name='FFMQ'>\n\t<table style='width:100%;'>\n\t<tr>\n\t\t<td width=50% valign='top' style='margin:4px;padding:4px'>\n\t<input type='hidden' name='ou' value='{$ou}'>\n\t" . RoundedLightGrey("<H5>{ArticaFakedMailFrom}</H5>\n\t<div class=caption>{ArticaFakedMailFrom_text}</div>\n\t<table style='width:90%;border:1px solid #CCCCCC;padding:5px;margin:5px'>\n\t<tr>\n\t\t<td align='right' valign='top' nowrap><strong>{ArticaFakedMailFrom}</strong></td>\n\t\t<td align='left' valign='top'>{$ArticaFakedMailFrom_field}</td>\n\t\t\n\t</tr>\n\t</table>") . "</td>\n\t\n\t\n\t<td width=50% valign='top' style='margin:4px;padding:4px'>" . RoundedLightGrey("\n\t<H5>{ArticaDenyNoMXRecords}</H5>\n\t<div class=caption>{ArticaDenyNoMXRecords_text}</div>\n\t<table style='width:90%;border:1px solid #CCCCCC;padding:5px;margin:5px'>\n\t<tr>\n\t\t<td align='right' valign='top' nowrap><strong>{ArticaDenyNoMXRecords}</strong></td>\n\t\t<td align='left' valign='top'>{$ArticaDenyNoMXRecords_field}</td>\n\t\t\n\t</tr>\t\n\t</table>\n\t") . "\n\t<br>\n\t{$ArticaOuTrustMyUSers}\n\t</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right' style='border-top:1px solid #CCCCCC'><input type='submit' value='{apply} »' style='width:150px'></td>\n\t</tr>\n\t</table>\n\t</form>";
$cfg["JS"][] = "js/quarantine.ou.js";
$tpl = new template_users('{artica_filters_rules}', $html, 0, 0, 0, 0, $cfg);
echo $tpl->web_page;
}