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


PHP sockets::FillSMTPNotifsDefaults方法代码示例

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


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

示例1: SMTP_SETTINGS

function SMTP_SETTINGS()
{
    if (isset($GLOBALS["SMTP_SETTINGS"])) {
        return $GLOBALS["SMTP_SETTINGS"];
    }
    $sock = new sockets();
    if (!isset($GLOBALS["CACHE_AUTH"])) {
        $GLOBALS["CACHE_AUTH"] = $sock->GET_INFO("ArticaSplashHotSpotCacheAuth");
    }
    if (!isset($GLOBALS["MAX_TIME"])) {
        $GLOBALS["MAX_TIME"] = $sock->GET_INFO("ArticaSplashHotSpotEndTime");
    }
    $users = new usersMenus();
    $ArticaHotSpotSMTP = unserialize(base64_decode($sock->GET_INFO("ArticaHotSpotSMTP")));
    $ArticaHotSpotSMTP = $sock->FillSMTPNotifsDefaults($ArticaHotSpotSMTP);
    $ArticaHotSpotSMTP["ArticaSplashHotSpotEndTime"] = intval($sock->GET_INFO("ArticaSplashHotSpotEndTime"));
    if (!isset($ArticaHotSpotSMTP["REGISTER_MAX_TIME"])) {
        $ArticaHotSpotSMTP["REGISTER_MAX_TIME"] = 5;
    }
    if (!is_numeric($ArticaHotSpotSMTP["REGISTER_MAX_TIME"])) {
        $ArticaHotSpotSMTP["REGISTER_MAX_TIME"] = 5;
    }
    while (list($num, $ligne) = each($ArticaHotSpotSMTP)) {
        if (!$users->CORP_LICENSE) {
            if (preg_match("#^SKIN_#i", trim($num))) {
                $ArticaHotSpotSMTP[$num] = null;
                continue;
            }
        }
        $ArticaHotSpotSMTP[$num] = utf8_decode($ligne);
    }
    if ($ArticaHotSpotSMTP["REGISTER_MAX_TIME"] < 5) {
        $ArticaHotSpotSMTP["REGISTER_MAX_TIME"] = 5;
    }
    if ($ArticaHotSpotSMTP["REGISTER_MESSAGE"] == null) {
        $ArticaHotSpotSMTP["REGISTER_MESSAGE"] = "Hi, in order to activate your account on the HotSpot system,\nclick on the link below";
    }
    if ($ArticaHotSpotSMTP["RECOVER_MESSAGE"] == null) {
        $ArticaHotSpotSMTP["RECOVER_MESSAGE"] = "Hi, in order to recover your password on the HotSpot system,\nclick on the link below";
    }
    if ($ArticaHotSpotSMTP["CONFIRM_MESSAGE"] == null) {
        $ArticaHotSpotSMTP["CONFIRM_MESSAGE"] = "Success\nA message as been sent to you.\nPlease check your WebMail system in order to confirm your registration";
    }
    if ($ArticaHotSpotSMTP["REGISTER_SUBJECT"] == null) {
        $ArticaHotSpotSMTP["REGISTER_SUBJECT"] = "HotSpot account validation";
    }
    if ($ArticaHotSpotSMTP["REGISTER_MESSAGE_SUCCESS"] == null) {
        $ArticaHotSpotSMTP["REGISTER_MESSAGE_SUCCESS"] = "Your Account is Now Validated!<br>Thank you for confirming your email address.";
    }
    if (!isset($ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"])) {
        $ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"] = 0;
    }
    if (!isset($ArticaHotSpotSMTP["ENABLED_SMTP"])) {
        $ArticaHotSpotSMTP["ENABLED_SMTP"] = 0;
    }
    if (!isset($ArticaHotSpotSMTP["REGISTER_MAX_TIME"])) {
        $ArticaHotSpotSMTP["REGISTER_MAX_TIME"] = 5;
    }
    if (!isset($ArticaHotSpotSMTP["SSL_PORTAL"])) {
        $ArticaHotSpotSMTP["SSL_PORTAL"] = 0;
    }
    if (!is_numeric($ArticaHotSpotSMTP["SSL_PORTAL"])) {
        $ArticaHotSpotSMTP["SSL_PORTAL"] = 0;
    }
    if (!is_numeric($ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"])) {
        $ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"] = 0;
    }
    if (!is_numeric($ArticaHotSpotSMTP["ENABLED_SMTP"])) {
        $ArticaHotSpotSMTP["ENABLED_SMTP"] = 0;
    }
    if (!is_numeric($ArticaHotSpotSMTP["REGISTER_MAX_TIME"])) {
        $ArticaHotSpotSMTP["REGISTER_MAX_TIME"] = 5;
    }
    if ($ArticaHotSpotSMTP["REGISTER_MESSAGE"] == null) {
        $ArticaHotSpotSMTP["REGISTER_MESSAGE"] = "Hi, in order to activate your account on the HotSpot system,\nclick on the link below";
    }
    if ($ArticaHotSpotSMTP["RECOVER_MESSAGE"] == null) {
        $ArticaHotSpotSMTP["RECOVER_MESSAGE"] = "Hi, in order to recover your password on the HotSpot system,\nclick on the link below";
    }
    if ($ArticaHotSpotSMTP["CONFIRM_MESSAGE"] == null) {
        $ArticaHotSpotSMTP["CONFIRM_MESSAGE"] = "Success\nA message as been sent to you.\nPlease check your WebMail system in order to confirm your registration<br>\nYour can surf on internet for %s minutes";
    }
    if (trim($ArticaHotSpotSMTP["RECOVER_MESSAGE_CONFIRM"]) == null) {
        $ArticaHotSpotSMTP["RECOVER_MESSAGE_CONFIRM"] = "Success<br>\nA message as been sent to you.<br>\nPlease check your WebMail system in order to recover your password<br>\nYour can surf on internet for %s minutes";
    }
    if (trim($ArticaHotSpotSMTP["RECOVER_MESSAGE_P1"]) == null) {
        $ArticaHotSpotSMTP["RECOVER_MESSAGE_P1"] = "Fill out the form below to change your password";
    }
    if ($ArticaHotSpotSMTP["REGISTER_SUBJECT"] == null) {
        $ArticaHotSpotSMTP["REGISTER_SUBJECT"] = "HotSpot account validation";
    }
    if (!isset($ArticaHotSpotSMTP["REGISTER_MAX_TIME"])) {
        $ArticaHotSpotSMTP["REGISTER_MAX_TIME"] = 5;
    }
    if (!is_numeric($ArticaHotSpotSMTP["REGISTER_MAX_TIME"])) {
        $ArticaHotSpotSMTP["REGISTER_MAX_TIME"] = 5;
    }
    if ($ArticaHotSpotSMTP["REGISTER_MAX_TIME"] < 5) {
        $ArticaHotSpotSMTP["REGISTER_MAX_TIME"] = 5;
    }
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:hotspot.php

示例2: smtp_notifs

function smtp_notifs()
{
    $users = new usersMenus();
    $ini = new Bs_IniHandler();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $t = time();
    $UfdbguardSMTPNotifs = unserialize(base64_decode($sock->GET_INFO("UfdbguardSMTPNotifs")));
    if (!isset($UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"])) {
        $UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"] = 0;
    }
    if (!is_numeric($UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"])) {
        $UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"] = 0;
    }
    $UfdbguardSMTPNotifs = $sock->FillSMTPNotifsDefaults($UfdbguardSMTPNotifs);
    if (!is_numeric($UfdbguardSMTPNotifs["smtp_warn"])) {
        $UfdbguardSMTPNotifs["smtp_warn"] = 0;
    }
    if (!is_numeric($UfdbguardSMTPNotifs["smtp_info"])) {
        $UfdbguardSMTPNotifs["smtp_warn"] = 0;
    }
    if (!is_numeric($UfdbguardSMTPNotifs["smtp_critic"])) {
        $UfdbguardSMTPNotifs["smtp_critic"] = 1;
    }
    //Switchdiv
    $html = "\n\t<div id='notif1-{$t}' class=form style='width:98%'>\n\t\n\t<table style='width:99%' >\n\t<tr>\n\t<td nowrap class=legend style='font-size:14px'>{smtp_enabled}:</strong></td>\n\t<td>" . Field_checkbox("ENABLED_SQUID_WATCHDOG", 1, $UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"], "SMTPNotifArticaEnableSwitch{$t}()") . "</td>\n\t</tr>\n\t\t\t\n\t<tr>\n\t<td nowrap class=legend style='font-size:14px'>{info}:</strong></td>\n\t<td>" . Field_checkbox("smtp_info", 1, $UfdbguardSMTPNotifs["smtp_info"]) . "</td>\n\t</tr>\n\t<tr>\n\t<td nowrap class=legend style='font-size:14px'>{warning}:</strong></td>\n\t<td>" . Field_checkbox("smtp_warn", 1, $UfdbguardSMTPNotifs["smtp_warn"]) . "</td>\n\t</tr>\n\t<tr>\n\t<td nowrap class=legend style='font-size:14px'>{critical}:</strong></td>\n\t<td>" . Field_checkbox("smtp_critic", 1, $UfdbguardSMTPNotifs["smtp_critic"]) . "</td>\n\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:14px'>{smtp_server_name}:</strong></td>\n\t\t<td>" . Field_text('smtp_server_name', trim($UfdbguardSMTPNotifs["smtp_server_name"]), 'font-size:14px;padding:3px;width:250px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:14px'>{smtp_server_port}:</strong></td>\n\t\t<td>" . Field_text('smtp_server_port', trim($UfdbguardSMTPNotifs["smtp_server_port"]), 'font-size:14px;padding:3px;width:40px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:14px'>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text('smtp_sender', trim($UfdbguardSMTPNotifs["smtp_sender"]), 'font-size:14px;padding:3px;width:290px') . "</td>\n\t\t\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:14px'>{smtp_dest}:</strong></td>\n\t\t<td>" . Field_text('smtp_dest', trim($UfdbguardSMTPNotifs["smtp_dest"]), 'font-size:14px;padding:3px;width:290px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:14px'>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text('smtp_auth_user', trim($UfdbguardSMTPNotifs["smtp_auth_user"]), 'font-size:14px;padding:3px;width:200px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:14px'>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password("smtp_auth_passwd-{$t}", trim($UfdbguardSMTPNotifs["smtp_auth_passwd"]), 'font-size:14px;padding:3px;width:200px') . "</td>\n\t\t\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:14px'>{tls_enabled}:</strong></td>\n\t\t<td>" . Field_checkbox("tls_enabled", 1, $UfdbguardSMTPNotifs["tls_enabled"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:14px'>{UseSSL}:</strong></td>\n\t\t<td>" . Field_checkbox("ssl_enabled", 1, $UfdbguardSMTPNotifs["ssl_enabled"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' colspan=2>" . button('{apply}', "SaveArticaSMTPNotifValues{$t}();", 16) . "</td>\n\t</tr>\n</table>\n</div>\n<script>\nvar x_SaveArticaSMTPNotifValues{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);}\n\tLoadjs('squid.proxy.watchdog.smtp.progress.php');\n\tRefreshTab('watchdogsquid');\n}\n\t\n\tfunction SaveArticaSMTPNotifValues{$t}(){\n\tvar XHR = new XHRConnection();\n\tvar pp=encodeURIComponent(document.getElementById('smtp_auth_passwd-{$t}').value);\n\tif(document.getElementById('ENABLED_SQUID_WATCHDOG').checked){XHR.appendData('ENABLED_SQUID_WATCHDOG',1);}else {XHR.appendData('ENABLED_SQUID_WATCHDOG',0);}\n\tif(document.getElementById('tls_enabled').checked){XHR.appendData('tls_enabled',1);}else {XHR.appendData('tls_enabled',0);}\n\tif(document.getElementById('ssl_enabled').checked){XHR.appendData('ssl_enabled',1);}else {XHR.appendData('ssl_enabled',0);}\n\t\n\tif(document.getElementById('smtp_warn').checked){XHR.appendData('smtp_warn',1);}else {XHR.appendData('smtp_warn',0);}\n\tif(document.getElementById('smtp_info').checked){XHR.appendData('smtp_info',1);}else {XHR.appendData('smtp_info',0);}\n\tif(document.getElementById('smtp_critic').checked){XHR.appendData('smtp_critic',1);}else {XHR.appendData('smtp_critic',0);}\n\t\n\tXHR.appendData('smtp_server_name',document.getElementById('smtp_server_name').value);\n\tXHR.appendData('smtp_server_port',document.getElementById('smtp_server_port').value);\n\tXHR.appendData('smtp_sender',document.getElementById('smtp_sender').value);\n\tXHR.appendData('smtp_dest',document.getElementById('smtp_dest').value);\n\tXHR.appendData('smtp_auth_user',document.getElementById('smtp_auth_user').value);\n\tXHR.appendData('smtp_auth_passwd',pp);\n\tXHR.appendData('smtp_notifications','yes');\n\t\n\tXHR.sendAndLoad('{$page}', 'POST',x_SaveArticaSMTPNotifValues{$t});\n\t}\n\t\n\tfunction SMTPNotifArticaEnableSwitch{$t}(){\n\tdocument.getElementById('smtp_auth_passwd-{$t}').disabled=true;\n\tdocument.getElementById('smtp_auth_user').disabled=true;\n\tdocument.getElementById('smtp_dest').disabled=true;\n\tdocument.getElementById('smtp_sender').disabled=true;\n\tdocument.getElementById('smtp_server_port').disabled=true;\n\tdocument.getElementById('smtp_server_name').disabled=true;\n\tdocument.getElementById('tls_enabled').disabled=true;\n\tdocument.getElementById('ssl_enabled').disabled=true;\n\t\n\tdocument.getElementById('smtp_critic').disabled=true;\n\tdocument.getElementById('smtp_info').disabled=true;\n\tdocument.getElementById('smtp_warn').disabled=true;\n\t\n\t\n\t\n\tif(!document.getElementById('ENABLED_SQUID_WATCHDOG').checked){return;}\n\t\n\tdocument.getElementById('smtp_auth_passwd-{$t}').disabled=false;\n\tdocument.getElementById('smtp_auth_user').disabled=false;\n\tdocument.getElementById('smtp_dest').disabled=false;\n\tdocument.getElementById('smtp_sender').disabled=false;\n\tdocument.getElementById('smtp_server_port').disabled=false;\n\tdocument.getElementById('smtp_server_name').disabled=false;\n\tdocument.getElementById('tls_enabled').disabled=false;\n\tdocument.getElementById('ssl_enabled').disabled=false;\n\tdocument.getElementById('smtp_critic').disabled=false;\n\tdocument.getElementById('smtp_info').disabled=false;\n\tdocument.getElementById('smtp_warn').disabled=false;\n\t\n\t}\n\tSMTPNotifArticaEnableSwitch{$t}();\n\t</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:29,代码来源:squid.watchdog.php

示例3: smtp_notifs

function smtp_notifs(){
	$users=new usersMenus();
	$ini=new Bs_IniHandler();
	$page=CurrentPageName();
	$tpl=new templates();
	$sock=new sockets();

	$t=time();
	$ArticaHotSpotSMTP=unserialize(base64_decode($sock->GET_INFO("ArticaHotSpotSMTP")));
	$ArticaHotSpotSMTP=$sock->FillSMTPNotifsDefaults($ArticaHotSpotSMTP);
	
	if(!isset($ArticaHotSpotSMTP["SSL_PORTAL"])){$ArticaHotSpotSMTP["SSL_PORTAL"]=0;}
	if(!is_numeric($ArticaHotSpotSMTP["SSL_PORTAL"])){$ArticaHotSpotSMTP["SSL_PORTAL"]=0;}
	if(!isset($ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"])){$ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"]=0;}
	if(!isset($ArticaHotSpotSMTP["ENABLED_SMTP"])){$ArticaHotSpotSMTP["ENABLED_SMTP"]=0;}
	if(!isset($ArticaHotSpotSMTP["REGISTER_MAX_TIME"])){$ArticaHotSpotSMTP["REGISTER_MAX_TIME"]=5;}
	
	
	if(!is_numeric($ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"])){$ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"]=0;}
	if(!is_numeric($ArticaHotSpotSMTP["ENABLED_SMTP"])){$ArticaHotSpotSMTP["ENABLED_SMTP"]=0;}
	if(!is_numeric($ArticaHotSpotSMTP["REGISTER_MAX_TIME"])){$ArticaHotSpotSMTP["REGISTER_MAX_TIME"]=5;}
	if($ArticaHotSpotSMTP["REGISTER_MESSAGE_EXPLAIN"]==null){$ArticaHotSpotSMTP["REGISTER_MESSAGE_EXPLAIN"]="As an customer, you can avail of free access to Internet by registering here.<br>After filling the form you will have access to a short period in order to confirm your registration";}
	if($ArticaHotSpotSMTP["REGISTER_MESSAGE"]==null){$ArticaHotSpotSMTP["REGISTER_MESSAGE"]="Hi, in order to activate your account on the HotSpot system,\nclick on the link below";}
	if($ArticaHotSpotSMTP["REGISTER_MESSAGE_SUCCESS"]==null){$ArticaHotSpotSMTP["REGISTER_MESSAGE_SUCCESS"]="Your Account is Now Validated!<br>Thank you for confirming your email address.";}
	if($ArticaHotSpotSMTP["RECOVER_MESSAGE"]==null){$ArticaHotSpotSMTP["RECOVER_MESSAGE"]="Hi, in order to recover your password on the HotSpot system,\nclick on the link below";}
	if($ArticaHotSpotSMTP["CONFIRM_MESSAGE"]==null){$ArticaHotSpotSMTP["CONFIRM_MESSAGE"]="Success\nA message as been sent to you.\nPlease check your WebMail system in order to confirm your registration<br>\nYour can surf on internet for %s minutes";}
	if(trim($ArticaHotSpotSMTP["RECOVER_MESSAGE_CONFIRM"])==null){$ArticaHotSpotSMTP["RECOVER_MESSAGE_CONFIRM"]="Success<br>\nA message as been sent to you.<br>\nPlease check your WebMail system in order to recover your password<br>\nYour can surf on internet for %s minutes";}
	if(trim($ArticaHotSpotSMTP["RECOVER_MESSAGE_P1"])==null){$ArticaHotSpotSMTP["RECOVER_MESSAGE_P1"]="Fill out the form below to change your password";}
	if(trim($ArticaHotSpotSMTP["TERMS_EXPLAIN"])==null){$ArticaHotSpotSMTP["TERMS_EXPLAIN"]="To signup you are required to read our \"TERMS and CONDITIONS\".<br>Once you have read these terms and conditions please click \"ACCEPT\" acknowledging you understand and accept these terms and conditions.";}
	if(trim($ArticaHotSpotSMTP["TERMS_CONDITIONS"])==null){$ArticaHotSpotSMTP["TERMS_CONDITIONS"]=@file_get_contents("ressources/databases/wifi-terms.txt");}
	if(trim($ArticaHotSpotSMTP["SSL_PORTAL_EXPLAIN"])==null){$ArticaHotSpotSMTP["SSL_PORTAL_EXPLAIN"]="For security reasons We need to hook HTTPS websites.<br>This behavior will generate browser warning when surfing trough HTTPS websites.<br>In order to remove this warning, we suggest to download the certificate by clicking on the &laquo;Download certificate&raquo; button and import it in your prefered browser the trusted SSL certificates section.";}
 
	
	
	
	if($ArticaHotSpotSMTP["REGISTER_SUBJECT"]==null){$ArticaHotSpotSMTP["REGISTER_SUBJECT"]="HotSpot account validation";}
	if($ArticaHotSpotSMTP["REGISTER_MAX_TIME"]<5){$ArticaHotSpotSMTP["REGISTER_MAX_TIME"]=5;}
	
	$Timez[5]="5 {minutes}";
	$Timez[10]="10 {minutes}";
	$Timez[15]="15 {minutes}";
	$Timez[30]="30 {minutes}";
	$Timez[60]="1 {hour}";

	//Switchdiv

	$html="
	<div id='notif1-$t' class=form style='width:98%'>
	". Paragraphe_switch_img("{enable_hotspot_smtp}", "{enable_hotspot_smtp_explain}","ENABLED_SMTP",$ArticaHotSpotSMTP["ENABLED_SMTP"],null,750)."
	
	<table style='width:99%' >
	
	
	

	<tr>
		<td class=legend style='font-size:22px'>{smtp_register_subject}:</td>
		<td style='width:620px'><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='REGISTER_SUBJECT-$t'>{$ArticaHotSpotSMTP["REGISTER_SUBJECT"]}</textarea>
		</td>
	</tr>	
	<tr>
		<td class=legend style='font-size:22px'>{smtp_register_message}:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='REGISTER_MESSAGE-$t'>{$ArticaHotSpotSMTP["REGISTER_MESSAGE"]}</textarea>
		</td>
	</tr>
	<tr>
		<td class=legend style='font-size:22px'>{smtp_register_message_success}:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='REGISTER_MESSAGE_SUCCESS-$t'>{$ArticaHotSpotSMTP["REGISTER_MESSAGE_SUCCESS"]}</textarea>
		</td>
	</tr>	
	

	<tr>
		<td class=legend style='font-size:22px'>{smtp_recover_message}:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='RECOVER_MESSAGE-$t'>{$ArticaHotSpotSMTP["RECOVER_MESSAGE"]}</textarea>
		</td>
	</tr>	
	
	<tr>
		<td class=legend style='font-size:22px'>{smtp_recover_message_confirmation}:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='RECOVER_MESSAGE_CONFIRM-$t'>{$ArticaHotSpotSMTP["RECOVER_MESSAGE_CONFIRM"]}</textarea>
		</td>
	</tr>
		
	<tr>
		<td class=legend style='font-size:22px'>{smtp_confirm}:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='CONFIRM_MESSAGE-$t'>{$ArticaHotSpotSMTP["CONFIRM_MESSAGE"]}</textarea>
		</td>
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:squid.webauth.smtp.php

示例4: nas_parameters

function nas_parameters()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $sock = new sockets();
    $CyrusBackupNas = unserialize(base64_decode($sock->GET_INFO("CyrusBackupNas")));
    if (!is_numeric($CyrusBackupNas["maxcontainer"])) {
        $CyrusBackupNas["maxcontainer"] = 3;
    }
    $test_nas = $tpl->javascript_parse_text("{test_connection}");
    $CyrusBackupSMTP = $sock->FillSMTPNotifsDefaults($CyrusBackupNas);
    $t = time();
    $html = "\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{hostname}:</td>\n\t\t<td>" . Field_text("hostname-{$t}", $CyrusBackupNas["hostname"], "font-size:16px;width:300px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{shared_folder}:</td>\n\t\t<td>" . Field_text("folder-{$t}", $CyrusBackupNas["folder"], "font-size:16px;width:300px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{username}:</td>\n\t\t<td>" . Field_text("username-{$t}", $CyrusBackupNas["username"], "font-size:16px;width:200px") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{password}:</td>\n\t\t<td>" . Field_password("password-{$t}", $CyrusBackupNas["password"], "font-size:16px;width:200px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{max_containers}:</td>\n\t\t<td>" . Field_text("maxcontainer-{$t}", $CyrusBackupNas["maxcontainer"], "font-size:16px;width:90px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2><div style='font-size:22px;margin-bottom:15px'>{smtp_notifications}</div></td>\t\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{enable_smtp_notifications}:</td>\n\t\t<td>" . Field_checkbox("{$t}-notifs", 1, $CyrusBackupNas["notifs"], "notifsCheck{$t}()") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{smtp_server_name}:</strong></td>\n\t\t<td>" . Field_text("smtp_server_name-{$t}", trim($CyrusBackupSMTP["smtp_server_name"]), 'font-size:16px;padding:3px;width:250px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{smtp_server_port}:</strong></td>\n\t\t<td>" . Field_text("smtp_server_port-{$t}", trim($CyrusBackupSMTP["smtp_server_port"]), 'font-size:16px;padding:3px;width:40px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text("smtp_sender-{$t}", trim($CyrusBackupSMTP["smtp_sender"]), 'font-size:16px;padding:3px;width:290px') . "</td>\n\t\t\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{smtp_dest}:</strong></td>\n\t\t<td>" . Field_text("smtp_dest-{$t}", trim($CyrusBackupSMTP["smtp_dest"]), 'font-size:16px;padding:3px;width:290px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text("smtp_auth_user-{$t}", trim($CyrusBackupSMTP["smtp_auth_user"]), 'font-size:16px;padding:3px;width:200px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password("smtp_auth_passwd-{$t}", trim($CyrusBackupSMTP["smtp_auth_passwd"]), 'font-size:16px;padding:3px;width:200px') . "</td>\n\t\t\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{tls_enabled}:</strong></td>\n\t\t<td>" . Field_checkbox("tls_enabled-{$t}", 1, $CyrusBackupSMTP["tls_enabled"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{UseSSL}:</strong></td>\n\t\t<td>" . Field_checkbox("ssl_enabled-{$t}", 1, $CyrusBackupSMTP["ssl_enabled"]) . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 18) . "&nbsp;" . button("{$test_nas}", "Loadjs('{$page}?test-nas-js=yes');", 18) . "</td>\t\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);}\n\tUnlockPage();\n}\n\t\n\t\nfunction Save{$t}(){\n\tLockPage();\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('parameters-save','yes');\n\tXHR.appendData('hostname',encodeURIComponent(document.getElementById('hostname-{$t}').value));\n\tXHR.appendData('folder',encodeURIComponent(document.getElementById('folder-{$t}').value));\n\tXHR.appendData('username',encodeURIComponent(document.getElementById('username-{$t}').value));\n\tXHR.appendData('password',encodeURIComponent(document.getElementById('password-{$t}').value));\n\t\n\tvar tls_enabled=0;\n\tvar ssl_enabled=0;\n\tvar notifs=0;\n\t\n\tif(document.getElementById('tls_enabled-{$t}').checked){tls_enabled=1;}\n\tif(document.getElementById('ssl_enabled-{$t}').checked){ssl_enabled=1;}\n\tif(document.getElementById('notifs-{$t}').checked){notifs=1;}\n\tXHR.appendData('smtp_server_name',encodeURIComponent(document.getElementById('smtp_server_name-{$t}').value));\n\tXHR.appendData('smtp_server_port',encodeURIComponent(document.getElementById('smtp_server_port-{$t}').value));\n\tXHR.appendData('smtp_sender',encodeURIComponent(document.getElementById('smtp_sender-{$t}').value));\n\tXHR.appendData('smtp_auth_user',encodeURIComponent(document.getElementById('smtp_auth_user-{$t}').value));\n\tXHR.appendData('smtp_auth_passwd',encodeURIComponent(document.getElementById('smtp_auth_passwd-{$t}').value));\n\t\n\tXHR.appendData('tls_enabled',tls_enabled);\n\tXHR.appendData('ssl_enabled',ssl_enabled);\n\tXHR.appendData('notifs',notifs);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n\nfunction notifsCheck{$t}(){\n\tdocument.getElementById('smtp_auth_passwd-{$t}').disabled=true;\n\tdocument.getElementById('smtp_auth_user-{$t}').disabled=true;\n\tdocument.getElementById('smtp_dest-{$t}').disabled=true;\n\tdocument.getElementById('smtp_sender-{$t}').disabled=true;\n\tdocument.getElementById('smtp_server_port-{$t}').disabled=true;\n\tdocument.getElementById('smtp_server_name-{$t}').disabled=true;\n\tdocument.getElementById('tls_enabled-{$t}').disabled=true;\n\tdocument.getElementById('ssl_enabled-{$t}').disabled=true;\n\n\tif( document.getElementById('{$t}-notifs').checked){\n\t\tdocument.getElementById('smtp_auth_passwd-{$t}').disabled=false;\n\t\tdocument.getElementById('smtp_auth_user-{$t}').disabled=false;\n\t\tdocument.getElementById('smtp_dest-{$t}').disabled=false;\n\t\tdocument.getElementById('smtp_sender-{$t}').disabled=false;\n\t\tdocument.getElementById('smtp_server_port-{$t}').disabled=false;\n\t\tdocument.getElementById('smtp_server_name-{$t}').disabled=false;\n\t\tdocument.getElementById('tls_enabled-{$t}').disabled=false;\n\t\tdocument.getElementById('ssl_enabled-{$t}').disabled=false;\n\t}\t\n\t\n}\nnotifsCheck{$t}();\n\n</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:15,代码来源:cyrus.backup-nas.php

示例5: smtp_notifs

function smtp_notifs()
{
    $users = new usersMenus();
    $ini = new Bs_IniHandler();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $t = time();
    $ArticaHotSpotSMTP = unserialize(base64_decode($sock->GET_INFO("ArticaHotSpotSMTP")));
    $ArticaHotSpotSMTP = $sock->FillSMTPNotifsDefaults($ArticaHotSpotSMTP);
    if (!isset($ArticaHotSpotSMTP["SSL_PORTAL"])) {
        $ArticaHotSpotSMTP["SSL_PORTAL"] = 0;
    }
    if (!is_numeric($ArticaHotSpotSMTP["SSL_PORTAL"])) {
        $ArticaHotSpotSMTP["SSL_PORTAL"] = 0;
    }
    if ($ArticaHotSpotSMTP["REGISTER_MESSAGE"] == null) {
        $ArticaHotSpotSMTP["REGISTER_MESSAGE"] = "Hi, in order to activate your account on the HotSpot system,\nclick on the link below";
    }
    if ($ArticaHotSpotSMTP["RECOVER_MESSAGE"] == null) {
        $ArticaHotSpotSMTP["RECOVER_MESSAGE"] = "Hi, in order to recover your password on the HotSpot system,\nclick on the link below";
    }
    if (trim($ArticaHotSpotSMTP["RECOVER_MESSAGE_CONFIRM"]) == null) {
        $ArticaHotSpotSMTP["RECOVER_MESSAGE_CONFIRM"] = "Success<br>\nA message as been sent to you.<br>\nPlease check your WebMail system in order to recover your password<br>\nYour can surf on internet for %s minutes";
    }
    if (trim($ArticaHotSpotSMTP["RECOVER_MESSAGE_P1"]) == null) {
        $ArticaHotSpotSMTP["RECOVER_MESSAGE_P1"] = "Fill out the form below to change your password";
    }
    if (trim($ArticaHotSpotSMTP["TERMS_EXPLAIN"]) == null) {
        $ArticaHotSpotSMTP["TERMS_EXPLAIN"] = "To signup you are required to read our \"TERMS and CONDITIONS\".<br>Once you have read these terms and conditions please click \"ACCEPT\" acknowledging you understand and accept these terms and conditions.";
    }
    if (trim($ArticaHotSpotSMTP["TERMS_CONDITIONS"]) == null) {
        $ArticaHotSpotSMTP["TERMS_CONDITIONS"] = @file_get_contents("ressources/databases/wifi-terms.txt");
    }
    if (trim($ArticaHotSpotSMTP["SSL_PORTAL_EXPLAIN"]) == null) {
        $ArticaHotSpotSMTP["SSL_PORTAL_EXPLAIN"] = "For security reasons We need to hook HTTPS websites.<br>This behavior will generate browser warning when surfing trough HTTPS websites.<br>In order to remove this warning, we suggest to download the certificate by clicking on the &laquo;Download certificate&raquo; button and import it in your prefered browser the trusted SSL certificates section.";
    }
    $Timez[5] = "5 {minutes}";
    $Timez[10] = "10 {minutes}";
    $Timez[15] = "15 {minutes}";
    $Timez[30] = "30 {minutes}";
    $Timez[60] = "1 {hour}";
    //Switchdiv
    $html = "\n\t<div id='notif1-{$t}' class=form style='width:98%'>\n\n\t\n\t<table style='width:99%' >\n\t\n\t\n\t\n\n\n\n\n\t\n\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_recover_message}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='RECOVER_MESSAGE-{$t}'>{$ArticaHotSpotSMTP["RECOVER_MESSAGE"]}</textarea>\n\t\t</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_recover_message_confirmation}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='RECOVER_MESSAGE_CONFIRM-{$t}'>{$ArticaHotSpotSMTP["RECOVER_MESSAGE_CONFIRM"]}</textarea>\n\t\t</td>\n\t</tr>\n\t\t\n\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{recover_password_message}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='RECOVER_MESSAGE_P1-{$t}'>{$ArticaHotSpotSMTP["RECOVER_MESSAGE_P1"]}</textarea>\n\t\t</td>\n\t</tr>\n\t\n\t\n\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_server_name}:</strong></td>\n\t\t<td>" . Field_text("smtp_server_name-{$t}", trim($ArticaHotSpotSMTP["smtp_server_name"]), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_server_port}:</strong></td>\n\t\t<td>" . Field_text('smtp_server_port', trim($ArticaHotSpotSMTP["smtp_server_port"]), 'font-size:22px;padding:3px;width:110px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text('smtp_sender', trim($ArticaHotSpotSMTP["smtp_sender"]), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\n\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text('smtp_auth_user', trim($ArticaHotSpotSMTP["smtp_auth_user"]), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password("smtp_auth_passwd-{$t}", trim($ArticaHotSpotSMTP["smtp_auth_passwd"]), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t\t\t\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{tls_enabled}:</strong></td>\n\t\t<td>" . Field_checkbox_design("tls_enabled", 1, $ArticaHotSpotSMTP["tls_enabled"]) . "</td>\n\t\t</tr>\n\t<tr>\n\t\t<td align='right' colspan=2>\n\t\t\t\t\n\t\t\t\t" . button('{test}', "TestSMTP{$t}();", 32) . "&nbsp;" . button('{apply}', "SaveArticaSMTPNotifValues{$t}();", 32) . "</td>\n\t</tr>\n</table>\n</div>\n<script>\n\nfunction TestSMTP{$t}(){\n\tSaveArticaSMTPNotifValues{$t}();\n\tLoadjs('{$page}?test-smtp-js=yes');\n}\n\n\nvar x_SaveArticaSMTPNotifValues{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);}\n}\n\nfunction SaveArticaSMTPNotifValues{$t}(){\n\tvar XHR = new XHRConnection();\n\tvar pp=encodeURIComponent(document.getElementById('smtp_auth_passwd-{$t}').value);\n\tif(document.getElementById('tls_enabled').checked){XHR.appendData('tls_enabled',1);}else {XHR.appendData('tls_enabled',0);}\n\t\n\t\n\tXHR.appendData('RECOVER_MESSAGE',document.getElementById('RECOVER_MESSAGE-{$t}').value);\n\tXHR.appendData('RECOVER_MESSAGE_CONFIRM',document.getElementById('RECOVER_MESSAGE_CONFIRM-{$t}').value);\n\t\n\t\n\t\n\tXHR.appendData('RECOVER_MESSAGE_P1',document.getElementById('RECOVER_MESSAGE_P1-{$t}').value);\n\t\n\tXHR.appendData('smtp_server_name',document.getElementById('smtp_server_name-{$t}').value);\n\tXHR.appendData('smtp_server_port',document.getElementById('smtp_server_port').value);\n\tXHR.appendData('smtp_sender',document.getElementById('smtp_sender').value);\n\tXHR.appendData('smtp_auth_user',document.getElementById('smtp_auth_user').value);\n\tXHR.appendData('smtp_auth_passwd',pp);\n\tXHR.appendData('smtp_notifications','yes');\n\tXHR.sendAndLoad('{$page}', 'POST',x_SaveArticaSMTPNotifValues{$t});\n}\n\n\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:46,代码来源:squid.webauth.smtp.php


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