<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%//@ include file="/sessionInfo.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>

<%
/*
    SzData szData = null;     
    SzDataInfo dataInfo = null;     
    szData = new SzData();
    String sTable = "BD_XINLE_YINGYUN_QITA_LOGIN_EMAIL";		//表名
    String sFieldID = "XXMC1";	//关键字段
    String sFieldName = "XXMC2";     //邮件登陆名称
    String sFieldType = "XXMC4";	//用户ID
    String sFieldDesc = "XXMC3";	//邮件密码

    szData.setTableInfo(sTable,  sFieldID,  sFieldName,  sFieldType, sFieldDesc);   
    String sCond = sFieldType + "=" + iDLID_SESSION;
    dataInfo = (SzDataInfo)szData.getInfoByCond(sCond);
    if (dataInfo == null){
	out.println("没有对应的邮箱用户信息！");
	//out.println(sCond);
	return;
    }
    //邮件登陆名称
    String mailName = dataInfo.getName();
    String mailPass = dataInfo.getDesc();
	//System.out.println(mailName + "==" + mailPass);
*/

    //用户名：liuwei
    //密码：1
    String mailName = "liuwei";
    String mailPass = "1";
%>
<!-- 
<input type="text" name="mailName" value="<%=mailName%>">
<input type="text" name="mailPass" value="<%=mailPass%>">
 -->
<input type="text" name="username" value="<%=mailName%>">
<input type="text" name="password" value="<%=mailPass%>">

<SCRIPT  LANGUAGE="JavaScript"> 

function goEmail_onclick(){ 
	//http://localhost:8080/oa/mail/other.jsp

	var   vhref="http://www.szsunlight.com:81/owa/";        //定义你的exchange 2000 server OWA路径 
        //var   strMailSvrDomain=Application("www.szsunlight.com");//域名
	var   auth =  new  ActiveXObject("msxml2.xmlhttp");    //创建msxml2.xmlhttp对象 
	auth.open("GET",vhref,false, "liuwei","1");//auth的open方法，用HTML页面里的login form里的name和pwd,以及Location作为参数 
	auth.send();                                          //auth的send   方法。 

	switch(auth.status){                                   //检测auth.send以后的状态， 
	case   200:                                          //状态为：200代表用户名密码正确， 
		document.location.href=vhref;          //浏览器重转向至exchange 2000 server OWA 
	        //window.open(vhref,'','TOP=40,LEFT=80,scrollbars=yes,resizable=yes,width=800,height=600') ;//重新弹出新窗口,显示邮件内容 
		break; 
	case   401:                                     //状态为：401代表用户名密码不正确，身份验证错误 
		alert("用户OA帐号密码与邮件帐号密码不同步！");       //报错 
		break; 
		default:                                        //其它状态，如服务器无法访问 
		alert("对不起，邮件服务器发生错误，请稍后再试！");       //报错 
	} 
} 

goEmail_onclick();
</SCRIPT> 
