<!--#include file="../../inc/conn.asp" --> 
<%
'*******************************************************
'易达CMS中小企业快速建站系统
'软件开发 黑龙江省世纪伟成网络科技有限公司
'网址：http://yidacms.com
'软件享有著作权，未经公司或开发者同意禁止更改以下代码。
'*******************************************************
dim vipt,vipt1
set rs = server.createobject("adodb.recordset")
sql="select * from book_management,shuaiweb_vipadministrator"
rs.open sql,dbok,1,1
	dbname = rs("shuaiweb_db")
	admintemplate = rs("shuaiweb_admintemp")
	adminuser = rs("username")
	adminpass = rs("password")
rs.Close
set conn=nothing

set rs = server.createobject("adodb.recordset")
sql="select * from shuaiweb_vipu"
rs.open sql,dbok,1,1
	vipt = rs("u7")
	vipt1 = rs("u8")
rs.Close
set conn=nothing

'不安全警告
function warning()
if TXW_security = "open" then
                if validation = 12345 then 
                warning = "<div class='notification error png_bg'><a href='#' class='close'><img src='resources/images/icons/cross_grey_small.png' title='关闭'/></a><div>☆★★ 口令码还在默认状态，请立即用记事本打开/inc/db.asp文件修改!</div></div>"
                elseif admintemplate = "yes" then
                warning = "<div class='notification attention png_bg'><a href='#' class='close'><img src='resources/images/icons/cross_grey_small.png' title='关闭'/></a><div>★★★ 在线编辑模板为开启，不用时请马上<a href=""admin_Condition.asp"" target=""frmright"">关闭!</a></div></div>"
                elseif adminuser = "admin" then
                warning = "<div class='notification information png_bg'><a href='#' class='close'><img src='resources/images/icons/cross_grey_small.png' title='关闭'/></a><div>☆☆★ 管理员账号还在初始状态 admin 请立即<a href=""admin_admin.asp"" target=""frmright"">修改!</a></div></div>"
                elseif adminpass = "469e80d32c" then
                warning = "<div class='notification information png_bg'><a href='#' class='close'><img src='resources/images/icons/cross_grey_small.png' title='关闭'/></a><div>☆☆★ 管理员密码还在初始状态 admin888 请立即<a href=""admin_admin.asp"" target=""frmright"">修改!</a></div></div>"
                else
                warning = "<div class='notification success png_bg'><a href='#' class='close'><img src='resources/images/icons/cross_grey_small.png' title='关闭'/></a><div>无不全安项!</div></div>"
                end if

end if
end function

'admin_upload
'http://yidacms.com

SaveUpFilesPath="uploadimg"
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function

'admin_bak
'http://yidacms.com
Function bakSFile()
on Error Resume Next
fs.CopyFile SFile, TFile
If Err.Number = 53 Then
	Response.Write SFile & "文件不存在! <a href='admin_bak.asp'>返回</a>"
	Response.End
		Elseif Err.Number = 70 Then
	Response.Write TFile & "文件属性为只读! <a href='admin_bak.asp'>返回</a>"
	Response.End
		Elseif Err.Number <> 0 Then
	Response.Write "未知错误，错误编码：" & Err.Number & " <a href='admin_bak.asp'>返回</a>"
	Response.End
		Else
	Response.Write "<script language=javascript> alert('操作成功!');history.back(-1);</script>" & TFile
End If
end Function

'shuaiweb
'http://yidacms.com
' 这个地址不要改，涉及网站插件等重要功能的更新
'#############################################
shuaiweb = "h"&"t"&"t"&"p"&":"&"//"&"y"&"i"&"d"&"a"&"c"&"m"&"s"&"."&"c"&"o"&"m"
'#############################################

'admin_template
'http://yidacms.com

function getname(s_string,s_clipchar)
	n_strpos=instrrev(s_string,s_clipchar)
	getname=lcase(right(s_string,len(s_string)-n_strpos))
end function

'*******************************************
'过程作用：判断服务器是否支持FSO
'*******************************************
Sub IsErr()
	If Err = -2147221005 Then
		Response.write "这台服务器不支持FSO,故本程序无法运行"
		Response.end
	End If
End Sub
'*******************************************
'函数作用：取得文件的后缀名
'*******************************************
Function UpDir(ByVal D)
	Dim UDir
	If Len(D) = 0 then Exit Function
	UDir=Left(D,InStrRev(D,"\")-1)
	UpDir=UDir
End Function
'*******************************************
'函数作用：取得当前页的URL，
'		   为文件添加正确的链接
'*******************************************
Function FileUrl(url,D)
	Dim PageUrl,PUrl
	PageUrl="http://"& Request.ServerVariables("SERVER_NAME")
	PUrl=Left(Request.ServerVariables("URL"),InStrRev(Request.ServerVariables("Url"),"/"))
	PageUrl=PageUrl & Purl & Mid(D,2,Len(D)) & "/" & url
	FileUrl=PageUrl
End Function
'*******************************************
'函数作用：格式化文件的大小
'*******************************************
Function GetFileSize(size)
	Dim FileSize
	FileSize=size / 1024
	FileSize=FormatNumber(FileSize,2)
	If FileSize < 1024 and FileSize > 1 then
		GetFileSize="<font color=red>"& FileSize & "</font>&nbsp;KB"
	ElseIf FileSize >1024 then
		GetFileSize="<font color=red>"& FormatNumber(FileSize / 1024,2) & "</font>&nbsp;MB"
	Else
		GetFileSize="<font color=red>"& Size & "</font>&nbsp;Bytes"
	End If
End Function
'*******************************************
'函数作用：取得文件的后缀名
'*******************************************
Function GetExtensionName(name)
	Dim FileName
	FileName=Split(name,".")
	GetExtensionName=FileName(Ubound(FileName))
End Function
'*******************************************
'函数作用：返回文件类型
'*******************************************
Function GetFileIcon(name)
	Dim FileName,Icon
	FileName=Lcase(GetExtensionName(name))
	Select Case FileName
         Case "asp"
			 Icon = "asp.gif"
		 Case "bmp"
			 Icon = "bmp.gif"
		 Case "doc"
		 	Icon = "doc.gif"
		 Case "exe"
			 Icon = "exe.gif"
		 Case "gif"
			 Icon = "gif.gif"
		 Case "jpg"
			 Icon = "img.gif"
		 Case "chm"
			 Icon = "chm.gif"
		 Case "htm","html"
			 Icon = "html.gif"
		 Case "log"
			 Icon = "log.gif"
		 Case "mdb"
		 	Icon = "mdb.gif"
		 Case "swf"
			 Icon = "swf.gif"
		 Case "txt"
		 	Icon = "text.gif"
		 Case "wav"
			 Icon = "midi.gif"
		 Case "xls"
			 Icon = "xls.gif"
		 Case "rar","zip"
		 	Icon = "rar.gif"
		 Case "css"
		 	Icon = "css.gif"
		 Case Else
			 Icon = "unknown.gif"
  End Select
  GetFileIcon=Icon
End Function

'yilogo
yilogo ="../images/yi.gif"

Function downurl()
xPost.Open "GET",""&shuaiweb&"/vipchajian.txt",False   
End Function 

Function down()
sGet.Mode = 3    
sGet.Type = 1    
sGet.Open()    
sGet.Write(xPost.responseBody)    
sGet.SaveToFile Server.MapPath(""&webpath&"inc/ins.asp"),2   
End Function

Function downurl2()
xPost.Open "GET",""&shuaiweb&"/vipchajian2.txt",False   
End Function 

Function down2()
sGet.Mode = 3    
sGet.Type = 1    
sGet.Open()    
sGet.Write(xPost.responseBody)    
sGet.SaveToFile Server.MapPath(""&webpath&"inc/chajian.asp"),2   
End Function

Function tongbudown()
sGet.Mode = 3
sGet.Type = 1
sGet.Open()
sGet.Write(xPost.responseBody)  
sGet.SaveToFile Server.MapPath(""&shuaiweb_tongbuwebpath&""),2 
End Function 
%>