<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
Dim qryValue	' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수..

YY = inputvalue(request("YY"))
MM = inputvalue(request("MM"))
DD = inputvalue(request("DD"))

If YY="" Then YY = Year(now)
If MM="" Then MM = month(now)
If DD="" Then DD = day(now)
If Len(MM)=1 Then MM = "0"&MM
If Len(DD)=1 Then DD = "0"&DD


int_YY = "" : If IsNumeric(YY) Then  int_yy = Int(YY)
int_MM = "" : If IsNumeric(MM) Then  int_MM = Int(MM)
int_DD = "" : If IsNumeric(DD) Then  int_DD = Int(DD)

' where 조건
SetWhere()

' 카운터 수의 합을 구한다
qry ="select count(vNum) as TCount from visit_counter " & qryValue
Set Rs = Dbcon.Execute (qry)
totalCount = rs(0)
rs.close : Set rs = Nothing


qry = "select vIP,vBrowser,vOS,vHH,vMT,vURL from visit_counter "&qryValue&" order by vNum desc"
Set Rs = Dbcon.Execute (qry)
If rs.eof Then
	vCnt = -1
Else
	vData = rs.getrows()
	vCnt = UBound(vData,2)
End If
rs.close : Set rs = Nothing


%>

		<!-- 내용영역 -->
		<div id="contents">

			<div id="contents_head"> 
				<div id="contents_title">
					<img src="/manager/img/tit_ic08.gif" width="22" height="21" class="<%=skin%> center" alt="" /> <h1><span>방문자 접속위치정보
					</span></h1>
				</div>
				<div id="location">
					<a href="/manager/" tabindex="<%=getTabIndex()%>">Home</a> &gt; <a href="/manager/content/05stats/h.asp" tabindex="<%=getTabIndex()%>">통계자료</a> &gt; <a href="/manager/content/05stats/log.asp" tabindex="<%=getTabIndex()%>">접속위치정보</a> &gt; <a href="log.asp" class="now" tabindex="<%=getTabIndex()%>">방문자</a>
				</div>
			</div>

			<!-- 내용들어가는곳 -->
			<div id="contents_area">

				

					<h2 class="space"></h2>


					<div class="write_info">

						<div class="write_form pt7">
							<form id="frm" action="log.asp"  method="post">

							<ul>
							<li class="search"><label for="YY">방문자별검색</label> :</li>
							<li>
								<select id="YY" name="YY" title="해당 년도 선택" class="stats" tabindex="<%=getTabIndex()%>">
								<option value="">전체</option>
									<% For z=2009 To Year(now)%>
									<option value="<%=z%>" <%If z=int_YY Then response.write "selected='selected'" End If %>><%=z%>년</option>
									<% next%>
								</select>
							</li>
							<li>
								<select id="MM" name="MM" title="해당 월 선택" class="stats" tabindex="<%=getTabIndex()%>">
								<option value="">전체</option>
									<% For z=1 To 12 %>
									<option value="<%=z%>" <%If z= int_MM Then response.write "selected='selected'" End If %>><%=z%>월</option>
									<% next%>
								</select>
							</li>
							<li>
								<select id="DD" name="DD" title="해당 일 선택" class="stats" tabindex="<%=getTabIndex()%>">
								<option value="">전체</option>
									<% For z=1 To 31 %>
									<option value="<%=z%>" <%If z = int_DD Then response.write "selected='selected'" End If %>><%=z%>일</option>
									<% next%>
								</select>
							</li>
							<li><div id="<%=skin%>_bt"><span class="button"><input type="submit" value="보기" tabindex="<%=getTabIndex()%>" /></span></div></li>
							<li class="pl10"><div id="w01_bt"><span class="button"><input type="button" value="오늘" onclick="page_go1('log.asp?YY=<%=Year(now)%>&amp;MM=<%=Month(now)%>&amp;DD=<%=Day(now)%>');" tabindex="<%=getTabIndex()%>" /></span> </div></li>
							</ul>

							</form>
						</div>

					</div>


					<div class="list_count pb2">
						전체 <strong><%=totalCount%></strong>명 방문
					</div>

					<fieldset>
						<legend>방문자 접속위치정보 통계</legend>
						<table cellspacing="0" class="bbs_<%=skin%>" summary="방문자 접속위치정보를 확인합니다.">
						<caption>방문자 접속위치정보 통계 서식</caption>
						<colgroup>
						<col width="50" />
						<col width="410" />
						<col width="130" />
						<col width="140" />
						</colgroup>

						<thead>
						<tr>
							<th scope="col">번호</th>
							<th scope="col">링크된페이지(REFER_URL)</th>
							<th scope="col">운영체제 / 브라우저</th>
							<th scope="col">방문시각 / 방문자 IP </th>
						</tr>
						</thead>

						<tbody>

<%
If vCnt>-1 Then
	num = totalCount
	For j=0 To vCnt

		Call arr2Value("vIP,vBrowser,vOS,vHH,vMT,vURL", "vData", j)

		If vURL = "" then
			vURL_str = "주소직접입력 또는 즐겨찾기를 이용한 방문"
		else
			vURL = replace(vURL, "&", "&amp;")
			wo = "javascript:void(window.open('"&vURL&"'));"
			vURL_str = "<a href="""&vURL&""" title='"&vURL&"' tabindex='"&getTabIndex()&"' target='_blank'>"&StringToHTML(vURL, 60, false )&"</a>"
		End If
		
%>
						<tr>
							<td scope="row" class="center"><%=num%></td>
							<td scope="row" class="left"><%=vURL_str%></td>
							<td scope="row" class="center"><%=SetOS(vOS)%><br /><%=SetBrowser(vBrowser)%></td>

							<td scope="row" class="center"><%=right("0"&vHH,2)%> : <%=right("0"&vMT,2)%><br /><a href="javascript:page_go2('infopage.asp?domain_name=<%=vIP%>');" tabindex="<%=getTabIndex()%>"><%=vIP%></a></td>
						</tr>

<%
		num = num -1
	next
End if
%>						


						</tbody>
						</table>
					</fieldset>

			

			</div>
			<!-- 내용들어가는곳 -->

		</div>
		<!-- ' 내용영역 -->
	


<!--#include virtual="/manager/common/file/sub_bottom.asp" -->

