![]() |
#2
永夜的极光2008-02-21 08:24
|
数据库数据说明:勋章是用"|||"分隔的,设有勋章,就是勋章图片名,没有则为“rempty”,
如:winner1.gif|||rempty|||winner2.gif|||rempty|||rempty|||rempty|||rempty|||rempty|||rempty|||rempty|||
Function Jiangzhang(jzdata)
dim jzdata1,jztyp,i,jzsm1,jzsm2,jzpic1,jzpic2,jzrs,j
set jzrs=bbs94kk.execute("select jzsm,jzpicurl from kk_jzdata")
do while not jzrs.eof
jzsm1=jzsm1&jzrs("jzsm")&"|||"
jzpic1=jzpic1&jzrs("jzpicurl")&"|||"
jzrs.movenext
loop
jzsm2=split(jzsm1,"|||")
jzpic2=split(jzpic1,"|||")
if trim(jzdata)<>"" then
jzdata1=split(jzdata,"|||")
for i=0 to ubound(jzdata1)-1
for j=0 to ubound(jzpic2)
if jzpic2(j)=jzdata1(i) then exit for '确定奖章说明
next
if jzdata1(i)<>"rempty" then jztyp=jztyp&"<span title='"&jzsm2(j)&"' style='color:red'><img src='Images/cham/"&jzdata1(i)&"'></span>"
if ((i+1) mod 5)=0 then jztyp=jztyp&"<br>"
next
else
jiangzhang=""
end if
jiangzhang=jztyp
End Function
dim jzdata1,jztyp,i,jzsm1,jzsm2,jzpic1,jzpic2,jzrs,j
set jzrs=bbs94kk.execute("select jzsm,jzpicurl from kk_jzdata")
do while not jzrs.eof
jzsm1=jzsm1&jzrs("jzsm")&"|||"
jzpic1=jzpic1&jzrs("jzpicurl")&"|||"
jzrs.movenext
loop
jzsm2=split(jzsm1,"|||")
jzpic2=split(jzpic1,"|||")
if trim(jzdata)<>"" then
jzdata1=split(jzdata,"|||")
for i=0 to ubound(jzdata1)-1
for j=0 to ubound(jzpic2)
if jzpic2(j)=jzdata1(i) then exit for '确定奖章说明
next
if jzdata1(i)<>"rempty" then jztyp=jztyp&"<span title='"&jzsm2(j)&"' style='color:red'><img src='Images/cham/"&jzdata1(i)&"'></span>"
if ((i+1) mod 5)=0 then jztyp=jztyp&"<br>"
next
else
jiangzhang=""
end if
jiangzhang=jztyp
End Function
[[it] 本帖最后由 thbwn 于 2008-2-20 15:08 编辑 [/it]]