?
Path : /home/admin/public_html/old/promice/ |
Current File : /home/admin/public_html/old/promice/ShowProducts.php |
<? include("header.php");?> <div align="center"><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <!-- fwtable fwsrc="Untitled" fwbase="home.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" --> <tr> <td><img src="images/spacer.gif" width="423" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="16" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="225" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="315" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="21" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <tr> <td colspan="5" bgcolor="#FFFFFF"><div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> <td width="190"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><div align="center"> <? echo "$showmember"; ?></div></td> </tr> <tr> <td><img src="images/index_10.jpg" width="241" height="50" alt=""></td> </tr> <tr> <td> <? $page = $_GET['page']; $select_type="select * from productstype order by id asc"; $query_select=mysql_query($select_type); $num_rows=mysql_num_rows($query_select); if($num_rows<1){ echo "<br><br><center><b>ยังไม่มีการเพิ่มข้อมูลค่ะ</b></center>"; }else{ $select="select * from productstype order by id asc"; $q_ry = mysql_query($select); $num_rows=mysql_num_rows($q_ry); $pagesize=20; $rt=$num_rows%$pagesize; if($rt!=0) { $totalpage=floor($num_rows/$pagesize)+1; } else { $totalpage=floor($num_rows/$pagesize); $toppic_id=1; } if(empty($page)) { $page=1; } mysql_free_result($q_ry); $goto=($page-1)*$pagesize; $sql_select_mem="Select * From productstype order by id asc limit $goto,$pagesize"; $fect=mysql_query($sql_select_mem); if(!$fect) { ("ติดต่อฐานข้อมูลไม่ได้".mysql_error()); exit; } $bgcount=0; while($rows=mysql_fetch_array($fect)) { $idx =$rows['id']; $productstypecode =$rows['productstypecode']; $productstypename = $rows['productstypename']; $bgcount=$bgcount+1; $bgmod=$bgcount%2; if($bgmod==0){ $bgcolor="#E9E9E8"; }else{ $bgcolor="#FFFFFF"; } $s_num="select * from products where productstypecode = '$productstypecode'"; $query_select_num=mysql_query($s_num); $snum=mysql_num_rows($query_select_num); ?> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td height="23"> <div align="left"></div> <div align="left"></div> <div align="center"> </div> <div align="left"><img src="images/opened.gif" width="17" height="17"> <? echo "<a href=ProductList.php?PRD=$productstypecode>$productstypename</a> ($snum)"; ?></div></td> </tr> <tr> <td height="5"><img src="images/inline.jpg" width="184" height="3"></td> </tr> </table> <? } } ?> </td> </tr> <tr> <td> </td> </tr> </table></td> <td><table width="94%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><img src="images/web_12.jpg" width="746" height="40"><br> </td> </tr> <tr> <td> <?php $sql_1="select * from products where id = '$_GET[PrdID]'"; $db_query=mysql_db_query($db,$sql_1); $result1=mysql_fetch_array($db_query); $idx =$result1['id']; $productsname =$result1['productsname']; $productsprice =$result1['productsprice']; $productsdetail =$result1['productsdetail']; $productsize =$result1['productsize']; $productcolor =$result1['productcolor']; $productsphoto =$result1['productsphoto']; $productsphoto2 =$result1['productsphoto2']; $productsphoto3 =$result1['productsphoto3']; $productsphoto4 =$result1['productsphoto4']; $productspricedis=$result1['productspricedis']; $date_add =$result1['date_add']; $link =$result1['link']; $pricea=$productsprice-$productspricedis ?> <table width="676" border="0" align="center" cellpadding="1" cellspacing="1"> <form method="post" action="EditProductsSave.php" enctype="multipart/form-data"> <tr bgcolor="#FFFFFF"> <td colspan="2" valign="top"><h2><span class="style6" style="font-weight: bold; color: #CC9900"><? echo "$productsname"; ?></span></h2></td> <td width="597" colspan="2" rowspan="3" align="left" valign="top"><table width="424" border="0" align="center" cellpadding="1" cellspacing="1"> <tr bgcolor="#FFFFFF"> <td width="130"><div align="left" class="style4" style="font-weight: bold; color: #CC9900"><b>รหัสสินค้า</b> :</div></td> <td width="287"><span class="product-Old-Price"><? echo "$idx"; ?> </span></td> </tr> <tr bgcolor="#FFFFFF"> <td width="130"><div align="left" class="style4" style="font-weight: bold; color: #CC9900"><b>ราคา/บาท</b> :</div></td> <td width="287"><span class="product-Old-Price"><? echo "$productsprice"; ?> บาท</span></td> </tr> <tr bgcolor="#FFFFFF"> <td><span class="style9" style="font-weight: bold; color: #CC9900"><b>วันที่เพิ่มสินค้า</b></span></td> <td><span class="style6"><? echo "$date_add"; ?> </span></td> </tr> <tr bgcolor="#FFFFFF"> <td><span class="style9" style="font-weight: bold; color: #CC9900"><b>สถานะสินค้า</b></span></td> <td><span class="style6">สินค้า PreOrder ต้องสั่ง ไม่่มีในสต็อค</span></td> </tr> <tr bgcolor="#FFFFFF"> <td><span class="style9" style="font-weight: bold; color: #CC9900"><b>ลิงค์สินค้า</b></span></td> <td><span class="style6"><a href="$link"><? echo "$link"; ?></a> </span></td> </tr> <tr bgcolor="#FFFFFF"> <td> </td> <td> </td> </tr> <tr bgcolor="#FFFFFF"> <td><div align="left" class="style4" style="font-weight: bold; color: #CC9900"><b>ชื่อสินค้า</b> :</div></td> <td><span class="style6"><? echo "$productsname"; ?></span></td> </tr> <tr bgcolor="#FFFFFF"> <td><div align="left" class="style4" style="font-weight: bold; color: #CC9900"><b>รายละเอียดสินค้า</b> :</div></td> <td><span class="style6"><? echo "$productsdetail"; ?></span></td> </tr> <tr bgcolor="#FFFFFF"> <td><div align="left" class="style4"><? if ($productsphoto2 != "") { echo " <a href=Admin/IMG/$productsphoto2 class=lightbox rel=flowers><img src='Admin/IMG/$productsphoto2' WIDTH=100 BORDER=0></a>"; }else{ echo ""; } ?></td> <td width="35"><? if ($productsphoto3 != "") { echo " <a href=Admin/IMG/$productsphoto3 class=lightbox rel=flowers><img src='Admin/IMG/$productsphoto3' WIDTH=100 BORDER=0></a>"; }else{ echo ""; } ?> </div></td> <td></td> </tr> <tr bgcolor="#FFFFFF"> <td></td> <td><a href=Cart_Add.php?PrdID=<? echo "$_GET[PrdID]"; ?>><img src="images/addcart.png" width="108" height="32" border="0"></a></td> </tr> </table></td> </tr> <tr bgcolor="#FFFFFF"> <td height="99" colspan="2" valign="top"><span class="style6"> <? if ($productsphoto != "") { echo "<a href=Admin/IMG/$productsphoto class=lightbox rel=flowers><img src='Admin/IMG/$productsphoto' WIDTH=200 BORDER=0> </a>"; }else{ echo ""; } ?> </span></td> </tr> <tr bgcolor="#FFFFFF"> <td valign="top"> </td> <td colspan="3"> </td> </tr> </form> </table><fb:like layout='button_count' href='ShowProducts.php?PrdID=<? echo $rspp[id]?>'></fb:like><a name="fb_share"></a> <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"> </script> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <img src="images/web_12.jpg" width="746" height="40"> <table width="100%" border="1" style=" border-collapse:collapse; color:#FFF; font-size:12px;" class="productListing" > <tr > <ul style="list-style:upper-roman; " > <? $sql = "select * from article where ar_p like '%,".$_GET[PrdID]."%' or ar_p like '%".$_GET[PrdID].",%' "; $sql .= "order by ar_id desc limit 3 "; //echo $sql; $res = mysql_query($sql); while($line = mysql_fetch_array($res)){ // $link = explode(",",$line->ar_p); // for($i=0;$i<count($link);$i++){ // echo $link[$i]."dd"; // if('3'==$link[$i]){ ?> <td valign="middle" width="30%" align="center" style="padding:5px"> <? list($width, $height, $type, $attr) = @getimagesize("upload/".$line[ar_img]); ?> <div style=" padding:0" align="center"> <a href="read.php?ar_id=<? echo $line[ar_id];?>"> <img src="upload/<? echo $line[ar_img];?>" <? if($width>$height){?> width="80" <? }else{?> height="80" <? } ?> border="1" style="border-width:5px; border-style:solid; border-color:#FFF" > <br> <strong><? echo $line[ar_title];?></strong></a> </div> </td> <? //} } }?> </ul> </tr> </table> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <div id="fb-root"></div><script src="http://connect.facebook.net/th_TH/all.js#appId=10150823617724689&xfbml=1"></script><fb:comments width="600"></fb:comments> <!--<fb:comments numposts="10" width="800"></fb:comments> <div id="fb-root"></div>--> <script> // window.fbAsyncInit = function() { // //128800803839769 // //157276334307842 // FB.init({appId: '157276334307842', status: true, cookie: true, // xfbml: true}); // }; // (function() { // var e = document.createElement('script'); // e.type = 'text/javascript'; // e.src = document.location.protocol + // '//connect.facebook.net/th_TH/all.js'; // e.async = true; // document.getElementById('fb-root').appendChild(e); // }()); </script> </div> <!-- href กำหนด url ของหน้าที่แสดง num_posts จำนวนที่ต้องการแสดง ต่อหนึ่งหน้า width ความกว้างที่ต้องการ --> <!-- <script src="http://connect.facebook.net/en_US/all.js#appId={YOUR_APPLICATION_ID}&xfbml=1"></script> --> <script src="http://connect.facebook.net/en_US/all.js#appId=134358299911812&xfbml=1"></script></td> </tr> </table> <br></td> </tr> </table></td> </tr> </table> </td> <td><img src="images/spacer.gif" width="1" height="25" border="0" alt=""></td> </tr> <tr> <td colspan="5"> </td> <td><img src="images/spacer.gif" width="1" height="71" border="0" alt=""></td> </tr> </table> </body> </html>