137 lines
5.4 KiB
PHP
137 lines
5.4 KiB
PHP
<?php
|
|
require '../config/function.php';
|
|
include('./authentication.php');
|
|
|
|
$studentInfos = getStudentInformation($id);
|
|
|
|
$paramResult = checkParamId('id');
|
|
if(!is_numeric($paramResult)){
|
|
echo '<div class="alert alert-danger" role="alert">'.$paramResult.'</div>';
|
|
return false;
|
|
}
|
|
|
|
$course = getById('tbl_courses',checkParamId('id'));
|
|
if($course['status'] == 200)
|
|
{
|
|
|
|
?>
|
|
|
|
<!doctype html>
|
|
<html lang="de">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Scolify - Schule Limmat</title>
|
|
|
|
<link rel="shortcut icon" type="image/png" href="../assets/images/logos/favicon.png" />
|
|
<link rel="stylesheet" href="../assets/css/register.css">
|
|
<link rel="stylesheet" href="../assets/css/styles.min.css" />
|
|
|
|
<link rel="stylesheet" href="../assets/css/transition.css" />
|
|
<style>
|
|
body, html {
|
|
margin: 0;
|
|
height: 100%;
|
|
}
|
|
.course-background {
|
|
background-image: url('<?php echo $course['data']['image']; ?>');
|
|
background-size: cover;
|
|
background-position: center;
|
|
height: 40vh; /* Verwende 50vh anstelle von 50% für die halbe Bildschirmhöhe */
|
|
position: relative;
|
|
}
|
|
.course-card-container {
|
|
position: relative;
|
|
top: -5vh; /* Stelle sicher, dass die Karte die unteren 10% überdeckt */
|
|
width: 90%;
|
|
margin: 0 auto;
|
|
}
|
|
.card {
|
|
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
|
}
|
|
.td {
|
|
padding-left: 0px !important;
|
|
padding-right: 0px;
|
|
}
|
|
</style>
|
|
<script src="../assets/libs/jquery/dist/jquery.min.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="page-wrapper" id="main-wrapper" data-layout="vertical" data-navbarbg="skin6" data-sidebartype="full" data-sidebar-position="fixed" data-header-position="fixed">
|
|
|
|
<div class="body-wrapper">
|
|
<header class="app-header ps-0 pe-3">
|
|
<?php include('includes/navbar.php'); ?>
|
|
</header>
|
|
|
|
<div class="container-fluid p-0">
|
|
<div class="course-background"></div>
|
|
<div class="course-card-container mb-3">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h1 class="card-title fw-bolder"><?php echo $course['data']['name']; ?></h1>
|
|
<?php
|
|
if(isset($course['data']['slogan']))
|
|
{
|
|
echo '
|
|
<div class="mt-1"><h6 class="fw-bolder">
|
|
'.$course['data']['slogan'].'</h6>
|
|
</div>';
|
|
}
|
|
|
|
|
|
?>
|
|
<p class="card-text"><?php echo $course['data']['description'];; ?></p>
|
|
|
|
<?php
|
|
|
|
if($studentInfos['data']['reg_completed'] == "yes"){
|
|
?>
|
|
<div class="text-center mt-4">
|
|
<a href="signature-completed.php" class="btn w-100 btn-info"><i class="ti ti-arrow-left"></i> Zurück zur Wochenübersicht</a>
|
|
</div>
|
|
<?php
|
|
} else{
|
|
|
|
|
|
$class_id = $studentInfos['data']['class'];
|
|
$deadline = getAll('deadline','tbl_applicationsettings');
|
|
|
|
if (mysqli_num_rows($deadline) > 0) {
|
|
$row = mysqli_fetch_assoc($deadline);
|
|
$deadline = $row['deadline'];
|
|
}
|
|
|
|
if (strtotime($deadline) <= strtotime('today')) {
|
|
?>
|
|
<div class="text-center mt-4">
|
|
<a href="register.php" class="btn w-100 btn-secondary"> Weiter zur Anmeldung<i class="ti ti-arrow-right"></i></a>
|
|
</div>
|
|
<?php
|
|
}
|
|
else{
|
|
echo '
|
|
<div class="text-center mt-4">
|
|
<button type="button" class="btn" disabled>Anmeldung noch nicht möglich</button>
|
|
</div>';
|
|
}
|
|
?>
|
|
<div class="text-center mt-4">
|
|
<a href="courses.php" class="btn w-100 btn-info"><i class="ti ti-arrow-left"></i> Zurück zur Kursübersicht</a>
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
}
|
|
include('includes/footer.php'); ?>
|