A lot of code cleanup and code sanitation done.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use api\classes\API;
|
||||
use api\classes\API_office_stompjes;
|
||||
|
||||
if (!defined('APP_INIT')) {
|
||||
exit;
|
||||
@@ -14,11 +14,10 @@ if (!$GLOBALS['modules_enabled']['office']) {
|
||||
# IDE Section
|
||||
|
||||
# Includes Section
|
||||
include_once($_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_permissions.php');
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API.php';
|
||||
require_once "{$_SERVER['DOCUMENT_ROOT']}/api/classes/API_office_stompjes.php";
|
||||
|
||||
# Check permissions
|
||||
$API = new API();
|
||||
$API = new API_office_stompjes();
|
||||
if (!$API->checkPermissions('office-stompjes', 'RO', true)) {
|
||||
echo 'error 401 unauthorized';
|
||||
exit;
|
||||
@@ -35,7 +34,6 @@ $jsScriptLoadData['datepicker'] = true;
|
||||
|
||||
# PageClasses Setup
|
||||
|
||||
|
||||
# Retrieve Information for the page
|
||||
$stmt = $GLOBALS['conn']->query("SELECT user_uuid, user_full_name, user_first_name, user_profile_picture_thumbnail, user_stompable, user_email FROM system_users WHERE user_stompable = '1'");
|
||||
$administrators = [];
|
||||
@@ -50,6 +48,7 @@ if (!isset($_GET['fd'])) {
|
||||
$date = str_replace('/', '-', htmlspecialchars($_GET['fd'], ENT_QUOTES, 'UTF-8'));
|
||||
$SelectFromDate = strtotime($date . ' 00:00:00');
|
||||
}
|
||||
|
||||
if (!isset($_GET['td'])) {
|
||||
$SelectTillDate = time();
|
||||
} else {
|
||||
@@ -72,24 +71,22 @@ foreach ($stompjes as $stompje) {
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col d-flex justify-content-end px-1">
|
||||
<div class="col-lg-auto col-md-auto col-sm-auto mt-sm-1 px-1">
|
||||
<label>
|
||||
<h5><?php echo __('from') ?>: </h5>
|
||||
</label>
|
||||
<div class="d-flex align-items-center gap-2 justify-content-end">
|
||||
<h5><?php echo __('from') ?>: </h5>
|
||||
</div>
|
||||
<div class="col-lg-auto col-md-auto col-sm-auto">
|
||||
<div class="input-group">
|
||||
<label for="fd"></label>
|
||||
<input type="text" id="fd" class="form-control" data-datepicker="true" value="<?php echo date('d/m/Y', $SelectFromDate) ?>"/>
|
||||
<span class="input-group-text"><i class="fa fa-calendar-check"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-auto col-md-auto col-sm-auto mt-sm-1 px-2">
|
||||
<label>
|
||||
<h5><?php echo __('to') ?>: </h5>
|
||||
</label>
|
||||
<h5><?php echo __('to') ?>: </h5>
|
||||
</div>
|
||||
<div class="col-lg-auto col-md-auto col-sm-auto px-2">
|
||||
<div class="input-group">
|
||||
<label for="td"></label>
|
||||
<input type="text" id="td" class="form-control" data-datepicker="true" value="<?php echo date('d/m/Y', $SelectTillDate) ?>"/>
|
||||
<span class="input-group-text"><i class="fa fa-calendar-check"></i></span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user