| Server IP : 104.21.37.246 / Your IP : 172.71.28.146 [ 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/shop/control/include/ |
Upload File : |
<?php
$partclass = '../../../';
include("../../control/classmain.php");
include("../shop_config.php");
$date = date("Y-m-d H:i:s");
$today = date('d/m/Y');
$folder ='file_manage/';
$domain ='../../../';
$upload ='../../../redbag/';
$partcontrol = '../../';
$url_menu_main = '../../../';
$id_shop = $shop_id;
$Url_shop='../../';
$urlimg_main = '../../../';
if($_SESSION["simDed_login"] == ''){ $_SESSION["simDed_login"] = 0;}
//$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
//$domain = "http://$_SERVER[HTTP_HOST]";
?>
<?php
$sql_sh = array('table'=>'shop','where'=>"id = '".$id_shop."'");
$view_sh = $view_db->view($sql_sh);
$row_sh = $view_db->q($view_sh);
$list_ss = array('table'=>'setting_shop','where'=>'id_shop = "'.$id_shop.'"');
$view_ss = $view_db->view($list_ss);
$row_ss = $view_db->q($view_ss);
if(!$row_sh['activate'] == 1)
{
?>
<meta http-equiv="refresh" content="0;URL=https://www.simded.com" />
<?php
exit;
}
$txt_phonenumber = $Phone_class->phonecomma($row_sh['phone']);
$sql_cp = array('table'=>'phonenumber','count'=>'COUNT(id) AS countnumber','where'=>"id_shop = '".$id_shop."'");
$view_cp = $view_db->view($sql_cp);
$row_cp = $view_db->q($view_cp);
$countnumber = number_format($row_cp['countnumber']);
$score = $util_class->reviews_score($id_shop);
function imgprofile_shop($img,$size)
{
$upload ='../../../redbag/';
if($img == '')
{
$text = '<img src="../../control/images/b1.jpg" width="'.$size.'" height="'.$size.'" class="ImgProfile">';
}
else
{
$text = '<img src="'.$upload.'file_manage/'. $img.'" width="'.$size.'" height="'.$size.'" style="border-radius:30px;" />';
}
return $text;
}
function imgprofile_shop_m($img,$size)
{
if($img == '')
{
$text = '<img src="../../control/images/b1.jpg" width="'.$size.'" height="'.$size.'" class="ImgProfile">';
}
else
{
$text = '<img src="../../../redbag/file_manage/'. $img.'" width="'.$size.'" height="'.$size.'" style="border-radius:30px;" />';
}
return $text;
}
function page_news($page_number,$total_pages,$url,$get)
{
?>
<nav aria-label="Page navigation">
<ul class="pagination">
<li <?php if($page_number == 0){?>class="active"<?php }?>><a href="<?php echo $url; ?>?page_number=0<?php echo $get; ?>">1</a></li><?php
if($total_pages >= 7)
{
$n = $page_number-1;
if($n < 0){$n = 0;}
?><li><a href="<?php echo $url; ?>?page_number=<?php echo $n ?><?php echo $get; ?>"> << </a></li><?php
}
if($total_pages >= 7)
{
$p_end = $total_pages - 3;
if($page_number > 3 && $page_number >= $p_end)
{
$lop_p = $total_pages-1;
$start_p = $p_end-1;
}else{
if($page_number == 0){
$start_p = 1;
$lop_p = 4;
}
else{
$start_p = $page_number;
$lop_p = $page_number+3;
}
}
}else{ $lop_p = $total_pages - 1; $start_p = 1;}
for($a=$start_p;$a<=$lop_p;++$a)
{
$b = $a + 1 ;
if($a==$page_number)
{
?><li class="active"><a href="<?php echo $url; ?>?page_number=<?php echo $a?><?php echo $get; ?>" ><?php echo $b; ?></a></li><?php
}
else
{
?><li><a href="<?php echo $url; ?>?page_number=<?php echo $a?><?php echo $get; ?>" ><?php echo $b; ?></a></li><?php
}
}
if($total_pages >= 7)
{
$p = $page_number+1;
if($p >= $total_pages){$p = $total_pages;}
?><li><a href="<?php echo $url; ?>?page_number=<?php echo $p ?><?php echo $get; ?>"> >> </a></li><?php
}
if($total_pages > 0)
{
?><li <?php if($page_number == $total_pages){?>class="active"<?php }?>>
<a href="<?php echo $url; ?>?page_number=<?php echo $total_pages ?><?php echo $get; ?>"><?php echo $total_pages+1 ?></a></li><?php
}
?>
</ul>
</nav>
<?php
}
?>
<?php function page_news2($page_number,$total_pages)
{
?>
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group ms-auto" role="group" aria-label="First group">
<button type="button" class="btn btn-warning-sim rounded-pill me-1 <?php if($page_number == 0){?>active-warning-sim<?php }?>"
onclick="window.location.href='<?php echo $url; ?>?page_number=0<?php echo $get; ?>'">1</button>
<?php
if($total_pages >= 7)
{
$n = $page_number-1;
if($n < 0){$n = 0;}
?>
<button type="button" class="btn btn-warning-sim rounded-pill me-1 "
onclick="window.location.href='<?php echo $url; ?>?page_number=<?php echo $n ?><?php echo $get; ?>'"> < </button>
<?php
}
if($total_pages >= 7)
{
$p_end = $total_pages - 3;
if($page_number > 3 && $page_number >= $p_end)
{
$lop_p = $total_pages-1;
$start_p = $p_end-1;
}else{
if($page_number == 0){
$start_p = 1;
$lop_p = 4;
}
else{
$start_p = $page_number;
$lop_p = $page_number+3;
}
}
}else{ $lop_p = $total_pages - 1; $start_p = 1;}
for($a=$start_p;$a<=$lop_p;++$a)
{
$b = $a + 1 ;
if($a==$page_number)
{
?>
<button type="button" class="btn btn-warning-sim rounded-pill me-1 <?php if($page_number == $a){?>active-warning-sim<?php }?>"
onclick="window.location.href='<?php echo $url; ?>?page_number=<?php echo $a?><?php echo $get; ?>'"><?php echo $b; ?></button>
<?php
}else{
?>
<button type="button" class="btn btn-warning-sim rounded-pill me-1 "
onclick="window.location.href='<?php echo $url; ?>?page_number=<?php echo $a?><?php echo $get; ?>'"><?php echo $b; ?></button>
<?php
}
}
if($total_pages >= 7)
{
$p = $page_number+1;
if($p >= $total_pages){$p = $total_pages;}
?>
<button type="button" class="btn btn-warning-sim rounded-pill me-1 "
onclick="window.location.href='<?php echo $url; ?>?page_number=<?php echo $p ?><?php echo $get; ?>'"> > </button>
<?php
}if($total_pages > 0){
?>
<button type="button" class="btn btn-warning-sim rounded-pill me-1 <?php if($page_number == $total_pages){?>active-warning-sim<?php }?>"
onclick="window.location.href='<?php echo $url; ?>?page_number=<?php echo $total_pages ?><?php echo $get; ?>'">
<?php echo $total_pages+1 ?></button>
<?php } ?>
</div>
</div>
<?php
}
?>
<?php
if(!$row_sh['image_cover']=='')
{
$image_cover = $upload.$folder.$row_sh['image_cover'];
}
else
{
$image_cover = $partcontrol.'control/images/bannertop.jpg';
}
if(!$row_sh['image_profile']=='')
{
$image_profile = $upload.$folder.$row_sh['image_profile'];
}
else
{
$image_profile = $partcontrol.'control/images/profile.jpg';
}
?>