?
Path : /home/admin/public_html/old/happyezystyle/ |
Current File : /home/admin/public_html/old/happyezystyle/Products.php |
<? include("header.php");?> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <link href="css/instyle.css" rel="stylesheet" type="text/css"> <link href="css/style1.css" rel="stylesheet" type="text/css"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <script src="css/jquery-latest.pack.js" type="text/javascript"></script> <script src="css/jquery.lightbox.js" type="text/javascript"></script> <script> $(document).ready(function(){ $(".lightbox").lightbox(); }); </script> <LINK href="css/contentslider2.css" type=text/css rel=stylesheet> <STYLE type=text/css>BODY { MARGIN-TOP: 0px; MARGIN-LEFT: 0px } </STYLE> <SCRIPT src="js/contentslider.js" type=text/javascript> </SCRIPT> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <style> .jc{ position:relative; } </style> <script language="JavaScript1.2"> var ns6=document.getElementById&&!document.all var ie=document.all var customcollect=new Array() var i=0 function jiggleit(num){ if ((!document.all&&!document.getElementById)) return; customcollect[num].style.left=(parseInt(customcollect[num].style.left)==-1)? customcollect[num].style.left=1 : customcollect[num].style.left=-1 } function init(){ if (ie){ while (eval("document.all.jiggle"+i)!=null){ customcollect[i]= eval("document.all.jiggle"+i) i++ } } else if (ns6){ while (document.getElementById("jiggle"+i)!=null){ customcollect[i]= document.getElementById("jiggle"+i) i++ } } if (customcollect.length==1) setInterval("jiggleit(0)",80) else if (customcollect.length>1) for (y=0;y<customcollect.length;y++){ var tempvariable='setInterval("jiggleit('+y+')",'+'100)' eval(tempvariable) } } window.onload=init </script> <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="205"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><div align="center"> <? echo "$showmember"; ?></div></td> </tr> <tr> <td><img src="images/web_07.jpg" width="200" height="42" 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><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><img src="images/hr1.jpg" width="197" height="23"></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><img src="images/arrow.gif" width="7" height="8"> <a href="ReviewProducts.php">สินค้าโปรโมชั่น</a> <img src="images/gif_new.gif" width="26" height="12"> </td> </tr> <tr> <td><img src="images/arrow.gif" width="7" height="8"> ค้นหาสินค้าที่ต้องการ </td> </tr> <tr> <td><script language="JavaScript"> function checksearch() { var s1 = document.webFormSearch.txtsearch.value; if( s1.length ==0) { alert("กรุณาใส่คำที่ค้นหาด้วยค่ะ"); document.webFormSearch.txtsearch.focus(); return false; } else return true; } </script> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <form method="post" action="Search.php" name="webFormSearch" onSubmit="return checksearch()"> <tr> <td width="87%"><div align="right"> <input name="txtsearch" type="text" class="inputxx" id="txtsearch11" onClick="this.value='';" value="ค้นหาสินค้า" maxlength="15" /> </div></td> <td width="13%"><input name="image" type=image src="images/icon_search.jpg" width="23" height="23" scr=images/icon_search.jpg></td> </tr> <tr> <td><div align="right"> <input name="typesearch" type="radio" value="productscode" checked> รหัสสินค้า <input type="radio" name="typesearch" value="productsname"> ชื่อสินค้า </div></td> <td> </td> </tr> </form> </table></td> </tr> <tr> <td><img src="images/arrow.gif" width="7" height="8"> <a href="ConfirmPayment.php">แจ้งการชำระเงินได้ที่นี่</a></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> <td width="792"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><img src="images/web_12.jpg" width="791" height="40"></td> </tr> <tr> <td><div align="center"> <table width="100%" border="0"> <? $sql="select * from products order by id desc limit 99"; $check=1; $result=mysql_db_query($db,$sql); while ($rs=mysql_fetch_array($result)) { if ($check%3 ==1){ echo "<TR>"; } ?> <td height="20" align="center" valign="middle" > <? if ($rs[productsphoto]==""){ echo " <img src='Admin/IMG/no_pic.jpg' WIDTH=150 HEIGHT=150 BORDER=0>"; }else { $products_name = substr($rs[productsname],0,20); if ($rs[status] == "") { $statusnow = "พร้อมให้เช่า"; }else if ($rs[status] == "00000"){ $statusnow = "จองแล้ว <a href=QProducts.php?PrdID=$rs[productscode]>สอบถาม!</a>"; }else if ($rs[status] == "11111"){ $statusnow = "เช่าไปแล้ว! <a href=QProducts.php?PrdID=$rs[productscode]>สอบถาม!</a>"; } echo "<span style='color: #812D61; font-size: 9pt; font-weight: bold'><a href=ShowProducts.php?PrdID=$rs[id] >$rs[productsname]</a> </span> <div style='height:20px; padding:5px;' align='center'> <fb:like layout='button_count' href='ShowProducts.php?PrdID=<? echo $rspp[id]?>'></fb:like> </div> <a href=ShowProducts.php?PrdID=$rs[id] target=_blank><img src='Admin/IMG/$rs[productsphoto]' HEIGHT=150 BORDER=0></a><br><img src=images/zoom.gif> <a href=Admin/IMG/$rs[productsphoto] class=lightbox rel=flowers>คลิกเพื่อขยาย</a> <br>$products_name..<br>ราคา : $rs[productsprice] บาท <br><a href=Cart_Add.php?PrdID=$rs[id]><img src=images/addcart.png width=108 height=32 border=0></a>"; } ?> </td> <? if ($check % 3== 0) { echo "</TR>"; $check=0; } $check++; } ?> </table> </div></td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table> </div></td> <td><img src="images/spacer.gif" width="1" height="25" border="0" alt=""></td> </tr> </table> <? include("footer.php");?> </body> </html>