当前位置: 首页>>代码示例>>PHP>>正文


PHP boostrap_form::set_checkbox方法代码示例

本文整理汇总了PHP中boostrap_form::set_checkbox方法的典型用法代码示例。如果您正苦于以下问题:PHP boostrap_form::set_checkbox方法的具体用法?PHP boostrap_form::set_checkbox怎么用?PHP boostrap_form::set_checkbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在boostrap_form的用法示例。


在下文中一共展示了boostrap_form::set_checkbox方法的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();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:25,代码来源:miniadm.ucarp.php

示例2: 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();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:40,代码来源:miniadm.network.virtips.php

示例3: 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);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:82,代码来源:miniadm.squiddb.php

示例4: websites_popup_webserver_replace_popup

function websites_popup_webserver_replace_popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $servername = $_GET["servername"];
    $q = new mysql_squid_builder();
    $title = "{new_rule}";
    $bt = "{add}";
    $ID = $_GET["replaceid"];
    $boot = new boostrap_form();
    $sock = new sockets();
    $servername = $_GET["servername"];
    if ($ID > 0) {
        $q = new mysql_squid_builder();
        $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_replace_www WHERE ID='{$ID}'"));
        $bt = "{apply}";
        $title = "{$ligne["rulename"]}";
        $ligne["stringtosearch"] = stripslashes($ligne["stringtosearch"]);
        $ligne["replaceby"] = stripslashes($ligne["replaceby"]);
        $servername = $ligne["servername"];
    }
    if ($ligne["tokens"] == null) {
        $ligne["tokens"] = "g";
    }
    if ($ligne["rulename"] == null) {
        $ligne["rulename"] = time();
    }
    $boot->set_hidden("replaceid", $ID);
    $boot->set_hidden("servername", $servername);
    $boot->set_formtitle($title);
    $boot->set_field("rulename", "{name}", $ligne["rulename"]);
    $boot->set_field("zorder", "{order}", $ligne["zorder"]);
    $boot->set_spacertitle("{search}");
    $boot->set_textarea("stringtosearch", "{search}", $ligne["stringtosearch"], array("MANDATORY" => true, "ENCODE" => true));
    $boot->set_checkbox("AsRegex", "{regex}", $ligne["AsRegex"], array("TOOLTIP" => "{replace_regex_explain}"));
    $boot->set_spacertitle("{replace}");
    $boot->set_textarea("replaceby", "{replace}", $ligne["replaceby"], array("MANDATORY" => true, "ENCODE" => true));
    $boot->set_field("tokens", "{flags}", $ligne["tokens"], array("MANDATORY" => true));
    $boot->set_button($bt);
    if ($ID == 0) {
        $boot->set_CloseYahoo("YahooWin3");
    }
    $boot->set_RefreshSearchs();
    $boot->set_formdescription("{nginx_subst_explain}");
    echo $boot->Compile();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:46,代码来源:miniadmin.proxy.reverse.php

示例5: settings

function settings()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $boot = new boostrap_form();
    $sock = new sockets();
    $tpl = new templates();
    $EnableITChart = $sock->GET_INFO("EnableITChart");
    $ItChartFreeWeb = $sock->GET_INFO("ItChartFreeWeb");
    if (!is_numeric($EnableITChart)) {
        $EnableITChart = 0;
    }
    $q = new mysql_squid_builder();
    $q->CheckTables();
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT COUNT(*) as tcount FROM itcharters"));
    if ($ligne["tcount"] == 0) {
        echo "<p class=text-error>" . $tpl->_ENGINE_parse_body("{ERROR_NO_ITCHART_CREATED}") . "</p>";
    }
    $boot->set_formtitle("{IT_charter}");
    $boot->set_formdescription("{IT_charter_explain}<br>{IT_charter_explain2}");
    $boot->set_checkbox("EnableITChart", "{enable_it_charter}", $EnableITChart);
    $sql = "SELECT servername,UseSSL FROM freeweb WHERE groupware='ERRSQUID'";
    $me = $_SERVER["SERVER_ADDR"] . ":" . $_SERVER["SERVER_PORT"];
    $q = new mysql();
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo "<p class=text-error>{$q->mysql_error}</p>";
    }
    $hash[$me] = $me;
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $servername = $ligne["servername"];
        if ($ligne["UseSSL"] == 1) {
            $servername = $servername . ":443";
        }
        $hash[$servername] = $servername;
    }
    if ($ItChartFreeWeb == null) {
        $sock->SET_INFO("ItChartFreeWeb", $me);
    }
    $boot->set_list("ItChartFreeWeb", "{webserver}", $hash, $ItChartFreeWeb);
    $users = new usersMenus();
    if (!$users->AsDansGuardianAdministrator) {
        $boot->set_form_locked();
    }
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:46,代码来源:miniadmin.proxy.charter.php

示例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";
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:47,代码来源:miniadm.webstats.logrotate.php

示例7: daemon_settings

function daemon_settings()
{
    $t = time();
    $sock = new sockets();
    $ci = new cicap();
    $page = CurrentPageName();
    $CicapEnabled = $sock->GET_INFO("CicapEnabled");
    $EnableClamavInCiCap2 = $sock->GET_INFO("EnableClamavInCiCap2");
    if (!is_numeric($CicapEnabled)) {
        $CicapEnabled = 0;
    }
    $notifyVirHTTPServer = false;
    if ($ci->main_array["CONF"]["ViralatorMode"] == 1) {
        if (preg_match('#https://(.*?)/exec#', $ci->main_array["CONF"]["VirHTTPServer"], $re)) {
            if (trim($re[1]) == null) {
                $notifyVirHTTPServer = true;
            }
            if (trim($re[1]) == "127.0.0.1") {
                $notifyVirHTTPServer = true;
            }
            if (trim($re[1]) == "localhost") {
                $notifyVirHTTPServer = true;
            }
        }
    }
    if ($notifyVirHTTPServer == true) {
        $color = "color:red;font-weight:bolder";
    }
    for ($i = 1; $i < 13; $i++) {
        $f[$i] = $i;
    }
    $boot = new boostrap_form();
    $boot->set_spacertitle("{daemon_settings}");
    $boot->set_checkbox("CicapEnabled", "{enable}", $CicapEnabled, array("DISABLEALL" => true));
    //set_field($field_name,$caption,$value,$params=array()){
    $boot->set_field("Timeout", "{Timeout} ({seconds})", $ci->main_array["CONF"]["Timeout"], array("TOOLTIP" => "{Timeout_text}"));
    $boot->set_field("MaxKeepAliveRequests", "{MaxKeepAliveRequests}", $ci->main_array["CONF"]["Timeout"], array("TOOLTIP" => "{Timeout_text}"));
    $boot->set_field("KeepAliveTimeout", "{KeepAliveTimeout}", $ci->main_array["CONF"]["KeepAliveTimeout"], array("TOOLTIP" => "{KeepAliveTimeout_text}"));
    $boot->set_field("MaxServers", "{MaxServers}", $ci->main_array["CONF"]["MaxServers"], array("TOOLTIP" => "{MaxServers_text}"));
    $boot->set_field("MaxServers", "{MinSpareThreads}", $ci->main_array["CONF"]["MinSpareThreads"], array("TOOLTIP" => "{MinSpareThreads_text}"));
    $boot->set_field("MaxSpareThreads", "{MaxSpareThreads}", $ci->main_array["CONF"]["MaxSpareThreads"], array("TOOLTIP" => "{MaxSpareThreads_text}"));
    $boot->set_field("ThreadsPerChild", "{ThreadsPerChild}", $ci->main_array["CONF"]["ThreadsPerChild"], array("TOOLTIP" => "{ThreadsPerChild_text}"));
    $boot->set_field("MaxRequestsPerChild", "{MaxRequestsPerChild}", $ci->main_array["CONF"]["MaxRequestsPerChild"], array("TOOLTIP" => "{MaxRequestsPerChild_text}"));
    $boot->set_list("DebugLevel", "{debug_mode}", $f, $ci->main_array["CONF"]["DebugLevel"], array("TOOLTIP" => "{MaxRequestsPerChild_text}"));
    $boot->set_checkbox("ViralatorMode", "{ViralatorMode}", $ci->main_array["CONF"]["ViralatorMode"], array("TOOLTIP" => "{ViralatorMode_text}"));
    $boot->set_field("VirSaveDir", "{VirSaveDir}", $ci->main_array["CONF"]["VirSaveDir"], array("TOOLTIP" => "{VirSaveDir_text}"));
    $boot->set_field("VirHTTPServer", "{VirHTTPServer}", $ci->main_array["CONF"]["VirHTTPServer"], array("TOOLTIP" => "{VirHTTPServer_text}"));
    $boot->set_spacertitle("{cicap_title}");
    $boot->set_field("srv_clamav.SendPercentData", "{srv_clamav.SendPercentData} (MB)", $ci->main_array["CONF"]["srv_clamav.SendPercentData"], array("TOOLTIP" => "{srv_clamav.SendPercentData_text}"));
    $boot->set_field("srv_clamav.StartSendPercentDataAfter", "{srv_clamav.StartSendPercentDataAfter} (MB)", $ci->main_array["CONF"]["srv_clamav.StartSendPercentDataAfter"], array("TOOLTIP" => "{srv_clamav.StartSendPercentDataAfter_text}"));
    $boot->set_field("srv_clamav.MaxObjectSize", "{srv_clamav.MaxObjectSize} (MB)", $ci->main_array["CONF"]["srv_clamav.MaxObjectSize"], array("TOOLTIP" => "{srv_clamav.MaxObjectSize_text}"));
    $boot->set_field("srv_clamav.ClamAvMaxFilesInArchive", "{srv_clamav.ClamAvMaxFilesInArchive} {files}", $ci->main_array["CONF"]["srv_clamav.ClamAvMaxFilesInArchive"], array("TOOLTIP" => "{srv_clamav.ClamAvMaxFilesInArchive}"));
    $boot->set_field("srv_clamav.ClamAvMaxFileSizeInArchive", "{srv_clamav.ClamAvMaxFileSizeInArchive} (MB)", $ci->main_array["CONF"]["srv_clamav.ClamAvMaxFileSizeInArchive"], array("TOOLTIP" => "{srv_clamav.ClamAvMaxFileSizeInArchive}"));
    $boot->set_field("srv_clamav.ClamAvMaxRecLevel", "{srv_clamav.ClamAvMaxRecLevel} (MB)", $ci->main_array["CONF"]["srv_clamav.ClamAvMaxRecLevel"], array("TOOLTIP" => "{srv_clamav.ClamAvMaxRecLevel}"));
    $boot->set_formtitle("Antivirus");
    $boot->set_button("{apply}");
    $form = $boot->Compile();
    $html = "<table style=width:100%'>\n\t<tr>\n\t\t<td style='vertical-align:top;width:300px'>\n\t\t\t<div id='status-{$t}'></div>\n\t\t\t\n\t\t\t<div style='margin:10px;text-align:right'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('status-{$t}','{$page}?status=yes')") . "</div>\n\t\t\t\n\t\t<td style='vertical-align:top;padding-left:10px'>{$form}</td>\n\t</tr>\n\t</table>\t\n\t<script>\n\t\tLoadAjax('status-{$t}','{$page}?status=yes')\n\t</script>\n\t\t";
    echo $html;
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:60,代码来源:miniadmin.proxy.cicap.php

示例8: engine_params

function engine_params()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $LogRotatePath = $sock->GET_INFO("LogRotatePath");
    $SystemLogsPath = $sock->GET_INFO("SystemLogsPath");
    $BackupMaxDays = $sock->GET_INFO("BackupMaxDays");
    $BackupMaxDaysDir = $sock->GET_INFO("BackupMaxDaysDir");
    $LogsRotateDeleteSize = $sock->GET_INFO("LogsRotateDeleteSize");
    $LogsRotateDefaultSizeRotation = $sock->GET_INFO("LogsRotateDefaultSizeRotation");
    if (!is_numeric($LogsRotateDefaultSizeRotation)) {
        $LogsRotateDefaultSizeRotation = 100;
    }
    $MySQLSyslogType = $sock->GET_INFO("MySQLSyslogType");
    if (!is_numeric($MySQLSyslogType)) {
        $MySQLSyslogType = 1;
    }
    if ($SystemLogsPath == null) {
        $SystemLogsPath = "/var/log";
    }
    if (!is_numeric($BackupMaxDays)) {
        $BackupMaxDays = 30;
    }
    $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;
    }
    $BackupSquidLogsNASRetry = $sock->GET_INFO("BackupSquidLogsNASRetry");
    if (!is_numeric($BackupSquidLogsNASRetry)) {
        $BackupSquidLogsNASRetry = 0;
    }
    if ($LogRotatePath == null) {
        $LogRotatePath = "/home/logrotate";
    }
    if ($BackupMaxDaysDir == null) {
        $BackupMaxDaysDir = "/home/logrotate_backup";
    }
    if (!is_numeric($LogsRotateDeleteSize)) {
        $LogsRotateDeleteSize = 5000;
    }
    $boot = new boostrap_form();
    $boot->set_field("LogsRotateDeleteSize", "{delete_if_file_exceed} (MB)", $LogsRotateDeleteSize);
    $boot->set_field("LogsRotateDefaultSizeRotation", "{default_size_for_rotation} (MB)", $LogsRotateDefaultSizeRotation);
    $boot->set_field("SystemLogsPath", "{system_logs_path}", $SystemLogsPath, array("BROWSE" => true));
    $boot->set_spacertitle("{storage}");
    if ($MySQLSyslogType == 1) {
        $boot->set_field("storage_files_path", "{storage_files_path}", $LogRotatePath, array("BROWSE" => true, "TOOLTIP" => "{LogRotatePath_explain}"));
        $boot->set_field("BackupMaxDays", "{max_day_in_database}", $BackupMaxDays);
        $boot->set_field("BackupMaxDaysDir", "{backup_folder}", $BackupMaxDaysDir, array("BROWSE" => true, "TOOLTIP" => "{BackupMaxDaysDir_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_checkbox("BackupSquidLogsNASRetry", "{retry}", $BackupSquidLogsNASRetry, array("TOOLTIP" => "{BackupSquidLogsNASRetry_explain}"));
        $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));
    } else {
        $boot->set_spacerexplain("{syslogs_store_use_remote}");
    }
    $boot->set_Newbutton("{test_connection}", "Loadjs('miniadm.system.syslogstore.php?test-nas-js=yes')");
    echo $boot->Compile() . "<hr style='margin-bottom:10px'>";
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:67,代码来源:miniadm.system.syslogstore.php

示例9: add_www_import

function add_www_import()
{
    $boot = new boostrap_form();
    $boot->set_formdescription("{free_catgorized_explain}");
    $boot->set_hidden("category", $_GET["category"]);
    $boot->set_checkbox("ForceCat", "{force}", 0, array("TOOLTIP" => "{free_cat_force_explain}"));
    $boot->set_textarea("categorize", "{items}", null, array("HEIGHT" => 250));
    $boot->set_button("{add}");
    $boot->set_RefreshSearchs();
    $boot->set_RefreshSearchsForced();
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:12,代码来源:miniadmin.proxy.dynamic.categories.php

示例10: settings

function settings()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $sock = new sockets();
    $t = time();
    $EnablePDNS = $sock->GET_INFO("EnablePDNS");
    $PDNSRestartIfUpToMB = $sock->GET_INFO("PDNSRestartIfUpToMB");
    $DisablePowerDnsManagement = $sock->GET_INFO("DisablePowerDnsManagement");
    $EnablePDNS = $sock->GET_INFO("EnablePDNS");
    $PowerUseGreenSQL = $sock->GET_INFO("PowerUseGreenSQL");
    $PowerDisableDisplayVersion = $sock->GET_INFO("PowerDisableDisplayVersion");
    $PowerActHasMaster = $sock->GET_INFO("PowerActHasMaster");
    $PowerDNSDNSSEC = $sock->GET_INFO("PowerDNSDNSSEC");
    $PowerDNSDisableLDAP = $sock->GET_INFO("PowerDNSDisableLDAP");
    $PowerChroot = $sock->GET_INFO("PowerChroot");
    $PowerActAsSlave = $sock->GET_INFO("PowerActAsSlave");
    $PowerDNSLogLevel = $sock->GET_INFO("PowerDNSLogLevel");
    $PowerSkipCname = $sock->GET_INFO("PowerSkipCname");
    if (!is_numeric($EnablePDNS)) {
        $EnablePDNS = 0;
    }
    $PowerDNSMySQLEngine = 1;
    if (!is_numeric($PowerActHasMaster)) {
        $PowerActHasMaster = 0;
    }
    if (!is_numeric($PDNSRestartIfUpToMB)) {
        $PDNSRestartIfUpToMB = 700;
    }
    if (!is_numeric($DisablePowerDnsManagement)) {
        $DisablePowerDnsManagement = 0;
    }
    if (!is_numeric($PowerUseGreenSQL)) {
        $PowerUseGreenSQL = 0;
    }
    if (!is_numeric($PowerDisableDisplayVersion)) {
        $PowerDisableDisplayVersion = 0;
    }
    if (!is_numeric($PowerDNSDNSSEC)) {
        $PowerDNSDNSSEC = 0;
    }
    if (!is_numeric($PowerDNSDisableLDAP)) {
        $PowerDNSDisableLDAP = 1;
    }
    if (!is_numeric($PowerChroot)) {
        $PowerChroot = 0;
    }
    if (!is_numeric($PowerActAsSlave)) {
        $PowerActAsSlave = 0;
    }
    if (!is_numeric($PowerDNSLogLevel)) {
        $PowerDNSLogLevel = 1;
    }
    if (!is_numeric($PowerSkipCname)) {
        $PowerSkipCname = 0;
    }
    $PowerDNSMySQLType = $sock->GET_INFO("PowerDNSMySQLType");
    $PowerDNSMySQLRemoteServer = $sock->GET_INFO("PowerDNSMySQLRemoteServer");
    $PowerDNSMySQLRemotePort = $sock->GET_INFO("PowerDNSMySQLRemotePort");
    $PowerDNSMySQLRemoteAdmin = $sock->GET_INFO("PowerDNSMySQLRemoteAdmin");
    $PowerDNSMySQLRemotePassw = $sock->GET_INFO("PowerDNSMySQLRemotePassw");
    if (!is_numeric($PowerDNSMySQLType)) {
        $PowerDNSMySQLType = 1;
    }
    if (!is_numeric($PowerDNSMySQLRemotePort)) {
        $PowerDNSMySQLRemotePort = 3306;
    }
    $PowerDNSMySQLTypeA[1] = "{main_mysql_server_2}";
    $PowerDNSMySQLTypeA[2] = "{main_mysql_server_4}";
    $PowerDNSMySQLTypeA[3] = "{main_mysql_server_5}";
    for ($i = 0; $i < 10; $i++) {
        $loglevels[$i] = $i;
    }
    $boot = new boostrap_form();
    $boot->set_checkbox("EnablePDNS", "{EnablePDNS}", $EnablePDNS, array("ONDISABLE" => "{EnablePDNS_disable_text}"));
    $boot->set_checkbox("DisablePowerDnsManagement", "{DisablePowerDnsManagement}", $DisablePowerDnsManagement);
    $boot->set_checkbox("PowerActHasMaster", "{ActHasMaster}", $PowerActHasMaster);
    $boot->set_checkbox("PowerActAsSlave", "{ActHasSlave}", $PowerActAsSlave);
    $boot->set_checkbox("PowerDNSDNSSEC", "DNSSEC", $PowerDNSDNSSEC);
    $boot->set_checkbox("PowerUseGreenSQL", "{useGreenSQL}", $PowerUseGreenSQL);
    $boot->set_checkbox("PowerDisableDisplayVersion", "{DisableDisplayVersion}", $PowerDisableDisplayVersion);
    $boot->set_checkbox("PowerChroot", "{chroot}", $PowerChroot);
    $boot->set_list("PowerDNSLogLevel", "{log level}", $loglevels, $PowerDNSLogLevel);
    $boot->set_field("PDNSRestartIfUpToMB", "{RestartServiceifReachMb}", $PDNSRestartIfUpToMB);
    $boot->set_list("PowerDNSMySQLType", "{mysql_database}", $PowerDNSMySQLTypeA, $PowerDNSMySQLType);
    $boot->set_field("PowerDNSMySQLRemoteServer", "{remote_mysql_server}", $PowerDNSMySQLRemoteServer);
    $boot->set_field("PowerDNSMySQLRemotePort", "{mysql_server_port}", $PowerDNSMySQLRemotePort);
    $boot->set_field("PowerDNSMySQLRemoteAdmin", "{mysql_admin}", $PowerDNSMySQLRemoteAdmin);
    $boot->set_fieldpassword("PowerDNSMySQLRemotePassw", "{password}", $PowerDNSMySQLRemotePassw);
    $boot->set_button("{apply}");
    $boot->setAjaxPage("pdns.php");
    $boot->set_PROTO("GET");
    echo $tpl->_ENGINE_parse_body("<div class=text-info>{pdns_explain}</div>") . $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:94,代码来源:miniadm.PowerDNS.php

示例11: failover

function failover()
{
    //this_feature_is_disabled_corp_license
    $users = new usersMenus();
    $boot = new boostrap_form();
    $tpl = new templates();
    $t = time();
    $page = CurrentPageName();
    $sock = new sockets();
    $eth = $_GET["nic"];
    $nic = new system_nic($eth);
    for ($i = 1; $i < 256; $i++) {
        $ucarp_vids[$i] = $i;
    }
    $boot->set_hidden("save_nic", $eth);
    $array = unserialize(base64_decode($sock->getFrameWork("system.php?ucarp-status={$eth}")));
    if (!isset($array["PID"])) {
        $boot->set_formdescription("{status}:{stopped}");
        $boot->set_Newbutton("{start}", "Start{$t}()");
    } else {
        $boot->set_Newbutton("{stop}", "Stop{$t}()");
        $boot->set_formdescription("{status}:{running} PID:{$array["PID"]} {since} {$array["TIME"]}Mn");
    }
    $XHR = array();
    $XHR["start-vip"] = "yes";
    $boot->set_AddScript("Start{$t}", array("XHR" => $XHR));
    $XHR = array();
    $XHR["stop-vip"] = "yes";
    $boot->set_AddScript("Stop{$t}", array("XHR" => $XHR));
    $boot->set_checkbox("ucarp_enabled", "{enabled}", $nic->ucarp_enabled, array("DISABLEALL" => true));
    $boot->set_checkbox("ucarp_master", "{isamaster}", $nic->ucarp_master, array("TOOLTIP" => "{ucarp_master_explain}"));
    $boot->set_list("ucarp_vid", "{ucarp-vid}", $ucarp_vids, $nic->ucarp_vid);
    $boot->set_field("ucarp_vip", "{ucarp-vip}", $nic->ucarp_vip, array("MANDATORY" => true, "IPV4" => true, "TOOLTIP" => "{ucarp_vip_explain}"));
    $boot->set_list("ucarp_advskew", "{ucarp-advskew}", $ucarp_vids, $nic->ucarp_advskew);
    $boot->set_field("ucarp_advbase", "{interval} ({seconds})", $nic->ucarp_advbase, array("MANDATORY" => true));
    $boot->set_button("{apply}");
    $boot->set_RefreshSearchs();
    if (!$users->AsSystemAdministrator) {
        $boot->set_form_locked();
    }
    if (!$users->CORP_LICENSE) {
        $error = "<p class=text-error>{this_feature_is_disabled_corp_license}</p>";
        $boot->set_form_locked();
    }
    $form = $boot->Compile();
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($error . $form);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:48,代码来源:miniadm.network.interfaces.NIC.php

示例12: activedirectory


//.........这里部分代码省略.........
    }
    if (!is_numeric($KerbAuthMapUntrustedDomain)) {
        $KerbAuthMapUntrustedDomain = 1;
    }
    if (!is_numeric($NtpdateAD)) {
        $NtpdateAD = 0;
    }
    if (!is_numeric("{$EnableKerbAuth}")) {
        $EnableKerbAuth = 0;
    }
    if (!is_numeric("{$EnableKerberosAuthentication}")) {
        $EnableKerberosAuthentication = 0;
    }
    if (!is_numeric("{$LockKerberosAuthentication}")) {
        $LockKerberosAuthentication = 1;
    }
    if (!is_numeric($EnableRemoteStatisticsAppliance)) {
        $EnableRemoteStatisticsAppliance = 0;
    }
    $samba_installed = 1;
    if (!$users->SAMBA_INSTALLED) {
        $samba_installed = 0;
    }
    if (!isset($array["SAMBA_BACKEND"])) {
        $array["SAMBA_BACKEND"] = "tdb";
    }
    if (!isset($array["COMPUTER_BRANCH"])) {
        $array["COMPUTER_BRANCH"] = "CN=Computers";
    }
    if ($array["COMPUTER_BRANCH"] == null) {
        $array["COMPUTER_BRANCH"] = "CN=Computers";
    }
    if ($samba36 == 1) {
        $arrayBCK["autorid"] = "autorid";
    }
    $arrayBCK["ad"] = "ad";
    $arrayBCK["rid"] = "rid";
    $arrayBCK["tdb"] = "tdb";
    if ($LockKerberosAuthentication == 1) {
        $EnableKerberosAuthentication = 0;
    }
    $char_alert_error = $tpl->javascript_parse_text("{char_alert_error}");
    $UseDynamicGroupsAcls = $sock->GET_INFO("UseDynamicGroupsAcls");
    if (!is_numeric($UseDynamicGroupsAcls)) {
        $UseDynamicGroupsAcls = 0;
    }
    $DynamicGroupsAclsTTL = $sock->GET_INFO("DynamicGroupsAclsTTL");
    if (!is_numeric($UseDynamicGroupsAcls)) {
        $UseDynamicGroupsAcls = 0;
    }
    if (!is_numeric($DynamicGroupsAclsTTL)) {
        $DynamicGroupsAclsTTL = 3600;
    }
    if ($DynamicGroupsAclsTTL < 5) {
        $DynamicGroupsAclsTTL = 5;
    }
    $arrayLDAP = unserialize(base64_decode($sock->GET_INFO("KerbAuthInfos")));
    $t = time();
    if ($arrayLDAP["LDAP_DN"] == null) {
        $arrayLDAP["LDAP_DN"] = $active->ldap_dn_user;
    }
    if ($arrayLDAP["LDAP_SUFFIX"] == null) {
        $arrayLDAP["LDAP_SUFFIX"] = $active->suffix;
    }
    if ($arrayLDAP["LDAP_SERVER"] == null) {
        $arrayLDAP["LDAP_SERVER"] = $active->ldap_host;
    }
    if ($arrayLDAP["LDAP_PORT"] == null) {
        $arrayLDAP["LDAP_PORT"] = $active->ldap_port;
    }
    if ($arrayLDAP["LDAP_PASSWORD"] == null) {
        $arrayLDAP["LDAP_PASSWORD"] = $active->ldap_password;
    }
    if (!is_numeric($array["LDAP_RECURSIVE"])) {
        $arrayLDAP["LDAP_RECURSIVE"] = 0;
    }
    if (!is_numeric($array["LDAP_PORT"])) {
        $array["LDAP_PORT"] = 389;
    }
    $boot = new boostrap_form();
    $boot->set_checkbox("EnableKerbAuth", "{EnableWindowsAuthentication}", $EnableKerbAuth, array("DISABLEALL" => true));
    $boot->set_checkbox("KerbAuthDisableNsswitch", "{KerbAuthDisableNsswitch}", $KerbAuthDisableNsswitch);
    $boot->set_checkbox("KerbAuthTrusted", "{KerbAuthTrusted}", $KerbAuthTrusted);
    $boot->set_checkbox("KerbAuthDisableGroupListing", "{KerbAuthDisableGroupListing}", $KerbAuthDisableGroupListing);
    $boot->set_checkbox("KerbAuthDisableNormalizeName", "{KerbAuthDisableNormalizeName}", $KerbAuthDisableNormalizeName);
    $boot->set_checkbox("KerbAuthMapUntrustedDomain", "{map_untrusted_to_domain}", $KerbAuthMapUntrustedDomain);
    $boot->set_checkbox("NtpdateAD", "{synchronize_time_with_ad}", $NtpdateAD);
    //$boot->set_checkbox("EnableKerberosAuthentication", "{authenticate_from_kerberos}",$EnableKerberosAuthentication);
    $boot->set_field("WINDOWS_DNS_SUFFIX", "{WINDOWS_DNS_SUFFIX}", $array["WINDOWS_DNS_SUFFIX"]);
    $boot->set_field("WINDOWS_SERVER_NETBIOSNAME", "{WINDOWS_SERVER_NETBIOSNAME}", $array["WINDOWS_SERVER_NETBIOSNAME"]);
    $boot->set_field("ADNETBIOSDOMAIN", "{ADNETBIOSDOMAIN}", $array["ADNETBIOSDOMAIN"], array("TOOLTIP" => "{howto_ADNETBIOSDOMAIN}"));
    $boot->set_field("ADNETIPADDR", "{ADNETIPADDR}", $array["ADNETIPADDR"], array("TOOLTIP" => "{howto_ADNETIPADDR}"));
    $boot->set_field("LDAP_PORT", "{ldap_port}", $array["LDAP_PORT"]);
    $boot->set_list("WINDOWS_SERVER_TYPE", "{WINDOWS_SERVER_TYPE}", $severtype, $array["WINDOWS_SERVER_TYPE"]);
    $boot->set_field("COMPUTER_BRANCH", "{COMPUTERS_BRANCH}", $array["COMPUTER_BRANCH"]);
    $boot->set_list("SAMBA_BACKEND", "{database_backend}", $arrayBCK, $array["SAMBA_BACKEND"]);
    $boot->set_field("WINDOWS_SERVER_ADMIN", "{administrator}", $array["WINDOWS_SERVER_ADMIN"]);
    $boot->set_fieldpassword("WINDOWS_SERVER_PASS", "{password}", $array["WINDOWS_SERVER_PASS"], array("ENCODE" => true, "SPECIALSCHARS" => true));
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:miniadm.messaging.infrastructure.php

示例13: 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();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:81,代码来源:miniadm.backup.container.php

示例14: certificate_edit_settings

function certificate_edit_settings()
{
    $commonName = $_GET["CommonName"];
    $q = new mysql();
    $db = file_get_contents(dirname(__FILE__) . '/ressources/databases/ISO-3166-Codes-Countries.txt');
    $tbl = explode("\n", $db);
    while (list($num, $ligne) = each($tbl)) {
        if (preg_match('#(.+?);\\s+([A-Z]{1,2})#', $ligne, $regs)) {
            $regs[2] = trim($regs[2]);
            $regs[1] = trim($regs[1]);
            $array_country_codes["{$regs[1]}_{$regs[2]}"] = $regs[1];
        }
    }
    $ENC[1024] = 1024;
    $ENC[2048] = 2048;
    $ENC[4096] = 4096;
    if (!$q->FIELD_EXISTS("sslcertificates", "UsePrivKeyCrt", "artica_backup")) {
        $sql = "ALTER TABLE `sslcertificates` ADD `UsePrivKeyCrt` smallint(1) DEFAULT 0";
        $q->QUERY_SQL($sql, 'artica_backup');
    }
    $sql = "SELECT * FROM sslcertificates WHERE CommonName='{$commonName}'";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    if ($ligne["CountryName"] == null) {
        $ligne["CountryName"] = "UNITED STATES_US";
    }
    if ($ligne["stateOrProvinceName"] == null) {
        $ligne["stateOrProvinceName"] = "New York";
    }
    if ($ligne["localityName"] == null) {
        $ligne["localityName"] = "Brooklyn";
    }
    if ($ligne["emailAddress"] == null) {
        $ligne["emailAddress"] = "postmaster@localhost.localdomain";
    }
    if ($ligne["OrganizationName"] == null) {
        $ligne["OrganizationName"] = "MyCompany Ltd";
    }
    if ($ligne["OrganizationalUnit"] == null) {
        $ligne["OrganizationalUnit"] = "IT service";
    }
    if (!is_numeric($ligne["CertificateMaxDays"])) {
        $ligne["CertificateMaxDays"] = 730;
    }
    if (!is_numeric($ligne["levelenc"])) {
        $ligne["levelenc"] = 1024;
    }
    $boot = new boostrap_form();
    $boot->set_formtitle($commonName);
    $boot->set_hidden("CommonName", $commonName);
    $boot->set_checkbox("UsePrivKeyCrt", "{UsePrivKeyCrt}", $ligne["UsePrivKeyCrt"]);
    $boot->set_list("CountryName", "{countryName}", $array_country_codes, $ligne["CountryName"]);
    $boot->set_field("stateOrProvinceName", "{stateOrProvinceName}", $ligne["stateOrProvinceName"]);
    $boot->set_field("localityName", "{localityName}", $ligne["localityName"]);
    $boot->set_field("OrganizationName", "{organizationName}", $ligne["OrganizationName"]);
    $boot->set_field("OrganizationalUnit", "{organizationalUnitName}", $ligne["OrganizationalUnit"]);
    $boot->set_field("emailAddress", "{emailAddress}", $ligne["emailAddress"]);
    $boot->set_field("CertificateMaxDays", "{CertificateMaxDays} ({days})", $ligne["CertificateMaxDays"]);
    $boot->set_list("levelenc", "{level_encryption}", $ENC, $ligne["levelenc"]);
    $boot->set_fieldpassword("password", "{password}", "secret");
    $boot->set_button("{apply}");
    $boot->set_RefreshFlex("flexRT{$_GET["t"]}");
    $boot->set_RefreshSearchs();
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:64,代码来源:miniadmin.certificates.php

示例15: 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();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:66,代码来源:miniadm.system.schedules-engine.php


注:本文中的boostrap_form::set_checkbox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。