| Server IP : 172.67.216.113 / Your IP : 172.71.28.145 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/cp648411/www/simded.com/themes/ |
Upload File : |
<style media="screen">
.box-s2{
width: 200px;
height: 200px;
background-color: #fff;
}
@media (max-width:414px)
{
.box-s2 {
width: 170px;
height: 170px;
}
}
@media (max-width:400px)
{
.box-s2 {
width: 170px;
height: 170px;
}
}
@media (max-width:380px)
{
.box-s2 {
width: 130px;
height: 130px;
}
}
@media (max-width:360px)
{
.box-s2 {
width: 130px;
height: 130px;
}
}
@media (max-width:320px)
{
.box-s2 {
width: 130px;
height: 130px;
}
}
@media (max-width:280px)
{
.box-s2{
width: 180px;
}
}
.slick-next2:before, .slick-prev2:before{font-size: 30px;color: #000;}
</style>
<!-- /.article -->
<div class="" id="ar">
<div class="container py-3">
<div class="row text-spacing-md fw-bold">
<div class="col-md-12 justify-content-between d-flex align-items-baseline" style="margin-bottom:5px;">
<p class="HeadTextL mb-0 fw-bold"> บทความ </p>
<a href="../article/" class="text-decoration-none text-danger-sim">เพิ่มเติม</a>
</div>
</div>
<?php
$sql_s = 'shop.id = phonenumber.id_shop AND shop.status = 1 AND shop.status_op = 1 AND shop.activate = 1 AND phonenumber.status = "1" ';
$max_rows = 8; // แสดงจำนวนแถวต่อหน้า
$page_number = 0;
if(isset($_GET['page_number']))
{
$page_number = $_GET['page_number'];
}
$all_array = array('table'=>'phonenumber,shop','where'=>$sql_s);
$start_row = $page_number * $max_rows;
$all_sql = $view_db->view($all_array);
$all_result = $view_db->q_re($all_sql);
$total_rows = $view_db->q_nr($all_result);
$total_rows_num = mysql_num_rows($all_result);
$total_pages = ceil($total_rows/$max_rows)-1;
////////////////////////////////////////
$list = array('table'=>'phonenumber,shop','where'=>$sql_s, 'limit'=> "$start_row,$max_rows",'order'=> "ORDER BY phonenumber.id DESC");
$view = $view_db->view($list);
$result = $view_db->q_re($view);
$num_tr = 1;
$num = 1+($page_number*$max_rows);
?>
<div class="row justify-content-center">
<div class="col-12 main2">
<!--
<div class="slider slider-for">
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
<div><h3>5</h3></div>
</div>
-->
<div class="slider centerarticle align-center text-center" style="min-height: 250px;">
<?php
$list_ar = array('table'=>'article','where'=>'status = 1','order'=> "ORDER BY id DESC");
$view_ar = $view_db->view($list_ar);
$result_ar = $view_db->q_re($view_ar);
while($row_ar = $view_db->q_ro($result_ar)){
$list_ar = array('table'=>'shop','where'=>'id = "'.$row_ar['id_shop'].'"');
$view_ar = $view_db->view($list_ar);
$row_sh = $view_db->q($view_ar);
$img = imgprofile_shop($row_sh['image_profile'],'100');
$img2 = $row_sh['image_profile'];
?>
<div class="text-center">
<div class="BoxRecom rounded-sim2 box-s2" role="button" tabindex="0" onclick="window.location.href='../article/detail.php?id=<?php echo $row_ar['id'];?>'"
style="text-align: center;
background-image: url(../redbag/file_manage/<?php echo $img2; ?>);
background-repeat: no-repeat;background-position: center;
background-size: cover;">
</div>
<a href="../article/detail.php?id=<?php echo $row_ar['id'];?>" class="text-decoration-none pe-3 text-dark fs-6 text-spacing-md fw-bold"
style="display: table;">
<?php echo $util_class->sub_str_2($row_ar['title'],80);?>
</a>
</div>
<?php } ?>
</div>
<!--
<img src="../redbag/article/<?php echo $row_at['image'];?>" width="100%" height="100%"
class="img-responsive rounded-3 px-1" >
<div class="action">
<a href="#" data-slide="3">go to slide 3</a>
<a href="#" data-slide="4">go to slide 4</a>
<a href="#" data-slide="5">go to slide 5</a>
</div>
-->
</div>
</div>
</div>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.9/slick.min.js"></script>
<script>
$('.centerarticle').slick({
centerMode: false,
centerPadding: '1px',
slidesToShow: 6,
dots: true,
focusOnSelect: true,
responsive: [
{
breakpoint: 1400,
settings: {
arrows: true,
centerMode: false,
dots: false,
centerPadding: '20px',
slidesToShow: 6
}
},
{
breakpoint: 1300,
settings: {
arrows: true,
centerMode: false,
dots: false,
centerPadding: '5px',
slidesToShow: 5
}
},
{
breakpoint: 1100,
settings: {
arrows: true,
centerMode: false,
dots: false,
centerPadding: '25px',
slidesToShow: 2
}
},
{
breakpoint: 992,
settings: {
arrows: true,
centerMode: false,
dots: false,
centerPadding: '0px',
slidesToShow: 3
}
},
{
breakpoint: 940,
settings: {
arrows: true,
centerMode: true,
dots: false,
centerPadding: '30px',
slidesToShow: 3
}
},
{
breakpoint: 768,
settings: {
arrows: false,
centerMode: true,
dots: false,
centerPadding: '0px',
slidesToShow: 2
}
},
{
breakpoint: 576,
settings: {
arrows: true,
centerMode: true,
dots: false,
centerPadding: '20px',
slidesToShow: 1,
}
},
{
breakpoint: 480,
settings: {
arrows: true,
centerMode: true,
dots: false,
centerPadding: '40px',
slidesToShow: 1,
}
},
{
breakpoint: 460,
settings: {
arrows: true,
centerMode: true,
dots: false,
centerPadding: '30px',
slidesToShow: 1,
}
},
{
breakpoint: 420,
settings: {
arrows: false,
centerMode: true,
dots: false,
centerPadding: '1px',
slidesToShow: 2,
}
},
{
breakpoint: 400,
settings: {
arrows: false,
centerMode: true,
dots: false,
centerPadding: '1px',
slidesToShow: 2,
}
},
{
breakpoint: 380,
settings: {
arrows: false,
centerMode: true,
dots: false,
centerPadding: '20px',
slidesToShow: 2,
}
},
{
breakpoint: 330,
settings: {
arrows: false,
centerMode: true,
dots: false,
centerPadding: '2px',
slidesToShow: 2,
}
}
]
});
$('a[data-slide]').click(function(e) {
e.preventDefault();
var slideno = $(this).data('slide');
$('.slider-nav').slick('slickGoTo', slideno - 1);
});
</script>