<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1  
Response.cachecontrol = "no-cache"  
%>
<!--#INCLUDE FILE="conn.asp" -->
<!--#include file="admin_Checkuser.asp"-->
<HTML><HEAD><title><%=StrVar(1)%>--管理页面</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<!--#include file="inc/admin_main.css"-->
</HEAD>
<BODY leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<%
if  not sysadmin or session("adminlogin")<>"0K" Then
	Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用，请<a href=admin_index.asp target=_top>登陆</a>后进入。"
	Call Error("Information",ErrMsg)
Else
	Call main()
End if
Call endconnection()
Sub main()
%>
<iframe width="260" height="165" id="colourPalette" src="inc/nc_selcolor.htm" style="visibility:hidden; position: absolute; left: 0px; top: 0px;border:1px gray solid" frameborder="0" scrolling="no" ></iframe>
<table cellpadding=5 cellspacing=1 border=0 width=90% Class=TableBorder align=center>
  <tr>
	<th>欢迎<b><%=membername%></b>进入管理页面</th>
</tr>
</table>

		<%dim i
		if Request("action")="update" Then
			Call updatepara()
		Else
			Call paraform()
		End if
		
End Sub


Sub paraform()
%>
<table border=0 width=85% align=center Class=TableBorder>
  <tr>
    <td class=forumRowHighlight>
      <B><a name=top>说明</a></B>：<br>
      (1)前台隐藏管理员信息选项可以在论坛，用户列表、排行及在线用户等页面隐藏管理员用户或相关的用户信息，这样可以提高系统安全性！修改此参数后建议用数据更新功能重新统计系统注册用户总数。<br>
      (2)如果使用Jmail.Message发送邮件，服务器需要安装w3 
      JMail 
      4.3或以上版本，版本较低时可以使用Jmail.smtpmail,如果smtp服务器需要发信验证，可以设置参数形如：<font color=brown>account:password@mailserver</font>。<br> 
      </td>
  </tr>
</table>
<script language=JavaScript src=../inc/jsfun.asp></script>
<form method="POST" action=admin_setting.asp name=paraform>
<input type=hidden name=action value=update>
  <table width=85% Class=TableBorder cellspacing=1  cellpadding=5 align=center>
    <tr> 
      <th colspan=2>校友录基本参数</th>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>网站名称</td>
      <td width="76%" class=forumrow> <input type="text" name="StrVar18" size="35" value="<%=StrVar(18)%>"> 
      </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>校友录名称</td>
      <td width="76%" Class=forumrowhighlight> <input type="text" name="StrVar1" size="35" value="<%=StrVar(1)%>"> 
      </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>校友录网址</td>
      <td width="76%" class=forumrow> <input type="text" name="StrVar0" size="35" value="<%=StrVar(0)%>"> 
      </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>系统服务邮件地址</td>
      <td width="76%" Class=forumrowhighlight> <input type="text" name="StrVar2" size="35" value="<%=StrVar(2)%>"> 
      </td>
    </tr>
    <tr> 
      <td class=forumrow>系统服务QQ号码</td>
      <td width="76%" class=forumrow><input name="StrVar9" type="text" id="StrVar9" value="<%=StrVar(9)%>" size="35"></td>
    </tr>
    <tr> 
      <td Class=forumrowhighlight>是否关闭系统</td>
      <td Class=forumrowhighlight><input type="checkbox" name="BoolVar14" value="1" <%if BoolVar(14)=True Then Response.Write "checked"%>>
        关闭系统</td>
    </tr>
    <tr> 
      <td class=forumrow>关闭系统原因</td>
      <td class=forumrow><textarea name="StrVar10" cols="35" rows="2" id="StrVar10"><%=StrVar(10)%></textarea>
        支持HTML </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>是否关闭论坛</td>
      <td width="76%" Class=forumrowhighlight><input type="checkbox" name="BoolVar15" value="1" <%if BoolVar(15)=True Then Response.Write "checked"%>>
        关闭论坛</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>关闭论坛原因</td>
      <td width="76%" class=forumrow> <textarea name="StrVar19" cols="35" rows="2" id="StrVar19"><%=StrVar(19)%></textarea>
        支持HTML </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>是否开启声效</td>
      <td width="76%" Class=forumrowhighlight> <input type="checkbox" name="BoolVar1" value="1" <%if BoolVar(1)=True Then Response.Write "checked"%>>
        开启系统声效 </td>
    </tr>
    <tr> 
      <td class=forumrow>是否隐藏系统管理员的前台帐号</td>
      <td class=forumrow> <input name="BoolVar9" type="checkbox" value="1" <%if BoolVar(9)=True Then Response.Write "checked"%>>
        在前台隐藏系统管理员信息&nbsp;(建议选中此项) </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>是否显示友情连接</td>
      <td width="76%" Class=forumrowhighlight> <input type="checkbox" name="BoolVar13" value="1" <%if BoolVar(13)=True Then Response.Write "checked"%>>
        显示友情连接 </td>
    </tr>
	<input type="hidden" name="BoolVar24" value="1" <%if BoolVar(24)=True Then Response.Write "checked"%>>
	<input type="hidden" name="BoolVar25" value="1" <%if BoolVar(25)=True Then Response.Write "checked"%>>
	<!--
	<tr> 
      <td width="24%" Class=forumrow>是否允许注册学校</td>
      <td width="76%" Class=forumrow> <input type="checkbox" name="BoolVar24" value="1" <%if BoolVar(24)=True Then Response.Write "checked"%>>
        允许注册请选中</td>
    </tr>
	<tr> 
      <td width="24%" Class=forumrowhighlight>注册学校是否需要审核</td>
      <td width="76%" Class=forumrowhighlight> <input type="checkbox" name="BoolVar25" value="1" <%if BoolVar(25)=True Then Response.Write "checked"%>>
        需要审核请选中 </td>
    </tr>
	-->
    <tr> 
      <th colspan=2>注册校友录相关参数</th>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>是否打开新用户注册功能</td>
      <td width="76%" class=forumrow> <input type="checkbox" name="BoolVar0" value="1" <%if BoolVar(0)=True Then Response.Write "checked"%>>
        允许新用户注册 </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>同一IP注册间隔时间</td>
      <td width="76%" Class=forumrowhighlight> <input name="IntVar11" type="text" id="IntVar11" value="<%=IntVar(11)%>" size="5">
        秒 如不想限制可填写0 </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>一个Email只能注册一个帐号</td>
      <td width="76%" class=forumrow> <input name="BoolVar23" type="checkbox" id="BoolVar23" value="1" <%if BoolVar(23)=True Then Response.Write "checked"%>>
        开启</td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>是否启用问题认证注册</td>
      <td width="76%" Class=forumrowhighlight> <input type="checkbox" name="BoolVar11" value="1" <%if BoolVar(11)=True Then Response.Write "checked"%>>
        开启问题认证注册 </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>回答全部问题或其一</td>
      <td width="76%" class=forumrow> <input type="checkbox" name="BoolVar12" value="1" <%if BoolVar(12)=True Then Response.Write "checked"%>>
        回答全部问题 </td>
    </tr>
    <script language="JavaScript">
<!--
function questionadd(ll){
var qi=1;
questionlist.innerHTML="";
while(qi<=ll){
questionlist.innerHTML=questionlist.innerHTML+"问题"+qi+"<input type='text' name='question"+qi+"' size='25' value=''>答案"+qi+"<input type='text' name='answer"+qi+"' size='20' value=''>答案"+qi+"提示<input type='text' name='answerts"+qi+"' size='25' value=''>";
if(qi<ll){questionlist.innerHTML=questionlist.innerHTML+"<br>";}
qi=qi+1;
}
}
//-->
</script>
    <tr> 
      <td width="24%" Class=forumrowhighlight>选择问题数</td>
      <td width="76%" Class=forumrowhighlight> <select size="1" onChange="questionadd(this.options[selectedIndex].value)" name="questionnum">
          <%for i=1 to 100
                  response.write"<option value="""&i&""""
				  if i=ubound(joinquestion)-1 then response.write" selected"
				  response.write">"&i&"</option>"
				  next%>
        </select> </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>问题与答案</td>
      <td width="76%" class=forumrow id="questionlist"> 
        <%for i=1 to ubound(joinquestion)-1%>
        问题<%=i%> <input type="text" name="question<%=i%>" size="25" value="<%=joinquestion(i)%>">
        答案<%=i%> <input type="text" name="answer<%=i%>" size="20" value="<%=joinanswer(i)%>">
        答案<%=i%>提示 <input type="text" name="answerts<%=i%>" size="20" value="<%=joinanswerts(i)%>"> 
        <br> 
        <%next%>
      </td>
    </tr>
    <tr> 
      <th colspan=2>注册学校相关参数</th>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>是否允许用户创建新学校</td>
      <td width="76%" Class=forumrowhighlight> <input type="checkbox" name="BoolVar2" value="1" <%if BoolVar(2)=True Then Response.Write "checked"%>>
        允许创建新学校 </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>将学校创建者默认为学校管理员</td>
      <td width="76%" class=forumrow> <input name="BoolVar16" type="checkbox" id="BoolVar16" value="1" <%if BoolVar(16)=True Then Response.Write "checked"%>>
        默认为学校管理员 </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>创建学校是否需要管理员审核</td>
      <td width="76%" Class=forumrowhighlight> <input name="BoolVar17" type="checkbox" id="BoolVar17" value="1" <%if BoolVar(17)=True Then Response.Write "checked"%>>
        需要审核</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>每位注册用户最多加入学校数</td>
      <td width="76%" class=forumrow> <input type="text" name="IntVar0" size="35" value="<%=IntVar(0)%>"> 
        &nbsp; </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>缺省学校开放等级</td>
      <td width="76%" Class=forumrowhighlight> <SELECT NAME="IntVar6">
          <option value=0 <%if IntVar(6)=0 Then Response.Write "selected"%>>完全开放</option>
          <!-- <option value=1 <%if IntVar(6)=1 Then Response.Write "selected"%>>密码验证</option> -->
          <option value=2 <%if IntVar(6)=2 Then Response.Write "selected"%>>管理员审核</option>
          <!-- <option value=3 <%if IntVar(6)=3 Then Response.Write "selected"%>>锁定学校</option> -->
        </SELECT> </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>学校名称限定词(请用"|"隔开)</td>
      <td width="76%" class=forumrow> <input type="text" name="StrVar3" size="35" value="<%=StrVar(3)%>"> 
        &nbsp;若不使用，请保留空白 </td>
    </tr>
    <tr> 
      <th colspan=2>发送邮件相关参数</th>
    </tr>
    <script language=javascript>
function relating(){
var cindex=document.paraform.IntVar5.selectedIndex;
if (cindex==0||cindex==3)
{server.style.display='none'}
else
{server.style.display=''}

if(cindex==1)
{account.style.display='';
pwd.style.display='';}
else
{account.style.display='none';
pwd.style.display='none'}

}
</script>
    <tr> 
      <td width="24%" Class=forumrowhighlight>发送邮件组件</td>
      <td width="76%" Class=forumrowhighlight> <Select name="IntVar5" onChange="relating()" >
          <option value="0" <%if IntVar(5)=0 Then%>selected<%End if%>>不支持 
          <option value="4" <%if IntVar(5)=4 Then%>selected<%End if%>>JMAIL.Message 
          <option value="1" <%if IntVar(5)=1 Then%>selected<%End if%>>JMAIL.SMTPMail 
          <option value="2" <%if IntVar(5)=2 Then%>selected<%End if%>>CDONTS 
          <option value="3" <%if IntVar(5)=3 Then%>selected<%End if%>>ASPEMAIL 
        </Select> &nbsp;[<a style="cursor:help" href="javascript:openScript('../Class_Help.asp?About=Object',455,230)">查看组件支持情况</a>]&nbsp; 
      </td>
    </tr>
    <tr id="server" <%if IntVar(5)=0 or IntVar(5)=2 Then%>style="DISPLAY: none"<%End if%>> 
      <td width="24%" class=forumrow>SMTP服务器地址</td>
      <td width="76%" class=forumrow><input type="text" name="StrVar4" size="35" value="<%=StrVar(4)%>"></td>
    </tr>
    <tr id="account" <%if IntVar(5)<>4 Then%>style="DISPLAY: none"<%End if%>> 
      <td width="24%" Class=forumrowhighlight>SMTP服务器登陆帐号</td>
      <td width="76%" Class=forumrowhighlight><input type="text" name="StrVar5" size="35" value="<%=StrVar(5)%>"></td>
    </tr>
    <tr id="pwd" <%if IntVar(5)<>4 Then%>style="DISPLAY: none"<%End if%>> 
      <td width="24%" class=forumrow>SMTP服务器登陆密码</td>
      <td width="76%" class=forumrow><input type="password" name="StrVar6" size="35" value="<%=StrVar(6)%>"></td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>每次最多发送邮件数</td>
      <td width="76%" Class=forumrowhighlight><input type="text" name="IntVar7" size="35" value="<%=IntVar(7)%>"> 
        &nbsp;设为0时没有限制</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>是否发送用户注册信息邮件</td>
      <td width="76%" class=forumrow> <input name="BoolVar18" type="checkbox" id="BoolVar18" value="1" <%if BoolVar(18)=True Then Response.Write "checked"%>>
        发送注册邮件</td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>学校新贴是否发送邮件通知</td>
      <td width="76%" Class=forumrowhighlight> <input name="BoolVar19" type="checkbox" id="BoolVar19" value="1" <%if BoolVar(19)=True Then Response.Write "checked"%>>
        发送邮件通知</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>学校新成员加入是否发送邮件通知</td>
      <td width="76%" class=forumrow> <input name="BoolVar20" type="checkbox" id="BoolVar20" value="1" <%if BoolVar(20)=True Then Response.Write "checked"%>>
        发送邮件通知</td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>学校新相片是否发送邮件通知</td>
      <td width="76%" Class=forumrowhighlight> <input name="BoolVar21" type="checkbox" id="BoolVar21" value="1" <%if BoolVar(21)=True Then Response.Write "checked"%>>
        发送邮件通知</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>是否固定通知校友注册邮件内容</td>
      <td width="76%" class=forumrow> <input name="BoolVar8" type="checkbox" id="BoolVar8" value="1" <%if BoolVar(8)=True Then Response.Write "checked"%>>
        允许用户修改邮件内容</td>
    </tr>
    <tr> 
      <th colspan=2>学校论坛相关参数</th>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>缺省签写帖子模式</td>
      <td width="76%" Class=forumrowhighlight><INPUT TYPE="radio" NAME="BoolVar3" value=1 <%if BoolVar(3)=True Then Response.Write "checked"%>>
        高级模式&nbsp;&nbsp; <INPUT TYPE="radio" NAME="BoolVar3" value=0 <%if BoolVar(3)=false Then Response.Write "checked"%>>
        一般模式 </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>是否开启UBB标签功能</td>
      <td width="76%" class=forumrow> <input type="checkbox" name="BoolVar4" value="1" <%if BoolVar(4)=True Then Response.Write "checked"%>>
        允许使用UBB标签</td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>是否开启用户来源鉴定功能</td>
      <td width="76%" Class=forumrowhighlight> <input type="checkbox" name="BoolVar5" value="1" <%if BoolVar(5)=True Then Response.Write "checked"%>>
        显示用户来源&nbsp;(不推荐使用) </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>允许的最大的帖子长度(KBytes)</td>
      <td width="76%" class=forumrow><input type="text" name="IntVar1" size="35" value="<%=IntVar(1)%>"></td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>每页显示帖子数</td>
      <td width="76%" Class=forumrowhighlight><input type="text" name="IntVar8" size="35" value="<%=IntVar(8)%>"> 
        &nbsp;(建议不要超过30)</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>不良语句过滤(请用"|"隔开)</td>
      <td width="76%" class=forumrow><input type="text" name="StrVar7" size="50" value="<%=StrVar(7)%>"> 
        &nbsp;若不使用，请保留空白</td>
    </tr>
    <tr> 
      <th colspan=2>学校相册相关参数</th>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>是否使用头像上传功能</td>
      <td width="76%" class=forumrow> 
        <%If IsObjInstalled("Persits.Jpeg") Then%>
        <input name="BoolVar10" type="checkbox" id="BoolVar10" value="1" <%if BoolVar(10)=True Then Response.Write "checked"%>>
        开启头像上传功能 
        <%else%>
        <font color="#FF0000">系统不支持组件</font> 
        <%end if%>
      </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>是否打开上传功能</td>
      <td width="76%" Class=forumrowhighlight> <input type="checkbox" name="BoolVar6" value="1" <%if BoolVar(6)=True Then Response.Write "checked"%>>
        允许用户上传图片 </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>是否使用照片审核功能</td>
      <td width="76%" class=forumrow><input name="BoolVar7" type="checkbox" id="BoolVar7" value="1" <%if BoolVar(7)=True Then Response.Write "checked"%>>
        开启照片审核功能</td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>是否使用缩略图功能</td>
      <td width="76%" Class=forumrowhighlight> 
        <%If IsObjInstalled("Persits.Jpeg") Then%>
        <input name="BoolVar22" type="checkbox" id="BoolVar22" value="1" <%if BoolVar(22)=True Then Response.Write "checked"%>>
        开启缩略图功能 
        <%else%>
        <font color="#FF0000">系统不支持组件</font> 
        <%end if%>
      </td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>缩略图宽和高</td>
      <td width="76%" class=forumrow>宽度： 
        <INPUT NAME="IntVar9" TYPE="text" id="IntVar9" value="<%=IntVar(9)%>" size=10>
        象素 高度： 
        <INPUT NAME="IntVar10" TYPE="text" id="IntVar10" value="<%=IntVar(10)%>" size=10>
        象素</td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>图片水印设置开关</td>
      <td width="76%" Class=forumrowhighlight> 
        <%If IsObjInstalled("Persits.Jpeg") Then%>
        <SELECT name="StrVar11" id="StrVar11">
          <OPTION value="0" <%if StrVar(11)<>1 Then%>selected<%End if%>>关闭水印效果</OPTION>
          <OPTION value="1" <%if StrVar(11)=1 Then%>selected<%End if%>>图片水印效果</OPTION>
        </SELECT> 
        <%else%>
        <input name="StrVar11" type="hidden" id="StrVar11" value="0"> <font color="#FF0000">系统不支持组件</font> 
        <%end if%>
      </td>
    </tr>
    <script language=javascript>


function Getcolor(img_val,input_val){
	var obj = document.getElementById("colourPalette");
	ColorImg = img_val;
	ColorValue = document.getElementById(input_val);
	if (obj){
	obj.style.left = getOffsetLeft(ColorImg) + "px";
	obj.style.top = (getOffsetTop(ColorImg) + ColorImg.offsetHeight) + "px";
	if (obj.style.visibility=="hidden")
	{
	obj.style.visibility="visible";
	}else {
	obj.style.visibility="hidden";
	}
	}
}
//Colour pallete top offset
function getOffsetTop(elm) {
	var mOffsetTop = elm.offsetTop;
	var mOffsetParent = elm.offsetParent;
	while(mOffsetParent){
		mOffsetTop += mOffsetParent.offsetTop;
		mOffsetParent = mOffsetParent.offsetParent;
	}
	return mOffsetTop;
}

//Colour pallete left offset
function getOffsetLeft(elm) {
	var mOffsetLeft = elm.offsetLeft;
	var mOffsetParent = elm.offsetParent;
	while(mOffsetParent) {
		mOffsetLeft += mOffsetParent.offsetLeft;
		mOffsetParent = mOffsetParent.offsetParent;
	}
	return mOffsetLeft;
}
function setColor(color)
{
	if (ColorValue){ColorValue.value = color;}
	if (ColorImg){ColorImg.style.backgroundColor = color;}
	document.getElementById("colourPalette").style.visibility="hidden";
}
</script>
    <tr> 
      <td width="24%" class=forumrow>图片添加水印LOGO图片相对路径</td>
      <td width="76%" class=forumrow><input type="text" name="StrVar12" size="35" value="<%=StrVar(12)%>">
        可为空 （相对于前台）</td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>上传图片添加水印透明度</td>
      <td width="76%" Class=forumrowhighlight><input type="text" name="StrVar13" size="35" value="<%=StrVar(13)%>">
        如60%请填写0.6</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>水印图片去除底色</td>
      <td width="76%" class=forumrow><INPUT TYPE="text" NAME="StrVar14" ID="StrVar14" size=10 value="<%=StrVar(14)%>"> 
        <img border=0 src="images/rect.gif" style="cursor:pointer;background-Color:<%=StrVar(14)%>;" onClick="Getcolor(this,'StrVar14');" title="选取颜色!"> 
        为空则水印图片不去除底色</td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>水印图片的长宽区域定义</td>
      <td width="76%" Class=forumrowhighlight>宽度： <INPUT TYPE="text" NAME="StrVar15" size=10 value="<%=StrVar(15)%>">
        象素 高度： <INPUT TYPE="text" NAME="StrVar16" size=10 value="<%=StrVar(16)%>">
        象素</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>上传图片添加水印LOGO位置坐标</td>
      <td width="76%" class=forumrow> <SELECT NAME="StrVar17" id="StrVar17">
          <option value="0" <%if StrVar(17)=0 Then%>selected<%End if%>>左上</option>
          <option value="1" <%if StrVar(17)=1 Then%>selected<%End if%>>左下</option>
          <option value="2" <%if StrVar(17)=2 Then%>selected<%End if%>>居中</option>
          <option value="3" <%if StrVar(17)=3 Then%>selected<%End if%>>右上</option>
          <option value="4" <%if StrVar(17)=4 Then%>selected<%End if%>>右下</option>
        </SELECT></td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>相片上传目录</td>
      <td width="76%" Class=forumrowhighlight><input type="text" name="StrVar8" size="35" value="<%=StrVar(8)%>"></td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>每次最多上传照片数</td>
      <td width="76%" class=forumrow><input type="text" name="IntVar4" size="35" value="<%=IntVar(4)%>" > 
        &nbsp;</td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>最大上传图片大小(KBytes)</td>
      <td width="76%" Class=forumrowhighlight><input type="text" name="IntVar2" size="35" value="<%=IntVar(2)%>" > 
        &nbsp;</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>默认学校相册大小(MBytes)</td>
      <td width="76%" class=forumrow><input type="text" name="IntVar3" size="35" value="<%=IntVar(3)%>" ></td>
    </tr>
    <tr> 
      <th colspan="2">其他参数</th>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>学校默认宣言</td>
      <td width="76%" Class=forumrowhighlight><textarea name="StrVar20" cols="50" rows="4" id="StrVar20"><%=StrVar(20)%></textarea>
        支持HTML</td>
    </tr>
    <tr> 
      <td width="24%" class=forumrow>学校通告</td>
      <td width="76%" class=forumrow><textarea name="StrVar21" cols="50" rows="4" id="StrVar21"><%=StrVar(21)%></textarea>
        支持HTML </td>
    </tr>
    <tr> 
      <td width="24%" Class=forumrowhighlight>&nbsp;</td>
      <td width="76%" Class=forumrowhighlight>&nbsp;</td>
    </tr>
    <tr> 
      <td height="23" colspan="3" align=center  class=forumrow> <input type="submit" name="submit" value="修&nbsp;&nbsp;改" style="width:75px" class=button> 
      </td>
    </tr>
  </table>
</form>
<br>
<%
End Sub


Sub updatepara()
dim sql
dim BV,IV,SV,QU,AN,TS
if Request("StrVar18")="" Then 
	ErrMsg = ErrMsg + "<br>" + "<li>请填网站名称！</li>"
	Founderr=True
End if

if Request("StrVar0")="" Then 
	ErrMsg = ErrMsg + "<br>" + "<li>请填校友录网址！</li>"
	Founderr=True
End if

if trim(Request("StrVar1"))="" Then 
	ErrMsg = ErrMsg + "<br>" + "<li>请填校友录名称！</li>"
	Founderr=True
End if

if Request("StrVar2")="" Then 
	ErrMsg = ErrMsg + "<br>" + "<li>请填校友录系统服务邮件地址！</li>"
	Founderr=True
End if
if Request("StrVar9")="" Then 
	ErrMsg = ErrMsg + "<br>" + "<li>请填校友录系统服务QQ号码！</li>"
	Founderr=True
End if

if Request("IntVar11")="" or not isnumeric(Request("IntVar11")) Then 
	ErrMsg = ErrMsg + "<br>" + "<li>注册间隔时间输入有误！</li>"
	Founderr=True
End if

if Request("BoolVar11")=1 then
for i=1 to cint(Request("questionnum"))
if trim(request("question"&i))="" or trim(request("answer"&i))="" Then 
	ErrMsg = ErrMsg + "<br>" + "<li>请填注册认证问题"&i&"或答案"&i&"！</li>"
	Founderr=True
End if
	next
end if

if Request("IntVar0")="" or not isnumeric( Request("IntVar0"))Then 
	ErrMsg = ErrMsg + "<br>" + "<li>用户最多允许注册学校数输入错误！</li>"
	Founderr=True
End if


mailtype=Request("IntVar5")

if (mailtype<>0 and mailtype<>2) and Request("StrVar4")="" Then
	ErrMsg = ErrMsg + "<br>" + "<li>请填SMTP服务器地址！</li>"
	Founderr=True
End if

if Request("IntVar7")="" or not isnumeric(Request("IntVar7")) Then 
	ErrMsg = ErrMsg + "<br>" + "<li>每次最多发送邮件数输入有误！</li>"
	Founderr=True
End if

if Request("IntVar1")="" or not isnumeric(Request("IntVar1")) Then 
	ErrMsg = ErrMsg + "<br>" + "<li>最大帖子长度输入有误！</li>"
	Founderr=True
End if

if Request("IntVar8")="" or not isnumeric(Request("IntVar8")) Then 
	ErrMsg = ErrMsg + "<br>" + "<li>每页显示帖子数输入有误！</li>"
	Founderr=True
End if

if Request("BoolVar22")=1 then
if Request("IntVar9")="" or Request("IntVar10")="" or not isnumeric(Request("IntVar9")) or not isnumeric(Request("IntVar10")) Then 
	ErrMsg = ErrMsg + "<br>" + "<li>缩略图宽或高输入有误！</li>"
	Founderr=True
End if
end if

if request("StrVar11")=1 then
if Request("StrVar13")="" Then 
	ErrMsg = ErrMsg + "<br>" + "<li>图片添加水印透明度输入有误！</li>"
	Founderr=True
End if
if Request("StrVar15")="" or Request("StrVar16")="" or not isnumeric(Request("StrVar15")) or not isnumeric(Request("StrVar16")) Then 
	ErrMsg = ErrMsg + "<br>" + "<li>水印图片的长宽输入有误！</li>"
	Founderr=True
End if
end if

if Request("StrVar8")="" Then 
	ErrMsg = ErrMsg + "<br>" + "<li>请输入上传图片目录！</li>"
	Founderr=True
End if

if Request("IntVar4")="" or not isnumeric(Request("IntVar4")) Then 
	ErrMsg = ErrMsg + "<br>" + "<li>每次最多上传图片数输入有误！</li>"
	Founderr=True
End if

if Request("IntVar2")="" or not isnumeric(Request("IntVar2")) Then 
	ErrMsg = ErrMsg + "<br>" + "<li>最大上传图片大小输入有误！</li>"
	Founderr=True
End if

if Request("IntVar3")="" or not isnumeric(Request("IntVar3")) Then 
	ErrMsg = ErrMsg + "<br>" + "<li>学校相册默认容量输入有误！</li>"
	Founderr=True
End if

if Request("StrVar20")="" Then 
	ErrMsg = ErrMsg + "<br>" + "<li>请输入学校默认宣言！</li>"
	Founderr=True
End if

if founderr=True Then
Call Error("Information",ErrMsg)
	Exit Sub
End if


BV=""
for i=0 to 25
	if request("BoolVar"&i)="1" then
		BV=BV&"1"
	else
		BV=BV&"0"
	end if
next

IV=""
for i=0 to 11
	IV=IV&trim(request("IntVar"&i))&","
next

SV=""
for i=0 to 21
	SV=SV&trim(request("StrVar"&i))&"|||"
next

QU=""
AN=""
TS=""
for i=1 to Request("questionnum")
    QU=QU&trim(request("question"&i))&"|"
	AN=AN&trim(request("answer"&i))&"|"
	TS=TS&trim(request("answerts"&i))&"|"
next
Qu="|"&QU
AN="|"&AN
TS="|"&TS

sql="update config set BoolVar='"&BV&"',IntVar='"&IV&"',StrVar='"&SV&"',question='"&QU&"',answer='"&AN&"',answerts='"&TS&"'"

conn.execute(sql)
application("FengLing_Config")=""
call adminmsg("更新校友录参数成功！")
End Sub
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
%><%Response.Flush%>
</BODY></HTML>