 |
|
ช่วยดูโค๊ดและแก้ไขให้หน่อยนะ Thank You! อยากรู้ว่ามันผิดตรงไหนบ้างช่วยแก้ไขให้หน่อยเพราะเพิ่มการแบ่งหน้าของเว็บบอร์ดเข้ามา |
|
 |
|
|
 |
 |
|
อยากรู้ว่ามันผิดตรงไหนบ้างช่วยแก้ไขให้หน่อยเพราะเพิ่มการแบ่งหน้าของเว็บบอร์ดเข้ามา ตอนที่ไม่ได้เพิ่มการแบ่งหน้าใช้ได้ปกติดีไม่มีerror พอเอาโค๊ดแบ่งหน้าเข้ามาก็เกิดerrorแต่ไม่รู้ว่ามันผิดตรงไหน ถ้าเป็นไปได้ช่วยแก้ให้ใช้ได้ด้วยนะ (เพิ่งหัดทำนะ อย่าว่ากันนะถ้าหากว่ามันมั่วไปหน่อย)
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file =conn.inc-->
<html>
<head>
<title>:: WEBBOARD ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874"><style type="text/css">
<!--
body,td,th {
font-family: MS Sans Serif;
font-size: x-small;
}
body {
background-color: #668FB9;
}
a:hover {
color: #FF6600;
}
.style1 {
font-family: "MS Sans Serif";
font-size: x-small;
}
-->
</style></head>
<link rel=stylesheet href="main.css">
<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
<div align=center> <img src="../IMAGE/Logo.jpg" width="780" height="191" border="0" usemap="#MapMap">
<map name="MapMap">
<area shape="rect" coords="400,173,458,191" href="../Data/data.htm">
<area shape="rect" coords="231,173,318,191" href="../Rules/rules.htm">
<area shape="rect" coords="318,172,399,188" href="bbs.asp">
<area shape="rect" coords="7,171,74,190" href="../Aboutus/aboutus.htm">
<area shape="rect" coords="457,173,513,196" href="../Contact/contact.htm">
<area shape="rect" coords="158,173,233,191" href="../Hotissue/hotissue.htm">
<area shape="rect" coords="73,172,156,190" href="../New/new.htm">
</map>
<table cellpadding=0 cellspacing=0 width=780 border=0>
<tr>
<td align=right><a href="bbs_post.asp"><br>
<span class="style1">สร้างข้อความใหม่</span></a><span class="style1">>></span></td>
</tr>
</table>
<br>
<table cellpadding=2 cellspacing=1 width=780 border=0>
<tr align=center height=25 bgcolor=#ffcc00>
<td width=85 class="style1">ลำดับที่</td>
<td width=380 class="style1">ชื่อเรื่อง</td>
<td width=110 class="style1">วันที่ส่ง</td>
<td width=32 class="style1">อ่าน</td>
<td width=32 class="style1">ตอบ</td>
<td width=110 class="style1">ตอบล่าสุด</td>
</tr>
<%
sql="select * from bbs where "
sql=sql&" topic_id=reply_id "
sql=sql&" order by date_post desc"
set rs=Conn.Execute(sql)
Rs.open sql,conn,1,3
totalrows = 0
if not Rs.eof and not Rs.bof then
do while not rs.eof
TotalRows1 = Rs.Recordcount
Rs.Pagesize =3
TotalPages = Rs.Pagecount
PageNo=1
if Request("PageNo") <> "" then
PageNo=Request("PageNo")
end if
Rs.Absolutepage = PageNo
end if
%>
<%
if not Rs.eof then
RowCount = 1
While NOT Rs.EOF and RowCount <= Rs.Pagesize
%>
<tr valign=top align=center bgcolor=f4f4f4>
<td width="85" class="style1"># <%=rs("topic_id")%></td>
<td width="380" align=left class="style1"><b><a href=bbs_open.asp?id=<%=rs("topic_id")%>><%=rs("title")%></a></b><br>
ผู้ส่ง <%=rs("poster")%>
</td>
<td width="110" class="style1"><%
response.write formatdatetime(rs("date_post"),1)&"<br>"
response.write formatdatetime(rs("date_post"),4)%></td>
<td width="32" class="style1"><%=rs("reads")%></td>
<td width="32" class="style1"><%=ctopic(rs("topic_id"))%></td>
<td width="110" class="style1"><%
if datediff("s",rs("date_reply"),rs("date_post"))=0 then
response.write "<br>"
else
response.write formatdatetime(rs("date_reply"),1)&"<br>"
response.write formatdatetime(rs("date_reply"),4)&"<br>"
if rs("post_reply")<>"" then
response.write "["&rs("post_reply")&"]"
end if
end if
%></td>
</tr>
<%
RowCount = RowCount + 1
rs.movenext
Wend
loop
else
response.write "<tr height=60><td colspan=6 align=center bgcolor=#f4f4f4>ไม่พบข้อความในฐานข้อมูล.</td></tr>"
end if
set rs=nothing
%>
</table>
<br>
<table width="780" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="7">หน้าที่
<%
for P_i = 1 to TotalPages
Response.Write "<a href=""bbs.asp?PageNo="&P_i&""">"
if P_i = (PageNo+1)-1 then
Response.Write "<font size=""1"" color=#FF0099>"
else
Response.Write "<font size=""1"" color=#000000>"
end if
Response.Write "[" & P_i & "]" & "</font></a> "
next
%></td>
</tr>
</table>
</div>
</body>
</html>
<%
function ctopic(x)
ctopic=0
sqlc="select count(reply_id) as topic from bbs where cstr(topic_id)='"&x&"' "
set rsc=Conn.Execute(sqlc)
if not rsc.eof then
ctopic=rsc("topic")-1
end if
set rsc=nothing
end function
%>
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
17 มิ.ย. 2548 11:40:13 |
By :
modx777 |
View :
15755 |
Reply :
9 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ดูแล้วอ่ะ..แต่ขี้เกียจไล่ทีละบรรทัดน่ะ..มันยาวอ่ะ..เอา error มาให้ดูด้วยจิ
|
 |
 |
 |
 |
Date :
17 มิ.ย. 2548 13:14:42 |
By :
นายกระจอก |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มันฟ้องว่า
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/bbs/bbs.asp, line 74
end if
จาก modx777
|
 |
 |
 |
 |
Date :
17 มิ.ย. 2548 13:21:43 |
By :
modx777 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มันฟ้องว่า
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/bbs/bbs.asp, line 74 ------------- แล้วมันตรงไหนล่ะ ชี้ให้ดูหน่อย
end if

|
 |
 |
 |
 |
Date :
17 มิ.ย. 2548 17:08:21 |
By :
oreo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
<%
sql="select * from bbs where "
sql=sql&" topic_id=reply_id "
sql=sql&" order by date_post desc"
set rs=Conn.Execute(sql)
Rs.open sql,conn,1,3
totalrows = 0
if not Rs.eof and not Rs.bof then
do while not rs.eof
TotalRows1 = Rs.Recordcount
Rs.Pagesize =3
TotalPages = Rs.Pagecount
PageNo=1
if Request("PageNo") <> "" then
PageNo=Request("PageNo")
end if
Rs.Absolutepage = PageNo
end if----------------------------------------------error ตรงนี้
%>
|
 |
 |
 |
 |
Date :
18 มิ.ย. 2548 10:27:17 |
By :
modx777 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองเปลียน บรรทัด Rs.open sql,conn,1,3
เป็น Rs.open sql,conn,3,3
ดูครับ
|
 |
 |
 |
 |
Date :
19 ก.ค. 2548 09:22:59 |
By :
redsnowdevil |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมเป็นเหมือนกัน error
คล้ายกับเเบบนี้อะ
เเก้อย่างไรครับ
ดูโค้ดเเล้วมันก้อไม่น่าจะผิด
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/ReportOffDay.asp, line 189
wend
|
 |
 |
 |
 |
Date :
13 ธ.ค. 2550 14:40:40 |
By :
ไข่น้อย |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|