<?php require_once"config.inc.php";?> <?php require_once"top.inc.php";?> <?php require_once"function_page.php";?> <div id="maincontainer"> <? require_once"text.top.php";?> <!--Content --> <div id="contentwrapper"> <div id="contentcolumn"> <div class="innertube"><?php require_once"menu_content.php"; ?> <? if($_GET['action']!='id_brand'){?> <img src="images/product.jpg" border="0"/><br /> <ul class="showInColumn_product" border="0"> <? $sql="SELECT * FROM tb_products_detail WHERE id_brand=$_GET[brand_id]"; $q=mysql_query($sql)or die (mysql_error()); while($rec=mysql_fetch_assoc($q)){ ?> <li style="margin:1px; padding:2px;"> <span><a href="<?=$_SERVER['PHP_SELF']?>?action=id_brand&ids=<?=$rec['id']?>"><img src="uploads/products_detail/<?=$rec["images"];?>"/></a> <div style="float:left;"><a href="download/<?=$rec["download_file"];?>"><img src="images/ic_pdf.gif" /></a></div> <div style="text-align:right;"><a href="<?=$_SERVER['PHP_SELF']?>?action=id_brand&ids=<?=$rec['id']?>"><?=$rec["title"];?></a></div></span> </li> <? }//while ?> </ul> <!--showInColumn_product --> <? }//if ?> <? if($_GET['action']=='id_brand'){?> <ul class="showInColumn_product" border="0"> <img src="images/product.jpg" border="0"/><br /> <? //$sql="SELECT * FROM `tb_products_detail` WHERE `id_brand`='".$_GET['id_brand']."' AND `id`='".$_GET['ids']."'"; $sql="SELECT * FROM `tb_products_detail` WHERE `id_brand`='".$_GET['ids']."' "; $q=mysql_query($sql)or die (mysql_error()); while($rec=mysql_fetch_assoc($q)){ ?> <li style="margin:1px; padding:2px;"> <span><a href="<?=$_SERVER['PHP_SELF']?>?action=id_brand&ids=<?=$rec['id']?>"><img src="uploads/products_detail/<?=$rec["images"];?>"/></a> <div style="float:left;"><a href="download/<?=$rec["download_file"];?>"><img src="images/ic_pdf.gif" /></a></div> <div style="text-align:right;"><a href="<?=$_SERVER['PHP_SELF']?>?action=id_brand&ids=<?=$rec['id']?>"><?=$rec["title"];?></a></div></span> <? }//while //echo $sql; ?> </ul><!--showInColumn_product --> <img src="images/switch_plug.jpg" /> <ul class="showInColumn_product_detail"> <li style="background:#99FF00; text-align:center; "><span>Product Code</span></li> <li style="background:#99FF00; text-align:center; width:250px;"><span>Description</span></li> <li style="background:#99FF00; text-align:center; width:150px;"><span>Brand</span></li> <li style="background:#99FF00; text-align:center; width:50px;"><span>Price</span></li> <li style="background:#99FF00; text-align:center; width:95px;"><span>Discount</span></li> <? //$sql_detail="SELECT * FROM `tb_products_details` WHERE `id_brand`='".$_GET['brand_id']."' AND `id`='".$_GET['ids']."'"; //gen page $page=(isset($_GET['page']))? intval($_GET['page']) : 1; $limit_end=25; $limit_start=($page-1)*$limit_end; $send =""; if(isset($_GET["brand_id"]) and $_GET["brand_id"] !="") { $send = "brand_id=".$_GET["brand_id"]; $condition= "WHERE `id_brand`= '".$_GET["ids"] ."'"; //$ands="AND `id`='".$_GET['ids']."'"; } $sqlcommand="SELECT * FROM `tb_products_details`".$condition."ORDER BY id DESC"; $result =mysql_query($sqlcommand." LIMIT ".$limit_start.",".$limit_end,$conn); $count = mysql_num_rows($result); $total = mysql_num_rows(mysql_query($sqlcommand,$conn)); if($total > 0) { while($recs=mysql_fetch_assoc($result)){ ?> <li><span><?=$recs['product_code']?></span></li> <li style="width:250px;"><span><?=$recs['description']?></span></li> <li style="width:150px; text-align:center;"><span><?=$recs['brand']?></span></li> <li style="width:50px;"><span><?=$recs['price']?></span></li> <li style="width:95px;"><span><?=$recs['discount']?></span></li> <? }//while //echo $sqlcommand; ?> <div style="float:left;"><span>Page : <?=page_navi($page, $limit_end, 4, $total, $send)?></span></div> <div style="float:right; width:100px; margin-right:25px;"><span>[ <?=($limit_start+1)?>-<?=($limit_start+$count)?> ] of <strong> <?=$total?> </strong> items</span></div> <? }//if ?> <? }//if ?> </ul> <!--showInColumn_product_detail --> </div> </div> </div> <!--Left --> <? require_once"leftmenu.php";?> <!--footer --> <? require_once"footer.php";?> </div><!--maincontainer --> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง