?? save.asp
字號:
<!--#include file="validate.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
Set rs= Server.CreateObject("ADODB.Recordset")
'管理員登陸帳戶資料修改
if request("user")="edit" then
dim user_name,pass_word,validate
user_name=trim(Request.Form("user_name"))
pass_word=md5(Request.Form("pass_word"))
sql="select username,password from xg_manage where ID=1"
rs.open sql,conn,1,3
rs("username")=user_name
rs("password")=pass_word
session("user_name")=user_name
rs.update
rs.close
Response.Write "<script>window.alert('管理員登陸帳戶資料修改成功!');history.back(-1);</script>"
end if
'新增服務器
if request("server")="add" then
sql="select url from xg_server"
rs.open sql,conn,1,3
rs.addnew
rs("url")=request.form("url")
rs.update
rs.close
Response.Write "<script>window.alert('服務器新增成功!');history.back(-1);</script>"
end if
'修改服務器
if request("server")="edit" and request("edit")="修改" then
if request("id")<>"1" then
sql="select url from xg_server where id="&clng(request("id"))
rs.open sql,conn,1,3
rs("url")=request.form("url")
rs.update
rs.close
Response.Write "<script>window.alert('服務器修改成功!');history.back(-1);</script>"
else
Response.Write "<script>window.alert('系統保留,請勿修改!');history.back(-1);</script>"
end if
end if
'刪除服務器及相關FLASH動畫
if request("server")="edit" and request("edit")="刪除" then
conn.execute"delete from xg_file where urla="&clng(request("id"))
if request("id")<>"1" then
conn.execute"delete from xg_server where id="&clng(request("id"))
Response.Write "<script>window.alert('服務器及相關FLASH動畫刪除成功!');history.back(-1);</script>"
else
Response.Write "<script>window.alert('系統保留,請勿刪除,但該組相關FLASH動畫已被刪除!');history.back(-1);</script>"
end if
end if
'新增動畫專輯
if request("editxl")="add" then
sql="select * from xg_special"
rs.open sql,conn,1,3
rs.addnew
rs("name")=request.form("name")
if request.form("tj")="true" then
rs("tj")=true
else
rs("tj")=false
end if
rs("img")=request.form("img")
rs("jj")=request.form("jj")
Function getNum(num)
if num<10 then num="0"&num
getNum=num
End Function
rs("time")=Year(now())&"-"&getNum(Month(now()))&"-"&getNum(Day(now()))&" "&time()
rs.update
rs.close
Response.Write "<script>window.alert('FLASH專輯添加成功!');window.location='editxl3.asp';</script>"
end if
'修改動畫專輯
if request("editxl")="edit" then
sql="select * from xg_special where id="&clng(request("id"))
rs.open sql,conn,1,3
rs("name")=request.form("name")
if request.form("tj")="true" then
rs("tj")=true
else
rs("tj")=false
end if
rs("img")=request.form("img")
rs("jj")=request.form("jj")
Function getNum(num)
if num<10 then num="0"&num
getNum=num
End Function
rs("time")=Year(now())&"-"&getNum(Month(now()))&"-"&getNum(Day(now()))&" "&time()
rs.update
rs.close
Response.Write "<script>window.alert('FLASH專輯修改成功!');history.back(-1);</script>"
end if
'刪除動畫專輯及相關FLASH動畫
if request("editxl")="del" then
conn.execute"delete from xg_file where xlflash="&clng(request("id"))
conn.execute"delete from xg_special where id="&clng(request("id"))
Response.Write "<script>window.alert('FLASH專輯及相關FLASH動畫刪除成功!');history.back(-1);</script>"
end if
'新增FLASH動畫
if request("flash")="add" then
if request("xlb")="" or request("xlb")="請選擇" then
Response.Write "<script>window.alert('請選擇類別!');history.back(-1);</script>"
else
sql="select * from xg_file"
rs.open sql,conn,1,3
rs.addnew
rs("name")=request("name")
rs("lb")=request("lb")
rs("xlb")=request("xlb")
rs("urla")=request("urla")
rs("urlb")=request("urlb")
rs("xlflash")=request("xlflash")
rs("img")=request("img")
rs("tj")=request("tj")
Function getNum(num)
if num<10 then num="0"&num
getNum=num
End Function
rs("time")=Year(now())&"-"&getNum(Month(now()))&"-"&getNum(Day(now()))&" "&time()
rs.update
rs.close
Response.Write "<script>window.alert('FLASH添加成功!');window.location='addflash.asp';</script>"
end if
end if
'修改FLASH動畫
if request("flash")="edit" then
if request("xlb")="" then
Response.Write "<script>window.alert('請選擇類別!');history.back(-1);</script>"
else
sql="select * from xg_file where id="&clng(request("id"))
rs.open sql,conn,1,3
rs("name")=request("name")
rs("lb")=request("lb")
rs("xlb")=request("xlb")
rs("urla")=request("urla")
rs("urlb")=request("urlb")
rs("xlflash")=request("xlflash")
rs("img")=request("img")
rs("tj")=request("tj")
Function getNum(num)
if num<10 then num="0"&num
getNum=num
End Function
rs("time")=Year(now())&"-"&getNum(Month(now()))&"-"&getNum(Day(now()))&" "&time()
rs.update
rs.close
Response.Write "<script>window.alert('FLASH修改成功!');history.back(-1);</script>"
end if
end if
'刪除FLASH動畫
if request("flash")="del" then
conn.execute"delete from xg_file where id="&clng(request("id"))
Response.Write "<script>window.alert('FLASH動畫刪除成功!');history.back(-1);</script>"
end if
set rs=nothing
conn.close
set conn=nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -