| 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 : /home2/cp648411/public_html/simded.com/themes/ |
Upload File : |
<div id="sidebar" align="center" class="mt-md-5">
<div id="carousel-banner" class="carousel slide pt-md-1" data-bs-ride="carousel">
<div class="carousel-indicators">
<?php
$list_bn = array('table'=>'banner','where'=>'status = "1" AND postion = "1" ','order'=> "ORDER BY id DESC LIMIT 0,10");
$view_bn = $view_db->view($list_bn);
$result_bn = $view_db->q_re($view_bn);
$bn_num_rows = mysql_num_rows($result_bn);
$bn_num_rows = $bn_num_rows - 1;
for($i=0;$i<=$bn_num_rows;$i++){
?>
<button type="button" data-bs-target="#carousel-banner" data-bs-slide-to="<?php echo $i ?>" class="<?php echo ($i==0)?'active':''; ?>" <?php echo ($i==0)?'aria-current="true"':''; ?> aria-label="Slide <?php echo $i ?>"></button>
<?php } ?>
</div>
<div class="carousel-inner">
<?php
$numBN=1;
while($row_bn = $view_db->q_ro($result_bn)){
?>
<div class="carousel-item <?php echo ($numBN == 1)?'active':''; ?>">
<?php if(!$row_bn['url'] == ''){?><a href="<?php echo $row_bn['url']?>" target="_blank"><?php }?>
<img src="<?php echo $path_banner_thumb; ?><?php echo $row_bn['image']?>" class="d-block w-100" width="308" height="309" alt="...">
<?php if(!$row_bn['url'] == ''){?></a><?php }?>
</div>
<?php $numBN++; } ?>
</div>
<?php if($numBN > 2){ ?>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel-banner" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="false"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel-banner" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="false"></span>
<span class="visually-hidden">Next</span>
</button>
<?php } ?>
</div>
</div>