<!--#include file="../Inc/Cls_Main.Asp"-->
<%
Dim SiteName, SiteTitle, SiteUrl, AdminName, AdminPass, UpLoadFile
SiteName = Trim(Easp.Post("SiteName:s"))
SiteTitle = Trim(Easp.Post("SiteTitle:s"))
SiteUrl = Trim(Easp.Post("SiteUrl:s"))
AdminName = Trim(Easp.Post("AdminName:s"))
AdminPass = Trim(Easp.Post("AdminPass:s"))
UpLoadFile = Trim(Easp.Post("UpLoadFile:s"))
If Easp.IsN(SiteName) Then
    Easp.Alert "网站名称必须填写!"
End If
If Easp.IsN(SiteTitle) Then
    Easp.Alert "网站标题必须填写!"
End If
If Easp.IsN(SiteUrl) Then
    Easp.Alert "网站主域名必须填写!"
End If
If Easp.IsN(AdminName) Then
    Easp.Alert "管理账号必须填写!"
End If
If Easp.IsN(AdminPass) Then
    Easp.Alert "管理密码必须填写!"
End If
If Easp.IsN(UpLoadFile) Then
    Easp.Alert "上传文件目录必须填写!"
End If
UpLoadFile = Replace(Replace(Replace(Replace(UpLoadFile, "\", "/"), "//", "/"), "//", "/"), ".", "")
If Left(UpLoadFile, 1) <> "/" Then
    UpLoadFile = "/" & UpLoadFile
End If
If Right(UpLoadFile, 1) <> "/" Then
    UpLoadFile = UpLoadFile & "/"
End If
'=====================================================================
Easp.db.UR TablePrefix & "Admin", " Id = 1 ", Array("AdminName:" & AdminName, "AdminPass:" & Easp.MD5(AdminPass))
'=====================================================================
Dim List, ResultVal
Easp.Use "list"
Set List = Easp.List.New
List("SiteName") = SiteName
List("SiteTitle") = SiteTitle
List("SiteUrl") = SiteUrl
List("UpLoadFile") = UpLoadFile
ResultVal = Easp.db.UR(TablePrefix & "Config", " Id = 1 ", List.Hash)
'=====================================================================
Easp.Use("Cache")
Easp.Cache.Clear
Easp.C List
If ResultVal <> 0 Then
    Easp.AlertUrl "安装成功,请手动删除：Install，安装文件夹!", SiteAdminPath
End If
%>