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


PHP boostrap_form::set_subtitle方法代码示例

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


在下文中一共展示了boostrap_form::set_subtitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: parameters

function parameters()
{
    $sock = new sockets();
    $EnableChilli = $sock->GET_INFO("EnableChilli");
    if (!is_numeric($EnableChilli)) {
        $EnableChilli = 0;
    }
    $NICS = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes")));
    if (count($NICS) == 1) {
        $tpl = new templates();
        $COOVA_ERROR_NO_2_INTERFACES = $tpl->_ENGINE_parse_body("{COOVA_ERROR_NO_2_INTERFACES}");
        echo "<p class=text-error>{$COOVA_ERROR_NO_2_INTERFACES}</p>";
        return;
    }
    $ChilliConf = unserialize(base64_decode($sock->GET_INFO("ChilliConf")));
    $ip = new networking();
    $Interfaces = $ip->Local_interfaces();
    $Interfaces[null] = "{none}";
    unset($Interfaces["lo"]);
    if (!isset($ChilliConf["HS_WANIF"])) {
        $ChilliConf["HS_WANIF"] = null;
    }
    if (!isset($ChilliConf["HS_LANIF"])) {
        $arrayTCP = unserialize(base64_decode($sock->getFrameWork("cmd.php?TCP_NICS_STATUS_ARRAY=yes")));
        $ALLARRAY = $arrayTCP["eth0"];
        $PR = explode(".", $ALLARRAY["IPADDR"]);
        $ChilliConf["HS_NETWORK"] = "{$PR[0]}.{$PR[2]}.{$PR[3]}.0";
        $ChilliConf["HS_DYNIP"] = "{$PR[0]}.{$PR[2]}.{$PR[3]}.50";
        $ChilliConf["HS_DYNIP_MASK"] = $ALLARRAY["NETMASK"];
        $ChilliConf["HS_UAMLISTEN"] = $ALLARRAY["IPADDR"];
        $ChilliConf["HS_NETMASK"] = $ALLARRAY["NETMASK"];
        $ChilliConf["HS_LANIF"] = "eth0";
        $ChilliConf["HS_DYNIP_START"] = 50;
    }
    $boot = new boostrap_form();
    $boot->set_spacertitle("{service_parameters}");
    $boot->set_checkbox("EnableChilli", "{enable}", $EnableChilli, array("DISABLEALL" => true));
    $boot->set_checkbox("HS_DEBUG", "{debug}", $ChilliConf["HS_DEBUG"]);
    if (!isset($ChilliConf["HS_DNS_DOMAIN"])) {
        $ChilliConf["HS_DNS_DOMAIN"] = "hotspot.domain.tld";
    }
    if (!isset($ChilliConf["HS_PROVIDER"])) {
        $ChilliConf["HS_PROVIDER"] = "Artica";
    }
    if (!isset($ChilliConf["HS_PROVIDER_LINK"])) {
        $ChilliConf["HS_PROVIDER_LINK"] = "http://www.articatech.net";
    }
    if (!isset($ChilliConf["HS_LOC_NAME"])) {
        $ChilliConf["HS_LOC_NAME"] = "Artica HotSpot";
    }
    if ($ChilliConf["HS_LOC_NETWORK"] == null) {
        $ChilliConf["HS_LOC_NETWORK"] = "HotSpot Network";
    }
    if (!isset($ChilliConf["HS_DNS1"])) {
        $ChilliConf["HS_DNS1"] = null;
    }
    if (!isset($ChilliConf["HS_DNS2"])) {
        $ChilliConf["HS_DNS2"] = null;
    }
    if (!isset($ChilliConf["SQUID_HTTP_PORT"])) {
        $ChilliConf["SQUID_HTTP_PORT"] = rand(45000, 65400);
    }
    if (!is_numeric($ChilliConf["SQUID_HTTP_PORT"])) {
        $ChilliConf["SQUID_HTTP_PORT"] = rand(45000, 65400);
    }
    if (!isset($ChilliConf["SQUID_HTTPS_PORT"])) {
        $ChilliConf["SQUID_HTTPS_PORT"] = rand(45000, 65400);
    }
    if (!is_numeric($ChilliConf["SQUID_HTTPS_PORT"])) {
        $ChilliConf["SQUID_HTTPS_PORT"] = rand(45000, 65400);
    }
    if (!is_numeric($ChilliConf["ENABLE_DHCP_RELAY"])) {
        $ChilliConf["ENABLE_DHCP_RELAY"] = 0;
    }
    if ($ChilliConf["HS_DNS1"] == null) {
        $ChilliConf["HS_DNS1"] = "8.8.8.8";
    }
    if ($ChilliConf["HS_DNS2"] == null) {
        $ChilliConf["HS_DNS2"] = "8.8.4.4";
    }
    $boot->set_spacertitle("{hotspot_network}");
    $boot->set_list("HS_LANIF", "{HS_LANIF}", $Interfaces, $ChilliConf["HS_LANIF"]);
    $boot->set_field("HS_UAMLISTEN", "{ipaddr}", $ChilliConf["HS_UAMLISTEN"]);
    $boot->set_field("HS_NETMASK", "{mask}", $ChilliConf["HS_NETMASK"]);
    $boot->set_field("HS_DNS1", "DNS 1", $ChilliConf["HS_DNS1"]);
    $boot->set_field("HS_DNS2", "DNS 2", $ChilliConf["HS_DNS2"]);
    $boot->set_checkbox("HS_LAN_ACCESS", "{HS_LAN_ACCESS}", $ChilliConf["HS_LAN_ACCESS"]);
    $boot->set_subtitle("{dhcp_parameters}");
    $boot->set_field("HS_DYNIP_START", "{dhcp_start_ip}", $ChilliConf["HS_DYNIP_START"]);
    $boot->set_field("HS_DNS_DOMAIN", "{domain}", $ChilliConf["HS_DNS_DOMAIN"]);
    $boot->set_checkbox("ENABLE_DHCP_RELAY", "{use_remote_dhcp_server}", $ChilliConf["ENABLE_DHCP_RELAY"], array("LINK" => "DHCP_IF,HS_DHCPGATEWAY", "TOOLTIP" => "{coova_ssl_splash_explain}"));
    $boot->set_field("HS_DHCPGATEWAY", "{dhcp_server_ip}", $ChilliConf["HS_DHCPGATEWAY"]);
    $boot->set_list("DHCP_IF", "{nic}", $Interfaces, $ChilliConf["DHCP_IF"]);
    $boot->set_spacertitle("{internet_network}");
    $boot->set_list("HS_WANIF", "{HS_WANIF}", $Interfaces, $ChilliConf["HS_WANIF"]);
    $boot->set_spacertitle("{proxy_parameters}");
    $boot->set_field("SQUID_HTTP_PORT", "{proxy_http_port} (local)", $ChilliConf["SQUID_HTTP_PORT"], array("TOOLTIP" => "{coova_proxy_port}"));
    $boot->set_field("SQUID_HTTPS_PORT", "{proxy_https_port} (local)", $ChilliConf["SQUID_HTTPS_PORT"], array("TOOLTIP" => "{coova_proxy_sslport}"));
    $boot->set_checkbox("CoovaUFDBEnabled", "{webfiltering}", $ChilliConf["CoovaUFDBEnabled"], array("TOOLTIP" => "{coova_CoovaUFDBEnabled_explain}"));
    $q = new mysql();
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:miniadmin.webfiltering.coova.php

示例2: 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}:&nbsp;&laquo;$pattern&raquo;",$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)) {
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:miniadmin.proxy.debian.mirrors.php


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