本文整理汇总了PHP中Field_yesno_checkbox函数的典型用法代码示例。如果您正苦于以下问题:PHP Field_yesno_checkbox函数的具体用法?PHP Field_yesno_checkbox怎么用?PHP Field_yesno_checkbox使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Field_yesno_checkbox函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: liveForm
function liveForm()
{
$uid = $_SESSION["uid"];
$get = new getlive($uid);
$array = $get->ParseConfig($uid);
$page = CurrentPageName();
$html = "<div style='background-image:url(img/bg_form-1.png);padding:10px;width:550px;border:1px solid #CCCCCC;margin-left:100px;'>\n\t<form name='ffm1'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend nowrap>{enable}:</td>\n\t\t<td>" . Field_numeric_checkbox_img('enabled', $array["enabled"], '{enable_disable}') . "</td>\n\t\t<td> </td>\n\t</tr\t\n\t<tr>\n\t\t<td class=legend nowrap>{username}:</td>\n\t\t<td>" . Field_text('UserName', $array["UserName"], 'width:100px') . "</td>\n\t\t<td>{username_text}</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{password}:</td>\n\t\t<td>" . Field_text('Password', $array["Password"], 'width:100px') . "</td>\n\t\t<td>{password_text}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top'>{Domain}:</td>\n\t\t<td valign='top'>" . Field_text('Domain', $array["Domain"], 'width:100px') . "</td>\n\t\t<td valign='top'>{Domain_text}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{Delete_messages}:</td>\n\t\t<td valign='top'>" . Field_yesno_checkbox('Delete', $array["Delete"]) . "</td>\n\t\t<td valign='top'>{Delete_messages_text}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{MarkRead}:</td>\n\t\t<td valign='top'>" . Field_yesno_checkbox('MarkRead', $array["MarkRead"]) . "</td>\n\t\t<td valign='top'>{MarkRead_text}</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td colspan=3 align='right'><input type='button' OnClick=\"javascript:ParseForm('ffm1','{$page}',true);\" value='{submit} »'>\n\t\t</td>\n\t</tr>\t\n\t</table>\n\t</div>\n\t\n\t";
$tpl = new templates();
return $tpl->_ENGINE_parse_body($html);
}
示例2: popup
function popup()
{
$mysql = new mysqlserver();
$net = new networking();
$array = $net->ALL_IPS_GET_ARRAY();
$array[null] = "{all}";
$bind = Field_array_Hash($array, "bind-address", $mysql->main_array["bind-address"]);
//Les devs de mysql conseillent un key_buffer de la taille de la somme de tous les fichiers .MYI dans le repertoire mysql.
$hover = CellRollOver();
$form = "\t<table style='width:100%'>\n\t<tr {$hover}>\n\t\t<td class=legend>{skip-external-locking}:</td>\n\t\t<td>" . Field_yesno_checkbox('skip-external-locking', $mysql->main_array["skip_external_locking"]) . "</td>\n\t\t<td><code>skip-external-locking</code></td>\n\t\t<td>" . help_icon('{skip-external-locking_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{bind-address}:</td>\n\t\t<td>{$bind}</td>\n\t\t<td><code>bind-address</code></td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{key_buffer}:</td>\n\t\t<td>" . Field_text("key_buffer", $mysql->main_array["key_buffer"], "width:60px") . " M</td>\n\t\t<td><code>key_buffer</code></td>\n\t\t<td>" . help_icon('{key_buffer_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{key_buffer_size}:</td>\n\t\t<td>" . Field_text("key_buffer_size", $mysql->main_array["key_buffer_size"], "width:60px") . " M</td>\n\t\t<td><code>key_buffer_size</code></td>\n\t\t<td>" . help_icon('{key_buffer_size_text}') . "</td>\n\t</tr>\t\t\n\t<tr {$hover}>\n\t\t<td class=legend>{innodb_buffer_pool_size}:</td>\n\t\t<td>" . Field_text("innodb_buffer_pool_size", $mysql->main_array["innodb_buffer_pool_size"], "width:60px") . " M</td>\n\t\t<td><code>innodb_buffer_pool_size</code></td>\n\t\t<td>" . help_icon('{innodb_buffer_pool_size_text}') . "</td>\n\t</tr>\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{innodb_additional_mem_pool_size}:</td>\n\t\t<td>" . Field_text("innodb_additional_mem_pool_size", $mysql->main_array["innodb_additional_mem_pool_size"], "width:60px") . " M</td>\n\t\t<td><code>innodb_additional_mem_pool_size</code></td>\n\t\t<td>" . help_icon('{innodb_additional_mem_pool_size_text}') . "</td>\n\t</tr>\t\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{myisam_sort_buffer_size}:</td>\n\t\t<td>" . Field_text("myisam_sort_buffer_size", $mysql->main_array["myisam_sort_buffer_size"], "width:60px") . " M</td>\n\t\t<td><code>myisam_sort_buffer_size</code></td>\n\t\t<td>" . help_icon('{myisam_sort_buffer_size_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{sort_buffer_size}:</td>\n\t\t<td>" . Field_text("sort_buffer_size", $mysql->main_array["sort_buffer_size"], "width:60px") . " M</td>\n\t\t<td><code>sort_buffer_size</code></td>\n\t\t<td>" . help_icon('{sort_buffer_size_text}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{join_buffer_size}:</td>\n\t\t<td>" . Field_text("join_buffer_size", $mysql->main_array["join_buffer_size"], "width:60px") . " M</td>\n\t\t<td><code>join_buffer_size</code></td>\n\t\t<td>" . help_icon('{join_buffer_size_text}') . "</td>\n\t</tr>\t\t\n\t<tr {$hover}>\n\t\t<td class=legend>{read_buffer_size}:</td>\n\t\t<td>" . Field_text("read_buffer_size", $mysql->main_array["read_buffer_size"], "width:60px") . " M</td>\n\t\t<td><code>read_buffer_size</code></td>\n\t\t<td>" . help_icon('{read_buffer_size_text}') . "</td>\n\t</tr>\t\t\n\t\t<td class=legend>{query_cache_size}:</td>\n\t\t<td>" . Field_text("query_cache_size", $mysql->main_array["query_cache_size"], "width:60px") . " M</td>\n\t\t<td><code>query_cache_size</code></td>\n\t\t<td>" . help_icon('{query_cache_size_text}') . "</td>\n\t</tr>\t\t\n\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{query_cache_limit}:</td>\n\t\t<td>" . Field_text("query_cache_limit", $mysql->main_array["query_cache_limit"], "width:60px") . " M</td>\n\t\t<td><code>query_cache_limit</code></td>\n\t\t<td>" . help_icon('{query_cache_limit_text}') . "</td>\n\t</tr>\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{read_rnd_buffer_size}:</td>\n\t\t<td>" . Field_text("read_rnd_buffer_size", $mysql->main_array["read_rnd_buffer_size"], "width:60px") . " M</td>\n\t\t<td><code>read_rnd_buffer_size</code></td>\n\t\t<td>" . help_icon('{read_rnd_buffer_size_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{table_cache}:</td>\n\t\t<td>" . Field_text("table_cache", $mysql->main_array["table_cache"], "width:60px") . " table(s)</td>\n\t\t<td><code>table_cache</code></td>\n\t\t<td>" . help_icon('{table_cache}') . "</td>\n\t</tr>\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{tmp_table_size}:</td>\n\t\t<td>" . Field_text("tmp_table_size", $mysql->main_array["tmp_table_size"], "width:60px") . " M</td>\n\t\t<td><code>tmp_table_size</code></td>\n\t\t<td>" . help_icon('{tmp_table_size}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{max_allowed_packet}:</td>\n\t\t<td>" . Field_text("max_allowed_packet", $mysql->main_array["max_allowed_packet"], "width:60px") . " M</td>\n\t\t<td><code>max_allowed_packet</code></td>\n\t\t<td>" . help_icon('{max_allowed_packet}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{max_connections}:</td>\n\t\t<td>" . Field_text("max_connections", $mysql->main_array["max_connections"], "width:60px") . " M</td>\n\t\t<td><code>max_connections</code></td>\n\t\t<td>" . help_icon('{max_connections}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{net_buffer_length}:</td>\n\t\t<td>" . Field_text("net_buffer_length", $mysql->main_array["net_buffer_length"], "width:60px") . " M</td>\n\t\t<td><code>net_buffer_length</code></td>\n\t\t<td>" . help_icon('{net_buffer_length_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{thread_cache_size}:</td>\n\t\t<td>" . Field_text("thread_cache_size", $mysql->main_array["thread_cache_size"], "width:60px") . " M</td>\n\t\t<td><code>thread_cache_size</code></td>\n\t\t<td>" . help_icon('{thread_cache_size_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=4 align='right'>\n\t\t<hr>" . button("{apply}", "SaveUMysqlParameters()") . "\n\t\t\n\t\t</td>\n\t</tr>\n\t</table>";
$html = "<H1>{mysql_settings} v. {$mysql->mysql_version_string} ({$mysql->mysqlvbin})</H1>\n\t<div id='mysqlsettings'>" . RoundedLightWhite($form) . "</div>";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例3: ShowRule
function ShowRule()
{
$uid = $_GET["uid"];
$rulename = $_GET["rulename"];
if ($rulename == null) {
$rulename = "{$uid}_" . date('Ymdhis');
}
$fdm = new fdm($uid);
$rulearray = $fdm->main_array[$rulename];
$server_type = Field_array_Hash($fdm->type_array, 'server_type', $rulearray["server_type"]);
if ($rulearray["folder"] == null) {
$rulearray["folder"] = 'INBOX';
}
$html = "\n\t\n\t\n\t<h1>{fetchrule}</H1>\n\t<form name='FDMRULE'>\n\t<input type='hidden' name='fdm_rule' value='{$rulename}'>\n\t<input type='hidden' name='uid' value='{$uid}'>\n\t<table style='width:100%'>\n\t\n\t\n\t<tr>\n\t\t<td align='right' nowrap width=1% class=legend>{rule}:</strong></td>\n\t\t<td align='left'>{$rulename}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap width=1% class=legend>{server_type}:</strong></td>\n\t\t<td align='left'>{$server_type}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' nowrap width=1% class=legend>{server_name}:</strong></td>\n\t\t<td align='left'>" . Field_text('server_name', $rulearray["server_name"], 'width:120px') . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td align='right' nowrap width=1% class=legend>{server_port}:</strong></td>\n\t\t<td align='left'>" . Field_text('server_port', $rulearray["server_port"], 'width:90px') . "</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td align='right' nowrap width=1% class=legend>{username}:</strong></td>\n\t\t<td align='left'>" . Field_text('username', $rulearray["username"], 'width:150px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap width=1% class=legend>{password}:</strong></td>\n\t\t<td align='left'>" . Field_password('password', $rulearray["password"], 'width:150px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap width=1% class=legend>{folder_to_fetch}:</strong></td>\n\t\t<td align='left'>" . Field_text('folder', $rulearray["folder"], 'width:150px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap width=1% class=legend>{keep}:</strong></td>\n\t\t<td align='left'>" . Field_yesno_checkbox('keep', $rulearray["keep"]) . "</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td align='right' nowrap width=1% class=legend>{no-apop}:</strong></td>\n\t\t<td align='left'>\n\t\t<table style='width:100%;margin:-2px;padding:0px;'>\n\t\t<tr>\n\t\t\t<td width=1% style='margin:0px;padding:0px;'>" . Field_yesno_checkbox('no-apop', $rulearray["no-apop"]) . "</td>\n\t\t\t<td width=99% style='margin:0px;padding:0px;' align='left'>" . help_icon('{no-apop_text}') . "</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</td>\n\t</tr>\n\t\t\n\t\n\t<tr>\n\t<td colspan=2 align='right'><input type='button' value='{apply} »' OnClick=\"javascript:fdm_editrule();\"></td>\n\t</tr>\n\t</table>\n\t</form>\n\t\t\n\t\n\t\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例4: main_config
function main_config()
{
$retranslator = new retranslator();
$page = CurrentPageName();
$myserver = $_SERVER['SERVER_NAME'];
if (preg_match("#(.+?):(.+)#", $myserver)) {
$myserver = $re[1];
}
if ($retranslator->RetranslatorHttpdEnabled == 1) {
$explain = "<p style='font-size:13px;font-weight:bold;color:#005447'>{RETRANSLATOR_CONNECT_URI}</p>\n\t\t<a href='http://{$myserver}:{$retranslator->RetranslatorHttpdPort}' style='font-size:13px'>http://{$myserver}:{$retranslator->RetranslatorHttpdPort}<a>\n\t\t";
}
$html = "{$tab}<br><H5>{http_engine}</h5>\n\t{$explain}\n\t<FORM NAME='FFM1'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td colspan=2 style='border-top:1px solid #CCCCCC;padding-top:3px' >\n\t\t<input type='hidden' id='save' value='yes' name='save'>\n\t\t<tr>\n\t\t<td class=legend>{RetranslatorHttpdEnabled}:</td>\n\t\t<td>" . Field_numeric_checkbox_img('RetranslatorHttpdEnabled', $retranslator->RetranslatorHttpdEnabled, '{enabled_disabled}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td class=legend>{RetranslatorHttpdPort}:</td>\n\t\t<td>" . Field_text('RetranslatorHttpdPort', $retranslator->RetranslatorHttpdPort, 'width:80px') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'>\n\t\t\t<hr>\n\t\t\t" . button("{edit}", "ParseForm('FFM1','{$page}',true);") . "\n\t\t\t\n\t\t</td>\n\t\t</tr>\n\t</table>\n\t</FORM>\n\t";
$html = $html . "<H5>{retranslator_engine}</h5>";
$regions = array("am", "ar", "at", "az", "be", "bg", "br", "by", "ca", "cl", "cn", "cs", "cz", "de", "ee", "es", "fr", "gb", "ge", "gr", "hk", "hu", "it", "jp", "kg", "kr", "kz", "lt", "lv", "md", "mx", "nl", "pl", "ro", "ru", "th", "tj", "tm", "tr", "tw", "ua", "uk", "us", "uz");
while (list($num, $ligne) = each($regions)) {
$hash_regions[$ligne] = $ligne;
}
$RetranslatorRegionSettings = Field_array_Hash($hash_regions, 'RetranslatorRegionSettings', $retranslator->RetranslatorRegionSettings);
$loglevel = array(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 9 => 9);
$RetranslatorReportLevel = Field_array_Hash($loglevel, 'RetranslatorReportLevel', $retranslator->RetranslatorReportLevel);
$html = $html . "\n\t<FORM NAME='FFM2'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td colspan=3 style='border-top:1px solid #CCCCCC;padding-top:3px' >\n\t\t<input type='hidden' id='save' value='yes' name='save'>\n\t\t<tr>\n\t\t<tr>\n\t\t<td class=legend>{RetranslatorEnabled}:</td>\n\t\t<td>" . Field_numeric_checkbox_img('RetranslatorEnabled', $retranslator->RetranslatorEnabled, '{enabled_disabled}') . "</td>\n\t\t<td> </td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorCronMinutes}:</td>\n\t\t\t<td>" . Field_text('RetranslatorCronMinutes', $retranslator->RetranslatorCronMinutes, 'width:40px') . " mn</td>\n\t\t\t<td> </td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorReportLevel}:</td>\n\t\t\t<td>{$RetranslatorReportLevel}</td>\n\t\t\t<td>" . help_icon('{RetranslatorReportLevel_text}') . "</td>\n\t\t</tr>\t\t\n\t\t\n\t\t<tr><td colspan=3><H3 style='margin-top:8px;margin-bottom:5px;border-bottom:1px solid #CCCCCC'>{sources_settings}</h3></td></tr>\n\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorRegionSettings}:</td>\n\t\t\t<td>{$RetranslatorRegionSettings}</td>\n\t\t\t<td> </td>\n\t\t</tr>\n\t\t\n\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorUseUpdateServerUrl}:</td>\n\t\t\t<td>" . Field_yesno_checkbox('RetranslatorUseUpdateServerUrl', $retranslator->RetranslatorUseUpdateServerUrl) . "</td>\n\t\t\t<td>" . help_icon('{RetranslatorUseUpdateServerUrl_text}') . "</td>\n\t\t</tr>\t\n\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorUpdateServerUrl}:</td>\n\t\t\t<td>" . Field_text('RetranslatorUpdateServerUrl', $retranslator->RetranslatorUpdateServerUrl, 'width:250px') . "</td>\n\t\t\t<td>" . help_icon('{RetranslatorUpdateServerUrl_text}') . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorUseUpdateServerUrlOnly}:</td>\n\t\t\t<td>" . Field_yesno_checkbox('RetranslatorUseUpdateServerUrlOnly', $retranslator->RetranslatorUseUpdateServerUrlOnly) . "</td>\n\t\t\t<td>" . help_icon('{RetranslatorUseUpdateServerUrlOnly_text}') . "</td>\n\t\t</tr>\t\t\t\n\t\t\n\t\t\n\t\t<tr><td colspan=3><H3 style='margin-top:8px;margin-bottom:5px;border-bottom:1px solid #CCCCCC'>{proxy_settings}</h3></td></tr>\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorUseProxy}:</td>\n\t\t\t<td>" . Field_yesno_checkbox('RetranslatorUseProxy', $retranslator->RetranslatorUseProxy) . "</td>\n\t\t\t<td> </td>\n\t\t</tr>\t\t\n\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorProxyAddress}:</td>\n\t\t\t<td>" . Field_text('RetranslatorProxyAddress', $retranslator->RetranslatorProxyAddress, 'width:250px') . "</td>\n\t\t\t<td> </td>\n\t\t</tr>\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t<tr>\n\t\t\t<td colspan=3 align='right'>\n\t\t\t\t\t<hr>" . button("{edit}", "ParseForm('FFM2','{$page}',true);") . "\n\t\t</td>\n\t\t</tr>\n\t</table>\n\t</FORM>\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html, "index.retranslator.php");
}
示例5: blocker_settings
function blocker_settings()
{
$users = new usersMenus();
$page = CurrentPageName();
$htmlblocker = new htmlblocker($_GET["ou"]);
$ou = $_GET["ou"];
$form = "\n\t\n\t<form name='FFM1'>\n\t<input type='hidden' name=ou value='{$ou}'>\n\t<input type='hidden' name='SaveGeneralSettings' value='yes'>\n\n\t<table style='width:100%'>\n\t<tr>\n\t<td align='right' nowrap><strong>{enable} {htmlSizeBlocker}:</strong></td>\n\t<td>" . Field_yesno_checkbox('BigMailHTMLEnabled', $htmlblocker->BigMailHTMLEnabled) . "</td>\n\t</tr>\n\t<tr>\n\t<td align='right'><strong>{path}:</strong></td>\n\t<td><strong>{$users->ARTICA_FILTER_QUEUE_PATH}/bightml</strong></td>\n\t</tr>\t\t\n\t<tr>\n\t<td align='right'><strong>{maxday}:</strong></td>\n\t<td>" . Field_text('maxday', $htmlblocker->params["config"]["maxday"], 'width:20px') . "</td>\n\t</tr>\n\t<tr>\n\t<td align='right'><strong>{prependsubject}:</strong></td>\n\t<td>" . Field_text('prependsubject', $htmlblocker->params["config"]["prependsubject"], 'width:200px') . "</td>\n\t</tr>\n\t<tr>\n\t<td align='right'><strong>{addhostname}:</strong></td>\n\t<td>" . Field_text('hostname', $htmlblocker->params["config"]["hostname"], 'width:300px') . "</td>\n\t<tr>\n\t<td></td>\n\t<td class=caption>{addhostname_text}</td>\n\t</tr>\t\n\t</tr>\t\n<tr>\n\t<td align='right' colspan=2><input type='button' value='{apply} »' OnClick=\"javascript:ParseForm('FFM1','{$page}',true);\"></td>\n\t</tr>\t\n\t</table>\n\t</form>\n\t\n\t";
$form = blocker_tabs() . "<br>" . RoundedLightGrey($form);
$tpl = new templates();
return $tpl->_ENGINE_parse_body($form);
}
示例6: main_network
function main_network(){
if($_GET["hostname"]==null){$hostname=$users->hostname;$_GET["hostname"]=$hostname;}else{$hostname=$_GET["hostname"];}
$users=new usersMenus($hostname);
$squid=new squid($hostname);
$squid_ports=$squid->http_port_array[0];
if(strpos($squid->http_port_array[0],':')>0){
$tb=explode(':',$squid->http_port_array[0]);
$squid_ip_port=$tb[1];
$squid_http_port=$tb[0];
}else{
$squid_http_port=$squid->http_port_array[0];
}
if($squid->is_rules_exists('http_access','password')==true){$auth="yes";}else{$auth="no";}
$my_auth_config=Field_yesno_checkbox("auth_allow",$auth);
$sys=new systeminfos();
$sys->array_tcp_addr['']='{all}';
if(is_array($squid->acls_rules_array["my_network"]["datas"])){
$table="<table style='width:60%'>";
$st=CellRollOver();
while (list ($num, $line) = each ($squid->acls_rules_array["my_network"]["datas"])){
$table=$table . "
<tr $st>
<td with=1% ><img src='img/fw_bold.gif'></td>
<td><strong>$line</td>
<td>{squid_network_ex}</td>
<td>" . imgtootltip('x.gif','{delete}',"SquidSimpleDelsrc('$hostname','my_network','$num')"). "</td>
</tr>
";
}
$table=$table . "</table>";
$table=RoundedLightGrey($table);
}
if($users->DANSGUARDIAN_INSTALLED==true){
$dans=new dansguardian($hostname);
$dans_port=$dans->Master_array["filterport"];
$form="<table style='width:100%'>
<tr>
<td align='right' nowrap><strong>{dansguardian_listen_port}:</strong></td>
<td>" . Field_text('dans_listen_port',$dans_port,'width:100px') ."</td>
<td class=caption>{listen_port_text}</td>
</tr>
<tr>
<td align='right'><strong>{tcp_address}</strong>:</td>
<td align='left'>" . Field_array_Hash($sys->array_tcp_addr,'dans_http_port_ip',$dans->Master_array["filterip"],null,null,0,'width:150px')."</td>
<td class=caption>{tcp_address_text}</td>
</tr>
<tr>
<td align='right'><strong>{squid_listen_port}:</strong></td>
<td>" . Field_text('squid_listen_port',$squid->http_port_array[0],'width:120px') ."</td>
<td class=caption>{listen_port_chain}</td>
</tr>
<tr>
<td class=caption align='right' colspan=3><input type='button' value='{apply} »' OnClick=\"javascript:SquidSimpleEditDansPort('$hostname');\"></td>
</tr>
</table>
";
$form=RoundedLightGrey($form);
}else{
$ports=$squid->http_port_array[0];
if(strpos($squid->http_port_array[0],':')>0){
$tb=explode(':',$squid->http_port_array[0]);
$http_port=$tb[1];
$filterip=$tb[0];
}else{
$http_port=$squid->http_port_array[0];
$filterip=null;
}
$form="<table style='width:100%'>
<tr>
<td align='right'><strong>{listen_port}:</strong></td>
<td>" . Field_text('listen_port',$squid_http_port,'width:100px') ."</td>
<td class=caption>{listen_port_text}<br><code>({$squid_http_port})</code></td>
//.........这里部分代码省略.........
示例7: GROUP_PRIVILEGES
function GROUP_PRIVILEGES($gid){
$usr=new usersMenus();
if(!isset($_GET["tab"])){
echo GROUP_PRIVILEGES_TABS($gid);
return;
}
if(isset($_GET["start"])){
if($gid==-1){$oudiv=md5($_GET["ou"]);}
if($gid==-2){$oudiv=md5($_GET["userid"]);}
$div1="<div id='{$gid}{$oudiv}_priv'>";
$div2="</div>";
}
if($gid>1){
$group=new groups($gid);
$hash=$group->LoadDatas($gid);
if($usr->SAMBA_INSTALLED){$group->TransformGroupToSmbGroup();}
$ou=$hash["ou"];
$HashPrivieleges=$hash["ArticaGroupPrivileges"];
$title_form="{group}: «{$hash["cn"]}";
}
if($gid==-1){
$ou=base64_decode($_GET["ou"]);
$ldap=new clladp();
$hash=$ldap->OUDatas($ou);
$privs=$hash["ArticaGroupPrivileges"];
$HashPrivieleges=$ldap->_ParsePrivieleges($privs,array());
$organization_hidden="<input type='hidden' name='ou' value='$ou'>";
$title_form="{organization}: «$ou";
}
if($gid==-2){
$userclass=new user($_GET["userid"]);
$ou=base64_decode($userclass->ou);
$ldap=new clladp();
$hash=$ldap->OUDatas($ou);
$privs=$userclass->ArticaGroupPrivileges;
$HashPrivieleges=$ldap->_ParsePrivieleges($privs,array());
$organization_hidden="<input type='hidden' name='userid' value='{$_GET["userid"]}'>";
$title_form="{member}: «{$_GET["userid"]}";
$warn="<div class=explain>{privileges_users_warning}</div>";
}
$priv= new usersMenus();
$AllowAddGroup=Field_yesno_checkbox('AllowAddGroup',$HashPrivieleges["AllowAddGroup"]);
$AllowAddUsers=Field_yesno_checkbox('AllowAddUsers',$HashPrivieleges["AllowAddUsers"]);
$AsArticaAdministrator=Field_yesno_checkbox('AsArticaAdministrator',$HashPrivieleges["AsArticaAdministrator"]);
$AllowChangeDomains=Field_yesno_checkbox('AllowChangeDomains',$HashPrivieleges["AllowChangeDomains"]);
$AsSystemAdministrator=Field_yesno_checkbox('AsSystemAdministrator',$HashPrivieleges["AsSystemAdministrator"]);
$AsSambaAdministrator=Field_yesno_checkbox('AsSambaAdministrator',$HashPrivieleges["AsSambaAdministrator"]);
$AsDnsAdministrator=Field_yesno_checkbox('AsDnsAdministrator',$HashPrivieleges["AsDnsAdministrator"]);
$AsQuarantineAdministrator=Field_yesno_checkbox('AsQuarantineAdministrator',$HashPrivieleges["AsQuarantineAdministrator"]);
$AsMailManAdministrator=Field_yesno_checkbox('AsMailManAdministrator',$HashPrivieleges["AsMailManAdministrator"]);
$AsOrgStorageAdministrator=Field_yesno_checkbox('AsOrgStorageAdministrator',$HashPrivieleges["AsOrgStorageAdministrator"]);
$AllowManageOwnComputers=Field_yesno_checkbox('AllowManageOwnComputers',$HashPrivieleges["AllowManageOwnComputers"]);
$AsOrgPostfixAdministrator=Field_yesno_checkbox('AsOrgPostfixAdministrator',$HashPrivieleges["AsOrgPostfixAdministrator"]);
$AsDansGuardianGroupRule=Field_yesno_checkbox('AsDansGuardianGroupRule',$HashPrivieleges["AsDansGuardianGroupRule"]);
$AsMessagingOrg=Field_yesno_checkbox('AsMessagingOrg',$HashPrivieleges["AsMessagingOrg"],"CheckHasOrgAdmin()");
$AsOrgAdmin=Field_yesno_checkbox('AsOrgAdmin',$HashPrivieleges["AsOrgAdmin"],"CheckHasOrgAdmin()");
$AsInventoryAdmin=Field_yesno_checkbox('AsInventoryAdmin',$HashPrivieleges["AsInventoryAdmin"]);
$AsJoomlaWebMaster=Field_yesno_checkbox('AsJoomlaWebMaster',$HashPrivieleges["AsJoomlaWebMaster"]);
$AsVirtualBoxManager=Field_yesno_checkbox('AsVirtualBoxManager',$HashPrivieleges["AsVirtualBoxManager"]);
$OverWriteRestrictedDomains=Field_yesno_checkbox('OverWriteRestrictedDomains',$HashPrivieleges["OverWriteRestrictedDomains"]);
$AsWebMaster=Field_yesno_checkbox('AsWebMaster',$HashPrivieleges["AsWebMaster"]);
$AsComplexPassword=Field_yesno_checkbox('AsComplexPassword',$HashPrivieleges["AsComplexPassword"]);
$AllowAddGroup=Field_yesno_checkbox('AllowAddGroup',$HashPrivieleges["AllowAddGroup"]);
$RestrictNabToGroups=Field_yesno_checkbox('RestrictNabToGroups',$HashPrivieleges["RestrictNabToGroups"]);
if($priv->AllowAddUsers==false){
$AllowAddUsers="<img src='img/status_critical.gif'>".Field_hidden('AllowAddUsers',$HashPrivieleges["AllowAddUsers"]);
$AsDansGuardianGroupRule="<img src='img/status_critical.gif'>".Field_hidden('AsDansGuardianGroupRule',$HashPrivieleges["AsDansGuardianGroupRule"]);
$AsMessagingOrg="<img src='img/status_critical.gif'>".Field_hidden('AsMessagingOrg',$HashPrivieleges["AsMessagingOrg"]);
$AsOrgAdmin="<img src='img/status_critical.gif'>".Field_hidden('AsOrgAdmin',$HashPrivieleges["AsOrgAdmin"]);
$AsJoomlaWebMaster="<img src='img/status_critical.gif'>".Field_hidden('AsJoomlaWebMaster',$HashPrivieleges["AsJoomlaWebMaster"]);
$AsVirtualBoxManager="<img src='img/status_critical.gif'>".Field_hidden('AsVirtualBoxManager',$HashPrivieleges["AsVirtualBoxManager"]);
$AsComplexPassword="<img src='img/status_critical.gif'>".Field_hidden('AsComplexPassword',$HashPrivieleges["AsComplexPassword"]);
$RestrictNabToGroups="<img src='img/status_critical.gif'>".Field_hidden('RestrictNabToGroups',$HashPrivieleges["RestrictNabToGroups"]);
}
if($priv->AsArticaAdministrator==false){
$AsArticaAdministrator="<img src='img/status_critical.gif'>".Field_hidden('AsArticaAdministrator',$HashPrivieleges["AsArticaAdministrator"]);
$AsSambaAdministrator="<img src='img/status_critical.gif'>".Field_hidden('AsSambaAdministrator',$HashPrivieleges["AsSambaAdministrator"]);
$AsDnsAdministrator="<img src='img/status_critical.gif'>".Field_hidden('AsDnsAdministrator',$HashPrivieleges["AsDnsAdministrator"]);
$AsQuarantineAdministrator="<img src='img/status_critical.gif'>".Field_hidden('AsQuarantineAdministrator',$HashPrivieleges["AsQuarantineAdministrator"]);
$AsOrgStorageAdministrator="<img src='img/status_critical.gif'>".Field_hidden('AsOrgStorageAdministrator',$HashPrivieleges["AsOrgStorageAdministrator"]);
$AsOrgPostfixAdministrator="<img src='img/status_critical.gif'>".Field_hidden('AsOrgPostfixAdministrator',$HashPrivieleges["AsOrgPostfixAdministrator"]);
$AsDansGuardianGroupRule="<img src='img/status_critical.gif'>".Field_hidden('AsDansGuardianGroupRule',$HashPrivieleges["AsDansGuardianGroupRule"]);
$AsMessagingOrg="<img src='img/status_critical.gif'>".Field_hidden('AsMessagingOrg',$HashPrivieleges["AsMessagingOrg"]);
$AsOrgAdmin="<img src='img/status_critical.gif'>".Field_hidden('AsOrgAdmin',$HashPrivieleges["AsOrgAdmin"]);
$AsInventoryAdmin="<img src='img/status_critical.gif'>".Field_hidden('AsInventoryAdmin',$HashPrivieleges["AsInventoryAdmin"]);
$AsVirtualBoxManager="<img src='img/status_critical.gif'>".Field_hidden('AsVirtualBoxManager',$HashPrivieleges["AsVirtualBoxManager"]);
//.........这里部分代码省略.........
示例8: sub_page
function sub_page()
{
$main = new main_cf();
$stunnel = new stunnel4();
$relay_host = $stunnel->main_array["postfix_relayhost"]["connect"];
$localport = $stunnel->main_array["postfix_relayhost"]["accept"];
$apply = applysettingsGeneral('apply', 'relayssl_start()', 'apply_text', true);
$main = new main_cf();
$sock = new sockets();
$sTunnel4enabled = $sock->GET_INFO('sTunnel4enabled');
preg_match('#(.+?):([0-9]+)#', $relay_host, $h);
//$relayhost=$main->main_array["relayhost"];
$sasl = new smtp_sasl_password_maps();
preg_match('#(.+?):(.+)#', $sasl->smtp_sasl_password_hash[$h[1]], $ath);
if ($localport == null) {
$sock = new sockets();
$localport = $sock->RandomPort();
}
if ($h[2] == null) {
$h[2] = 465;
}
$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:14px'><strong>{yserver}: </strong></td>\n\t\t\t\t\t<td><input type='text' id='server' value='{$h[1]}' style='font-size:14px'></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:14px'><strong>{yport}: </strong></td>\n\t\t\t\t\t<td><input type='text' id='port' value='{$h[2]}' style='font-size:14px;width:30%'></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t</table>\n\n";
$artica = new artica_general();
$enable = Paragraphe_switch_img('{enable_stunnel}', "{enable_stunnel_text}", 'enable_stunnel', $sTunnel4enabled);
$form1 = "\n<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:14px'><strong>{stunnelport}: </strong></td>\n\t\t\t\t\t<td><input type='text' id='localport' value='{$localport}' style='font-size:14px;width:30%'></td>\n\t\t\t\t</tr>\t\t\t\n\t\t\t</table>\n\n";
$form2 = "\n<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:14px'><strong><u>" . texttooltip("{smtp_sender_dependent_authentication}", "{smtp_sender_dependent_authentication_tooltip}", "smtp_sender_dependent_authentication()") . "</u>: </strong></td>\n\t\t\t\t\t<td>" . Field_yesno_checkbox('smtp_sender_dependent_authentication', $main->main_array["smtp_sender_dependent_authentication"]) . "</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<div id='peruser'>\n\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='left' nowrap style='font-size:16px' colspan=2><strong>{single_auth}:</strong>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t\t<td align='right' nowrap style='font-size:14px'><strong>{username}: </strong></td>\n\t\t\t\t\t<td><input type='text' id='username' value='{$ath[1]}' style='font-size:14px'></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:14px'><strong>{password}: </strong></td>\n\t\t\t\t\t<td><input type='text' id='password' value='{$ath[2]}' style='font-size:14px;'></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t</table>\n\t\t</div>\n\n";
$form = "<br>" . RoundedLightWhite($form);
$form1 = "<br>" . RoundedLightWhite($form1);
$form2 = "<br>" . RoundedLightWhite($form2);
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 " . CellRollOver("stunnelSwitchdiv('stunnel_relayhost')") . ">\n\t\t\t\t<td valign='top' width=1%><img src='img/chiffre1_32.png'></td>\n\t\t\t\t<td valign='top' width=99%><span style='font-size:13px;font-weight:bold'>{relayhost}</span>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2>\n\t\t\t\t\t\t<div id='stunnel_relayhost'>\t\t\t\t\n\t\t\t\t\t\t<p class=caption>{relayhost_text}</p>\n\t\t\t\t\t\t{$form}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr><td colspan=2><hr></tr>\n\t\t\t\t<tr " . CellRollOver("stunnelSwitchdiv('stunnel_relayport')") . ">\n\t\t\t\t<td valign='top' width=1%><img src='img/chiffre2_32.png'></td>\n\t\t\t\t<td valign='top' width=99%><span style='font-size:13px;font-weight:bold'>{stunnelport}</span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=2>\n\t\t\t\t\t\t<div id='stunnel_relayport' style='width:0px;height:0px;visibility:hidden'>\n\t\t\t\t\t\t<p class=caption>{stunnelport_text}</p>\n\t\t\t\t\t\t{$form1}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr><td colspan=2><hr></tr>\n\t\t\t\t<tr " . CellRollOver("stunnelSwitchdiv('stunnel_auth')") . ">\n\t\t\t\t<td valign='top' width=1%><img src='img/chiffre3_32.png'></td>\n\t\t\t\t<td valign='top' width=99%><span style='font-size:13px;font-weight:bold'>{authentication}</span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=2>\n\t\t\t\t\t\t<div id='stunnel_auth' style='width:0px;height:0px;visibility:hidden'>\n\t\t\t\t\t\t<p class=caption>{authentication_text}</p>\n\t\t\t\t\t\t{$form2}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\t\t\n\t\t\t\t</table>\n\t\t</td>\n\t\t<td valign='top'>{$enable}<br>{$apply}<br></td>\n\t\t\n\t</tr>\n\t</table>\n\t\n\t\n\t";
}
示例9: ipconfig
function ipconfig()
{
$sock = new sockets();
$ip = new networking();
$eth = $_GET["ipconfig"];
$page = CurrentPageName();
$array = $ip->GetNicInfos($eth);
$dns = $sock->getFrameWork('cmd.php?dnslist=yes');
$dnslist = explode(";", $dns);
if (is_array($dnslist)) {
while (list($num, $val) = each($dnslist)) {
if (trim($val) != null) {
$dns_text[] = $val;
}
}
}
if ($array["BOOTPROTO"] == 'dhcp' or $array["BOOTPROTO"] == null) {
$DISABLED = true;
$dhcp = 'yes';
}
$html = "\n\t<form name='ffm{$eth}'>\n\t<table style='width:100%'>\n\t<input type='hidden' name='save_nic' id='save_nic' id='save_nic' value='{$eth}'>\n\t\n\t\n\t<tr>\n\t<td class=legend>{use_dhcp}:</td>\n\t<td width=1%>" . Field_yesno_checkbox('dhcp', $dhcp, 'SwitchDHCP()') . "</td>\n\t</tr>\n\t\n\t\n\t</tr>\n\t</table>\n\t\n\t<div style='background-color:#F7F7F7;border:1px solid #676767;padding:3px;margin:3px'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend>{proto}:</td>\n\t\t\t<td>{$array["BOOTPROTO"]}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{tcp_address}:</td>\n\t\t\t<td>" . Field_text("IPADDR", $array["IPADDR"], 'width:100px', null, null, null, false, null, $DISABLED) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{netmask}:</td>\n\t\t\t<td>" . Field_text("NETMASK", $array["NETMASK"], 'width:100px', null, null, null, false, null, $DISABLED) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend>{gateway}:</td>\n\t\t\t<td>" . Field_text("GATEWAY", $array["GATEWAY"], 'width:100px', null, null, null, false, null, $DISABLED) . "</td>\n\t\t</tr>\n\t\n\t\t\n\t</table>\n\t</div>\t\n\t<br>\n\t<div style='background-color:#F7F7F7;border:1px solid #676767;padding:3px;margin:3px'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend>{primary_dns}:</td>\n\t\t<td>" . Field_text("DNS_1", $dns_text[0], 'width:100px', null, null, null, false, null) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{secondary_dns}:</td>\n\t\t<td>" . Field_text("DNS_2", $dns_text[1], 'width:100px', null, null, null, false, null) . "</td>\n\t</tr>\t\n\t</table>\n\t\t\n\t\n\t</div>\n\t<table style='width:100%'>\n\t<tr>\n\t<td align='right'>\n\t\t" . button("{edit}", "SaveNicSettings()") . " " . button("{cancel}", "YahooWin2(300,'{$page}?netconfig={$eth}','{$eth}','');") . "\n\t</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\n\t\tvar X_SaveNicSettings= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tvar ipaddr=document.getElementById('IPADDR').value;\n\t\t\talert(results+'\\n'+'<https://'+ipaddr+':{$_SERVER['SERVER_PORT']}>');\n\t\t\tsetTimeout(\"logofff()\",15000);\n\t\t\t}\n\n\t\tfunction logofff(){\n\t\t\tvar ipaddr=document.getElementById('IPADDR').value;\n\t\t\tdocument.location.href='https://'+ipaddr+':{$_SERVER['SERVER_PORT']}';\n\t\t}\n\t\n\t\tfunction SaveNicSettings(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tif(document.getElementById('dhcp').checked){XHR.appendData('dhcp','yes');}else{XHR.appendData('dhcp','no');}\n\t\t\tXHR.appendData('IPADDR',document.getElementById('IPADDR').value);\n\t\t\tXHR.appendData('NETMASK',document.getElementById('NETMASK').value);\n\t\t\tXHR.appendData('GATEWAY',document.getElementById('GATEWAY').value);\n\t\t\tXHR.appendData('DNS_1',document.getElementById('DNS_1').value);\n\t\t\tXHR.appendData('DNS_2',document.getElementById('DNS_2').value);\n\t\t\tXHR.appendData('save_nic',document.getElementById('save_nic').value);\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',X_SaveNicSettings);\n\t\t\t\n\t\t}\n\t\n\t</script>\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例10: main_artica_update_config
function main_artica_update_config()
{
$page = CurrentPageName();
$users = new usersMenus();
$tpl = new templates();
$sock = new sockets();
$ini = new Bs_IniHandler();
$configDisk = trim($sock->GET_INFO('ArticaAutoUpdateConfig'));
$cannot_schedule_update_without_schedule = $tpl->javascript_parse_text("{cannot_schedule_update_without_schedule}");
$ini->loadString($configDisk);
$AUTOUPDATE = $ini->_params["AUTOUPDATE"];
$EnableNightlyInFrontEnd = $sock->GET_INFO("EnableNightlyInFrontEnd");
$EnableRebootAfterUpgrade = $sock->GET_INFO("EnableRebootAfterUpgrade");
$EnableScheduleUpdates = $sock->GET_INFO("EnableScheduleUpdates");
$EnablePatchUpdates = $sock->GET_INFO("EnablePatchUpdates");
$ArticaScheduleUpdates = $sock->GET_INFO("ArticaScheduleUpdates");
$DisableInstantLDAPBackup = $sock->GET_INFO("DisableInstantLDAPBackup");
$EnableSystemUpdates = $sock->GET_INFO("EnableSystemUpdates");
$EnableArticaMetaClient = intval($sock->GET_INFO("EnableArticaMetaClient"));
if (!is_numeric($DisableInstantLDAPBackup)) {
$DisableInstantLDAPBackup = 0;
}
if (!is_numeric($EnableNightlyInFrontEnd)) {
$EnableNightlyInFrontEnd = 1;
}
if (!is_numeric($EnableScheduleUpdates)) {
$EnableScheduleUpdates = 0;
}
if (!is_numeric($EnableRebootAfterUpgrade)) {
$EnableRebootAfterUpgrade = 0;
}
if (!is_numeric($EnablePatchUpdates)) {
$EnablePatchUpdates = 0;
}
if (!is_numeric($EnableSystemUpdates)) {
$EnableSystemUpdates = 0;
}
//CURLOPT_MAX_RECV_SPEED_LARGE
writelogs("EnableScheduleUpdates = {$EnableScheduleUpdates}", __FUNCTION__, __FILE__, __LINE__);
if (trim($AUTOUPDATE["uri"]) == null) {
$AUTOUPDATE["uri"] = "http://articatech.net/auto.update.php";
}
if (trim($AUTOUPDATE["enabled"]) == null) {
$AUTOUPDATE["enabled"] = "yes";
}
if (trim($AUTOUPDATE["autoinstall"]) == null) {
$AUTOUPDATE["autoinstall"] = "yes";
}
if (trim($AUTOUPDATE["CheckEveryMinutes"]) == null) {
$AUTOUPDATE["CheckEveryMinutes"] = "60";
}
if (trim($AUTOUPDATE["front_page_notify"]) == null) {
$AUTOUPDATE["front_page_notify"] = "yes";
}
if (trim($AUTOUPDATE["samba_notify"]) == null) {
$AUTOUPDATE["samba_notify"] = "no";
}
if (trim($AUTOUPDATE["auto_apt"]) == null) {
$AUTOUPDATE["auto_apt"] = "no";
}
$action_http_proxy = "\t<td valign='top' width=33%>\n\t" . Paragraphe("proxy-64.png", "{http_proxy}", "{http_proxy_text}", "javascript:Loadjs('artica.settings.php?js=yes&func-ProxyInterface=yes');", 300, null, $nowrap = 1) . "\n\t</td>";
$action_update_now = "\t<td valign='top' width=33%>\n\t" . Paragraphe('64-recycle.png', '{update_now}', '{perform_update_text}', "javascript:Loadjs('artica.update.progress.php',true)", "{perform_update_text}", 300, null, $nowrap = 1) . "\n\t</td>";
$action_refresh_index = "<td colspan=2 align='right'>" . button("{refresh_index_file}", "Loadjs('setup.index.php?TestConnection-js=yes')") . "</td>";
if ($EnableArticaMetaClient == 1) {
$action_http_proxy = null;
$action_update_now = null;
$action_refresh_index = null;
}
$CURVER = @file_get_contents("VERSION");
$CUR_BRANCH = @file_get_contents("/usr/share/artica-postfix/MAIN_RELEASE");
$html = "\n\t<input type='hidden' id='perform_update_text' value='{perform_update_text}'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t<td valign='top' width=33%>\n\t" . Paragraphe("64-download.png", "{manual_update}", "{artica_manual_update_text}", "javascript:Loadjs('artica.update-manu.php');", 300, null, $nowrap = 1) . "\n\t</td>\t\n\t</td>\n\t{$action_http_proxy}\n\t{$action_update_now}\n\t</tr>\t\t\t\t\t\n\t</table>\n\t";
$form = Field_hidden("EnablePatchUpdates", $EnablePatchUpdates) . Field_hidden("EnableSystemUpdates", $EnableSystemUpdates) . "\n\t\t\t\n\t<div id='ArticaUpdateForm' class='form' style='width:95%'>\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:30%' valign=middle><div id='status-versions'></div></td>\n\t\t<td style='width:70%'>\n\t<div class=text-info style='font-size:16px'>\n\t\t<div style='margin-bottom:5px;text-align:right;padding-bottom:1px;border-bottom:1px solid #999999;width:97%'>\n\t\t\t<strong style='font-size:22px'>{current} Artica v.{$CURVER} Branch v.{$CUR_BRANCH}</strong>\n\t\t</div>{autoupdate_text}\n\t</div>\n\t</td>\n\t</tr>\n\t</tr>\n\t\t{$action_refresh_index}\n\t</tr>\n\t</table>\n\t<script>LoadAjax('status-versions','{$page}?status-versions=yes');</script>\n\t\n\t<form name='ffm1' >\n\t<table style='width:99%' >\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend class=legend style='font-size:16px'>{enable_autoupdate}:</strong></td>\n\t\t<td align='left'>" . Field_yesno_checkbox('enabled', $AUTOUPDATE["enabled"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{enable_autoinstall}:</strong></td>\n\t\t<td align='left'>" . Field_yesno_checkbox('autoinstall', $AUTOUPDATE["autoinstall"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{enable_nightlybuild}:</strong></td>\n\t\t<td align='left'>" . Field_yesno_checkbox('nightlybuild', $AUTOUPDATE["nightlybuild"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{EnableNightlyInFrontEnd}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox('EnableNightlyInFrontEnd', 1, $EnableNightlyInFrontEnd) . "</td>\n\t</tr>\n\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{front_page_notify}:</strong></td>\n\t\t<td align='left'>" . Field_yesno_checkbox('front_page_notify', $AUTOUPDATE["front_page_notify"]) . "</td>\n\t</tr>";
if ($users->SAMBA_INSTALLED) {
$form = $form . "<td width=1% nowrap align='right' class=legend style='font-size:16px'>{samba_notify}:</strong></td>\n\t<td align='left'>" . Field_yesno_checkbox('samba_notify', $AUTOUPDATE["samba_notify"]) . "</td>\n\t</tr>";
}
$form = $form . "\n\t<tr><td colspan=2> </td></tr>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{DisableInstantLDAPBackup}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox('DisableInstantLDAPBackup', 1, $DisableInstantLDAPBackup) . "</td>\n\t</tr>\t\n\t\n\t";
$ip = new networking();
while (list($eth, $cip) = each($ip->array_TCP)) {
if ($cip == null) {
continue;
}
$arrcp[$cip] = $cip;
}
$arrcp[null] = "{default}";
$WgetBindIpAddress = $sock->GET_INFO("WgetBindIpAddress");
$CurlBandwith = $sock->GET_INFO("CurlBandwith");
$CurlTimeOut = $sock->GET_INFO("CurlTimeOut");
if (!is_numeric($CurlBandwith)) {
$CurlBandwith = 0;
}
if (!is_numeric($CurlTimeOut)) {
$CurlTimeOut = 3600;
}
if ($CurlTimeOut < 720) {
$CurlTimeOut = 3600;
}
$NoCheckSquid = $sock->GET_INFO("NoCheckSquid");
if (!is_numeric($NoCheckSquid)) {
$NoCheckSquid = 0;
}
//.........这里部分代码省略.........
示例11: RejectShortMsgs_settings
function RejectShortMsgs_settings()
{
$chk = new jchkmail();
$page = CurrentPageName();
$tab = RejectShortMsgs_tab();
$html = "\n\t<H1>{RejectShortMsgs}</H1>\n\t{$tab}\n\t<p class=caption>{RejectShortMsgs_explain}</p>\n\t<form name='FFMREJECT_SHORT_BODIES'>\n\t<table class=form>\n\t<tr>\n\t\t<td class=legend>{enable_filter}:</td>\n\t\t<td>" . Field_yesno_checkbox('REJECT_SHORT_BODIES', $chk->CONF["REJECT_SHORT_BODIES"], '{enable_disable}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{MIN_BODY_LENGTH}:</td>\n\t\t<td>" . Field_text('MIN_BODY_LENGTH', $chk->CONF["MIN_BODY_LENGTH"], 'width:90px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:ParseForm('FFMREJECT_SHORT_BODIES','{$page}',true);\" value='{apply} »'></td>\n\t</tr>\n\t\t\n\t\n\t</table>\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html, "postfix.index.php");
}
示例12: main_artica_update_config
function main_artica_update_config()
{
$page = CurrentPageName();
$users = new usersMenus();
$sock = new sockets();
$ini = new Bs_IniHandler();
$configDisk = trim($sock->GET_INFO('ArticaAutoUpdateConfig'));
$ini->loadString($configDisk);
$AUTOUPDATE = $ini->_params["AUTOUPDATE"];
if (trim($AUTOUPDATE["uri"]) == null) {
$AUTOUPDATE["uri"] = "http://www.artica.fr/auto.update.php";
}
if (trim($AUTOUPDATE["enabled"]) == null) {
$AUTOUPDATE["enabled"] = "yes";
}
if (trim($AUTOUPDATE["autoinstall"]) == null) {
$AUTOUPDATE["autoinstall"] = "yes";
}
if (trim($AUTOUPDATE["CheckEveryMinutes"]) == null) {
$AUTOUPDATE["CheckEveryMinutes"] = "60";
}
if (trim($AUTOUPDATE["front_page_notify"]) == null) {
$AUTOUPDATE["front_page_notify"] = "yes";
}
if (trim($AUTOUPDATE["samba_notify"]) == null) {
$AUTOUPDATE["samba_notify"] = "no";
}
if (trim($AUTOUPDATE["auto_apt"]) == null) {
$AUTOUPDATE["auto_apt"] = "no";
}
$html = "\n\t<input type='hidden' id='perform_update_text' value='{perform_update_text}'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<p class=caption>\n\t\t<H5>{parameters}</H5>\n\t<div style='font-size:12px'>{autoupdate_text}</div>\n\t</p>\n\t</td>\n\t<td valign='top' width=1%>\n\t" . Paragraphe('64-recycle.png', '{update_now}', '{perform_update_text}', "javascript:auto_update_perform()") . "</td>\n\t</tr>\n\t</table>\n\t";
$form = "\n\t<div id='ArticaUpdateForm'><form name='ffm1' >\n\t<table style='width:100%' class='table_form'>\n\t<tr>\n\t<td width=1% nowrap align='right' class=legend class=legend>{enable_autoupdate}:</strong></td>\n\t<td align='left'>" . Field_yesno_checkbox('enabled', $AUTOUPDATE["enabled"]) . "</td>\n\t</tr>\n\t<tr>\n\t<td width=1% nowrap align='right' class=legend>{enable_autoinstall}:</strong></td>\n\t<td align='left'>" . Field_yesno_checkbox('autoinstall', $AUTOUPDATE["autoinstall"]) . "</td>\n\t</tr>\n\t<tr>\n\t<td width=1% nowrap align='right' class=legend>{enable_nightlybuild}:</strong></td>\n\t<td align='left'>" . Field_yesno_checkbox('nightlybuild', $AUTOUPDATE["nightlybuild"]) . "</td>\n\t</tr>\n\t<tr>\n\t<td width=1% nowrap align='right' class=legend>{front_page_notify}:</strong></td>\n\t<td align='left'>" . Field_yesno_checkbox('front_page_notify', $AUTOUPDATE["front_page_notify"]) . "</td>\n\t</tr>\n\t<tr>";
if ($users->SAMBA_INSTALLED) {
$form = $form . "<td width=1% nowrap align='right' class=legend>{auto_apt}:</strong></td>\n\t<td align='left'>" . Field_yesno_checkbox('auto_apt', $AUTOUPDATE["auto_apt"]) . "</td>\n\t</tr>";
}
if (is_file("/usr/bin/apt-get")) {
$form = $form . "<td width=1% nowrap align='right' class=legend>{samba_notify}:</strong></td>\n\t<td align='left'>" . Field_yesno_checkbox('samba_notify', $AUTOUPDATE["samba_notify"]) . "</td>\n\t</tr>";
}
$ip = new networking();
while (list($eth, $cip) = each($ip->array_TCP)) {
if ($cip == null) {
continue;
}
$arrcp[$cip] = $cip;
}
$arrcp[null] = "{default}";
$WgetBindIpAddress = $sock->GET_INFO("WgetBindIpAddress");
$WgetBindIpAddress = Field_array_Hash($arrcp, "WgetBindIpAddress", $WgetBindIpAddress, null, null, 0, "font-size:13px;padding:3px;");
$form = $form . "\n\t<tr>\n\t<td width=1% nowrap align='right' class=legend>{WgetBindIpAddress}:</strong></td>\n\t<td align='left'>{$WgetBindIpAddress}</td>\n\t</tr>\t\t\t\n\t<tr>\n\t<td width=1% nowrap align='right' class=legend>{CheckEveryMinutes}:</strong></td>\n\t<td align='left'>" . Field_text('CheckEveryMinutes', $AUTOUPDATE["CheckEveryMinutes"], 'ont-size:13px;padding:3px;width:90px') . "</td>\n\t</tr>\n\t<tr>\n\t<td width=1% nowrap align='right' class=legend>{uri}:</strong></td>\n\t<td align='left'>" . Field_text('uri', $AUTOUPDATE["uri"], 'ont-size:13px;padding:3px;width:100%') . "</td>\n\t</tr>\t\n\t<tr>\n\t<td colspan=2 align='right'>\n\t<hr>\n\t" . button("{edit}", "SaveArticaUpdateForm()") . "\n\t</tr>\t\t\t\n\t</table>\n\t</form>\n\t</div>\n\t";
$tpl = new templates();
return $tpl->_ENGINE_parse_body($html . $form);
}
示例13: GROUP_PRIVILEGES
function GROUP_PRIVILEGES($gid)
{
$usr = new usersMenus();
if (!isset($_GET["tab"])) {
echo GROUP_PRIVILEGES_TABS($gid);
return;
}
if (isset($_GET["start"])) {
$div1 = "<div id='{$gid}_priv'>";
$div2 = "</div>";
}
$group = new groups($gid);
$hash = $group->LoadDatas($gid);
if ($usr->SAMBA_INSTALLED) {
$group->TransformGroupToSmbGroup();
}
$ou = $hash["ou"];
$HashPrivieleges = $hash["ArticaGroupPrivileges"];
$priv = new usersMenus();
$AllowAddGroup = Field_yesno_checkbox('AllowAddGroup', $HashPrivieleges["AllowAddGroup"]);
$AllowAddUsers = Field_yesno_checkbox('AllowAddUsers', $HashPrivieleges["AllowAddUsers"]);
$AsArticaAdministrator = Field_yesno_checkbox('AsArticaAdministrator', $HashPrivieleges["AsArticaAdministrator"]);
$AllowChangeDomains = Field_yesno_checkbox('AllowChangeDomains', $HashPrivieleges["AllowChangeDomains"]);
$AsSystemAdministrator = Field_yesno_checkbox('AsSystemAdministrator', $HashPrivieleges["AsSystemAdministrator"]);
$AsSambaAdministrator = Field_yesno_checkbox('AsSambaAdministrator', $HashPrivieleges["AsSambaAdministrator"]);
$AsDnsAdministrator = Field_yesno_checkbox('AsDnsAdministrator', $HashPrivieleges["AsDnsAdministrator"]);
$AsQuarantineAdministrator = Field_yesno_checkbox('AsQuarantineAdministrator', $HashPrivieleges["AsQuarantineAdministrator"]);
$AsMailManAdministrator = Field_yesno_checkbox('AsMailManAdministrator', $HashPrivieleges["AsMailManAdministrator"]);
$AsOrgStorageAdministrator = Field_yesno_checkbox('AsOrgStorageAdministrator', $HashPrivieleges["AsOrgStorageAdministrator"]);
$AllowManageOwnComputers = Field_yesno_checkbox('AllowManageOwnComputers', $HashPrivieleges["AllowManageOwnComputers"]);
$AsOrgPostfixAdministrator = Field_yesno_checkbox('AsOrgPostfixAdministrator', $HashPrivieleges["AsOrgPostfixAdministrator"]);
$AsDansGuardianGroupRule = Field_yesno_checkbox('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
$AsMessagingOrg = Field_yesno_checkbox('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
$AsOrgAdmin = Field_yesno_checkbox('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
if ($priv->AllowAddUsers == false) {
$AllowAddUsers = "<img src='img/status_critical.gif'>" . Field_hidden('AllowAddUsers', $HashPrivieleges["AllowAddUsers"]);
$AsDansGuardianGroupRule = "<img src='img/status_critical.gif'>" . Field_hidden('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
$AsMessagingOrg = "<img src='img/status_critical.gif'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
$AsOrgAdmin = "<img src='img/status_critical.gif'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
}
if ($priv->AsArticaAdministrator == false) {
$AsArticaAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsArticaAdministrator', $HashPrivieleges["AsArticaAdministrator"]);
$AsSambaAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsSambaAdministrator', $HashPrivieleges["AsSambaAdministrator"]);
$AsDnsAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsDnsAdministrator', $HashPrivieleges["AsDnsAdministrator"]);
$AsQuarantineAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsQuarantineAdministrator', $HashPrivieleges["AsQuarantineAdministrator"]);
$AsOrgStorageAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsOrgStorageAdministrator', $HashPrivieleges["AsOrgStorageAdministrator"]);
$AsOrgPostfixAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsOrgPostfixAdministrator', $HashPrivieleges["AsOrgPostfixAdministrator"]);
$AsDansGuardianGroupRule = "<img src='img/status_critical.gif'>" . Field_hidden('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
$AsMessagingOrg = "<img src='img/status_critical.gif'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
$AsOrgAdmin = "<img src='img/status_critical.gif'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
}
if ($priv->AllowAddGroup == false) {
$AllowAddGroup = "<img src='img/status_critical.gif'>" . Field_hidden('AllowAddGroup', $HashPrivieleges["AllowAddGroup"]);
$AsDansGuardianGroupRule = "<img src='img/status_critical.gif'>" . Field_hidden('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
$AsMessagingOrg = "<img src='img/status_critical.gif'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
$AsOrgAdmin = "<img src='img/status_critical.gif'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
}
if ($priv->AllowChangeDomains == false) {
$AllowChangeDomains = "<img src='img/status_critical.gif'>" . Field_hidden('AllowChangeDomains', $HashPrivieleges["AllowChangeDomains"]);
}
if ($priv->AsSystemAdministrator == false) {
$AsSystemAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsSystemAdministrator', $HashPrivieleges["AsSystemAdministrator"]);
}
if ($priv->AsDnsAdministrator == false) {
$AsDnsAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsDnsAdministrator', $HashPrivieleges["AsDnsAdministrator"]);
}
if ($priv->AsQuarantineAdministrator == false) {
$AsQuarantineAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsQuarantineAdministrator', $HashPrivieleges["AsQuarantineAdministrator"]);
}
if ($priv->AsOrgStorageAdministrator == false) {
$AsOrgStorageAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsOrgStorageAdministrator', $HashPrivieleges["AsOrgStorageAdministrator"]);
}
if ($priv->AsOrgPostfixAdministrator == false) {
$AsOrgPostfixAdministrator = "<img src='img/status_critical.gif'>" . Field_hidden('AsOrgPostfixAdministrator', $HashPrivieleges["AsOrgPostfixAdministrator"]);
}
if ($priv->AsMessagingOrg == false) {
$AsMessagingOrg = "<img src='img/status_critical.gif'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
}
if ($priv->AsOrgAdmin == false) {
$AsOrgAdmin = "<img src='img/status_critical.gif'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
}
$group_allow = " {groups_allow}</H3><br>\n\t\t<table style='width:100%' class=table_form>\n\t\t\n\t\t\t<tr>\n\t\t\t\t<td align='right'><strong>{AllowAddUsers}:</td><td>{$AllowAddUsers}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right'><strong>{AsDansGuardianGroupRule}:</td><td>{$AsDansGuardianGroupRule}</td>\n\t\t\t</tr>\t\t\t\n\t\t\t\n\t\t\t\n\t\t</table>\n";
$user_allow = " {users_allow}</H3><br>\n\t\t\t\t\t<table style='width:100%' class=table_form>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowChangeAntiSpamSettings}:</td><td>" . Field_yesno_checkbox('AllowChangeAntiSpamSettings', $HashPrivieleges["AllowChangeAntiSpamSettings"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowChangeUserPassword}:</td><td>" . Field_yesno_checkbox('AllowChangeUserPassword', $HashPrivieleges["AllowChangeUserPassword"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowFetchMails}:</td><td>" . Field_yesno_checkbox('AllowFetchMails', $HashPrivieleges["AllowFetchMails"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowChangeUserKas}:</td><td>" . Field_yesno_checkbox('AllowChangeUserKas', $HashPrivieleges["AllowChangeUserKas"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowEditAliases}:</td><td>" . Field_yesno_checkbox('AllowEditAliases', $HashPrivieleges["AllowEditAliases"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowChangeMailBoxRules}:</td><td>" . Field_yesno_checkbox('AllowChangeMailBoxRules', $HashPrivieleges["AllowChangeMailBoxRules"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowSender_canonical}:</td><td>" . Field_yesno_checkbox('AllowSenderCanonical', $HashPrivieleges["AllowSenderCanonical"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowOpenVPN}:</td><td>" . Field_yesno_checkbox('AllowOpenVPN', $HashPrivieleges["AllowOpenVPN"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowDansGuardianBanned}:</td><td>" . Field_yesno_checkbox('AllowDansGuardianBanned', $HashPrivieleges["AllowDansGuardianBanned"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowXapianDownload}:</td><td>" . Field_yesno_checkbox('AllowXapianDownload', $HashPrivieleges["AllowXapianDownload"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowManageOwnComputers}:</td><td>" . Field_yesno_checkbox('AllowManageOwnComputers', $HashPrivieleges["AllowManageOwnComputers"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowEditAsWbl}:</td><td>" . Field_yesno_checkbox('AllowEditAsWbl', $HashPrivieleges["AllowEditAsWbl"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t</table>";
$org_allow = " {organization_allow}</H3><br>\n<table style='width:100%' class=table_form>\t\n\t<tr>\n\t\t<td align='right' nowrap><strong>{AllowEditOuSecurity}:</td>\n\t\t<td>" . Field_yesno_checkbox('AllowEditOuSecurity', $HashPrivieleges["AllowEditOuSecurity"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' nowrap><strong>{AsOrgPostfixAdministrator}:</td>\n\t\t<td>{$AsOrgPostfixAdministrator}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap><strong>{AsQuarantineAdministrator}:</td>\n\t\t<td>{$AsQuarantineAdministrator}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' nowrap><strong>{AsMailManAdministrator}:</td>\n\t\t<td>{$AsMailManAdministrator}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap><strong>{AsOrgStorageAdministrator}:</td>\n\t\t<td>{$AsOrgStorageAdministrator}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap><strong>{AsMessagingOrg}:</td>\n\t\t<td>{$AsMessagingOrg}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' nowrap><strong>{AsOrgAdmin}:</td>\n\t\t<td>{$AsOrgAdmin}</td>\n\t</tr>\t\t\t\n\t\n\t\n\t\n\t<tr>\n\t\t<td align='right'><strong>{AllowChangeDomains}:</td><td>{$AllowChangeDomains}</td>\n\t</tr>\t\n</table>\t\t\t\t\t\n";
$admin_allow = " {administrators_allow}</H3><br>\n<table style='width:100%' class=table_form>\n\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AsPostfixAdministrator}:</td>\n\t\t\t\t\t\t\t<td>" . Field_yesno_checkbox('AsPostfixAdministrator', $HashPrivieleges["AsPostfixAdministrator"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AsSquidAdministrator}:</td>\n\t\t\t\t\t\t\t<td>" . Field_yesno_checkbox('AsSquidAdministrator', $HashPrivieleges["AsSquidAdministrator"]) . "</td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AsSambaAdministrator}:</td>\n\t\t\t\t\t\t\t<td>{$AsSambaAdministrator}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AsArticaAdministrator}:</td>\n\t\t\t\t\t\t\t<td>{$AsArticaAdministrator}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AsSystemAdministrator}:</td>\n\t\t\t\t\t\t\t<td>{$AsSystemAdministrator}</td>\n\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AsDnsAdministrator}:</td>\n\t\t\t\t\t\t\t<td>{$AsDnsAdministrator}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AsMailBoxAdministrator}:</td>\n\t\t\t\t\t\t\t<td>" . Field_yesno_checkbox('AsMailBoxAdministrator', $HashPrivieleges["AsMailBoxAdministrator"]) . "</td>\n\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong>{AllowViewStatistics}:</td>\n\t\t\t\t\t\t\t<td>" . Field_yesno_checkbox('AllowViewStatistics', $HashPrivieleges["AllowViewStatistics"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</table>";
$sufform = $_GET["tab"];
switch ($_GET["tab"]) {
case "G":
$g = $group_allow;
break;
case "U":
$g = $user_allow;
break;
case "A":
$g = $admin_allow;
break;
case "O":
$g = $org_allow;
break;
default:
//.........这里部分代码省略.........
示例14: main_rules_group_scanner
function main_rules_group_scanner($gid = null)
{
$kav = new kav4proxy();
$groupname = $kav->main_groups[$gid]["name"];
$hash = $kav->main_groups[$gid]["main"]["icapserver.actions:{$groupname}"];
$page = CurrentPageName();
$main = RoundedLightGrey("\n<form name=\"ffm_{$gid}\">\n\t\t\t<input type='hidden' name='gid' value='{$gid}'>\n\t\t\t<input type='hidden' name='group_actions' value='yes'>\n\t\t\t<p class=caption>{scan_options_text}</p>\n\t\t\t\n\t\t\t<table style=width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top'><strong>{BasesErrorAction}</strong></td>\n\t\t\t\t\t<td valign='top' align='center'>" . Field_deny_skip_checkbox_img('BasesErrorAction', $hash["BasesErrorAction"]) . "</td>\n\t\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top'><strong>{CorruptedAction}</strong></td>\n\t\t\t\t\t<td valign='top' align='center'>" . Field_deny_skip_checkbox_img('CorruptedAction', $hash["CorruptedAction"]) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top'><strong>{CuredAction}</strong></td>\n\t\t\t\t\t<td valign='top' align='center'>" . Field_deny_skip_checkbox_img('CuredAction', $hash["CuredAction"]) . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top'><strong>{ErrorAction}</strong></td>\n\t\t\t\t\t<td valign='top' align='center'>" . Field_deny_skip_checkbox_img('ErrorAction', $hash["ErrorAction"]) . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top'><strong>{InfectedAction}</strong></td>\n\t\t\t\t\t<td valign='top' align='center'>" . Field_deny_skip_checkbox_img('InfectedAction', $hash["InfectedAction"]) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' colspan=2 align='right'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('ffm_{$gid}','{$page}',true);\"></td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t</table></form>");
$hash = $kav->main_groups[$gid]["main"]["icapserver.engine.options:{$groupname}"];
$scan_engine = RoundedLightGrey("\n\t\t\t<form name=\"ffm1_{$gid}\">\n\t\t\t<input type='hidden' name='gid' value='{$gid}'>\n\t\t\t<input type='hidden' name='group_actions' value='yes'>\n\t\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t<td align='right'><strong>{MaxScanTime}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_text('MaxScanTime', $hash["MaxScanTime"], 'width:50px') . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{MaxScanTime_text}', false, 'milter.index.php') . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td align='right'><strong>{Cure}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_yesno_checkbox("Cure", $hash["Cure"]) . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{Cure_text}', false, 'milter.index.php') . "</td>\n\t\t\t\t</tr>\t\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t<td align='right'><strong>{ScanArchives}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_yesno_checkbox("ScanArchives", $hash["ScanArchives"]) . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{ScanArchives_text}', false, 'milter.index.php') . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t<td align='right'><strong>{ScanPacked}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_yesno_checkbox("ScanPacked", $hash["ScanPacked"]) . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{ScanPacked_text}', false, 'milter.index.php') . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t<td align='right'><strong>{ScanMailBases}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_yesno_checkbox("ScanMailBases", $hash["ScanMailBases"]) . "</td>\n\t\t\t\t<td align='left'> </td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t<td align='right'><strong>{ScanMailPlain}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_yesno_checkbox("ScanMailPlain", $hash["ScanMailPlain"]) . "</td>\n\t\t\t\t<td align='left'> </td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t<td align='right'><strong>{UseAVBasesSet}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_array_Hash(array("standard" => "standard", "extended" => "extended", "redundant" => "redundant"), 'UseAVBasesSet', $hash["UseAVBasesSet"]) . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{UseAVBasesSet_text}', false, 'milter.index.php') . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' colspan=3 align='right'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('ffm1_{$gid}','{$page}',true);\"></td>\n\t\t\t\t</tr>\t\t\t\t\t\n\t\t\t\t</table></form>");
$html = main_rules_group_tabs($gid) . "\n\t<H5>{scan_options}</H5>\n\t\n\t\t{$main}\n\t\t<br>\n\t\t{$scan_engine}\n\t\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html, 'milter.index.php');
}
示例15: PageGroupRule_Notify
function PageGroupRule_Notify()
{
$milter = new kavmilterd();
$milter->LoadRule($_GET["PolicyRule"]);
$tabs = PageGroupRule_tabs();
$page = CurrentPageName();
$JS_select = "kavmilter_select_notify_action('{$_GET["PolicyRule"]}')";
$ScanPolicy = RoundedLightGrey("\n\t\t\n\t\t\t<table style='width:100%'>\n\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap><strong>{add_not_rule}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_array_Hash(array(null => "{select}", "Sender" => "Sender", "Recipients" => "Recipients", "Admin" => "Admin"), 'DEST', null, $JS_select, null, 0, 'width:160px') . "</td>\n\t\t\t\t<td align='left'><div id='notify_rule_action'></div></td>\n\t\t\t\t<td align='left'><input type='button' OnClick=\"javascript:KavMilterdAddNotify()\" value='{add} »' style='width:100px'></td>\n\t\t\t\t<td align='left'>" . help_icon('{NotifySender_text}') . "</td>\n\t\t\t\t</tr>\n\t\t\t</table>\t\n\t\t\t<br>\n\t\t\t<center>\n\t\t\t\t<div id='notifications_rules' style='width:250px'>" . PageGroupRule_Notify_table() . "</div>\t\n\t\t\t\t<br>\n\t\t\t</center>\n\t\t<form name=\"ffm11\">\n\t\t<input type='hidden' name='PolicyRule' id='PolicyRule' value='{$_GET["PolicyRule"]}'>\n\t\t<input type='hidden' name='SavePolicyRule' value='{$_GET["PolicyRule"]}'>\n\t\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend>{EnableNotifications}:</strong></td>\n\t\t\t\t\t<td align='left'>" . Field_yesno_checkbox("EnableNotifications", $milter->rule_array["EnableNotifications"]) . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{EnableNotifications_text}') . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend>{AdminAddresses}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_text('AdminAddresses', $milter->rule_array["AdminAddresses"], 'width:250px') . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{AdminAddresses_text}') . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend>{PostmasterAddress}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_text('PostmasterAddress', $milter->rule_array["PostmasterAddress"], 'width:250px') . "</td>\n\t\t\t\t<td align='left'> </td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend>{MessageSubject}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_text('MessageSubject', $milter->rule_array["MessageSubject"], 'width:100%') . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{MessageSubject_text}') . "</td>\n\t\t\t\t</tr>\t\t\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend>{SenderSubject}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_text('SenderSubject', $milter->rule_array["SenderSubject"], 'width:100%') . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{SenderSubject_text}') . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend>{ReceiverSubject}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_text('ReceiverSubject', $milter->rule_array["ReceiverSubject"], 'width:100%') . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{ReceiverSubject_text}') . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend>{AdminSubject}:</strong></td>\n\t\t\t\t<td align='left'>" . Field_text('AdminSubject', $milter->rule_array["AdminSubject"], 'width:100%') . "</td>\n\t\t\t\t<td align='left'>" . help_icon('{AdminSubject_text}') . "</td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=3 align='right'><input type='button' value='{edit} »' style='width:200px'\n\t\t\t\tOnClick=\"javascript:ParseForm('ffm11','{$page}',true);LoadAjax('KavMilterdPolicyZone','{$page}?PolicyRule={$_GET["PolicyRule"]}&PolicyTab={$_GET["PolicyTab"]}')\" value='{edit} »'>\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\t\t\n\t\t\t\t\n\t\t\t\t</table></form>");
$html = "<br>{$tabs}<br>\n\t<H3>{rule}: {$milter->rule_array["GroupName"]}</H3>\n\t{$ScanPolicy}\n\t\n\t\n\t\n\t";
return $html;
}