?? configok.asp
字號(hào):
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="isadmin.asp"-->
<%
on error resume next
schoolname = trim(request("schoolname"))
adminname = trim(request("adminname"))
adminpwd = request("adminpwd")
adminpwd1 = request("adminpwd1")
strfenlei1 = trim(request("strfenlei1"))
strfenlei2 = trim(request("strfenlei2"))
adminmail = trim(request("adminmail"))
contactadmin = trim(request("contactadmin"))
siteurl = trim(request("siteurl"))
locked = trim(request("locked"))
pagesize = int(trim(request("pagesize")))
upload_type = int(trim(request("upload_type")))
upload_size = int(trim(request("upload_size")))
upload_filetype = trim(request("upload_filetype"))
headads = request("headads")
gonggao = request("gonggao")
if schoolname = "" then
conn.close
set conn = nothing
response.write "<script>alert('請(qǐng)輸入網(wǎng)站名稱');history.go(-1);</script>"
response.end
end if
if len(schoolname) > 25 then
conn.close
set conn = nothing
response.write "<script>alert('網(wǎng)站名稱不得超過(guò)25個(gè)漢字');history.go(-1);</script>"
response.end
end if
if adminname = "" then
conn.close
set conn = nothing
response.write "<script>alert('請(qǐng)輸入管理員名稱');history.go(-1);</script>"
response.end
end if
if strfenlei1 = "" then
conn.close
set conn = nothing
response.write "<script>alert('請(qǐng)輸入一級(jí)分類名');history.go(-1);</script>"
response.end
end if
if len(strfenlei1) > 5 then
conn.close
set conn = nothing
response.write "<script>alert('一級(jí)分類名不得超過(guò)5個(gè)漢字');history.go(-1);</script>"
response.end
end if
if strfenlei2 = "" then
conn.close
set conn = nothing
response.write "<script>alert('請(qǐng)輸入二級(jí)分類名');history.go(-1);</script>"
response.end
end if
if len(strfenlei2) > 5 then
conn.close
set conn = nothing
response.write "<script>alert('二級(jí)分類名不得超過(guò)5個(gè)漢字');history.go(-1);</script>"
response.end
end if
if adminmail = "" then
conn.close
set conn = nothing
response.write "<script>alert('請(qǐng)輸入管理員E-Mail');history.go(-1);</script>"
response.end
end if
if len(adminmail) > 100 then
conn.close
set conn = nothing
response.write "<script>alert('管理員E-Mail不得超過(guò)100個(gè)字符');history.go(-1);</script>"
response.end
end if
if contactadmin = "" then
conn.close
set conn = nothing
response.write "<script>alert('請(qǐng)輸入管理員聯(lián)系方式');history.go(-1);</script>"
response.end
end if
if len(contactadmin) > 25 then
conn.close
set conn = nothing
response.write "<script>alert('管理員聯(lián)系方式不得超過(guò)25個(gè)漢字');history.go(-1);</script>"
response.end
end if
if siteurl = "" then
conn.close
set conn = nothing
response.write "<script>alert('請(qǐng)輸入系統(tǒng)URL');history.go(-1);</script>"
response.end
end if
if left(siteurl,7) <> "http://" then siteurl = "http://"&siteurl
if len(siteurl) > 100 then
conn.close
set conn = nothing
response.write "<script>alert('系統(tǒng)URL不得超過(guò)100個(gè)字符');history.go(-1);</script>"
response.end
end if
if adminpwd <> adminpwd1 then
conn.close
set conn = nothing
response.write "<script>alert('兩次密碼輸入不一致');history.go(-1);</script>"
response.end
end if
if pagesize < 1 then
response.write "<script>alert('每頁(yè)顯示數(shù)目至少為1,系統(tǒng)已自動(dòng)修正為1')</script>"
pagesize = 1
end if
if upload_size < 1 then
response.write "<script>alert('上傳大小限制至少為1K,系統(tǒng)已自動(dòng)修正為1K')</script>"
upload_size = 1
end if
sql = "select * from config"
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("schoolname")=schoolname
rs("adminname")=adminname
rs("strfenlei1")=strfenlei1
rs("strfenlei2")=strfenlei2
rs("adminmail")=adminmail
rs("contactadmin")=contactadmin
rs("siteurl")=siteurl
rs("locked")=cint(locked)
rs("pagesize")=pagesize
rs("upload_type")=upload_type
rs("upload_size")=upload_size
rs("upload_filetype")=upload_filetype
rs("headads")=headads
rs("gonggao")=gonggao
if adminpwd <> "" then
rs("adminpwd")=md5(adminpwd,32)
end if
rs.update
rs.close
set rs = nothing
conn.close
set conn = nothing
response.write "<script>alert('修改成功');window.location.href='config.asp';</script>"
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -