HEX
Server: LiteSpeed
System: Linux server137.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: bibuzptr (1123)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/bibuzptr/elearning.bibu-edu.us/backup/academic-programs.php
<?php
session_start();
include_once("includes/db_connect.php");
 $expld_url = $_SERVER["REQUEST_URI"];//explode("/", $_SERVER["REQUEST_URI"]);
 if($_GET['fbclid']){
 $url= $expld_url;  
 $pos = strpos($url, "?");
 $url = substr($url, 0, $pos);
}else{
$url= $expld_url; 
}
  $expld_url = explode("/", $url);
 $url = end($expld_url);
 if(!empty($url)){
  $lb=mysqli_fetch_assoc(mysqli_query($con,"SELECT * FROM categories WHERE url='$url'")); 
  $categoryid=$lb["id"];
  $schoolid=$lb["schoolid"];
  $school=mysqli_fetch_assoc(mysqli_query($con,"SELECT * FROM schools WHERE id='$schoolid'"));
 }else{
     header("Location:../");
 }
 
 //check student logged in
 if(isset($_SESSION["OpenUniS^###DHSG"])){
    $email = $_SESSION["OpenUniS^###DHSG"];
    $chkuser = mysqli_query($con,"SELECT * FROM students WHERE email='$email'");
    while($row = mysqli_fetch_assoc($chkuser)){
      $stdid = $row["id"];
      $id = $row["id"];
      $name = $row["name"];
    }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<title><?php echo $lb['name'] ?>Breakthrough International Bible College & University</title>

<link rel="shortcut icon" type="image/x-icon" href="../assets/img/logo.png">

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

<link rel="stylesheet" href="../assets/plugins/fontawesome/css/fontawesome.min.css">
<link rel="stylesheet" href="../assets/plugins/fontawesome/css/all.min.css">

<link rel="stylesheet" href="../assets/css/owl.carousel.min.css">
<link rel="stylesheet" href="../assets/css/owl.theme.default.min.css">

<link rel="stylesheet" href="../assets/plugins/slick/slick.css">
<link rel="stylesheet" href="../assets/plugins/slick/slick-theme.css">

<link rel="stylesheet" href="../assets/plugins/select2/css/select2.min.css">

<link rel="stylesheet" href="../assets/plugins/aos/aos.css">

<link rel="stylesheet" href="../assets/css/style.css">
</head>
<body>

<div class="main-wrapper">

<?php include_once("includes/header-course.php") ?>


<div style="display:none" class="breadcrumb-bar">
<div class="container">
<div class="row">
<div class="col-md-12 col-12">
<div class="breadcrumb-list">
<nav aria-label="breadcrumb" class="page-breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.html">Home</a></li>
<li class="breadcrumb-item" aria-current="page">Courses</li>
<li class="breadcrumb-item" aria-current="page">All Courses</li>
<li class="breadcrumb-item" aria-current="page">The Complete Web Developer Course 2.0</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
</div>


<div style="margin-top:6%" class="inner-banner">
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="instructor-wrap border-bottom-0 m-0">
<span class="web-badge mb-3">
    <a style="color:#fff" href="../schools/<?php echo $school["url"] ?>">
        <?php echo $school['name'] ?>
    </a>
    </span>
</div>
<h2><?php echo $lb['name'] ?></h2>
<p><?php echo substr($lb['shortdescription'],0,400) ?></p>
<div class="course-info d-flex align-items-center border-bottom-0 m-0 p-0">
<div class="cou-info">
<img src="../assets/img/icon/icon-01.svg" alt>
<p><?php echo mysqli_num_rows(mysqli_query($con,"SELECT * FROM courses WHERE category='$categoryid'")) ?> Courses</p>
</div>

</div>
</div>
</div>
</div>
</div>


<section class="page-content course-sec">
<div class="container">
<div class="course-feature">
    <div class="row">
        <?php
            $listcat=mysqli_query($con,"SELECT * FROM courses WHERE category='$categoryid' ORDER BY id DESC");
            while($lc=mysqli_fetch_assoc($listcat)){
                $courseid=$lc["id"];
                $url=$lc["url"];
            ?>
            <div class="col-lg-4 col-md-6 d-flex">
            <div class="course-box d-flex aos" data-aos="fade-up">
            <div class="product">
            <div class="product-img">
                <div style="height:150px">
                    <a href="../course-details/<?php echo $lc['url'] ?>">
                    <img class="img-fluid1" alt="<?php echo $lc['title'] ?>" src="../course-images/<?php echo $lc['courseimage'] ?>">
                    </a>
                </div>
            <div style="display:none" class="price">
                <?php 
                if($lc['price']=="0"){ ?>
                  <h3>Free</h3>  
               <?php }else{
                ?>
            <h3>Ksh. <?php echo number_format($lc["price"]) ?></h3>
            <?php } ?>
            </div>
            </div>
            <div class="product-content">
                <div style="height:60px">
                    <h3 class="title instructor-text">
                        <a href="../course-details/<?php echo $lc['url'] ?>"><?php echo $lc['title'] ?></a>
                    </h3>
                </div>
                <div style="height:150px">
                     <p class="title instructor-text"><?php echo substr($lc['shortdescription'],0,200) ?>...</p>
                 </div>
            <div class="course-info d-flex align-items-center">
            <div class="rating-img d-flex align-items-center">
            <img src="../assets/img/icon/icon-01.svg" alt>
            <p><?php echo mysqli_num_rows(mysqli_query($con,"SELECT * FROM units WHERE courseid='$courseid'")) ?> Units</p>
            </div>
            <div class="course-view d-flex align-items-center">
            <img src="../assets/img/icon/icon-02.svg" alt>
            <p><?php echo $lc['hours'] ?></p>
            </div>
            </div>
            
            <div class="all-btn all-category d-flex align-items-center">
            <?php if($id!=""){
               if(mysqli_num_rows(mysqli_query($con,"SELECT * FROM mycourses WHERE courseid='$courseid' AND studentid='$id'"))>0){ ?>
                   <a href="../dashboard/course-lesson/<?php echo $url ?>" class="btn btn-enroll w-100">Continue Learning</a>
             <?php  }else{ ?>
                 <a style="display:none" href="enroll.php?courseurl=<?php echo $url ?>&&courseid=<?php echo $courseid ?>&&stdid=<?php echo $id ?>" class="btn btn-enroll w-100">Enroll Now</a>
                 <a href="../course-details/<?php echo $url ?>" class="btn btn-enroll w-100">View Details</a>
             <?php } 
            }else{
            ?>
            <a href="../course-details/<?php echo $url ?>" class="btn btn-enroll w-100">View Details</a>
            <?php } ?>
            </div>
            </div>
            </div>
            </div>
            </div>
          <?php } ?>
    </div>
    </div>
</div>
</section>


<?php include_once('includes/footer-course.php') ?>
</body>
</html>