Mini Shell
<?php require_once("function-file.php");
require_once("function-menu.php");
require_once("../config.php");
cookiecheck();
if(!empty($_COOKIE['topic_id'])){setcookie( "topic_id", '', time() - 60); }
$userid=$_SESSION["userid"];
$data=$conn->prepare("select * from student_reg a left join courses b on a.course_id=b.course_id where a.stu_id='$userid'");
$data->execute();$ress=$data->fetch();
$end_date=date('d-m-Y', strtotime('+1 year', strtotime($ress['start_date'])) );$cdate=date("d-m-Y");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Courses</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<?php cssfile();?>
<style>.box.box-solid.box-primary{border:none;}.box-title{color:#000;font-weight: 700;font-size: 15px !important;}.box{box-shadow: none;}.sub-h2{font-size: 16px;font-weight: bold;padding:10px;border: 1px solid #333;color:#fff;background:#43464b;}
.sub-header{margin-top: 1%; background: #3C8DBC;font-size: 30px;font-weight: bold;text-transform: uppercase;}
.sub-body{font-size: 14px; }.box-footer{padding:0;}.btn-default{background-color: #444; color: #fff;}.btn-default:hover{background: #3c8dbc}
.box-header{padding: 10px;font-size:16px;}h5{padding-left:15px;}/*.box.box-solid.box-primary>.box-header:hover{background: rgba(233, 212, 21, 0.76)}*/.box.box-solid.box-primary > .box-header:hover{ background-color: #ddd; }
.no_padding_left{ padding-left: 0; } /*.box-title.subject-title, .expiry-date{ color: #fff; }*/
.skin-blue .main-header .navbar .nav > li > a:hover, .skin-blue .main-header .navbar .nav > li > a:active, .skin-blue .main-header .navbar .nav > li > a:focus, .skin-blue .main-header .navbar .nav .open > a, .skin-blue .main-header .navbar .nav .open > a:hover, .skin-blue .main-header .navbar .nav .open > a:focus, .skin-blue .main-header .navbar .nav > .active > a{ color: #999 !important; }
.book_icon_container{
background-image: url("../images/book-icon.png") !important;
background-repeat: no-repeat !important;
background-size: contain !important;
}
.book_icon_container h3{ margin-left: 65px !important; }
#tcb-testimonial-carousel h5.no_padding_left{ margin-top: 0; }
@media (max-width: 767px){
.expiry-date{ display: block !important;position: relative !important;top: unset !important; }
header.main-header nav{ overflow: hidden; }
.box-header > .box-tools{ right: unset;width: 100%; }
.box-header.sub-header{ text-align: center; }
}
</style>
</head>
<body class="hold-transition skin-blue layout-top-nav">
<!-- Site wrapper -->
<div class="wrapper">
<?php headermenu();?>
<!-- =============================================== -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<!-- Main content -->
<section class="content">
<!-- Default box -->
<div class="box box-primary">
<div class="box-header with-border sub-header"><?php echo $ress['course_name'];?>
<div class="box-tools pull-right expiry-date">
<?php echo "Expiry Date: ".$end_date;?>
</div>
</div>
<div class="box-body sub-body">
<?php
if($end_date==$cdate){echo"<h4 align='center'>Sorry!your course has been expired!!</h4>";exit;}
echo $ress['course_overview'];?>
</div><!-- /.box-body -->
<div class="box-footer ">
<h2 class="sub-h2">Subjects</h2>
<br>
<div class="row">
<?php
$datas=$conn->prepare("select * from subjects where course_id='$ress[course_id]' ORDER BY subject_name ASC");
$datas->execute();$results=$datas->fetchall();foreach($results as $rows){?>
<div class="col-md-4" >
<a href='subject-detail.php?subid=<?php echo $rows['subject_id'];?>'>
<div class="box box-primary box-solid ">
<div class="box-header with-border book_icon_container">
<h3 class="box-title subject-title" ><?php echo $rows['subject_name'];?></h3>
</div><!-- /.box-header -->
</div><!-- /.box -->
</a></div><?php }?>
</div>
<br>
<div class="col-sm-12" style="background: #ecf0f5;">
<br>
<div class="row">
<div class="col-sm-6"><div class="">
<!--Start News-->
<h5>NEWS</h5>
<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">
<div class="col-md-3 col-sm-2 col-xs-12 no-padd"><a href="../news-details.php?newsid=<?php echo $newsrow['news_id'];?>" target="_blank"><img class="img-responsive media-object" src="../admin/img/news/<?php echo $newsrow['news_img'];?>"></a> </div>
<div class="col-md-9 col-sm-10 col-xs-12">
<figcaption class="caption">
<h5 class="no_padding_left"><a href="../news-details.php?newsid=<?php echo $newsrow['news_id'];?>" target="_blank"><?php echo $newsrow['news_title'];?></a></h5>
<p><?php echo substr($newsrow['news_desc'],0,150)."...";?></p>
<p><?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" target="_blank">More</a></p>
</figcaption>
</div>
</figure>
</div>
</div>
</div>
<?php $i++;}?>
</div>
</div>
<hr>
</div><!--Close News-->
<!-- Controls -->
</div>
<div class="col-sm-6 ">
<div class=""><!--Start Blog-->
<h5>BLOG</h5>
<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">
<div class="col-md-3 col-sm-2 col-xs-12 no-padd"><a href="../blog-details.php?blogid=<?php echo $blogrow['blog_id'];?>" target="_blank"><img class="img-responsive media-object" src="../admin/img/blogs/<?php echo $blogrow['blog_img'];?>" /></a> </div>
<div class="col-md-9 col-sm-10 col-xs-12">
<figcaption class="caption">
<h5 class="no_padding_left"><a href="../blog-details.php?blogid=<?php echo $blogrow['blog_id'];?>" target="_blank"><?php echo $blogrow['blog_title'];?></a></h5>
<p><?php echo substr($blogrow['blog_desc'],0,150)."...";?></p>
<p><?php echo date('d M Y',strtotime($blogrow['blog_date']));?> <a href="../blog-details.php?blogid=<?php echo $blogrow['blog_id'];?>" target="_blank" class="btn btn-black btn-default btn-xs">More</a></p>
</figcaption>
</div>
</figure>
</div>
</div>
</div>
<?php $i++;}?>
</div>
</div><!--Close Blog-->
</div>
</div>
</div>
</div>
</div>
</section>
</div><!-- /.content-wrapper -->
<?php footer();?>
</div><!-- ./wrapper -->
<?php jsfile();?>
</body>
</html>
Zerion Mini Shell 1.0