<%@ LANGUAGE=VBScript codepage ="936" %>
<%Response.Expires=0
Response.Buffer=true
cwjh_name=Session("cwjh_name")
cwjh_grade=Session("cwjh_grade")
cwjh_jhdj=Session("cwjh_jhdj")
if cwjh_name="" then Response.Redirect "../error.asp?id=440"
if session("cwjh_adminok")<>true then Response.Redirect "../chat/readonly/bomb.htm"
if cwjh_grade<>10 or instr(Application("cwjh_admin"),cwjh_name)=0  then Response.Redirect "../error.asp?id=439"
if cwjh_name<>Application("cwjh_user") then Response.Redirect "../error.asp?id=486"
%>
<!--#include file="../config.asp"-->
<html>
<head>
<title>系统参数</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=css/css.css type=text/css rel=stylesheet>
</head>
<body bgColor=#dcdec6 text=#000000 link=#003366 vLink=#006666>
<%if not request.form("set")="ok" then%>
<div align="center"> 【系统参数】</div>
<hr noshade size="1" color=009900>
<b>［提示］</b>注意，所有参数必填不可为空，不可以用全角字符输入参数。
<a href="javascript:history.go(0)">刷新</a> 
<hr noshade size="1" color=009900>
<form name="form1" method="post" action="">
<input type="hidden" name="cwjh_chatbgcolor" value="<%=Application("cwjh_chatbgcolor")%>">
<input type="hidden" name="cwjh_chatimage" value="<%=Application("cwjh_chatimage")%>">
<input type="hidden" name="cwjh_chatcolor" value="<%=Application("cwjh_chatcolor")%>">
<input type="hidden" name="cwjh_iplocktime" value="<%=Application("cwjh_iplocktime")%>">
<p><font color=red>************ 江湖其它参数***********</font><br>
<input type="text" name="cwjh_maxtimeout" value="<%=Application("cwjh_maxtimeout")%>">
泡点超时时间，不要设置太长，否则拖累服务器[xx分钟]<br>
<input type="text" name="cwjh_maxnpc" value="<%=Application("cwjh_maxnpc")%>">
npc总在线人数<br>
<input type="text" name="cwjh_npcwp" value="<%=application("cwjh_npcwp")%>">
npc暴涨比较值[建议不要改动]<br>
<input type="text" name="cwjh_npcff" value="<%=application("cwjh_npcff")%>">
npc发放需要的等级[管理级,建议用默认10级管理]<br>
<input type="text" name="cwjh_baowuyin" value="<%=Application("cwjh_baowuyin")%>">
每一级修练宝物所得到的银两<br>
<input type="text" name="cwjh_baowuxl" value="<%=Application("cwjh_baowuxl")%>">
每次修练的级数，如100级的需修练4次！他所得到的上限就是4！这个值是用战斗等级取整的！<br>
<input type="text" name="cwjh_killman" value="<%=Application("cwjh_killman")%>">
江湖一天的杀人数，夺宝一次算一次杀人<br>
<input type="text" name="cwjh_wgsx" value="<%=cwjh_wgsx%>">
每升一级的武功加值,此值当cwjh_sx=1时才有作用<br>
<input type="text" name="cwjh_nlsx" value="<%=cwjh_nlsx%>">
每升一级的内力加值,此值当cwjh_sx=1时才有作用<br>
<input type="text" name="cwjh_tlsx" value="<%=cwjh_tlsx%>">
每升一级的体力加值,此值当cwjh_sx=1时才有作用<br>
<input type="text" name="cwjh_gjsx" value="<%=cwjh_gjsx%>">
每升一级的攻击加值,此值当cwjh_sx=1时才有作用<br>
<input type="text" name="cwjh_fysx" value="<%=cwjh_fysx%>">
每升一级的防御加值,此值当cwjh_sx=1时才有作用<br>
<input type="hidden" name="cwjh_chat_maxpeople" value="<%=Application("cwjh_chat_maxpeople")%>" readonly>
<p><font color=red>************ 江湖开关设置***********</font><br>
<input type="text" name="cwjh_closedoor" value="<%=Application("cwjh_closedoor")%>">
聊天室关门,0为开门,1为关门<br>
<input type="text" name="cwjh_baowu" value="<%=Application("cwjh_baowu")%>">
是否有宝物当为0时没有宝物！宝物出现是会影响聊天室速度的，服务器不好关闭！<br>
<input type="text" name="cwjh_sx" value="<%=cwjh_sx%>">
是否有上限0没有上限，1有上限<br>
<input type="text" name="cwjh_automanname" value="<%=Application("cwjh_automanname")%>">
聊神名称设置<br>
<input type="text" name="cwjh_userout" value="<%=Application("cwjh_userout")%>">
退出聊天室的信息(注意里面的"一定要为全角字符)<br>
<input type="text" name="cwjh_dieip" value="<%=cwjh_dieip%>">
ip永久封锁使用前按格式书写，多个用;号隔开,后面请保留有分号<br>
<input type="text" name="cwjh_baowuname" value="<%=Application("cwjh_baowuname")%>">
宝物名及宝物说明<br>
<input type="text" name="cwjh_baowusm" value="<%=Application("cwjh_baowusm")%>">
得到宝物后的消息 <br>
<hr noshade size="1" color=009900>
<p><font color=red>************ 江湖系统设置***********</font><br>
<input type="hidden" name="cwjh_chatroomname" value="<%=Application("cwjh_chatroomname")%>" readonly>
<input type="text" name="cwjh_homepage" value="<%=Application("cwjh_homepage")%>">
江湖域名<br>
<input type="text" name="cwjh_icpno" value="<%=cwjh_icpno%>">
备案编号或ICP证书号<br>
<input type="hidden" name="cwjh_sn" value="<%=Application("cwjh_sn")%>" readonly>
<input type="text" name="cwjh_qq" value="<%=Application("cwjh_qq")%>">
站长qq<br>
<input type="text" name="cwjh_email" value="<%=Application("cwjh_email")%>">
站长email<br>
<input type="hidden" name="cwjh_user" value="<%=Application("cwjh_user")%>" readonly>
<input type="text" name="cwjh_admin" value="<%=Application("cwjh_admin")%>">
允许进入的10管理员:多个之间以半角逗号,分隔如：张三,李四<br>
<input type="text" name="hidden_admin" value="<%=Application("hidden_admin")%>">
隐身的管理员名字如：张三,李四<br>
<input type="text" name="cwjh_slbox" value="<%=Application("cwjh_slbox")%>">
可以查看私聊的人如：张三,李四<br>
<input type="text" name="cwjh_admin_send" value="<%=Application("cwjh_admin_send")%>">
财神爷，多个用|和|隔开，后面也要保留|<br>
<input type="text" name="cwjh_guibin" value="<%=Application("cwjh_guibin")%>">
江湖贵宾(贵宾不参与任何江湖恩怨)，多个用|和|隔开，后面也要保留|<br>
<input type="text" name="cwjh_adminuser" value="<%=Application("cwjh_adminuser")%>">
后台管理账号<br>
<input type="password" name="cwjh_adminkey" value="<%=Application("cwjh_adminkey")%>">
后台管理密码</p>
<p> 
<input type="submit" name="Submit" value="修改设置">
<input type="hidden" name="set" value="ok">
</p>
</form>
</body>
</html>
<%
response.end
else
call setconst()
end if
sub setconst()
%>
<!--#include file="chkform.asp"-->
<%
'*************************************************************
'*以下为江湖系统设置请按自己的需要设置，设置前最好备份一下原文件！*
'*************************************************************
writeStr=writeStr & "Application("&""""&"cwjh_chatbgcolor"&""""&")=" &"""" & request.form("cwjh_chatbgcolor")& """"&"      '聊天室背景颜色代码"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_chatimage"&""""&")=" &"""" & request.form("cwjh_chatimage")& """"&"      '聊天室外部边框图片"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_chatcolor"&""""&")=" &"""" & request.form("cwjh_chatcolor")& """"&"      '聊天室文字区背景色"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_iplocktime"&""""&")="& request.form("cwjh_iplocktime")&"      '锁IP时间"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_maxtimeout"&""""&")="& request.form("cwjh_maxtimeout")&"      '泡点超时时间，不要设置太长"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_maxnpc"&""""&")="& request.form("cwjh_maxnpc")&"      'npc总在线人数"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_npcwp"&""""&")="& request.form("cwjh_npcwp")&"      'npc暴涨比较值"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_npcff"&""""&")="& request.form("cwjh_npcff")&"      'npc发放需要的等级（管理级）"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_baowuyin"&""""&")="& request.form("cwjh_baowuyin")&"      '每一级修练所得到的银两"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_baowuxl"&""""&")="& request.form("cwjh_baowuxl")&"      '每次修练的级数，如100级的需修练4次！他所得到的上限就是4！这个值是用战斗等级取整的"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_killman"&""""&")="& request.form("cwjh_killman")&"      '江湖一天的杀人数，夺宝一次算一次杀人"& chr(13) & chr(10)
writeStr=writeStr & "cwjh_wgsx="&request.form("cwjh_wgsx")&"      '每升一级的武功加值,此值当cwjh_sx=1时才有作用"&chr(13)&chr(10)
writeStr=writeStr & "cwjh_nlsx="&request.form("cwjh_nlsx")&"      '每升一级的内力加值,此值当cwjh_sx=1时才有作用"&chr(13)&chr(10)
writeStr=writeStr & "cwjh_tlsx="&request.form("cwjh_tlsx")&"      '每升一级的体力加值,此值当cwjh_sx=1时才有作用"&chr(13)&chr(10)
writeStr=writeStr & "cwjh_gjsx="&request.form("cwjh_gjsx")&"      '每升一级的攻击加值,此值当cwjh_sx=1时才有作用"&chr(13)&chr(10)
writeStr=writeStr & "cwjh_fysx="&request.form("cwjh_fysx")&"      '每升一级的防御加值,此值当cwjh_sx=1时才有作用"&chr(13)&chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_chat_maxpeople"&""""&")="& request.form("cwjh_chat_maxpeople")&"      '江湖最大人数限制"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_closedoor"&""""&")="& request.form("cwjh_closedoor")&"      '聊天室关门，1为关门"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_baowu"&""""&")="& request.form("cwjh_baowu")&"      '是否有宝物当为0时没有宝物！宝物出现是会影响聊天室速度的，服务器不好关闭！"& chr(13) & chr(10)
writeStr=writeStr & "cwjh_sx="&request.form("cwjh_sx")&"      '是否有上限0没有上限，1有上限"&chr(13)&chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_automanname"&""""&")=" &"""" & request.form("cwjh_automanname")& """"&"      '聊神名称设置"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_userout"&""""&")=" &"""" & request.form("cwjh_userout")& """"&"      '退出时聊天室显示的信息"& chr(13) & chr(10)
writeStr=writeStr & "cwjh_dieip=" &"""" & request.form("cwjh_dieip")& """"&"      'ip永久封锁使用前按格式书，多个用分号隔开，后面请保留有分号"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_baowuname"&""""&")=" &"""" & request.form("cwjh_baowuname")& """"&"      '宝物名及宝物说明"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_baowusm"&""""&")=" &"""" & request.form("cwjh_baowusm")& """"&"      '宝物在聊天室中显示信息"& chr(13) & chr(10)
writeStr=writeStr & "'***************************************************"& chr(13) & chr(10)
writeStr=writeStr & "'*以下江湖管理设置，切记不要改错，否则无法正常运行 *"& chr(13) & chr(10)
writeStr=writeStr & "'***************************************************"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_chatroomname"&""""&")=" &"""" & request.form("cwjh_chatroomname")& """"&"      '江湖名称"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_homepage"&""""&")=" &"""" & request.form("cwjh_homepage")& """"&"      '江湖主页"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_sn"&""""&")=" &"""" & request.form("cwjh_sn")& """"&"      '江湖序列号，正版标志，修改后后果自负"& chr(13) & chr(10)
writeStr=writeStr & "const cwjh_icpno=" &"""" & request.form("cwjh_icpno")& """"&"      '备案编号或ICP证书号"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_user"&""""&")=" &"""" & request.form("cwjh_user")& """"&"      '江湖站长"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_qq"&""""&")=" &"""" & request.form("cwjh_qq")& """"&"      '站长qq"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_email"&""""&")=" &"""" & request.form("cwjh_email")& """"&"      '站长email"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_admin"&""""&")=" &"""" & request.form("cwjh_admin")& """"&"      '设置10级聊管，多个用逗号隔开"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"hidden_admin"&""""&")=" &"""" & request.form("hidden_admin")& """"&"      '隐身人员，多个用逗号隔开"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_slbox"&""""&")=" &"""" & request.form("cwjh_slbox")& """"&"      '可以查看私聊的人，多个用逗号隔开"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_admin_send"&""""&")=" &"""" & request.form("cwjh_admin_send")& """"&"      '财神爷，多个用|和|隔开"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_guibin"&""""&")=" &"""" & request.form("cwjh_guibin")& """"&"      '江湖贵宾(贵宾不参与任何江湖恩怨)，多个用|和|隔开"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_adminuser"&""""&")=" &"""" & request.form("cwjh_adminuser")& """"&"      '站长管理用户名"& chr(13) & chr(10)
writeStr=writeStr & "Application("&""""&"cwjh_adminkey"&""""&")=" &"""" & request.form("cwjh_adminkey")& """"&"      '站长管理密码"& chr(13) & chr(10)
writeStr=writeStr & "'*********************************************************"& chr(13) & chr(10)
writeStr=writeStr & "'*如果要设置广告内容请见：chat/jhchat.asp文件开始处"& chr(13) & chr(10)
writeStr=writeStr & "'*泡分的点数可以由自己设置，详见：paodian.asp文件开始处"& chr(13) & chr(10)
writeStr=writeStr & "'修改招式等级修改chat/sjfunc/czdj.asp"
%>
<%
tpstr=replace(writestr,chr(13) & chr(10) ,"<br>")
tpstr="&lt;%<br>" & tpstr & "<br>%&gt;"
writestr="<" & "%" & chr(13) & chr(10) & writestr & chr(13) & chr(10) & "%" & ">"
response.write tpstr
if IsObjInstalled("Scripting.FileSystemObject") then
toppath = Server.Mappath("../config.asp")
Set fs = CreateObject("scripting.filesystemobject")
If Not Fs.FILEEXISTS(toppath) Then 
Set Ts = fs.createtextfile(toppath, True)
Ts.close
end if
Set Ts= Fs.OpenTextFile(toppath,2)
Ts.writeline (writeStr)
Ts.Close
Set Ts=Nothing
Set Fs=Nothing
%>
<script>
alert("您的服务器支持FSO权限，新的config.asp已自动生成")
</script>
<%
else
%>
<script>
alert("您的服务器不支持FSO权限，请手工拷贝代码覆盖config.asp中原来的代码")
</script>
<%
end if
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
Function rrstr(str)
str="|" & str & "|"
str=replace(str,"||","|")
rrstr=str
End Function 
%>