%
site_dir = Server.MapPath("/")
strConnect="Provider=SQLOLEDB;Data Source= 61.100.5.176;Initial Catalog=sda;user ID=sda;password=sda23423;"
Sub DB_Open()
Set DbCon = Server.CreateObject("ADODB.Connection")
DbCon.Open strConnect
End Sub
Function DB_Close()
DbCon.Close
Set DbCon = Nothing
End Function
Sub gotoPageHtml(namestr,page,totalpage,Pagestr)
%>
<%
block = int((page-1)/10) * 10 + 1
if not(block=1) then
%> << <%
else
%><< <%
end if
tmp=1
%>
<%
For i=block to totalpage
if Cint(i) = Cint(pagedisp) then
%> <%=i%><%
else
%> <%=i%><%
end if
if tmp >9 then
Exit For
end if
tmp=tmp+1
Next
if totalpage > block+9 then
%>
>> <%
else
%> >><%
end if
%>
<%
End Sub
%>
<%
Dim DbCon
call DB_Open()
idx = CheckWord(request("idx"))
Set Rs = Server.CreateObject("ADODB.RecordSet")
sql = "update board set cnt=cnt+1 where idx=" & idx
Dbcon.Execute(sql)
sql = "select max(idx) from board where flag='press' and idx<" & idx
Rs.open sql,DbCon
prevIdx = Rs(0)
Rs.close
if isnull(prevIdx) then
else
sql = "select title from board where idx=" & prevIdx
Rs.open sql,DbCon
prevTitle = Rs(0)
Rs.close
end if
sql = "select min(idx) from board where flag='press' and idx>" & idx
Rs.open sql,DbCon
nextIdx = Rs(0)
Rs.close
if isnull(nextIdx) then
else
sql = "select title from board where idx=" & nextIdx
Rs.open sql,DbCon
nextTitle = Rs(0)
Rs.close
end if
sql = "select * from board where idx=" & idx
rs.open sql,DbCon
title = rs("title")
content = rs("content")
content = replace(content, vbcrlf, " ")
filename = rs("filename")
if filename <> "" then
strExt = Mid(filename, Instr(filename, ".") + 1) 'È®ÀåÀÚ¸¦ ¾ò´Â´Ù.
end if
isImg = "no"
if strExt = "gif" or strExt = "jpg" or strExt = "bmp" then
isImg = "yes"
end if
%>
Seoul Drama Festival 2008