|
|
|
ช่วยแก้ไขหน่อยครับ ไม่รุ้ผิดพลาดตรงไหน (มือใหม่) ผมพยายามใส่การนับหน้า เข้าไปครับ |
|
|
|
|
|
|
|
ผมพยายามใส่การนับหน้า เข้าไปครับ แต่มันไม่สำเร็จ ถ้าถอด code นับหน้าเข้าไป ก็ ใช้งานได้ปกติ เลยอยากให้ กุรุ ช่วยดูให้หน่อยครับ
Code (ASP)
<!--#Include File="2connect.asp"-->
<%
Dim MinPageNum,MaxPageNum,AbsPage
thmonth=array("ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.")
gid=Request.QueryString("QID")
Response.Cookies("Q"&gid) = "yes"
Response.Cookies("Q"&gid).Expires = date+365
Set Conn=Server.CreateObject("ADODB.Connection")
conn.open MM_connect
sql1="Select * from Question where QID="&gid
sql2="Select * from Answer where QID="&gid&" order by ADate"
Set rs = conn.Execute(sql1)
%>
<HTML>
<HEAD>
<link rel="stylesheet" href="control.css" type="text/css">
<title><%=rs("QTopic")%></title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-874">
</HEAD>
<BODY onLoad="startStatusScroller();" BGCOLOR=#202B41 text="#DEE2E9" link="#FFFFFF" vlink="#CCCCCC" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (v1.2.psd) -->
<table id="Table_01" width="760" height="601" border="0" cellpadding="0" cellspacing="0" ALIGN="CENTER">
<tr>
<td colspan="10" background="images/header.gif" WIDTH=760 HEIGHT=109 ALT=""><p> </p><p> </p><p align=center>User Online : <b></b> </TD>
</TR>
<TR>
<TD COLSPAN=14 background="images/under_header.jpg" WIDTH=760 HEIGHT=25 ALT=""><!--#include file="header.asp"--></TD>
</TR>
<tr>
<td rowspan="11">
<img src="images/left_side.jpg" width="27" height="435" alt=""></td>
<td colspan="3">
<img src="images/menubox1_header.jpg" width="207" height="26" alt=""></td>
<td colspan="5">
<img src="images/mainbox_header.jpg" width="496" height="26" alt=""></td>
<td rowspan="11">
<img src="images/right_bar.jpg" width="30" height="435" alt=""></td>
</tr>
<TR>
<TD height="103" background="images/menubox1_left.jpg"> </TD>
<TD background="images/menubox1_main.jpg" valign="top" class="artist"> <a href="artistchord.asp?rid=1">ก</a> <a href="artistchord.asp?rid=2">ข</a> <a href="artistchord.asp?rid=3">ค</a> <a href="artistchord.asp?rid=4">ง</a> <a href="artistchord.asp?rid=5">จ</a> <a href="artistchord.asp?rid=6">ฉ</a> <a href="artistchord.asp?rid=7">ช</a> <a href="artistchord.asp?rid=8">ซ</a> <a href="artistchord.asp?rid=">ฌ</a> <a href="artistchord.asp?rid=9">ญ</a><br> <a href="artistchord.asp?rid=10">ฐ</a> <a href="artistchord.asp?rid=">ฑ</a> <a href="artistchord.asp?rid=">ฒ</a> <a href="artistchord.asp?rid=11">ณ</a> <a href="artistchord.asp?rid=12">ด</a> <a href="artistchord.asp?rid=13">ต</a> <a href="artistchord.asp?rid=14">ถ</a> <a href="artistchord.asp?rid=15">ท</a> <a href="artistchord.asp?rid=16">ธ</a> <a href="artistchord.asp?rid=17">น</a><br> <a href="artistchord.asp?rid=18">บ</a> <a href="artistchord.asp?rid=19">ป</a> <a href="artistchord.asp?rid=20">ผ</a> <a href="artistchord.asp?rid=21">ฝ</a> <a href="artistchord.asp?rid=22">พ</a> <a href="artistchord.asp?rid=23">ฟ</a> <a href="artistchord.asp?rid=24">ภ</a> <a href="artistchord.asp?rid=25">ม</a> <a href="artistchord.asp?rid=26">ย</a> <a href="artistchord.asp?rid=27">ร</a><br> <a href="artistchord.asp?rid=28">ล</a> <a href="artistchord.asp?rid=29">ฤ</a> <a href="artistchord.asp?rid=30">ว</a> <a href="artistchord.asp?rid=31">ศ</a> <a href="artistchord.asp?rid=32">ษ</a> <a href="artistchord.asp?rid=33">ส</a> <a href="artistchord.asp?rid=34">ห</a> <a href="artistchord.asp?rid=">ฬ</a> <a href="artistchord.asp?rid=35">อ</a> <a href="artistchord.asp?rid=36">ฮ</a></TD>
<TD background="images/menubox1_right.jpg"> </TD>
<TD ROWSPAN=5 background="images/mainbox_left.jpg"> </TD>
<TD COLSPAN=3 ROWSPAN=5 background="images/mainbox_main.jpg" valign=top>
<table width="468" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="99bbff"><a href="chords/addchord.asp?Qid=<%=rs("QID")%>" target="_blank"><font color=Black size=2><b>Add Chord (เพิ่มคอร์ดเพลงให้ <b><%=rs("QTopic")%></b> )Click ที่นี่</a></font><br></td>
</tr>
<tr>
<td>
<table width="100%" cellpadding="8">
<tr>
<td width="160" bgcolor="99bbff" valign="top"><font color="000000">SONG</td>
<td width="30" bgcolor="99bbff" valign="top"><font color="000000">COMMENTS</td>
<td width="70" bgcolor="99bbff" valign="top" ><font color="000000">CHORD BY</td>
</tr>
</table>
</td>
</tr>
</table>
<%
Set rs = conn.Execute(sql2)
CurPage=0
Rs.PageSize=10
if Request.QueryString("QID")="" Then
Rs.AbsolutePage=1
Else
Rs.AbsolutePage=Request.QueryString("QID")
End If
AbsPage=Rs.AbsolutePage
Do While Not rs.EOF And RecCount < Rs.PageSize
a_count=1
%>
<table width="468" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="463" cellpadding="2" border="0" onMouseOver=this.style.backgroundColor='#eeeeee';return true; onMouseOut=this.style.backgroundColor='';return true;>
<tr>
<td width=220 bgcolor="ffffff" valign="top"> <font color="000000"><%=rs("AName")%> <a href='readcomment.asp?ID=<%=rs("ID")%>' target='_blank'><font size='-3' color='red'>#comments</a></font></td>
<td width=90 bgcolor="ffffff" valign="top" class='event'>
<%
If request.Cookies("MemberID") <> "" Then
%>
<a href="javascript:popUp('confirm.asp?ATID=<%=rs("ANumber")%>&get=<%=rs("NameFile")%>&user=<%=Request.Cookies("username")%>')"><font color="000000">VIP Members</a></font></center><%Else %>
<A TITLE="<%=RS("Aname")%>" HREF="javascript:popUp('filesdown/download.php?get=<%=rs("NameFile")%>&pname=<%=rs("PName")%>')"><font color="000000"><%=rs("Atabfile")%>
<% End If %></td>
<td width=85 bgcolor="ffffff" valign="top" class='event'> <a href="readcomment.asp?ID=<%=rs("ID")%>" target="_blank"><font color="black"><%=rs("Anote")%></td>
</tr>
</table>
</td>
</tr>
</table>
<%
a_count = a_count+1
rs.movenext
loop
Rs.AbsolutePage=AbsPage
Response.Write "<center>"
if Rs.AbsolutePage<>1 Then
Response.Write "<a href=read.asp?page=" & 1 & "&catid=" & catid & "><<Last</a> "
Response.Write "<a href=read.asp?page=" & Rs.AbsolutePage-1 & "&catid=" & catid & "><Prev</a> "
End If
MinPageNum=Rs.AbsolutePage-2
if MinPageNum<1 Then MinPageNum=1
MaxPageNum=MinPageNum+4
if MaxPageNum>Rs.PageCount then MaxPageNum=Rs.PageCount
For i=MinPageNum to MaxPageNum
if Rs.AbsolutePage=i Then
Response.Write i & " "
Else
Response.Write "<a href=read.asp?page=" & i & "&catid=" & catid & ">" & i & "</a> "
End if
Next
if Rs.AbsolutePage<>Rs.PageCount Then
Response.Write "<a href=read.asp?page=" & Rs.AbsolutePage+1 & "&catid=" & catid & "> Next></a> "
Response.Write "<a href=read.asp?page=" & Rs.PageCount & "&catid=" & catid & "> Last>></a> "
End IF
Response.Write "</center>"
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
<center>
<br>
</center>
</TD>
<!--#include file="footer.asp"-->
<!--#include file="counter.asp"-->
Tag : - - - -
|
|
|
|
|
|
Date :
2010-01-06 00:53:20 |
By :
Guezt |
View :
1026 |
Reply :
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
มันมี error อะไรบอกมั่งอ่ะครับ ที่ว่าไม่สำเร็จนี้ ที่หน้า browser มันบอกอะไรมั่ง
|
|
|
|
|
Date :
2010-01-06 11:24:24 |
By :
salapao_codeman |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ไม่มีเลยครับ แต่กลายเป็นหน้า ขาวโพล้น หมดเลย
|
|
|
|
|
Date :
2010-01-06 20:04:43 |
By :
Guezt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tag เปิด ปิด ไม่ครบหรือเปล่า เห็น table ไม่ครบ
|
|
|
|
|
Date :
2010-01-07 11:47:19 |
By :
Noppon_ch |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
...
Table l่วนที่เหลือ อยุ่ footer ครับ
|
|
|
|
|
Date :
2010-01-07 14:21:59 |
By :
Guezt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|