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'])) );
$end_date=date('d-m-Y', strtotime($ress['end_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; }
}
/*adjustment for twitter*/
.main_menu_box{
overflow: hidden;
margin-top: 3px;
background-image: url("images/Student Dashboard Banner.png");
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
width: 100%;
}
.panel-default{
width: 400px;
height: 145px;
margin: 15px;
float: right;
position: relative;
overflow: hidden;
}
.panel-body{
padding: 0px 10px !important;
height: auto;
margin-top: -10px;
overflow: hidden;
}
.panel-body > h3 {
font-size: 14px;
text-align: center;
}
.panel-footer{
padding: 0px 0px !important;
height: 70px;
bottom: 0;
position: absolute;
width: 100%;
}
.btn-primary{
margin-left: 59px;
}
.btn{
padding: 0px 0px;
margin-top: 16px;
}
.btn > h4{
font-size: 13px;
padding: 0 5px;
}
/*for stu_profile*/
.student_blog {
float: left;
overflow: hidden;
}
.stu_pofilepic{
float: left;
padding-left: 20px;
padding-top: 14px;
overflow: hidden;
}
.stu_img > img{
width: auto;
height: 125px;
overflow: hidden;
}
.upload_btn{
text-align: center;
overflow: hidden;
}
.uploader{ padding-top: 0;padding-bottom: 1px;border: 0px solid transparent; }
.stu_data{
float: left;
color: #fff;
overflow: hidden;
padding: 20px;
}
@media (min-width: 320px) and (max-width: 767px){
.stu_pofilepic{
padding: 8px;
}
.stu_img > img{
width: 273px;
height: auto;
}
.stu_data{
float: none;
padding: 5px;
text-align: center;
}
.panel{
border-radius: 0px;
}
.panel-default{
margin: 0px;
width: 100%;
}
.btn-primary{
margin-left: 50px;
}
.btn > h4{
font-size: 8px;
}
.student_blog, .stu_pofilepic{ float: none; }
.stu_img{ text-align: center; }
.panel-footer{ text-align: center; }
.panel-footer button{ margin-left: auto; }
.uploader {
background-color: #AAC0D3;
border-radius: 16px;
margin-top: 4px;
padding: 2px 10px;
width: auto !important;
}
}
</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 "Subscription 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 -->
<!-- twitter blog -->
<div class="main_menu_box">
<div class="student_blog">
<div class="stu_pofilepic">
<form class="photo_uploader" action="photo_uploader.php" method="post" enctype="multipart/form-data">
<div class="stu_img">
<?php
if(empty($ress['stu_image'])){
$img = 'default.jpg';
}else{
$img = $ress['stu_image'];
}
?>
<img id="user_pic" src="images/students/<?php echo $img; ?>" />
</div>
<div class="upload_btn">
<button class="uploader">Update Picture</button>
<input type="file" id="file" name="team_img" type="file" class="form-control" accept="image/*" onchange="loadFile(event)" style="display: none;">
</div>
</form>
</div>
<div class="stu_data">
<?php
echo $ress['stu_name'] . "</br>";
echo $ress['course_name']. "</br>";
echo "Subscription Date : " . date("d-m-Y", strtotime($ress['start_date'])). "</br>";
echo "Subscription Expiry Date : " . date("d-m-Y", strtotime($ress['end_date']));
?>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body animated pulse"> </div>
<div class="panel-footer">
<button class="btn btn-primary" id="tweet"><h4><b><i class="fa fa-twitter" aria-hidden="true"></i> Tweet this Quote </b></h4></button>
   <button class="btn btn-info" id="newquote"><h4><b><i class="fa fa-cog" aria-hidden="true"></i> Generate new Quote</b></h4></button>
</div>
</div>
</div> <!-- // -->
</div>
<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();?>
<script type="text/javascript">
$(document).ready(function(){
var quotes=["Life is about making an impact, not making an income. -Kevin Kruse"," Whatever the mind of man can conceive and believe, it can achieve. -Napoleon Hill","Strive not to be a success, but rather to be of value. -Albert Einstein"," Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference. -Robert Frost","I attribute my success to this: I never gave or took any excuse. -Florence Nightingale","You miss 100% of the shots you don't take. -Wayne Gretzky","I've missed more than 9000 shots in my career. I've lost almost 300 games. 26 times I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed. -Michael Jordan"," The most difficult thing is the decision to act, the rest is merely tenacity. -Amelia Earhart","Every strike brings me closer to the next home run. -Babe Ruth","Definiteness of purpose is the starting point of all achievement. -W. Clement Stone",
"Life isn't about getting and having, it's about giving and being. -Kevin Kruse","Life is what happens to you while you're busy making other plans. -John Lennon","We become what we think about. -Earl Nightingale","Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do, so throw off the bowlines, sail away from safe harbor, catch the trade winds in your sails. Explore, Dream, Discover. -Mark Twain"
,"Life is 10% what happens to me and 90% of how I react to it. -Charles Swindoll","The most common way people give up their power is by thinking they don't have any. -Alice Walker","The mind is everything. What you think you become. -Buddha","The best time to plant a tree was 20 years ago. The second best time is now. -Chinese Proverb","An unexamined life is not worth living. -Socrates","Eighty percent of success is showing up. –Woody Allen","Your time is limited, so don't waste it living someone else's life. –Steve Jobs","Winning isn't everything, but wanting to win is. –Vince Lombardi","I am not a product of my circumstances. I am a product of my decisions. –Stephen Covey","Every child is an artist. The problem is how to remain an artist once he grows up. –Pablo Picasso","You can never cross the ocean until you have the courage to lose sight of the shore. –Christopher Columbus","I've learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel. –Maya Angelou","Either you run the day, or the day runs you. –Jim Rohn","Whether you think you can or you think you can't, you're right. –Henry Ford","The two most important days in your life are the day you are born and the day you find out why. –Mark Twain","Whatever you can do, or dream you can, begin it. Boldness has genius, power and magic in it. –Johann Wolfgang von Goethe","The best revenge is massive success. –Frank Sinatra","People often say that motivation doesn't last. Well, neither does bathing. That's why we recommend it daily. –Zig Ziglar","Life shrinks or expands in proportion to one's courage. –Anais Nin"]
function getRandom(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
var i=getRandom(0,quotes.length-1)
$("#newquote").on("click",function(){
$(".panel-body").fadeOut("fast",function(){
i=getRandom(0,quotes.length-1)
newquote(i);
});
$(".panel-body").fadeIn("fast");
});
$('#tweet').on('click',function(){
window.open("https://twitter.com/intent/tweet?text="+quotes[i]);
});
var newquote=function(i){
console.log(i);
console.log(quotes.length);
$(".panel-body").html("<h3>"+quotes[i]+"</h3>");
};
newquote(i);
});
var loadFile = function(event) {
var output = document.getElementById('user_pic');
output.src = URL.createObjectURL(event.target.files[0]);
setTimeout(function(){
$('.photo_uploader').submit();
},1000);
};
$(".uploader").click(function(e){
e.preventDefault();
$("#file").trigger('click');
});
$(window).load(function(){
$(window).resize(function(){
$('.uploader').css('width',$('.photo_uploader .stu_img > img').innerWidth()+'px');
});
$('.uploader').css('width',$('.photo_uploader .stu_img > img').innerWidth()+'px');
})
</script>
</body>
</html>
Zerion Mini Shell 1.0