-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
187 lines (172 loc) · 6.94 KB
/
index.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?php
ob_start();
session_start();
include("./config/connect.php");
function get_academic_year()
{
$con = get_con();
$sql = "SELECT * FROM config";
$result = $con->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while ($row = $result->fetch_assoc()) {
echo "<option value=\"" . $row["AcademicYear"] . "\">" . $row["AcademicYear"] . "</option>";
}
} else {
echo "None Added";
}
$con->close();
}
// get class from subjects
// keyword class
function get_classs()
{
$con = get_con();
$sql = "SELECT DISTINCT Class FROM subject";
$result = $con->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while ($row = $result->fetch_assoc()) {
echo "<option value=\"" . $row["Class"] . "\">" . $row["Class"] . "</option>";
}
} else {
echo "None Added";
}
$con->close();
}
ob_end_flush();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description"
content="Velapatrak is a timetable management site for college students, helping them organize their schedules and keep track of classes.">
<meta name="keywords" content="Velapatrak, timetable, management, college, students, schedule, classes">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link type="image/png" sizes="96x96" rel="icon" href="https://vazecollege.net/PATS/imgs/1611814068005.jpg">
<!-- basic html required -->
<link rel=" stylesheet" href="./css/main.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.2/html2pdf.bundle.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"
integrity="sha512-aVKKRRi/Q/YV+4mjoKBsE4x3H+BkegoM/em46NNlCqNTmUYADjBbeNefNxYV7giUp0VxICtqdrbqU7iVaeZNXA=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel=" stylesheet" href="./css/admin_dashboard.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
<title>Home</title>
<style>
td div {
height: max-content;
width: max-content;
}
</style>
</head>
<body>
<div>
<div class="w3-sidebar w3-bar-block" style="display:none" id="mySidebar">
<button onclick="w3_close()" class="w3-bar-item w3-button w3-large">×</button>
<a href="index.php" class="w3-bar-item w3-button w3-black">Home</a>
<a href="./account/login.php" class="w3-bar-item w3-button">Login</a>
<a href="./about.php" class="w3-bar-item w3-button">About</a>
</div>
<!-- Page Content -->
<div class="">
<button class="w3-button w3-xlarge" onclick="w3_open()">☰</button>
</div>
<div class="con_head">
<p>Vela-patrak </p>
</div>
<br>
<br>
<div class="container">
<p>
Because time-table matters.
</p>
<br>
<div id="timetable1" style="box-shadow:none;padding:4rem;margin:4rem !important"
class="form w3-margin w3-whitesmoke w3-bar-block">
<div class="form__div">
<label for="Academic Year">Academic Year:</label>
<select id="academic_year1" onchange="get_total_data(this.value)">
<option value="--">--</option>
<?php get_academic_year(); ?>
</select>
</div>
<br>
<cite style="margin-left:1.5rem">Year :</cite>
<p style="margin-left:1.5rem" id="say1"></p>
<?php
$con = get_con();
$sql = "SELECT COUNT(*) AS count FROM timeslot";
$result = $con->query($sql);
$result = $result->fetch_assoc();
$result = $result['count'];
$count1 = $result;
?>
<div class="div" style="display:flex;flex-direction:column;align-items:center">
<img src="./out/realwatermark.png" id="water" style="width:30rem;display:none" alt="img">
<table class="styled-table" style="border-collapse: collapse !important;" id="data">
<thread>
<tr>
<th>TimeSlot</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
</tr>
</thread>
<tbody id="load_data">
</tbody>
</table>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="conn" style="display: flex;flex-direction: column;align-items: center;">
<img id="foot" alt="pc"
src="https://bang-phinf.pstatic.net/a/32ehga/0_8g9Ud018bng1q157yzwrfmle_wzcvar.gif"
style="max-width: 15rem; height: auto; display: inline-block; position: relative;">
</div>
<br />
<p>© | Copyright 2022 - ♾️ All rights reserved | <a href="term.php">Terms &
Conditions</a> | <a href=" contributer.php">Contributors</a>
</p>
</div>
<script src="https://unpkg.com/scrollreveal"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js"></script>
<script src="./js/main.js"></script>
<script type="text/javascript">
var filename = null;
// get data timetable from
function get_total_data(data) {
console.log(data);
let academic_year = data;
console.log(academic_year);
$.ajax({
type: 'post',
url: './users/admin/adminajax.php',
data: "ad69=" + academic_year,
success: function(data) {
$('#load_data').html(data);
$('#water').show();
filename = academic_year + "_Master";
$('#say1').html('' + academic_year + '')
},
error: function() {
console.log(response.status);
},
})
}
</script>
</div>
</body>
</html>