<%
Function adminlogin() '¼ì²â¹ÜÀíÔ±ÊÇ·ñµÇÂ¼
    AdminName=session("admin_user")
    If AdminName<>"" Then
        sql="select top 1 * from ftbbs_admin Where admin_user='"&AdminName&"'"
        Set rs = Server.CreateObject("ADODB.Recordset")
        rs.open sql,conn,1,1
        if rs.bof and rs.eof then
            adminlogin="N"
        else
            If trim(rs("admin_pwd"))=trim(session("admin_pwd")) Then
               adminlogin="Y"
            Else
               adminlogin="N"
            End If
        end IF
        rs.close
        set rs=nothing
    else
        adminlogin="N"
    end if    
End Function

if adminlogin="N" then
   response.redirect "../admin.asp"
end if
%>