-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsquery.php
More file actions
28 lines (27 loc) · 955 Bytes
/
jsquery.php
File metadata and controls
28 lines (27 loc) · 955 Bytes
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
<?php
include_once("connection.php");
include_once("function.php");
include_once("stickerfunctions.php");
if(!empty($_GET)){
if(!empty($_GET['students'])){
$studentquery = $db_attendance->query("SELECT studentid,firstname,lastname FROM studentdata WHERE current=1 ORDER BY firstname DESC");
$studentinfo = array();
while ($student_data = $studentquery->fetch_assoc()) {
array_push($studentinfo, $student_data);
}
foreach($studentinfo as $studentrow){
echo $studentrow['studentid'] . "," . $studentrow['firstname'] . "," . $studentrow['lastname'] . "---";
}
} elseif (!empty($_GET['pass'])){
if ($LoginResult = $db_stickers->query("SELECT student,admin FROM stickerpass")){
$LoginRow = $LoginResult->fetch_assoc();
$LoginResult->free();
}
$studentPW = $LoginRow['student'];
$adminPW = $LoginRow['admin'];
$SecureAdminPW = $adminPW;
$SecureStudentPW = $studentPW;
echo $SecureAdminPW . "," . $SecureStudentPW;
}
}
?>