각 부분 마다 설명좀 부탁합니다...
시험 기간에 미안합니다..너무 급해서리...ㅠ.ㅠ
<% if mode="ok" then %>
<%
search_title=request("search_title")
search_content=request("search_content")
search_name=request("search_name")
search_list=request("search")
%>
------------------------------------------------------
function reply()
{
document.reply.submit();
}
//-->
</script>
<%
id = request("id")
Set db = Server.CreateObject("ADODB.Connection")
db.Open dbname
UpdateSQL = "Update " & session("table") & " Set visit
= visit+1 where id = " & id
db.Execute UpdateSQL
SQL = "SELECT
id,name,email,url,title,content,pin,writeday,tag,num,visit,re,res
ame,reid from " & session("table")
SQL = SQL & " where id = " & id
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open SQL,db
%>
--------------------------------------------------------------
<% if Rs.BOF or Rs.EOF then %>
<p>저장된 정보가 없어여.. </p>
<%
else
id = rs("id")
name = rs("name")
email = rs("email")
url = CheckWord(rs("url"))
title = rs("title")
content = rs("content")
pin = CheckWord(rs("pin"))
writeday = rs("writeday")
visit = rs("visit")
tag = rs("tag")
re = rs("re")
reid = rs("reid")
resame = rs("resame")
if tag = "ok" then
title = CheckWord(title)
content = CheckWord(content)
else
title = replace(title,""","'")
content = replace(content,""","'")
end if
if search_title = 1 then
title = replace(title,search_list,"<b><font
color=#ff7b00>"&search_list&"</font></b>")
end if
if search_content = 1 then
content = replace(content,search_list,"<b><font
color=#ff7b00>"&search_list&"</font></b>")
end if
if search_name = 1 then
name = replace(name,search_list,"<b><font
color=#ff7b00>"&search_list&"</font></b>")
end if
%>
--------------------------------------------------------
<%
rs.Close
SQL = "SELECT (id) FROM " & session("table")
SQL = SQL & " where reid = 0 and re > " & re
set rs = db.Execute(SQL)
if not (rs.BOF or rs.EOF) then
content_back = rs(0)
end if
rs.Close
SQL = "SELECT Max(id) FROM " & session("table")
SQL = SQL & " where reid = 0 and re < " & re
set rs = db.Execute(SQL)
if not (rs.BOF or rs.EOF) then
content_next = rs(0)
end if
rs.Close
SQL2 = "SELECT * FROM " & session("table")
SQL2 = SQL2 & " where re = " & re
if content_back <> "" then
SQL2 = SQL2 & " or id =" & content_back
end if
if content_next <> "" then
SQL2 = SQL2 & " or id =" & content_next
end if
SQL2 = SQL2 & " order by re desc,reid asc"
rs.Open SQL2,db
%>
------------------------------------------------------------
<%
Do until Rs.EOF
name = rs("name")
writeday = left(rs("writeday"),8)
title = rs("title")
tag = rs("tag")
if left(now,2) = "20" then
nowday = mid(now,3)
else
nowday = now
end if
if tag = "ok" then
title = CheckWord(title)
If Len(title) > 30 Then
title = Mid(title,1,31) & ".."
End If
else
title = replace(title,""","'")
If Len(title) > 20 Then
title = Mid(title,1,21) & ".."
End If
end if
If Len(name) > 5 Then
name = Mid(name,1,6) & ".."
End If
If Len(title) > 24 Then
title = Mid(title,1,25) & "..."
End If
%>
----------------------------------------------------------
이까지 해석 부탁합니다...정말요....
|