<body topmargin="0">

<table width="133" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
              <tbody>
                
                <tr> 
                  <td align="center" bgcolor="#FF99CC" height="1" width="133"></td>
                </tr>
              </tbody>
</table>
<table cellpadding="2" cellspacing="0" border="0" width="133" style="border-collapse: collapse" bordercolor="#111111">
<tbody>
<%
if typeid="" or IsEmpty(typeid) or typeid=0 then
    sql="select top 18 articleid,title from learning order by hits desc"
else
    sql="select top 18 articleid,title from learning where typeid=" & typeid & " order by hits desc"
end if
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof then
    response.write "<tr><td>»¹Ã»ÓÐÎÄÕÂ</td></tr>"
else
    do while not rs.eof
%>
    <tr><td width="133" bgcolor="#FFE8F3">
    <p style="line-height: 130%">
    <font color="#FF0099">¡¤</font><a target="_blank" href="love/book/viewarticle.asp?id=<%=rs("articleid")%>" title="<%=rs("title")%>" class="a06"><%=strvalue(rs("title"),16)%></a>
    </td></tr>
<%
        rs.movenext
    loop
end if
rs.close
%>
</tbody>
</table>
<%

function strlen(str)
dim p_len,xx
p_len=0
strlen=0
if trim(str)<>"" then
p_len=len(trim(str))
for xx=1 to p_len
if asc(mid(str,xx,1))<0 then
strlen=int(strlen) + 2
else
strlen=int(strlen) + 1
end if
next
end if
end function

function strvalue(str,lennum)
dim p_num,x
dim i
if strlen(str)<=lennum then
strvalue=str
else
p_num=0
x=0
do while not p_num > lennum-2
x=x+1
if asc(mid(str,x,1))<0 then
p_num=int(p_num) + 2
else
p_num=int(p_num) + 1
end if
strvalue=left(trim(str),x)&".."
loop
end if
end function

%>