<% Dim DB Dim strConnection Set DB = Server.CreateObject("ADODB.Connection") strConnection = "Provider=SQLOLEDB;Data Source =134.75.217.82;Initial Catalog =newecamp;User id=newecamp; Password=jo1741*;" DB.Open strConnection %> <% Function EditConvertChar(strValue) strValue = Replace(strValue, """", """) EditConvertChar=strValue End Function Function ConvertChar(strValue) strValue = Replace(strValue, "&", "&") strValue = Replace(strValue, """", """) strValue = Replace(strValue, "|", "|") strValue = Replace(strValue, "<", "<") strValue = Replace(strValue, ">", ">") strValue = Replace(strValue, chr(32), " ") ConvertChar=strValue End Function Function ReverseWord(strValue) 'strValue = Replace(strValue,Chr(13), ">>") strValue = Replace(strValue, "&", "&") strValue = Replace(strValue, """, """") strValue = Replace(strValue, "|", "|") 'strValue = Replace(strValue, "<", "<") 'strValue = Replace(strValue, ">", ">") strValue = Replace(strValue, " ", chr(32)) ReverseWord = strValue End Function Function TrimCheck(strValue) IF Trim(strValue) = "" THEN Response.Redirect "/error/Error.asp?err_msg="&Server.URLEncode("³»¿ëÀÌ ÀԷµǾî ÀÖÁö ¾Ê½À´Ï´Ù.") END IF TrimCheck = strValue End Function ' À̹ÌÁö ½ÇÁ¦Å©±â ¾Ë¾Æ³»±â Function GetImageSize(Virtual_Image_Path) Dim objPic Set objPic = LoadPicture(Virtual_Image_Path) imgWidth = CLng(CDbl(objPic.Width) * 24 / 635) imgHeight = CLng(CDbl(objPic.Height) * 24 / 635) Set objPic = Nothing GetImageSize=imgWidth&","&imgHeight End Function ' À̹ÌÁö ºñÀ²¿¡ µû¶ó Ãà¼ÒÇϱâ Function SetImageSize(img,widsize) image = GetImageSize(img) image = split(image, ",") iwidth = image(0) iheight = image(1) 'response.write iwidth 'response.write iheight 'response.end width = widsize 'response.write width '°¡·Î°¡ ¼¼·Îº¸´Ù Ŭ°æ¿ì if (Cint(iwidth) > Cint(iheight)) then if(Cint(iwidth) > Cint(width)) then iheight = iheight * width / iwidth iwidth = width end if '¼¼·Î°¡ °¡·Îº¸´Ù Ŭ°æ¿ì elseif (Cint(iwidth) < Cint(iheight)) then if (Cint(iheight) > Cint(width)) then iwidth = iwidth * width / iheight iheight = width end if '°¡·Î,¼¼·Î °°À»°æ¿ì else if (Cint(iwidth) > Cint(width)) then iwidth = width iheight = width end if end if SetImageSize = iwidth&","&iheight End Function 'Á¦¸ñ±Û±æÀÌ¿¡ ¸Â°Ô Á¦¸ñ±Û Ãâ·ÂÇϱâ function title_str(str,su) dim tmp str = Replace(str, " ", " ") str_true_length = Len(str) 'response.write str_true_length&":" tmp = Left(str,su) str_length = Len(tmp) 'response.write su if Cint(str_true_length) >= Cint(su) then '¿ø·¡ÀÇ ±ÛÀÚ±æÀÌ°¡ ¿øÇÏ´Â ±ÛÀÚ±æÀ̺¸´Ù ±æ´Ù¸é if str_length mod 2 = 0 then title_str = tmp & "..." else tmp = Left(str,su-1) title_str = tmp & "..." end if else title_str = tmp end if end function Function CName(camp_semester) if camp_semester="1" then semester_name = "1Çбâ(¿©¸§)" elseif camp_semester="2" then semester_name = "2Çбâ(°Ü¿ï)" end if CName = semester_name End Function Function OGName(online_gubun) if online_gubun="1" then online_gname = "¾Æ»ê½Ã ÀϹݰ¡Á¤" elseif online_gubun="2" then online_gname = "¾Æ»ê½Ã Àú¼ÒµæÃþ°¡Á¤" elseif online_gubun="3" then online_gname = "¾Æ»ê½Ã ´ÙÀڳడÁ¤" elseif online_gubun="4" then online_gname = "±âŸÁö¿ª ÀϹݰ¡Á¤" elseif online_gubun="5" then online_gname = "±âŸÁö¿ª ¼±¹®°¡Á¤" end if OGName = online_gname End Function ' Ä·ÇÁ/ºÐ·ùº° Ä«¿îÅÍ Function Check_Yncount(camp_no,camp_gubun) ySQL = "SELECT count(online_no) FROM tb_online where camp_no="&camp_no&" and online_gubun="&camp_gubun Set yrs = db.Execute(ySQL) Check_Yncount = yrs(0) End Function %> ¼±¹®´ëÇб³ ¿µ¾îÄ·ÇÁ <% ' ´äº¯°ªÀ» À§Çؼ­ ¸®½ºÆ®¿¡¼­ ¸ÕÀú ¹Þ¾Æ¿È search = trim(request("search")) searchstring = replace(request("searchstring"),"'","''") searchstring = trim(searchstring) page = request("page") code = request("code") camp_no = request("camp_no") bbs_no = request("bbs_no") bbs_ref = request("bbs_ref") bbs_step = request("bbs_step") bbs_level = request("bbs_level") SQL = "Select * from tb_bbs where bbs_no="&bbs_no Set rs = db.Execute(SQL) bbs_open = rs("bbs_open") If rs("bbs_no")<1344 then bbs_content = replace(rs("bbs_content"),chr(13)&chr(10),"
") Else bbs_content = rs("bbs_content") End if ' ºñ°ø°³ °Ô½Ã¹°ÀÏ°æ¿ì if session("m_level")<>"1" then ' °ü¸®ÀÚ°¡ ¾Æ´Ï¶ó¸é opSQL = "Select bbs_id from tb_bbs where bbs_no="&bbs_ref&" order by bbs_no asc" 'response.write opSQL Set oprs = db.Execute(opSQL) if trim(bbs_open)="N" and session("u_id")<>oprs("bbs_id") then response.write "" response.end end if end if %>
<% pSQL = "select * from tb_bbs where code='"&code&"' and bbs_top=''" if camp_no <> "" then pSQL = pSQL&" and camp_no="&camp_no end if if searchstring <> "" then pSQL = pSQL&" and "&search&" like '%"&searchstring&"%'" end if pSQL = pSQL&" and bbs_no<"&bbs_no&" ORDER BY bbs_no DESC" Set prs = Db.Execute(pSQL) %> <% countQuery = " select count(comment_no) from tb_comment where code='"&code&"' and bbs_no="&bbs_no Set ctrs = db.Execute(countQuery) comment_writecnt = ctrs(0) nSQL = "select * from tb_bbs where code='"&code&"' and bbs_top=''" if camp_no <> "" then nSQL = nSQL&" and camp_no="&camp_no end if if searchstring <> "" then nSQL = nSQL&" and "&search&" like '%"&searchstring&"%'" end if nSQL = nSQL&" and bbs_no>"&bbs_no&" ORDER BY bbs_no asc" Set nrs = Db.Execute(nSQL) %>
Á¦ ¸ñ   | <%=ReverseWord(rs("bbs_title"))%>
ÀÛ¼ºÀÚ | <%=rs("bbs_name")%><% if rs("bbs_email")<>"" then%>(<%=rs("bbs_email")%>)<%end if%>
±ÛÁ¤º¸ | Á¶È¸¼ö : <%=rs("bbs_readnum")%>, µî·ÏÀÏ : <%=rs("bbs_writeday")%>
<% strDirectory = "C:\D_WWW/¿µ¾îÄ·ÇÁ/data/"+code+"/" Set FSO = CreateObject("Scripting.FileSystemObject") if code="photo" then Dim bbs_file(20) For i = 1 To 20 bbs_file(i) = rs("userfile"&i) if bbs_file(i)<>"" then bbs_filename = split(bbs_file(i),".") file_name = bbs_filename(0) file_ext = bbs_filename(1) strFile = strDirectory & rs("userfile"&i) If (FSO.FileExists(strFile)) Then if Lcase(file_ext)="jpg" or Lcase(file_ext)="gif" or Lcase(file_ext)="bmp" then T_Size = GetImageSize("C:\D_WWW/¿µ¾îÄ·ÇÁ/data/"+rs("code")+"/"+rs("userfile"&i)) TSize = split(T_Size,",") S_Size = SetImageSize("C:\D_WWW/¿µ¾îÄ·ÇÁ/data/"+rs("code")+"/"+rs("userfile"&i),"600") SSize = split(S_Size,",") %> <% end if end if end if Next end if %> <% if code="vod" and rs("userfile1")<>"" then %>
" width="400" height="320">
<% end if %> <%=bbs_content%>
<% For i = 1 To 20 strFile2 = strDirectory & rs("userfile"&i) If (FSO.FileExists(strFile2)) Then %> [&file_folder=<%=rs("code")%>"><%=rs("userfile"&i)%>] <% end if Next %>
<%'==========´äº¯=========%> <% if session("m_id")<>"" or session("u_id")<>"" then %> <% if rs("bbs_top")<>"Y" and (code="qna" or code="spost") then %> ´äº¯ <% end if %> <% end if %> <%'==========¼öÁ¤=========%> <% if session("u_id")=rs("bbs_id") or session("m_level")="1" then %> ±Û¼öÁ¤ <% end if %> <%'==========»èÁ¦=========%> <% if session("u_id")=rs("bbs_id") or session("m_level")="1" then %> ±Û»èÁ¦ <% end if %> <%'==========¸ñ·Ï=========%> ±Û¸ñ·Ï
<% ' ÄÚ¸àÆ® Ãâ·Â CSQL = "Select * from tb_comment where code='"&code&"' and bbs_no="&bbs_no&" ORDER BY comment_no DESC" Set crs = db.Execute(CSQL) if not(crs.eof) then %> <% end if c = 1 Do while not Crs.EOF comment_content = replace(crs("comment_content"),chr(13)&chr(10),"
") comment_rest = c mod 2 if comment_rest="0" then c_class = "comment" else c_class = "comment2" end if %> <% if comment_writecnt<>c then %> <% end if crs.movenext c=c+1 loop %> <% if session("m_level")="1" or session("u_id")<>"" then if session("m_level")="1" then comment_name = session("m_name") else comment_name = session("u_name") end if %> "> "> "> "> "> "> "> <% end if %>
<%=comment_content%>
<%=crs("comment_name")%> (<%=crs("comment_writeday")%>) <% if session("m_level")="1" or session("u_id")=crs("comment_id") then %> [&code=<%=code%>&camp_no=<%=camp_no%>&bbs_no=<%=bbs_no%>&bbs_ref=<%=bbs_ref%>&bbs_step=<%=bbs_step%>&bbs_level=<%=bbs_level%>&page=<%=page%>&search=<%=search%>&searchstring=<%=searchstring%>');">»èÁ¦] <% end if %>
ÀÛ¼ºÀÚ : <%=comment_name%>
<% if not(prs.eof) then pcomment_num = prs("bbs_comment_num") if Cint(pcomment_num)>"0" then pcomm_num = "["&pcomment_num&"]" else pcomm_num = "" end if %> <% if prs("bbs_open")="N" then %> <% end if %> &camp_no=<%=camp_no%>&bbs_no=<%=prs("bbs_no")%>&page=<%=page%>&bbs_ref=<%=prs("bbs_ref")%>&bbs_step=<%=prs("bbs_step")%>&bbs_level=<%=prs("bbs_level")%>&search=<%=search%>&searchstring=<%=searchstring%>"><%=ReverseWord(prs("bbs_title"))%> <%=pcomm_num%> <% end if %>
<% if not(nrs.eof) then ncomment_num = nrs("bbs_comment_num") if Cint(ncomment_num)>"0" then ncomm_num = "["&ncomment_num&"]" else ncomm_num = "" end if %> <% if nrs("bbs_open")="N" then %> <% end if %> &camp_no=<%=camp_no%>&bbs_no=<%=nrs("bbs_no")%>&page=<%=page%>&bbs_ref=<%=nrs("bbs_ref")%>&bbs_step=<%=nrs("bbs_step")%>&bbs_level=<%=nrs("bbs_level")%>&search=<%=search%>&searchstring=<%=searchstring%>"><%=ReverseWord(nrs("bbs_title"))%> <%=ncomm_num%> <% end if %>
<% updateSQL = "Update tb_bbs set bbs_readnum = bbs_readnum + 1" updateSQL = updateSQL&" where bbs_no = "&bbs_no db.Execute updateSQL %>