<% dim v_search, v_keyword, table, Query_Fields, Query_Where, Query_OrderBy Dim recordcount dim pagesize, v_totalpage, v_page, TotalCnt, v_block Dim stat_date stat_date = inputvalue( Request("stat_date") ) result_type = inputvalue( Request("result_type") ) 'dsmc채용만 보게하기 COMMON_WHERE = " AND tran_etc1='dsmc_recruit' " '============================================처리중인 문자조회======================================== ing_fields = "tran_pr, tran_phone, tran_rslt, tran_date, tran_msg" sql = "select " & ing_fields & " from em_tran where tran_id = '"&session("ss_dsmc_m_id")&"' and tran_date <= getdate() " & COMMON_WHERE &" ORDER BY tran_pr" Set rs = Dbcon.Execute( sql ) If rs.bof Or rs.eof Then ing_data = Null Else ing_data = rs.getrows End If Set rs = nothing '============================================처리중인 문자조회======================================== '============================================로그테이블명 만들기======================================== If stat_date = "" Then stat_date = Year(now) & Right( "0" & Month(now), 2 ) '============================================로그테이블명 만들기======================================== v_search = inputValue( Request.querystring("p_search") ) v_keyword = inputValue( Request.querystring("p_keyword") ) table = "em_log_" & stat_date 'response.write table sql = "select count(*) as cnt from information_schema.tables where table_name = '" & table & "'" Set rs = dbcon.execute( sql ) table_cnt = rs(0) Set rs = nothing If table_cnt = 0 Then log_data = Null v_totalpage = 1 v_page = 1 pagesize = 12 v_block = 10 else 'v_search = Request.QueryString("p_search") '검색조건 'v_keyword = Request.QueryString("p_keyword") '검색어 prepage = Request.ServerVariables("path_info") & "?" & Request.ServerVariables("query_string") '현재페이지경로 idx_field = "tran_pr" '기본키 oreder_filed = "tran_date desc, tran_pr desc" '정렬기준 필드 Query_Fields = "tran_pr, tran_phone, tran_rslt, tran_date, tran_msg, tran_reportdate" '불러올 필드 pagesize = 12 '목록개수 v_block = 10 '페이지개수 '==================조합 쿼리문======================= If v_keyword <> "" then Query_Where = " where tran_id = '" & session("ss_dsmc_m_id") & "' and " & v_search & " like '%" & v_keyword & "%' and ( tran_etc1 <> 'N' or tran_etc1 is null ) " & COMMON_WHERE andOrWhere = " and " Else Query_Where = " where tran_id = '" & session("ss_dsmc_m_id") & "' and ( tran_etc1 <> 'N' or tran_etc1 is null ) " & COMMON_WHERE andOrWhere = " and " End If If result_type = "success" Then Query_Where = Query_Where & andOrWhere & " tran_rslt = '0'" End If If result_type = "fail" Then Query_Where = Query_Where & andOrWhere & " tran_rslt <> '0'" End if Query_OrderBy = " ORDER BY "&oreder_filed '==================조합 쿼리문======================= '==================전체 레코드 수 뽑기=============== sql="select count("&idx_field&") from " & table & Query_Where set rs = DbCon.execute(sql) recordcount=CInt( rs(0) ) '이 전체레코드갯수를 이용해서 페이지갯수를 뽑아 낼것이다. Set rs = nothing '==================전체 레코드 수 뽑기=============== v_totalpage=fix((recordcount-1)/pagesize)+1 '전체덩어리갯수 v_page = Request.QueryString("p_page") if v_page="" then v_page = 1 elseif cint(v_page) < 1 then v_page = 1 elseif cint(v_page)>cint(v_totalpage) then v_page=cint(v_totalpage) end if '========================리스트 출력 쿼리문 생성====================== 'MS-SQL sql = "select Top " & pagesize& " " & Query_Fields & " from " & table sql = sql & Query_Where & andOrWhere & " "&idx_field&" not in" sql = sql & "(select top " & pagesize * (v_page - 1) & " "&idx_field&" from " & table sql = sql & Query_Where & Query_OrderBy & ")" sql = sql & Query_OrderBy '========================리스트 출력 쿼리문 생성 끝====================== 'response.write sql Set rs = Dbcon.Execute( sql ) If rs.bof Or rs.eof Then log_data = Null TotalCnt = 0 else log_data = rs.getrows TotalCnt = recordcount End If Set rs = nothing End If dbcon.close Set dbcon = nothing %>

보낸문자함

<% If Not(IsNull(ing_data)) Then %>
  • 발송중
<% End if %>
  • 발송성공
  • 발송실패
    <% If Not(IsNull(log_data)) Then For i = 0 To UBound(log_data, 2) num = (TotalCnt - pagesize * (v_page - 1)) - i Call arr2Value(Query_Fields, "log_data", i) If tran_rslt = "0" Then tran_rslt_str = "성공" tran_rslt_icon = "ico_success" Else tran_rslt_str = "실패" tran_rslt_icon = "ico_fail" End If write_date = formatdatetime(tran_date,2)&" "&formatdatetime(tran_date,4) If (IsNull( tran_reportdate ) Or tran_reportdate = "") or tran_rslt <> "0" Then send_date = "" Else send_date = formatdatetime(tran_reportdate,2)&" "&formatdatetime(tran_reportdate,4) End If tran_msg_str = Replace(tran_msg, vbcrlf, "
    ") %>
  • <%=tran_rslt_str%>
    <%=tran_msg_str%>
    수신자
    <%=tran_phone%>
    발송일시
    <%=write_date%>
    발송완료
    <%=send_date%>
  • <% next End if %>
<% query_string = "?stat_date=" & server.urlencode( stat_date ) query_string = query_string & "&result_type=" & server.urlencode( result_type ) page_url = "03_01_dsmc.asp" & query_string pageStyle2( page_url ) %>
  • " method="get">