-
Notifications
You must be signed in to change notification settings - Fork 0
/
welcome.php
75 lines (67 loc) · 2.68 KB
/
welcome.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
session_start();
if (!isset($_SESSION['username'])) {
header("Location: login.php");
}
include('navbar.php');
$username = $_SESSION['username'];
$fileid = $_SESSION['fileid'];
$classroom = $_SESSION['classroom'];
$classroomowned = $_SESSION['classroomowned'];
$userSplit = explode('_', $username);
$niceUsername = ucfirst($userSplit[0]) . ' ' . ucfirst($userSplit[1]);
?>
<div class="page-wrapper">
<section class="hero is-warning">
<div class="hero-body">
<div class="container">
<h1 class="title">
Welcome to PyBox 👋
</h1>
<h2 class="subtitle">
<?= $niceUsername ?>
</h2>
</div>
</div>
</section>
<div class="container">
<a href="index.php">
<section class="hero is-link" style="margin-top: 2rem; border-radius: 8px">
<div class="hero-body">
<div class="container">
<h1 class="title">
👨💻 Python Editor
</h1>
<h2 class="subtitle">
Go to the Python Editor and start coding!
</h2>
</div>
</div>
</section>
</a>
<?php if ($classroom == $classroomowned) { echo('<a href="manage.php?classroom=' . $classroomowned . '">'); } ?>
<section class="hero is-danger" style="margin-top: 2rem; border-radius: 8px">
<div class="hero-body">
<div class="container">
<h1 class="title">
👩🏫 Classroom
</h1>
<h2 class="subtitle">
<?php
if ($classroom != "") {
echo ("You are part of the classroom <strong>" . $classroom . "</strong>.");
if ($classroom == $classroomowned) {
echo (" You can manage this classroom.");
}
} else {
echo ("You are not part of a classroom.");
}
?>
</h2>
</div>
</div>
</section>
<?php if ($classroom == $classroomowned) { echo('</a>'); } ?>
</div>
</div>
<?php include('footer.php'); ?>