<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V3.0》，简称“AsaiMHV3”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

Go_Back="<input type=button name=go_back value='返回上一页' onclick=""javascript:history.back(1);"" class=""btn"">"
uKong="<table width='90%' height=2><tr class=bg><td></td></tr></table>"
redx="<font class=red>*</font>"

'//* 转向 *//
Sub Format_Redirect(ByVal rUrl)
	Call Web_Clear(0)
	Response.Clear
	Response.Redirect rUrl
	Response.End
End Sub

'//* 安全的提交处理 *//
Function Chk()
	Chk = Cls.Chk()
	If Cls.Session_Get(Session_For&"Addfrm") = False Then Chk = False
End Function

'//* 格式化提交开始 *//
Sub Form_First()
	Cls.Session_Set Session_For&"Addfrm",True
End Sub

Sub FormatForm(oForm,oTd)
	Cls.Session_Set Session_For&"Addfrm",True
	Response.Write Vbcrlf&"<form name="""&oForm&""" action="""&Cls.CurrentUrl&""" method=""post"">"
	Response.Write Vbcrlf&"<input type=""hidden"" name=""chk"" value=""yes"">"
  If oTd="" Then Exit Sub
  Dim TmpDim, m
  TmpDim = Split(oTd,",")
	Response.Write Vbcrlf&"<tr style=""display:none;"">"
  For m=0 To UBound(TmpDim)
	  Response.Write "<td width="""&TmpDim(m)&"%"">"
	Next
	Response.Write "</tr>"
	Erase TmpDim
End Sub

'//* 参数配置修改※格式化提交 *//
Sub Submit_Config()
	Response.Write vbcrlf&"<tr align=center class=tr1>" & _
		 vbcrlf&"<td colspan=3><input type=submit value='提交"&tit_fir&"修改' class=btn>　　<input type=reset value='重新填写' class=btn>　　"&go_back&"</td>" & _
		 vbcrlf&"</tr></form>"
End Sub

'//* 格式化提交添加 *//
Sub Submit_Add()
	Response.Write vbcrlf&"<tr class=tr1>" & _
		 vbcrlf&"<td></td>" & _
		 vbcrlf&"<td height=30><input type=submit value='提交添加' class=btn>　　<input type=reset value='重新填写' class=btn>　　"&go_back&"</td>" & _
		 vbcrlf&"</tr></form>"
End Sub

'//* 格式化提交修改 *//
Sub Submit_Edit()
	Response.Write vbcrlf&"<tr class=tr1>" & _
		 vbcrlf&"<td></td>" & _
		 vbcrlf&"<td height=30><input type=submit value='提交修改' class=btn>　　<input type=reset value='重新填写' class=btn>　　"&go_back&"</td>" & _
		 vbcrlf&"</tr></form>"
End Sub

'//* 格式化提交 *//
Sub Submit_Init(ByVal sName,ByVal Cols)
	Response.Write vbcrlf&"<tr class=tr1>" & _
		 vbcrlf&"<td></td>" & _
		 vbcrlf&"<td height=30 colspan="&Cols-1&"><input type=submit value='提交"&sName&"' class=btn>　　<input type=reset value='重新填写' class=btn>　　"&go_back&"</td>" & _
		 vbcrlf&"</tr></form>"
End Sub

'//* 后台提交反馈 *//
Sub AMH_Msg(ByVal tVar,ByVal tUrl,ByVal tt)
	Cls.Session_Set Session_For&"Addfrm",False
	If tt=0 Then
		Response.Write vbcrlf&"<tr><td colspan=2 align=center><br />"&tVar&"<br /><br /><a href='"&turl&"'>点击返回</a><br /><br /><meta http-equiv='refresh' content='3; url="&tUrl&"'></td></tr>"
		Exit Sub
	End If
	Response.Write vbcrlf& Cls.Js_Put("alert("""&tVar&""");location.href='"&tUrl&"';",1)
End Sub

'//* 后台简单帮助说明 *//
Sub AMH_Read1(ByVal tVar,ByVal tt,ByVal rVar)
	Dim tit_var
	tit_var="相关"
	If tVar<>"" Then tit_var=tVar
	Response.Write("<a class=read title='<table border=0 cellspacing=0 cellpadding=0 width=400><tr><td height=25><font class=read><b>"&tt&"</b></font>：</td></tr><tr><td class=htd>"&rvar&"</td></tr></table>'>"&tit_var&"说明</a>")
End Sub

'//* 后台简单帮助说明 *//
Sub AMH_Read(ByVal tVar,ByVal tt,ByVal rVar)
	Dim tit_var
	If tVar<>"" Then tit_var="title='"&tVar&"'"
	'tt = Replace(tt,"<br />","\n\n")
	tt = "<b>"&tt&"</b>"
	'rVar = Replace(rVar,"<br />","\n\n")
	Response.Write("<a class=helplink href=""?"" onclick=""showHelpTip(event, '"&tt&"<br />"&rVar&"', true); return false""><img src='Images/Help.gif' border=0 align=absmiddle "&tit_var&"></a>")
End Sub

'//* 后台错误信息 *//
Sub AMH_Error(ByVal tVar)
	Response.Write vbcrlf&"<tr><td colspan=2 align=center><br />"&tVar&"<br /><br />"&go_back&"<br /><br /></td></tr>"
End Sub

'//* 格式化表格等 *//
Sub AMH_Td(ByVal tVar)
	Response.Write vbcrlf&"<tr><td class=td colspan=2>"&tVar&"</td></tr>"
End Sub

Sub AMH_Td0(ByVal tVar,ByVal tCol)
	Response.Write vbcrlf&"<tr><td class=td colspan="&tCol&">&nbsp;"&tVar&"</td></tr>"
End Sub

Sub AMH_Table(ByVal t1)
	If t1=1 Then Response.Write uKong
	Response.Write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>"
End Sub

'//* 后台页面结束部分 *//
Sub AMH_Ender(ByVal et)
	Dim temp1
       temp1="<font color=bule>执行数据库更新查询:"&Cls.num_rs&"次 页面执行时间:"&FormatNumber((timer()-Cls.timer_start)*1000,3)&"毫秒</font>"
	Response.Write vbcrlf&"</table>"
	If MenuHelp <> "" Then
		Call AMH_Table(1)
		Response.Write vbcrlf&"<tr><td><fieldset><legend>"
		Response.Write vbcrlf&"&nbsp;<a onclick=""document.all.HelpView.style.display=document.all.HelpView.style.display=='none'?'':'none';return false;"" href=""javsscript:;""><b>"&et&"小贴士</b>&nbsp;</a>"
		Response.Write vbcrlf&"</legend><table width='98%' border=0 cellspacing=4 cellpadding=1><tr id='HelpView' style='display:none'><td>"&MenuHelp&"</td></tr></table></fieldset>"
		Response.Write vbcrlf&"</td></tr>"
		Response.Write vbcrlf&"</table>"
	End If
	Response.Write vbcrlf&"</center>" & _
		 vbcrlf&"<br /><center>"&temp1&"</center>" & _
		 vbcrlf&"</body></html>"
	Call Web_Clear(0)
End Sub

'//* 后台日志写入 *//
Sub AMH_Event(ByVal eRemark)
	Dim Remark
	Remark=Cls.Is_Null(eRemark)
	Remark=Replace(Remark,"'","""")
	Remark=Replace(Remark,Chr(10),"")
	Remark=Replace(Remark,Chr(13),"")
	SQL = "insert into AsaiMHEvent(username,nname,remark,tim,ip,sys) Values('"&login_username&"','"&tit&"','"&remark&"','"&Cls.now_time&"','"&Cls.ip_sys(0)&"','"&Cls.ip_sys(1)&"')"
	Call Cls.Exec(SQL,0)
End Sub

'//* 循环取 Form 值 *//
Function AMH_Str(ByVal Strers,ByVal Strtype)
	Dim TempStr
	AMH_Str=""
	For Each TempStr In Request.Form(strers)
		    If Strtype=1 Then
			   TempStr=Cls.ChkNumeric(TempStr)
			Else
			   TempStr=Replace(TempStr,"|||","")
			End If
			AMH_str=AMH_str&TempStr&"|||"
	Next
	AMH_Str=Replace(AMH_Str,"@@@","")
    'AMH_Str=Replace(AMH_Str,"{$Soft","{$Movie")
	'AMH_Str=Replace(AMH_Str,"{$ReadSoftList","{$ReadMovieList")
	'AMH_Str=Replace(AMH_Str,"{$ReadSoftPic","{$ReadMoviePic")
	
	If Trim(AMH_str)="" Then
		AMH_Str="|||"
	End If
	TempStr=""
End Function

Function Code_Config(ByVal Strers)
	Dim Strer
	Strer = Trim(Strers)
	If Cls.Is_Null(Strer) = "" Then
		Code_Config = ""
		Exit Function
	End If
	Strer = Replace(Strer,"'","")
	Strer = Replace(Strer,"|||","")
	Strer = Replace(Strer,"@@@","")
	Strer = Replace(Strer,",","")
	Strer = Replace(Strer,CHR(34),"")
	Code_Config=Strer
End Function

Function Code_Url(Strers)
	Dim Strer
	Strer = Trim(Strers)
	If Cls.Is_Null(Strer) = "" then
		Code_Url = ""
		Exit Function
	End If
	If Right(Strer,1) <> "/" Then Strer = Strer&"/"
	Code_Url=Strer
End Function
%>
