% SQL = "Select * From web"
Set rsw = GetdbRecord2( dbname , SQL, pwd )
SQL = "Select * From news Where item='comb'"
Set rsnews1 = GetdbRecord2( dbname , SQL, pwd )
%>
維修案例- <%=rsw("mane")%>
">
">
<%
prom="yes"
aspname="rs"
hpn=clng(Request("NPG"))
if hpn=empty then hpn=1 '傳入頁數
if hpn<1 then hpn=1
bysell="1"
SQL = "Select * From product where kindcode='01' and condition='1' order by prodcode desc"
Set rs = GetdbRecord1( dbname , SQL, pwd )
REDIM N(30,rs.Fields.Count),cote(rs.Fields.Count)
For i = 0 to rs.Fields.Count - 1
cote(i)=rs(i).Name
Next
last=i
stradd=""
'----------------------計算總筆數
all=0
if Not rs.EOF then
While Not rs.EOF
all=all+1
rs.MoveNext
Wend
rs.MoveFirst
'----------------------------------
pgsize=(all\30) '---資料庫的總頁數(40/1)
if all mod 30 <>0 then pgsize=pgsize+1
pgps=(pgsize\30)
if pgsize mod 30 <>0 then pgps=pgps+1
else
pgsize=0
end if
if hpn>pgsize then hpn=1
'----------------------參數計算
si=hpn\30
if hpn mod 30<>0 then si=si+1
'--------------------
if hpn>30 then
ix=(hpn\30)*30+1
if hpn mod 30 =0 then ix=ix-30
else
ix=1
end if
'===============數字連結===================
i2=0
for i=ix to pgsize
i2=i2+1
if i2>30 then exit for
if i<>hpn then
gp=gp&" "&i&" |"
else
gp=gp&" "&i&" |"
end if
next
'*********************************************************************************
sub pdata(hpn,pagei,TOHP)
for nx=1 to ((hpn-1)*30)
rs.MoveNext
next
pagei=0
do
pagei=pagei+1
if pagei>30 or rs.EOF then exit do '將每筆資料值放入陣列
For I = 0 to rs.Fields.Count - 1
N(pagei,I)=rs(I)
if InStr(1,N(pagei,I),quest,1) Then
N(pagei,I)=Replace(N(pagei,I),quest,""&quest&"")
end if
Next
rs.MoveNext
loop
if hpn>1 and hpn下一頁 )( NEXT PAGE"
elseif hpn=pgsize and all>30 then
TOHP="LAST PAGE"
elseif hpn=1 and Not rs.EOF then
TOHP="NEXT PAGE"
else
TOHP="讀取完畢..........."
end if
end sub
%>
 |
|
|

<%=rsnews1("title")%>
<%response.write rsnews1("memo")%> |
<% if pgsize>0 then
call pdata(hpn,pagei,TOHP)
i=1%>
<%
for j=1 to 10
%>
<%
for l=1 to 3
if i=pagei then exit for
Odd = Odd + 2
%>
|
<%
i=i+1
next%>
<% next
end if%>
|
|
<%IF pgsize>1 THEN%><%=gp%>
<%IF hpn>1 THEN%>">
<%END IF%><%IF hpn>0 and hpn"> <%END IF%><%END IF%>
|
|
|
|
|