www.pudn.com > QQ.zip > conn.asp, change:2009-07-11,size:1035b


<% 
  dim ConnString 
  dim arrUserType(2) 
  arrUserType(0)="新闻编辑" 
  arrUserType(1)="类别管理员" 
  arrUserType(2)="系统管理员" 
  on error resume next 
  set conn=server.CreateObject("adodb.connection") 
  connstring="provider=microsoft.jet.oledb.4.0;data source=" & server.MapPath("../../database/#qyky.mdb") 
  conn.open ConnString 
  if err.number<>0 then 
    Response.Write err.description 
	response.end 
  end if 
  function DateToStr() 
     dim s 
	 s=year(now) 
	  
	 if month(now)<10 then 
	    s=s & "-0" & month(now) 
	 else 
	    s=s & "-" & month(now) 
	 end if 
 
	 if day(now)<10 then 
	    s=s & "-0" & day(now) 
	 else 
	    s=s & "-" & day(now) 
	 end if 
 
	 if hour(now)<10 then 
	    s=s & " 0" & hour(now) 
	 else 
	    s=s & " " & hour(now) 
	 end if 
 
	 if minute(now)<10 then 
	    s=s & ":0" & minute(now) 
	 else 
	    s=s & ":" & minute(now) 
	 end if 
 
	 if second(now)<10 then 
	    s=s & ":0" & second(now) 
	 else 
	    s=s & ":" & second(now) 
	 end if 
	 DateToStr=s 
  end function 
   
%>