本文整理汇总了PHP中boostrap_form::set_form_locked方法的典型用法代码示例。如果您正苦于以下问题:PHP boostrap_form::set_form_locked方法的具体用法?PHP boostrap_form::set_form_locked怎么用?PHP boostrap_form::set_form_locked使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boostrap_form
的用法示例。
在下文中一共展示了boostrap_form::set_form_locked方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parameters
function parameters()
{
$users = new usersMenus();
$sock = new sockets();
$FailOverArtica = $sock->GET_INFO("FailOverArtica");
if (!is_numeric($FailOverArtica)) {
$FailOverArtica = 1;
}
$FailOverArticaParams = unserialize(base64_decode($sock->GET_INFO("FailOverArticaParams")));
if (!is_numeric($FailOverArticaParams["squid-internal-mgr-info"])) {
$FailOverArticaParams["squid-internal-mgr-info"] = 1;
}
if (!is_numeric($FailOverArticaParams["ExternalPageToCheck"])) {
$FailOverArticaParams["ExternalPageToCheck"] = 1;
}
$boot = new boostrap_form();
$boot->set_checkbox("FailOverArtica", "{FailOverArtica}", $FailOverArtica, array("TOOLTIP" => "{FailOverArtica_explain}", "DISABLEALL" => true));
$boot->set_spacertitle("{APP_PROXY}");
$boot->set_checkbox("squid-internal-mgr-info", "{failover_mgrinfo}", $FailOverArticaParams["squid-internal-mgr-info"], array("TOOLTIP" => "{failover_mgrinfo_explain}"));
$boot->set_checkbox("ExternalPageToCheck", "{failover_ExternalPageToCheck}", $FailOverArticaParams["ExternalPageToCheck"], array("TOOLTIP" => "{failover_ExternalPageToCheck_explain}"));
if (!$users->CORP_LICENSE) {
$boot->set_form_locked();
}
echo $boot->Compile();
}
示例2: bridge_popup
function bridge_popup()
{
$boot = new boostrap_form();
$sock = new sockets();
$users = new usersMenus();
$ldap = new clladp();
$ID = $_GET["ID"];
$title_button = "{add}";
$nics = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes")));
$IP = new networking();
while (list($key, $value) = each($nics)) {
$array = $IP->GetNicInfos($value);
$NICZ[$value] = $value . " [{$array["IPADDR"]}]";
}
$boot->set_list("nic_inbound", "{from}", $NICZ, null);
$boot->set_list("nic_linked", "{to}", $NICZ, null);
$boot->set_hidden("ID", $_GET["ID"]);
if (!$users->AsSystemAdministrator) {
$boot->set_form_locked();
}
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin2");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例3: etchosts_popup
function etchosts_popup()
{
$boot = new boostrap_form();
$sock = new sockets();
$users = new usersMenus();
$ldap = new clladp();
$ID = $_GET["ID"];
$title_button = "{add_new_entry}";
$boot->set_field("hostname", "{hostname}", $ligne["name"]);
$boot->set_field("ipaddr", "{tcp_address}", $ligne["ipaddr"], array("IPV4" => true));
$boot->set_field("alias", "{alias}", null);
if (!$users->AsSystemAdministrator) {
$boot->set_form_locked();
}
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin2");
}
$boot->set_button("{add}");
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例4: ldap_auth_parameters
function ldap_auth_parameters()
{
$boot = new boostrap_form();
$squid = new squidbee();
$users = new usersMenus();
$sock = new sockets();
$SquidLdapAuthEnableGroups = $sock->GET_INFO("SquidLdapAuthEnableGroups");
$EnableKerbAuth = $sock->GET_INFO("EnableKerbAuth");
$SquidLdapAuthBanner = $sock->GET_INFO("SquidLdapAuthBanner");
if ($SquidLdapAuthBanner == null) {
$SquidLdapAuthBanner = "Basic credentials, Please logon...";
}
if ($EnableKerbAuth == 1) {
$error = "<p class=text-error>{ldap_with_ad_explain}</p>";
}
$boot->set_spacertitle("{local_ldap}");
$boot->set_spacerexplain("{authenticate_users_explain}");
$boot->set_checkbox("ldap_auth", "{local_ldap}", $squid->LDAP_AUTH);
//$boot->set_checkbox("SquidLdapAuthEnableGroups", "{enable_group_checking}",$SquidLdapAuthEnableGroups);
$boot->set_field("SquidLdapAuthBanner", "{auth_banner}", $SquidLdapAuthBanner, array("ENCODE" => true));
$boot->set_spacertitle("{remote_database}");
$boot->set_spacerexplain("{SQUID_LDAP_AUTH_EXT}");
$ldap_server = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_server"];
$ldap_port = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_port"];
$userdn = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_user"];
$ldap_password = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_password"];
$ldap_suffix = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_suffix"];
$ldap_filter_users = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_filter_users"];
$ldap_filter_group = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_filter_group"];
$ldap_server = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_server"];
$auth_banner = $squid->EXTERNAL_LDAP_AUTH_PARAMS["auth_banner"];
$EnableSquidExternalLDAP = $squid->LDAP_EXTERNAL_AUTH;
if ($auth_banner == null) {
$auth_banner = $SquidLdapAuthBanner;
}
if ($ldap_filter_users == null) {
$ldap_filter_users = "sAMAccountName=%s";
}
if ($ldap_filter_group == null) {
$ldap_filter_group = "(&(objectclass=person)(sAMAccountName=%u)(memberof=*))";
}
if ($ldap_port == null) {
$ldap_port = 389;
}
$boot->set_checkbox("EnableSquidExternalLDAP", "{activate}", $EnableSquidExternalLDAP);
$boot->set_field("ldap_server", "{hostname}", $ldap_server);
$boot->set_field("ldap_port", "{listen_port}", $ldap_port);
$boot->set_field("auth_banner", "{auth_banner}", $auth_banner);
$boot->set_field("ldap_user", "{userdn}", $userdn);
$boot->set_fieldpassword("ldap_password", "{ldap_password}", $ldap_password, array("ENCODE" => true));
$boot->set_field("ldap_suffix", "{ldap_suffix}", $ldap_suffix);
$boot->set_field("ldap_filter_users", "{ldap_filter_users}", $ldap_filter_users);
$boot->set_field("ldap_filter_group", "{ldap_filter_group}", $ldap_filter_group);
$boot->set_button("{apply}");
if (!$users->AsSquidAdministrator) {
$boot->set_form_locked();
}
$boot->set_Newbutton("{restart_onlysquid}", "Loadjs('squid.restart.php?onlySquid=yes&ask=yes');");
echo $error . $boot->Compile();
}
示例5: content
function content()
{
$page = CurrentPageName();
$tpl = new templates();
$users = new usersMenus();
$VirtualUser = $_SESSION["VirtAclUser"];
if (isset($_SESSION["RADIUS_ID"])) {
if ($_SESSION["RADIUS_ID"] > 0) {
$VirtualUser = true;
}
}
if (!$VirtualUser) {
$ct = new user($_SESSION["uid"]);
} else {
$ct = new user();
}
$t = time();
$ActiveDirectory = 0;
if ($ct->AsActiveDirectoryMember) {
$ActiveDirectory = 1;
}
$boot = new boostrap_form();
if ($VirtualUser) {
$ct->DisplayName = $_SESSION["uid"];
}
if ($_SESSION["uid"] == -100) {
include "ressources/settings.inc";
$ct->DisplayName = $_GLOBAL["ldap_admin"];
$ct->sn = $ct->DisplayName;
$ct->givenName = $ct->DisplayName;
$VirtualUser = true;
}
$boot->set_field("DisplayName", "{displayName}", $ct->DisplayName);
$boot->set_field("sn", "{sn}", $ct->sn);
$boot->set_field("givenName", "{givenName}", $ct->givenName);
if ($users->AllowChangeUserPassword) {
$boot->set_fieldpassword("password", "{password}", $ct->password);
}
$boot->set_field("telephoneNumber", "{telephoneNumber}", $ct->telephoneNumber);
$boot->set_field("mobile", "{mobile}", $ct->mobile);
$boot->set_button("{apply}");
$boot->set_CallBack("AjaxTopMenu('headNav','miniadm.index.php?headNav=yes');");
if ($VirtualUser) {
$boot->set_form_locked();
} else {
if ($ActiveDirectory == 1) {
$boot->set_form_locked();
}
}
$picture = "ressources/{$ct->ThumbnailPath}";
if (is_file("{$picture}")) {
$picture = "<a href=\"javascript:blur();\" \n\t\tOnClick=\"javascript:Loadjs('miniadm.profile.php?upload-pic-js=yes');\">\n\t\t<img src='ressources/{$ct->ThumbnailPath}' style='margin:10px'></a>";
} else {
$picture = null;
}
$form = $boot->Compile();
$language = $tpl->javascript_parse_text("{language}");
$html = "\n\t<div class=BodyContent>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='top'>{$picture}</td>\n\t\t<td valign='top'>\n\t\t<H1>{myaccount}</H1>\n\t\t<p>{myaccount_text}</p>\n\t\t<div style='text-align:right'>\n\t\t<a href=\"javascript:blur();\" OnClick=\"YahooWin3(500,'{$page}?lang=yes','{$language}');\">\n\t\t{$language}</a> | \n\t\t<a href=\"javascript:blur();\" OnClick=\"YahooWin3(500,'{$page}?privileges=yes','{my_privileges}');\">\n\t\t{my_privileges}</a></div>\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t</div>\n\t<div class=BodyContent>\n\t\t{$form}\n\t\t\n\t</div>\n\n\t\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例6: parameters
function parameters()
{
$users = new usersMenus();
$sock = new sockets();
$boot = new boostrap_form();
$boot->set_formtitle("{logs_retention}");
$boot->set_formdescription("{squid_logs_retention_explain}");
$BackupMaxDays = $sock->GET_INFO("BackupMaxDays");
$BackupMaxDaysDir = $sock->GET_INFO("BackupMaxDaysDir");
if ($BackupMaxDaysDir == null) {
$BackupMaxDaysDir = "/home/logrotate_backup";
}
$BackupSquidLogsUseNas = $sock->GET_INFO("BackupSquidLogsUseNas");
$BackupSquidLogsNASIpaddr = $sock->GET_INFO("BackupSquidLogsNASIpaddr");
$BackupSquidLogsNASFolder = $sock->GET_INFO("BackupSquidLogsNASFolder");
$BackupSquidLogsNASUser = $sock->GET_INFO("BackupSquidLogsNASUser");
$BackupSquidLogsNASPassword = $sock->GET_INFO("BackupSquidLogsNASPassword");
if (!is_numeric($BackupSquidLogsUseNas)) {
$BackupSquidLogsUseNas = 0;
}
if (!is_numeric($BackupMaxDays)) {
$BackupMaxDays = 30;
}
$MySQLSyslogType = $sock->GET_INFO("MySQLSyslogType");
if (!is_numeric($MySQLSyslogType)) {
$MySQLSyslogType = 1;
}
$boot->set_field("BackupMaxDays", "{max_day_in_database}", $BackupMaxDays, array("TOOLTIP" => "{syslog_max_day_in_database_explain}"));
$boot->set_field("BackupMaxDaysDir", "{backup_folder}", $BackupMaxDaysDir, array("BROWSE" => true, "TOOLTIP" => "{syslog_backup_folder_explain}"));
$boot->set_spacertitle("{NAS_storage}");
$boot->set_checkbox("BackupSquidLogsUseNas", "{use_remote_nas}", $BackupSquidLogsUseNas, array("TOOLTIP" => "{BackupSquidLogsUseNas_explain}", "LINK" => "BackupSquidLogsNASIpaddr,BackupSquidLogsNASFolder,BackupSquidLogsNASUser,BackupSquidLogsNASPassword"));
$boot->set_field("BackupSquidLogsNASIpaddr", "{hostname}", $BackupSquidLogsNASIpaddr);
$boot->set_field("BackupSquidLogsNASFolder", "{shared_folder}", $BackupSquidLogsNASFolder, array("ENCODE" => true));
$boot->set_field("BackupSquidLogsNASUser", "{username}", $BackupSquidLogsNASUser, array("ENCODE" => true));
$boot->set_fieldpassword("BackupSquidLogsNASPassword", "{password}", $BackupSquidLogsNASPassword, array("ENCODE" => true));
$boot->set_button("{apply}");
if ($MySQLSyslogType != 1) {
$boot->set_spacerexplain("{MySQLSyslogTypediff_explain}");
$boot->set_form_locked();
}
if (!$users->AsSquidAdministrator) {
$boot->set_form_locked();
}
$t = time();
$page = CurrentPageName();
echo $boot->Compile() . "<hr>\n\t<div id='{$t}'></div>\n\t<script>\n\t\tLoadAjax('{$t}','{$page}?mysql-syslogs-status=yes');\n\t</script>\t\t\n\t";
}
示例7: virtip_popup
function virtip_popup()
{
$boot = new boostrap_form();
$sock = new sockets();
$users = new usersMenus();
$ldap = new clladp();
$ID = $_GET["ID"];
$title_button = "{add}";
$nics = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes")));
if ($_GET["ID"] > 0) {
$sql = "SELECT * FROM nics_virtuals WHERE ID='{$ID}'";
$q = new mysql();
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
$title_button = "{apply}";
}
$ous = $ldap->hash_get_ou(true);
$ous["openvpn_service"] = "{APP_OPENVPN}";
while (list($num, $val) = each($nics)) {
$nics_array[$val] = $val;
}
$nics_array[null] = "{select}";
$ous[null] = "{select}";
$boot->set_list("nic", "{nic}", $nics_array, $ligne["nic"]);
$boot->set_list("org", "{organization}", $ous, $ligne["org"]);
$boot->set_field("ipaddr", "{tcp_address}", $ligne["ipaddr"], array("IPV4" => true));
$boot->set_field("netmask", "{netmask}", $ligne["netmask"], array("IPV4" => true));
$boot->set_field("cdir", "CDIR", $ligne["cdir"], array("CDIR" => "ipaddr,netmask"));
$boot->set_field("gateway", "{gateway}", $ligne["gateway"], array("IPV4" => true));
$boot->set_field("metric", "{metric}", $ligne["metric"]);
$boot->set_hidden("ID", $_GET["ID"]);
$boot->set_checkbox("ForceGateway", "{ForceGateway}", $ligne["ForceGateway"]);
if (!$users->AsSystemAdministrator) {
$boot->set_form_locked();
}
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin2");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例8: section_ports
function section_ports()
{
$boot = new boostrap_form();
$sock = new sockets();
$squid = new squidbee();
$tpl = new templates();
$sock = new sockets();
$arrayParams = unserialize(base64_decode($sock->getFrameWork("squid.php?compile-list=yes")));
$SSL = 1;
if (!isset($arrayParams["--enable-ssl"])) {
echo $tpl->_ENGINE_parse_body("<p class=text-error>{SSL_NOT_COMPILED}</p>");
}
$KernelSendRedirects = $sock->GET_INFO("KernelSendRedirects");
$SquidTransparentMixed = $sock->GET_INFO("SquidTransparentMixed");
$SQUIDEnable = $sock->GET_INFO("SQUIDEnable");
if (!is_numeric($KernelSendRedirects)) {
$KernelSendRedirects = 1;
}
if (!is_numeric($SquidTransparentMixed)) {
$SquidTransparentMixed = 0;
}
if (!is_numeric($SQUIDEnable)) {
$SQUIDEnable = 1;
}
$sql = "SELECT CommonName FROM sslcertificates ORDER BY CommonName";
$q = new mysql();
$sslcertificates[null] = "{select}";
$results = $q->QUERY_SQL($sql, 'artica_backup');
while ($ligneZ = mysql_fetch_array($results, MYSQL_ASSOC)) {
$sslcertificates[$ligneZ["CommonName"]] = $ligneZ["CommonName"];
}
$boot->set_formtitle("{behavior}");
$boot->set_checkbox("SQUIDEnable", "{enable_squid_service}", $SQUIDEnable, array("TOOLIP" => "{enable_squid_service_explain}", "DISABLEALL" => true));
$boot->set_field("visible_hostname", "{visible_hostname}", $squid->visible_hostname, array("TOOLIP" => "{visible_hostname_text}"));
$boot->set_checkbox("hasProxyTransparent", "{transparent_mode}", $squid->hasProxyTransparent, array("TOOLIP" => "{transparent_mode_text}", "LINK" => "SquidTransparentMixed,KernelSendRedirects"));
$boot->set_checkbox("SquidTransparentMixed", "{SquidTransparentMixed}", $SquidTransparentMixed, array("TOOLIP" => "{SquidTransparentMixed_text}"));
$boot->set_checkbox("KernelSendRedirects", "{KernelSendRedirects}", $KernelSendRedirects, array("TOOLIP" => "{KernelSendRedirects_explain}"));
$boot->set_spacertitle("{listen_ports}");
$boot->set_spacerexplain("{listen_port_text}");
$boot->set_field("listen_port", "HTTP", $squid->listen_port);
$boot->set_field("second_listen_port", "HTTP (2)", $squid->second_listen_port, array("TOOLTIP" => "{squid_second_port_explain}"));
$boot->set_field("ssl_port", "HTTPS", $squid->ssl_port, array("TOOLTIP" => "{squid_ssl_port_explain}"));
$boot->set_list("certificate_center", "{certificate}", $sslcertificates, $squid->certificate_center);
$boot->set_field("icp_port", "{icp_port}", $squid->ICP_PORT, array("TOOLTIP" => "{icp_port_explain}"));
$boot->set_field("htcp_port", "{htcp_port}", $squid->HTCP_PORT, array("TOOLTIP" => "{htcp_port_explain}"));
$boot->set_button("{apply}");
$users = new usersMenus();
if (!$users->AsSquidAdministrator) {
$boot->set_form_locked();
}
echo $boot->Compile();
}
示例9: subrules_popup
function subrules_popup()
{
$ruleid = $_GET["rule-id"];
$ID = $_GET["subrule"];
$users = new usersMenus();
$page = CurrentPageName();
$tpl = new templates();
$t = time();
$buttonname = "{add}";
$boot = new boostrap_form();
if ($ID > 0) {
$q = new mysql();
$sql = "SELECT * FROM iproute_rules WHERE ID={$ID}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
$title = $tpl->_ENGINE_parse_body("{$ID}::{$ligne["src"]} - {$ligne["destination"]}");
$buttonname = "{apply}";
} else {
$boot->set_CloseYahoo("YahooWin3");
}
if (!is_numeric($ligne["enable"])) {
$ligne["enable"] = 1;
}
$boot->set_formtitle($title);
$boot->set_formdescription("{iprules_explain}");
$boot->set_hidden("subruleid", $ID);
$boot->set_hidden("ruleid", $ruleid);
$boot->set_field("src", "{source}", $ligne["source"]);
$boot->set_field("destination", "{destination}", $ligne["destination"]);
$boot->set_field("priority", "{priority}", $ligne["priority"]);
$boot->set_checkbox("enable", "{enabled}", $ligne["enable"]);
$users = new usersMenus();
if (!$users->AsSystemAdministrator) {
$boot->set_form_locked();
}
$boot->set_button($buttonname);
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例10: cache_popup
function cache_popup()
{
$tpl = new templates();
$page = CurrentPageName();
$servername = $_GET["servername"];
$q = new mysql_squid_builder();
$title = "{new_cache}";
$bt = "{add}";
$ID = $_GET["ID"];
$boot = new boostrap_form();
$sock = new sockets();
$NginxProxyStorePath = $sock->GET_INFO("NginxProxyStorePath");
if ($NginxProxyStorePath == null) {
$NginxProxyStorePath = "/home/nginx";
}
if ($ID > 0) {
$q = new mysql_squid_builder();
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_caches WHERE ID='{$ID}'"));
$bt = "{apply}";
$title = "{$ligne["keys_zone"]}";
}
if ($ligne["keys_zone"] == null) {
$ligne["keys_zone"] = time();
}
if (trim($ligne["directory"]) == null) {
$ligne["directory"] = $NginxProxyStorePath . "/{$ligne["keys_zone"]}";
}
if ($ligne["levels"] == null) {
$ligne["levels"] = "1:2";
}
if (!is_numeric($ligne["keys_zone_size"])) {
$ligne["keys_zone_size"] = 1;
}
if (!is_numeric($ligne["max_size"])) {
$ligne["max_size"] = 2;
}
if (!is_numeric($ligne["inactive"])) {
$ligne["inactive"] = 10;
}
if (!is_numeric($ligne["loader_files"])) {
$ligne["loader_files"] = 100;
}
if (!is_numeric($ligne["loader_sleep"])) {
$ligne["loader_sleep"] = 10;
}
if (!is_numeric($ligne["loader_threshold"])) {
$ligne["loader_threshold"] = 100;
}
$boot->set_hidden("ID", $ID);
$boot->set_formtitle($title);
$boot->set_field("keys_zone", "{name}", $ligne["keys_zone"]);
$boot->set_field("directory", "{directory}", $ligne["directory"], array("BROWSE" => true, "MANDATORY" => true, "ENCODE" => true));
$boot->set_field("levels", "{levels}", $ligne["levels"]);
$boot->set_field("keys_zone_size", "{memory_size} (MB)", $ligne["keys_zone_size"]);
$boot->set_field("max_size", "{max_size} (GB)", $ligne["max_size"]);
$boot->set_field("inactive", "{inactive} ({minutes})", $ligne["inactive"], array("TOOLTIP" => "{nginx_inactive_explain}"));
$boot->set_field("loader_files", "{loader_files}", $ligne["loader_files"]);
$boot->set_field("loader_sleep", "{loader_sleep} {milliseconds}", $ligne["loader_sleep"]);
$boot->set_field("loader_threshold", "{loader_threshold} {milliseconds}", $ligne["loader_threshold"]);
$boot->set_button($bt);
if ($servername == null) {
$boot->set_CloseYahoo("YahooWin");
}
$boot->set_RefreshSearchs();
if (!AdminPrivs()) {
$boot->set_form_locked();
}
echo $boot->Compile();
}
示例11: service
//.........这里部分代码省略.........
}
if (!is_numeric($datas["url-lookup-result-when-fatal-error"])) {
$datas["url-lookup-result-when-fatal-error"] = 1;
}
if (!is_numeric($datas["check-proxy-tunnel"])) {
$datas["check-proxy-tunnel"] = 1;
}
if (!is_numeric($datas["strip-domain-from-username"])) {
$datas["strip-domain-from-username"] = 0;
}
if (!is_numeric($datas["refreshuserlist"])) {
$datas["refreshuserlist"] = 15;
}
if (!is_numeric($datas["refreshdomainlist"])) {
$datas["refreshdomainlist"] = 15;
}
if (!is_numeric($EnableUfdbGuard)) {
$EnableUfdbGuard = 0;
}
if (!is_numeric($UfdbDatabasesInMemory)) {
$UfdbDatabasesInMemory = 0;
}
if (!is_numeric($datas["allow-unknown-protocol-over-https"])) {
$datas["allow-unknown-protocol-over-https"] = 1;
}
if (!isset($datas["tcpsockets"])) {
$datas["tcpsockets"] = 0;
}
if (!isset($datas["listen_addr"])) {
$datas["listen_addr"] = "all";
}
if (!isset($datas["listen_port"])) {
$datas["listen_port"] = "3977";
}
if ($datas["listen_addr"] == null) {
$datas["listen_addr"] = "all";
}
if (!is_numeric($datas["listen_port"])) {
$datas["listen_port"] = "3977";
}
if (!is_numeric($datas["tcpsockets"])) {
$datas["tcpsockets"] = 0;
}
if (!is_numeric($datas["DebugAll"])) {
$datas["DebugAll"] = 0;
}
if (!is_numeric($ufdbguardReloadTTL)) {
$ufdbguardReloadTTL = 10;
}
if (!is_numeric($EnableGoogleSafeSearch)) {
$EnableGoogleSafeSearch = 1;
}
$WEBSTATS_APPLIANCE = 0;
if ($users->WEBSTATS_APPLIANCE) {
$WEBSTATS_APPLIANCE = 1;
$datas["tcpsockets"] = 1;
}
$sys = new networking();
$ips = $sys->ALL_IPS_GET_ARRAY();
if ($users->WEBSTATS_APPLIANCE) {
unset($ips["127.0.0.1"]);
}
$as27 = 0;
if ($squid->IS_27) {
senderrors("{not_supported} SQUID v2.7");
}
$ips["all"] = "{all}";
$boot = new boostrap_form();
$boot->set_spacertitle("{feature}");
$boot->set_checkbox("EnableUfdbGuard", "{EnableUfdbGuard}", "{$EnableUfdbGuard}", array("DISABLEALL" => true));
$boot->set_spacertitle("SSL");
$boot->set_checkbox("enforce-https-with-hostname", "{enforce-https-with-hostname}", $datas["enforce-https-with-hostname"], array("TOOLTIP" => "{UFDBGUARD_SSL_OPTS}"));
$boot->set_checkbox("enforce-https-official-certificate", "{enforce-https-official-certificate}", $datas["enforce-https-official-certificate"]);
$boot->set_checkbox("https-prohibit-insecure-sslv2", "{https-prohibit-insecure-sslv2}", $datas["https-prohibit-insecure-sslv2"]);
$boot->set_checkbox("allow-unknown-protocol-over-https", "{allow-unknown-protocol-over-https}", $datas["allow-unknown-protocol-over-https"]);
$boot->set_checkbox("check-proxy-tunnel", "{check-proxy-tunnel}", $datas["check-proxy-tunnel"]);
$boot->set_spacertitle("{UFDBGUARD_SERVICE_OPTS}");
$boot->set_checkbox("DebugAll", "{verbose_mode}", $datas["DebugAll"]);
$boot->set_checkbox("UfdbDatabasesInMemory", "{UfdbDatabasesInMemory}", $UfdbDatabasesInMemory, array("TOOLTIP" => "{UfdbDatabasesInMemory_explain}"));
$boot->set_field("ufdbguardReloadTTL", "{minimum_reload_interval} {minutes}", $ufdbguardReloadTTL);
$boot->set_checkbox("tcpsockets", "{enable_tcpsockets}", $datas["tcpsockets"], array("LINK" => "listen_addr,listen_port"));
$boot->set_list("listen_addr", "{listen_address}", $ips, $datas["listen_addr"]);
$boot->set_field("listen_port", "{listen_port}", $datas["listen_port"]);
$boot->set_checkbox("EnableGoogleSafeSearch", "{EnableGoogleSafeSearch}", $EnableGoogleSafeSearch);
$boot->set_checkbox("strip-domain-from-username", "{strip-domain-from-username}", $datas["strip-domain-from-username"]);
$boot->set_checkbox("refreshuserlist", "{refreshuserlist} ({minutes})", $datas["refreshuserlist"]);
$boot->set_checkbox("refreshdomainlist", "{refreshdomainlist} ({minutes})", $datas["refreshdomainlist"]);
$boot->set_spacertitle("{ON_ERRORS}");
$boot->set_checkbox("url_rewrite_bypass", "{bypass_iffailed}", $url_rewrite_bypass, array("TOOLTIP" => "{url_rewrite_bypass_explain}"));
$boot->set_checkbox("url-lookup-result-during-database-reload", "{url-lookup-result-during-database-reload}", $datas["url-lookup-result-during-database-reload"]);
$boot->set_checkbox("url-lookup-result-when-fatal-error", "{url-lookup-result-when-fatal-error}", $datas["url-lookup-result-when-fatal-error"]);
$boot->set_button("{apply}");
$users = new usersMenus();
if (!$users->AsDansGuardianAdministrator) {
$boot->set_form_locked();
}
$form = $boot->Compile();
$html = "<table style='width:100%'>\n\t<tr>\n\t\t<td style='vertical-align:top;width:400px'>\n\t\t\t<div id='{$t}'></div>\n\t\t\t<div style='text-aling:right'>" . imgtootltip("refresh-32.png", null, "LoadAjax('{$t}','{$page}?ufdbguard-status=yes');") . "</div>\n\t\t\t</td>\n\t\t<td style='vertical-align:top;padding-left:20px'>{$form}</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\tLoadAjax('{$t}','{$page}?ufdbguard-status=yes');\n\t</script>\n\t\t\t\n\t";
echo $html;
}
示例12: license
function license()
{
$boot = new boostrap_form();
$sock = new sockets();
$page = CurrentPageName();
$tpl = new templates();
$users = new usersMenus();
$uuid = base64_decode($sock->getFrameWork("cmd.php?system-unique-id=yes"));
$LicenseInfos = unserialize(base64_decode($sock->GET_INFO("LicenseInfos")));
$WizardSavedSettings = unserialize(base64_decode($sock->GET_INFO("WizardSavedSettings")));
if ($LicenseInfos["COMPANY"] == null) {
$LicenseInfos["COMPANY"] = $WizardSavedSettings["company_name"];
}
if ($LicenseInfos["EMAIL"] == null) {
$LicenseInfos["EMAIL"] = $WizardSavedSettings["mail"];
}
if (!is_numeric($LicenseInfos["EMPLOYEES"])) {
$LicenseInfos["EMPLOYEES"] = $WizardSavedSettings["employees"];
}
$t = time();
$ASWEB = false;
if ($users->SQUID_INSTALLED) {
$ASWEB = true;
}
if ($users->WEBSTATS_APPLIANCE) {
$ASWEB = true;
}
$lastupdate = "<p><strong>{license_status}:</strong> {$LicenseInfos["license_status"]}</p>\n\t<p><strong>{uuid}:</strong> {$uuid}</p>\n\t<p><strong>{license_number}:</strong> {$LicenseInfos["license_number"]}</p>\n\t\n\t";
if (!$users->CORP_LICENSE) {
$exp1 = "{CORP_LICENSE_EXPLAIN}\n\t\t<div style='font-size:16px;font-weight:bold'>{price_quote}:</div>\n\t\t\t<div>\n\t\t\t<a href=\"javascript:blur();\"\n\t\t\t\tOnClick=\"javascript:s_PopUpFull('http://www.proxy-appliance.org/index.php?cID=292','1024','900');\"\n\t\t\t\tstyle=\"font-size:14px;font-weight;bold;text-decoration:underline\">{click_here_price_quote}</a>\n\t\t\t</div>";
}
$boot->set_formtitle("{artica_license} - {$LicenseInfos["license_status"]}");
if ($LicenseInfos["license_status"] == null) {
$exp2 = "<br>{explain_license_free}{$lastupdate}";
$boot->set_formtitle("{artica_license} ({waiting_registration})");
$button_text = "{request_a_quote}/{refresh}";
} else {
$button_text = "{update_the_request}";
$exp2 = "<br>{explain_license_order}{$lastupdate}";
}
if ($users->CORP_LICENSE) {
$exp2 = "{$lastupdate}";
}
$boot->set_formdescription("{$exp1}{$exp2}");
if ($users->CORP_LICENSE) {
$boot->set_form_locked();
}
$boot->set_hidden("REGISTER", 1);
$boot->set_field("COMPANY", "{company}", $LicenseInfos["COMPANY"]);
$boot->set_field("EMAIL", "{your_email_address}", $LicenseInfos["EMAIL"]);
$boot->set_field("EMPLOYEES", "{nb_employees}", $LicenseInfos["EMPLOYEES"]);
$boot->set_field("license_number", "{license_number}", $LicenseInfos["license_number"], array("DISABLED" => true));
if ($LicenseInfos["license_status"] == "{license_active}") {
$users->CORP_LICENSE = true;
$boot->set_hidden("UNLOCKLIC", $LicenseInfos["UNLOCKLIC"]);
} else {
$boot->set_field("UNLOCKLIC", "{unlock_license}", $LicenseInfos["UNLOCKLIC"]);
}
$boot->set_button($button_text);
echo $boot->Compile();
}
示例13: sources_add_group_popup
function sources_add_group_popup()
{
$boot = new boostrap_form();
$sock = new sockets();
$users = new usersMenus();
$ldap = new clladp();
$ID = $_GET["groupid"];
$title_button = "{add}";
$title = "{new_group}";
if ($ID > 0) {
$sql = "SELECT * FROM authenticator_auth WHERE ID='{$ID}'";
$q = new mysql_squid_builder();
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
if (!$q->ok) {
echo "<p class=text-error>{$q->mysql_error}</p>";
}
$title_button = "{apply}";
$title = $ligne["groupname"] . " »» " . $GLOBALS["TYPES"][$ligne["group_type"]];
}
$mainrule = $_GET["mainrule"];
if (!is_numeric($mainrule)) {
$mainrule = 0;
}
$boot->set_formtitle($title);
$boot->set_hidden("rules-sources-add-group-save", "yes");
$boot->set_hidden("mainrule", $mainrule);
$boot->set_hidden("groupid", $ID);
$boot->set_field("groupname", "{groupname}", $ligne["groupname"], array("ENCODE" => true));
$boot->set_checkbox("enabled", "{enabled}", $ligne["enabled"]);
if ($ID == 0) {
$boot->set_list("group_type", "{groupe_type}", $GLOBALS["TYPES"], $ligne["group_type"]);
} else {
$boot->set_hidden("group_type", $ligne["group_type"]);
}
$boot->set_button($title_button);
$AdminPrivs = AdminPrivs();
if (!$AdminPrivs) {
$boot->set_form_locked();
}
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin3");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例14: charter_settings
function charter_settings()
{
$ID = $_GET["ID"];
$users = new usersMenus();
$page = CurrentPageName();
$sock = new sockets();
$boot = new boostrap_form();
$users = new usersMenus();
$title = "Acceptable Use Policy";
$btname = "{add}";
if ($ID > 0) {
$q = new mysql_squid_builder();
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT TextIntro,TextButton,title FROM itcharters WHERE ID='{$ID}'"));
if (!$q->ok) {
echo "<p class=text-error>{$q->mysql_error}</p>";
}
$title = $ligne["title"];
$btname = "{apply}";
}
if ($ligne["TextIntro"] == null) {
$ligne["TextIntro"] = "<p style='font-size:18px'>Please read the IT chart before accessing trough Internet</p>";
}
if ($ligne["TextButton"] == null) {
$ligne["TextButton"] = "I accept the terms and conditions of this agreement";
}
$boot->set_formtitle($title);
$boot->set_hidden("ID", $ID);
$boot->set_field("title", "{page_title}", $title);
$boot->set_textarea("TextIntro", "{introduction_text}", $ligne["TextIntro"], array("ENCODE" => true));
$boot->set_field("TextButton", "{text_button}", $ligne["TextButton"], array("ENCODE" => true));
if (!$users->AsDansGuardianAdministrator) {
$boot->set_form_locked();
}
$boot->set_button($btname);
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin2");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例15: bridge_popup
function bridge_popup()
{
$boot = new boostrap_form();
$sock = new sockets();
$users = new usersMenus();
$ldap = new clladp();
$ID = $_GET["ID"];
$title_button = "{add}";
$nics = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes")));
if ($_GET["ID"] > 0) {
$sql = "SELECT * FROM nics_bridge WHERE ID='{$ID}'";
$q = new mysql();
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
$title_button = "{apply}";
}
$nics_array[null] = "{select}";
$ous[null] = "{select}";
$boot->set_field("name", "{name}", $ligne["name"]);
$boot->set_field("ipaddr", "{tcp_address}", $ligne["ipaddr"], array("IPV4" => true));
$boot->set_field("netmask", "{netmask}", $ligne["netmask"], array("IPV4" => true));
$boot->set_field("cdir", "CDIR", $ligne["cdir"], array("CDIR" => "ipaddr,netmask"));
$boot->set_field("broadcast", "{broadcast}", $ligne["broadcast"], array("IPV4" => true));
$boot->set_field("gateway", "{gateway}", $ligne["gateway"], array("IPV4" => true));
$boot->set_hidden("ID", $_GET["ID"]);
if (!$users->AsSystemAdministrator) {
$boot->set_form_locked();
}
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin2");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}