Mini Shell

Direktori : /home/rizant5/www/student/
Upload File :
Current File : /home/rizant5/www/student/function-file.php

<?php
require_once("../config.php");
global $conn;
$uid = $_SESSION['userid'];
$que=$conn->prepare("select * from student_reg where stu_id='$uid' ");
$que->execute();
$result = $que->fetch();
$end_date=date('U', strtotime($result['end_date']) );
$cdate=date("U");
if(!isset($_GET['flag'])){
  if($end_date<$cdate){
  // echo"<h4 align='center'>Sorry!your course has been expired!!</h4>";exit;
    header("location:renew.php?flag=1");
    // die();
  }
}

function cssfile(){?>

<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

<link rel="shortcut icon" type="image/ico" href="../lankavirtualacademy.ico" />

 <link rel="stylesheet" href="../apptheme/bootstrap/css/bootstrap.min.css">

    <!-- Font Awesome -->

    <link rel="stylesheet" href="../apptheme/bootstrap/css/font-awesome.min.css">

    <!-- Ionicons -->

    <link rel="stylesheet" href="../apptheme/bootstrap/css/ionicons.min.css">

    <!-- Theme style -->

    <link rel="stylesheet" href="../apptheme/dist/css/AdminLTE.min.css">

    <!-- AdminLTE Skins. Choose a skin from the css/skins

         folder instead of downloading all of them to reduce the load. -->

    <link rel="stylesheet" href="../apptheme/dist/css/skins/_all-skins.min.css">

    <style>a:hover{cursor:pointer;}.required{color:red}.navbar-header{padding: 5px 0px;}</style>

    <style>
      @font-face {
          font-family: 'Sinhala';
          src: url('../fonts/AnandaLight.eot');
          src: url('../fonts/AnandaLight.eot') format('embedded-opentype'),
               url('../fonts/AnandaLight.woff2') format('woff2'),
               url('../fonts/AnandaLight.woff') format('woff'),
               url('../fonts/AnandaLight.ttf') format('truetype'),
               url('../fonts/AnandaLight.svg#AnandaLight') format('svg');
      }
      @font-face {
          font-family: 'Tamil';
          src: url('../fonts/bapc.eot');
          src: url('../fonts/bapc.eot') format('embedded-opentype'),
               url('../fonts/bapc.woff2') format('woff2'),
               url('../fonts/bapc.woff') format('woff'),
               url('../fonts/bapc.ttf') format('truetype'),
               url('../fonts/bapc.svg#bapc') format('svg');
      }
      @media (min-width: 1025px){
        header .container{ width: 100%; }
      }
    </style>

<?php

}

function jsfile(){?>

    <!-- jQuery 2.1.4 -->

    <script src="../apptheme/plugins/jQuery/jQuery-2.1.4.min.js"></script>

    <!-- Bootstrap 3.3.5 -->

    <script src="../apptheme/bootstrap/js/bootstrap.min.js"></script>

    <!-- SlimScroll -->

    <script src="../apptheme/plugins/slimScroll/jquery.slimscroll.min.js"></script>

    <!-- FastClick -->

    <script src="../apptheme/plugins/fastclick/fastclick.min.js"></script>

    <!-- AdminLTE App -->

    <script src="../apptheme/dist/js/app.min.js"></script>

    <!-- AdminLTE for demo purposes -->

    <script src="../apptheme/dist/js/demo.js"></script>

    <!--<script src="./masonry.pkgd.min.js"></script>-->
    <script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.js"></script>

<?php

}

function jsfile_test(){?>

    <!-- jQuery 2.1.4 -->

    <script src="../apptheme/plugins/jQuery/jQuery-2.1.4.min.js"></script>

    <!-- Bootstrap 3.3.5 -->

    <script src="../apptheme/bootstrap/js/bootstrap.min.js"></script>

    <!--<script src="./masonry.pkgd.min.js"></script>-->
    <script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.js"></script>

    <!-- Reference to html5gallery.js -->
    <script type="text/javascript" src="../js/html5lightbox.js"></script>

<?php

}

function datatablecss(){?>

<link href="../apptheme/plugins/datatables/extensions/TableTools/css/dataTables.tableTools.min.css" rel="stylesheet">

 <link href="../apptheme/plugins/datatables/extensions/Responsive/css/dataTables.responsive.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->

    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

    <!--[if lt IE 9]>

        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>

        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>

    <![endif]-->

    <style>div.dataTables_filter input{width:20em !important;}

    .dataTables_wrapper  .col-sm-6{width:30% !important;}

    .table-bordered th{background:rgba(110, 134, 154, 0.35) !important;}

    body.DTTT_Print {

        background: #fff;



    }

    .DTTT_Print #page-wrapper {

        margin: 0;

        background:#fff;

    }



    button.DTTT_button, div.DTTT_button, a.DTTT_button {

        border: 1px solid #e7eaec;

        background: #fff;

        color: #676a6c;

        box-shadow: none;

        padding: 6px 8px;

    }

    button.DTTT_button:hover, div.DTTT_button:hover, a.DTTT_button:hover {

        border: 1px solid #d2d2d2;

        background:#FC3;

        color: #676a6c;

        box-shadow: none;

        padding: 6px 8px;

    }



    .dataTables_filter label {

        margin-right: 5px;



    }

  div.dataTables_filter {

    text-align: right;

   

    float: left;

    margin-left: 50%;

    margin-top: -35px;

}

</style>

<?php }

function datatablejs(){?>

<script src="../apptheme/plugins/datatables/jquery.dataTables.js"></script>

    <script src="../apptheme/plugins/datatables/dataTables.bootstrap.js"></script>

    <script src="../apptheme/plugins/datatables/extensions/Responsive/js/dataTables.responsive.min.js"></script>

    <script src="../apptheme/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.min.js"></script>

     <!-- page script -->

<?php

}

function cookiecheck(){

  if(($_SESSION['username']=='') || ($_SESSION['userid']=='') || ($_SESSION['last_login']==''))

  {

    session_destroy();

    header("location:../verify-student.php");

  }

  global $conn;
  $uid = $_SESSION['userid'];
  $que=$conn->prepare("select * from student_reg where stu_id='$uid' ");
  $que->execute();
  $result = $que->fetch();
  if($_SESSION['last_login'] != $result['last_login']){
    session_destroy();
    header("location:../verify-student.php");
  }

}

function ratenum(){?>

<script>

//For Rate

 $(document).ready(function() {

 $(".ratenum").keydown(function(event) {

  // Allow only backspace and delete

  if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 190 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 110) {

   // let it happen, don't do anything

  }

  else {

   // Ensure that it is a number and stop the keypress

   if ((event.keyCode < 95 || event.keyCode > 105  ) && (event.keyCode < 48 || event.keyCode > 57  )) {

    event.preventDefault(); 

   } 

  }

 });

});

</script>

<?php

}

function phoneno(){?>

<script>

 //validation only for numeric keyboard

 $(document).ready(function() {

 $(".phoneno").keydown(function(event) {

  // Allow only backspace and delete

  if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9) {

   // let it happen, don't do anything

  }

  else {

   // Ensure that it is a number and stop the keypress

   if ((event.keyCode < 95 || event.keyCode > 105  ) && (event.keyCode < 48 || event.keyCode > 57  )) {

    event.preventDefault(); 

   } 

  }

 });

});

</script>

<?php

}

?>

Zerion Mini Shell 1.0