<%
on error resume next
Set conn=Server.CreateObject("ADODB.Connection")
DBPath1=server.mappath("../../db/#sdoa.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then 
	response.write("<script language=""javascript"">")
	response.write("window.top.location.href='../../default.asp';")
	response.write("</script>")
	response.end
end if
function showtime(longtime)
  showtime=year(longtime) & "-" & showtwo(month(longtime)) & "-" & showtwo(day(longtime)) & "&nbsp;" & showtwo(hour(longtime)) & ":" & showtwo(minute(longtime)) 
end function

function ShowTwo(key)
  if len(key)=1 then
     showtwo="0" & key
  else
     showtwo=key
  end if      
end function

Set conn=Server.CreateObject("ADODB.Connection")
DBPath1=server.mappath("../../db/#sdoa.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
set rsadmin=server.createobject("adodb.recordset")
sql="select * from userinf where username='" & oabusyusername&"'"
rsadmin.open sql,conn,1
allow_manage_docstoreroom=rsadmin("allow_manage_docstoreroom")    
set rsadmin=nothing
if allow_manage_docstoreroom<>"yes" then
	meal_admin=0
else
	meal_admin=1
end if 	
rsAdmin.close
set rsAdmin=nothing


vdate=date()
createTime=showtwo(hour(now())) & showtwo(minute(now()))

set rsTime=server.createobject("adodb.recordset")
rstime.open "select * from mealrule",conn,3,1
if not rsTime.eof then
lunchTime=rstime("lunchTime")
supperTime=rstime("supperTime")
else
lunchTime="1000"
supperTime="1700"
end if
set rstime=nothing
%>
<script>
function OpenWindows(url)
{
  var 
 newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=50,left=120,width=400,height=300");
 return false;
 
}
function OpenBigWindows(url)
{
  var 
 newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=30,left=50,width=600,height=400");
 return false;
 
}
</script>
