本文整理汇总了PHP中boostrap_form::set_formdescription方法的典型用法代码示例。如果您正苦于以下问题:PHP boostrap_form::set_formdescription方法的具体用法?PHP boostrap_form::set_formdescription怎么用?PHP boostrap_form::set_formdescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boostrap_form
的用法示例。
在下文中一共展示了boostrap_form::set_formdescription方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parameters
function parameters()
{
$users = new usersMenus();
$sock = new sockets();
if (!$users->HAARP_INSTALLED) {
senderror("{not_installed}");
}
$boot = new boostrap_form();
$EnableHaarp = $sock->GET_INFO("EnableHaarp");
if (!is_numeric($EnableHaarp)) {
$EnableHaarp = 0;
}
$page = CurrentPageName();
$HaarpDebug = $sock->GET_INFO("HaarpDebug");
$HaarpPort = $sock->GET_INFO("HaarpPort");
if (!is_numeric($HaarpPort)) {
$HaarpPort = 0;
}
if (!is_numeric($HaarpDebug)) {
$HaarpDebug = 0;
}
if ($HaarpPort == 0) {
$HaarpPort = rand(35000, 64000);
$sock->SET_INFO("HaarpPort", $HaarpPort);
}
$HaarpConf = unserialize(base64_decode($sock->GET_INFO("HaarpConf")));
$SERVERNUMBER = $HaarpConf["SERVERNUMBER"];
$MAXSERVERS = $HaarpConf["MAXSERVERS"];
if (!is_numeric($SERVERNUMBER)) {
$SERVERNUMBER = "15";
}
if (!is_numeric($MAXSERVERS)) {
$MAXSERVERS = "500";
}
$boot->set_checkbox("EnableHaarp", "{enable}", $EnableHaarp, array("DISABLEALL" => true));
$boot->set_checkbox("HaarpDebug", "{debug}", $HaarpDebug);
$boot->set_field("HaarpPort", "{internal_port}", $HaarpPort);
$boot->set_field("SERVERNUMBER", "{daemons_number}", $SERVERNUMBER);
$boot->set_field("MAXSERVERS", "{max_daemons}", $MAXSERVERS);
$boot->set_formdescription("{APP_HAARP_EXPLAIN}");
$f[] = "SERVERNUMBER 250";
$f[] = "MAXSERVERS 1000";
$boot->set_button("{apply}");
$form = $boot->Compile();
$html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' style='vertical-align:top'><div id='haarp-status'></div>\n\t\t\n\t\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-32.png", null, "LoadAjax('haarp-status','{$page}?srv-status=yes');") . "</div>\n\t\t</td>\n\t\t<td valign='top' style='vertical-align:top;padding-left:15px'>{$form}</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\tLoadAjax('haarp-status','{$page}?srv-status=yes');\t\t\n\t\t\t\n\t</script>";
echo $html;
}
示例2: sources_group_auth_url
function sources_group_auth_url($groupid, $params)
{
$boot = new boostrap_form();
$sock = new sockets();
$users = new usersMenus();
$ldap = new clladp();
$ID = $_GET["groupid"];
$title_button = "{apply}";
$boot->set_formdescription("{redirect_uri_explain}");
$boot->set_hidden("PARAMS_SAVE", "yes");
$boot->set_hidden("groupid", $groupid);
$boot->set_field("URI", "{url}", $params["URI"], array("ENCODE" => true));
$boot->set_button($title_button);
$AdminPrivs = AdminPrivs();
if (!$AdminPrivs) {
$boot->set_form_locked();
}
$boot->set_RefreshSearchs();
return $boot->Compile();
}
示例3: proxy_behavior
function proxy_behavior()
{
$boot = new boostrap_form();
$boot->set_formtitle("{proxy_behavior}");
$boot->set_formdescription("{proxy_behavior_explain}");
$sock = new sockets();
$exclusive_internet_proxy = 1;
$exclusive_reverse_proxy = 0;
$mixed_mode = 0;
$SquidActHasReverse = $sock->GET_INFO("SquidActHasReverse");
$SquidActHasReverseOnly = $sock->GET_INFO("SquidActHasReverseOnly");
if (!is_numeric($SquidActHasReverse)) {
$SquidActHasReverse = 0;
}
if (!is_numeric($SquidActHasReverseOnly)) {
$SquidActHasReverseOnly = 0;
}
if ($SquidActHasReverseOnly == 1) {
$exclusive_internet_proxy = 0;
$exclusive_reverse_proxy = 1;
$mixed_mode = 0;
}
if ($SquidActHasReverseOnly == 0) {
if ($SquidActHasReverse == 1) {
$exclusive_internet_proxy = 0;
$exclusive_reverse_proxy = 0;
$mixed_mode = 1;
}
}
$boot->set_checkbox("exclusive_reverse_proxy", "{exclusive_reverse_proxy}", $exclusive_reverse_proxy);
$boot->set_checkbox("exclusive_internet_proxy", "{exclusive_internet_proxy}", $exclusive_internet_proxy);
$boot->set_checkbox("mixed_mode", "{mixed_mode}", $mixed_mode);
$boot->set_button("{apply}");
echo $boot->Compile();
}
示例4: settings
function settings()
{
$tpl = new templates();
$page = CurrentPageName();
$q = new mysql_catz();
$users = new usersMenus();
$sock = new sockets();
$SquidDBTuningParameters = unserialize(base64_decode($sock->GET_INFO("MySQLCatzParams")));
$query_cache_size = $SquidDBTuningParameters["query_cache_size"];
$max_allowed_packet = $SquidDBTuningParameters["max_allowed_packet"];
$max_connections = $SquidDBTuningParameters["max_connections"];
$connect_timeout = $SquidDBTuningParameters["connect_timeout"];
$interactive_timeout = $SquidDBTuningParameters["interactive_timeout"];
$key_buffer_size = $SquidDBTuningParameters["key_buffer_size"];
$table_open_cache = $SquidDBTuningParameters["table_open_cache"];
$myisam_sort_buffer_size = $SquidDBTuningParameters["myisam_sort_buffer_size"];
$ListenPort = $SquidDBTuningParameters["ListenPort"];
$tmpdir = $SquidDBTuningParameters["tmpdir"];
if (!isset($SquidDBTuningParameters["net_read_timeout"])) {
$SquidDBTuningParameters["net_read_timeout"] = 120;
}
$serverMem = round(($users->MEM_TOTAL_INSTALLEE - 300) / 1024);
$VARIABLES = $q->SHOW_VARIABLES();
if (is_array($SquidDBTuningParameters)) {
while (list($key, $value) = each($SquidDBTuningParameters)) {
if (isset($SquidDBTuningParameters[$key])) {
if ($GLOBALS["VERBOSE"]) {
echo "VARIABLES[{$key}]={$VARIABLES[$key]} MySQLCatzParams[{$key}]={$SquidDBTuningParameters[$key]}<br>\n";
}
if ($VARIABLES[$key] == null) {
$VARIABLES[$key] = $SquidDBTuningParameters[$key];
}
}
}
}
$read_buffer_size = round($VARIABLES["read_buffer_size"] / 1024 / 1000, 2);
$read_rnd_buffer_size = round($VARIABLES["read_rnd_buffer_size"] / 1024 / 1000, 2);
$sort_buffer_size = round($VARIABLES["sort_buffer_size"] / 1024 / 1000, 2);
$thread_stack = round($VARIABLES["thread_stack"] / 1024 / 1000, 2);
$join_buffer_size = round($VARIABLES["join_buffer_size"] / 1024 / 1000, 2);
$max_tmp_table_size = round($VARIABLES["max_tmp_table_size"] / 1024 / 1000, 2);
$innodb_log_buffer_size = round($VARIABLES["innodb_log_buffer_size"] / 1024 / 1000, 2);
$innodb_additional_mem_pool_size = round($VARIABLES["innodb_additional_mem_pool_size"] / 1024 / 1000, 2);
$innodb_log_buffer_size = round($VARIABLES["innodb_log_buffer_size"] / 1024 / 1000, 2);
$innodb_buffer_pool_size = round($VARIABLES["innodb_buffer_pool_size"] / 1024 / 1000, 2);
$max_connections = $VARIABLES["max_connections"];
$per_thread_buffers = $sort_buffer_size + $read_rnd_buffer_size + $sort_buffer_size + $thread_stack + $join_buffer_size;
$total_per_thread_buffers = $per_thread_buffers * $max_connections;
if ($total_per_thread_buffers > $serverMem) {
$color = "#EB0000";
}
$query_cache_size = round($VARIABLES["query_cache_size"] / 1024 / 1000, 2);
$key_buffer_size = round($VARIABLES["key_buffer_size"] / 1024 / 1000, 2);
if ($tmpdir == null) {
$tmpdir = "/tmp";
}
$server_buffers = $key_buffer_size + $max_tmp_table_size + $innodb_buffer_pool_size + $innodb_additional_mem_pool_size + $innodb_log_buffer_size + $query_cache_size;
if ($server_buffers > $serverMem) {
$color = "#EB0000";
}
$max_used_memory = $server_buffers + $total_per_thread_buffers;
if ($max_used_memory > $serverMem) {
$color = "#EB0000";
}
$UNIT = "M";
if ($max_used_memory > 1000) {
$max_used_memory = round($max_used_memory / 1000, 2);
$UNIT = "G";
}
if (!is_numeric($ListenPort)) {
$ListenPort = 0;
}
$boot = new boostrap_form();
$boot->set_hidden("innodb_buffer_pool_size", $innodb_buffer_pool_size);
$boot->set_hidden("innodb_additional_mem_pool_size", $innodb_additional_mem_pool_size);
$boot->set_hidden("innodb_log_buffer_size", $innodb_log_buffer_size);
$boot->set_spacertitle("{threads}:");
$boot->set_field("read_buffer_size", "{read_buffer_size} (MB)", $read_buffer_size, array("TOOLTIP" => "{read_buffer_size_text}"));
$boot->set_field("read_rnd_buffer_size", "{read_rnd_buffer_size} (MB)", $read_rnd_buffer_size, array("TOOLTIP" => "{read_rnd_buffer_size_text}"));
$boot->set_field("sort_buffer_size", "{sort_buffer_size} (MB)", $sort_buffer_size, array("TOOLTIP" => "{sort_buffer_size_text}"));
$boot->set_field("thread_stack", "Thread Stack", $thread_stack, array("TOOLTIP" => "{thread_stack_text}"));
$boot->set_spacertitle("{server}:");
$boot->set_field("ListenPort", "{listen_port}", $ListenPort);
$boot->set_field("tmpdir", "{working_directory}", $tmpdir, array("BUTTON" => array("LABEL" => "{browse}", "JS" => "Loadjs('SambaBrowse.php?no-shares=yes&field=%f&no-hidden=yes')")));
$boot->set_field("net_read_timeout", "{net_read_timeout} ({seconds})", $SquidDBTuningParameters["net_read_timeout"]);
$boot->set_field("max_connections", "{max_connections}", $max_connections);
$boot->set_field("key_buffer_size", "{key_buffer_size} (MB)", $key_buffer_size);
$boot->set_field("max_tmp_table_size", "MAX TMP Table size (MB)", $max_tmp_table_size);
$boot->set_field("query_cache_size", "{query_cache_size} (MB)", $query_cache_size, array("TOOLTIP" => "{thread_stack_text}"));
$boot->set_button("{apply}");
$boot->set_formdescription("{$server_buffers}M + {$total_per_thread_buffers}M = {$max_used_memory}{$UNIT}");
$html = $boot->Compile();
echo $tpl->_ENGINE_parse_body($html);
}
示例5: wbl_popup
function wbl_popup()
{
$page = CurrentPageName();
$q = new amavisdb();
$tpl = new templates();
$t = time();
$type = $_GET["type"];
$boot = new boostrap_form();
$email = $q->email_from_emailid($_GET["rid"]);
$sender = $q->email_from_mailid($_GET["sid"]);
$user = new user($_SESSION["uid"]);
$mails = $user->HASH_ALL_MAILS;
while (list($b, $email) = each($mails)) {
$mailZ[$email] = $email;
}
if ($_GET["sid"] == 0) {
$bt = "{add}";
} else {
$bt = "{apply}";
}
$policy_id = $q->policyid_from_mail($email);
$boot->set_hidden("wbl-type", $type);
$boot->set_list("rcpt", "{email}", $mailZ, $email);
$boot->set_field("sender", "{sender}", $sender, array("MANDATORY" => true));
$boot->set_button($bt);
$boot->set_CallBack("YahooWin2Hide");
$boot->set_RefreshSearchs();
$boot->set_formdescription("{amavis_wblsql_explain}");
echo $boot->Compile();
}
示例6: section_blocked_form
function section_blocked_form()
{
$boot = new boostrap_form();
$q = new mysql_squid_builder();
$ARRAYTABLES = $q->LIST_TABLES_BLOCKED();
while (list($tablename, $none) = each($ARRAYTABLES)) {
$time = $q->TIME_FROM_DAY_TABLE($tablename);
$days[$time] = time_to_date($time);
}
$BLOCKED_CATEGORY_LIMITS[50] = 50;
$BLOCKED_CATEGORY_LIMITS[250] = 250;
$BLOCKED_CATEGORY_LIMITS[500] = 250;
$BLOCKED_CATEGORY_LIMITS[1000] = 1000;
$BLOCKED_CATEGORY_LIMITS[2000] = 2000;
krsort($days);
$boot->set_list("QUERY_BLOCKED_DATE", "{date}", $days, $_SESSION["QUERY_BLOCKED_DATE"]);
$boot->set_field("QUERY_BLOCKED_UID", "{member}", $_SESSION["QUERY_BLOCKED_UID"]);
$boot->set_field("QUERY_BLOCKED_CATEGORY", "{category}", $_SESSION["QUERY_BLOCKED_CATEGORY"]);
$boot->set_list("BLOCKED_CATEGORY_LIMIT", "{rows}", $BLOCKED_CATEGORY_LIMITS, $_SESSION["BLOCKED_CATEGORY_LIMIT"]);
$boot->set_button("{search}");
$boot->set_CloseYahoo("YahooWin2");
$boot->set_formdescription("{advanced_search_explain}");
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例7: wizard_certificate_1
function wizard_certificate_1()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$hostname = $sock->GET_INFO("myhostname");
if ($hostname == null) {
$hostname = $sock->getFrameWork("system.php?hostname-g=yes");
$sock->SET_INFO($hostname, "myhostname");
}
$title = $tpl->_ENGINE_parse_body("{new_certificate}");
$html = "\n\t<div class=text-info style='font-size:18px'>{wizard_certificate_1}<br><i>{CSR_MULTIPLE_EXPLAIN}</i></div>";
$ENC[1024] = 1024;
$ENC[2048] = 2048;
$ENC[4096] = 4096;
$boot = new boostrap_form();
$boot->set_field("wizard-certificate-commonname", "{CommonName}", $hostname);
$boot->set_list("wizard-certificate-levelenc", "{level_encryption}", $ENC, 1024);
$boot->set_fieldpassword("wizard-certificate-password", "{password}", "secret");
$boot->set_formdescription("{wizard_certificate_1}");
$boot->set_button("{add}");
$boot->set_RefreshSearchs();
$boot->set_RefreshFlex("flexRT{$_GET["t"]}");
$boot->set_CloseYahoo("YahooWin6");
echo $boot->Compile();
}
示例8: firewall_popup
function firewall_popup()
{
$ID = $_GET["ID"];
$q = new mysql_squid_builder();
$bt = "{apply}";
$servername = $_GET["servername"];
if (!$q->TABLE_EXISTS("nginx_exploits_fw")) {
$sql = "CREATE TABLE IF NOT EXISTS `nginx_exploits_fw` (\n\t\t`servername` CHAR(255) NOT NULL PRIMARY KEY,\n\t\t`maxaccess` smallint(1) NOT NULL DEFAULT 0,\n\t\t`sendlogs` smallint(1) NOT NULL DEFAULT 0,\n\t\tKEY `maxaccess` (`maxaccess`),\n\t\tKEY `sendlogs` (`sendlogs`)\n\t\t) ENGINE = MYISAM;";
if (!$q->QUERY_SQL($sql)) {
echo $q->mysql_error_html();
}
}
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_exploits_fw WHERE servername='{$servername}'"));
if (!is_numeric($ligne["maxaccess"])) {
$ligne["maxaccess"] = 0;
}
$boot = new boostrap_form();
$sock = new sockets();
$boot->set_hidden("servername", $_GET["servername"]);
$boot->set_hidden("firewall", $_GET["servername"]);
$boot->set_formtitle("{firewall}");
$boot->set_formdescription("{NGINX_FW_EXPLAIN}");
$boot->set_field("maxaccess", "{MAX_EVENTS}", $ligne["maxaccess"], array("TOOLTIP" => "{NGINX_MAXACCESS_FW_EXPLAIN}"));
$boot->set_checkbox("sendlogs", "{write_logs}", $ligne["sendlogs"]);
$boot->set_button($bt);
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin4");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例9: settings_retention
function settings_retention()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$users = new usersMenus();
if ($users->CORP_LICENSE) {
$LICENSE = 1;
} else {
$LICENSE = 0;
}
$ArticaProxyStatisticsBackupFolder = $sock->GET_INFO("ArticaProxyStatisticsBackupFolder");
$ArticaProxyStatisticsBackupDays = $sock->GET_INFO("ArticaProxyStatisticsBackupDays");
$ArticaProxyStatisticsBackHourTables = $sock->GET_INFO("ArticaProxyStatisticsBackHourTables");
if (!is_numeric($ArticaProxyStatisticsBackHourTables)) {
$ArticaProxyStatisticsBackHourTables = 1;
}
if ($ArticaProxyStatisticsBackupFolder == null) {
$ArticaProxyStatisticsBackupFolder = "/home/artica/squid/backup-statistics";
}
$q = new mysql_squid_builder();
if (!is_numeric($ArticaProxyStatisticsBackupDays)) {
$ArticaProxyStatisticsBackupDays = 90;
}
if (!$users->CORP_LICENSE) {
$error = "<p class=text-error>{this_feature_is_disabled_corp_license}</p>";
$ArticaProxyStatisticsBackupDays = 5;
}
$t = time();
$new_schedule = $tpl->javascript_parse_text("{new_schedule}");
$EnableSquidRemoteMySQL = $sock->GET_INFO("EnableSquidRemoteMySQL");
if (!is_numeric($EnableSquidRemoteMySQL)) {
$EnableSquidRemoteMySQL = 0;
}
if ($EnableSquidRemoteMySQL == 1) {
$EnableSquidRemoteMySQL_text = "{EnableSquidRemoteMySQL_text}";
}
$lock = false;
$boot = new boostrap_form();
$boot->set_formdescription($EnableSquidRemoteMySQL_text . "<br>{purge_statistics_database_explain2}");
$boot->set_checkbox("ArticaProxyStatisticsBackHourTables", "{backup_hourly_tables}", $ArticaProxyStatisticsBackHourTables, array("TOOLTIP" => "{backup_hourly_tables_explain}"));
$boot->set_field("ArticaProxyStatisticsBackupFolder", "{backup_folder}", $ArticaProxyStatisticsBackupFolder, array("BROWSE" => true));
$boot->set_field("ArticaProxyStatisticsBackupDays", "{max_days}", $ArticaProxyStatisticsBackupDays);
$BackupSquidStatsUseNas = $sock->GET_INFO("BackupSquidStatsUseNas");
$BackupSquidStatsNASIpaddr = $sock->GET_INFO("BackupSquidStatsNASIpaddr");
$BackupSquidStatsNASFolder = $sock->GET_INFO("BackupSquidStatsNASFolder");
$BackupSquidStatsNASUser = $sock->GET_INFO("BackupSquidStatsNASUser");
$BackupSquidStatsNASPassword = $sock->GET_INFO("BackupSquidStatsNASPassword");
$BackupSquidStatsNASRetry = $sock->GET_INFO("BackupSquidStatsNASRetry");
if (!is_numeric($BackupSquidStatsUseNas)) {
$BackupSquidStatsUseNas = 0;
}
if (!is_numeric($BackupSquidStatsNASRetry)) {
$BackupSquidStatsNASRetry = 0;
}
$boot->set_spacertitle("{NAS_storage}");
$boot->set_checkbox("BackupSquidStatsUseNas", "{use_remote_nas}", $BackupSquidStatsUseNas, array("TOOLTIP" => "{BackupSquidStatsUseNas_explain}", "LINK" => "BackupSquidStatsNASIpaddr,BackupSquidStatsNASFolder,BackupSquidStatsNASUser,BackupSquidStatsNASPassword"));
$boot->set_field("BackupSquidStatsNASIpaddr", "{hostname}", $BackupSquidStatsNASIpaddr);
$boot->set_field("BackupSquidStatsNASFolder", "{shared_folder}", $BackupSquidStatsNASFolder, array("ENCODE" => true));
$boot->set_field("BackupSquidStatsNASUser", "{username}", $BackupSquidStatsNASUser, array("ENCODE" => true));
$boot->set_fieldpassword("BackupSquidStatsNASPassword", "{password}", $BackupSquidStatsNASPassword, array("ENCODE" => true));
$boot->set_checkbox("BackupSquidStatsNASRetry", "{retry}", $BackupSquidStatsNASRetry, array("TOOLTIP" => "{BackupSquidLogsNASRetry_explain}"));
$boot->set_button("{apply}");
$boot->set_formtitle("{purge_statistics_database}");
if (!$users->CORP_LICENSE) {
$boot->set_form_locked();
$lock = true;
}
if ($EnableSquidRemoteMySQL == 1) {
$boot->set_form_locked();
$lock = true;
}
$new_schedule = $tpl->javascript_parse_text("{new_schedule}");
if (!$lock) {
$boot->set_Newbutton("{new_schedule}", "YahooWin3('650','squid.databases.schedules.php?AddNewSchedule-popup=yes&ID=0&t={$t}&ForceType=47&YahooWin=3&jsback=ReloadSchedules{$t}','{$new_schedule}')");
$ReloadSchedules = "ReloadSchedules{$t}()";
}
$boot->set_Newbutton("{test_connection}", "Loadjs('{$page}?test-nas-js=yes')");
$form = $boot->Compile();
$html = "\n\n\t\t<div id='title-{$t}'></div>\n\t\t{$error}\n\t\t{$form}\n\t\t<div id='schedules-{$t}'></div>\n\n\t\t<script>\n\t\tfunction ReloadSchedules{$t}(){\n\t\tLoadAjax('schedules-{$t}','squid.artica.statistics.purge.php?schedules=yes');\n}\n\nfunction RefreshTableTitle{$t}(){\nLoadAjaxTiny('title-{$t}','squid.artica.statistics.purge.php?title=yes&t={$t}');\n}\nRefreshTableTitle{$t}();\n{$ReloadSchedules};\n</script>\n\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例10: tasks_popup
function tasks_popup()
{
$page = CurrentPageName();
$tpl = new templates();
$users = new usersMenus();
$tasks = new system_tasks();
$PatternToHuman = null;
$boot = new boostrap_form();
$q = new mysql();
$no_schedule_set = $tpl->javascript_parse_text("{no_schedule_set}");
$buttontext = "{add}";
$ID = $_GET["ID"];
$t = $_GET["t"];
$title = "{new_schedule}";
$task_type = $tasks->tasks_array;
if ($ID > 0) {
$buttontext = "{apply}";
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM system_schedules WHERE ID={$ID}", "artica_backup"));
$ligne["TimeDescription"] = utf8_encode($ligne["TimeDescription"]);
$title = $task_type[$ligne["TaskType"]];
$PatternToHuman = "<br>" . $tasks->PatternToHuman($ligne["TimeText"], true);
}
if (!is_numeric($ligne["TaskType"])) {
$ligne["TaskType"] = 0;
}
if (!is_numeric($ID)) {
$ID = 0;
}
if (!$users->KAV4PROXY_INSTALLED) {
unset($task_type[5]);
unset($task_type[12]);
}
if (!$users->UPDATE_UTILITYV2_INSTALLED) {
unset($task_type[13]);
}
$task_type = $tasks->tasks_array;
while (list($TaskType, $content) = each($task_type)) {
$taskz[$TaskType] = "[{$TaskType}] " . $tpl->_ENGINE_parse_body($content);
}
$YahooWinHide = "YahooWin{$_GET["YahooWin"]}";
$boot->set_formtitle($title);
$boot->set_hidden("ID", $ID);
if ($ID == 0) {
if ($_GET["task-section"] > 0) {
$boot->set_hidden("TaskType", $_GET["task-section"]);
$boot->set_formdescription($tasks->tasks_explain_array[$_GET["task-section"]] . $PatternToHuman);
$ligne["TimeDescription"] = $tpl->javascript_parse_text($tasks->tasks_array[$_GET["task-section"]]);
} else {
$boot->set_list("TaskType", "{type}", $taskz, null);
}
$ligne["enabled"] = 1;
} else {
$boot->set_hidden("TaskType", $ligne["TaskType"]);
$boot->set_formdescription($tasks->tasks_explain_array[$ligne["TaskType"]]);
}
$boot->set_checkbox("enabled", "{enabled}", $ligne["enabled"]);
$boot->set_textarea("TimeDescription", "{description}", $ligne["TimeDescription"], array("ENCODE" => true));
$boot->set_field("TimeText", "{schedule}", $ligne["TimeText"], array("SCHEDULE" => true, "MANDATORY" => true, "DISABLED" => true));
if ($ID == 0) {
$boot->set_CloseYahoo($YahooWinHide);
}
//
$boot->set_button($buttontext);
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例11: settings
function settings()
{
$page = CurrentPageName();
$sock = new sockets();
$MirrorEnableDebian = $sock->GET_INFO("MirrorEnableDebian");
$MirrorDebianDirSizeText = null;
$MirrorDebianBW = $sock->GET_INFO("MirrorDebianBW");
if (!is_numeric($MirrorEnableDebian)) {
$MirrorEnableDebian = 0;
}
if (!is_numeric($MirrorDebianBW)) {
$MirrorDebianBW = 500;
}
$MirrorDebianDir = $sock->GET_INFO("MirrorDebianDir");
if ($MirrorDebianDir == null) {
$MirrorDebianDir = "/home/mirrors/Debian";
}
$MirrorDebianDirSize = $sock->GET_INFO("MirrorDebianDirSize");
if (!is_numeric($MirrorDebianDirSize)) {
$MirrorDebianDirSize = 0;
}
$MirrorDebianMaxExecTime = $sock->GET_INFO("MirrorDebianMaxExecTime");
$MirrorDebianEachMn = $sock->GET_INFO("MirrorDebianEachMn");
if (!is_numeric($MirrorDebianEachMn)) {
$MirrorDebianEachMn = 2880;
}
$MirrorDebianExclude = unserialize(base64_decode($sock->GET_INFO("MirrorDebianExclude")));
$MirrorDebianExcludeOS = unserialize(base64_decode($sock->GET_INFO("MirrorDebianExcludeOS")));
if (!is_numeric($MirrorDebianMaxExecTime)) {
$MirrorDebianMaxExecTime = 0;
}
$MirrorEnableDebianSchedule = $sock->GET_INFO("MirrorEnableDebianSchedule");
if (!is_numeric($MirrorEnableDebianSchedule)) {
$MirrorEnableDebianSchedule = 0;
}
$boot = new boostrap_form();
$timeZ[60] = "1 {hour}";
$timeZ[120] = "2 {hours}";
$timeZ[300] = "5 {hours}";
$timeZ[720] = "12 {hours}";
$timeZ[1440] = "1 {day}";
$timeZ[2880] = "2 {days}";
$timeZ[10080] = "1 {week}";
if ($MirrorDebianDirSize > 0) {
$MirrorDebianDirSizeText = " (" . FormatBytes($MirrorDebianDirSize / 1024) . " )";
}
$boot->set_formdescription("{debian_mirror_howto}<br>{rsync_out_port_explain}");
$boot->set_spacertitle("Debian{$MirrorDebianDirSizeText}");
$boot->set_checkbox("MirrorEnableDebian", "{enable_debian_systems}", $MirrorEnableDebian);
$boot->set_field("MirrorDebianDir", "{directory}{$MirrorDebianDirSizeText}", $MirrorDebianDir, array("ENCODE" => true));
$boot->set_field("MirrorDebianBW", "{max_bandwidth} KB/s", $MirrorDebianBW);
$boot->set_list("MirrorDebianEachMn", "{execute_each}", $timeZ, $MirrorDebianEachMn);
$boot->set_checkbox("MirrorEnableDebianSchedule", "{use_schedule}", $MirrorEnableDebianSchedule, array("TOOLTIP" => "{MirrorEnableDebianSchedule_explain}"));
$boot->set_field("MirrorDebianMaxExecTime", "{max_execution_time} ({minutes})", $MirrorDebianMaxExecTime, array("TOOLTIP" => "{MirrorDebianMaxExecTime_explain}"));
//$boot->set_subtitle("{linux_distribution}");
if (!is_array($MirrorDebianExcludeOS)) {
$MirrorDebianExcludeOS["sid"] = true;
$MirrorDebianExcludeOS["jessie"] = true;
$MirrorDebianExcludeOS["wheezy"] = true;
$MirrorDebianExcludeOS["oldstable"] = true;
$MirrorDebianExcludeOS["stable"] = true;
$MirrorDebianExcludeOS["oldstable"] = true;
$MirrorDebianExcludeOS["unstable"] = true;
}
$DEBVERS[] = "sid";
$DEBVERS[] = "testing";
$DEBVERS[] = "jessie";
$DEBVERS[] = "squeeze";
$DEBVERS[] = "wheezy";
$DEBVERS[] = "oldstable";
$DEBVERS[] = "stable";
$DEBVERS[] = "unstable";
/* while (list ($none, $pattern) = each ($DEBVERS) ){
$enabled=0;
if($MirrorDebianExclude["$pattern"]==1){$enabled=1;}
$boot->set_checkbox("debian-exclude-$pattern","{exclude}: «$pattern»",$enabled);
}
*/
$boot->set_subtitle("{architecture}");
$f = array();
$f[] = "source";
$f[] = "alpha";
$f[] = "amd64";
$f[] = "arm";
$f[] = "armel";
$f[] = "armhf";
$f[] = "hppa";
$f[] = "hurd-i386";
$f[] = "i386";
$f[] = "ia64";
$f[] = "mips";
$f[] = "mipsel";
$f[] = "powerpc";
$f[] = "s390";
$f[] = "s390x";
$f[] = "sparc";
$f[] = "kfreebsd-i386";
$f[] = "kfreebsd-amd64";
if (!is_array($MirrorDebianExclude)) {
//.........这里部分代码省略.........
示例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: parent_import_popup
function parent_import_popup()
{
$tpl = new templates();
$page = CurrentPageName();
$boot = new boostrap_form();
$array_type["parent"] = "parent";
$array_type["sibling"] = "sibling";
$array_type["multicast"] = "multicast";
$btname = "{import}";
$boot->set_formtitle("{import}");
$boot->set_formdescription("{parents_squid_import_explain}");
$boot->set_hidden("import-perform", "yes");
$boot->set_textarea("import-text", "{parents}", null);
$boot->set_list("server_type", "{server_type}", $array_type, "parent", array("TOOLTIP" => "{squid_parent_sibling_how_to}"));
$boot->set_field("options", "{options}", "proxy-only,no-query,round-robin,connect-timeout=7,connect-fail-limit=3,weight=%i");
$boot->set_checkbox("delete_all", "{delete_all}", 0);
$boot->set_button($btname);
$boot->set_RefreshSearchs();
$boot->set_CloseYahoo("YahooWin5");
echo $boot->Compile();
}
示例14: settings
function settings()
{
$schedules = new system_tasks();
$q = new mysql_squid_builder();
$tpl = new templates();
$buttontext = "{apply}";
$ID = $_GET["ID"];
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM webfilters_schedules WHERE ID={$ID}"));
$ligne["TimeDescription"] = utf8_encode($ligne["TimeDescription"]);
$TimeText = $tpl->_ENGINE_parse_body($schedules->PatternToHuman($ligne["TimeText"]));
$TimeText = str_replace("<br>", "", $TimeText);
$explain = $tpl->_ENGINE_parse_body($q->tasks_explain_array[$ligne["TaskType"]]);
$boot = new boostrap_form();
$boot->set_hidden("ID", $ID);
$boot->set_checkbox("enabled", "{enabled}", $ligne["enabled"]);
$boot->set_field("TimeDescription", "{description}", $ligne["TimeDescription"], array("ENCODE" => TRUE));
$boot->set_button("{apply}");
$boot->set_formtitle("{task} {$ligne["ID"]}");
$runtask = $tpl->_ENGINE_parse_body("<div style='text-align:right'><i class='icon-play'></i> <a href=\"javascript:Blurz();\" OnClick=\"javascript:Loadjs('miniadm.ajax.squid.schedules.php?schedule-run-js=yes&ID={$ID}');\">{run} {task}</div>");
$boot->set_formdescription("{$explain}<br>{$TimeText}{$runtask}");
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例15: wizard_popup
function wizard_popup()
{
$boot = new boostrap_form();
$tpl = new templates();
$ID = $_GET["ID"];
$sock = new sockets();
$ApacheDisableModDavFS = $sock->GET_INFO("ApacheDisableModDavFS");
if (!is_numeric($ApacheDisableModDavFS)) {
$ApacheDisableModDavFS = 0;
}
$users = new usersMenus();
$q = new mysql();
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT maxsize FROM storage_containers WHERE `groupid`='" . mysql_escape_string2($_GET["gpid"]) . "'", "artica_backup"));
$maxsize = $ligne["maxsize"];
if ($maxsize == 0) {
$maxsizeText = $tpl->_ENGINE_parse_body("{unlimited} ");
} else {
$maxsizeText = $maxsize;
}
if ($maxsize > 0) {
if ($ID == 0) {
$uidenc = mysql_escape_string2($_SESSION["uid"]);
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT SUM(container_size) as tSize FROM users_containers WHERE `uid`='{$uidenc}'", "artica_backup"));
$tSize = $ligne["tSize"];
if ($tSize >= $maxsize) {
senderror("{error_quota_exceed}");
}
}
}
$ligne = array();
if ($ID > 0) {
$q = new mysql();
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM users_containers WHERE `container_id`='{$ID}'", "artica_backup"));
$boot->set_formtitle("{$ligne["container_name"]} ({$ligne["container_size"]}MB)");
}
if ($ligne["container_name"] == null) {
$ligne["container_name"] = $tpl->_ENGINE_parse_body("{new_container}");
}
if ($maxsize > 0) {
if (!is_numeric($ligne["container_size"])) {
$ligne["container_size"] = $maxsize;
}
}
$new_container_user_explain = $tpl->_ENGINE_parse_body("{new_container_user_explain}");
$new_container_user_explain = str_replace("%S", $maxsize, $new_container_user_explain);
if ($ID == 0) {
$boot->set_formdescription($new_container_user_explain);
}
$boot->set_hidden("gpid", $_GET["gpid"]);
$boot->set_hidden("ID", $_GET["ID"]);
$boot->set_field("container_name", "{container_name}", $ligne["container_name"], array("ENCODE" => true));
if ($ID == 0) {
$boot->set_field("container_size", "{container_size}", $ligne["container_size"], array("TOOLTIP" => "{container_size_explain}"));
} else {
$boot->set_hidden("container_size", $ligne["container_size"]);
}
$webdav_creds = unserialize(base64_decode($ligne["webdav_creds"]));
if ($webdav_creds["username"] == null) {
$webdav_creds["username"] = $_SESSION["uid"];
}
if ($ApacheDisableModDavFS == 0) {
$boot->set_checkbox("webdav", "{http_sharing}", $ligne["webdav"], array("TOOLTIP" => "{container_http_sharing_explain}"));
}
if ($users->ISCSI_INSTALLED) {
if (!is_numeric($ligne["iscsid"])) {
$ligne["iscsid"] = 0;
}
$boot->set_checkbox("iscsid", "{network_disk}", $ligne["iscsid"], array("TOOLTIP" => "{container_iscsid_sharing_explain}"));
}
$lengthpass = strlen($webdav_creds["password"]);
$boot->set_field("webdav_username", "{username}", $webdav_creds["username"], array("ENCODED" => true));
$boot->set_fieldpassword("webdav_password", "{password} ({$lengthpass} chars)", $webdav_creds["password"], array("ENCODED" => true));
if ($ID == 0) {
$boot->set_button("{create}");
} else {
$boot->set_button("{apply}");
}
$boot->set_RefreshSearchs();
$boot->set_RefreshSearchsForced();
echo $boot->Compile();
}