ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์Programmingช่วยดูหน่อยว่า code นี้ต้องแบ่งหน้าอย่างไร
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: ช่วยดูหน่อยว่า code นี้ต้องแบ่งหน้าอย่างไร  (อ่าน 410 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
solakadi
Newbie
*

พลังน้ำใจ: 0
ออฟไลน์ ออฟไลน์

กระทู้: 1



ดูรายละเอียด
« เมื่อ: 22 สิงหาคม 2011, 20:01:59 »

<?
error_reporting(0);
session_start();
include("include/filemaster.php");
$reccate = $DB->FETCHARRAY($DB->QUERY("select categoryname from category where categoryid='$categoryid'"));
?>

<HTML>
<HEAD>
<?
include('include/SystemMenuScript.php');
?>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
   color: #663399;
   font-size: 24px;
   font-weight: bold;
}
a:link {
   color: #663366;
}
a:visited {
   color: #666666;
}
a:hover {
   color: #FF0000;
}
a:active {
   color: #FF9900;
}
-->
</style>
</HEAD>
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/menub_02.jpg','images/menub_03.jpg','images/menub_04.jpg','images/menub_05.jpg','images/menub_06.jpg','images/menub_07.jpg','images/l_menub_04.jpg','images/l_menub_06.jpg','images/l_menub_08.jpg','images/l_menub_10.jpg','images/l_menub_12.jpg','images/l_menub_14.jpg')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
   include('include/comtop.php');
   include('include/menu.php');
?>
  <tr>
    <td align="center"><TABLE WIDTH=800 BORDER=0 CELLPADDING=0 CELLSPACING=0>
      <TR>
        <TD><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="17" valign="top" background="images/left_03.jpg"><? include('include/comleft.php');?></td>
              <td width="711" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="center"><p class="title">&nbsp;</p>
                    <p class="title"><? print $reccate[categoryname];?></p></td>
                </tr>
                <tr>
                  <td align="center" valign="top">
                   
                    <table width="100%" border="0" cellspacing="0" cellpadding="5">
                      <?
               $sqlproduct = "select * from product where cateid='$categoryid'";
               $queryproduct = $DB->QUERY($sqlproduct);
               $numrows = $DB->NUMROWS($queryproduct);
               if($numrows>0){
                  $i=0;
                  while($recproduct = $DB->FETCHARRAY($queryproduct)){
                     ++$i;
                     if($i==1 || $newline=='yes'){
                        print "<tr>";
                     }
               ?>
                      <td align="center"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
                        <TR>
                          <TD width="8" colspan="3"><table width="250" border="0" cellspacing="0" cellpadding="5">
                            <tr>
                              <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="2">
                                <tr>
                                  <td width="80" align="center" valign="top"><table border="0" cellpadding="5" cellspacing="0">
                                    <tr>
                                      <td><table border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td align="center">
                                            <?
                                      if($recproduct[smallimage]){
                                         print "<img src='product/".$recproduct[smallimage]."' border='0' width=82 height=100>";
                                      }else{
                                         print "<img src='images/noimage.jpg' border='0' >";
                                      }
                                      ?>                                      </td>
                                        </tr>
                                        </table></td>
                                    </tr>
                                    </table></td>
                                 <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                   <?
                                if($recproduct[name]){
                                ?>
                                   <tr>
                                     <td width="10" class="textp"><img src="images/bullet.jpg" width="8" height="8"></td>
                                    <td class="textp"><strong>Name</strong></td>
                                  </tr>
                                   <tr>
                                     <td class="textp"> </td>
                                    <td class="textb"><? print $recproduct[name];?></td>
                                  </tr>
                                   <?
                                }
                                if($recproduct[model]){
                                ?>
                                   <tr>
                                     <td class="textp"><img src="images/bullet.jpg" width="8" height="8"></td>
                                    <td class="textp"><strong>Model</strong></td>
                                  </tr>
                                   <tr>
                                     <td class="textp"> </td>
                                    <td class="textb"><? print $recproduct[model];?></td>
                                  </tr>
                                   <?
                                }
                                if($recproduct[brand]){
                                ?>
                                   <tr>
                                     <td class="textp"><img src="images/bullet.jpg" width="8" height="8"></td>
                                    <td class="textp"><strong>Brand</strong></td>
                                  </tr>
                                   <tr>
                                     <td class="textp"> </td>
                                    <td class="textb"><? print $recproduct[brand];?></td>
                                  </tr>
                                   <?
                                }
                                ?>
                                   <tr>
                                     <td class="textp"></td>
                                   <!-- <td height="20" align="right" class="textb"><a href="productdetail.php?productid=<? print $recproduct[productid];?>"><img src="images/more.gif" width="66" height="10" border="0"></a></td> -->
                                     </tr>
                                   </table></td>
                               </tr>
                                <tr>
                                  <td colspan="2" align="left" valign="top"><span class="textp"><img src="images/pdf.gif" width="19" height="19" align="absmiddle"><span class="textb">
                                    <!--<? print $recproduct[pagelink];?>-->
                                    <a href="<? print $recproduct[pagelink];?>" target="_blank">Download Catalog </a>
                                    </span></span></td>
                               </tr>
                                </table></td>
                            </tr>
                            </table></TD>
                       </TR>
                       
                        <!--<TR>
                     <TD colspan="3"><hr color="#CC99FF"></TD>
                     </TR>-->
                        </TABLE></td>
                    <?
                   if($i%2==0){
                     //print "</tr>";
                  ?>
                        <!--Add Code--><TR>
                          <TD colspan="3"><hr color="#CC99FF"></TD>
                                         </TR><!--Add Code-->
                      <?
                     $newline = "yes";
                    }else{
                     $newline = "no";
                    }
                  }// end while
                  if($numrows%2==1 && $i+$offset==$numrows){
                     //echo "<td width='50%'>&nbsp;</td></tr>";
                  ?>
                      <!--Add Code--><TR>
                        <TD colspan="3"><hr color="#CC99FF"></TD>
                                         </TR><!--Add Code-->
                      <?
                  }
                }else{
                 ?>
                      <tr>
                        <td><div align="center" class="style1">No Product in Category</div></td>
                    </tr>
                      <?
                }
                 ?>
                      </table>              </td>
                </tr>
                </table></td>
            </tr>
        </table></TD>
        </TR>
    </TABLE></td>
  </tr>
    <?
  include('include/combottom.php');
  ?>
</table>
<!-- ImageReady Slices (Plate-02-product-detail.psd) --><!-- End ImageReady Slices -->
</BODY>
</HTML>
บันทึกการเข้า
หน้า: [1]   ขึ้นบน
พิมพ์