0byt3m1n1-V2
Path:
/
home
/
xncercjb
/
domains
/
quickspace.co.th
/
public_html
/
productandservice
/
[
Home
]
File: detail-product.php
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php include("../admin/include/connect.php"); include("../include/function.php"); $main_id = $_GET['main_id']; $main_id = mysql_real_escape_stringx( $_GET['main_id'] ); //php5 $cate = mysql_real_escape_stringx( $_GET['cate']?$_GET['cate']:0 ); $subcate = mysql_real_escape_stringx( $_GET['subcate']?$_GET['subcate']:0); $sql_even = "SELECT *, if(data_sort=0,9999999999,data_sort) AS order2 FROM tb_products WHERE data_status = '1' AND data_id='$main_id' "; $sql_even .= " ORDER BY order2 ASC , data_id DESC "; $result_even = mysql_queryx($sql_even); if($r= mysql_fetch_arrayx($result_even)){ $data_id=sprintf("%d",$r['data_id']); $data_code=$r['data_code']; $data_main_cate=$r['data_main_cate']; $data_name=$r[$table['data_name']]; $data_title=$r[$table['data_title']]; $data_detail=$r[$table['data_detail']]; $data_model=$r[$table['data_model']]; $data_pdf=$r[$table['data_pdf']]; $data_vdo=$r[$table['data_vdo']]; $data_pdf2 =$r[$txt['data_pdf2']]; $data_pdf3 =$r[$txt['data_pdf3']]; $data_status2=$r['data_status2']; $data_date=$r['data_date']; $data_main_brand=$r['data_main_brand']; //$data_main_brand=explode(",",$data_main_brand); $data_sub_brand=$r['data_sub_brand']; //$data_sub_brand=explode(",",$data_sub_brand); $data_url=$r['data_url']; } echo '<title>'.$data_name.'</title>'; include("../include/title.inc.php"); ?> <link href="../css/bootstrap.css" rel="stylesheet" crossorigin="anonymous"> <link href="../css/all.min.css" rel="stylesheet"> <link href="../css/jquery.fancybox.min.css" rel="stylesheet"> <link href="../css/animate.min.css" rel="stylesheet"> <link href="../css/owl.carousel.min.css" rel="stylesheet"> <link href="../css/style.css" rel="stylesheet" crossorigin="anonymous"> <link href="../css/style-sm.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <?php $current_page= 2 ; include("../include/nav.inc.php"); ?> <div class="all-container"> <div class="content-pageother"> <div class="container"> <div class="title-otherpage"> <h1><?=$txt['menu-2']?> </h1> <p> quickspace </p> </div> <div class="subtitle-otherpage"><h1><?=$data_name?></h1></div> <div class="row mt-5"> <div class="col-12 col-md-6"> <div class="slide-product"> <ul class="nav nav-pills " id="pills-tabproduct" role="tablist"> <li role="presentation"> <a class="active" id="pills-product-tab1" data-toggle="pill" href="#pills-product1" role="tab" aria-controls="pills-product1" aria-selected="true"> <?=$text['text_show4']?> </a> </li> <li role="presentation"> <a id="pills-product-tab2" data-toggle="pill" href="#pills-product2" role="tab" aria-controls="pills-product2" aria-selected="false"> <?=$text['text_show5']?> </a> </li> </ul> <div class="tab-content" id="pills-tabproduct"> <div class="tab-pane fade show active" id="pills-product1" role="tabpanel" aria-labelledby="pills-product-tab1"> <div id="big" class="owl-carousel owl-theme"> <?php $sql_img="SELECT *, IF(imag_sort=0,99999,imag_sort) AS order2 FROM tb_products_images WHERE imag_mainID='$main_id' AND imag_type ='0' ORDER BY order2 ASC "; $result_i=mysql_queryx($sql_img); $allimg = mysql_num_rowsx($result_i); while($r_i=mysql_fetch_arrayx($result_i)){ $imag_id=$r_i['imag_id']; $imag_file=$r_i['imag_file']; $imag_name=$r_i[$txt['data_imagname']]; if(!empty($imag_file)){ $imag_large ="$server_file/$productfolder/large/$imag_file"; }else{ $imag_large ="../images/nopic.png"; } echo '<div class="item"><a href="'.$imag_large.'" data-fancybox="gallery" data-caption="'.$imag_name.'" ><img src="'.$imag_large.'"></a></div>'; } ?> <!-- <div class="item"><a href="images/s3x3_01_03.jpg" data-fancybox="images"><img src="images/s3x3_01_03.jpg"></a></div> <div class="item"><a href="images/s3x3_02_03.jpg" data-fancybox="images"><img src="images/s3x3_02_03.jpg"></a></div> <div class="item"><a href="images/s3x3_03_03.jpg" data-fancybox="images"><img src="images/s3x3_03_03.jpg"></a></div> <div class="item"><a href="images/s3x3_01_03.jpg" data-fancybox="images"><img src="images/s3x3_01_03.jpg"></a></div>--> </div> <?php if($allimg > 1){ ?> <div id="thumbs" class="owl-carousel owl-theme"> <?php $result_ismall=mysql_queryx($sql_img); while($r_is=mysql_fetch_arrayx($result_ismall)){ $imags_id=$r_is['imag_id']; $imags_file=$r_is['imag_file']; $imags_name=$r_is[$txt['data_imagname']]; if(!empty($imags_file)){ $imag_small ="$server_file/$productfolder/large/$imags_file"; }else{ $imag_small ="../images/nopic.png"; } echo '<div class="item"><img src="'.$imag_small.'"></div>'; } ?> </div><!--thumbs--> <?php } ?> <!--<div id="thumbs" class="owl-carousel owl-theme"> <div class="item"><img src="images/s3x3_01_03.jpg"></div> <div class="item"><img src="images/s3x3_02_03.jpg"></div> <div class="item"><img src="images/s3x3_03_03.jpg"></div> <div class="item"><img src="images/s3x3_01_03.jpg"></div> </div>--> </div> <div class="tab-pane fade" id="pills-product2" role="tabpanel" aria-labelledby="pills-product-tab2"> <div id="big2" class="owl-carousel owl-theme"> <?php $sql_img2="SELECT *, IF(imag_sort=0,99999,imag_sort) AS order2 FROM tb_products_images WHERE imag_mainID='$main_id' AND imag_type ='1' ORDER BY order2 ASC "; $result_i2=mysql_queryx($sql_img2); $allimg2 = mysql_num_rowsx($result_i2); while($ri2=mysql_fetch_arrayx($result_i2)){ $imag2_id=$ri2['imag_id']; $imag2_file=$ri2['imag_file']; $imag2_name=$ri2[$txt['data_imagname']]; if(!empty($imag2_file)){ $imag2_large ="$server_file/$productfolder/large/$imag2_file"; }else{ $imag2_large ="../images/nopic.png"; } echo '<div class="item"><a href="'.$imag2_large.'" data-fancybox="gallery" data-caption="'.$imag2_name.'" ><img src="'.$imag2_large.'"></a></div>'; } ?> <!--<div class="item"><a href="images/inside_s3x3_05.jpg" data-fancybox="images"><img src="images/inside_s3x3_05.jpg"></a></div>--> </div> <?php if($allimg2 > 1){ ?> <div id="thumbs2" class="owl-carousel owl-theme"> <?php $result_ismall2=mysql_queryx($sql_img2); while($ris2=mysql_fetch_arrayx($result_ismall2)){ $imags2_id=$ris2['imag_id']; $imags2_file=$ris2['imag_file']; $imags2_name=$ris2[$txt['data_imagname']]; if(!empty($imags2_file)){ $imag2_small ="$server_file/$productfolder/large/$imags2_file"; }else{ $imag2_small ="../images/nopic.png"; } echo '<div class="item"><img src="'.$imag2_small.'"></div>'; } ?> </div><!--thumbs--> <?php } ?> <!-- <div id="thumbs" class="owl-carousel owl-theme"> <div class="item"><img src="images/inside_s3x3_05.jpg"></div> </div>--> </div> </div> </div> <div class="color-product"> <table> <?php if($data_main_brand!=""){ $category=explode(",",$data_main_brand); $count_cate=count($category); for($x=0;$x<$count_cate;$x++){ if(!empty($category[$x])){ $sql="SELECT * FROM tb_product_brand WHERE bran_id=".$category[$x]; $result_cate=mysql_queryx($sql); $r_cate=mysql_fetch_arrayx($result_cate); $bran_name = $r_cate[$table['bran_name']]; echo '<tr> <td><h1>'.$bran_name.' </h1></td><td><ul>'; if($data_sub_brand!=""){ $category2=explode(",",$data_sub_brand); $count_sub=count($category2); for($y=0;$y<$count_sub;$y++){ if(!empty($category2[$y])){ $sql2="SELECT *, IF(bran_sort=0,99999,bran_sort) AS order2 FROM tb_product_brand WHERE bran_main ='".$category[$x]."' AND bran_id=".$category2[$y]." ORDER BY order2 ASC "; $result2_cate=mysql_queryx($sql2); $r2_cate=mysql_fetch_arrayx($result2_cate); $bran2_name = $r2_cate[$table['bran_name']]; $bran2_images = $r2_cate['bran_images']; if(!empty($bran2_images)){ $imagBran ="$server_file/brand/large/$bran2_images"; echo '<li> <img src="'.$imagBran.'" title="'.$bran2_name.'"> <p><i class="fas fa-caret-left"></i>'.$bran2_name.'</p> </li>'; } } } } echo '</ul></td></tr>'; } } } ?> <!-- <tr> <td><h1> สีเฟรม </h1></td> <td> <ul> <li> <img src="images/color-1.png"> <p><i class="fas fa-caret-left"></i> สีขาว </p> </li> <li> <img src="images/color-2.png"> <p><i class="fas fa-caret-left"></i> สีโกโก้ </p> </li> <li> <img src="images/color-3.png"> <p><i class="fas fa-caret-left"></i> สีเขียวยูโร </p></li> <li> <img src="images/color-4.png"> <p><i class="fas fa-caret-left"></i> สีน้ำตาล </p> </li> <li> <img src="images/color-5.png"> <p><i class="fas fa-caret-left"></i> สีดำ </p> </li> </ul> </td> </tr> <tr> <td><h1> สีผนัง </h1></td> <td> <ul> <li> <img src="images/color-6.png"> <p><i class="fas fa-caret-left"></i> สีขาว </p> </li> <li> <img src="images/color-7.png"> <p><i class="fas fa-caret-left"></i> สีโกโก้ </p> </li> <li> <img src="images/color-8.png"> <p><i class="fas fa-caret-left"></i> สีงาช้าง </p> </li> <li> <img src="images/color-9.png"> <p><i class="fas fa-caret-left"></i> สีเขียวไพร </p> </li> <li> <img src="images/color-10.png"> <p><i class="fas fa-caret-left"></i> สีส้ม </p> </li> <li> <img src="images/color-11.png"> <p><i class="fas fa-caret-left"></i> สีฟ้า </p> </li> <li> <img src="images/color-12.png"> <p><i class="fas fa-caret-left"></i> สีเขียวยูโร </p> </li> </ul> </td> </tr> <tr> <td><h1> สีPVC<br>ลายไม้ </h1></td> <td> <ul> <li> <img src="images/color-13.png"> <p><i class="fas fa-caret-left"></i> Maple </p> </li> <li><img src="images/color-14.png"> <p><i class="fas fa-caret-left"></i> Holland Oak </p> </li> <li><img src="images/color-15.png"> <p><i class="fas fa-caret-left"></i> Golden Beach </p> </li> <li><img src="images/color-16.png"> <p><i class="fas fa-caret-left"></i> Red Cherry </p> </li> </ul> </td> </tr> <tr> <td><h1> สีกระเบื้องยาง </h1></td> <td> <ul> <li><img src="images/color-17.png"> <p><i class="fas fa-caret-left"></i> BERBER BEIGE D-85 </p> </li> <li><img src="images/color-18.png"> <p><i class="fas fa-caret-left"></i> BROWN D-35 </p> </li> <li><img src="images/color-19.png"> <p><i class="fas fa-caret-left"></i> GREY D-17 </p> </li> <li><img src="images/color-20.png"> <p><i class="fas fa-caret-left"></i> MISTY GREY D-64 </p> </li> <li><img src="images/color-21.png"> <p><i class="fas fa-caret-left"></i> PACIFIC BLUE D-36 </p> </li> </ul> </td> </tr> --> </table> </div> </div> <div class="col-12 col-md-6"> <div class="detail-composit detail-product"> <?=$data_detail?> <?php if(!empty($data_pdf)){ ?> <div class="download-btn"><a href="<?=$server_web?>/album/products/pdf/<?=$data_pdf?>" target="_blank">PDF Download</a></div> <?php } ?> </div> </div> </div><!--row--> <div class="quickspace-otherproduct wow fadeInDown" data-wow-delay="0.2s"> <h1><?=$text['text_show3']?></h1> <div class="owl-carousel owl-product"> <?php $sql4="SELECT *, if(data_sort=0,99999,data_sort) AS sort FROM tb_products WHERE data_status ='1' AND data_status2 ='0' "; $sql4.=" AND FIND_IN_SET(1,data_main_cate) ORDER BY RAND() LIMIT 6"; $result4=mysql_queryx($sql4); while($result4 && $r4=mysql_fetch_arrayx($result4)){ $data4_id=sprintf("%d",$r4['data_id']); $data4_name =strip_tags($r4[$table['data_name']]); $data4_title =$r4[$table['data_title']]; $data4_status2 =$r4['data_status2']; //$dataname_link =word_name_link($data5_name); $link_Item = "$server_web/productandservice/detail-product.php?main_id=$data4_id"; $sql_img="SELECT *, IF(imag_sort=0,99999,imag_sort) AS order2 FROM tb_products_images WHERE imag_mainID='$data4_id' ORDER BY order2 ASC LIMIT 1"; $result_i=mysql_queryx($sql_img); $r_i=mysql_fetch_arrayx($result_i); $imag_file=$r_i['imag_file']; if(!empty($imag_file)){ $imag ="$server_file/products/small/$imag_file"; }else{ $imag ="$server_web/images/nopic.png"; } ?> <div class="items"> <div class="product-box"> <a href="<?=$link_Item?>"> <img src="<?=$imag?>"> <p><?=$data4_name?></p> </a> </div> </div> <?php } ?> <?php /*?> <div class="items"> <div class="product-box"> <a href="detail-product.php"> <img src="images/ic-2.png"> <p> รุ่นมาตรฐาน<br> 3 x 3 เมตร </p> </a> </div> </div> <div class="items"> <div class="product-box"> <a href="detail-product.php"> <img src="images/ic-3.png"> <p> รุ่นมาตรฐาน<br> 3 x 6 เมตร </p> </a> </div> </div> <div class="items"> <div class="product-box"> <a href="detail-product.php"> <img src="images/ic-4.png"> <p> รุ่นรีสอร์ท </p> </a> </div> </div> <div class="items"> <div class="product-box"> <a href="detail-product.php"> <img src="images/ic-5.png"> <p> รุ่นมาตรฐาน<br> 3 x 9 เมตร </p> </a> </div> </div><?php */?> </div> </div> </div> </div> <?php include("../include/footer.inc.php"); ?> </div><!--all-container--> <script src="../js/popper.js"></script> <script src="../js/jquery-3.3.1.min.js"></script> <script src="../js/bootstrap.min.js"></script> <script src="../js/script.js"></script> <script src="../js/all.min.js"></script> <script src="../js/scrollreveal.min.js" type="text/javascript"></script> <script src="../js/jquery.fancybox.min.js"></script> <script src="../js/wow.min.js"></script> <script src="../js/owl.carousel.min.js"></script> <script> $(document).ready(function() { //activate wow.js new WOW().init(); $('.owl-product').owlCarousel({ autoplay:false, autoplayHoverPause:true, autoplayTimeout:7000, smartSpeed:1000, loop:true, margin:10, nav:true, navText:["<div class='nav-btn prev-slide'></div>","<div class='nav-btn next-slide'></div>"], dots:false, responsive:{ 0:{ items:1 }, 600:{ items:3 }, 1000:{ items:3 } } }); $('[data-fancybox="images"]').fancybox({ baseClass: 'myFancyBox', thumbs: { autoStart: true //axis: 'x' } }) $(document).ready(function() { var bigimage = $("#big"); var thumbs = $("#thumbs"); var syncedSecondary = true; bigimage.owlCarousel({ items: 1, autoplay:false, slideSpeed: 2000, nav: false, dots: false, loop: true, responsiveRefreshRate: 200, navText: ['<i class="fa fa-arrow-left" aria-hidden="true"></i>','<i class="fa fa-arrow-right" aria-hidden="true"></i>'] }) .on("changed.owl.carousel", syncPosition); thumbs.on("initialized.owl.carousel", function() { thumbs.find(".owl-item").eq(0).addClass("current"); }) .owlCarousel({ items: 3, dots: true, nav: true, navText: ['<span class="fas fa-chevron-left fa-2x"></span>','<span class="fas fa-chevron-right fa-2x"></span>'], smartSpeed: 200, slideSpeed: 500, slideBy: 3, margin:10, responsiveRefreshRate: 100 }).on("changed.owl.carousel", syncPosition2); function syncPosition(el) { var count = el.item.count - 1; var current = Math.round(el.item.index - el.item.count / 2 - 0.5); if (current < 0) {current = count;} if (current > count) {current = 0; } thumbs.find(".owl-item").removeClass("current").eq(current).addClass("current"); var onscreen = thumbs.find(".owl-item.active").length - 1; var start = thumbs.find(".owl-item.active").first().index(); var end = thumbs.find(".owl-item.active").last().index(); if(current > end) { thumbs.data("owl.carousel").to(current, 100, true); } if(current < start) { thumbs.data("owl.carousel").to(current - onscreen, 100, true); } } function syncPosition2(el) { if (syncedSecondary) { var number = el.item.index; bigimage.data("owl.carousel").to(number, 100, true); } } thumbs.on("click", ".owl-item", function(e) { e.preventDefault(); var number = $(this).index(); bigimage.data("owl.carousel").to(number, 300, true); }); }); }); $(document).ready(function() { var bigimage = $("#big2"); var thumbs = $("#thumbs2"); var syncedSecondary = true; bigimage.owlCarousel({ items: 1, autoplay:false, slideSpeed: 2000, nav: false, dots: false, loop: true, responsiveRefreshRate: 200, navText: ['<i class="fa fa-arrow-left" aria-hidden="true"></i>','<i class="fa fa-arrow-right" aria-hidden="true"></i>'] }) .on("changed.owl.carousel", syncPosition); thumbs.on("initialized.owl.carousel", function() { thumbs.find(".owl-item").eq(0).addClass("current"); }) .owlCarousel({ items: 3, dots: true, nav: true, navText: ['<span class="fas fa-chevron-left fa-2x"></span>','<span class="fas fa-chevron-right fa-2x"></span>'], smartSpeed: 200, slideSpeed: 500, slideBy: 3, margin:10, responsiveRefreshRate: 100 }).on("changed.owl.carousel", syncPosition2); function syncPosition(el) { var count = el.item.count - 1; var current = Math.round(el.item.index - el.item.count / 2 - 0.5); if (current < 0) {current = count;} if (current > count) {current = 0; } thumbs.find(".owl-item").removeClass("current").eq(current).addClass("current"); var onscreen = thumbs.find(".owl-item.active").length - 1; var start = thumbs.find(".owl-item.active").first().index(); var end = thumbs.find(".owl-item.active").last().index(); if(current > end) { thumbs.data("owl.carousel").to(current, 100, true); } if(current < start) { thumbs.data("owl.carousel").to(current - onscreen, 100, true); } } function syncPosition2(el) { if (syncedSecondary) { var number = el.item.index; bigimage.data("owl.carousel").to(number, 100, true); } } thumbs.on("click", ".owl-item", function(e) { e.preventDefault(); var number = $(this).index(); bigimage.data("owl.carousel").to(number, 300, true); }); }); </script> </body> </html>
©
2018.