靈活運用緩衝類的例子

來源:互聯網
上載者:User
緩衝 <%


'--------------------------顯示供應資訊
'jz_cid=分類ID
'jz_type=資訊類型
'jz_tree=目錄層次
'jz_tr=顯示多少行
'jz_td=顯示多少列
'jz_txt=每列顯示多少個字
'jz_target=開啟連結方式
'jz_order=排序方式
'jz_date=是否顯示時間

Private function jz_show_00_00(jz_cid,jz_type,jz_tree,jz_tr,jz_td,jz_txt,jz_target,jz_order,jz_date)
dim rows_A(1),rows_b(1),reval,i
dim jz_temp(1,1)
jz_temp(0,0)=jz_tr*jz_td'算出顯示多少條記錄
jz_tree=jz.tree_00(jz_tree)

jz_target=jz.target(jz_target)
'Response.Write(jz_target)


jz.sql(0)="SELECT jz_01,jz_15 from Jz_News_Class where jz_01="&jz_cid
call jz.conn_00(0,1)
call jz.c_r_s(0,true,true)
call jz.c_r_o(0,0,1)
rows_A(1)=jz.rs(0).GetRows
jz.rs(0).close
jz.sql(0)="SELECT distinct top "&jz_temp(0,0)&" jz_0,jz_2,jz_3,jz_18 from Jz_Trade_message where jz_3='"&jz_type&"' ORDER BY jz_0 desc"
call jz.c_r_o(0,0,1)
rows_b(1)=jz.rs(0).GetRows
call jz.c_r_e(0,true,true)

rows_b(0)=ubound(rows_b(1),2)

if rows_b(0)>0 then
'Response.Write(rows_b(0))
reval=reval&"<ul><div class=""interval_00""> </div>"
if rows_b(0)>=jz_temp(0,0) then
for i=0 to jz_temp(0,0)-1
reval=reval&jz_show_00_01(rows_A(1)(0,0),rows_A(1)(1,0),jz_tree,rows_b(1)(0,i),rows_b(1)(1,i),rows_b(1)(3,i),jz_txt,jz_target,jz_date)
next
else
for i=0 to rows_b(0)
reval=reval&jz_show_00_01(rows_A(1)(0,0),rows_A(1)(1,0),jz_tree,rows_b(1)(0,i),rows_b(1)(1,i),rows_b(1)(3,i),jz_txt,jz_target,jz_date)
next
jz_temp(1,0)=jz_temp(0,0)-1-rows_b(0)
for i=1 to jz_temp(1,0)
reval=reval&jz_show_00_02()
next
end if




reval=reval&"</ul>"
end if

jz_show_00_00=reval
end function

'-------------
'str_0=分類ID
'str_1=資訊模板
'str_2=網站目錄層次
'str_3=資訊ID
'str_4=資訊標題
'str_5=資訊時間
'str_6=每列顯示多少個字
'str_7=開啟連結方式
'str_8=是否顯示時間

Private function jz_show_00_01(str_0,str_1,str_2,str_3,str_4,str_5,str_6,str_7,str_8)
dim jz_title
jz_title=str_4
if len(str_4)>=str_6 then str_4=(strLeft(str_4,str_6*2-3)&"..")
jz_show_00_01="<li><a href="""&str_2&str_1&"?cid="&str_0&"&id="&str_3&""" title="""&jz_title&""" "&str_7&">"
jz_show_00_01=jz_show_00_01&str_4
jz_show_00_01=jz_show_00_01&"</a>"
if str_8 then jz_show_00_01=jz_show_00_01&"("&str_5&")"
jz_show_00_01=jz_show_00_01&"</li>"

end function


'------------------
Private function jz_show_00_02()
jz_show_00_02="<li><a href=""#姚海濤"" >暫無資料......</a></li>"
end function

'---------------------資訊顯示.....
'str_0=資訊ID號
'str_1=路徑層次

Private function jz_show_00_03(str_0,str_1)
dim rows_A(1),rows_b(1),reval,i
dim jz_temp(1,1)

jz.sql(0)="SELECT * from Jz_Trade_message where jz_0="&str_0
call jz.conn_00(0,tree)
call jz.c_r_s(0,true,true)
Application.Lock
jz.Conn(0).execute("update Jz_Trade_message set jz_20=jz_20+1 where jz_0="&str_0)
Application.Unlock
call jz.c_r_o(0,3,3)
Application.Lock
jz_temp(0,0)=jz.rs(0)("jz_20")
if jz_temp(0,0)="" or jz_temp(0,0)=empty or jz_temp(0,0)<100 then
jz.rs(0)("jz_20")=688
jz.rs(0).update
end if
Application.unLock

rows_A(1)=jz.rs(0).GetRows
jz.rs(0).close
jz.sql(0)="SELECT jz_00,jz_01 from Jz_trade_Class where jz_00="&rows_A(1)(1,0)
call jz.c_r_o(0,0,1)
rows_b(1)=jz.rs(0).GetRows
call jz.c_r_e(0,true,true)

jz.cache=rows_A(1)(2,0)
jz.replace_000("{$title}")



jz.cache=rows_b(1)(1,0)
jz.replace_000("{$jz_1}")

jz.cache=rows_a(1)(2,0)
jz.replace_000("{$jz_2}")

jz.cache=jz_show_00_04(rows_A(1)(3,0))
jz.replace_000("{$jz_3}")

jz.cache=rows_A(1)(4,0)
jz.replace_000("{$jz_4}")

jz.cache=jz_show_00_05(rows_A(1)(5,0))
jz.replace_000("{$jz_5}")

jz.cache=rows_A(1)(6,0)
jz.repl



相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。