แบ่งหน้าWebPage 'มีปัญหาคือ การแบ่งหน้าเว็บเพจแล้วใช้โค้ดของ thaicreate มาประกอบแต่พอกดหน้าลิงค์หน้าต่อๆๆไปมันจะไม่ขึ้นข้อมูลน่ะค่ะ
'มีปัญหาคือ การแบ่งหน้าเว็บเพจแล้วใช้โค้ดของ thaicreate มาประกอบแต่พอกดหน้าลิงค์หน้าต่อๆๆไปมันจะไม่ขึ้นข้อมูลน่ะค่ะ ไงช่วยดูให้หน่อยน่ะค่ Soure Code ด้านล้างค่ะ
<body onload="MM_preloadImages('../images/company-over.gif','../images/products-over.gif','../images/partners-over.gif','../images/services-over.gif','../images/contact-us-over.gif','../images/home_over.gif','../images/scb_over.gif','../images/gues_over.gif')">
<table width="791" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="225"><img src="../images/logo_data.gif" width="224" height="117" /></td>
<td width="566"><table width="200" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="132"><img src="../images/line5_1.gif" width="549" height="1" /></td>
<td width="52" rowspan="5"><img src="../images/line5.gif" width="3" height="117" /></td>
</tr>
<tr>
<td height="57" bgcolor="#AD0607"><a href="../home.asp" target="_parent" onmouseover="MM_swapImage('Image37','','../images/home_over.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../images/home.gif" name="Image37" width="86" height="57" border="0" id="Image37" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image43','','../images/home_over.gif',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image21','','../images/company-over.gif',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image22','','../images/products-over.gif',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image23','','../images/services-over.gif',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image41','','../images/scb_over.gif',1)"><img src="../images/scb.gif" name="Image41" width="72" height="57" border="0" id="Image41" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image20','','../images/partners-over.gif',1)"></a><a href="../GuestBook/default.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image42','','../images/gues_over.gif',1)"><img src="../images/gues.gif" name="Image42" width="128" height="57" border="0" id="Image42" /></a><a href="mailto:[email protected] " onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image44','','../images/contact-us-over.gif',1)"><img src="../images/contact-us.gif" name="Image44" width="131" height="57" border="0" id="Image44" /></a><a href="mailto:[email protected] " onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image24','','../images/contact-us-over.gif',1)"></a></td>
</tr>
<tr>
<td><img src="../images/line3.gif" width="549" height="6" /></td>
</tr>
<tr>
<td height="13"></td>
</tr>
<tr>
<td height="40" bgcolor="#332F2E"><span class="style64"><a href="index.asp"> <span class="style66">>> Main Menu </span></a></span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" valign="top"><table height="418" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="15" height="343" valign="top" background="../images/line1.gif"><img src="../images/line1.gif" width="15" height="480" align="top" /></td>
<td width="757" valign="top" background="lback1.gif"><br />
<%
keyword=Request.Form("keyword")
if keyword="" then
keyword=Request.QueryString("keyword")
end if
%>
<form id="form1" name="form1" method="post" action="edit1.asp">
<div align="left">
<span class="style55">ค้นหาตามโครงการ</span>
<input name="keyword" type="text" id="keyword" value="<%=keyword%>" />
<input type="submit" name="Submit" value="ค้นหา" />
</form>
<p>
<%
if Request.Form("keyword")="" then
Response.write("<br><span class='style50'>กรุณากรอก Keyword เืพื่อทำการค้นหา</span>")
else
pageLen = 2 'กำหนดจำนวนแต่ละหน้าที่ต้องการแสดงกี่ Reccord
pageNo = request.QueryString("pageNo")
if pageNo="" then pageNo = 1
Set Conn=Server.Createobject("ADODB.Connection")
Conn.Open "Problem","",""
sql ="Select * From problem where Project like '%"&Request.Form("keyword")&"%'"
Set Rs =Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,3
Nrecord=RS.recordcount
Rs.pageSize = pageLen
totalPage = Rs.PageCount
Rs.AbsolutePage = pageNo
If Rs.EOF Then
%>
<span class="style50">ไม่มีข้อมูลในตาราง !</span>
<% Else %>
</p>
<table width="707" border="0" align="center">
<tr>
<td colspan="3" class="style50"><div align="center">คุณสามารถเรียกดูและแก้ไขข้อมูลได้<br />
<br />
</div></td>
</tr>
<%
recNo=1
Do While Not RS.EOF and recNo <= pageLen
%>
<tr>
<td width="144" class="style52 style57 style61">วันที่</td>
<td width="203" class="style58"><% =Rs("Date") %> </td>
<td width="346" class="style52"> </td>
</tr>
<tr>
<td colspan="3" class="style53"><table width="100%" border="0">
<tr>
<td width="21%" class="style62">เวลาที่เกิดปัญหา</td>
<td width="16%"><span class="style59">
<% =Rs("Time of problem") %>
</span></td>
<td width="17%" class="style62">เวลาที่แก้ไขสำเร็จ</td>
<td width="46%"><span class="style59">
<% =Rs("Time of edit") %>
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td class="style53"><span class="style63">โครงการ</span></td>
<td colspan="2" class="style58"><% =Rs("Project") %></td>
</tr>
<tr>
<td class="style62">Platform</td>
<td colspan="2" class="style58"><% =Rs("Platform") %>
</td>
</tr>
<tr>
<td class="style53"><span class="style61"><strong>รายละเอียดของปัญหา</strong></span></td>
<td colspan="2" class="style58"><% =Rs("Description") %>
</td>
</tr>
<tr>
<td class="style62">สาเหตุ</td>
<td class="style58"><% =Rs("Case") %>
</td>
<td class="style53"> </td>
</tr>
<tr>
<td class="style62">การแก้ไข</td>
<td class="style58"><% =Rs("Edit") %>
</td>
<td class="style53"> </td>
</tr>
<tr>
<td class="style62">ผู้แก้ไข</td>
<td class="style58"><% =Rs("Writers") %></td>
<td class="style53"><a href="edit2.asp?id=<%=Rs("ID")%>" class="style60">แก้ไขข้อมูล</a></td>
</tr>
<tr>
<td height="4" colspan="3" class="style55"><hr /></td>
</tr>
<%
recNo=recNo+1
Rs.MoveNext
Loop
Rs.Close
Conn.Close
%>
</table>
<div align="right">
<%
end if
%>
<br>
<br>
<span class="style68 style57 style67">จำนวน: <%=Nrecord%> รายการ<br>
ขณะนี้อยู่หน้า <%=pageNo%> ในทั้งหมด <%=totalPage%> หน้า
<%
if cint(pageno) > 1 then %>
<br>
<a href="edit1.asp?pageNo=1&keyword=<%=keyword%>">หน้าแรก</a> <a href="edit1.asp?pageNo=<%=pageNo-1%>&keyword=<%=keyword%>">ย้อนกลับ</a>
<% end if
if cint(pageno) < totalPage then %>
<a href="edit1.asp?pageNo=<%=pageNo+1%>&keyword=<%=keyword%>">หน้าต่อไป</a> <a href="edit1.asp?pageNo=<%=totalPage%>&keyword=<%=keyword%>">หน้าสุดท้าย</a>
<% end if%>
<br>
กระโดดไปหน้า
<%for idx = 1 to totalPage
%>
<a href="edit1.asp?pageNo=<%=idx%>&keyword=<%=keyword%>">
<% if idx=cint(pageno) then%>
<b><%=idx%></b>
<%else %>
<%=idx%>
<%end if%>
</a>
<%
next
end if
%>
</span></div></td>
<td width="10" valign="top" background="../images/line5.gif"> </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table width="200" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="4"><div align="left"><img src="../images/line5.gif" width="3" height="4" /></div></td>
<td height="4"><img src="../images/line4.gif" width="771" height="4" /></td>
<td height="4"><div align="left"><img src="../images/line5.gif" width="3" height="4" /></div></td>
<td></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="103" height="29"><img src="../images/line5.gif" width="3" height="60" /></td>
<td width="671" class="style2"><div align="right">
<table width="474" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><span class="style22">Webmaster : <a href="mailto:[email protected] ">[email protected] </a></span></td>
</tr>
<tr>
<td colspan="3"><span class="style22">This web site is optimized for IE4.0+ browsers using a resolution of at least 800x600 </span></td>
</tr>
<tr>
<td colspan="3" class="style22">Copyright © 2007 <span class="style25">IT Processing Center RT </span>.<strong> All Rights Reserved</strong></td>
</tr>
<tr>
<td width="44"> </td>
<td width="66"> </td>
<td width="78"> </td>
</tr>
</table>
</div></td>
<td width="4"><div align="left"><img src="../images/line5.gif" width="3" height="60" /></div></td>
</tr>
<tr>
<td height="2" colspan="3"><div align="center"><img src="../images/line5_1.gif" width="775" height="1" align="top" /></div></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html> Tag : - - - -
Date :
14 พ.ค. 2550 10:29:56
By :
kik_gabyte
View :
2230
Reply :
0
Load balance : Server 02