<% levelSw = request("levelSw") %> <%if Request.Cookies("haechang")("mem_session")="" then%> <% else %> <% end if %> <%if Request.Cookies("haechang")("mem_session")="" then%>
">
 
-
 
<%else%> <% sql="select * from User_Table where UserSocialNumber = '" & Request.Cookies("haechang")("mem_session") & "'" set rs=server.createobject("adodb.recordset") rs.open sql,dbconn,1 if rs.EOF or rs.BOF then response.redirect("../login.html") end if sql="select * from Mail_Table where bbs_Rightly = " & rs("UserDepartment") & " and bbs_AcceptDate IS NULL ORDER BY bbs_ref DESC, bbs_step, bbs_level" set rsMail=server.createobject("adodb.recordset") rsMail.open sql,dbconn,1 mailCount = rsMail.RecordCount rsMail.close set rsMail = nothing sql="select * from Board_Table where verifyMsg is null and bbs_Rightly = " & rs("UserDepartment") & " ORDER BY bbs_ref DESC, bbs_step, bbs_level" set rsbbs=server.createobject("adodb.recordset") rsbbs.open sql,dbconn,1 bbsCount = rsbbs.RecordCount rsbbs.close set rsbbs = nothing sql="select * from Board_Table where bbs_Rightly = 0 ORDER BY bbs_ref DESC, bbs_step, bbs_level" set rsall=server.createobject("adodb.recordset") rsall.open sql,dbconn,1 allbbsCount = rsall.RecordCount rsall.close set rsall = nothing %>
                                       <%=rs("UserName")%>님께서
                                     로그인하셨습니다.

        읽지않은 편지 <%= mailCount %>  /
        업무연락<%= bbsCount %>  /  전체업무연락 <%= allbbsCount %>




<% Response.Buffer = True '** DB 접속 정보 DB_Provider = "SQLOLEDB" DB_DataSource = "211.40.221.34" DB_InitialCatalog = "haechang" DB_UserId = "hcd4422" DB_Password = "haechang" strCon = "Provider = "& DB_Provider & ";"&_ "Data Source = "& DB_DataSource & ";"&_ "Initial Catalog = "& DB_InitialCatalog & ";"&_ "User Id = "& DB_UserId & ";"&_ "Password = "& DB_Password & ";" 'Connection 객체 생성 Set objCon = Server.CreateObject("ADODB.Connection") objCon.Open strCon '** 오늘 날짜 구하기 ex) 2002-07-17 '** FormatDateTime(Date, 2): 이 함수를 이용해서 간단히 구할 수도 있지만 날짜 구분기호('-')의 사용자 시스템 환경설정 차이때문에 보류한다. P_Year = Year(Date) P_Month = Right("0" & Month(Date), 2) P_Day = Right("0" & Day(Date), 2) P_Date = P_Year & "-" & P_Month & "-" & P_Day '** 어제 날짜 구하기 ex) 2002-07-16 Y_Date = DateSerial(Year(Date), Month(Date), Day(Date) - 1 ) Y_Year = Year(Y_Date) Y_Month = Right("0" & Month(Y_Date), 2) Y_Day = Right("0" & Day(Y_Date), 2) Y_Date = Y_Year & "-" & Y_Month & "-" & Y_Day '** 각종 카운트 데이터를 위한 레코드셋 생성 strQuery = "EXEC USP_NANUMI_COUNTER_GETCOUNT '"& P_Date &"','"& Y_Date &"'" Set objRs = objCon.Execute (strQuery) intTotal = objRs("Total") intMaxCount = objRs("MaxCount") intToday = objRs("Today") intYesterDay= objRs("YesterDay") objRs.Close Set objRs = Nothing objCon.Close Set objCon = Nothing '** 현재 접속자수 구하기 curCount = Application("CurrentCount") If curCount = "" Then curCount = 0 End If '보기 좋게 가공 ex) 200,000 intTotal = FormatNumber(intTotal,0) intMaxCount = FormatNumber(intMaxCount,0) intToday = FormatNumber(intToday,0) intYesterDay = FormatNumber(intYesterDay,0) curCount = FormatNumber(curCount,0) %>            전체 접속자수: <%= intTotal%>
           오늘 접속자수: <%= intToday%>
           현재 접속자수: <%= curCount%>
<% end if %>