%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'Session.CodePage = "949"
'Response.ChaRset = "euc-kr"
ip = Request.Servervariables("REMOTE_ADDR")
referrer = Request.Servervariables("HTTP_REFERER")
'qstring = Server.URLEncode(request.ServerVariables("QUERY_STRING"))
'referrer = request("ref")
arr_ref = split(referrer,"&")
For i = 0 to ubound(arr_ref) - 1
If InStr(arr_ref(i), "query=") Then
str_query = arr_ref(i)
End If
Next
str_query = replace(str_query,"query=", "")
'response.write str_query & "
"
'response.end
'response.write decode(str_query)
'response.end
Function decode(code)
dim result, i
i = 1
while i <= len(code)
result = result & chr( eval("&h" & replace(Mid(code, i, 6), "%", "")) )
i = i + 6
wend
decode = result
End Function
%>
<%
tim = now()
today = year(now())&mid(tim,6,2)&mid(tim,9,2)
if len(hour(now())) = 1 then
h2 = "0" & hour(now())
else h2 = hour(now())
end if
if len(minute(now())) = 1 then
m2 = "0" & minute(now())
else m2 = minute(now())
end if
if len(second(now())) = 1 then
s2 = "0" & second(now())
else s2 = second(now())
end if
s_time = h2 & ":" & m2 & ":" & s2
referrer1 = left(referrer,25)
referrer2 = left(referrer,29)
referrer3 = left(referrer,20)
referrer4 = left(referrer,25)
temp_ip = Left(ip,9)
temp_ip2 = Left(ip,10)
if referrer = "" then
else
if referrer1 = "http://www.callnet.co.kr/" OR referrer2 = "http://www.callnetkorea.co.kr" OR referrer3 = "http://callnet.co.kr" OR referrer4 = "http://callnetkorea.co.kr" then
else
if temp_ip2 = "211.232.59" or temp_ip = "192.168.1" then
'if ip = "210.121.207.115" or ip = "210.121.207.114" or temp_ip = "192.168.1" then
else
set callnet = CreateObject("Parse.Url")
'callnet.CommandTimeout = 200
callnet.ParseUrl referrer
'referrer = left(referrer,300)
'referrer = left(referrer,100)
' SQL접속 시 시간만료 에러 없애기
DBCon.CommandTimeout = 100
str_query = server.URLencode(callnet.query)
sql = "INSERT INTO search_guest"
sql = sql & " (s_date, s_time, s_url, s_ip, guest, memo)"
sql = sql & " VALUES "
'sql = sql & "('" & today & "', '" & s_time & "', '" & referrer & "', '" & ip & "', '" & callnet.site & "', '" & callnet.query & "')"
sql = sql & "('" & today & "', '" & s_time & "', '" & referrer & "', '" & ip & "', '" & callnet.site & "', '" & str_query & "')"
'response.write sql
DbCon.Execute sql
set callnet = nothing
end if
end if
end if
%>
<%
' 메인 게시판01
ipp = 3
sql = "SELECT COUNT(idx) AS cnt FROM main"
set Grs=Dbcon.Execute(sql)
postcount = Grs("cnt")
Set DbRec=Server.CreateObject("ADODB.RecordSet")
'DbRec.CursorType = 1
DbRec.Open "SELECT * FROM main WHERE id ='2' ORDER BY idx DESC ",DbCon
Set DbRec2=Server.CreateObject("ADODB.RecordSet")
'DbRec2.CursorType = 1
DbRec2.Open "SELECT * FROM main WHERE id ='1' ORDER BY idx DESC ",DbCon
%>