| Server IP : 104.21.37.246 / Your IP : 104.23.243.32 [ 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/S0061/shop_main/member/ |
Upload File : |
<?php include('../include/header.php');?>
<?php
if($_SESSION["simDed_type"] == 'member')
{
$sql_s = 'mem_id = "'.$_SESSION["simDed_id"].'"';
}
$max_rows = 10; // แสดงจำนวนแถวต่อหน้า
$page_number = 0;
if(isset($_GET['page_number']))
{
$page_number = $_GET['page_number'];
}
$all_array = array('table'=>'favorites','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'=>'favorites','where'=>$sql_s, 'limit'=> "$start_row,$max_rows",'order'=> "ORDER BY id DESC");
$view = $view_db->view($list);
$result = $view_db->q_re($view);
$num_tr = 1;
$num = 1+($page_number*$max_rows);
?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div style="margin-top:55px;">
<div class="row">
<div class="col-md-6" style="margin-bottom:5px;">
<p class="HeadTextL">เบอร์โปรด</p>
</div>
<div class="col-md-6" align="right">
<button type="button" onclick="favoriteDelete()" class="btn btn-danger">ลบทั้งหมด</button>
</div>
</div>
<div class="row">
<form id="fmfavorite" name="fmfavorite">
<div class="table-responsive">
<table width="100%" border="1" class="table TbBar" >
<thead>
<tr>
<th width="2%"><input type="checkbox" name="" value="" id="checkAll" class="checkall"></th>
<th>เบอร์ / ราคา / ผลรวม </th>
<th width="25%">ผู้ขาย</th>
<th width="15%">คำอธิบาย</th>
<th width="10%">ส่วนลด</th>
<th width="10%">เครือข่าย</th>
</tr>
</thead>
<tbody>
<?php
if($total_rows_num == 0){
?>
<tr>
<td colspan="6" class="DataNot" align="center">ไม่พบข้อมูล</td>
</tr>
<?php
}
?>
<?php
while($row = $view_db->q_ro($result))
{
$list_p = array('table'=>'phonenumber','where'=>'id = "'.$row['phonenumber_id'].'"');
$view_p = $view_db->view($list_p);
$row_p = $view_db->q($view_p);
$list_s = array('table'=>'shop','where'=>'id = "'.$row_p['id_shop'].'"');
$view_s = $view_db->view($list_s);
$row_s = $view_db->q($view_s);
$phonenumber = $Phone_class->format_phonenumber($row_p['phonenumber'],$row_p['format']);
$txt_phonenumber = $Phone_class->phonecomma($row_p['phonenumber']);
?>
<tr>
<td><input type="checkbox" name="chk[]" id="chk" class="child" value="<?php echo $row['id'];?>" ></td>
<td align="center"><?php echo $phonenumber; ?>
<div style="font-size:12px;color:#F00"><?php echo number_format($row_p['price'])?>
<span style="color:#093">[<?php echo $row_p['total']?>]</span></div>
</td>
<td>
<div class="row">
<div class="col-xs-2" style="text-align:left;padding-top:5px;" align="left">
<?php echo imgprofile_shop($image_profile,'34'); ?>
</div>
<div class="col-xs-10" align="left">
<div style="font-size:18px;"><a href="<?php echo $Url_shop.$row_s['codeshop']?>" style="color:#333"><?php echo $row_s['nameShop'];?></a> </div>
<div>สั่งซื้อเบอร์ติดต่อ<?php echo $txt_phonenumber ;?> </div>
</div>
</div>
</td>
<td>ไม่มี</td>
<td><?php echo $util_class->sub_str($row_p['detail'],'90');?></td>
<td align="center">
<?php
$sql_nw = array('table'=>'mobilenetwork','where'=>"id = '".$row_p['mobilenetwork']."'");
$view_nw = $view_db->view($sql_nw);
$row_nw = $view_db->q($view_nw);
?>
<img src="<?php echo $upload ?>mobilenetwork/<?php echo $row_nw['image']; ?>" width="38" height="19"></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-md-12 BerDedToday-page">
<?php
if($total_rows_num > 0)
{
page_news($page_number,$total_pages,'index.php','');
}
?>
</div>
</div>
</div>
</div>
</div>
</div><!--/row-->
</div><!--/.container-->
<?php include('../include/footer.php');?>