|
|
|
พี่ช่วยดูให้หน่อยครับ ว่าผมจะแทรกโค๊ดซูมภาพตรงไหนคับ แล้วจะต้องแทรกยังไงคับ |
|
|
|
|
|
|
|
Code (PHP)
<?
ob_start();
//============ Start Session และทำการเรียก Function ติดต่อฐานข้อมูล
session_start();
require("connect/connect.php");
require("connect/function.php");
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<title>::: WellCome To Bag :::</title>
<script type="text/javascript" src="jquery/zoomimg/top_up-min.js"></script>
<script type="text/javascript">
TopUp.addPresets({
"#images a": {
fixed: 0,
modal: 0,
}
});
</script>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-image: url(image/backgrund/x1pjzF2-RYhxRWtSbRE9koX_Q5txK39h-1.gif);
}
-->
</style></head>
<body topmargin="0">
<table width="778" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php require_once('head.php'); ?>
</td>
</tr>
<tr>
<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#f2f2f6" bgcolor="#FFFFFF">
<tr>
<td width="23%" valign="top">
<?php require_once('menuleft.php'); ?>
</td>
<td width="54%" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="417" height="24" valign="top"><img src="image/welcom.jpg" width="426" height="24"></td>
</tr>
<tr>
<td height="310" valign="top">
<table width="415" border="0">
<tr>
<td><hr width="96%" color="#f2f2f6"></td>
</tr>
<tr>
<td>
<table width="421" height="22" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
<td width="8"> <img src="image/menu01.jpg" width="8" height="22" alt=""></td>
<td width="389" background="image/menu02.jpg"><div align="center"><strong>หมวดหมู่สินค้า</strong>
</div></td>
<td width="9"> <img src="image/menu03.jpg" width="9" height="22" alt=""></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td width="378">
<?
//============ อ่านข้อมุลหมวด
$sqlCat="select * from category where 1=1 order by CatID asc ";
$queryCat=mysql_query($sqlCat);
echo"<table><tr>";
$i=0;
while($resutCat=mysql_fetch_array($queryCat))
{
$i++;
echo "<td>";
?>
<table width="123" height="96" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="60" valign="top"><div align="center"><a href="product.php?CatID=<?=$resutCat["CatID"];?>"><img src="picture/<?=$resutCat["Picture"];?>" width="60" height="60" border="0" /></a></div></td>
</tr>
<tr>
<td valign="top"><div align="center"> <a href="product.php?CatID=<?=$resutCat["CatID"];?>">
<?=$resutCat["CategoryName"];?>
<strong>
<?="(".num_record("product","where 1 and CatID='".$resutCat["CatID"]."' ").")";?>
</strong> </a></div></td>
</tr>
</table>
<?
//============ แสดงแถวละ 3 ตัว
echo"</td>";
if(($i)%3==0)
{
echo"</tr>";
}
else
{
echo "<td>";
}
}
echo"</tr></table>";
?> </td>
</tr>
</table>
<hr width="96%" color="#f2f2f6">
<br>
<table width="415" border="0">
<tr>
<td> <table width="421" height="22" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
<td width="8"> <img src="image/menu01.jpg" width="8" height="22" alt=""></td>
<td width="389" background="image/menu02.jpg"><div align="center"><strong>สินค้าใหม่</strong>
</div></td>
<td width="9"> <img src="image/menu03.jpg" width="9" height="22" alt=""></td>
</tr>
</table></td>
</tr>
<tr>
<td width="378">
<?
//============ อ่านรายการสินค้าล่าสุด
$sqlNewPro="select * from product where 1=1 and New='Yes' order by ProductID DESC limit 0,6 ";
$queryNewPro=mysql_query($sqlNewPro);
echo"<table align=center><tr>";
$i=0;
while($resutNewPro=mysql_fetch_array($queryNewPro))
{
$i++;
echo "<td>";
?>
<table width="121" height="105" border="0" cellpadding="3" cellspacing="10">
<tr>
<td height="60" valign="top"><div align="center"><a href="detail.php?CatID=<?=$resutNewPro["CatID"];?>&ProductID=<?=$resutNewPro["ProductID"];?>"><img src="picture/<?=$resutNewPro["Picture"];?>" width="140" height="105" border="0"></a></div></td>
</tr>
<tr>
<td valign="top"><div align="center"> <a href="detail.php?CatID=<?=$resutNewPro["CatID"];?>&ProductID=<?=$resutNewPro["ProductID"];?>">
<?=$resutNewPro["ProductName"];?>
</a><br>
ปกติ
<?="(<s>".number_format($resutNewPro["PriceNormal"], 2,'.',',')."</s>";?>
บาท) <br>
<font color="#FF0000"><strong>พิเศษ</strong></font>
<?="(".number_format($resutNewPro["Price"], 2,'.',',');?>
บาท) <br>
ค่าจัดส่ง
<?="(".number_format($resutNewPro["PriceSend"], 2,'.',',');?>
บาท) </div></td>
</tr>
</table>
<?
//============ แสดงแถวละ 2
echo"</td>";
if(($i)%2==0)
{
echo"</tr>";
}
else
{
echo "<td>";
}
}
echo"</tr></table>";
?>
</td>
</tr>
</table>
<hr width="96%" color="#f2f2f6">
</td>
</tr>
</table></td>
<td width="23%" valign="top">
<?php require_once('menuright.php'); ?>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<?php require_once('down.php'); ?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
Tag : PHP, CakePHP
|
|
|
|
|
|
Date :
2013-02-26 12:26:46 |
By :
boat951 |
View :
723 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ใช้พวก Lightbox ครับ
JQuery Lightbox สร้างกล่อง Lightbox แบบง่าย ๆ ด้วย JQuery
|
|
|
|
|
Date :
2013-02-27 06:44:18 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|