| Server IP : 172.67.216.113 / Your IP : 104.23.243.33 [ 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 : /home2/cp648411/public_html/simded.com/shop/control/themes/ |
Upload File : |
<?php
$sql_s = 'id_shop = "'.$id_shop.'"';
$list = array('table'=>'phonenumber','where'=>$sql_s, 'limit'=> "6",'order'=> "ORDER BY RAND()");
$view = $view_db->view($list);
$result = $view_db->q_re($view);
$num_tr = 1;
$num = 1+($page_number*$max_rows);
?>
<div class="row">
<div class="col-md-12" style="margin-bottom:20px;margin-top:20px;">
<div style="margin-top:30px;">
<div class="row">
<div class="col-md-6" style="margin-bottom:5px;">
<p class="HeadTextL"> เบอร์อื่นๆภายในร้าน</p>
</div>
</div>
<div class="row">
<?php
while($row = $view_db->q_ro($result))
{
$phonenumber = $Phone_class->format_phonenumber($row['phonenumber'],$row['format']);
$row_mobilenetwork = $actiondata_db->q_one('mobilenetwork','id = "'.$row['mobilenetwork'].'"','image');
$row_totalnumber = $actiondata_db->q_one('totalnumber','number = "'.$row['total'].'"','title');
if($row_totalnumber==2){$row_totalnumber = '';}
$list_shr = array('table'=>'shop','where'=>'id = "'.$row['id_shop'].'" ');
$view_shr = $view_db->view($list_shr);
$row_shr = $view_db->q($view_shr);
$countber = $util_class->countber($row_shr['id']);
$txt_phonenumber = $Phone_class->phonecomma($row_shr['phone']);
if($row_shr['image_profile']){ $image_profile = $row_shr['image_profile']; }
else { $image_profile = ''; }
$phonenumber = $Phone_class->format_phonenumber($row['phonenumber'],$row['format']);
$price = $row['price']-1;
?>
<!--
<div class="col-md-6">
<div class="BoxRecom">
<div class="row BoxRecom-div">
<div class="col-xs-9 col-md-8"><a href="../cart/?p=<?php echo $row['phonenumber'];?>">
<span class="BerDedToday-ber"><?php echo $phonenumber; ?></span></a></div>
<div class="col-xs-3 col-md-4" style="text-align:center;">
<img src="<?php echo $upload ?>mobilenetwork/<?php echo $row_mobilenetwork ?>" width="80" class="img-responsive"></div>
<div class="col-xs-12 BerDedToday-sum"> ผลรวม <?php echo $row['total']?> <?php echo $row_totalnumber;?> </div>
<div class="col-xs-12 BerDedToday-price"> ราคา <?php echo number_format($row['price'])?> บาท </div>
<div class="col-xs-12 col-md-6 ber_mtop">
<a href="../cart/index.php?p=<?php echo $row['phonenumber'] ;?>" class="btn btn-danger btn-sale" style="font-weight:bold;">สั่งซื้อเบอร์</a></div>
<div class="col-xs-12 col-md-6 ber_mtop ber_con">
ติดต่อ: <?php echo $txt_phonenumber ;?>
</div>
<div class="col-xs-8 ber_foot">
<div class="row">
<div class="col-xs-3 ber_img" align="left"><a href="<?php echo $Url_shop.$row_shr['codeshop']?>"><?php echo imgprofile_shop($image_profile,'34'); ?></a></div>
<div class="col-xs-9 ber_nameS" align="left">
<?php
$urlshop = $util_class->ck_expired_shop($row_shr['id']);
?>
<div class="ber_nameS2"><a href="<?php echo $urlshop;?>" style="color:#333"><?php echo $row_shr['nameShop'];?></a> </div>
</div>
</div>
</div>
<div class="col-xs-4 ber_fav" align="right">
<span id="hidefavorite"></span>
เบอร์โปรด
<img src="<?php echo $partcontrol; ?>control/images/icon_Ulike.png" width="24" height="24" onclick="like(<?php echo $_SESSION["simDed_login"];?>,<?php echo $row['id'] ;?>)" style="cursor:pointer">
</div>
</div>
</div>
</div>
-->
<div class="col-12 col-md-4">
<div class="BoxRecom rounded-sim2 box-s">
<div class="pt-3 d-flex justify-content-center" align="center" style="cursor:pointer"
onclick="like(<?php echo $_SESSION["simDed_login"];?>,<?php echo $row['id'] ;?>)">
<span id="hidefavorite"></span>
<i class="fa fa-heart" style="font-size:24px;color:gray; "></i>
<span class="text-danger-sim ps-2" tabindex="-1" aria-disabled="true">เบอร์โปรด</span>
</div>
<div class="" align="center">
<span class="BerDedToday-ber fs-2" role="button" tabindex="0"><?php echo $phonenumber; ?></span>
</div>
<div class="px-0"><div class="borber-bottom-sim "></div></div>
<div class="row align-items-center">
<?php $css_size=''; if(strlen($row_totalnumber)>= 60){$css_size = 'font-size: 13px;';} ?>
<div class="col-8 ps-4 text-start">
<div class="col-xs-12 BerDedToday-sum fw-bold text-success-sim" role="button" tabindex="0"> ผลรวม <?php echo $row['total']?> </div>
<div class="col-xs-12 BerDedToday-price fw-bold text-primary-sim" style="<?php echo $css_size; ?>"> <?php echo $row_totalnumber;?> </div>
</div>
<div class="col-4">
<img src="<?php echo $upload ?>mobilenetwork/<?php echo $row_mobilenetwork ?>" width="auto" class="img-fluid" role="button" tabindex="0">
</div>
</div>
<div class="px-0"><div class="borber-bottom-sim "></div></div>
<div class="" align="center">
<div class="col-12 fw-bold fs-3 " role="button" tabindex="0"> ราคา <?php echo number_format($row['price'])?> บาท </div>
</div>
<div class="row justify-content-center">
<div class="col-12 col-md-8 col-xxl-6 mb-3">
<!--
<a href="../cart/index.php?p=<?php echo $row['phonenumber'] ;?>"
class="btn btn-danger-sim fs-5 fw-bold rounded-sim w-100 box-sim1 lh-sim">สั่งซื้อเบอร์</a>
-->
<button type="button" name="button" class="btn btn-danger-sim fs-5 fw-bold rounded-sim w-100 box-sim1 lh-sim"
onclick="cart('<?php echo $row['id'] ;?>')">สั่งซื้อเบอร์</button>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<script>
function cart(var1)
{
swal(
'สั่งซื้อสินค้า!',
'เพิ่มสินค้าในตะกร้าเรียบร้อยแล้วค่ะ',
'success'
)
$.ajax({
url: "../../control/include/ajax_cart.php", // Url to which the request is send
type: "POST", // Type of request to be send, called as method
data: 'id='+var1,
cache: false, // To unable request pages to be cached
processData:false, // To send DOMDocument or non processed data file it is set to false
success: function(data) // A function to be called if request succeeds
{
//testHoldon_cl('sk-circle');
var some = screen.width;
if(some<789){
$("#alert_cart2").html(data);
}else{
$("#alert_cart").html(data);
}
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById('alert_cart_ok').focus();
$('.dropdown-toggle').dropdown('update');
if(some<789){
document.getElementById('alert_cart_ok2').innerHTML = this.responseText;
}else{
document.getElementById('alert_cart_ok').innerHTML = this.responseText;
}
}
};
xmlhttp.open("GET", "../../control/include/ajax_cartlist.php", true);
xmlhttp.send();
}
});
}
function cart2(var1)
{
swal(
'สั่งซื้อสินค้า!',
'เพิ่มสินค้าในตะกร้าเรียบร้อยแล้วค่ะ',
'success'
)
$.ajax({
url: "../../control/include/ajax_cart.php", // Url to which the request is send
type: "POST", // Type of request to be send, called as method
data: 'id='+var1,
cache: false, // To unable request pages to be cached
processData:false, // To send DOMDocument or non processed data file it is set to false
success: function(data) // A function to be called if request succeeds
{
//testHoldon_cl('sk-circle');
$("#alert_cart2").html(data);
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById('alert_cart_ok2').innerHTML = this.responseText;
$('#alert_cart_ok2').dropdown('toggle');
document.getElementById('alert_cart_ok').innerHTML = this.responseText;
$('#alert_cart_ok').dropdown('toggle');
}
};
xmlhttp.open("GET", "../../control/include/ajax_cartlist.php", true);
xmlhttp.send();
}
});
}
</script>