<% photo_no = request("photo_no") If Request("GoTopage")="" Then curpage = 1 Else curpage = cint(Request("GoTopage")) End If CurPage2 = CurPage ipp = 7 set fso = Server.CreateObject("Scripting.FileSystemObject") set f = fso.OpenTextFile("C:\cons.dat") strconnect = f.Readline set Dbcon=Server.CreateObject("ADODB.Connection") Dbcon.Open strconnect if photo_no = "" then sql = "SELECT COUNT(num) AS cnt FROM hotphoto2" Else sql = "SELECT COUNT(*) AS cnt FROM hotphoto2 where photo_no = " & photo_no 'sql = "SELECT COUNT(num) FROM hotphoto2 where photo_no = " & photo_no 'sql = "SELECT COUNT(num) AS cnt FROM hotphoto2" End if set rs=Dbcon.Execute(sql) postcount = rs("cnt") 'ÃÑ ±ÛÀÇ °³¼ö¸¦ ±¸ÇÑ´Ù Set DbRec=Server.CreateObject("ADODB.RecordSet") DbRec.CursorType = 1 if photo_no = "" then DbRec.Open "SELECT * FROM hotphoto2 ORDER BY num DESC", DbCon Else DbRec.Open "SELECT * FROM hotphoto2 where photo_no = " & photo_no & " order by num DESC", DbCon End if totpage = fix(postcount / ipp) 'Àüü ÆäÀÌÁöÀÇ ¼ö¸¦ ±¸ÇÑ´Ù If (totpage * ipp) <> postcount Then totpage = totpage + 1 End If For a = 1 To (curpage - 1) * ipp DbRec.MoveNext Next %>
 
 
 
<% if photo_no = 1 then photo_color1 = "#800040" Else photo_color1 = "#336699" End if if photo_no = 2 then photo_color2 = "#800040" Else photo_color2 = "#336699" End if if photo_no = 3 then photo_color3 = "#800040" Else photo_color3 = "#336699" End if if photo_no = 4 then photo_color4 = "#800040" Else photo_color4 = "#336699" End if %>
<% If Request("block") <> "" Then i = 0 Else i = 1 End if Do until DbRec.EOF Or i>ipp flag = Mid(DbRec("filename"),7,1) If flag = "s" Then sflag = 37 ElseIf flag = "e" Then sflag = 44 Else sflag = 35 End If %>
">.jpg" width="125" vspace="3" border=0 class="box2"> "><%=DbRec("title")%>
  <%=DbRec("wdate")%>
  <%=DbRec("content")%>
<% DbRec.Movenext i = i + 1 Loop %>
<% MyChoice = 10 Total_Block = int(TotPage / MyChoice) If int(TotPage) Mod MyChoice = 0 Then Total_Block = Total_Block - 1 End If If Request("block") <> "" Then NowBlock = Request("block") Else NowBlock = 0 End If %>
<% If TotPage > 0 Then If Cint(NowBlock) > 0 Then CurPage = (int(NowBlock * MyChoice) - (MyChoice - 1)) %> <% End If %> <% If Cint(Total_Block) <> Cint(NowBlock) Then For Gopage = 1 To MyChoice If CurPage2 <> (int(NowBlock * MyChoice) + Gopage) Then %> <%=(int(NowBlock * MyChoice) + Gopage)%> | <% Else %> <%=(int(NowBlock * MyChoice) + Gopage)%> | <% End If Next Else %> <% If (TotPage Mod MyChoice = 0) Then ttt = MyChoice Else ttt = TotPage Mod MyChoice End If For Gopage = 1 To ttt If CurPage2 <> (int(NowBlock * MyChoice) + Gopage) Then %> <%=(int(NowBlock * MyChoice) + Gopage)%> <% Else %> <%=(int(NowBlock * MyChoice) + Gopage)%> <% End If Next End If '´ÙÀ½ ºí·°ÀÇ Ã¹ÆäÀÌÁö ¼ö¸¦ °è»êÇÑ´Ù. CurPage = (int(NowBlock * MyChoice) + Gopage) %> <% If (Cint(Total_Block) > 0) and (Cint(NowBlock) < Cint(Total_Block)) Then %> <% End If End If %>


<% Dbcon.Close Set Dbcon = Nothing %>