⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user_save.asp

📁 九酷网络个人主页系统破解版
💻 ASP
字号:
<!--#include file="admin.asp"-->
<!--#include file="../inc/md5.asp"-->
<%
chk_admin_login(2)
username=request.Form("username")
sql="select * from [user] where username='"&username&"'"
rs.open sql,conn,1,3
if Request.Form("hostid")<>Request.Form("groupid") then
set rs3=server.createobject("ADODB.Recordset")
sql3="select * from [host] where id="&cint(rs("groups"))
rs3.open sql3,conn,1,1
userdir_old=rs3("userdir")&username
bakdir_old=rs3("bakfolder")&username
set rs2=server.createobject("ADODB.Recordset")
sql2="select * from [host] where id="&cint(Request.Form("hostid"))
rs2.open sql2,conn,1,1
userdir_new=rs2("userdir")&username
bakdir_new=rs2("bakfolder")&username
rs("groups")=rs2("id")
rs("ktdate")=Date()
if rs2("usedays")<>0 then
rs("stopdate")=Date()+rs2("usedays")
elseif rs2("usedays")=0 then
rs("stopdate")=null
end if
'判断是否移动目录
if userdir_old<>userdir_new and fso.FolderExists(userdir_old) and not fso.FolderExists(userdir_new) then
fso.copyfolder userdir_old,userdir_new,true
if fso.FolderExists(bakdir_old) then
fso.copyfolder bakdir_old,bakdir_new,true
fso.deletefolder bakdir_old,true
end if
fso.deletefolder userdir_old,true
end if
If not connftp.Execute("Select * From [User accounts] where User='"&username&"'").eof Then
set rsftp=Server.CreateObject("ADODB.Recordset")
sqlftp="select * from [User accounts] where User='"&username&"'"
rsftp.open sqlftp,connftp,1,3
rsftp("Access")=userdir_new+"|RWAMLCDP"
rsftp("homedir")=userdir_new
if rs2("usedays")<>0 then
rsftp("Expiration")=Date()+rs2("usedays")
else
rsftp("Expiration")="1980-1-1"
end if
rsftp("QuotaMax")=rs2("space")*1048576
rsftp("QuotaCurrent")=fso.getfolder(userdir_new).size
rsftp("Groups")=rs2("name")
rsftp("notes")=rs2("name")
rsftp.update
rsftp.close
set rsftp=nothing
end if
response.write"<script>alert('用户空间类型已经修改为:"&rs2("name")&"');</script>"
rs2.close
set rs2=nothing
end if
if request.form("password")<>rs("password") then
rs("password")=md5(request.form("password"),32)
end if
rs("state")=Request.Form("state")
rs("truename")=Request.Form("truename")
rs("sex")=Request.Form("sex")
rs("add")=Request.Form("add")
rs("zip")=Request.Form("zip")
rs("tel")=Request.Form("tel")
rs("email")=Request.Form("email")
rs("money")=Request.Form("money")
rs("point")=Request.Form("point")
if Request.Form("hostid")=Request.Form("groupid") then rs("space")=Request.Form("space")
rs("sitename")=Request.Form("sitename")
rs("intro")=Request.Form("intro")
rs("siteimg")=Request.Form("siteimg")
rs("isgood")=Request.Form("isgood")
rs("star")=Request.Form("star")
if Request.Form("adddays")<>empty then
rs("stopdate")=rs("stopdate")+Request.Form("adddays")
end if
rs.update
rs.close
set rs=nothing
response.write"<script>alert('用户资料更新成功!');location.href='user_admin.asp?"&session("temp")&"'</script>"
%> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -