Head.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:18k
源码类别:

手机WAP编程

开发平台:

ASP/ASPX

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001" EnableSessionState = False%><%
  2. Option Explicit
  3. 'On Error Resume Next
  4. Server.ScriptTimeout=30
  5. Response.ContentType="Text/Html;Charset=UTF-8"
  6. Response.Expires=-1
  7. Public Const Server_DB_Path="../Database.mdb"
  8. Public Const Server_IPDB_Path="IPData.mdb"
  9. Public Page_Time,Conn,Conn2
  10. Page_Time=Timer
  11. Call Get_Admin()
  12. Rem 版权信息类,请勿修改.
  13. Class xkon
  14. Rem 程序名称
  15. Public Function name()
  16. name="新空程序网 论坛程序"
  17. End Function
  18. Rem 程序版本
  19. Public Function ver()
  20. ver="1.0"
  21. End Function
  22. Rem 程序官方网站
  23. Public Function Url()
  24. Url="http://wap.xkon.cn"
  25. End Function
  26. Rem 程序升级接口
  27. Public Function Interface()
  28. Interface="http://wap.xkon.cn/update/bbs/"
  29. End Function
  30. End Class
  31. Public Function Get_Admin()
  32. Dim URL,Cn2,Cn1
  33. URL=Request.ServerVariables("URL")
  34. If Mid(URL,InstrRev(URL,"/")+1)<>"DenLu.Asp" Then
  35. If Request.Cookies("AdminZhangHao")="" Or Request.Cookies("AdminMiMa")="" Then
  36. Else
  37. Call OpenData()
  38. Set Cn1=Server.CreateObject("ADODB.Command")
  39. Cn1.ActiveConnection=Conn
  40. Cn1.CommandType=1
  41. Cn1.CommandText="SELECT * FROM ADMIN WHERE ZHANGHAO='"&Request.Cookies("AdminZhangHao")&"' And MiMa='"&Request.Cookies("AdminMiMa")&"'"
  42. Set Cn2=Cn1.Execute
  43. If Cn2.Eof Then
  44. Set Cn2=Nothing
  45. Set Cn1=Nothing
  46. Call CloseData()
  47. Response.Redirect("DenLu.Asp")
  48. Else
  49. Response.Cookies("xkon_Cookies")=Cn2("QuanXian")
  50. End If
  51. Set Cn2=Nothing
  52. Set Cn1=Nothing
  53. Call CloseData()
  54. End If
  55. End If
  56. End Function
  57. Function Read_Cookies(Str)
  58. If Request.Cookies("xkon_Cookies")="" Then Read_Cookies="0":Exit Function
  59. Dim Str2
  60. Str2=Split("FangWen,Admin_MiMa,Admin_Admin,Admin_JBXX,Admin_GG,Admin_Help,Admin_TouXiang,JiLu,DenJi,BanKuai,BanZhu,TieZhi,HuiFu,HuiYuan,XiaoXi,ZiFu_GuoLv,BiaoQing,Data,TiShi,DiaoCha,QunFa,IP",",")
  61. Dim Str3
  62. Str3=Split(Request.Cookies("xkon_Cookies")," ")
  63. Dim i,ii
  64. For i=0 To Ubound(Str3)
  65. If Str2(i)=Str Then ii=i:Exit For
  66. Next
  67. If ii="" Then
  68. Call xkon_Error("找不到该Cookies")
  69. Else
  70. Read_Cookies=Str3(i)
  71. End If
  72. End Function
  73. Public Function OpenData()
  74. On Error Resume Next
  75. Set Conn=Server.CreateObject("ADODB.Connection")
  76. Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.Mappath(Server_DB_Path)
  77. Conn.Open
  78. If Err Then
  79. Conn.Close()
  80. Set Conn=Nothing
  81. Call xkon_Error("连接数据库出错")
  82. End If
  83. End Function
  84. Public Function OpenData2()
  85. On Error Resume Next
  86. Set Conn2=Server.CreateObject("ADODB.Connection")
  87. Conn2.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.Mappath(Server_IPDB_Path)
  88. Conn2.Open
  89. If Err Then
  90. Conn2.Close()
  91. Set Conn2=Nothing
  92. Call xkon_Error("连接数据库出错")
  93. End If
  94. End Function
  95. Public Function CloseData()
  96. On Error Resume Next
  97. Conn.Close()
  98. Set Conn=Nothing
  99. If Err Then
  100. Call xkon_Error("Database Error")
  101. End If
  102. End Function
  103. Public Function H_Title1(Title)
  104. Response.Write("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html xmlns=""http://www.w3.org/1999/xhtml""><head><meta http-equiv=""Content-Type"" content=""text/html; charset=UTF-8""/><title>"&Title&"</title><link rel=""stylesheet"" type=""text/css"" href=""../Inc/xkon.Css"" /></head><body onload=setTimeout(""load.style.display='none';h.style.display='block'"",100) ><div id=""load""><font color=#FF0000>页面载入中...</font><br/></div><div id=""h"" style=""display:none""><input type=button onclick=""window.location.reload()"" value=刷新 /><br/>")
  105. Response.Flush()
  106. End Function
  107. Public Function H_Title(Title)
  108. Response.Write("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html xmlns=""http://www.w3.org/1999/xhtml""><head><meta http-equiv=""Content-Type"" content=""text/html; charset=UTF-8""/><title>"&Title&"</title><link rel=""stylesheet"" type=""text/css"" href=""../Inc/xkon2.Css"" /></head><body onload=setTimeout(""load.style.display='none';h.style.display='block'"",100) ><div id=""load""><font color=#FF0000>页面载入中...</font><br/></div><div id=""h"" style=""display:none""><input type=button onclick=""window.location.reload()"" value=刷新 /><br/>")
  109. Response.Flush()
  110. End Function
  111. Public Function H_End()
  112. Dim x
  113. Set x=New xkon
  114. Response.Write("<br/><br/></div><font size=2 color=#A9A9A9 >程序名称:"&x.Name&"<br/>技术支持:<a target=_blank href="""&x.Url&""">"&x.Url&"</a></font></body></html>")
  115. End Function
  116. Public Function Checkstr(C_Str)
  117. If IsNull(C_Str) Then Exit Function
  118. C_Str=Trim(C_Str)
  119. C_Str=Replace(C_Str,"&","&amp;")
  120. C_Str=Replace(C_Str,"'","&apos;")
  121. C_Str=Replace(C_Str,">","&gt;")
  122. C_Str=Replace(C_Str,"<","&lt;")
  123. C_Str=Replace(C_Str," ","&nbsp;")
  124. C_Str=Replace(C_Str,"""","&quot;")
  125. C_Str=Replace(C_Str,",",",")
  126. Checkstr=C_Str
  127. End Function
  128. Class xkon_Request
  129. Public Function Form(xkon_Request_Str)
  130. xkon_Request_Str=Request.Form(xkon_Request_Str)
  131. xkon_Request_Str=Checkstr(xkon_Request_Str)
  132. Form=xkon_Request_Str
  133. End Function
  134. Public Function QueryString(xkon_QueryString_Str)
  135. xkon_QueryString_Str=Request.QueryString(xkon_QueryString_Str)
  136. xkon_QueryString_Str=Checkstr(xkon_QueryString_Str)
  137. QueryString=xkon_QueryString_Str
  138. End Function
  139. Public Function Form_long(xkon_Request_Str)
  140. On Error Resume Next
  141. xkon_Request_Str=Request.Form(xkon_Request_Str)
  142. If xkon_Request_Str="" Then
  143. xkon_Request_Str=1
  144. Else
  145. xkon_Request_Str=Clng(xkon_Request_Str)
  146. End If
  147. If Err Then
  148. Form_long=1
  149. End If
  150. Form_long=xkon_Request_Str
  151. End Function
  152. Public Function Form_Str(xkon_Request_Str,d,c)
  153. Dim xkon_Request_Str1
  154. xkon_Request_Str1=Checkstr(Request.Form(xkon_Request_Str))
  155. If xkon_Request_Str1<>"" Then
  156. If len(xkon_Request_Str1)<d Then
  157. Call xkon_Error("提交的长度不能小于"&d&"位<br/>参数:"&xkon_Request_Str)
  158. End If
  159. If Len(xkon_Request_Str1)>c Then
  160. Call xkon_Error("提交的长度不能小于"&c&"位<br/>参数:"&xkon_Request_Str)
  161. End If
  162. Form_Str=xkon_Request_Str1
  163. End If
  164. End Function
  165. Public Function QueryString_Str(xkon_Request_Str,d,c)
  166. Dim xkon_Request_Str1
  167. xkon_Request_Str1=Checkstr(Request.QueryString(xkon_Request_Str))
  168. If xkon_Request_Str1<>"" Then
  169. If len(xkon_Request_Str1)<d Then
  170. Call xkon_Error("提交的长度不能小于"&d&"位<br/>参数:"&xkon_Request_Str)
  171. End If
  172. If Len(xkon_Request_Str1)>c Then
  173. Call xkon_Error("提交的长度不能小于"&c&"位<br/>参数:"&xkon_Request_Str)
  174. End If
  175. QueryString_Str=xkon_Request_Str1
  176. End If
  177. End Function
  178. Public Function QueryString_long(xkon_Request_Str)
  179. On Error Resume Next
  180. xkon_Request_Str=Request.QueryString(xkon_Request_Str)
  181. If xkon_Request_Str="" Then
  182. xkon_Request_Str=1
  183. Else
  184. xkon_Request_Str=Clng(xkon_Request_Str)
  185. End If
  186. If Err Then
  187. Form_long=1
  188. End If
  189. QueryString_long=xkon_Request_Str
  190. End Function
  191. Public Function Form_aa(xkon_Request_Str,d,c)
  192. Dim xkon_Request_Str1
  193. xkon_Request_Str1=Request.Form(xkon_Request_Str)
  194. If xkon_Request_Str1<>"" Then
  195. If aa(xkon_Request_Str1)=False Then
  196. Call xkon_Error("字符只能是由字母或数字组成<br/>参数:"&xkon_Request_Str)
  197. End If
  198. If Len(xkon_Request_Str1)<d Then
  199. Call xkon_Error("提交的长度不能小于"&d&"位<br/>参数:"&xkon_Request_Str)
  200. End If
  201. If Len(xkon_Request_Str1)>c Then
  202. Call xkon_Error("提交的长度不能大于"&d&"位<br/>参数:"&xkon_Request_Str)
  203. End If
  204. Form_aa=xkon_Request_Str1
  205. End If
  206. End Function
  207. Public Function QueryString_aa(xkon_Request_Str,d,c)
  208. Dim xkon_Request_Str1
  209. xkon_Request_Str1=Request.QueryString(xkon_Request_Str)
  210. If xkon_Request_Str1<>"" Then
  211. If aa(xkon_Request_Str1)=False Then
  212. Call xkon_Error("字符只能是由字母或数字组成<br/>参数:"&xkon_Request_Str)
  213. End If
  214. If Len(xkon_Request_Str1)<d Then
  215. Call xkon_Error("提交的长度不能小于"&d&"位<br/>参数:"&xkon_Request_Str)
  216. End If
  217. If Len(xkon_Request_Str1)>c Then
  218. Call xkon_Error("提交的长度不能大于"&d&"位<br/>参数:"&xkon_Request_Str)
  219. End If
  220. QueryString_aa=xkon_Request_Str1
  221. End If
  222. End Function
  223. End Class
  224. Class xkon_Response
  225. Public Function Writeln(xkon_Response_Str)
  226. Response.Write(xkon_Response_Str)
  227. Response.Write("<br/>")
  228. End Function
  229. Public Function WriteHTMLEncode(xkon_Response_Str)
  230. xkon_Response_Str=CheckStr(xkon_Response_Str)
  231. Response.Write(xkon_Response_Str)
  232. End Function
  233. Public Function Write(xkon_Response_Str)
  234. Response.Write(xkon_Response_Str)
  235. End Function
  236. Public Function WriteUBB(xkon_Response_Str)
  237. Response.Write(UBB(xkon_Response_Str))
  238. End Function
  239. End Class
  240. Class xkon_FangWen
  241. Public Function FangWen()
  242. Call QuanXian("FangWen","访问后台")
  243. If Request.Cookies("AdminZhangHao")="" Or Request.Cookies("AdminMiMa")="" Then
  244. Call xkon_Error("你无权访问后台")
  245. End If
  246. End Function
  247. Public Function Admin_MiMa()
  248. Call QuanXian("Admin_MiMa","修改密码")
  249. End Function
  250. Public Function Admin_Admin()
  251. Call QuanXian("Admin_Admin","管理站长")
  252. End Function
  253. Public Function Admin_JBXX()
  254. Call QuanXian("Admin_JBXX","设置基本信息")
  255. End Function
  256. Public Function Admin_GG()
  257. Call QuanXian("Admin_GG","管理广告")
  258. End Function
  259. Public Function Admin_Help()
  260. Call QuanXian("Admin_Help","管理帮助")
  261. End Function
  262. Public Function Admin_TouXiang()
  263. Call QuanXian("Admin_TouXiang","管理头像")
  264. End Function
  265. Public Function JiLu()
  266. Call QuanXian("JiLu","查看日志")
  267. End Function
  268. Public Function DenJi()
  269. Call QuanXian("DenJi","管理等级")
  270. End Function
  271. Public Function BanKuai()
  272. Call QuanXian("BanKuai","管理版块")
  273. End Function
  274. Public Function BanZhu()
  275. Call QuanXian("BanZhu","管理版主")
  276. End Function
  277. Public Function TieZhi()
  278. Call QuanXian("TieZhi","管理贴子")
  279. End Function
  280. Public Function HuiFu()
  281. Call QuanXian("HuiFu","管理回复")
  282. End Function
  283. Public Function A()
  284. If Lcase(Request.Cookies("AdminZhangHao"))<>"admin" Then
  285. Call xkon_Error("最高管理员才可进入")
  286. End If
  287. End Function
  288. Public Function HuiYuan()
  289. Call QuanXian("HuiYuan","管理会员")
  290. End Function
  291. Public Function XiaoXi()
  292. Call QuanXIan("XiaoXi","管理消息")
  293. End Function
  294. Public Function ZiFu_GuoLv()
  295. Call QuanXian("ZiFu_GuoLv","字符过滤")
  296. End Function
  297. Public Function BiaoQing()
  298. Call QuanXian("BiaoQing","管理表情")
  299. End Function
  300. Public Function Data()
  301. Call QuanXian("Data","备份恢复数据")
  302. End Function
  303. Public Function TiShi()
  304. Call QuanXian("TiShi","修改提示")
  305. End Function
  306. Public Function DiaoCha()
  307. Call QuanXian("DiaoCha","修改调查")
  308. End Function
  309. Public Function QunFa()
  310. Call QuanXian("QunFa","群发信息")
  311. End Function
  312. Public Function IP()
  313. Call QuanXian("IP","屏蔽IP")
  314. End Function
  315. End Class
  316. Public Function QuanXian(Str,Str_Err)
  317. If Read_Cookies(Str)<>"1" Then
  318. Call xkon_Error("此页需要"&Str_Err&"的权限,最高管理员未分配此权限或者您的登陆已超时.<a href=""DenLu.Asp"">重新登陆</a>")
  319. End If
  320. End Function
  321. Public Function Checked(Str)
  322. If Str="1" Then
  323. Checked="checked"
  324. End If
  325. End Function
  326. Public Function Checkeded(Str)
  327. If Str="on" Then
  328. Checkeded="1"
  329. Else
  330. Checkeded="0"
  331. End If
  332. End Function
  333. Public Function JiLu(Str)
  334. Dim Ji_Cn1,Ji_Cn2,Ji_ID
  335. Set Ji_Cn1=Server.CreateObject("Adodb.Command")
  336. Ji_Cn1.ActiveConnection=Conn
  337. Ji_Cn1.CommandType=1
  338. Ji_Cn1.CommandText="Select id From RiZi Order By Id DESC"
  339. Set Ji_Cn2=Ji_Cn1.Execute
  340. If Ji_Cn2.Eof Then
  341. Ji_ID=1
  342. Else
  343. Ji_ID=Ji_Cn2("ID")+1
  344. End If
  345. Set Ji_Cn2=Nothing
  346. Set Ji_Cn1=Nothing
  347. Conn.Execute("Insert Into RiZi(ID,Word,Admin,ShiJian,IP)Values('"&Ji_ID&"','"&Str&"','"&Request.Cookies("AdminZhangHao")&"','"&Now()&"','"&Readusip()&"')")
  348. End Function
  349. Public Function CPage(PageCount,Page,Str_Url)
  350. Dim i
  351. If Right(Str_Url,4)=".Asp" Then
  352. Str_Url=Str_Url&"?"
  353. Else
  354. If Right(Str_Url,5)<>"&amp;" Then
  355. Str_Url=Str_Url&"&amp;"
  356. End If
  357. End If
  358. For i=Page-2 To Page+2
  359. If i>0 And i<=PageCount Then
  360. If i=Page Then
  361. c.Write("["&i&"]")
  362. Else
  363. c.Write("<a href="""&Str_Url&"p="&i&""">["&i&"]</a>")
  364. End If
  365. End If
  366. Next
  367. c.Writeln("")
  368. c.Writeln("第"&Page&"页,共"&PageCount&"页<br/>")
  369. End Function
  370. Public Function XingBiee(Str)
  371. If Str="男" Then
  372. XingBiee="0"
  373. Else
  374. XingBiee="1"
  375. End If
  376. End Function
  377. Public Function XingBieed(Str)
  378. If Str="0" Then
  379. XingBieed="男"
  380. Else
  381. XingBieed="女"
  382. End If
  383. End Function
  384. Public Function BanMian_MingChen(ID)
  385. Call OpenData()
  386. Dim Cn1,Cn2
  387. Set Cn1=Server.CreateObject("Adodb.Command")
  388. Cn1.ActiveConnection=Conn
  389. Cn1.CommandType=1
  390. Cn1.CommandText="Select BanKuai_MingChen From BanKuai Where ID="&Clng(ID)
  391. Set Cn2=Cn1.Execute
  392. If Cn2.Eof Then
  393. BanMian_MingChen="0"
  394. Else
  395. BanMian_MingChen=Cn2("BanKuai_MingChen")
  396. End If
  397. Set Cn1=Nothing
  398. Set Cn2=Nothing
  399. Call CloseData()
  400. End Function
  401. Public Function Str_Z(Str)
  402. If Str="1" Then
  403. Str_Z="是"
  404. Else
  405. Str_Z="否"
  406. End If
  407. End Function
  408. Private Function Zhuan(Str)
  409. If Str="1" Then
  410. Zhuan="√"
  411. Else
  412. Zhuan="×"
  413. End If
  414. End Function
  415. Public Function ReadTextFile(ByVal Fname,ByVal Folder_Name)
  416.   Dim M_fso,FnameN,Fnr
  417.   ReadTextFile=""
  418.   Set M_fso = CreateObject("Scripting.FileSystemObject")
  419.  If M_fso.FolderExists(Server.Mappath("../File/"&Folder_Name))=False Then
  420.   Call xkon_Error("读取信息失败"&Folder_Name)
  421.  End If
  422.   Set FnameN= M_fso.OpenTextFile(Server.Mappath("../File/"&Folder_Name&"/"&Fname&".Txt"),1,True)
  423.   Fnr=FnameN.ReadAll
  424.   FnameN.Close
  425.   Set M_fso = Nothing
  426.   ReadTextFile=Fnr
  427. End Function
  428. Sub BanKuai_LieBiao()
  429. Dim Cn1
  430. c.Write("版块:<select name=""ShangJi_ID"">")
  431. Call OpenData()
  432. Set Cn1=Server.CreateObject("Adodb.Recordset")
  433. Cn1.Open "Select id,BanKuai_MingChen From BanKuai Order By Id Desc",Conn,1,1
  434. Do While(Not Cn1.Eof)
  435. c.Write("<option value="""&Cn1("ID")&""">"&Cn1("BanKuai_MingChen")&"</option>")
  436. Cn1.MoveNext
  437. Loop
  438. Cn1.Close
  439. Set Cn1=Nothing
  440. Call CloseData()
  441. c.Write("</select>")
  442. End Sub
  443. Public Function Selected(Byval Name1,Byval Name2)
  444. If Name1=Name2 Then
  445. Selected="selected"
  446. End If
  447. End Function
  448. function aa(str) 
  449. Dim i
  450. for i=1 to len(str) 
  451. if (asc(mid(str,i,1))>=48 and asc(mid(str,i,1))=<57) or (asc(mid(str,i,1))>=65 and asc(mid(str,i,1))=<90) or (asc(mid(str,i,1))>=97 and asc(mid(str,i,1))=<122) then 
  452. aa=true 
  453. else 
  454. aa=false 
  455. exit for 
  456. end if 
  457. next 
  458. end Function
  459. x_c
  460. Public Function xkon_Error(Str)
  461. Response.Clear()
  462. Response.Write("<html><head><title>出错了</title><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" /></head><body onselectstart=""return false"">"&Str&"</body></html>")
  463. Response.End()
  464. End Function
  465. Function C2u(text)
  466.    Dim iw,cw
  467.    For iw=1 to Len(text)
  468.    cw=Mid(text,iw,1)
  469.    c2u=c2u&"&#x" & Hex(AscW(cw)) & ";"
  470.    next
  471. End Function
  472. Private Sub x_c()
  473. On Error Resume Next
  474. Dim x
  475. Set x=New xkon
  476. If C2u(x.Name())<>"&#x65B0;&#x7A7A;&#x7A0B;&#x5E8F;&#x7F51;&#x20;&#x8BBA;&#x575B;&#x7A0B;&#x5E8F;" Or C2u(x.Url())<>"&#x68;&#x74;&#x74;&#x70;&#x3A;&#x2F;&#x2F;&#x77;&#x61;&#x70;&#x2E;&#x78;&#x6B;&#x6F;&#x6E;&#x2E;&#x63;&#x6E;" Then Response.Clear():Response.End()
  477. If Err Then Call xkon_Error("")
  478. Set x=Nothing
  479. End Sub
  480. Public Function Readusip()
  481.   Dim strIPAddr
  482.   If Request.ServerVariables("HTTP_X_FORWARDED_FOR") = "" OR InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), "unknown") > 0 Then
  483.       strIPAddr = Request.ServerVariables("REMOTE_ADDR")
  484.   ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",") > 0 Then
  485.       strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",")-1)
  486.   ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";") > 0 Then
  487.       strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";")-1)
  488.   Else
  489.       strIPAddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
  490.   End If
  491.   Readusip = Trim(Mid(strIPAddr, 1, 30))
  492. End Function
  493. Public Function Read_SZ(Str)
  494. If Application("SZ_Str")="" Then
  495. Dim FSO,FS
  496. Set FSO=Server.CreateObject("Scripting.FileSystemObject")
  497. Set FS=FSO.OpenTextFile(Server.Mappath("../Inc/SZ.xkon.cn.Asp"))
  498. Application("SZ_Str")=Replace(FS.ReadAll,"<%","")
  499. Set FS=Nothing
  500. Set FSO=Nothing
  501. End If
  502. Dim SZ_Str
  503. SZ_Str=Split(Application("SZ_Str"),"&xkon.cn&")
  504. Dim SZ_Str1,SZ_Str2
  505. SZ_Str1=Split(SZ_Str(0),",")
  506. SZ_Str2=Split(SZ_Str(1),",")
  507. Dim i,ii
  508. For i=0 To Ubound(SZ_Str2)
  509. If SZ_Str2(i)=Str Then
  510. ii=i:Exit For
  511. End If
  512. Next
  513. If ii="" Then
  514. Call xkon_Error("找不到设置"&Str)
  515. Else
  516. Read_SZ=SZ_Str1(ii)
  517. End If
  518. End Function
  519. Public Function Get_NiChen(User)
  520. If User = "xkon.cn" Then Get_NiChen = "系统":Exit Function
  521. Dim n_1,n_2
  522. Set n_1=Server.CreateObject("Adodb.Command")
  523. n_1.ActiveConnection=Conn
  524. n_1.CommandType=1
  525. n_1.CommandText="Select NiChen From ZhangHao Where ZhangHao='"&User&"'"
  526. Set n_2=n_1.Execute
  527. If n_2.Eof Then
  528. Call xkon_Error("会员不存在")
  529. Else
  530. Get_NiChen=n_2("NiChen")
  531. End If
  532. Set n_2=Nothing
  533. Set n_1=Nothing
  534. End Function
  535. Public Function FaXin(User,EUser,YanCi,Fa_NeiRong)
  536. Dim SQL,F1,F2,J_ID
  537. If Fa_NeiRong="" Then Fa_NeiRong="0"
  538. Set F1=Server.CreateObject("Adodb.Command")
  539. F1.ActiveConnection=Conn
  540. F1.CommandType=1
  541. F1.CommandText="Select id From XiaoXi Order By Id Desc"
  542. Set F2=F1.Execute
  543. If F2.Eof Then
  544. J_ID=1
  545. Else
  546. J_ID=F2("ID")+1
  547. End If
  548. Set F2=Nothing
  549. Set F1=Nothing
  550. SQL="Insert Into XiaoXi(ID,Fa,Shou,ShiJian,ZhuangTai,NiChen,YanCi)Values('"&J_ID&"','"&User&"','"&EUser&"','"&Now()&"','0','"&Get_NiChen(User)&"','"&YanCi&"')"
  551. Conn.Execute(SQL)
  552. Conn.Execute("Update ZhangHao Set XinYouJian=XinYouJian+1 Where ZhangHao='"&EUser&"'")
  553. Dim FSO,FS
  554. Set FSO=Server.CreateObject("Scripting.FileSystemObject")
  555. Set FS=FSO.OpenTextFile(Server.Mappath("../File/"&Read_SZ("Folder_XiaoXi")&"/"&J_ID&".txt"),2,True)
  556. FS.Write(Fa_NeiRong)
  557. FS.Close
  558. Set FS=Nothing
  559. Set FSO=Nothing
  560. End Function
  561. %>