update templates introduce request helper

This commit is contained in:
envoyr
2022-02-20 18:00:44 +01:00
parent e0540ceb7c
commit e057314795
41 changed files with 41521 additions and 275 deletions

View File

@@ -16,12 +16,13 @@
* @package Panel
*
*/
define('AREA', 'customer');
const AREA = 'customer';
$intrafficpage = 1;
require './lib/init.php';
require __DIR__ . '/lib/init.php';
use Froxlor\Database\Database;
use Froxlor\Settings;
use Froxlor\UI\Request;
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'traffic')) {
@@ -32,14 +33,10 @@ $traffic = '';
$month = null;
$year = null;
if (isset($_POST['month']) && isset($_POST['year'])) {
$month = intval($_POST['month']);
$year = intval($_POST['year']);
} elseif (isset($_GET['month']) && isset($_GET['year'])) {
$month = intval($_GET['month']);
$year = intval($_GET['year']);
} // BAM! $_GET???
elseif (isset($_GET['page']) && $_GET['page'] == 'current') {
if (Request::exist('month') && Request::exist('year')) {
$month = (int) Request::get('month');
$year = (int) Request::get('year');
} elseif (isset($_GET['page']) && $_GET['page'] == 'current') {
if (date('d') != '01') {
$month = date('m');
$year = date('Y');