Mini Shell
<?php
require_once("config.php");
$GLOBALS['conn']=$conn;
function testofooter(){
$conn=$GLOBALS['conn'];
?>
<style>
.learn-more-btn a{
line-height: 12px !important;
padding:3px !important;
background-color: #273d56;
}
@media screen and (max-width: 768px){
.testimonial-cls p{
margin-top: 15px;
}
.tst-img{
max-height: 300px;
}
}
</style>
<section class="slide-bac">
<div class="container">
<div class="row">
<div class="col-sm-6"><div class="">
<!--Start News-->
<!--<h5>NEWS</h5>-->
<h4>NEWS</h4>
<div id="tcb-testimonial-carousel" class="carousel slide" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="carousel-inner">
<?php $newsdata=$conn->prepare("select * from news");
$newsdata->execute();$newsres=$newsdata->fetchall();$i=1;
foreach($newsres as $newsrow){?>
<div class="item <?php if($i==1){echo"active";}?>">
<div class="row">
<div class="col-xs-12">
<figure class="clearfix" onClick="window.location='news-details.php?newsid=<?php echo $newsrow['news_id'];?>'">
<div class="col-md-3 col-sm-2 col-xs-12 no-padd">
<img class="img-responsive media-object" src="admin/img/news/<?php echo $newsrow['news_img'];?>">
</div>
<div class="col-md-9 col-sm-10 col-xs-12">
<figcaption class="caption">
<h5><?php echo $newsrow['news_title'];?></h5>
<?php
$desc1 = preg_replace('/[U+FFFD]/u', "", $newsrow['news_desc']);
$desc = substr($desc1,0,150)."...";
?>
<p><?php echo $desc; ?></p>
<p class="learn-more-btn"><?php echo date('d M Y',strtotime($newsrow['news_date']));?> <a href="news-details.php?newsid=<?php echo $newsrow['news_id'];?>" class="btn btn-black btn-default btn-xs">Learn More</a></p>
</figcaption>
</div>
</figure>
</div>
</div>
</div>
<?php $i++;}?>
</div>
</div>
<hr>
</div><!--Close News-->
<div class=""><!--Start Blog-->
<!--<h5>BLOG</h5>-->
<h4>BLOG</h4>
<div id="tcb-testimonial-carousel" class="carousel slide" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="carousel-inner">
<?php $blogdata=$conn->prepare("select * from blogs");
$blogdata->execute();$blogres=$blogdata->fetchall();$i=1;
foreach($blogres as $blogrow){?>
<div class="item <?php if($i==1){echo"active";}?>">
<div class="row">
<div class="col-xs-12">
<figure class="clearfix" onClick="window.location='blog-details.php?blogid=<?php echo $blogrow['blog_id'];?>'">
<div class="col-md-3 col-sm-2 col-xs-12 no-padd"><img class="img-responsive media-object" src="admin/img/blogs/<?php echo $blogrow['blog_img'];?>"> </div>
<div class="col-md-9 col-sm-10 col-xs-12">
<figcaption class="caption">
<h5><?php echo $blogrow['blog_title'];?></h5>
<p><?php echo substr($blogrow['blog_desc'],0,150)."...";?></p>
<p class="learn-more-btn"><?php echo date('d M Y',strtotime($blogrow['blog_date']));?> <a href="blog-details.php?blogid=<?php echo $blogrow['blog_id'];?>" class="btn btn-black btn-default btn-xs">Learn More</a></p>
</figcaption>
</div>
</figure>
</div>
</div>
</div>
<?php $i++;}?>
</div>
</div><!--Close Blog-->
</div>
<!-- Controls -->
</div>
<div class="col-sm-5 col-sm-offset-1">
<!--<div class="col-sm-12">--><div class="">
<h4>TESTIMONIALS</h4>
<!--<div id="" class="carousel slide" data-ride="carousel">/-->
<div id="tcb-testimonial-carousel" class="carousel slide" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="carousel-inner">
<?php $testdata=$conn->prepare("select * from testimonials limit 10");
$testdata->execute();$testres=$testdata->fetchall();$k=1;
foreach($testres as $testrow){?>
<?php if($k%2 !=0 ){ ?>
<div class="item <?php if($k==1){echo"active";}?>">
<?php } ?>
<div class="row">
<div class="col-xs-12">
<figure class="clearfix">
<div class="col-md-3 col-sm-2 col-xs-12 no-padd"><img class="img-responsive media-object tst-img" src="admin/img/test/<?php echo $testrow['test_img'];?>"> </div>
<div class="col-md-9 col-sm-10 col-xs-12">
<figcaption class="caption testimonial-cls">
<p> "<?php echo $testrow['test_msg'];?>"</p>
<strong><?php echo $testrow['test_name'];?></strong>
</figcaption>
</div>
</figure>
</div>
</div>
<?php if($k%2 ==0 ){ ?>
</div>
<?php }else{ ?>
<h5> </h5>
<?php } ?>
<?php $k++;} ?>
</div>
</div>
</div>
</div>
</section>
<?php
}
function newssletter(){?>
<section class="newssletter">
<div class="container">
<div class="row">
<div class="col-sm-8">
<!--<h4 style="color: #119eba;">Get the latest Lanka Virtual Academy news and educational information delivered to your inbox</h4>-->
<h4 style="color: #3c71bf;">Get the latest Lanka Virtual Academy news and educational information delivered to your inbox</h4>
</div>
<div class="col-sm-4">
<form action="#" method="post" id="subscribe">
<div class="input-group">
<input type="email" class="form-control" name="emailsubs" id="emailsubs" placeholder="Email Address">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" style="background:#E8D415" >SUBSCRIBE</button>
</span>
</div><!-- /input-group -->
</form>
</div>
</div>
</div><!--/.container-->
</section><!--/#conatcat-info-->
<div class="modal fade" id="subsmodel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header" style="background:#111b26 !important;border-radius:3px 3px 0px 0px;color:#fff">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" style="color:#fff">×</span></button>
<h4 class="modal-title" id="myModalLabel" style="color:#fff" align="center"><i class="fa fa-check"></i> Subscribed successfully!!</h4>
</div>
<div class="modal-body">
<div><h4 style="color: #111b26;text-align: center;font-size: 16px;">Thank you for subscribing</h4></div>
</div>
</div></div>
</div>
<div class="modal fade" id="subsmodelw" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header" style="background:#111b26 !important;border-radius:3px 3px 0px 0px;color:#fff">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" style="color:#fff">×</span></button>
<h4 class="modal-title" id="myModalLabel" style="color:#fff" align="center"><i class="fa fa-cross"></i> Already Registered!!</h4>
</div>
<div class="modal-body">
<!--<div><h4 style="color: #ea1c0d;text-align: center;font-size: 30px;">Sorry you are already Registered</h4></div>-->
<div><h4 style="color: #111b26;text-align: center;font-size: 16px;">Sorry you are already Registered</h4></div>
</div>
</div></div>
</div>
<?php
}
// Count down Notification
$getAddData = mysqli_query($connt, "SELECT * FROM advertisment");
$ress = mysqli_fetch_assoc($getAddData);
if($ress["ad_value"] !== ""){
?>
<script>
setTimeout(() => {
document.getElementById("reminderComp").innerHTML = `
<div class="reminder-comp">
<div>
<?php echo $ress["ad_value"]; ?>
<span id="timeRemaining"></span>
</div>
<button id="closer" onclick="closeRm()">X</button>
</div>
`;
}, 500);
// Set the date we're counting down to
var countDownDate = new Date("<?php echo $ress['end_time']; ?>").getTime();
// Update the count down every 1 second
var x = setInterval(function() {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Output the result in an element with id="demo"
document.getElementById("timeRemaining").innerHTML = "Ends in " + days + "d " + hours + "h "
+ minutes + "m " + seconds + "s ";
// If the count down is over, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("timeRemaining").innerHTML = "EXPIRED";
}
}, 200);
</script>
<?php
}
else{
false;
}
// Count down Notification END
?>
Zerion Mini Shell 1.0