Mini Shell

Direktori : /home/rizant5/www/student/
Upload File :
Current File : /home/rizant5/www/student/index.php

<?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;
      }
    }


    /* Countdown */
    .countdown-comp-texp{
      text-align: center !important;
      color: #436594;
    }
    .countdown-comp-texp h4{
      font-weight: 600;
    }
    .countdown-comp-texp .tml{
      font-size: 14px;
    }
    .countdown-comp-texp .countdwnComp{
      font-size: 24px;
    }
    @media screen and (max-width: 768px){
      .countdown-comp-texp .hrb1{
        line-height: 28px;
        margin-bottom: 25px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        padding-bottom: 20px;
      }
    }
    .countdown-comp-texp .last-h4{
      border-bottom: none !important;
    }



    /* Animated Countdown */
    .countdown {
      display: flex;
      justify-content: space-between;
      margin: 3vh auto 3vh auto;
      width: 60%;
      max-width: 600px;
    }
    .countdown .container {
      position: relative;
      width: 150px;
    }
    .countdown .container svg {
      position: absolute;
      top: 0;
      left: 25px;
    }
    .countdown .container .label {
      position: absolute;
      width: 100px;
      height: 100px;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      margin-top: 15px;
      text-align: center;
      flex-direction: column;
      justify-content: space-around;
    }
    .countdown .container .label span:first-of-type {
      font-size: 32px;
      color: #436594;
      margin: 0;
    }
    .countdown .container .label span:nth-of-type(2) {
      font-size: 15px;
      text-transform: uppercase;
      font-weight: 600;
      color: #436594;
    }
    @media screen and (max-width: 800px) {
      .countdown {
        flex-direction: column;
        align-items: center;
        height: 500px;
        width: auto;
        min-width: auto;
      }
    }

    /* Alert Component */
  .upgBtn{
    background-color: #16a9ff;
    padding: 10px 20px;
    font-size: 24px;
    color: #ffffff;
    text-transform: uppercase;
    border: none;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    letter-spacing: 1px;
    transition: .3s;
    -webkit-transition: .3s;
    -moz-transition: .3s;
    outline: none !important;
    margin-left: -55px;
  }
  .upgBtn:hover{
    background-color: #48bbff;
    box-shadow: 0px 5px 20px rgba(72,187,255,0.2)
  }
  .upgBtn::after{
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    padding: 27px;
    background-color: #1498e5;
    margin-top: -10px;
    margin-left: 12px;
    border-radius: 0px 5px 5px 0px;
    -webkit-border-radius: 0px 5px 5px 0px;
    -moz-border-radius: 0px 5px 5px 0px;
    -ms-border-radius: 0px 5px 5px 0px;
    -o-border-radius: 0px 5px 5px 0px;
    background-image: url('css/arr01.svg');
    background-position:center;
    background-repeat: no-repeat;
    background-size: 40%;
  }

  /* Toggle Comps */
  #paymentTypeComp{
    display: none;
  }

	</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>
                  &nbsp &nbsp<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="countdown-comp-texp" id="expiredAlert">
              
              <?php
              
              if($ress['pay_mode'] == "trial"){
                ?>
                  <h4>ඔබගේ නොමිලේ සේවාව කල් ඉකුත්වීමට ඉතිරිව ඇති කාලය</h4>
                  <h4 class="tml">உங்களுக்கான இலவச சேவை முடிவடைய எஞ்சியுள்ள காலம்</h4>
                  <h4>Your Membership Ends In</h4>
                <?php
              }
              else{
                ?>
                  <h4>ඔබගේ සේවාව කල් ඉකුත්වීමට ඉතිරිව ඇති කාලය</h4>
                  <h4 class="tml">உங்களுக்கான சேவை முடிவடைய எஞ்சியுள்ள காலம்</h4>
                  <h4>Your Membership Ends In</h4>
                <?php
              }
              
              ?>

              <div class="countdwnComp">

              <?php
                $deduction = ($ress["course_fees"] / 100) * $ress["discount"];
                $course_amount = $ress["course_fees"] - $deduction;              
              ?>


                <!-- Animated Countdown Start /-->
                <div class="countdown">
                  <div class="container days">
                    <canvas id="days-canvas" width="100" height="100"></canvas>
                    <svg width="100" height="100">
                      <circle id="outer" cx="50" cy="50" r="45" fill="transparent" stroke-width="10" stroke="#8ea9cc" opacity="0.1"/>
                    </svg>
                    <div class="label">
                      <span id="days-value"></span><br>
                      <span>days</span>
                    </div>
                  </div>
                  <div class="container hours">
                    <canvas id="hours-canvas" width="100" height="100"></canvas>
                    <svg width="100" height="100">
                      <circle id="outer" cx="50" cy="50" r="45" fill="transparent" stroke-width="10" stroke="#8ea9cc" opacity="0.1"/>
                    </svg>
                    <div class="label">
                      <span id="hours-value"></span><br>
                      <span>hours</span>
                    </div>
                  </div>
                  <div class="container minutes">
                    <canvas id="minutes-canvas" width="100" height="100"></canvas>
                    <svg width="100" height="100">
                      <circle id="outer" cx="50" cy="50" r="45" fill="transparent" stroke-width="10" stroke="#8ea9cc" opacity="0.1"/>
                    </svg>
                    <div class="label">
                      <span id="minutes-value"></span><br>
                      <span>minutes</span>
                    </div>
                  </div>
                  <div class="container seconds">
                    <canvas id="seconds-canvas" width="100" height="100"></canvas>
                    <svg width="100" height="100">
                      <circle id="outer" cx="50" cy="50" r="45" fill="transparent" stroke-width="10" stroke="#8ea9cc" opacity="0.1"/>
                    </svg>
                    <div class="label">
                      <span id="seconds-value"></span><br>
                      <span>seconds</span>
                    </div>
                  </div>
                </div>
                <!-- Animated Countdown END /-->



              </div>
              <?php
                if($ress['pay_mode'] == "trial"){
              ?>
                <h4 class="hrb1">රුපියල් <?=$course_amount?> ක් පමණක් ගෙවීමෙන් සම්පූර්ණ විෂය නිර්දේශය වසරක් අඛණ්ඩව අධ්‍යයනය කිරීමට පහත බොත්තම ක්ලික් කරන්න.</h4>
                <h4 class="tml hrb1">முழுப்பாடத்திட்டத்தையும் ரூ. <?=$course_amount?> மாத்திரம் செலுத்தி ஒரு வருடத்திற்கு தொடர்ந்து கற்க கீழ்காணும் Button ஐ கிளிக் செய்யவும்.</h4>
                <h4 class="last-h4">Pay just SR. <?=$course_amount?> and study the complete syllabus for One Year</h4>
                <br>
                <button class="upgBtn" id="gotoPayType">Upgrade Now</button><br><br>
              <?php } ?>
            </div>


            <?php include ("comps.php"); ?>



          </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');
      })




      // Countdown
      // // Set the date we're counting down to
      // var countDownDate = new Date("<?=$ress["end_date"]?>").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);

      //   // Display the result in the element with id="demo"
      //   document.getElementById("daysRemaining").innerHTML = days + "Days " + hours + "hrs "
      //   + minutes + "min " + seconds + "sec ";

      //   // If the count down is finished, write some text
      //   if (distance < 0) {
      //     clearInterval(x);
      //     document.getElementById("daysRemaining").innerHTML = "EXPIRED";
      //   }
      // }, 1000);


      // Set Launch Date (ms)
const launchDate = new Date("<?=$ress["end_date"]?>").getTime();

// Context object
const c = {
  context: {},
  values: {}, 
  times: {}
};

// Convert radians to degrees
function deg(d) {
  return (Math.PI/180)*d-(Math.PI/180)*90;
}

function render() {
  c.context.seconds.clearRect(0, 0, 100, 100);
  c.context.seconds.beginPath();
  c.context.seconds.strokeStyle = "#6186b8";
  c.context.seconds.arc(50, 50, 45, deg(0), deg(6 * (60 - c.times.seconds)));
  c.context.seconds.lineWidth = 10;
  c.context.seconds.lineCap = "round"; 
  c.context.seconds.stroke();
  
  c.context.minutes.clearRect(0, 0, 100, 100);
  c.context.minutes.beginPath();
  c.context.minutes.strokeStyle = "#6186b8";
  c.context.minutes.arc(50, 50, 45, deg(0), deg(6 * (60 - c.times.minutes)));
  c.context.minutes.lineWidth = 10;
  c.context.minutes.lineCap = "round"; 
  c.context.minutes.stroke();
  
  c.context.hours.clearRect(0, 0, 100, 100);
  c.context.hours.beginPath();
  c.context.hours.strokeStyle = "#6186b8";
  c.context.hours.arc(50, 50, 45, deg(0), deg(15 * (24 - c.times.hours)));
  c.context.hours.lineWidth = 10;
  c.context.hours.lineCap = "round"; 
  c.context.hours.stroke();
  
  c.context.days.clearRect(0, 0, 100, 100);
  c.context.days.beginPath();
  c.context.days.strokeStyle = "#6186b8";
  c.context.days.arc(50, 50, 45, deg(0), deg(365 - c.times.days));
  c.context.days.lineWidth = 10;
  c.context.days.lineCap = "round"; 
  c.context.days.stroke();
}

function init() {
  // Get 2D contexts
  c.context.seconds = document.getElementById('seconds-canvas').getContext('2d');
  c.context.minutes = document.getElementById('minutes-canvas').getContext('2d');
  c.context.hours = document.getElementById('hours-canvas').getContext('2d');
   c.context.days = document.getElementById('days-canvas').getContext('2d');
  
  // Get displayed values
  c.values.seconds = document.getElementById('seconds-value');
  c.values.minutes = document.getElementById('minutes-value');
  c.values.hours = document.getElementById('hours-value');
  c.values.days = document.getElementById('days-value');
  
  setInterval(function() {
    // Get todays date and time (ms)
    const now = new Date().getTime();

    // Get distance from now to launchDate
    const distance = launchDate - now;

    // Time calculations
    c.times.days = Math.floor(distance / (1000 * 60 * 60 * 24));
    c.times.hours = Math.floor(
      (distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
    );
    c.times.minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
    c.times.seconds = Math.floor((distance % (1000 * 60)) / 1000);

    c.values.days.innerText = c.times.days;
    c.values.hours.innerText = c.times.hours;
    c.values.minutes.innerText = c.times.minutes;
    c.values.seconds.innerText = c.times.seconds;
    
    render(); // Draw!
  }, 1000);
}

init();




    $("#gotoPayType").on('click', () => {
      $("#expiredAlert").hide();
      $("#paymentTypeComp").show();
    });


   </script>

  </body>

</html>


Zerion Mini Shell 1.0