최초등록

This commit is contained in:
sp1000je
2026-02-23 10:01:00 +09:00
commit 7bc9767bf4
3120 changed files with 198447 additions and 0 deletions
+283
View File
@@ -0,0 +1,283 @@
<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수..
Dim arrValue(31)
Dim arrData(33,2)
YY = inputvalue(request("YY"))
MM = inputvalue(request("MM"))
DD = inputvalue(request("DD"))
TT = inputvalue(request("TT"))
If YY = "" and MM = "" and DD = "" and TT = "" then
YY = Year(now)
MM = Month(now)
End If
int_YY = "" : If IsNumeric(YY) Then int_yy = Int(YY)
int_MM = "" : If IsNumeric(MM) Then int_MM = Int(MM)
If Len(MM)=1 Then MM = "0"&MM
' where 조건
SetWhere()
' 카운터 수의 합을 구한다
qry ="select count(vNum) as TCount from visit_counter " & qryValue
Set Rs = Dbcon.Execute (qry)
sumCount = Rs("TCount")
rs.close : Set rs = Nothing
If YY<>"" And MM<>"" Then
temp_d = DateAdd("m",1, YY&"-"&MM&"-01")
dataLength = Right(DateAdd("d", -1, temp_d ),2)
Else
dataLength = 31
End If
For i=1 To dataLength
arrValue(i) = 0
next
' 카운터 수의 합을 구한다
qry ="select vDD,count(vNum) as VCount from visit_counter "&qryValue&" group by vDD order by vDD"
Set Rs = Dbcon.Execute (qry)
Do While Not rs.eof
arrValue(rs("vDD")) = rs("VCount")
rs.movenext
Loop
rs.close : Set rs = Nothing
maxCount = 0
minCount = 100000
For j=1 To dataLength
arrData(j,0) = arrValue(j) ' 카운터
If sumCount > 1 then
arrData(j,1) = (arrValue(j)/sumCount)* 100
if arrData(j,1) > 0 then arrData(j,1) = formatnumber(arrData(j,1),2)
arrData(j,2) = (arrValue(j)/sumCount) * 550
else
arrData(j,1) = 0
arrData(j,2) = 0
End if
If minCount > arrValue(j) then minCount = arrValue(j)
If maxCount < arrValue(j) then maxCount = arrValue(j)
if arrData(j,0) = 0 then
arrData(j,0) = ""
End if
if arrData(j,2) = 0 then
arrData(j,2) = ""
End if
Next
%>
<!-- 내용영역 -->
<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/h.asp" tabindex="<%=getTabIndex()%>">방문자 통계</a> &gt; <a href="/manager/content/05stats/d.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="d.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><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('d.asp?TT=Y');" tabindex="<%=getTabIndex()%>" /></span> <span class="button"><input type="button" value="<%=Year(now)%>년" class="stats" onclick="page_go1('d.asp?YY=<%=Year(now)%>');" tabindex="<%=getTabIndex()%>" /></span> <span class="button"><input type="button" value="이번달" onclick="page_go1('d.asp?YY=<%=Year(now)%>&amp;MM=<%=month(now)%>');" tabindex="<%=getTabIndex()%>" /></span></div></li>
</ul>
</form>
</div>
</div>
<div class="chart1">
<!--#include virtual = "/common/lib/FusionCharts.asp"-->
<%
strXML = strXML & "&lt;graph caption='' xAxisName='' yAxisName='' showValues='0' decimalPrecision='0' formatNumberScale='0' showAlternateHGridColor='1' AlternateHGridColor='' divLineColor='F0F0F0' divLineAlpha='' alternateHGridAlpha='5' bgcolor='ffffff' canvasBgColor='ffffff' canvasBaseColor='EAEAEA' canvasBaseDepth='1' canvasBgDepth='0' baseFont='verdana' baseFontSize='9' baseFontColor='999999' hoverCapBgColor='ffffff' hoverCapBorderColor='A6A6A6' hoverCapSepChar=' ' chartLeftMargin='0' chartRightMargin='0' chartTopMargin='5' chartBottomMargin='0'&gt;"
strXML = strXML & "&lt;set name='1日' value='"&arrData(1,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(2,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(3,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(4,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='5日' value='"&arrData(5,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(6,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(7,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(8,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(9,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='10日' value='"&arrData(10,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(11,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(12,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(13,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(14,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='15日' value='"&arrData(15,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(16,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(17,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(18,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(19,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='20日' value='"&arrData(20,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(21,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(22,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(23,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(24,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='25日' value='"&arrData(25,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(26,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(27,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(28,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(29,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='30日' value='"&arrData(30,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(31,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;/graph&gt;"
response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200,"","","")
%>
</div>
<div class="list_count pb2">
전체 <strong><%=sumCount%></strong>명 방문 (최대 <%=maxCount%>명, 최소 <%=minCount%>명)
</div>
<fieldset>
<legend>일별 방문자 통계</legend>
<table cellspacing="0" class="bbs_<%=skin%>" summary="일별 방문자를 확인합니다.">
<caption>일별 방문자 통계 서식</caption>
<colgroup>
<col width="60" />
<col />
<col width="90" />
<col width="3" />
<col width="60" />
<col />
<col width="90" />
<col width="3" />
<col width="60" />
<col />
<col width="90" />
</colgroup>
<thead>
<tr>
<th scope="col">일자</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
<th scope="col"></th>
<th scope="col">일자</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
<th scope="col"></th>
<th scope="col">일자</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
</tr>
</thead>
<tbody>
<tr>
<%
td_end = 1
For z=1 To 33
%>
<td scope="row" class="center"><%If z<=Int(dataLength) Then response.write z&"일" End If %></td>
<td scope="row" class="center"><% SetDetail(z)%></td>
<td scope="row" class="center"><%=arrData(z,1)%></td>
<%
td_end = td_end + 1
If td_end = 4 Then ' 3칸째일때
td_end = 1
If z <> 33 Then response.write "</tr><tr>"
else
response.write "<td scope='row' class='center'></td>"
End if
next
%>
</tr>
</tbody>
</table>
</fieldset>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- ' 내용영역 -->
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
+286
View File
@@ -0,0 +1,286 @@
<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수..
Dim curCount(24)
Dim arrData(24, 2)
YY = inputvalue(request("YY"))
MM = inputvalue(request("MM"))
DD = inputvalue(request("DD"))
TT = inputvalue(request("TT"))
If YY="" and MM="" and DD="" and TT="" then
YY = Year(now)
MM = Month(now)
DD = Day(now)
End if
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)
If Len(MM)=1 Then MM = "0"&MM
If Len(DD)=1 Then DD = "0"&DD
' where 조건
Call SetWhere()
' $qryValue = "";
' 카운터 수의 합을 구한다
qry = "select count(vNum) from visit_counter " & qryValue
Set Rs = Dbcon.Execute (qry)
totalCount = rs(0)
rs.close : Set rs = Nothing
' 배열 초기화
For i=1 To 24
curCount(i) = 0
Next
' 일별 카운터를 구한다
qry = "select vHH, count(vNum) as vC from visit_counter "&qryValue&" group by vHH order by vHH"
Set Rs = Dbcon.Execute (qry)
sumCount = 0
Do While Not rs.eof
vHH = Int(rs("vHH"))
vC = Int(rs("vC"))
curCount(vHH) = vC
sumCount = sumCount + vC
rs.movenext
Loop
rs.close : Set rs = Nothing
maxCount = 0
minCount = 100000
For i=1 To 24
If sumCount > 0 then
curSize = int((curCount(i)/sumCount) * 540)
curPer = formatnumber((curCount(i)/sumCount) * 100, 2)
else
curSize = 0
curPer = 0
End if
if maxCount < curCount(i) then
maxCount = curCount(i)
End if
if minCount > curCount(i) then
minCount = curCount(i)
End if
arrData(i,0) = curCount(i)
arrData(i,1) = curSize
arrData(i,2) = curPer
if arrData(i,0)= 0 then
arrData(i,0) = ""
End if
if arrData(i,2) = 0 then
arrData(i,2) = ""
End if
Next
%>
<!-- 내용영역 -->
<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/h.asp" tabindex="<%=getTabIndex()%>">방문자 통계</a> &gt; <a href="h.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="h.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('h.asp?TT=Y');" tabindex="<%=getTabIndex()%>" /></span> <span class="button"><input type="button" value="<%=year(now)%>년" class="stats" onclick="page_go1('h.asp?YY=<%=year(now)%>');" tabindex="<%=getTabIndex()%>" /></span> <span class="button"><input type="button" value="이번달" onclick="page_go1('h.asp?YY=<%=year(now)%>&amp;MM=<%=Month(now)%>');" tabindex="<%=getTabIndex()%>" /></span> <span class="button"><input type="button" value="오늘" onclick="page_go1('h.asp?YY=<%=year(now)%>&amp;MM=<%=Month(now)%>&amp;DD=<%=Day(now)%>');" tabindex="<%=getTabIndex()%>" /></span> </div></li>
</ul>
</form>
</div>
</div>
<div class="chart1">
<!--#include virtual="/common/lib/FusionCharts.asp" -->
<%
strXML = "&lt;graph caption='' xAxisName='' yAxisName='' showValues='0' decimalPrecision='0' formatNumberScale='0' showAlternateHGridColor='1' AlternateHGridColor='' divLineColor='F0F0F0' divLineAlpha='' alternateHGridAlpha='5' bgcolor='ffffff' canvasBgColor='ffffff' canvasBaseColor='EAEAEA' canvasBaseDepth='1' canvasBgDepth='0' baseFont='verdana' baseFontSize='9' baseFontColor='999999' hoverCapBgColor='ffffff' hoverCapBorderColor='A6A6A6' hoverCapSepChar=' ' chartLeftMargin='0' chartRightMargin='0' chartTopMargin='5' chartBottomMargin='0'&gt;"
strXML = strXML & "&lt;set name='0시' value='"&arrData(24,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(1,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(2,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(3,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(4,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='5시' value='"&arrData(5,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(6,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(7,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(8,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(9,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='10시' value='"&arrData(10,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(11,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(12,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(13,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(14,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='15시' value='"&arrData(15,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(16,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(17,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(18,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(19,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='20시' value='"&arrData(20,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(21,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(22,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='23시' value='"&arrData(23,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;/graph&gt;"
response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200, "", "", "")
%>
</div>
<div class="list_count pb2">
전체 <strong><%=totalCount%></strong>명 방문 (최대 <%=maxCount%>명, 최소 <%=minCount%>명)
</div>
<fieldset>
<legend>시간별 방문자 통계</legend>
<table cellspacing="0" class="bbs_<%=skin%>" summary="시간별 방문자를 확인합니다.">
<caption>시간별 방문자 통계 서식</caption>
<colgroup>
<col width="60" />
<col />
<col width="90" />
<col width="3" />
<col width="60" />
<col />
<col width="90" />
<col width="3" />
<col width="60" />
<col />
<col width="90" />
</colgroup>
<thead>
<tr>
<th scope="col">시간</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
<th scope="col"></th>
<th scope="col">시간</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
<th scope="col"></th>
<th scope="col">시간</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
</tr>
</thead>
<tbody>
<tr>
<%
td_end = 1
For z=1 To 24
%>
<td scope="row" class="center"><%=z%>시</td>
<td scope="row" class="center"><%SetDetail(z)%></td>
<td scope="row" class="center"><%=arrData(z,2)%></td>
<%
td_end = td_end + 1
If td_end = 4 then ' 3칸째일때
td_end = 1
If z <>24 Then response.write "</tr><tr>"
else
response.write "<td scope='row' class='center'></td>"
End if
next
%>
</tr>
</tbody>
</table>
</fieldset>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- ' 내용영역 -->
<!--#include virtual = "/manager/common/file/sub_bottom.asp"-->
+177
View File
@@ -0,0 +1,177 @@
<!--#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" -->
+258
View File
@@ -0,0 +1,258 @@
<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수..
Dim curCount(12)
Dim arrData(12,2)
YY = inputvalue(request("YY"))
MM = inputvalue(request("MM"))
DD = inputvalue(request("DD"))
TT = inputvalue(request("TT"))
If YY = "" and MM = "" and DD = "" and TT = "" then
YY = Year(now)
MM = Month(now)
End If
int_YY = "" : If IsNumeric(YY) Then int_yy = Int(YY)
int_MM = "" : If IsNumeric(MM) Then int_MM = Int(MM)
If Len(MM)=1 Then MM = "0"&MM
' where 조건
SetWhere()
' 카운터 수의 합을 구한다
qry = "select count(vNum) from visit_counter "&qryValue
Set Rs = Dbcon.Execute (qry)
totalCount = rs(0)
rs.close : Set rs = nothing
For i=1 To 12
curCount(i) = 0
next
' 일별 카운터를 구한다
qry = "select vMM,count(vNum) as vC from visit_counter "& qryValue &" group by vYY,vMM order by vYY,vMM"
Set Rs = Dbcon.Execute (qry)
sumCount = 0
Do While Not rs.eof
arr = Int(rs("vMM"))
VC = Int(rs("vC"))
curCount(arr) = VC
sumCount = sumCount + VC
rs.movenext
Loop
rs.close : Set rs = nothing
' 날짜변 데이터를 배열에 담는다
maxCount = 0
minCount = 100000
For i=1 To UBound(curCount)
If sumCount > 0 then
curSize = int((curCount(i)/sumCount) * 540)
curPer = formatnumber((curCount(i)/sumCount) * 100,2)
else
curSize = 0
curPer = 0
End if
if maxCount < curCount(i) then
maxCount = curCount(i)
End if
if minCount > curCount(i) then
minCount = curCount(i)
End if
arrData(i,0) = curCount(i)
arrData(i,1) = curSize
arrData(i,2) = curPer
if arrData(i,0) = 0 then
arrData(i,0) = ""
End if
if arrData(i,2) = 0 then
arrData(i,2) = ""
End if
next
%>
<!-- 내용영역 -->
<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/h.asp" tabindex="<%=getTabIndex()%>">방문자 통계</a> &gt; <a href="/manager/content/05stats/w.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="m.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><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('m.asp?TT=Y');" tabindex="<%=getTabIndex()%>" /></span> <span class="button"><input type="button" value="<%=Year(now)%>년" class="stats" onclick="page_go1('m.asp?YY=<%=Year(now)%>');" tabindex="<%=getTabIndex()%>" /></span> </div></li>
</ul>
</form>
</div>
</div>
<div class="chart1">
<!--#include virtual="/common/lib/FusionCharts.asp"-->
<%
strXML = "&lt;graph caption='' xAxisName='' yAxisName='' showValues='0' decimalPrecision='0' formatNumberScale='0' showAlternateHGridColor='1' AlternateHGridColor='' divLineColor='F0F0F0' divLineAlpha='' alternateHGridAlpha='5' bgcolor='ffffff' canvasBgColor='ffffff' canvasBaseColor='EAEAEA' canvasBaseDepth='1' canvasBgDepth='0' baseFont='verdana' baseFontSize='9' baseFontColor='999999' hoverCapBgColor='ffffff' hoverCapBorderColor='A6A6A6' hoverCapSepChar=' ' chartLeftMargin='0' chartRightMargin='0' chartTopMargin='5' chartBottomMargin='0'&gt;"
strXML = strXML & "&lt;set name='1月' value='"&arrData(1,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='2月' value='"&arrData(2,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='3月' value='"&arrData(3,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='4月' value='"&arrData(4,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='5月' value='"&arrData(5,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='6月' value='"&arrData(6,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='7月' value='"&arrData(7,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='8月' value='"&arrData(8,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='9月' value='"&arrData(9,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='10月' value='"&arrData(10,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='11月' value='"&arrData(11,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='12月' value='"&arrData(12,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;/graph&gt;"
response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200,"","","")
%>
</div>
<div class="list_count pb2">
전체 <strong><%=totalCount %></strong>명 방문 (최대 <%=maxCount %>명, 최소 <%=minCount %>명)
</div>
<fieldset>
<legend>월별 방문자 통계</legend>
<table cellspacing="0" class="bbs_<%=skin%>" summary="월별 방문자를 확인합니다.">
<caption>월별 방문자 통계 서식</caption>
<colgroup>
<col width="60" />
<col />
<col width="90" />
<col width="3" />
<col width="60" />
<col />
<col width="90" />
<col width="3" />
<col width="60" />
<col />
<col width="90" />
</colgroup>
<thead>
<tr>
<th scope="col">일자</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
<th scope="col"></th>
<th scope="col">일자</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
<th scope="col"></th>
<th scope="col">일자</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
</tr>
</thead>
<tbody>
<tr>
<%
td_end = 1
For z=1 To 12
%>
<td scope="row" class="center"><%If z <= 12 Then response.write z&"월" End if%></td>
<td scope="row" class="center"><% SetDetail(z)%></td>
<td scope="row" class="center"><%=arrData(z,2)%></td>
<%
td_end = td_end + 1
If td_end = 4 then ' 3칸째일때
td_end = 1
If z <> 12 Then response.write "</tr><tr>"
else
response.write "<td scope='row' class='center'></td>"
End if
next
%>
</tr>
</tbody>
</table>
</fieldset>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- ' 내용영역 -->
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
+279
View File
@@ -0,0 +1,279 @@
<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
v_mid = InputValue(request("p_mid"))
v_yy = InputValue(request("p_yy"))
v_mm = InputValue(request("p_mm"))
v_type = InputValue(request("p_type"))
If v_yy="" then v_yy = year(now)
If v_mm="" then v_mm = month(now)
v_mm = Right("00"&v_mm,2)
If v_type="" then v_type = "day"
Dim arrValue()
Dim arrValue_mms()
dataLength = 0
totalCount = 0
totalCount_mms = 0
If v_mid<>"" then
If v_type="day" Then
temp_d = DateAdd("m",1, v_yy&"-"&v_mm&"-01")
dataLength = Right(DateAdd("d", -1, temp_d ),2)
ReDim arrValue(dataLength)
ReDim arrValue_mms(dataLength)
tablename = "em_log_"&v_yy&v_mm
sql = " SELECT day(tran_date), count(*) FROM "&tablename&" WHERE tran_id='"&v_mid&"' GROUP BY day(tran_date) "
Set rs = dbcon.execute(sql)
Do While Not rs.eof
arrValue(rs(0)) = rs(1)
totalCount = totalCount + CInt(rs(1))
rs.movenext
Loop
rs.close : Set rs = Nothing
'-----------mms 카운트---------------
tablename = "sdk_mms_report_detail_" & Right(v_yy,2) & v_mm
'//table 존재유무
sql = "select count(*) as cnt from information_schema.tables where table_name = '" & tablename & "'"
'Response.write sql
Set rs = dbcon.execute( sql )
rscount = rs("cnt")
rs.close : Set rs = Nothing
If rscount > 0 Then
sql = " SELECT right(left(send_date,8), 2), count(*) FROM "&tablename&" WHERE user_id='"&v_mid&"' GROUP BY right(left(send_date,8), 2) "
Set rs = dbcon.execute(sql)
Do While Not rs.eof
arrValue_mms(rs(0)) = rs(1)
totalCount_mms = totalCount_mms + CInt(rs(1))
rs.movenext
Loop
rs.close : Set rs = Nothing
End if
'-----------mms 카운트끝---------------
Else
dataLength = 12
ReDim arrValue(dataLength)
ReDim arrValue_mms(dataLength)
For i=1 To 12
tablename = "em_log_" & v_yy & Right("00"&i,2)
'//table 존재유무
sql = "select count(*) as cnt from information_schema.tables where table_name = '" & tablename & "'"
Set rs = dbcon.execute( sql )
rscount = rs("cnt")
rs.close : Set rs = Nothing
If rscount > 0 Then
sql = " SELECT count(*) FROM "&tablename&" WHERE tran_id='"&v_mid&"'"
Set rs = dbcon.execute( sql )
arrValue(i) = rs(0)
totalCount = totalCount + CInt(rs(0))
End If
'-----------mms 카운트---------------
tablename = "sdk_mms_report_detail_" & Right(v_yy,2) & Right("00"&i,2)
'//table 존재유무
sql = "select count(*) as cnt from information_schema.tables where table_name = '" & tablename & "'"
'Response.write sql
Set rs = dbcon.execute( sql )
rscount = rs("cnt")
rs.close : Set rs = Nothing
If rscount > 0 Then
sql = " SELECT count(*) FROM "&tablename&" WHERE user_id='"&v_mid&"'"
Set rs = dbcon.execute( sql )
arrValue_mms(i) = rs(0)
If arrValue_mms(i) = 0 Then arrValue_mms(i) = ""
totalCount_mms = totalCount_mms + CInt(rs(0))
End if
'-----------mms 카운트끝---------------
next
End If
End if
%>
<!-- 내용영역 -->
<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/" >Home</a> &gt; <a href="/manager/content/05stats/h.asp" >통계자료</a> &gt; <a href="/manager/content/05stats/sms_d.asp" >메세지 통계</a> &gt; <a href="/manager/content/05stats/member.asp" class="now" >회원별 메세지 통계</a>
</div>
</div>
<!-- 내용들어가는곳 -->
<div id="contents_area">
<h2 class="space"></h2>
<div class="write_info">
<div class="write_form pt7">
<form id="frm" name="frm" action="member.asp" method="get">
<ul>
<li class="search"><label for="p_mid">검색 회원 ID</label></li>
<li>
<input type="text" name="p_mid" id="p_mid" value="<%=v_mid%>" style="width:80px;" class="input_box input" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);"/>
</li>
<li style="padding-left:15px;">
<select id="p_yy" name="p_yy" class="stats" >
<% For z=2009 To Year(now)%>
<option value="<%=z%>"<%=chkSelect(z, CInt(v_yy))%>><%=z%>년</option>
<%next%>
</select>
</li>
<li style="padding-left:5px;">
<select id="p_mm" name="p_mm" class="stats"<%If v_type="month" then%> disabled=disabled<%End if%> >
<% For z=1 To 12%>
<option value="<%=z%>"<%=chkSelect(z, CInt(v_mm))%>><%=z%>월</option>
<%next%>
</select>
</li>
<li style="padding-left:10px;">
<input type="radio" name="p_type" id="p_type_month" value="month" <%=chkRadio(v_type, "month")%> /><label for="p_type_month">월별</label>&nbsp;&nbsp;
<input type="radio" name="p_type" id="p_type_day" value="day" <%=chkRadio(v_type, "day")%> /><label for="p_type_day">일별</label>
</li>
<li style="padding-left:10px;"><div id="<%=skin%>_bt"><span class="button"><input type="submit" value="보기" /></span></div></li>
</ul>
</form>
</div>
</div>
<div class="list_count pb2">
&nbsp;
</div>
<fieldset>
<legend>월별 방문자 통계</legend>
<table cellspacing="0" class="bbs_<%=skin%>" summary="월별 방문자를 확인합니다.">
<caption>월별 방문자 통계 서식</caption>
<colgroup>
<col width="60" />
<col width="45%" />
<col width="45%" />
</colgroup>
<thead>
<tr>
<th scope="col"><%If v_type="day" Then%>일자<%else%>월<%End if%></th>
<th scope="col">SMS발송</th>
<th scope="col">MMS발송</th>
</tr>
</thead>
<tbody>
<%
If dataLength>0 Then
For z=1 To ubound(arrValue)
If v_type="day" Then
v_dd = z
Else
v_mm = z
End if
%>
<tr>
<td scope="row" class="center"><%=z%>&nbsp;<%If v_type="day" Then%>일<%else%>월<%End if%></td>
<td scope="row" style="text-align:right;padding-right:100px;">
<%=FormatNumber(arrValue(z), 0)%>
<a href="smsReport_detail2.asp?p_mid=<%=v_mid%>&dateY=<%=v_yy%>&dateM=<%=v_mm%>&dateD=<%=v_dd%>" onclick="window.open(this.href,'','width=1000,height=600,resizable=yes');return false;">[상세보기]</a>
</td>
<td scope="row" style="text-align:right;padding-right:100px;">
<%
If arrValue_mms(z) <> "" Then
Response.write FormatNumber(arrValue_mms(z), 0)
%>
<a href="mmsReport_detail2.asp?p_mid=<%=v_mid%>&dateY=<%=v_yy%>&dateM=<%=v_mm%>&dateD=<%=v_dd%>" onclick="window.open(this.href,'','width=1000,height=600,resizable=yes');return false;">[상세보기]</a>
<%
End if
%>
</td>
</tr>
<%
Next
mms_usecount = totalCount_mms*3
%>
<tr>
<td scope="row" class="center">합계</td>
<td scope="row" style="text-align:right;padding-right:100px;font-weight:bold;"><%=FormatNumber(totalCount,0)%></td>
<td scope="row" style="text-align:right;padding-right:100px;font-weight:bold;"><%=FormatNumber(totalCount_mms,0)%> (차감건수 : <%=FormatNumber(mms_usecount,0)%>)</td>
</tr>
<%
Else
%>
<tr><td colspan="4" class="center">검새 회원 ID를 입력하세요</td></tr>
<%
End if
%>
</tbody>
</table>
</fieldset>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- ' 내용영역 -->
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
<script type="text/javascript">
$(function(){
$("input[name='p_type']").click(function(){
if($(this).val()=="month"){
$("#p_mm").attr("disabled",true);
}else{
$("#p_mm").attr("disabled",false);
}
});
});
</script>
+270
View File
@@ -0,0 +1,270 @@
<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수..
Dim arrValue(31)
Dim arrData(33,2)
YY = inputvalue(request("YY"))
MM = inputvalue(request("MM"))
DD = inputvalue(request("DD"))
TT = inputvalue(request("TT"))
If YY = "" and MM = "" and DD = "" and TT = "" then
YY = Year(now)
MM = Month(now)
End If
int_YY = "" : If IsNumeric(YY) Then int_yy = Int(YY)
int_MM = "" : If IsNumeric(MM) Then int_MM = Int(MM)
If Len(MM)=1 Then MM = "0"&MM
'table명
table = "sdk_mms_report_detail_" & Right(YY,2) & MM
'table 존재유무
sql = "select count(*) from information_schema.tables where table_name = '" & table & "'"
Set rs = dbcon.execute( sql )
rscount = rs(0)
Set rs = nothing
'카운트
If rscount > 0 Then
sql = "select count(*) from " & table
Set rs = dbcon.execute( sql )
sumCount = rs(0)
Set rs = nothing
else
sumCount = 0
End if
If YY<>"" And MM<>"" Then
temp_d = DateAdd("m",1, YY&"-"&MM&"-01")
dataLength = Right(DateAdd("d", -1, temp_d ),2)
Else
dataLength = 31
End If
For i=1 To dataLength
arrValue(i) = 0
next
'카운터수의 합
If rscount > 0 Then
sql = "select count(*) as VCount, right(left(send_date,8),2) as vDD from " & table & " group by right(left(send_date,8),2)"
Set Rs = Dbcon.Execute (sql)
Do While Not rs.eof
arrValue(CInt(rs("vDD"))) = rs("VCount")
rs.movenext
Loop
rs.close : Set rs = Nothing
End if
maxCount = 0
minCount = 100000
For j=1 To dataLength
arrData(j,0) = arrValue(j) ' 카운터
If sumCount > 1 then
arrData(j,1) = (arrValue(j)/sumCount)* 100
if arrData(j,1) > 0 then arrData(j,1) = formatnumber(arrData(j,1),2)
arrData(j,2) = (arrValue(j)/sumCount) * 550
else
arrData(j,1) = 0
arrData(j,2) = 0
End if
If minCount > arrValue(j) then minCount = arrValue(j)
If maxCount < arrValue(j) then maxCount = arrValue(j)
if arrData(j,0) = 0 then
arrData(j,0) = ""
End if
if arrData(j,2) = 0 then
arrData(j,2) = ""
End if
Next
%>
<!-- 내용영역 -->
<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>MMS발송 일별 통계</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/mms_d.asp" tabindex="<%=getTabIndex()%>">MMS발송 통계</a> &gt; <a href="/manager/content/05stats/mms_d.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="mms_d.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><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('mms_d.asp?YY=<%=Year(now)%>&amp;MM=<%=month(now)%>');" tabindex="<%=getTabIndex()%>" /></span></div></li>
</ul>
</form>
</div>
</div>
<div class="chart1">
<!--#include virtual = "/common/lib/FusionCharts.asp"-->
<%
strXML = strXML & "&lt;graph caption='' xAxisName='' yAxisName='' showValues='0' decimalPrecision='0' formatNumberScale='0' showAlternateHGridColor='1' AlternateHGridColor='' divLineColor='F0F0F0' divLineAlpha='' alternateHGridAlpha='5' bgcolor='ffffff' canvasBgColor='ffffff' canvasBaseColor='EAEAEA' canvasBaseDepth='1' canvasBgDepth='0' baseFont='verdana' baseFontSize='9' baseFontColor='999999' hoverCapBgColor='ffffff' hoverCapBorderColor='A6A6A6' hoverCapSepChar=' ' chartLeftMargin='0' chartRightMargin='0' chartTopMargin='5' chartBottomMargin='0'&gt;"
strXML = strXML & "&lt;set name='1日' value='"&arrData(1,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(2,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(3,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(4,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='5日' value='"&arrData(5,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(6,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(7,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(8,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(9,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='10日' value='"&arrData(10,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(11,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(12,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(13,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(14,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='15日' value='"&arrData(15,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(16,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(17,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(18,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(19,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='20日' value='"&arrData(20,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(21,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(22,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(23,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(24,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='25日' value='"&arrData(25,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(26,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(27,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(28,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(29,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='30日' value='"&arrData(30,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(31,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;/graph&gt;"
response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200,"","","")
%>
</div>
<div class="list_count pb2">
전체 <strong><%=sumCount%></strong>건 발송 (최대 <%=maxCount%>건, 최소 <%=minCount%>건)
</div>
<fieldset>
<legend>일별 발송 통계</legend>
<table cellspacing="0" class="bbs_<%=skin%>" summary="일별 발송횟수를 확인합니다.">
<caption>일별 발송 통계 서식</caption>
<colgroup>
<col width="60" />
<col />
<col />
<col width="200" />
</colgroup>
<thead>
<tr>
<th scope="col">일자</th>
<th scope="col">발송건수</th>
<th scope="col">비율(%)</th>
<th scope="col">상세보기</th>
</tr>
</thead>
<tbody>
<%
For z=1 To dataLength
%>
<tr>
<td scope="row" class="center"><a href="mmsreport_detail.asp?bdm=&dateY=<%=YY%>&dateM=<%=MM%>&dateD=<%=z%>" onclick="window.open(this.href,'','width=700,height=600,resizable=yes');return false;"><%If z<=Int(dataLength) Then response.write z&"일" End If %></a></td>
<td scope="row" class="center"><% SetDetail(z)%></td>
<td scope="row" class="center"><%=arrData(z,1)%></td>
<td scope="row" class="center"><a href="mmsreport_detail.asp?bdm=&dateY=<%=YY%>&dateM=<%=MM%>&dateD=<%=z%>" onclick="window.open(this.href,'','width=1000,height=600,resizable=yes');return false;">[상세보기]</a></td>
<%
next
%>
</tr>
</tbody>
</table>
</fieldset>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- ' 내용영역 -->
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
+225
View File
@@ -0,0 +1,225 @@
<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수..
Dim curCount(12)
Dim arrData(12,2)
YY = inputvalue(request("YY"))
MM = inputvalue(request("MM"))
If YY = "" and MM = "" and DD = "" and TT = "" then
YY = Year(now)
MM = Month(now)
End If
int_YY = "" : If IsNumeric(YY) Then int_yy = Int(YY)
int_MM = "" : If IsNumeric(MM) Then int_MM = Int(MM)
If Len(MM)=1 Then MM = "0"&MM
totalCount = 0
sumCount = 0
For i = 1 To 12
curCount(i) = 0
MM = Right( "0" & i, 2)
'//table명
table = "sdk_mms_report_detail_" & Right(YY,2) & MM
'//table 존재유무
sql = "select count(*) as cnt from information_schema.tables where table_name = '" & table & "'"
Set rs = dbcon.execute( sql )
rscount = rs("cnt")
Set rs = nothing
If rscount > 0 then
'//월별 카운터를 구한다
qry = "select count(*) as vC from " & table
Set rs = dbcon.execute( qry )
arr = i
VC = rs("vC")
curCount(arr) = VC
sumCount = sumCount + VC
else
arr = i
VC = 0
curCount(arr) = VC
sumCount = sumCount + VC
End if
next
' 날짜변 데이터를 배열에 담는다
maxCount = 0
minCount = 100000
For i=1 To UBound(curCount)
If sumCount > 0 then
curSize = int((curCount(i)/sumCount) * 540)
curPer = formatnumber((curCount(i)/sumCount) * 100,2)
else
curSize = 0
curPer = 0
End if
if maxCount < curCount(i) then
maxCount = curCount(i)
End if
if minCount > curCount(i) then
minCount = curCount(i)
End if
arrData(i,0) = curCount(i)
arrData(i,1) = curSize
arrData(i,2) = curPer
if arrData(i,0) = 0 then
arrData(i,0) = ""
End if
if arrData(i,2) = 0 then
arrData(i,2) = ""
End if
next
%>
<!-- 내용영역 -->
<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>MMS발송월별 통계</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/mms_d.asp" tabindex="<%=getTabIndex()%>">mms발송 통계</a> &gt; <a href="/manager/content/05stats/mms_m.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="mms_m.asp" method="get">
<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><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="올해" class="stats" onclick="page_go1('mms_m.asp?YY=<%=Year(now)%>');" tabindex="<%=getTabIndex()%>" /></span> </div></li>
</ul>
</form>
</div>
</div>
<div class="chart1">
<!--#include virtual="/common/lib/FusionCharts.asp"-->
<%
strXML = "&lt;graph caption='' xAxisName='' yAxisName='' showValues='0' decimalPrecision='0' formatNumberScale='0' showAlternateHGridColor='1' AlternateHGridColor='' divLineColor='F0F0F0' divLineAlpha='' alternateHGridAlpha='5' bgcolor='ffffff' canvasBgColor='ffffff' canvasBaseColor='EAEAEA' canvasBaseDepth='1' canvasBgDepth='0' baseFont='verdana' baseFontSize='9' baseFontColor='999999' hoverCapBgColor='ffffff' hoverCapBorderColor='A6A6A6' hoverCapSepChar=' ' chartLeftMargin='0' chartRightMargin='0' chartTopMargin='5' chartBottomMargin='0'&gt;"
strXML = strXML & "&lt;set name='1月' value='"&arrData(1,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='2月' value='"&arrData(2,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='3月' value='"&arrData(3,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='4月' value='"&arrData(4,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='5月' value='"&arrData(5,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='6月' value='"&arrData(6,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='7月' value='"&arrData(7,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='8月' value='"&arrData(8,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='9月' value='"&arrData(9,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='10月' value='"&arrData(10,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='11月' value='"&arrData(11,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='12月' value='"&arrData(12,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;/graph&gt;"
response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200,"","","")
%>
</div>
<div class="list_count pb2">
전체 <strong><%=totalCount %></strong>명 방문 (최대 <%=maxCount %>명, 최소 <%=minCount %>명)
</div>
<fieldset>
<legend>월별 방문자 통계</legend>
<table cellspacing="0" class="bbs_<%=skin%>" summary="월별 방문자를 확인합니다.">
<caption>월별 방문자 통계 서식</caption>
<colgroup>
<col width="60" />
<col />
<col />
</colgroup>
<thead>
<tr>
<th scope="col">일자</th>
<th scope="col">발송건수</th>
<th scope="col">비율(%)</th>
</tr>
</thead>
<tbody>
<%
For z=1 To 12
%>
<tr>
<td scope="row" class="center"><%If z <= 12 Then response.write z&"월" End if%></td>
<td scope="row" class="center"><% SetDetail(z)%></td>
<td scope="row" class="center"><%=arrData(z,2)%></td>
</tr>
<%
next
%>
</tbody>
</table>
</fieldset>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- ' 내용영역 -->
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
@@ -0,0 +1,226 @@
<!--#include virtual="/common/lib/dbcon.asp"-->
<!--#include virtual="/common/lib/func.asp"-->
<%
security_ad_cms()
dateY = Trim(Request("dateY"))
dateM = Right("0"&Trim(Request("dateM")), 2)
dateD = Right("0"&Trim(Request("dateD")), 2)
excel = Request.QueryString("excel")
If dateY = "" Then
dateY = Year(now)
End If
If dateM = "" Then
dateM = month(now)
End if
If dateD = "" Or dateD = 0 Then
datetitle = dateY & "-" & dateM
thisDate = dateY & "-" & dateM & "-01"
thisDate2 = DateSerial(dateY, dateM + 1, 1 - 1)
Else
thisDate = dateY & "-" & dateM & "-" & dateD
datetitle = thisDate
thisDate2 = thisDate
End if
If excel = "ok" then
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition","attachment;filename=mms_log_"&dateY & dateM & dateD&".xls"
border="1"
Else
border="0"
End if
'테이블 존재유무 확인 쿼리
'log_table = "em_log_" & dateY & dateM
log_table = "sdk_mms_report_detail_" & Right(dateY,2) & dateM
sql = "select * from information_schema.tables where table_name = '" & log_table & "'"
Set rs = Dbcon.Execute( sql )
If rs.bof Or rs.eof Then
Set rs = Nothing
list_data = null
Else
Set rs = nothing
'sql = "select tran_phone, tran_callback, tran_date, tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt from "&log_table&" where tran_rsltdate between '"&thisDate&"' and '"&thisDate&"'+ ' 23:59:59'"
'sql = "select count(tran_pr), tran_callback, '"&thisDate&"' as tran_date, tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt from "&log_table&" where tran_rsltdate between '"&thisDate&"' and '"&thisDate2&"'+ ' 23:59:59' "&addqry&" group by tran_callback, left(tran_date, 10), tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt"
jointable = log_table & " as a left outer join sdk_mms_report_" & Right(dateY,2) & dateM & " as b on a.job_id = b.job_id"
s_fields = "count(*) as cnt, b.callback, '"&thisDate&"' as tran_date, convert(varchar(3000), b.mms_msg) as mms_msg, a.user_id, b.reserved3, b.reserved4, a.result"
Where = " where report_res_date like '" & Replace(thisDate,"-","") & "%' "
groupby = " group by b.callback, left(a.send_date, 8), a.user_id, b.reserved3, b.reserved4, a.result, convert(varchar(3000), b.mms_msg) "
sql = "select " & s_fields & " from " & jointable & Where & groupby
'Response.write sql
Set rs = Dbcon.Execute( sql )
If rs.bof Or rs.eof Then
list_data = null
Else
list_data = rs.getrows
End if
Set rs = Nothing
'response.write weeksumYes & "/" & weeksumNo
End if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE><%=datetitle%> 발송로그</TITLE>
<%If Request.QueryString("excel") <> "ok" then%>
<link rel="Stylesheet" type="text/css" href="/manager/common/css/sub_layout.css" />
<style type="text/css">td {font-family: "돋움"; font-size: 11px;}</style>
<%End if%>
</HEAD>
<BODY topmargin="10" leftmargin="10" scroll="yes">
<%If Request.QueryString("excel") <> "ok" then%>
<table width ="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" height="20"><font color="336BA1">상태가 <b>실패</b>일경우는 수신번호가 잘못되었거나 각 이통사의 일시적인 네트웍장애로 발생합니다.</font>
</td>
</tr>
<tr>
<td>
<a href="mmsreport_detail.asp?dateY=<%=dateY%>&dateM=<%=dateM%>&dateD=<%=dateD%>&excel=ok"><img src="/sms_img/address/bt_excel1.gif" border="0"></a>
</td>
<form name="frm" method = "post" action="mmsreport_detail.asp">
<td align="right">
<!--년도 선택을 위한 선택 박스 만들기 -->
<SELECT NAME="dateY" style="behavior: url('/include/css/selectBox21.htc');">
<%
for intYear = Year(date()) - 2 to Year(date()) + 10 ' 현재에서 앞 뒤 10년간의 목록을 표시한다.
if intYear = CInt(dateY) then %>
<OPTION value="<%=intYear%>" SELECTED><%=intYear%> 년
<% else %>
<OPTION value="<%=intYear%>"><%=intYear%> 년
<% end if
next %>
</SELECT>
<!--월 선택을 위한 선택박스 만들기 -->
<SELECT NAME="dateM" style="behavior: url('/include/css/selectBox21.htc');">
<%
for intMonth = 1 to 12
if intMonth = CInt(dateM) then %>
<OPTION value="<%=intMonth%>" SELECTED><%=intMonth%> 월
<% else %>
<OPTION value="<%=intMonth%>"><%=intMonth%> 월
<% end if
next %>
</SELECT>
<!--일 선택을 위한 선택박스 만들기 -->
<%
If dateD >= 1 Then
%>
<SELECT NAME="dateD" style="behavior: url('/include/css/selectBox21.htc');display:">
<%
for intDay = 1 to 31
if intDay = CInt(dateD) then %>
<OPTION value="<%=intDay%>" SELECTED><%=intDay%> 일
<% else %>
<OPTION value="<%=intDay%>"><%=intDay%> 일
<% end if
next %>
</SELECT>
<%
End if
%>
<input type="image" src="/content/board/nninc_simple/img/search_bt.gif" align="absmiddle">&nbsp;
</td>
</tr>
</form>
</table>
<table width ="100%" border="0" cellpadding="0" cellspacing="0">
</table>
<%End if%>
<table width ="100%" border="<%=border%>" cellpadding="0" cellspacing="1" bgcolor="#D0D0D0">
<tr bgcolor="#EEEEEE" align="center" height="25">
<td>
발송건수
</td>
<td>
발신번호
</td>
<td>
발송일자
</td>
<td>
메세지
</td>
<td>
발신자
</td>
<td>
발신자 부서
</td>
<td>
상태
</td>
</tr>
<%
If Not(IsNull(list_data)) then
For i = 0 To UBound(list_data, 2)
tran_phone = list_data(0, i)
tran_callback = list_data(1, i)
tran_date = list_data(2, i)
tran_msg = inputValue3( list_data(3, i) )
tran_name = get_name(list_data(4, i))
tran_etc3 = get_buseo(list_data(5, i))
tran_etc4 = get_buseo(list_data(6, i))
If list_data(7, i) = "2" then
tran_rslt = "성공"
Else
tran_rslt = "실패(" & tran_rslt & ")"
End If
If excel <> "ok" then
tran_msg = StringToHTML( remove_tags(tran_msg), 50, false )
End if
%>
<tr height="25" bgcolor="#FFFFFF" align="center" onMouseOver="this.style.backgroundColor='#D0D0D0'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
<td>
<%=FormatNumber(tran_phone,0)%>건
</td>
<td>
<%=tran_callback%>
</td>
<td>
<%=tran_date%>
</td>
<td align="left" style="padding-left:5px">
<%=inputValue( tran_msg )%>
</td>
<td>
<%=tran_name%>
</td>
<td align="left" style="padding-left:2px">
<%=tran_etc4&">"&tran_etc3%>
</td>
<td>
<%=tran_rslt%>
</td>
</tr>
<%
Next
End if
%>
</table>
</BODY>
</HTML>
@@ -0,0 +1,231 @@
<!--#include virtual="/common/lib/dbcon.asp"-->
<!--#include virtual="/common/lib/func.asp"-->
<%
security_ad_cms()
v_mid = InputValue(Request("p_mid"))
dateY = Trim(Request("dateY"))
dateM = Right("0"&Trim(Request("dateM")), 2)
dateD = Right("0"&Trim(Request("dateD")), 2)
excel = Request.QueryString("excel")
If dateY = "" Then
dateY = Year(now)
End If
If dateM = "" Then
dateM = month(now)
End if
If dateD = "" Or dateD = 0 Then
datetitle = dateY & "-" & dateM
thisDate = dateY & "-" & dateM
thisDate2 = DateSerial(dateY, dateM + 1, 1 - 1)
Else
thisDate = dateY & "-" & dateM & "-" & dateD
datetitle = thisDate
thisDate2 = thisDate
End if
If excel = "ok" then
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition","attachment;filename=mms_log_"&dateY & dateM & dateD&".xls"
border="1"
Else
border="0"
End if
'테이블 존재유무 확인 쿼리
'log_table = "em_log_" & dateY & dateM
log_table = "sdk_mms_report_detail_" & Right(dateY,2) & dateM
sql = "select * from information_schema.tables where table_name = '" & log_table & "'"
Set rs = Dbcon.Execute( sql )
If rs.bof Or rs.eof Then
Set rs = Nothing
list_data = null
Else
Set rs = nothing
'sql = "select tran_phone, tran_callback, tran_date, tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt from "&log_table&" where tran_rsltdate between '"&thisDate&"' and '"&thisDate&"'+ ' 23:59:59'"
'sql = "select count(tran_pr), tran_callback, '"&thisDate&"' as tran_date, tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt from "&log_table&" where tran_rsltdate between '"&thisDate&"' and '"&thisDate2&"'+ ' 23:59:59' "&addqry&" group by tran_callback, left(tran_date, 10), tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt"
jointable = log_table & " as a left outer join sdk_mms_report_" & Right(dateY,2) & dateM & " as b on a.job_id = b.job_id"
s_fields = "count(*) as cnt, b.callback, left(a.send_date, 8) as tran_date, convert(varchar(3000), b.mms_msg) as mms_msg, a.user_id, b.reserved3, b.reserved4, a.result"
Where = " where a.user_id = '" & v_mid & "' and report_res_date like '" & Replace(thisDate,"-","") & "%' "
groupby = " group by b.callback, left(a.send_date, 8), a.user_id, b.reserved3, b.reserved4, a.result, convert(varchar(3000), b.mms_msg) "
sql = "select " & s_fields & " from " & jointable & Where & groupby
'Response.write sql
Set rs = Dbcon.Execute( sql )
If rs.bof Or rs.eof Then
list_data = null
Else
list_data = rs.getrows
End if
Set rs = Nothing
'response.write weeksumYes & "/" & weeksumNo
End if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE><%=datetitle%> 발송로그</TITLE>
<%If Request.QueryString("excel") <> "ok" then%>
<link rel="Stylesheet" type="text/css" href="/manager/common/css/sub_layout.css" />
<style type="text/css">td {font-family: "돋움"; font-size: 11px;}</style>
<%End if%>
</HEAD>
<BODY topmargin="10" leftmargin="10" scroll="yes">
<%If Request.QueryString("excel") <> "ok" then%>
<table width ="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" height="20"><font color="336BA1">상태가 <b>실패</b>일경우는 수신번호가 잘못되었거나 각 이통사의 일시적인 네트웍장애로 발생합니다.</font>
</td>
</tr>
<tr>
<td>
<a href="mmsreport_detail2.asp?p_mid=<%=v_mid%>&dateY=<%=dateY%>&dateM=<%=dateM%>&dateD=<%=dateD%>&excel=ok"><img src="/sms_img/address/bt_excel1.gif" border="0"></a>
</td>
<form name="frm" method = "get" action="mmsreport_detail2.asp">
<input type="hidden" name="p_mid" value="<%=v_mid%>" />
<td align="right">
<!--년도 선택을 위한 선택 박스 만들기 -->
<SELECT NAME="dateY" style="behavior: url('/include/css/selectBox21.htc');">
<%
for intYear = Year(date()) - 2 to Year(date()) + 10 ' 현재에서 앞 뒤 10년간의 목록을 표시한다.
if intYear = CInt(dateY) then %>
<OPTION value="<%=intYear%>" SELECTED><%=intYear%> 년
<% else %>
<OPTION value="<%=intYear%>"><%=intYear%> 년
<% end if
next %>
</SELECT>
<!--월 선택을 위한 선택박스 만들기 -->
<SELECT NAME="dateM" style="behavior: url('/include/css/selectBox21.htc');">
<%
for intMonth = 1 to 12
if intMonth = CInt(dateM) then %>
<OPTION value="<%=intMonth%>" SELECTED><%=intMonth%> 월
<% else %>
<OPTION value="<%=intMonth%>"><%=intMonth%> 월
<% end if
next %>
</SELECT>
<!--일 선택을 위한 선택박스 만들기 -->
<%
If dateD >= 1 Then
%>
<SELECT NAME="dateD" style="behavior: url('/include/css/selectBox21.htc');display:">
<option value="">전체</option>
<%
for intDay = 1 to 31
if intDay = CInt(dateD) then %>
<OPTION value="<%=intDay%>" SELECTED><%=intDay%> 일
<% else %>
<OPTION value="<%=intDay%>"><%=intDay%> 일
<% end if
next %>
</SELECT>
<%
End if
%>
<input type="image" src="/content/board/nninc_simple/img/search_bt.gif" align="absmiddle">&nbsp;
</td>
</tr>
</form>
</table>
<table width ="100%" border="0" cellpadding="0" cellspacing="0">
</table>
<%End if%>
<table width ="100%" border="<%=border%>" cellpadding="0" cellspacing="1" bgcolor="#D0D0D0">
<tr bgcolor="#EEEEEE" align="center" height="25">
<td>
발송건수
</td>
<td>
발신번호
</td>
<td>
발송일자
</td>
<td>
메세지
</td>
<td>
발신자
</td>
<td>
발신자 부서
</td>
<td>
상태
</td>
</tr>
<%
If Not(IsNull(list_data)) then
For i = 0 To UBound(list_data, 2)
tran_phone = list_data(0, i)
tran_callback = list_data(1, i)
tran_date = list_data(2, i)
tran_msg = inputValue3( list_data(3, i) )
tran_name = get_name(list_data(4, i))
tran_etc3 = get_buseo(list_data(5, i))
tran_etc4 = get_buseo(list_data(6, i))
If list_data(7, i) = "2" then
tran_rslt = "성공"
Else
tran_rslt = "실패(" & list_data(7, i) & ")"
End If
If excel <> "ok" then
tran_msg = remove_tags(tran_msg)
'tran_msg = StringToHTML(tran_msg, 50, false )
End if
%>
<tr height="25" bgcolor="#FFFFFF" align="center" onMouseOver="this.style.backgroundColor='#D0D0D0'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
<td>
<%=FormatNumber(tran_phone,0)%>건
</td>
<td>
<%=tran_callback%>
</td>
<td>
<%=Left(tran_date,4) & "-" & Mid(tran_date, 5, 2) & "-" & Right(tran_date, 2)%>
</td>
<td align="left" style="padding-left:5px">
<%=inputValue( tran_msg )%>
</td>
<td>
<%=tran_name%>
</td>
<td align="left" style="padding-left:2px">
<%=tran_etc4&">"&tran_etc3%>
</td>
<td>
<%=tran_rslt%>
</td>
</tr>
<%
Next
End if
%>
</table>
</BODY>
</HTML>
+270
View File
@@ -0,0 +1,270 @@
<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수..
Dim arrValue(31)
Dim arrData(33,2)
YY = inputvalue(request("YY"))
MM = inputvalue(request("MM"))
DD = inputvalue(request("DD"))
TT = inputvalue(request("TT"))
If YY = "" and MM = "" and DD = "" and TT = "" then
YY = Year(now)
MM = Month(now)
End If
int_YY = "" : If IsNumeric(YY) Then int_yy = Int(YY)
int_MM = "" : If IsNumeric(MM) Then int_MM = Int(MM)
If Len(MM)=1 Then MM = "0"&MM
'table명
table = "em_log_" & YY & MM
'table 존재유무
sql = "select count(*) from information_schema.tables where table_name = '" & table & "'"
Set rs = dbcon.execute( sql )
rscount = rs(0)
Set rs = nothing
'카운트
If rscount > 0 Then
sql = "select count(*) from " & table
Set rs = dbcon.execute( sql )
sumCount = rs(0)
Set rs = nothing
else
sumCount = 0
End if
If YY<>"" And MM<>"" Then
temp_d = DateAdd("m",1, YY&"-"&MM&"-01")
dataLength = Right(DateAdd("d", -1, temp_d ),2)
Else
dataLength = 31
End If
For i=1 To dataLength
arrValue(i) = 0
next
'카운터수의 합
If rscount > 0 Then
sql = "select day(tran_date) as vDD, count(*) as VCount from " & table & " group by day(tran_date)"
Set Rs = Dbcon.Execute (sql)
Do While Not rs.eof
arrValue(rs("vDD")) = rs("VCount")
rs.movenext
Loop
rs.close : Set rs = Nothing
End if
maxCount = 0
minCount = 100000
For j=1 To dataLength
arrData(j,0) = arrValue(j) ' 카운터
If sumCount > 1 then
arrData(j,1) = (arrValue(j)/sumCount)* 100
if arrData(j,1) > 0 then arrData(j,1) = formatnumber(arrData(j,1),2)
arrData(j,2) = (arrValue(j)/sumCount) * 550
else
arrData(j,1) = 0
arrData(j,2) = 0
End if
If minCount > arrValue(j) then minCount = arrValue(j)
If maxCount < arrValue(j) then maxCount = arrValue(j)
if arrData(j,0) = 0 then
arrData(j,0) = ""
End if
if arrData(j,2) = 0 then
arrData(j,2) = ""
End if
Next
%>
<!-- 내용영역 -->
<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>SMS발송 일별 통계</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/sms_d.asp" tabindex="<%=getTabIndex()%>">sms발송 통계</a> &gt; <a href="/manager/content/05stats/sms_d.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="sms_d.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><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('sms_d.asp?YY=<%=Year(now)%>&amp;MM=<%=month(now)%>');" tabindex="<%=getTabIndex()%>" /></span></div></li>
</ul>
</form>
</div>
</div>
<div class="chart1">
<!--#include virtual = "/common/lib/FusionCharts.asp"-->
<%
strXML = strXML & "&lt;graph caption='' xAxisName='' yAxisName='' showValues='0' decimalPrecision='0' formatNumberScale='0' showAlternateHGridColor='1' AlternateHGridColor='' divLineColor='F0F0F0' divLineAlpha='' alternateHGridAlpha='5' bgcolor='ffffff' canvasBgColor='ffffff' canvasBaseColor='EAEAEA' canvasBaseDepth='1' canvasBgDepth='0' baseFont='verdana' baseFontSize='9' baseFontColor='999999' hoverCapBgColor='ffffff' hoverCapBorderColor='A6A6A6' hoverCapSepChar=' ' chartLeftMargin='0' chartRightMargin='0' chartTopMargin='5' chartBottomMargin='0'&gt;"
strXML = strXML & "&lt;set name='1日' value='"&arrData(1,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(2,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(3,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(4,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='5日' value='"&arrData(5,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(6,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(7,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(8,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(9,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='10日' value='"&arrData(10,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(11,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(12,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(13,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(14,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='15日' value='"&arrData(15,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(16,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(17,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(18,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(19,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='20日' value='"&arrData(20,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(21,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(22,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(23,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(24,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='25日' value='"&arrData(25,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(26,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(27,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(28,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(29,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='30日' value='"&arrData(30,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='' value='"&arrData(31,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;/graph&gt;"
response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200,"","","")
%>
</div>
<div class="list_count pb2">
전체 <strong><%=sumCount%></strong>건 발송 (최대 <%=maxCount%>건, 최소 <%=minCount%>건)
</div>
<fieldset>
<legend>일별 발송 통계</legend>
<table cellspacing="0" class="bbs_<%=skin%>" summary="일별 발송횟수를 확인합니다.">
<caption>일별 발송 통계 서식</caption>
<colgroup>
<col width="60" />
<col />
<col />
<col width="200" />
</colgroup>
<thead>
<tr>
<th scope="col">일자</th>
<th scope="col">발송건수</th>
<th scope="col">비율(%)</th>
<th scope="col">상세보기</th>
</tr>
</thead>
<tbody>
<%
For z=1 To dataLength
%>
<tr>
<td scope="row" class="center"><a href="smsReport_detail.asp?bdm=&dateY=<%=YY%>&dateM=<%=MM%>&dateD=<%=z%>" onclick="window.open(this.href,'','width=700,height=600,resizable=yes');return false;"><%If z<=Int(dataLength) Then response.write z&"일" End If %></a></td>
<td scope="row" class="center"><% SetDetail(z)%></td>
<td scope="row" class="center"><%=arrData(z,1)%></td>
<td scope="row" class="center"><a href="smsReport_detail.asp?bdm=&dateY=<%=YY%>&dateM=<%=MM%>&dateD=<%=z%>" onclick="window.open(this.href,'','width=1000,height=600,resizable=yes');return false;">[상세보기]</a></td>
<%
next
%>
</tr>
</tbody>
</table>
</fieldset>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- ' 내용영역 -->
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
+225
View File
@@ -0,0 +1,225 @@
<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수..
Dim curCount(12)
Dim arrData(12,2)
YY = inputvalue(request("YY"))
MM = inputvalue(request("MM"))
If YY = "" and MM = "" and DD = "" and TT = "" then
YY = Year(now)
MM = Month(now)
End If
int_YY = "" : If IsNumeric(YY) Then int_yy = Int(YY)
int_MM = "" : If IsNumeric(MM) Then int_MM = Int(MM)
If Len(MM)=1 Then MM = "0"&MM
totalCount = 0
sumCount = 0
For i = 1 To 12
curCount(i) = 0
MM = Right( "0" & i, 2)
'//table명
table = "em_log_" & YY & MM
'//table 존재유무
sql = "select count(*) as cnt from information_schema.tables where table_name = '" & table & "'"
Set rs = dbcon.execute( sql )
rscount = rs("cnt")
Set rs = nothing
If rscount > 0 then
'//월별 카운터를 구한다
qry = "select count(*) as vC from " & table
Set rs = dbcon.execute( qry )
arr = i
VC = rs("vC")
curCount(arr) = VC
sumCount = sumCount + VC
else
arr = i
VC = 0
curCount(arr) = VC
sumCount = sumCount + VC
End if
next
' 날짜변 데이터를 배열에 담는다
maxCount = 0
minCount = 100000
For i=1 To UBound(curCount)
If sumCount > 0 then
curSize = int((curCount(i)/sumCount) * 540)
curPer = formatnumber((curCount(i)/sumCount) * 100,2)
else
curSize = 0
curPer = 0
End if
if maxCount < curCount(i) then
maxCount = curCount(i)
End if
if minCount > curCount(i) then
minCount = curCount(i)
End if
arrData(i,0) = curCount(i)
arrData(i,1) = curSize
arrData(i,2) = curPer
if arrData(i,0) = 0 then
arrData(i,0) = ""
End if
if arrData(i,2) = 0 then
arrData(i,2) = ""
End if
next
%>
<!-- 내용영역 -->
<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>SMS발송월별 통계</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/sms_d.asp" tabindex="<%=getTabIndex()%>">sms발송 통계</a> &gt; <a href="/manager/content/05stats/sms_m.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="sms_m.asp" method="get">
<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><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="올해" class="stats" onclick="page_go1('sms_m.asp?YY=<%=Year(now)%>');" tabindex="<%=getTabIndex()%>" /></span> </div></li>
</ul>
</form>
</div>
</div>
<div class="chart1">
<!--#include virtual="/common/lib/FusionCharts.asp"-->
<%
strXML = "&lt;graph caption='' xAxisName='' yAxisName='' showValues='0' decimalPrecision='0' formatNumberScale='0' showAlternateHGridColor='1' AlternateHGridColor='' divLineColor='F0F0F0' divLineAlpha='' alternateHGridAlpha='5' bgcolor='ffffff' canvasBgColor='ffffff' canvasBaseColor='EAEAEA' canvasBaseDepth='1' canvasBgDepth='0' baseFont='verdana' baseFontSize='9' baseFontColor='999999' hoverCapBgColor='ffffff' hoverCapBorderColor='A6A6A6' hoverCapSepChar=' ' chartLeftMargin='0' chartRightMargin='0' chartTopMargin='5' chartBottomMargin='0'&gt;"
strXML = strXML & "&lt;set name='1月' value='"&arrData(1,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='2月' value='"&arrData(2,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='3月' value='"&arrData(3,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='4月' value='"&arrData(4,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='5月' value='"&arrData(5,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='6月' value='"&arrData(6,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;set name='7月' value='"&arrData(7,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='8月' value='"&arrData(8,0)&"' color='D8D8D8'/&gt;"
strXML = strXML & "&lt;set name='9月' value='"&arrData(9,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='10月' value='"&arrData(10,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='11月' value='"&arrData(11,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='12月' value='"&arrData(12,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;/graph&gt;"
response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200,"","","")
%>
</div>
<div class="list_count pb2">
전체 <strong><%=totalCount %></strong>명 방문 (최대 <%=maxCount %>명, 최소 <%=minCount %>명)
</div>
<fieldset>
<legend>월별 방문자 통계</legend>
<table cellspacing="0" class="bbs_<%=skin%>" summary="월별 방문자를 확인합니다.">
<caption>월별 방문자 통계 서식</caption>
<colgroup>
<col width="60" />
<col />
<col />
</colgroup>
<thead>
<tr>
<th scope="col">일자</th>
<th scope="col">발송건수</th>
<th scope="col">비율(%)</th>
</tr>
</thead>
<tbody>
<%
For z=1 To 12
%>
<tr>
<td scope="row" class="center"><%If z <= 12 Then response.write z&"월" End if%></td>
<td scope="row" class="center"><% SetDetail(z)%></td>
<td scope="row" class="center"><%=arrData(z,2)%></td>
</tr>
<%
next
%>
</tbody>
</table>
</fieldset>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- ' 내용영역 -->
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
@@ -0,0 +1,220 @@
<!--#include virtual="/common/lib/dbcon.asp"-->
<!--#include virtual="/common/lib/func.asp"-->
<%
security_ad_cms()
dateY = Trim(Request("dateY"))
dateM = Right("0"&Trim(Request("dateM")), 2)
dateD = Right("0"&Trim(Request("dateD")), 2)
If dateY = "" Then
dateY = Year(now)
End If
If dateM = "" Then
dateM = month(now)
End if
If dateD = "" Or dateD = 0 Then
datetitle = dateY & "-" & dateM
thisDate = dateY & "-" & dateM & "-01"
thisDate2 = DateSerial(dateY, dateM + 1, 1 - 1)
Else
thisDate = dateY & "-" & dateM & "-" & dateD
datetitle = thisDate
thisDate2 = thisDate
End if
If Request.QueryString("excel") = "ok" then
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition","attachment;filename=log_"&dateY & dateM & dateD&".xls"
border="1"
Else
border="0"
End if
tran_etc4 = Trim(Request.QueryString("tran_etc4"))
If tran_etc4 <> "" then
addqry = "and tran_etc4 = '"&tran_etc4&"'"
End if
'테이블 존재유무 확인 쿼리
log_table = "em_log_" & dateY & dateM
sql = "select * from information_schema.tables where table_name = '" & log_table & "'"
Set rs = Dbcon.Execute( sql )
If rs.bof Or rs.eof Then
Set rs = Nothing
list_data = null
Else
Set rs = nothing
'sql = "select tran_phone, tran_callback, tran_date, tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt from "&log_table&" where tran_rsltdate between '"&thisDate&"' and '"&thisDate&"'+ ' 23:59:59'"
sql = "select count(tran_pr), tran_callback, '"&thisDate&"' as tran_date, tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt from "&log_table&" where tran_rsltdate between '"&thisDate&"' and '"&thisDate2&"'+ ' 23:59:59' "&addqry&" group by tran_callback, left(tran_date, 10), tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt"
'response.write sql
Set rs = Dbcon.Execute( sql )
If rs.bof Or rs.eof Then
list_data = null
Else
list_data = rs.getrows
End if
Set rs = Nothing
'response.write weeksumYes & "/" & weeksumNo
End if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE><%=datetitle%> 발송로그</TITLE>
<%If Request.QueryString("excel") <> "ok" then%>
<link rel="Stylesheet" type="text/css" href="/manager/common/css/sub_layout.css" />
<style type="text/css">td {font-family: "돋움"; font-size: 11px;}</style>
<%End if%>
</HEAD>
<BODY topmargin="10" leftmargin="10" scroll="yes">
<%If Request.QueryString("excel") <> "ok" then%>
<table width ="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" height="20"><font color="336BA1">상태가 <b>실패</b>일경우는 수신번호가 잘못되었거나 각 이통사의 일시적인 네트웍장애로 발생합니다.</font>
</td>
</tr>
<tr>
<td>
<a href="smsReport_detail.asp?dateY=<%=dateY%>&dateM=<%=dateM%>&dateD=<%=dateD%>&excel=ok"><img src="/sms_img/address/bt_excel1.gif" border="0"></a>
</td>
<form name="frm" method = "post" action="smsReport_detail.asp">
<td align="right">
<!--년도 선택을 위한 선택 박스 만들기 -->
<SELECT NAME="dateY" style="behavior: url('/include/css/selectBox21.htc');">
<%
for intYear = Year(date()) - 2 to Year(date()) + 10 ' 현재에서 앞 뒤 10년간의 목록을 표시한다.
if intYear = CInt(dateY) then %>
<OPTION value="<%=intYear%>" SELECTED><%=intYear%> 년
<% else %>
<OPTION value="<%=intYear%>"><%=intYear%> 년
<% end if
next %>
</SELECT>
<!--월 선택을 위한 선택박스 만들기 -->
<SELECT NAME="dateM" style="behavior: url('/include/css/selectBox21.htc');">
<%
for intMonth = 1 to 12
if intMonth = CInt(dateM) then %>
<OPTION value="<%=intMonth%>" SELECTED><%=intMonth%> 월
<% else %>
<OPTION value="<%=intMonth%>"><%=intMonth%> 월
<% end if
next %>
</SELECT>
<!--일 선택을 위한 선택박스 만들기 -->
<%
If dateD >= 1 Then
%>
<SELECT NAME="dateD" style="behavior: url('/include/css/selectBox21.htc');display:">
<%
for intDay = 1 to 31
if intDay = CInt(dateD) then %>
<OPTION value="<%=intDay%>" SELECTED><%=intDay%> 일
<% else %>
<OPTION value="<%=intDay%>"><%=intDay%> 일
<% end if
next %>
</SELECT>
<%
End if
%>
<input type="image" src="/content/board/nninc_simple/img/search_bt.gif" align="absmiddle">&nbsp;
</td>
</tr>
</form>
</table>
<table width ="100%" border="0" cellpadding="0" cellspacing="0">
</table>
<%End if%>
<table width ="100%" border="<%=border%>" cellpadding="0" cellspacing="1" bgcolor="#D0D0D0">
<tr bgcolor="#EEEEEE" align="center" height="25">
<td>
발송건수
</td>
<td>
발신번호
</td>
<td>
발송일자
</td>
<td>
메세지
</td>
<td>
발신자
</td>
<td>
발신자 부서
</td>
<td>
상태
</td>
</tr>
<%
If Not(IsNull(list_data)) then
For i = 0 To UBound(list_data, 2)
tran_phone = list_data(0, i)
tran_callback = list_data(1, i)
tran_date = list_data(2, i)
tran_msg = inputValue3( list_data(3, i) )
tran_name = get_name(list_data(4, i))
tran_etc3 = get_buseo(list_data(5, i))
tran_etc4 = get_buseo(list_data(6, i))
If list_data(7, i) = "0" then
tran_rslt = "성공"
Else
tran_rslt = "실패"
End if
%>
<tr height="25" bgcolor="#FFFFFF" align="center" onMouseOver="this.style.backgroundColor='#D0D0D0'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
<td>
<%=FormatNumber(tran_phone,0)%>건
</td>
<td>
<%=tran_callback%>
</td>
<td>
<%=tran_date%>
</td>
<td align="left" style="padding-left:5px">
<%=inputValue( tran_msg )%>
</td>
<td>
<%=tran_name%>
</td>
<td align="left" style="padding-left:2px">
<%=tran_etc4&">"&tran_etc3%>
</td>
<td>
<%=tran_rslt%>
</td>
</tr>
<%
Next
End if
%>
</table>
</BODY>
</HTML>
@@ -0,0 +1,224 @@
<!--#include virtual="/common/lib/dbcon.asp"-->
<!--#include virtual="/common/lib/func.asp"-->
<%
security_ad_cms()
v_mid = InputValue(Request("p_mid"))
dateY = Trim(Request("dateY"))
dateM = Right("0"&Trim(Request("dateM")), 2)
dateD = Right("0"&Trim(Request("dateD")), 2)
If dateY = "" Then
dateY = Year(now)
End If
If dateM = "" Then
dateM = month(now)
End if
If dateD = "" Or dateD = 0 Then
thisDate = dateY & "-" & dateM & "-01"
thisDate2 = DateSerial(dateY, dateM + 1, 1 - 1)
Else
thisDate = dateY & "-" & dateM & "-" & dateD
thisDate2 = thisDate
End if
tran_etc4 = Trim(Request.QueryString("tran_etc4"))
If tran_etc4 <> "" then
addqry = "and tran_etc4 = '"&tran_etc4&"'"
End if
'테이블 존재유무 확인 쿼리
log_table = "em_log_" & dateY & dateM
sql = "select * from information_schema.tables where table_name = '" & log_table & "'"
Set rs = Dbcon.Execute( sql )
If rs.bof Or rs.eof Then
Set rs = Nothing
list_data = null
Else
Set rs = nothing
'sql = "select tran_phone, tran_callback, tran_date, tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt from "&log_table&" where tran_rsltdate between '"&thisDate&"' and '"&thisDate&"'+ ' 23:59:59'"
'sql = "SELECT count(tran_pr), tran_callback, convert(varchar,tran_date,23) as tran_date , tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt FROM "&log_table&" WHERE tran_id='"&v_mid&"' and tran_rsltdate between '"&thisDate&"' and '"&thisDate2&"'+ ' 23:59:59' "&addqry&" group by tran_callback, convert(varchar,tran_date,23), tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt"
sql = "SELECT '1', tran_callback, CONVERT(CHAR(19), tran_date, 20) as tran_date, tran_msg, tran_id, tran_etc3, tran_etc4, tran_rslt, tran_phone FROM "&log_table&" WHERE tran_id='"&v_mid&"' and tran_rsltdate between '"&thisDate&"' and '"&thisDate2&"'+ ' 23:59:59' "&addqry
'response.write sql
Set rs = Dbcon.Execute( sql )
If rs.bof Or rs.eof Then
list_data = null
Else
list_data = rs.getrows
End if
Set rs = Nothing
'response.write weeksumYes & "/" & weeksumNo
End if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>[<%=v_mid%>] 발송로그</TITLE>
<%If Request.QueryString("excel") <> "ok" then%>
<link rel="Stylesheet" type="text/css" href="/manager/common/css/sub_layout.css" />
<style type="text/css">td {font-family: "돋움"; font-size: 11px;}</style>
<%End if%>
</HEAD>
<BODY topmargin="10" leftmargin="10" scroll="yes">
<%If Request.QueryString("excel") <> "ok" then%>
<table width ="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" height="20"><font color="336BA1">상태가 <b>실패</b>일경우는 수신번호가 잘못되었거나 각 이통사의 일시적인 네트웍장애로 발생합니다.</font>
</td>
</tr>
<tr>
<td>
</td>
<form name="frm" method = "post" action="smsReport_detail2.asp">
<input type="hidden" name="p_mid" value="<%=v_mid%>" />
<td align="right">
<!--년도 선택을 위한 선택 박스 만들기 -->
<SELECT NAME="dateY" style="behavior: url('/include/css/selectBox21.htc');">
<%
for intYear = Year(date()) - 2 to Year(date()) + 10 ' 현재에서 앞 뒤 10년간의 목록을 표시한다.
if intYear = CInt(dateY) then %>
<OPTION value="<%=intYear%>" SELECTED><%=intYear%> 년
<% else %>
<OPTION value="<%=intYear%>"><%=intYear%> 년
<% end if
next %>
</SELECT>
<!--월 선택을 위한 선택박스 만들기 -->
<SELECT NAME="dateM" style="behavior: url('/include/css/selectBox21.htc');">
<%
for intMonth = 1 to 12
if intMonth = CInt(dateM) then %>
<OPTION value="<%=intMonth%>" SELECTED><%=intMonth%> 월
<% else %>
<OPTION value="<%=intMonth%>"><%=intMonth%> 월
<% end if
next %>
</SELECT>
<!--일 선택을 위한 선택박스 만들기 -->
<SELECT NAME="dateD" style="behavior: url('/include/css/selectBox21.htc');display:">
<option value="">전체</option>
<%
for intDay = 1 to 31
if intDay = CInt(dateD) then %>
<OPTION value="<%=intDay%>" SELECTED><%=intDay%> 일
<% else %>
<OPTION value="<%=intDay%>"><%=intDay%> 일
<% end if
next %>
</SELECT>
<input type="image" src="/content/board/nninc_simple/img/search_bt.gif" align="absmiddle">&nbsp;
</td>
</tr>
</form>
</table>
<table width ="100%" border="0" cellpadding="0" cellspacing="0">
</table>
<%End if%>
<table width ="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D0D0D0">
<tr bgcolor="#EEEEEE" align="center" height="25">
<td>
번호
</td>
<!--<td>
발송건수
</td>-->
<td>
발신번호
</td>
<td>
수신번호
</td>
<td>
발송일자
</td>
<td>
메세지
</td>
<td>
발신자
</td>
<!--<td>
발신자 부서
</td>-->
<td>
상태
</td>
</tr>
<%
If Not(IsNull(list_data)) then
For i = 0 To UBound(list_data, 2)
count = list_data(0, i)
tran_callback = list_data(1, i)
tran_date = list_data(2, i)
tran_msg = inputValue3( list_data(3, i) )
tran_name = get_name(list_data(4, i))
tran_etc3 = get_buseo(list_data(5, i))
tran_etc4 = get_buseo(list_data(6, i))
If list_data(7, i) = "0" then
tran_rslt = "성공"
Else
tran_rslt = "실패"
End If
tran_phone = list_data(8, i)
%>
<tr height="25" bgcolor="#FFFFFF" align="center" onMouseOver="this.style.backgroundColor='#D0D0D0'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
<td>
<%=(i+1)%>
</td>
<!--<td>
<%=FormatNumber(count,0)%>건
</td>-->
<td>
<%=tran_callback%>
</td>
<td>
<%=tran_phone%>
</td>
<td>
<%=Left(tran_date, 16)%>
</td>
<td align="left" style="padding-left:5px">
<%=inputValue( tran_msg )%>
</td>
<td>
<%=tran_name%>
</td>
<!--<td align="left" style="padding-left:2px">
<%=tran_etc4&">"&tran_etc3%>
</td>-->
<td>
<%=tran_rslt%>
</td>
</tr>
<%
Next
End if
%>
</table>
</BODY>
</HTML>
+252
View File
@@ -0,0 +1,252 @@
<!--#include virtual="/manager/common/file/stats_top.asp"-->
<%
Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수..
Dim curCount(7)
Dim arrData(8,2)
YY = inputvalue(request("YY"))
MM = inputvalue(request("MM"))
DD = inputvalue(request("DD"))
TT = inputvalue(request("TT"))
If YY = "" and MM = "" and DD = "" and TT = "" then
YY = Year(now)
MM = Month(now)
End If
int_YY = "" : If IsNumeric(YY) Then int_yy = Int(YY)
int_MM = "" : If IsNumeric(MM) Then int_MM = Int(MM)
If Len(MM)=1 Then MM = "0"&MM
' where 조건
SetWhere()
' 카운터 수의 합을 구한다
qry = "select count(vNum) from visit_counter "& qryValue
Set Rs = Dbcon.Execute (qry)
totalCount = rs(0)
rs.close : Set rs = nothing
' 배열 초기화
For i=0 To 6
curCount(i) = 0
next
' 요일별 카운터를 구한다
qry = "select vDW,count(vNum) as vC from visit_counter "&qryValue&" group by vDW order by vDW"
Set Rs = Dbcon.Execute (qry)
sumCount = 0
Do While Not rs.eof
vDW = Int(rs("vDW"))
vC = Int(rs("vC"))
curCount(vDW) = vC
sumCount = sumCount + vC
rs.movenext
loop
maxCount = 0
minCount = 100000
For i=0 To 6
if sumCount > 0 then
curSize = int((curCount(i)/sumCount) * 540)
curPer = formatnumber((curCount(i)/sumCount) * 100,2)
else
curSize = 0
curPer = 0
End if
if maxCount < curCount(i) then
maxCount = curCount(i)
End if
if minCount > curCount(i) then
minCount = curCount(i)
End if
arrData(i,0) = curCount(i)
arrData(i,1) = curSize
arrData(i,2) = curPer
if arrData(i,0) = 0 then
arrData(i,0) = ""
End if
if arrData(i,2) = 0 then
arrData(i,2) = ""
End if
next
%>
<!-- 내용영역 -->
<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/h.asp" tabindex="<%=getTabIndex()%>">방문자 통계</a> &gt; <a href="/manager/content/05stats/w.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="w.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><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('w.asp?TT=Y');" tabindex="<%=getTabIndex()%>" /></span> <span class="button"><input type="button" value="<%=Year(now)%>년" class="stats" onclick="page_go1('w.asp?YY=<%=Year(now)%>');" tabindex="<%=getTabIndex()%>" /></span> <span class="button"><input type="button" value="이번달" onclick="page_go1('w.asp?YY=<%=Year(now)%>&amp;MM=<%=month(now)%>');" tabindex="<%=getTabIndex()%>" /></span></div></li>
</ul>
</form>
</div>
</div>
<div class="chart1">
<!--#include virtual="/common/lib/FusionCharts.asp"-->
<%
strXML = "&lt;graph caption='' xAxisName='' yAxisName='' showValues='0' decimalPrecision='0' formatNumberScale='0' showAlternateHGridColor='1' AlternateHGridColor='' divLineColor='F0F0F0' divLineAlpha='' alternateHGridAlpha='5' bgcolor='ffffff' canvasBgColor='ffffff' canvasBaseColor='EAEAEA' canvasBaseDepth='1' canvasBgDepth='0' baseFont='verdana' baseFontSize='9' baseFontColor='999999' hoverCapBgColor='ffffff' hoverCapBorderColor='A6A6A6' hoverCapSepChar=' ' chartLeftMargin='0' chartRightMargin='0' chartTopMargin='5' chartBottomMargin='0'&gt;"
strXML = strXML & "&lt;set name='SUN' value='"&arrData(0,0)&"' color='E94646' /&gt;"
strXML = strXML & "&lt;set name='MON' value='"&arrData(1,0)&"' color='B1D361' /&gt;"
strXML = strXML & "&lt;set name='TUE' value='"&arrData(2,0)&"' color='FECC6D' /&gt;"
strXML = strXML & "&lt;set name='WED' value='"&arrData(3,0)&"' color='D07CDB'/&gt;"
strXML = strXML & "&lt;set name='THUR' value='"&arrData(4,0)&"' color='7BDCC5'/&gt;"
strXML = strXML & "&lt;set name='FRI' value='"&arrData(5,0)&"' color='74C2E4'/&gt;"
strXML = strXML & "&lt;set name='SAT' value='"&arrData(6,0)&"' color='828FE3'/&gt;"
strXML = strXML & "&lt;/graph&gt;"
response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200,"" ,"","")
%>
</div>
<div class="list_count pb2">
전체 <strong><%=totalCount %></strong>명 방문 (최대 <%=maxCount %>명, 최소 <%=minCount %>명)
</div>
<fieldset>
<legend>요일별 방문자 통계</legend>
<table cellspacing="0" class="bbs_<%=skin%>" summary="요일별 방문자를 확인합니다.">
<caption>요일별 방문자 통계 서식</caption>
<colgroup>
<col width="60" />
<col />
<col width="90" />
<col width="3" />
<col width="60" />
<col />
<col width="90" />
<col width="3" />
<col width="60" />
<col />
<col width="90" />
</colgroup>
<thead>
<tr>
<th scope="col">요일</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
<th scope="col"></th>
<th scope="col">요일</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
<th scope="col"></th>
<th scope="col">요일</th>
<th scope="col">방문수</th>
<th scope="col">비율(%)</th>
</tr>
</thead>
<tbody>
<tr>
<%
td_end = 1
for z=0 To 8
%>
<td scope="row" class="center"><% If z <= "7" Then SetWeek(z) End If %>&nbsp;</td>
<td scope="row" class="center"><% SetDetail(z)%></td>
<td scope="row" class="center"><%=arrData(z,2)%></td>
<%
td_end = td_end + 1
If td_end = 4 then ' 3칸째일때
td_end = 1
If z <> 8 Then response.write "</tr><tr>"
else
response.write "<td scope='row' class='center'></td>"
End if
next
%>
</tr>
</tbody>
</table>
</fieldset>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- ' 내용영역 -->
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->