Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
cd9b254
testing new navbar
jamesbarowik Jan 21, 2025
e43720b
added: new notes styling
jamesbarowik Jan 21, 2025
4050ff0
fixed: table style
jamesbarowik Jan 21, 2025
339c0e1
added: better notes
jamesbarowik Jan 22, 2025
2894e48
cookie update
jamesbarowik Jan 22, 2025
971c44a
archive: code
jamesbarowik Jan 22, 2025
2d45ff0
fixed: table readability
jamesbarowik Jan 22, 2025
c3cb0c6
Create empty-database.sql
jamesbarowik Jan 22, 2025
05c23d0
fixed: output error
jamesbarowik Jan 22, 2025
4aa240c
updated: database schema
jamesbarowik Jan 22, 2025
6b508f0
added: pull for the latest note to each item
jamesbarowik Jan 22, 2025
e5f6183
added: create notes to dashboard
jamesbarowik Jan 22, 2025
b91b920
added: button styling
jamesbarowik Jan 22, 2025
91daf45
added: style for create notes
jamesbarowik Jan 22, 2025
f8e4349
added: default date and time fields
jamesbarowik Jan 22, 2025
3b7a645
added: delete verify for staff
jamesbarowik Jan 23, 2025
fa0cb71
Update database.sql
jamesbarowik Jan 23, 2025
fea2921
fix: style
jamesbarowik Jan 23, 2025
d147f34
added: edit staff details
jamesbarowik Jan 23, 2025
140e92a
added: search by year group
jamesbarowik Jan 23, 2025
25750cf
moved audit-log to the server folder with other functions
jamesbarowik Jan 25, 2025
09d8241
Update database.sql
jamesbarowik Jan 25, 2025
5543976
added: decrement dose prompt to check amount
jamesbarowik Jan 25, 2025
c0ca3b6
Update bigtable.php
jamesbarowik Jan 25, 2025
ef18274
refactor entire whole school
jamesbarowik Jan 25, 2025
e79d523
added: dashboard navbar
jamesbarowik Jan 25, 2025
71baa03
added: insert_data global navbar
jamesbarowik Jan 25, 2025
a19f5db
added: bigtable
jamesbarowik Jan 25, 2025
fbdc213
added: whole_school navbar
jamesbarowik Jan 25, 2025
d107594
refactor: entire edit details
jamesbarowik Jan 26, 2025
9211848
refactor: finished progress student
jamesbarowik Jan 26, 2025
3f321a1
added: log_med navbar
jamesbarowik Jan 26, 2025
1b01a49
refactor staff management
jamesbarowik Jan 26, 2025
46162e7
added: vendor for compose
jamesbarowik Jan 26, 2025
4f7e12b
updated: admin dashboard
jamesbarowik Jan 26, 2025
80bc59b
added: meds management
jamesbarowik Jan 26, 2025
9dd3dc3
remove vendor
jamesbarowik Jan 26, 2025
5e91422
updated: gitignore
jamesbarowik Jan 26, 2025
bef4e43
added: README.md
jamesbarowik Jan 26, 2025
9378773
added: login error messages
jamesbarowik Jan 28, 2025
8c7aeb5
fixed: typo
jamesbarowik Jan 28, 2025
63660a3
fixed url
jamesbarowik Jan 28, 2025
417b1c2
added: formatting for the student medication table
jamesbarowik Jan 28, 2025
b4e0a97
fix: create notes style
jamesbarowik Jan 28, 2025
701330e
added: export specific users
jamesbarowik Jan 28, 2025
597479f
fix: style
jamesbarowik Jan 28, 2025
e6a8124
Update student_profile.php
jamesbarowik Jan 29, 2025
50283b2
fixed: error messages
jamesbarowik Jan 29, 2025
8c5492c
added: updated user cookie
jamesbarowik Jan 29, 2025
f4be4cd
refactor: cookie and navbar system AGAIN
jamesbarowik Jan 30, 2025
4ac14e9
added: database
jamesbarowik Jan 30, 2025
b771498
added audit-log changes
jamesbarowik Jan 30, 2025
ec451bd
update readme
jamesbarowik Jan 30, 2025
9d07b61
added: trip management
jamesbarowik Feb 2, 2025
6340b0b
edit navbar to remove student management
jamesbarowik Feb 2, 2025
6d520a7
added: single upload
jamesbarowik Feb 2, 2025
1ed2cac
added: bulk upload via csv
jamesbarowik Feb 2, 2025
001d250
removed insert_data
jamesbarowik Feb 2, 2025
80604e6
fix: navbar
jamesbarowik Feb 2, 2025
d6d40a0
finished: bulk upload
jamesbarowik Feb 2, 2025
87c23cc
added: audit for dashboard
jamesbarowik Feb 2, 2025
31c111a
added: all audit for big table
jamesbarowik Feb 3, 2025
a9560c3
added: all audit for dashboard
jamesbarowik Feb 3, 2025
18cf7fc
added: audit for students_profile
jamesbarowik Feb 3, 2025
19686d3
added: whole_school audit
jamesbarowik Feb 3, 2025
d1c8b62
added: log_new_med audit
jamesbarowik Feb 3, 2025
dba86cd
added: trip audit
jamesbarowik Feb 3, 2025
d914937
added: staff management audit
jamesbarowik Feb 3, 2025
be0345f
added: student management audit
jamesbarowik Feb 3, 2025
489813d
added: brand management audit
jamesbarowik Feb 3, 2025
c4fba25
added: brand audit
jamesbarowik Feb 3, 2025
e643f53
edit: audit-log
jamesbarowik Feb 3, 2025
07fed86
edit: login audit
jamesbarowik Feb 3, 2025
f82b601
Update add_new_brand.php
jamesbarowik Feb 3, 2025
09dd7e0
Update add_new_med.php
jamesbarowik Feb 3, 2025
8a42bf8
Update bigtable.php
jamesbarowik Feb 3, 2025
5b022fe
Update change_password.php
jamesbarowik Feb 3, 2025
409ffa3
Update create_user_data.php
jamesbarowik Feb 3, 2025
246f722
Update delete_user.php
jamesbarowik Feb 3, 2025
74d50dd
Update edit_student.php
jamesbarowik Feb 3, 2025
1fad750
Update edit_user.php
jamesbarowik Feb 3, 2025
f7acc1c
Update export_brands.php
jamesbarowik Feb 3, 2025
5d40650
update: audit
jamesbarowik Feb 3, 2025
e4fc776
added: audit
jamesbarowik Feb 8, 2025
fbd6776
added: super admin creation
jamesbarowik Feb 12, 2025
a035d75
added: database fix
jamesbarowik May 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/.idea
/.vscode
/vendor
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## UTC Medical Tracker

### Requirements
- Composer (Latest Version)
- PHP (Latest Version)
- MySQL (Latest Version)

#### Composer Libraries
```
composer install
```

### Linux Only
```
sudo chmod 777 /opt/lampp/htdocs/website/*
```
82 changes: 0 additions & 82 deletions admin/add/add_new_brand.php

This file was deleted.

92 changes: 0 additions & 92 deletions admin/add/add_new_med.php

This file was deleted.

81 changes: 81 additions & 0 deletions admin/add_new_brand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php


session_start();
include "../server/check_cookie_admin.php";
include "../server/db_connect.php";
include "../server/audit-log.php";
include "../server/navbar/admin_dashboard.php";
?>

<!DOCTYPE html>
<html>
<head>
<title>Hours Tracking - Add new Brand</title>
<link rel="stylesheet" href="../assets/style/style.css">
</head>
<body class="full_page_styling">
<br>

<div>
<ul class="nav_bar">
<div class="nav_left">
<li class="navbar_li"><a href="brand_management.php">View All Brands</a></li>
<li class="navbar_li"><a class='active' href="add_new_brand.php">Create New Brand</a></li>
<li class="navbar_li"><a href="export_brands.php">Export All Brand</a></li>
</div>
</ul>
</div>

<h1>Add new brand</h1>
<form method="post" action="">
<div class='text-element'>Enter brand name</div>
<div class='text-element-faded'>Example: Tesco</div>
<input class="text_input" type="text" id="brand" name="brand" required></td>
<br><br>
<button class="submit" type="submit">Submit</button>
</form>
</body>
<br><br>
<a class="back_link" href="brand_management.php">< Go Back</a>
</html>

<?php

// Check if form is submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (!empty($_POST['brand'])) {
try {
$sql = "INSERT INTO brand (brand_name) VALUES (?)";
$stmt = $conn->prepare($sql);
$stmt->bindParam(1, $_POST['brand'], PDO::PARAM_STR);
$stmt->execute();
echo "<br><br>";
echo '<div class="success-banner">';
echo '<div class="success-header">';
echo '<h2>Success</h2>';
echo '</div>';
echo '<div class="success-content">';
echo '<p>Brand sucessfully added</p>';
echo '</div>';
echo '</div>';

$staff_id = $_SESSION['staff_id'];
$staff_code = $_SESSION['staff_code'];
$brand_name = $_POST['brand'];
$source = "Add New Brand";
$action = "$staff_code created $brand_name";

logAction($conn, $staff_id, $action, $source);

header("refresh:10; url=brand_management.php");

} catch (PDOException $e) {
echo "Error: " . $e->getMessage();
}
} else {
echo "Please fill in the brand name.";
}
}

?>
92 changes: 92 additions & 0 deletions admin/add_new_med.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php
session_start();

include "../server/check_cookie_admin.php";
include "../server/db_connect.php";
include "../server/audit-log.php";
include "../server/navbar/admin_dashboard.php";
?>

<!DOCTYPE html>
<html>
<head>
<title>Hours Tracking - Add New Med</title>
<link rel="stylesheet" href=../assets/style/style.css>
</head>
<body class="full_page_styling">
<br>

<div>
<ul class="nav_bar">
<div class="nav_left">
<li class="navbar_li"><a href="medication_management.php">View All Medication</a></li>
<li class="navbar_li"><a class='active' href="add_new_med.php">Create New Medication</a></li>
<li class="navbar_li"><a href="export_meds.php">Export All Medication</a></li>
</div>
</ul>
</div>
<div>
</div>
<h1>Create new Medicine</h1>

<form method="post" action="">
<div class='text-element'>Enter med name</div>
<div class='text-element-faded'>Example: Paracetamol</div>
<input class="text_input" type="text" id="medication" name="medication" required>
<br><br>
<button class="submit" type="submit">Submit</button>
</form>
<br><br>
<a class="back_link" href="brand_management.php">< Go Back</a>
</div>

</body>

</html>


<?php
// Check if form is submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {

if (!empty($_POST['medication'])) {

try {

$sql = "INSERT INTO med (med_name) VALUES (?)";
$stmt = $conn->prepare($sql);
$stmt->bindParam(1, $_POST['medication'], PDO::PARAM_STR);
$stmt->execute();
echo "<br><br>";
echo '<div class="success-banner">';
echo '<div class="success-header">';
echo '<h2>Success</h2>';
echo '</div>';
echo '<div class="success-content">';
echo '<p>Medication successfully added!</p>';
echo '</div>';
echo '</div>';

$staff_id = $_SESSION['staff_id'];
$staff_code = $_SESSION['staff_code'];
$action = "$staff_code created $_POST[medication]";
$source = "Add New Medication";

logAction($conn, $staff_id, $action, $source);

header("refresh:10; url=medication_management.php");

} catch (PDOException $e) {

echo "Error: " . $e->getMessage();

}
} else {

echo "Please fill in the medication name.";

}

}

?>
Loading