<html><head><title>系统基本设置</title>
<meta http-equiv=content-language content=zh-cn>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<LINK href="../CSS/Base.css" rel=stylesheet>
<link href="../CSS/Common.css" rel="stylesheet" type="text/css"/>
<script language=javascript src="../JS/HighLight.js.php"></script>
<script type="text/javascript" src="../JS/Jquery.min.js.php"></script>
<script type="text/javascript" src="../JS/Jquery.notification.js.php"></script>
<link type="text/css" rel="stylesheet" href="../CSS/Notification.css" />
<script language=javascript src="../JS/CheckQuestion.js.php"></script>
<script language=javascript>
function CheckPassport()
{
	if (document.SettingForm.isUseOriPassport.value == "4" )
	{
		if (!CheckNotNull(SettingForm.userID, "标识会员ID的变量名称")) {return false;}
		if (!CheckNotNull(SettingForm.userName, "标识会员名称的变量名称")) {return false;}
		if (!CheckNotNull(SettingForm.registerURL, "注册新会员的URL")) {return false;}
		if (!CheckNotNull(SettingForm.loginURL, "会员登陆的URL")) {return false;}
	}
	if (document.SettingForm.isUseOriPassport.value == "2" )  //Ajax通行证
	{
		//if (!CheckNotNull(SettingForm.ajaxResponseURL, "设定私有问卷用户特征条件程序地址")) {return false;}
		if (!CheckNotNull(SettingForm.ajaxCheckURL, "私有问卷提交检验用户身份程序地址")) {return false;}
		//if (!CheckNotNull(SettingForm.ajaxRtnValue, "检验用户身份程序返回值显示名称")) {return false;}
    }
	if (document.SettingForm.isUseOriPassport.value == "3" )  //AD通行证
	{
		if (!CheckNotNull(SettingForm.domainControllers, "目录服务器域名或地址")) {return false;}
		if (!CheckNotNull(SettingForm.adUsername, "连接用户名")) {return false;}
		if (!CheckNotNull(SettingForm.accountSuffix, "连接用户名后缀")) {return false;}
		<!-- CHECK PASSWORD -->
		if (!CheckNotNull(SettingForm.adPassword, "连接用户密码")) {return false;}
		<!-- END PASSWORD -->
		if (!CheckNotNull(SettingForm.baseDN, "baseDN")) {return false;}
    }
	if (document.SettingForm.isUseOriPassport.value == "5" )  //LDAP通行证
	{
		if (!CheckNotNull(SettingForm.domainControllers, "目录服务器域名或地址")) {return false;}
		if (!CheckNotNull(SettingForm.adUsername, "连接用户名")) {return false;}
		<!-- CHECK PASSWORD -->
		if (!CheckNotNull(SettingForm.adPassword, "连接用户密码")) {return false;}
		<!-- END PASSWORD -->
		if (!CheckNotNull(SettingForm.baseDN, "baseDN")) {return false;}
    }
} 
function CheckMailServer() 
{
	if (!CheckNotNull(MailForm.sendFrom, "发送邮件的地址")) {return false;}
	if (!CheckNotNull(MailForm.sendName, "发送邮件的名称")) {return false;}
	if (!CheckNotNull(MailForm.mailServer, "SMTP邮件服务器")) {return false;}
	if (!CheckNotNull(MailForm.smtp25, "SMTP端口号")) {return false;}
	if ( document.MailForm.isSmtp.value == "y" )
	{
		if (!CheckNotNull(MailForm.smtpName, "SMTP认证的用户名")) {return false;}
		<!-- CHECK PASSWORD1 -->
		if (!CheckNotNull(MailForm.smtpPassword, "SMTP认证的密码")) {return false;}
		<!-- END PASSWORD1 -->
	}
}

function checkAuto()
{ 
	if (document.SettingForm.isUseOriPassport.value == "4" )  //现有通行证
	{
		document.getElementById("isUseCookie_ID").style.display = "";
		document.getElementById("userID_ID").style.display = "";
		document.getElementById("userName_ID").style.display = "";
		document.getElementById("registerURL_ID").style.display = "";
		document.getElementById("loginURL_ID").style.display = "";
		document.getElementById("ajaxResponseURL_ID").style.display = "none";
		document.getElementById("ajaxCheckURL_ID").style.display = "none";
		document.getElementById("ajaxLoginURL_ID").style.display = "none";
		document.getElementById("ajaxDeleteURL_ID").style.display = "none";
		document.getElementById("ajaxOverURL_ID").style.display = "none";
		document.getElementById("domainControllers_ID").style.display = "none";
		document.getElementById("adUsername_ID").style.display = "none";
		document.getElementById("accountSuffix_ID").style.display = "none";
		document.getElementById("adPassword_ID").style.display = "none";
		document.getElementById("baseDN_ID").style.display = "none";
	}
	if (document.SettingForm.isUseOriPassport.value == "1" )  //EnableQ通行证
	{
		document.getElementById("isUseCookie_ID").style.display = "none";
		document.getElementById("userID_ID").style.display = "none";
		document.getElementById("userName_ID").style.display = "none";
		document.getElementById("registerURL_ID").style.display = "none";
		document.getElementById("loginURL_ID").style.display = "none";
		document.getElementById("ajaxResponseURL_ID").style.display = "none";
		document.getElementById("ajaxCheckURL_ID").style.display = "none";
		document.getElementById("ajaxLoginURL_ID").style.display = "none";
		document.getElementById("ajaxDeleteURL_ID").style.display = "none";
		document.getElementById("ajaxOverURL_ID").style.display = "none";
		document.getElementById("domainControllers_ID").style.display = "none";
		document.getElementById("adUsername_ID").style.display = "none";
		document.getElementById("accountSuffix_ID").style.display = "none";
		document.getElementById("adPassword_ID").style.display = "none";
		document.getElementById("baseDN_ID").style.display = "none";
	}
	if (document.SettingForm.isUseOriPassport.value == "2" )  //Ajax通行证
	{
		document.getElementById("isUseCookie_ID").style.display = "none";
		document.getElementById("userID_ID").style.display = "none";
		document.getElementById("userName_ID").style.display = "none";
		document.getElementById("registerURL_ID").style.display = "none";
		document.getElementById("loginURL_ID").style.display = "none";
		document.getElementById("ajaxResponseURL_ID").style.display = "";
		document.getElementById("ajaxCheckURL_ID").style.display = "";
		document.getElementById("ajaxLoginURL_ID").style.display = "";
		document.getElementById("ajaxDeleteURL_ID").style.display = "";
		document.getElementById("ajaxOverURL_ID").style.display = "";
		document.getElementById("domainControllers_ID").style.display = "none";
		document.getElementById("adUsername_ID").style.display = "none";
		document.getElementById("accountSuffix_ID").style.display = "none";
		document.getElementById("adPassword_ID").style.display = "none";
		document.getElementById("baseDN_ID").style.display = "none";
	}
	if (document.SettingForm.isUseOriPassport.value == "3" )  //AD通行证
	{
		document.getElementById("isUseCookie_ID").style.display = "none";
		document.getElementById("userID_ID").style.display = "none";
		document.getElementById("userName_ID").style.display = "none";
		document.getElementById("registerURL_ID").style.display = "none";
		document.getElementById("loginURL_ID").style.display = "none";
		document.getElementById("ajaxResponseURL_ID").style.display = "none";
		document.getElementById("ajaxCheckURL_ID").style.display = "none";
		document.getElementById("ajaxLoginURL_ID").style.display = "none";
		document.getElementById("ajaxDeleteURL_ID").style.display = "none";
		document.getElementById("ajaxOverURL_ID").style.display = "none";
    	document.getElementById("domainControllers_ID").style.display = "";
		document.getElementById("adUsername_ID").style.display = "";
		document.getElementById("accountSuffix_ID").style.display = "";
		document.getElementById("adPassword_ID").style.display = "";
		document.getElementById("baseDN_ID").style.display = "";
	}
	if (document.SettingForm.isUseOriPassport.value == "5" )  //LDAP通行证
	{
		document.getElementById("isUseCookie_ID").style.display = "none";
		document.getElementById("userID_ID").style.display = "none";
		document.getElementById("userName_ID").style.display = "none";
		document.getElementById("registerURL_ID").style.display = "none";
		document.getElementById("loginURL_ID").style.display = "none";
		document.getElementById("ajaxResponseURL_ID").style.display = "none";
		document.getElementById("ajaxCheckURL_ID").style.display = "none";
		document.getElementById("ajaxLoginURL_ID").style.display = "none";
		document.getElementById("ajaxDeleteURL_ID").style.display = "none";
		document.getElementById("ajaxOverURL_ID").style.display = "none";
    	document.getElementById("domainControllers_ID").style.display = "";
		document.getElementById("adUsername_ID").style.display = "";
		document.getElementById("accountSuffix_ID").style.display = "none";
		document.getElementById("adPassword_ID").style.display = "";
		document.getElementById("baseDN_ID").style.display = "";
	}
}
function checkMailAuto()
{
	if (document.MailForm.isSmtp.value == "y" )
	{
		document.getElementById("smtpName").style.display = "";
		document.getElementById("smtpPassword").style.display = "";
	}
	else
	{
		document.getElementById("smtpName").style.display = "none";
		document.getElementById("smtpPassword").style.display = "none";
	}
}
function Init()
{
	checkAuto();
	checkMailAuto();
}
</script>
<META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD>
<BODY oncontextmenu="return false" onload="javascript:Init()" style="background-color:#244d8f;">
<div style="line-height:10px">&nbsp;</div>
<div id=nav><a href="../System/ShowMain.php">我的问卷</a> &raquo; 系统基本设置</div>
<div class="wrap q_clear" id=wrap>
<div>
<div class=content>
<div class=q_clear id=mysurvey><h1>系统基本设置</h1><br/></div>
<div id=myname></div>
<div class="datalist">
  <form action="" method="post" name="SettingForm" onsubmit="return CheckPassport();">
  <table style="LINE-HEIGHT: 150%;border-collapse:collapse;" cellSpacing=0 cellPadding=0 width="100%" borderColor=#b5cfd9 border=1>
       <tr><td bgcolor="#f5f5f5" colspan=2><b>通行证类型设置</b></td></tr>
	   <tr> 
           <td height="25" width=26%><SPAN class=red>*</SPAN> 通行证类型：</td>
           <td width=74%>
		      <span style="float:left">
		       <select name="isUseOriPassport" id="isUseOriPassport" onChange="checkAuto();">
                 <option value="1" {isUseOriPassport1}>使用EnableQ通行证</option>
                 <option value="4" {isUseOriPassport4}>使用Session/Cookie连接现有通行证</option>
                 <option value="2" {isUseOriPassport2}>使用Web Service连接现有通行证</option>
                 <option value="3" {isUseOriPassport3}>使用Active Directory通行证</option>
                 <option value="5" {isUseOriPassport5}>使用LDAP系统通行证</option>
               </select></span>
			  </td>
       </tr>
	   <tr id="isUseCookie_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 记录会员登陆状态：</td>
           <td><select name="isUseCookie" id="isUseCookie">
		      <option value="1">使用SESSION</option>
		      <option value="2" {isUseCookie}>使用Cookie</option>
			 </select>
           </td>
       </tr>
  	   <tr id="userID_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 标识会员ID的变量名称：</td>
           <td> <input name="userID" type="text" id="userID" value="{userID}" size="20"> <SPAN class=red>*</SPAN> 区分大小写</td>
       </tr>
  	   <tr id="userName_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 标识会员名称的变量名称：</td>
           <td> <input name="userName" type="text" id="userName" value="{userName}" size="20"> <SPAN class=red>*</SPAN> 区分大小写</td>
       </tr>
  	   <tr id="ajaxResponseURL_ID"> 
           <td height="25">&nbsp;&nbsp;&nbsp;设定私有问卷用户特征条件程序地址：</td>
           <td> <input name="ajaxResponseURL" type="text" id="ajaxResponseURL" value="{ajaxResponseURL}" size="80"></td>
       </tr>
  	   <tr id="ajaxDeleteURL_ID"> 
           <td height="25">&nbsp;&nbsp;&nbsp;删除私有问卷用户特征条件程序地址：</td>
           <td> <input name="ajaxDeleteURL" type="text" id="ajaxDeleteURL" value="{ajaxDeleteURL}" size="80"></td>
       </tr>
  	   <tr id="ajaxCheckURL_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 私有问卷提交检验用户身份程序地址：</td>
           <td> <input name="ajaxCheckURL" type="text" id="ajaxCheckURL" value="{ajaxCheckURL}" size="80"></td>
       </tr>
  	   <tr id="ajaxLoginURL_ID"> 
           <td height="25">&nbsp;&nbsp;&nbsp;单点登录返回用户属性数据程序地址：</td>
           <td> <input name="ajaxLoginURL" type="text" id="ajaxLoginURL" value="{ajaxLoginURL}" size="80"></td>
       </tr>
  	   <tr id="ajaxOverURL_ID"> 
           <td height="25">&nbsp;&nbsp;&nbsp;问卷提交完成后续处理逻辑程序地址：</td>
           <td> <input name="ajaxOverURL" type="text" id="ajaxOverURL" value="{ajaxOverURL}" size="80"></td>
       </tr>
  	   <tr id="registerURL_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 注册新会员的URL：</td>
           <td> <input name="registerURL" type="text" id="registerURL" value="{registerURL}" size="80"></td>
       </tr>
  	   <tr id="loginURL_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 会员登陆的URL：</td>
           <td> <input name="loginURL" type="text" id="loginURL" value="{loginURL}" size="80"></td>
       </tr>
  	   <tr id="domainControllers_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 目录服务器域名或地址：</td>
           <td> <input name="domainControllers" type="text" id="domainControllers" value="{domainControllers}" size="80"></td>
       </tr>
  	   <tr id="adUsername_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 连接用户名：</td>
           <td> <input name="adUsername" type="text" id="adUsername" value="{adUsername}" size="40"></td>
       </tr>
  	   <tr id="accountSuffix_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 连接用户名后缀：</td>
           <td> <input name="accountSuffix" type="text" id="accountSuffix" value="{accountSuffix}" size="20"></td>
       </tr>
  	   <tr id="adPassword_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> 连接用户密码：</td>
           <td> <input name="adPassword" type="password" id="adPassword" value="{adPassword}" size="20"> {password_notes}</td>
       </tr>
  	   <tr id="baseDN_ID"> 
           <td height="25"><SPAN class=red>*</SPAN> baseDN：</td>
           <td> <input name="baseDN" type="text" id="baseDN" value="{baseDN}" size="80"></td>
       </tr></table><table width=100% style="border:0px;">
       <tr> 
	      <td width=26% style="border:0px;"></td>
	      <td style="border:0px;">
		        <input type="hidden" name="Action" value="BaseSettingSubmit">
                <input type="submit" name="submit" class=inputsubmit value="确定"> 
                <input name="back2" type="button" class=inputsubmit value="取消" onClick="javascript:window.location.href='{thisProg}'"> 
          </td>
       </tr>
	</form>
	</table>
    <form action="" method="post" name="MailForm" onsubmit="return CheckMailServer();">
    <table style="LINE-HEIGHT: 150%;border-collapse:collapse;" cellSpacing=0 cellPadding=0 width="100%" borderColor=#b5cfd9 border=1>
	   <tr><td height="25" colspan=2 bgcolor="#f5f5f5"><strong>&nbsp;SMTP邮件服务器设置</strong> (参照Outlook或FoxMail的SMTP服务器设置)</td></tr>
	   <tr> 
           <td height="25" width="26%"><SPAN class=red>*</SPAN> 发送邮件的地址：</td>
           <td> <input name="sendFrom" type="text" id="sendFrom" value="{sendFrom}" size="40" maxlength="40"></td>
       </tr>
	   <tr> 
           <td height="25"><SPAN class=red>*</SPAN> 发送邮件的名称：</td>
           <td> <input name="sendName" type="text" id="sendName" value="{sendName}" size="40" maxlength="40"></td>
       </tr>
	   <tr> 
           <td height="25"><SPAN class=red>*</SPAN> SMTP邮件服务器：</td>
           <td> <input name="mailServer" type="text" id="mailServer" value="{mailServer}" size="40" maxlength="40"></td>
       </tr>
	   <tr> 
           <td height="25"><SPAN class=red>*</SPAN> SMTP端口：</td>
           <td> <input name="smtp25" type="text" id="smtp25" value="{smtp25}" size="10" maxlength="10"></td>
       </tr>
	   <tr> 
           <td height="25"><SPAN class=red>*</SPAN> 发送需要SMTP认证：</td>
           <td><select name="isSmtp" id="isSmtp" onChange="checkMailAuto();">
                 <option value="y">是</option>
                 <option value="n" {isSmtp}>否</option>
               </select></td>
       </tr>
	   <tr id="smtpName"> 
           <td height="25">&nbsp;&nbsp;&nbsp;SMTP认证的用户名：</td>
           <td> <input name="smtpName" type="text" id="smtpName" value="{smtpName}" size="40" maxlength="40"></td>
       </tr>
  	   <tr id="smtpPassword"> 
           <td height="25">&nbsp;&nbsp;&nbsp;SMTP认证的密码：</td>
           <td> <input name="smtpPassword" type="password" id="smtpPassword" value="{smtpPassword}" size="40" maxlength="40"> {password_notes}</td>
       </tr></table><table width=100% style="border:0px;">
       <tr> 
	      <td width=26% style="border:0px;"></td>
	      <td style="border:0px;">
      		   <input type="hidden" name="Action" value="MailSettingSubmit">
               <input type="submit" name="submit" value="确定" class=inputsubmit> 
               <input name="back2" type="button" value="取消" class=inputsubmit onClick="javascript:window.location.href='{thisProg}'"> 
           </td>
       </tr>
    </form>
 </table>
 </div>
</div></div></div>
<script type="text/javascript">initInputHighlightScript();</script> 
<script type="text/javascript" src="../JS/CssPatch.js.php"></script>
</body></html>