邮件服务器-邮件系统-邮件技术论坛(BBS)

 找回密码
 会员注册
查看: 15132|回复: 8
打印 上一主题 下一主题

MDaemon 自定义登陆网页。

[复制链接]
跳转到指定楼层
顶楼
发表于 2004-12-25 00:28:20 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
将下面的代码保存为一个HTM文件:<br>
<br>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br>
<br>
<html><br>
<head><br>
<title>WorldClient Login JavaScript Plugin Script Read Me File</title><br>
<STYLE><br>
body,p{font-family:tahoma,arial,helvetica,sans-serif;}<br>
code{font-family:courier;background-color:lightgrey;}<br>
</STYLE><br>
<br>
</head><br>
<br>
<body><br>
<h2><br>
WorldClient Login JavaScript Plugin Script ReadMe File<br>
</h2><br>
<p><br>
This WorldClient Login JavaScript Plugin script is made available 'as is,'<br>
it implies no warranties and in no way removes the responsiblity of <br>
using such scripts from the administrator of the site using it. <br>
</p><br>
<p><br>
That being said, this script is<br>
</p><br>
<ul><br>
<li>Light weight</li><br>
<li>Cross Platform</li><br>
<li>Customizable</li><br>
<li>Intuitive</li><br>
<li>Should be showing up below this on the page</li><br>
</ul><br>
<SCRIPT LANGUAGE="javascript" TYPE="text/javascript" SRC="WC_Login.js"></SCRIPT><br>
<h2>Features</h2><br>
<p><br>
The WorldClient Login JavaScript Plugin script allows you to add to any page a login to your WorldClient server. <br>
It also allows the user, through the use of cookies to login with the click of a link after they have set the cookie.<br>
If the user is concerned with cookies, a cookie is not necasary, or the cookie can be removed by clicking on the "Forget Me" link once the cookie has been set.<br>
</p><br>
<H2>Set up</H2><br>
<p>Setting up the plug-in and using it is as simple as opening up the WC_Login.js file with a text editor and changing a few simple variables. <br>
Once those variables have been set you will need to add the following line of code to any page that you wish to add the login panel to.<br>
</p><br>
<code><br>
<script language="javascript 1.2" type="text/javascript" src="[path/]WC_Login.js"></script><br>
</code><br>
<H3>Script Setting Variables</H3><br>
<p><b>wcURL</b> - The URL to the WorldClient server and its DLL. <br>
<BR><br>
<I>Example:</I> <code>'http:\/\/localhost:3000/WorldClient.dll?View=Main'</code><br>
<BR><br>
<i><B>Note</B></i> Remember to escape the correct characters and to add the "?View=Main" to the URL or you will get errors.<br>
<p><br>
<B>WCDate</B> - The number of days until the cookie should expire.<br>
For example <code>30</code> would set the cookie for 30 days from the point of logging into the account.<br>
</p><br>
<p><B>WCpath</B> - Setting the path limits the directories that the cookie will be accessible to on your web server.</p><br>
<p><B>WCdomain</B> - The domain to which this cookie belongs, i.e. <code>'.altn.com'</code></p><br>
<p><B>WCsecure</B> - Set to <code>true</code> to require a secure connection</p><br>
<br>
<h3>WorldClient Login Plug-in CSS variables</h3><br>
<br>
<p><B>WCtableWidth</B> - The Cascading Stylesheet setting for the width of the WorldClient table. <br>
<br><i>Examples:</i> <code>'120px','20%' or '5cm'</code></p><br>
<p><B>WCFont</B> - The name of the font that you wish to use in the login panel. <br>
<BR><I>Example:</I> <code>'tahoma'</code></p><br>
<p><B>WCborder</B> - The CSS Border setting for the login panel.<br>
<BR><I>Example:</I> <code>'2px dotted navy'</code>, <code>'0px none'</code> or <code>'5px inset'</code></p><br>
<p><B>WCBannerColor</B> - The color of the header that says 'WorldClient'.<br>
<BR><I>Example:</I><code>'gold'</code></p><br>
<p><B>WCBannerTextColor</B> - The color of the text for the header that says 'WorldClient'.<br>
<BR><I>Example:</I><code>'black'</code></p><br>
</p><br>
</body><br>
</html><br>
9
发表于 2007-8-15 22:17:48 | 只看该作者

看不懂啊,能具体点吗?我很想要的,谢了!!!1

8
发表于 2007-8-9 17:08:32 | 只看该作者
谢谢了,我试试
7
发表于 2007-8-1 16:26:12 | 只看该作者
老大,现在我也正在做这个功能,就是我们这个邮件服务器有10几个公司用着了,我想每个公司一登陆他们的油箱,就出现我给他们做的那个页面(当然不同的公司有不同的页面),所以我想你把你做的那个功能能说具体点吗????让我参考参考
地板
发表于 2007-2-2 17:44:32 | 只看该作者
我还是先学会基本的吧,,这些以后有机会再弄吧,谢谢楼主的无私共享呀
报纸
发表于 2006-2-10 10:30:17 | 只看该作者

re:有理

有理
板凳
发表于 2004-12-25 08:48:13 | 只看该作者

re:唉!这不是官方提供的登录,我看过,感觉不...

唉!这不是官方提供的登录,我看过,感觉不好控制其样式
藤椅
发表于 2004-12-25 08:11:19 | 只看该作者

re:[FLY]好帖子2我就顶[/FLY]

<MARQUEE>好帖子2我就顶</MARQUEE>
沙发
 楼主| 发表于 2004-12-25 00:29:04 | 只看该作者

re:将下面代码保存为:WC_Login.js...

将下面代码保存为:WC_Login.js

/*WorldClient Login JScript Plug-in
Copyright 2002 Alt-n Technologies, LLC.

LOGIN VARIABLES */
var wcURL = 'http:\/\/localhost:3000/WorldClient.dll?View=Main';// URL to your WorldClient application
var WCDate = 30;// Number of days until expiry
var WCpath;// Setting the path limits the directories that the cookie will be accessible to
var WCdomain;// The domain to which this cookie belongs, i.e. '.altn.com'
var WCsecure;// Set to 'true' to require a secure connection
// WORLDCLIENT LOGIN CSS ATTRIBUTES
var WCtableWidth = '120px';
var WCFont = 'tahoma';
var WCborder = '2px dashed navy';
var WCBannerColor = 'gold';
var WCBannerTextColor = 'black';

function WCLogin(formObj){if(formObj.setCookie.checked){WCsetCookie('myWCUserName',formObj.User.value);WCsetCookie('myWCPassword',formObj.Password.value);}if(formObj.goToMailbox.checked){formObj.submit();}else{document.location.href=document.location.href;}}
function WCgetCookie(str){var WCCookie = document.cookie.split("; ");for (var i=0; i < WCCookie.length; i++){var wcCookie = WCCookie.split("=");if (str == wcCookie[0]){return (wcCookie[1]);}}return null;}
function WCsetCookie(strKey, strVal){var WCexpiry = new Date();WCexpiry.setTime(WCexpiry.getTime()+(60*1000*60*24*WCDate));document.cookie=strKey+"="+strVal +";expires="+WCexpiry.toGMTString()+((WCpath)?";path="+WCpath:"")+((WCdomain)?";domain="+WCdomain:"")+((WCsecure)?";secure":"");}
function WCRmCookie(){WCsetCookie('myWCUserName','');WCsetCookie('myWCPassword','');document.location.href=document.location.href;}
var WCUser = WCgetCookie("myWCUserName");var WCPass = WCgetCookie("myWCPassword");

var WCoutput = '[table][tr]'+
'[/tr][/table][table][tr]' +
'[td]WorldClient[/td][/tr]';
if(WCUser==null && WCPass==null){WCoutput += '[tr][td]Email Address[/td][/tr][tr][td][/td][/tr][tr][td]Password[/td][/tr][tr][td][/td][/tr][tr]' +
'[td]Remember Me[/td][/tr][tr][td]Go To Mailbox[/td][/tr][tr]' +
'[td][/td][/tr][/table]';
}else{WCoutput += '[tr][td]Go To Mailbox[/td][/tr][tr]' +
'[td]Forget Me[/td][/tr][/table]';}
document.write(WCoutput);
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

小黑屋|手机版|Archiver|邮件技术资讯网

GMT+8, 2026-8-5 21:48

Powered by Discuz! X3.2

© 2001-2016 Comsenz Inc.

本论坛为非盈利中立机构,所有言论属发表者个人意见,不代表本论坛立场。内容所涉及版权和法律相关事宜请参考各自所有者的条款。
如认定侵犯了您权利,请联系我们。本论坛原创内容请联系后再行转载并务必保留我站信息。此声明修改不另行通知,保留最终解释权。
*本论坛会员专属QQ群:邮件技术资讯网会员QQ群
*本论坛会员备用QQ群:邮件技术资讯网备用群

快速回复 返回顶部 返回列表