Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Error on top10 file.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Error on top10 file.

 Post Reply Post Reply
Author
pigking_05pdh View Drop Down
Newbie
Newbie
Avatar

Joined: 22 November 2008
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote pigking_05pdh Quote  Post ReplyReply Direct Link To This Post Topic: Error on top10 file.
    Posted: 05 April 2009 at 4:59pm
My forum uses WWF 9.5 for Access code .  I converted my database into SQL sever database ( use database_connection.asp file of ver 9.56 for SQLsever ) . Any problem ! A have top10.asp file for view hot topics , new topics .v.v..on forum header , ex :




File top10.asp here :

[code]<table width="950px" height="38" cellspacing="0" border="0" cellpadding="0" align="center">
    <tr><%   
        Response.Write vbCrLf & " <td align=""center"" background=""" & strImagePath & "tab_backg/top_center.gif"" width=""100%""><span class=""tieudediendan"">" & strTxttop10 & "</span></a></td>"
       
    %></tr>
</table>
<TABLE cellspacing="1" cellpadding="3" class="tableBorder" align="center" style="border-collapse: collapse" border="1" bordercolor="E5E5EF">
   
    <TR class="tableLedger">
        <TD colspan="2" width="30%" class="text_top_sub">Ch&#7911; &#273;&#7873; hot nh&#7845;t</B></TD>
        <TD width="15%" class="text_top_sub">Ch&#7911; &#273;&#7873; m&#7899;i nh&#7845;t</B></TD>
        <TD width="30%" class="text_top_sub">B&#224;i vi&#7871;t m&#7899;i nh&#7845;t</B></TD>
    </TR>
    <TR class="tableSta2">
        <TD colspan="2">
                <TABLE width="100%" cellspacing="0" cellpadding="0" border="0">
                <tr >
                             <td width="80%" class="text_top_sub">Ch&#7911; &#273;&#7873;</td>
                             <td  width="20%" class="text_top_sub">L&#7847;n xem</td>

                </tr>
       <%
       Dim x
strSQl = "SELECT Topic_ID, Subject, No_of_Views FROM tblTopic WHERE Hide = 'False' ORDER BY No_Of_Views DESC;"
rsCommon.Open strSQL, adoCon
If rsCommon.EOF then Response.Write("<tr><td align=""left"" valign=""top"">"&strTxtNotmen&"</td></tr>")
For x = 1 To 8
If rsCommon.EOF Then Exit For
%>
<tr><td width="98% align="left" valign="top"><a TITLE="<% = removeHTML(rsCommon("Subject"), 550, true )%>" href="dtvt.asp?TID=<% =rsCommon("Topic_ID") %>"><% =Left(rsCommon("Subject"), 25) %> ...</a> </td><td width="20%><span class="smText"  align="center"><% =rsCommon("No_Of_Views") %></span></td></tr>

<%
rsCommon.MoveNext
Next
rsCommon.Close
%>
                </TABLE>
        </TD>
        <TD rowspan="3" valign="top" width="30%">
                <TABLE width="100%" cellspacing=0 cellpadding=0>
                <tr>
                             <td width="80%" class="text_top_sub">Ch&#7911; &#273;&#7873;</td>
                             <td  width="20%" class="text_top_sub" align="center">Tr&#7843; l&#7901;i</td>

                </tr>
<%
strSQL = "SELECT TOP 20 " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Topic.Subject , " & strDbTable & "Topic.No_of_replies " & _
"FROM " & strDbTable & "Topic" & strDBNoLock & " " & _
"ORDER BY " & strDbTable & "Topic.Topic_ID DESC;"
rsCommon.Open strSQL, adoCon, 3, 3
Response.Write(vbCrLf & "<table cellpadding=""0"" cellspacing=""0"" width=""100%"">")
If rsCommon.EOF or rsCommon.BOF Then
Response.Write(vbCrLf & "<table cellpadding=""0"" cellspacing=""0"" width=""100%"">")
Response.Write(vbCrLf & "<tr>" & strTxtNoMember & "</tr></table>")
End If
if rsCommon.RecordCount > 0 then
For intLoop = 1 To rsCommon.RecordCount
if rsCommon.EOF then exit For
Response.Write(vbCrLf & "<tr>")
Response.Write "<td width=""80%""><A TITLE=""" & removeHTML(rsCommon("Subject"), 550, true) & """ HREF=""dtvt.asp?TID=" & rsCommon("Topic_ID") & """>" & Left(rsCommon("Subject"), 25) & "...</A>"
Response.Write(vbCrLf & "<td width=""20%""><center>"& rsCommon("No_of_replies") & "")
Response.Write(vbCrLf & "</tr>")
rsCommon.MoveNext
 Next
 else
end if
rsCommon.close
 %>   
</TABLE>
    </TD>
        <TD rowspan="3" valign="top" width="20%">
                <TABLE width="100%" cellspacing=0 cellpadding=0>
                    <tr>
                        <td  width="55%" class="text_top_sub">B&#224;i vi&#7871;t</td>
                        <td width="10%" class="text_top_sub"><center>Xem</center></td>
                        <td width="10%" class="text_top_sub">Tr&#7843; l&#7901;i</td>
                    </tr>  
 <%                         
Dim rsMempost, nos
dim intLoop
strSQL = "SELECT TOP 20 " & strDbTable & "Topic.Topic_ID, " & strDbTable  & "Thread.Author_ID, " & strDbTable & "Topic.Subject , " & strDbTable & "Topic.No_of_views, " & strDbTable & "Topic.No_of_replies, " & strDbTable & "Topic.Last_Thread_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date, " & strDbTable & "Thread.Thread_ID " & _
         "FROM " & strDbTable & "Topic" & strDBNoLock & "," & strD
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.