?
Path : /home/admin/domains/happytokorea.com/public_html_bk/promice/include/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/promice/include/indexx.php |
<? include("header.php");?> <style> .item{ border:thin; border-bottom-color:#cccccc; border-bottom-style:double; float:left; margin:0px; padding:1%; width:23%; margin-top:5px; /*margin-bottom:5px;*/ } .itemlast{ float:left; margin:0px; padding:1%; width:23%; margin-top:5px; /*margin-bottom:5px;*/ } .im{ max-height:150px; max-width:170px ; } </style> <input type='hidden' id='current_page' /> <input type='hidden' id='show_per_page' /> <div align="center" style="padding:5px"> <br> <img src="images/nsmmrt.gif" alt="" height="135" width="800" border="0"><br> <br> <? include("manu_catalog.php");?> <table width="99%" border="1" style="border-collapse:collapse" bordercolor="#996633" cellspacing="0" cellpadding="0"> <tr height="40"> <td bgcolor="#cbaf7d" height="40"> <div align="center"> <font size="3" color="white" face="Verdana, Arial, Helvetica, sans-serif">หน้ารวมสินค้าในปัจจุบัน</font></div> </td> </tr> <tr> <td> <? $sql = "select * from product where ''='' "; if(isset($_GET[c_id])){ $sql.=" and p_under = ".$_GET[c_id]; } if(isset($_GET[c_id2])){ $sql.=" and p_under in (select c_id from catalog where c_under = $_GET[c_id2] ) " ; } if(isset($_GET[p_id])){ $sql.=" and p_id = ".$_GET[p_id]; } $res = $db->query($sql); $total = mysql_num_rows($res); $last = ceil($total/4); $i=0; $j=1;?> <div id='content'> <? while($line = mysql_fetch_array($res)){ $i++; $row = ceil($i/4); ?> <div <? if($row==$last){ echo 'class="itemlast"';}else{ echo 'class="item"'; }?>> <div align="left" ><b > <? $sql = "select c_name from catalog where c_id = (select c_under from catalog where c_id =$line[p_under])"; $c = $db->queryUniqueValue($sql); $sql = "select c_name from catalog where c_id = ".$line[p_under]; $subc = $db->queryUniqueValue($sql); echo $c."<br>".$subc; ?> </b></div><br /> <div style=" margin:0px; padding:0px; height:150px; vertical-align:middle" align="center" > <a href='#item<? echo $line[p_id];?>' class='boxy' title='<? echo $line[p_name];?>'><img src="upload/<? echo $line[p_img];?>" border="0" class="im" align="middle" /> </a> </div> <div id='item<? echo $line[p_id];?>' style='display: none; color: white; padding: 15px'><img src="upload/<? echo $line[p_img];?>" border="0" align="middle" /> <div align="left"> <font color="#ff3300" ><? echo nl2br($line[p_data]);?></font> </div> </div> <div align="left"> <? echo $line[p_name];?> <br /> <? $sqlx = "select * from product"; $resf = $db->query($sqlx); $j=0; while($f = mysql_fetch_field($resf)){ if($j>6 && $f->name!="p_unit"){ get_comm($f->name,"product"); //if($com[1]==1){ echo $com." : " .$line[$f->name]."<br>"; //} } $j++; ?> <? }?> <font color="#003399" >ราคา <? echo $line[p_price];?></font><br /> <a href="product.php?p_id=<? echo $line[p_id];?>" style="text-decoration:none">Review</a><br /> <!--<font color="#0000FF" > Add to cart</font>--> </div> </div> <? } ?> </div> </td> </tr> </table> <br /> <div id='page_navigation' align="right" style="margin:5px"></div> </div> <? include("footer.php");?>