%@codepage=932%>
<%
Function getString(str, strlen)
dim rValue
dim nLength
nLength = 0.00
rValue = ""
for f = 1 to len(str)
tmpStr = MID(str,f,1)
tmpLen = ASC(tmpStr)
if (tmpLen < 0) then
nLength = nLength + 1.4
rValue = rValue & tmpStr
elseif (tmpLen >= 97 and tmpLen <= 122) then
nLength = nLength + 0.75
rValue = rValue & tmpStr
elseif (tmpLen >= 65 and tmpLen <= 90) then
nLength = nLength + 1
rValue = rValue & tmpStr
else
nLength = nLength + 0.6
rValue = rValue & tmpStr
end if
If (nLength > strlen) then
rValue = rValue & "..."
exit for
end if
next
getString = rValue
End Function
page=request("page")
if page = "" then
page=1
else
page = cint(page)
end if
s1 = request("s1")
s2 = request("s2")
if s2 = "" then
sql = "select idx,company,comment,url from link order by writeday desc,idx desc"
else
sql = "select idx,company,comment,url from link where "&s1&" like '%"&s2&"%' order by writeday desc, idx desc"
end if
rs.open sql,dbconn,1
rs.pagesize = 10
%>
<%
if rs.recordcount <> 0 then
limit=5
pos=(page-1) mod limit
spage=page-pos
%>
<%
if spage <> 1 then
%>
&s2=<%=request("s2")%>'" style="cursor:hand">
<%
else
response.write " "
end if
for j=spage to spage + limit - 1
if j=page then
%>
<%=j%>
<%
else
%>
&s2=<%=request("s2")%>" style="cursor:hand">
<%=j%>
<%end if
if j = rs.pagecount then
exit for
end if
next
if spage+limit <= rs.pagecount then
%>
&s2=<%=request("s2")%>'" style="cursor:hand">
<%
else
response.write " "
end if
%>