<!--#include file="../Conn.asp"-->
<!--#include file="CheckCode.asp"-->
<!--#include file="../fy_inc/fy.Main.asp"-->
<% 	
	Dim fycms,ACTERR
	Set fycms = New ACT_Main
	Public Function UserLoginChecked()
	on error resume next
	Dim AdminName,PassWord
	 	If CheckManageCode=True Then 
			If CStr(Request.Cookies(fycmsN)("CheckManageCode")) <>CStr(CheckManageCodeContent) then
			    UserLoginChecked=false
			    Exit Function
				Response.End
			End If
		End If 
		UserLoginChecked = false 
		AdminName = RSQL(Trim(Request.Cookies(fycmsN)("AdminName")))
		PassWord= RSQL(Trim(Request.Cookies(fycmsN)("AdminPassword")))
		IF AdminName="" Or PassWord = "" Then
		   UserLoginChecked=false
		   Exit Function
		Else
			Dim UserRs
			Set Userrs=fycms.Actexe("Select Admin_Name,PassWord From Admin_fy Where Admin_Name='" & AdminName & "' And PassWord='" & PassWord & "'")
			IF UserRS.Eof And UserRS.Bof Then
				UserLoginChecked=false
			Else
				UserLoginChecked = true
			End if
			UserRS.Close:Set UserRS=Nothing
	   End IF
	End Function 
	IF Cbool(UserLoginChecked)=false Then
	  echo "<script>top.location.href='"&fycms.actsys&fycms.adminurl&"/Login.asp';</script>"
	  Response.end
	End If

	Public Function getclassdiylink(cid)
		'echo ACT_L(cid,12)
	 
	 If fycms.ACT_L(cid,12)="3" Then 
		 getclassdiylink="fy.diyname.ClassAdd.asp"
	 Else 
		 getclassdiylink="fy.ClassAdd.asp"
	 End If 
	End Function 
  %>
