<% call doLoadLinks() call doShowLinks() dim tmpTableData sub doLoadLinks() dim tmpSQL,tmpSort:tmpSort=ops.request.getQuery("sort") if not opsCheck.isName(tmpSort) then tmpSort="" tmpSQL="select * from db_sys_links where l_sort='"&tmpSort&"' and l_hidden=1 order by l_order desc,l_id asc" set tmpTableData=ops.db.getQueryTable(tmpSQL) end sub sub doShowLinks() dim tmpPic,tmpstr,tmpImg,tmpLink,tmpName,tmpSort,rr,tmpCol tmpCol=ops.request.getQueryInt("col") if int(tmpCol)<1 then tmpCol=5 if not isTable(tmpTableData) then exit sub 'debug opsTest.toTableString(tmpTableData,"tmpTableData") 'echo "document.write ("""");"&vbcrlf 'echo "document.write ("""");"&vbcrlf tmpTableData.doItemBegin() for rr=1 to tmpTableData.getRow() tmpPic=tmpTableData.getItemValue("l_pic") tmpLink=tmpTableData.getItemValue("l_url") tmpName=tmpTableData.getItemValue("l_name") tmpSort=tmpTableData.getItemValue("l_sort") if instr(tmpSort,"txt")>0 then tmpstr=""&tmpName&"" else tmpstr="" end if echo "document.write("""&opsCode.toJS(tmpstr)&" "");"&vbcrlf 'echo "document.write ("""");"&vbcrlf 'if rr mod tmpCol=0 then echo "document.write ("""");"&vbcrlf tmpTableData.doItemMove() next 'echo "document.write ("""");"&vbcrlf 'echo "document.write (""
"&tmpstr&"
"");"&vbcrlf end sub function echo(strer) response.write strer end function %>