張貼日期:Mar 12, 2010 1:9:46 PM
<%
Set Rs_photo_class = Server.CreateObject("ADODB.Recordset")
Rs_photo_class.ActiveConnection = myConnString
Rs_photo_class.Source = "SELECT * FROM tb_photo_class ORDER BY c_sort ASC"
Rs_photo_class.CursorType = 3
Rs_photo_class.CursorLocation = 2
Rs_photo_class.LockType = 1
Rs_photo_class.Open()
'每頁資料數
Rs_photo_class.pagesize=10
%>
<table width="70%" class="sortable" id="mytable" border="0" align="center" cellpadding="3" cellspacing="1" >
<tr class="tableBorder">
<td colspan="3" align="center"><strong>相簿分類管理</strong></td>
</tr>
<tr class="tableBorder">
<td width="6%"><strong>操作</strong></td>
<td><strong>分類名稱</strong></td>
<td width="19%" align="center" nowrap><strong>選項</strong></td>
</tr>
<%
'列出資料
Rowcount = 0
While NOT Rs_photo_class.EOF and Rowcount < Rs_photo_class.Pagezie
RowCount = RowCount + 1
%>
<tr <%If CInt(RowCount+2) Mod 2 = 0 Then Response.Write("bgcolor=#F3F3E9") %>>
<td width="6%" class="forumRowHighlight"><input name="ClassID" type="checkbox" id="ClassID" value="<%=Rs_photo_class.Fields.Item("c_id").Value%>"></td>
<td class="forumRowHighlight"><font size="2"><%=Rs_photo_class.Fields.Item("c_title").Value%></font></td>
<td align="center" nowrap class="forumRowHighlight"><font size="2"><input name="button" type="button" onClick="location.href='edit_photo_class.asp?c_id=<%=Rs_photo_class.Fields.Item("c_id").Value%>&mypg=<%=myPg%>'" value="修改">
</font></td>
</tr>
<%
Rs_photo_class.MoveNext()
Wend
'關閉Recordset
Rs_photo_class.close()
Set Rs_photo_class = Nothing
%>
</table>