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


PHP Bs_IniHandler::toString方法代码示例

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


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

示例1: SaveConf

function SaveConf()
{
    $sock = new sockets();
    $sock->SET_INFO("CyrusEnableAV", $_GET["CyrusEnableAV"]);
    $ini = new Bs_IniHandler();
    while (list($num, $val) = each($_GET)) {
        $ini->_params["SCAN"][$num] = trim($val);
    }
    $sock->SaveConfigFile($ini->toString(), "CyrusAVConfig");
    $tpl = new templates();
    $sock->getFrameWork('cmd.php?RestartDaemon=yes');
    echo html_entity_decode($tpl->_ENGINE_parse_body('{success}'));
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:13,代码来源:cyrus.antivirus.php

示例2: SaveParams

 function SaveParams()
 {
     $ini = new Bs_IniHandler();
     $ini->_params = $this->params;
     $ou = $this->ou;
     $name = str_replace('.', '_', $ou);
     $name = str_replace('-', '_', $name);
     $sock = new sockets();
     $sock->SaveConfigFile($ini->toString(), "JoomlaConfOrg_{$name}");
     $this->SaveLDAPParams();
     $this->SaveAdminPassword();
     $sock->getfile('JoomlaReload');
 }
开发者ID:brucewu16899,项目名称:artica,代码行数:13,代码来源:class.joomla.php

示例3: save

function save()
{
    $uid = $_GET["uid"];
    if (strpos($uid, '$') == 0) {
        $uid = $uid . '$';
    }
    $computer = new computers($uid);
    $ini = new Bs_IniHandler();
    $ini->loadString($computer->ComputerCryptedInfos);
    $ini->_params["ACCOUNT"]["USERNAME"] = $_GET["username"];
    $ini->_params["ACCOUNT"]["PASSWORD"] = $_GET["password"];
    $computer->ComputerCryptedInfos = $ini->toString();
    $computer->SaveCryptedInfos();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:14,代码来源:computer.passwd.php

示例4: SaveSchedule

function SaveSchedule()
{
    $computer = new computers($_GET["uid"] . '$');
    $ini = new Bs_IniHandler();
    $ini->loadString($computer->ComputerCryptedInfos);
    $ini->_params["SCHEDULE"]["cron"] = $_GET["SaveSchedule"];
    $computer->ComputerCryptedInfos = $ini->toString();
    $computer->SaveCryptedInfos();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:computer.backup.php

示例5: artica_import_save

function artica_import_save()
{
    $sock = new sockets();
    $ini = new Bs_IniHandler();
    $ini->loadString($sock->GET_INFO("ComputersImportArtica"));
    while (list($num, $line) = each($_GET)) {
        $ini->_params[$_GET["artica_ip_addr"]][$num] = $line;
    }
    $sock->SaveConfigFile($ini->toString(), "ComputersImportArtica");
    $sock->getFrameWork("cmd.php?computers-import-nets=yes");
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:11,代码来源:computer-browse.php

示例6: BuildTunServer


//.........这里部分代码省略.........
			if($NETMASK=="255.255.255.255"){$NETMASK="255.255.255.0";}		
   			echo "Starting......: OpenVPN Netmask is null for the range $calc_ip, assume $NETMASK\n";
   			$ini->set("GLOBAL","NETMASK",$NETMASK);
   	}
   	
	$OpenVpnPasswordCert=$sock->GET_INFO("OpenVpnPasswordCert");
	if($OpenVpnPasswordCert==null){$OpenVpnPasswordCert="MyKey";}
   
	$askpass=null;
   	if(is_file("/etc/artica-postfix/openvpn/keys/password")){
   		$askpass=" --askpass /etc/artica-postfix/openvpn/keys/password ";
   	}
   	
   	$ifconfig_pool_persist=" --ifconfig-pool-persist /etc/artica-postfix/openvpn/ipp.txt ";
   	
 	if(isset($GLOBALS["OPENVPNPARAMS"]["duplicate-cn"])){
 		echo "Starting......: OpenVPN duplicate-cn is enabled\n";
 		$duplicate_cn=" --duplicate-cn ";
 		$ifconfig_pool_persist=null;
 	}
 	
 	if(isset($GLOBALS["OPENVPNPARAMS"]["script-security"])){
 		echo "Starting......: OpenVPN script-security is enabled\n";
 		$script_security=" --script-security 2";
 	} 	
 	
	if(!is_dir("/etc/openvpn/cdd")){@mkdir("/etc/openvpn/cdd");}
	$already=array();
 	echo "Starting......: OpenVPN get remote sites routes...\n";
 	$sql="SELECT sitename,IP_START,netmask,remote_site_routes,FixedIPAddr FROM vpnclient WHERE connexion_type=1";
 	$q=new mysql();
	$results=$q->QUERY_SQL($sql,"artica_backup");
	if(!$q->ok){echo2("Starting......: OpenVPN : $q->mysql_error");}
 	while($ligne=mysql_fetch_array($results,MYSQL_ASSOC)){
 		$iroute=array();
 		$sitename=$ligne["sitename"];
 		$FixedIPAddr=$ligne["FixedIPAddr"];
 		if(!is_numeric($FixedIPAddr)){$FixedIPAddr=0;}
 		
 		if($IP_START_PREFIX<>null){
 			if($FixedIPAddr>2){
 				if($FixedIPAddr<255){
 					echo "Starting......: OpenVPN $sitename $IP_START_PREFIX.$FixedIPAddr fixed IP address\n";
 					$iroute[]="ifconfig-push $IP_START_PREFIX.$FixedIPAddr $IP_START_PREFIX.2";
 				}
 			}
 		}
 		
 		if(!isset($already[$ligne["IP_START"]])){
 			echo "Starting......: OpenVPN $sitename ({$ligne["IP_START"]} {$ligne["netmask"]})\n";
 			$rou[]=" --route {$ligne["IP_START"]} {$ligne["netmask"]}";
 			$iroute[]="iroute {$ligne["IP_START"]} {$ligne["netmask"]}";
 			$already[$ligne["IP_START"]]=true;
 		}
 		
 		$remote_site_routes=unserialize(base64_decode($ligne["remote_site_routes"]));
		while (list ($num, $site_mask) = each ($remote_site_routes) ){
			if(!isset($already[$num])){
				echo "Starting......: OpenVPN $sitename ($num $site_mask)\n";
				$rou[]=" --route $num $site_mask";
				$iroute[]="iroute $num $site_mask";
				$already[$num]=true;
			}
		}
 		echo "Starting......: OpenVPN cdd $sitename\n";
 		@file_put_contents("/etc/openvpn/cdd/$sitename",@implode("\n", $iroute) );
 		
 	}
 	if(count($rou)>0){
 		$localroutes=@implode(" ", $rou);
 		$client_config_dir=" --client-config-dir /etc/openvpn/cdd";
 	}
 	
 	 
 	
 	$LDAP_AUTH=$ini->_params["GLOBAL"]["LDAP_AUTH"];
 	if($LDAP_AUTH==1){
 		if(is_file("/usr/lib/openvpn/openvpn-auth-pam.so")){
 		$plugin=" --plugin /usr/lib/openvpn/openvpn-auth-pam.so common-auth";
 		echo "Starting......: OpenVPN auth is enabled\n";
 		shell_exec("/usr/share/artica-postfix/bin/artica-install --nsswitch");
 		}
 	}
   
   @mkdir("/etc/openvpn/ccd",0666,true);
   $php5=$unix->LOCATE_PHP5_BIN();
   $me=__FILE__;
   $cmd=" --port $port --dev tun $proto --server $IP_START $NETMASK$localroutes$client_config_dir --comp-lzo $local --ca $ca --dh $dh --key $key --cert $crt";
   $cmd=$cmd. "$ifconfig_pool_persist " . implode(" ",$routess);
   $cmd=$cmd. " $askpass$duplicate_cn--client-to-client$script_security$plugin --learn-address \"$php5 $me --client-connect\" --keepalive 10 60 --persist-tun --verb 5 --daemon --writepid /var/run/openvpn/openvpn-server.pid --log \"/var/log/openvpn/openvpn.log\"";
   $cmd=$cmd. " --status /var/log/openvpn/openvpn-status.log 10";
   echo "Starting......: OpenVPN building /etc/openvpn/cmdline.conf done\n";
   @file_put_contents("/etc/openvpn/cmdline.conf",$cmd);
  
   
   $sock->SaveConfigFile($ini->toString(),"ArticaOpenVPNSettings");
   send_email_events("OpenVPN was successfully reconfigured",$cmd,"VPN");
   echo "Starting......: OpenVPN building settings done.\n";
   if($GLOBALS["VERBOSE"]){writelogs("$cmd",__FUNCTION__,__FILE__,__LINE__);}
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:101,代码来源:exec.openvpn.php

示例7: save_parameters

function save_parameters()
{
    $sock = new sockets();
    $ini = new Bs_IniHandler();
    if ($_GET["enable_remote_sync"] == 0) {
        $_GET["UseOnlyRsync"] = 0;
    }
    $sock->SET_INFO("UseOnlyRsync", $_GET["UseOnlyRsync"]);
    unset($_GET["UseOnlyRsync"]);
    while (list($num, $ligne) = each($_GET)) {
        $ini->_params["CONF"][$num] = $ligne;
    }
    $sock->SaveConfigFile($ini->toString(), "RsyncClientParameters");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:14,代码来源:rsync.client.php

示例8: Save

 function Save()
 {
     $tpl = new templates();
     writelogs("enabled={$this->BigMailHTMLEnabled}", __FUNCTION__, __FILE__);
     $upd["BigMailHTMLEnabled"][0] = $this->BigMailHTMLEnabled;
     $ini = new Bs_IniHandler();
     $ini->_params = $this->params;
     $upd["BigMailHtmlConfig"][0] = $ini->toString();
     $upd["BigMailHtmlBody"][0] = $this->BigMailHtmlBody;
     $ldap = new clladp();
     if ($ldap->Ldap_modify($this->dn, $upd)) {
         echo $tpl->_ENGINE_parse_body('{success}');
     } else {
         echo $ldap->ldap_last_error;
     }
 }
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:16,代码来源:html.blocker.ou.php

示例9: quarantine_ou_settings_save

function quarantine_ou_settings_save()
{
    $ou = $_GET["ou"];
    $ouU = strtoupper($ou);
    $ini = new Bs_IniHandler();
    $ini->_params["NEXT"]["hour"] = $_GET["hour"];
    $ini->_params["NEXT"]["Min"] = $_GET["Min"];
    $ini->_params["NEXT"]["Enabled"] = $_GET["OuSendQuarantineReports"];
    $ini->_params["NEXT"]["org"] = $ou;
    $ini->_params["NEXT"]["days"] = $_GET["days"];
    $ini->_params["NEXT"]["cron"] = $_GET["Min"] . ' ' . $_GET["hour"] . ' * * *';
    $ini->_params["NEXT"]["subject"] = $_GET["subject"];
    $ini->_params["NEXT"]["title1"] = $_GET["title1"];
    $ini->_params["NEXT"]["title2"] = $_GET["title2"];
    $ini->_params["NEXT"]["explain"] = $_GET["explain"];
    $ini->_params["NEXT"]["mailfrom"] = $_GET["mailfrom"];
    $ini->_params["NEXT"]["externalLink"] = $_GET["externalLink"];
    $sock = new sockets();
    $sock->SaveConfigFile($ini->toString(), "OuSendQuarantineReports{$ouU}");
    $sock->getfile("RestartDaemon");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:21,代码来源:domains.backup.php

示例10: TOOLS_IMPORT_SAVE

function TOOLS_IMPORT_SAVE()
{
    $uid = $_GET["uid"];
    $ini = new Bs_IniHandler();
    $ini->_params["INFO"]["remote_imap_server"] = $_GET["remote_imap_server"];
    $ini->_params["INFO"]["remote_imap_username"] = $_GET["remote_imap_username"];
    $ini->_params["INFO"]["remote_imap_password"] = $_GET["remote_imap_password"];
    $ini->_params["INFO"]["use_ssl"] = $_GET["use_ssl"];
    $sock = new sockets();
    $sock->SaveConfigFile($ini->toString(), "{$uid}ImportMailBoxData");
    $tpl = new templates();
    echo html_entity_decode($tpl->_ENGINE_parse_body('{success}'));
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:13,代码来源:domains.edit.user.php

示例11: folder_conf

function folder_conf()
{
    $folder = $_GET["prop"];
    $smb = new samba();
    $ini = new Bs_IniHandler();
    $q[$folder] = $smb->main_array[$folder];
    $ini->_params = $q;
    $conf = $g = nl2br($ini->toString());
    $html = "\n\t<h3 style='font-size:22px'>{config}</h3>\n\t<div style='padding:5px;margin:5px;border:1px solid #CCCCCC;width:98%;background-color:white' id=''>\t\n\t<code style='font-size:18px'>{$conf}</code>\n\t\n\t</div>";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:12,代码来源:samba.index.php

示例12: Save

 function Save()
 {
     $days = null;
     $sock = new sockets();
     $sock->SET_INFO('WBLReplicEachMin', $this->WBLReplicEachMin);
     $sock->SET_INFO('WBLReplicEnable', $this->WBLReplicEnable);
     $sock->SET_INFO('WBLReplicaHamEnable', $this->WBLReplicaHamEnable);
     while (list($num, $line) = each($this->array_days)) {
         if ($this->WBLReplicSchedule["DAYS"][$line] == 1) {
             $days[] = $num;
         }
     }
     if (is_array($days)) {
         $this->WBLReplicSchedule["CRON"]["days"] = implode(',', $days);
     } else {
         $this->WBLReplicSchedule["CRON"]["days"] = null;
     }
     $this->WBLReplicSchedule["CRON"]["time"] = $this->WBLReplicSchedule["TIME"]["time"];
     $ini = new Bs_IniHandler();
     $ini->_params = $this->WBLReplicSchedule;
     $sock->SaveConfigFile($ini->toString(), 'WBLReplicSchedule');
     $sock->getfile("delcron:artica-autolearn");
     if ($this->WBLReplicSchedule["CRON"]["days"] != null) {
         if (preg_match('#(.+?):(.+)#', $this->WBLReplicSchedule["CRON"]["time"], $re)) {
             $sock->getfile("addcron:{$re[2]} {$re[1]} * * {$this->WBLReplicSchedule["CRON"]["days"]} root /usr/share/artica-postfix/bin/artica-learn >/dev/null 2>&1;artica-autolearn");
         }
     }
 }
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:28,代码来源:whitelists.admin.php

示例13: build

function build(){
	$sock=new sockets();
	$users=new usersMenus();
	$ini=new Bs_IniHandler();
	
	$_SESSION["WIZARD_CYRUS"]["LOCAL_ARTICA_SERVER"]=$_GET["LOCAL_ARTICA_SERVER"];
	
	$ini->_params["REPLICA"]["servername"]=$_SESSION["WIZARD_CYRUS"]["REMOTE_ARTICA_SERVER"];
	$ini->_params["REPLICA"]["artica_port"]=$_SESSION["WIZARD_CYRUS"]["REMOTE_ARTICA_SERVER_PORT"];
	$ini->_params["REPLICA"]["username"]=$_SESSION["WIZARD_CYRUS"]["REMOTE_ARTICA_USR"];
	$ini->_params["REPLICA"]["password"]=$_SESSION["WIZARD_CYRUS"]["REMOTE_ARTICA_PASS"];
	$ini->_params["REPLICA"]["master_ip"]=$_SESSION["WIZARD_CYRUS"]["LOCAL_ARTICA_SERVER"];
	$sock=new sockets();
	$sock->SaveConfigFile($ini->toString(),"CyrusClusterReplicaInfos");
	$cyrus=new cyrus_cluster();
	if(!$cyrus->notify_replica()){
		$tpl=new templates();
		echo $tpl->javascript_parse_text("{failed}:$cyrus->error_text");
		$sock->SET_INFO("EnableCyrusMasterCluster",0);
		$sock->SET_INFO("CyrusClusterPort","2005");
		$sock->SET_INFO("CyrusClusterID",1);		
		return;	
		
	}
	
	$sock->SET_INFO("EnableCyrusMasterCluster",1);
	$sock->SET_INFO("CyrusClusterPort","2005");
	$sock->SET_INFO("CyrusClusterID",1);	
	
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:31,代码来源:wizard.cyrus.cluster.php

示例14: save_scan_parameters

function save_scan_parameters()
{
    $uid = $_GET["uid"];
    $computer = new computers($uid . '$');
    $ini = new Bs_IniHandler();
    $tpl = new templates();
    while (list($num, $ligne) = each($_GET)) {
        $ini->_params["scanner.options"][$num] = $ligne;
    }
    $datas = $ini->toString();
    $computer->KasperkyAVScanningDatas = $datas;
    if ($computer->SaveScannerOptions()) {
        $tpl = new templates();
        echo $tpl->_ENGINE_parse_body('{success}');
    } else {
        echo $tpl->_ENGINE_parse_body('{failed}');
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:18,代码来源:computer.scan.php

示例15: sockets

}function nonhierarchical_direct(){
	$sock=new sockets();
	$ini=new Bs_IniHandler();
	$ArticaSquidParameters=$sock->GET_INFO('ArticaSquidParameters');
	$ini->loadString($ArticaSquidParameters);
	$ini->_params["NETWORK"]["nonhierarchical_direct"]=$_GET["nonhierarchical_direct"];
	$sock->SET_INFO("ArticaSquidParameters",$ini->toString());
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:9,代码来源:squid.loadbalancer.main.php


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