|
|
|
¹®Èñö / 2001-07-09 / ¿ÀÈÄ 6:04:44 / 211.181.38.178
Á¶È¸¼ö : 135
|
[Áú¹®] ³»¿ëº¸±â¿¡¼ µ¿Àû¸®½ºÆ®¸¦ ¸¸µé¾ú´Âµ¥...[Á˼Û,Á» ±æ¾î¿ä] |
<!--#include file=../include/dbopen.asp-->
<%
Const adOpenForwardOnly = 0
Const adOpenKeyset = 1
Const adOpenDynamic = 2
Const adOpenStatic = 3
Dim board_no, board_count, minyoung, secret
Dim naya, heeya, strSQL
board_no = request("board_no")
current_no = request("board_no")
minyoung = request("minyoung")
secret = request("secret")
naya = request("naya")
heeya = trim(request("heeya"))
board_count = request("board_count")
'board_userip = request("board_userip")
'board_useros = request("board_useros")
board_pass = ""
strSQL = "SELECT * FROM newsboard " & _
"WHERE board_no = " & board_no
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL,DbCon,adOpenKeyset
====>ÀÌ ºÎºÐ¿¡¼ ¿¡·¯ÀÓ´Ù.
if rs.EOF or rs.BOF then
rs.Close
Set rs = nothing
DbCon.Close
Set DbCon = nothing
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
history.go(-1);
//-->
</SCRIPT>
<%
else
Dim board_num, board_step, board_id, board_writer
Dim board_email, board_homepage, board_title
Dim board_memo, board_day, board_time, current_no
Dim current_num, current_step, current_id', board_userip, board_useros
board_num = rs("board_num")
board_step = rs("board_step")
board_id = trim(rs("board_id"))
board_writer = trim(rs("board_writer"))
board_email = trim(rs("board_email"))
board_homepage = trim(rs("board_homepage"))
' board_title = Replace(trim(rs("board_title")), "''", "'")
board_title =trim(rs("board_title"))
' board_memo = Replace(trim(rs("board_memo")), "''", "'")
board_memo = trim(rs("board_memo"))
board_day = trim(rs("board_day"))
board_time = trim(rs("board_time"))
userip=trim(rs("board_userip"))
'response.write "»ç¿ëÀÚ IP :"& userip &"<br>"
useros=trim(rs("board_useros"))
'response.write "»ç¿ëÀÚ os :"& useros &"<br>"
board_day = left(board_day,4) & "-" & Mid(board_day,5,2) & _
"-" & right(board_day,2)
strHour = left(board_time,2)
if Cint(strHour) = 0 then
strHour="¿ÀÀü" & " " & "12"
elseif Cint(strHour) = 12 then
strHour="¿ÀÈÄ" & " " & "12"
elseif Cint(strHour) > 12 then
strHour="¿ÀÈÄ" & " " & Cstr(Cint(strHour) - 12)
else
strHour="¿ÀÀü" & " " & strHour
end if
board_time = strHour & ":" & Mid(board_time,3,2) & _
":" & right(board_time,2)
if trim(rs("board_html"))<>"1" then
'html tagÁ¦ÇÑ
board_memo = Replace(board_memo, " ", chr(32))
board_memo = Replace(board_memo, chr(32)+chr(32), "  ")
board_memo = Replace(board_memo, chr(13), "<BR>")
board_memo = Replace(board_memo, "<", "<")
board_memo = Replace(board_memo, ">", ">")
board_memo = Replace(board_memo, "<BR>", "<BR>")
board_memo = Replace(board_memo, "&", "&")
else
board_memo = replace(RS("board_memo"),chr(13)&chr(10),"<BR>")
end if
rs.Close
' ¼±ÅÃ±Û °¡Á®¿À±â ³¡
' ÇöÀç ±Û¹øÈ£
current_id = board_id
current_no = board_no
current_num = board_num
current_step = board_step
' ÀÌÀü±Û, ´ÙÀ½±Û ±¸Çϱâ
Dim nextno, prevno, temp, nextcount, prevcount, tempcount
nextno = 0
prevno = 0
temp = 0
tempcount = 0
nextcount = 0
prevcount = 0
'=================================================
page=Request("page")
if request("page")="" then
page=1
end if
'=================================================
if secret = "" then ' ±â³É ¸®½ºÆ®¸¸ º¼ ¶§
strSQL = "SELECT board_no, board_count " & _
"FROM newsboard"
else ' °Ë»öÀÏ ¶§
strSQL = "SELECT board_no, board_count " & _
"FROM newsboard WHERE " & minyoung & _
" LIKE '%" & secret & "%'"
end if
if naya = "" then '±âº»°ª
naya = "board_num"
heeya = "desc"
end if
strSQL = strSQL & " ORDER BY " & naya
strSQL = strSQL & " "
strSQL = strSQL & heeya
if naya <> "board_writer" then
strSQL = strSQL & ", board_step"
end if
rs.Open strSQL,DbCon,adOpenKeyset
rs.MoveFirst
Do While Not rs.EOF
if int(rs("board_no")) = int(current_no) then
nextno = temp
nextcount = tempcount
rs.MoveNext
if Not rs.EOF then
prevno = rs("board_no")
prevcount = rs("board_count")
else
rs.MovePrevious
end if
else
temp = rs("board_no")
tempcount = rs("board_count")
end if
rs.MoveNext
Loop
rs.close
set rs=nothing
' ÀÌÀü±Û ±¸Çϱ⠳¡
board_count = board_count + 1
' ÀÐÀº Ƚ¼ö¸¦ Áõ°¡ÇÕ´Ï´Ù.
strSQL = "UPDATE newsboard " & _
"SET board_count = " & board_count & _
" WHERE board_no = "& board_no
DbCon.Execute(strSQL)
end if
%>
<html>
<head>
<title>ÇÏÀÌ »ê¾÷(ÁÖ) TFT-LCD : ÀÛ¼ºµÈ ±Û º¸±â</title>
<link rel="stylesheet" href="../include/style.css">
</head>
<body>
<div align="center">
<input type="hidden" name="board_pass">
<table width="590" cellpadding="0" cellspacing="0" border="1" bordercolor="#dfeedd" bgcolor="white">
<font size="2"><img src="images/top_news_bar.gif " border="0">
No. <%= board_num %> <%= board_day %> </font>
<!--
****************************************½Ã°£ ÁÖ¼® ó¸®***********************************************
<%= board_time %>
-->
<!--Ãâ ó :
<%
'ÀÛ¼ºÀÚ¸¦ Ãâó·Î ÀüȯÇϸç, ÁÖ¼® ó¸®
'if board_email <> "" then
' Response.Write "<a href='mailto:" & board_email & "'>" & _
' board_writer & "</a>"
'else
Response.Write board_writer
'end if
%>
-->
<!--ÀÌ ºÎºÐµÎ ´º½º·Î ¿Ã¸®¸ç, ÁÖ¼®Ã³¸®
ȨÆäÀÌÁö :
<%
if board_homepage <> "" then
Response.Write "<a href=http://" & board_homepage & " target=_blank>" & board_homepage & "</a>"
else
Response.Write " "
end if
%>
-->
<tr>
<td colspan="4" bgcolor="#dfeedd" align="center" class="fontb" style="border-top-width:1; border-bottom-width:1; border-top-style:solid; border-bottom-style:solid;">
<img src="images/text.gif" border="0" width="13" height="13"> <%= board_title %>
</td>
<td bgcolor="#dfeedd" align="right"><a href="news_edit_dis.asp?board_no=<%=current_no%>&
minyoung=<%=minyoung%>&secret=<%=secret%>&
naya=<%=naya%>&heeya=<%=heeya%>"><img src="images/mod.gif" border="0" alt="¼öÁ¤Çϱâ"></a>
<a href="news_del.asp?board_no=<%=current_no%>&
board_num=<%=current_num%>&
board_step=<%=current_step%>"><img src="images/del.gif" border="0" alt="»èÁ¦Çϱâ"></a> </td>
</tr>
<tr>
<td bgcolor="white" colspan="5" align="left" style="border-top-width:1; border-bottom-width:1; border-top-style:solid; border-bottom-style:solid;">
<!-- »ó¼¼ ³»¿ë Ãâ·ÂÀ» À§ÇÑ Å×À̺í ÁöÁ¤ -->
<table border="0" width="570" cellpadding="0" cellspacing="0">
<tr>
<td width="10"> </td>
<td class="fontb">
<!--¹®ÀÚ °£°ÝÀ» ÁÖ±â À§ÇÏ¿© Å×À̺íÀ» Ãß°¡ÇÏ¿´°í,td¸¦ ÁÖ¾ú´Ù.-->
<!--³»¿ë ÀÔ·Â-->
<br>
<%=board_memo%>
<br>
Ãâó [ <% Response.Write board_writer %> ]
</td>
<td width="10">
<!--Å×ÀÌºí ¿· °ø°£ È®º¸¸¦ À§ÇÏ¿© »ç¿ë-->
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="590" cellpadding="0" cellspacing="0">
<tr><td align="center"><font size="-1" color="#2D4A85">
<!-- »ç¿ëÀÚ ip¿Í »ç¿ë os Checking -->
<%
'response.write "»ç¿ëÀÚ IP : "& userip &" "
'response.write "»ç¿ëÀÚ OS : "& useros &"<br>"
%></font></td>
</table>
<br>
<table width="590" border="0">
<tr>
<td align="center" class="fontb">
<% if prevno <> 0 then %>
<a href="news_read_dis.asp?board_no=<%=prevno%>&
board_count=<%=prevcount%>&minyoung=<%=minyoung%>&
secret=<%=secret%>&naya=<%=naya%>&
heeya=<%=heeya%>&page=<%=page%>"> <img src="images/e1prev.gif" border="0" alt="ÀÌÀü±Û"> </a>
<% end if %>
<a href="news_write_dis.asp?IsNew=Ref&board_no=<%=current_no%>&mode=reply&page=<%=page%>">
<img src=images/e1reply.gif border=0 alt=´äº¯Çϱâ></a>
<% if trim(User_id) = trim(current_id) then %>
<a href="news_edit_dis.asp?board_no=<%=current_no%>&
minyoung=<%=minyoung%>&secret=<%=secret%>&
naya=<%=naya%>&heeya=<%=heeya%>&page=<%=page%>"> <img src="images/e1modify.gif" border="0" alt="¼öÁ¤Çϱâ"></a>
<% if NeverDeleted then %>
<a href="news_del.asp?board_no=<%=current_no%>&
board_num=<%=current_num%>&
board_step=<%=current_step%>&page=<%=page%>"> <img src="images/e1delete.gif" border="0" alt="»èÁ¦Çϱâ"></a>
<%
end if
end if
%>
<a href="news_write_dis.asp?IsNew=New&mode=write&page=<%=page%>"><img src="images/e1write.gif" border="0" alt="¾²±â"></a>
<a href="news.asp?page=<%=page%>"><img src="images/e1list.gif" border="0" alt="¸®½ºÆ®¸ñ·Ï"></a>
<%
if nextno <> 0 then
%>
<a href="news_read_dis.asp?board_no=<%=nextno%>&
board_count=<%=nextcount%>&minyoung=<%=minyoung%>&
secret=<%=secret%>&naya=<%=naya%>&
heeya=<%=heeya%>&page=<%=page%>"> <img src="images/e1next.gif" border="0" alt="´ÙÀ½±Û"> </a>
<%
end if
%>
</td>
</tr>
</table>
<!-- *************** ÀÌ°÷¿¡¼ºÎÅÍ °ü·Ã±Û ¸®½ºÆ® ¸ñ·ÏÀ» ÁöÁ¤ÇÑ °¹¼ö¸¸Å Ãâ·ÂÇÑ´Ù ********************* -->
<!--+++++++++++++++++++<< »õ·Î¿î ·¹ÄÚµå¼Â ½ÃÀÛ >>+++++++++++++++++++++-->
<%
strSQL = "SELECT * FROM newsboard "
if naya = "" then '±âº»°ª
naya = "board_num"
heeya = "desc"
end if
strSQL = strSQL & " ORDER BY " & naya
strSQL = strSQL & " "
strSQL = strSQL & heeya
if naya <> "board_writer" then
strSQL = strSQL & ", board_step"
end if
'¿©±â±îÁö QueryÀÛ¼º ³¡ ÁöÁ¤µÈ Query·Î °Ë»ö
Set rs = Server.CreateObject("ADODB.Recordset")
rs.pagesize=5 ' *****************************************»ó¼¼º¸±â ¸®½ºÆ® Ãâ·Â ºÎºÐ ¶óÀÎ ¼ö ÁöÁ¤
rs.Open strSQL,Dbcon,1
'rs.Open strSQL,Dbcon,1,1
'·¹Äڵ尡 Çϳªµµ ¾ø´Ù¸é
if rs.EOF or rs.BOF then
DataExist = False
else '·¹Äڵ尡 ÀÖ´Ù¸é
DataExist = True
end if
%>
<table width="590" border="0" bordercolor="black" cellpadding="0" cellspacing="1">
<tr height="12">
<td width="120" align="left" class="fontb">°ü·Ã ±Û ¸®½ºÆ®</td>
</tr>
</table>
<table border="0" bordercolor="#dfeedd" cellpadding="0" cellspacing="0" width="590">
<tr><td align="center">
<%
if DataExist = True then
totalrecord=rs.RecordCount
totalpage=rs.PageCount
rs.AbsolutePage = page
' response.write page
'=================================================
%>
</td>
</tr>
<tr height="15"><td>
<table width="590" border="1" bordercolor="white" cellpadding="0" cellspacing="0">
<tr height=15>
<td width="40" bgcolor="#dfeedd" align="center" class="fontb">¹øÈ£</td>
<td width="420" bgcolor="#dfeedd" align="center" class="fontb">Á¦¸ñ</td>
<td width="70" bgcolor="#dfeedd" align="center" class="fontb">Ãâó</td>
<td width="50" bgcolor="#dfeedd" align="center" class="fontb">Á¶È¸</td>
<td width="75" bgcolor="#dfeedd" align="center" class="fontb">ÀÛ¼ºÀÏ</td>
</tr>
<tr height="15" bgcolor="#EEEEEE"> <% if cint(rs("board_step"))>0 then%>
<tr height="15" bgcolor='#DFEEDD'><!--ÀڽıÛÀÏ°æ¿ì-->
<td bgcolor='white' align='center' class='fontb'><%if int(current_no) = int(board_no) then%><img src='images/cross.gif' border='0' alt="ÇöÀç±Û"><%else%> <%end if%></td>
<%else%>
<tr height=15 bgcolor=#EEEEEE><!--ºÎ¸ð±ÛÀÏ°æ¿ì-->
<td bgcolor='white' align='center' class='fontb'><%if int(current_no) = int(board_no) then%><img src='images/cross.gif' border='0' alt="ÇöÀç±Û"><%else%><%=board_num%><%end if%></td>
<%end if%>
<td width="390" align="left" bgcolor="white" class="fontb">
<!-- *********************************** 1ÀÏ ´ÜÀ§·Î ¿Ã¶ó¿Â ±Û À̹ÌÁö Ç¥½Ã *********************************** -->
<%
'if left(board_day,10) = left(boar_time,10) then ' 1ÀÏ ´ÜÀ§·Î ¿Ã¶ó¿Â¿¡ New Ç¥½ÃÇÒ ¶§
if datediff("d",board_day,now)=<1 then ' <!--1ÀÏ ´ÜÀ§°¡ ¾Æ´Ï¶ó 24½Ã°£ ´ÜÀ§·Î ½Ã°£ º¯°æ-->
response.write "<img src='images/new.gif' border='0' alt='ÃÖ±Ù 24½Ã°£ À̳» ¿Ã¶ó¿Â±Û'></span>"
else
response.write " "
end if
%>
<!--Á¦¸ñÀÌ ¾Æ·¡ Á¤ÀÇ º¸´Ù ±æ´Ù¸é "..." ó¸®-->
<%
if naya <> "board_writer" then
if board_step > 0 then '¸¸¾à ÀÌ°ÍÀÌ ´äº¯¾²±â¶ó¸é....
wid= cint(board_step)*10
if Len(board_title) >= 30 then 'Á¦¸ñÀÌ 30¹®ÀÚ±æÀ̺¸´Ù ±æ´Ù¸é
board_title = left(board_title, 29) & "..."
end if
%> <img src="images/rebg.gif" width="<%=wid%>" height="5"><a href="news_read_dis.asp?board_no=<%=board_no%>&board_count=<%=board_count%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>" title='<%=board_num%>¹ø ±Û¿¡ ´ëÇÑ <%=board_writer%>´ÔÀÇ ´äº¯ ±Û'> <img src="images/red1.gif" border=0 alt=<%=board_num%>¹ø ±ÛÀÇ ´äº¯> <%=board_title%></a>
<%
else '¸¸¾à ÀÌ°ÍÀÌ ±×³É ±Û¾²±â¶ó¸é....
if Len(board_title) >= 25 then 'Á¦¸ñÀÌ 30¹®ÀÚ±æÀ̺¸´Ù ±æ´Ù¸é
board_title = left(board_title, 24) & "..."
end if
%>
<a href="news_read_dis.asp?board_no=<%=board_no%>&board_count=<%=board_count%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>" title='<%=board_writer%> ´ÔÀÇ ±Û'><%=board_title%></a>
<%
end if
else
if board_step <> 0 then
'Á¦¸ñÀÌ ÁöÁ¤µÈ ¹®ÀÚ±æÀ̺¸´Ù ±æ´Ù¸é - ´äº¯½Ã¿¡ ó¸®...
if Len(board_title) >= 30then
board_title = left(board_title, 29) & "..."
end if
%>
[<%=board_num%>] <img src="images/red1.gif" border=0 alt=´äº¯>
<a href="news_read_dis.asp?board_no=<%=board_no%>&board_count=<%=board_count%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>"><%=board_title%></a>
<%
else
'Á¦¸ñÀÌ ÁöÁ¤µÈ ¹®ÀÚ±æÀ̺¸´Ù ±æ´Ù¸é
if Len(board_title) >= 25 then
board_title = left(board_title, 24) & "..."
end if
%>
<a href="news_read_dis.asp?board_no=<%=board_no%>&board_count=<%=board_count%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>"><%=board_title%></a>
<%
end if
end if
%></span>
</td>
<!--Ãâó, À̸ÞÀÏ Ã³¸® ½ÃÀÛ-->
<td align="center" bgcolor="white" class=fontb>
<%
'if board_email <> "" then
' Response.Write "<a href='mailto:" & board_email & "'>" & _
' board_writer & "</a>"
'else
Response.Write board_writer
'end if
%>
</td>
<!-- Á¶È¸¼ö-->
<td align="center" bgcolor="white" class="fontb"><%=board_count%> </td>
<!-- ³¯Â¥ -->
<td align="center" bgcolor="white" class="fontb"><%=board_day%> </td>
</tr>
<%
' N = N + 1
rs.movenext
i=i+1
loop
rs.Close
DbCon.Close
set rs = nothing
%>
</table>
<tr>
<tr>
<td align="center" class="fontb">
<table border="0" width="590" cellpadding=0 cellspacing=0>
<tr>
<td align="center" bgcolor=#dfeedd width="610" class="fontb">
<!-- ********************************* ±¸ ·ÎÁ÷ ********************************************************
<%
' ÀÌÀü ÆäÀÌÁö·Î À̵¿
if cPage > 1 Then
%>
<a href="news.asp?page=<%=cPage-1%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>">[óÀ½]</a>
<% end if %>
<B>
<%
' µ¿ÆäÀÌÁö ¸¸µé±â
Dim PageBlock, temp1, temp2, temp3, prev, post, pagelist
PageBlock = 3
temp1 = int(cPage/PageBlock)
if (cPage mod PageBlock) = 0 then
temp1 = temp1 - 1
end if
temp2 = temp1 * PageBlock
temp3 = int(lastpg/PageBlock)
if (lastpg mod PageBlock) = 0 then
temp3 = temp3 - 1
end if
prev = temp2
if prev > 0 then
%>
<A href=news.asp?page=<%=prev%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>>[¢¸]</A>
<%
end if
pagelist = temp2
for i = 1 to PageBlock
pagelist = temp2 + i
if lastpg < pagelist then
exit for
end if
if int(pagelist) <> int(cPage) then
%>
<A href=news.asp?page=<%=pagelist%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>>[<%=pagelist%>]</A>
<%
else
%>
<%=pagelist%>
<%
end if
next
post = temp2 + PageBlock + 1
if temp1 < temp3 then
%>
<A href=news.asp?page=<%=post%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>>¢º</A>
<%
end if
%>
</B>
<%
' ´ÙÀ½ÆäÀÌÁö·Î À̵¿
if lastpg - cPage > 0 Then
%>
<A href=news.asp?page=<%=cPage+1%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>>[³¡]</A>
<%
end if
%>-->
<!--===================================-->
<% '»õ·Ó°Ô ó¸®ÇÑ ·ÎÁ÷ - °£ÆíÇÏ°Ô ¹«°Ô¸¦ ÁÙÀÓ
blockPage=int((page-1)/10)*10+1
if blockPage = 1 then%> <%else%> <a href="news_read_dis.asp?page=<%=blockPage-10%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>">ÀÌÀü</a>[<%end if%> [ <%i=1
Do until i>10 or blockPage > totalpage
if blockPage = int(page) then
%><font color="black" size="2" face="±¼¸²" ><b><%=blockPage%></b></font> <%else%>
<a href="news_read_dis.asp?page=<%=blockPage%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>"><%=blockPage%></a>
<%end if
blockPage = blockPage + 1
i = i +1
loop
if blockPage > totalpage then%>]<%else
%>]<a href="news_read_dis.asp?page=<%=blockPage%>&minyoung=<%=minyoung%>&secret=<%=secret%>&naya=<%=naya%>&heeya=<%=heeya%>">´ÙÀ½</a> <%end if%>
<!--===================================-->
</td>
</tr>
<tr><td class="fontb">Total - <font color="red"><%= totalRecord %></font> Record (<font size="2" color="red"> <%= page %></font> / <font size="2"><%= totalpage %>)</td></tr>
</table>
<% else %>
<!--°Ë»ö ±Û ³»¿ëÀÌ ¾øÀ» °æ¿ì º¸¿©Áö´Â ºÎºÐ ½ÃÀÛ-->
</td>
</tr>
<tr>
<td align="center">
<%
rs.Close
DbCon.Close
set rs = nothing
set DbCon = nothing
end if
%>
</td>
</tr>
<tr>
<td bgcolor=#D9E7FF>
</td>
</tr>
</table>
</div>
</body>
</html>
´ÙÀ½°ú °°Àº »ó¼¼º¸±â¿¡¼ ÇÏ´Ü¿¡ ´Ù½Ã ¸®½ºÆ® ¸ñ·ÏÀ» Ãâ·ÂÇÏ·ÁÇÕ´Ï´Ù.¸®½ºÆ®¿¡´Â ¹®Á¦°¡ ¾øÁö¸¸
[ÀÌÀü10]123[´ÙÀ½10]À» ±¸ÇöÇϴµ¥,´ÙÀ½°ú °°Àº ¿¡·¯°¡ ³ª¿À´Â±º¿ä.
¿À·ù Çü½Ä:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC driver does not support the requested properties.
/moon/news/news_read_dis.asp, line 35 |
|
|
|