Merge branch 'Development' into NewSystem

This commit is contained in:
Ibnu Maksum 2024-06-04 15:47:27 +07:00
commit 97f724c8c2
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
39 changed files with 4445 additions and 362 deletions

View File

@ -197,7 +197,7 @@ class Package
if ($plan_id != $b['plan_id']) { if ($plan_id != $b['plan_id']) {
$isChangePlan = true; $isChangePlan = true;
} }
if ($config['extend_expiry'] === 'yes') { if ($config['extend_expiry'] != 'no') {
if ($b['namebp'] == $p['name_plan'] && $b['status'] == 'on') { if ($b['namebp'] == $p['name_plan'] && $b['status'] == 'on') {
// if it same internet plan, expired will extend // if it same internet plan, expired will extend
if ($p['validity_unit'] == 'Months') { if ($p['validity_unit'] == 'Months') {
@ -399,7 +399,7 @@ class Package
if ($plan_id != $b['plan_id']) { if ($plan_id != $b['plan_id']) {
$isChangePlan = true; $isChangePlan = true;
} }
if ($config['extend_expiry'] === 'yes') { if ($config['extend_expiry'] != 'no') {
if ($b['namebp'] == $p['name_plan'] && $b['status'] == 'on') { if ($b['namebp'] == $p['name_plan'] && $b['status'] == 'on') {
// if it same internet plan, expired will extend // if it same internet plan, expired will extend
if ($p['validity_unit'] == 'Months') { if ($p['validity_unit'] == 'Months') {

View File

@ -172,7 +172,8 @@ class Radius
if ($p) { if ($p) {
// if exists // if exists
Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']); Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']); //Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']);
Radius::delAtribute(Radius::getTableCustomer(), 'Max-Data', 'username', $customer['username']);
$p->groupname = "plan_" . $plan['id']; $p->groupname = "plan_" . $plan['id'];
$p->save(); $p->save();
} else { } else {
@ -195,9 +196,9 @@ class Radius
$datalimit = $plan['data_limit'] . "000000000"; $datalimit = $plan['data_limit'] . "000000000";
else else
$datalimit = $plan['data_limit'] . "000000"; $datalimit = $plan['data_limit'] . "000000";
Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit); //Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit);
// Mikrotik Spesific // Mikrotik Spesific
//Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit); Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit);
//Radius::upsertCustomer($customer['username'], 'Mikrotik-Total-Limit', $datalimit); //Radius::upsertCustomer($customer['username'], 'Mikrotik-Total-Limit', $datalimit);
} else if ($plan['limit_type'] == "Both_Limit") { } else if ($plan['limit_type'] == "Both_Limit") {
if ($plan['time_unit'] == 'Hrs') if ($plan['time_unit'] == 'Hrs')
@ -208,10 +209,10 @@ class Radius
$datalimit = $plan['data_limit'] . "000000000"; $datalimit = $plan['data_limit'] . "000000000";
else else
$datalimit = $plan['data_limit'] . "000000"; $datalimit = $plan['data_limit'] . "000000";
Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit); //Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit);
Radius::upsertCustomer($customer['username'], 'Max-All-Session', $timelimit); Radius::upsertCustomer($customer['username'], 'Max-All-Session', $timelimit);
// Mikrotik Spesific // Mikrotik Spesific
//Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit); Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit);
//Radius::upsertCustomer($customer['username'], 'Mikrotik-Total-Limit', $datalimit); //Radius::upsertCustomer($customer['username'], 'Mikrotik-Total-Limit', $datalimit);
@ -219,9 +220,9 @@ class Radius
} }
} else { } else {
Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']); //Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']);
Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']); Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
//Radius::delAtribute(Radius::getTableCustomer(), 'Max-Data', 'username', $customer['username']); Radius::delAtribute(Radius::getTableCustomer(), 'Max-Data', 'username', $customer['username']);
} }
Radius::disconnectCustomer($customer['username']); Radius::disconnectCustomer($customer['username']);

View File

@ -156,6 +156,11 @@ try {
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>'); $ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
$ui->assign("error_title", "PHPNuxBill Crash"); $ui->assign("error_title", "PHPNuxBill Crash");
$ui->display('router-error.tpl'); $ui->display('router-error.tpl');
Message::sendTelegram(
"Sistem Error.\n" .
$e->getMessage() . "\n" .
$e->getTraceAsString()
);
die(); die();
} catch (Exception $e) { } catch (Exception $e) {
if (!Admin::getID()) { if (!Admin::getID()) {
@ -164,5 +169,10 @@ try {
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>'); $ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
$ui->assign("error_title", "PHPNuxBill Crash"); $ui->assign("error_title", "PHPNuxBill Crash");
$ui->display('router-error.tpl'); $ui->display('router-error.tpl');
Message::sendTelegram(
"Sistem Error.\n" .
$e->getMessage() . "\n" .
$e->getTraceAsString()
);
die(); die();
} }

View File

@ -1,6 +1,6 @@
{ {
"require": { "require": {
"mpdf/mpdf": "^8.1", "mpdf/mpdf": "^8.1",
"smarty/smarty": "^4.3" "smarty/smarty": "=4.5.3"
} }
} }

16
system/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "81c1d3c4b2673fdd2922ac32768d59f1", "content-hash": "a33a5e0440af423877195440decefd29",
"packages": [ "packages": [
{ {
"name": "mpdf/mpdf", "name": "mpdf/mpdf",
@ -413,16 +413,16 @@
}, },
{ {
"name": "smarty/smarty", "name": "smarty/smarty",
"version": "v4.3.1", "version": "v4.5.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/smarty-php/smarty.git", "url": "https://github.com/smarty-php/smarty.git",
"reference": "e28cb0915b4e3749bf57d4ebae2984e25395cfe5" "reference": "9fc96a13dbaf546c3d7bcf95466726578cd4e0fa"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/e28cb0915b4e3749bf57d4ebae2984e25395cfe5", "url": "https://api.github.com/repos/smarty-php/smarty/zipball/9fc96a13dbaf546c3d7bcf95466726578cd4e0fa",
"reference": "e28cb0915b4e3749bf57d4ebae2984e25395cfe5", "reference": "9fc96a13dbaf546c3d7bcf95466726578cd4e0fa",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -473,9 +473,9 @@
"support": { "support": {
"forum": "https://github.com/smarty-php/smarty/discussions", "forum": "https://github.com/smarty-php/smarty/discussions",
"issues": "https://github.com/smarty-php/smarty/issues", "issues": "https://github.com/smarty-php/smarty/issues",
"source": "https://github.com/smarty-php/smarty/tree/v4.3.1" "source": "https://github.com/smarty-php/smarty/tree/v4.5.3"
}, },
"time": "2023-03-28T19:47:03+00:00" "time": "2024-05-28T21:46:01+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
@ -486,5 +486,5 @@
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": [],
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.3.0" "plugin-api-version": "2.6.0"
} }

View File

@ -623,5 +623,13 @@
"Tax_Rates_in_percentage": "Tax Rates in percentage", "Tax_Rates_in_percentage": "Tax Rates in percentage",
"Custom_Tax_Rate": "Custom Tax Rate", "Custom_Tax_Rate": "Custom Tax Rate",
"Enter_Custom_Tax_Rate": "Enter Custom Tax Rate", "Enter_Custom_Tax_Rate": "Enter Custom Tax Rate",
"Enter_the_custom_tax_rate__e_g___3_75_for_3_75__": "Enter the custom tax rate (e.g., 3.75 for 3.75%)" "Enter_the_custom_tax_rate__e_g___3_75_for_3_75__": "Enter the custom tax rate (e.g., 3.75 for 3.75%)",
"Additional_Information": "Additional Information",
"City_of_Resident": "City of Resident",
"District": "District",
"State": "State",
"State_of_Resident": "State of Resident",
"Zip": "Zip",
"Zip_Code": "Zip Code",
"": ""
} }

View File

@ -45,35 +45,34 @@ class ClassLoader
/** @var \Closure(string):void */ /** @var \Closure(string):void */
private static $includeFile; private static $includeFile;
/** @var ?string */ /** @var string|null */
private $vendorDir; private $vendorDir;
// PSR-4 // PSR-4
/** /**
* @var array[] * @var array<string, array<string, int>>
* @psalm-var array<string, array<string, int>>
*/ */
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
/** /**
* @var array[] * @var array<string, list<string>>
* @psalm-var array<string, array<int, string>>
*/ */
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
/** /**
* @var array[] * @var list<string>
* @psalm-var array<string, string>
*/ */
private $fallbackDirsPsr4 = array(); private $fallbackDirsPsr4 = array();
// PSR-0 // PSR-0
/** /**
* @var array[] * List of PSR-0 prefixes
* @psalm-var array<string, array<string, string[]>> *
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/ */
private $prefixesPsr0 = array(); private $prefixesPsr0 = array();
/** /**
* @var array[] * @var list<string>
* @psalm-var array<string, string>
*/ */
private $fallbackDirsPsr0 = array(); private $fallbackDirsPsr0 = array();
@ -81,8 +80,7 @@ class ClassLoader
private $useIncludePath = false; private $useIncludePath = false;
/** /**
* @var string[] * @var array<string, string>
* @psalm-var array<string, string>
*/ */
private $classMap = array(); private $classMap = array();
@ -90,21 +88,20 @@ class ClassLoader
private $classMapAuthoritative = false; private $classMapAuthoritative = false;
/** /**
* @var bool[] * @var array<string, bool>
* @psalm-var array<string, bool>
*/ */
private $missingClasses = array(); private $missingClasses = array();
/** @var ?string */ /** @var string|null */
private $apcuPrefix; private $apcuPrefix;
/** /**
* @var self[] * @var array<string, self>
*/ */
private static $registeredLoaders = array(); private static $registeredLoaders = array();
/** /**
* @param ?string $vendorDir * @param string|null $vendorDir
*/ */
public function __construct($vendorDir = null) public function __construct($vendorDir = null)
{ {
@ -113,7 +110,7 @@ class ClassLoader
} }
/** /**
* @return string[] * @return array<string, list<string>>
*/ */
public function getPrefixes() public function getPrefixes()
{ {
@ -125,8 +122,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return array<string, list<string>>
* @psalm-return array<string, array<int, string>>
*/ */
public function getPrefixesPsr4() public function getPrefixesPsr4()
{ {
@ -134,8 +130,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return list<string>
* @psalm-return array<string, string>
*/ */
public function getFallbackDirs() public function getFallbackDirs()
{ {
@ -143,8 +138,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return list<string>
* @psalm-return array<string, string>
*/ */
public function getFallbackDirsPsr4() public function getFallbackDirsPsr4()
{ {
@ -152,8 +146,7 @@ class ClassLoader
} }
/** /**
* @return string[] Array of classname => path * @return array<string, string> Array of classname => path
* @psalm-return array<string, string>
*/ */
public function getClassMap() public function getClassMap()
{ {
@ -161,8 +154,7 @@ class ClassLoader
} }
/** /**
* @param string[] $classMap Class to filename map * @param array<string, string> $classMap Class to filename map
* @psalm-param array<string, string> $classMap
* *
* @return void * @return void
*/ */
@ -179,24 +171,25 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either * Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix. * appending or prepending to the ones previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories * @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @return void * @return void
*/ */
public function add($prefix, $paths, $prepend = false) public function add($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr0 $this->fallbackDirsPsr0
); );
} else { } else {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0, $this->fallbackDirsPsr0,
(array) $paths $paths
); );
} }
@ -205,19 +198,19 @@ class ClassLoader
$first = $prefix[0]; $first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) { if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths; $this->prefixesPsr0[$first][$prefix] = $paths;
return; return;
} }
if ($prepend) { if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixesPsr0[$first][$prefix] $this->prefixesPsr0[$first][$prefix]
); );
} else { } else {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix], $this->prefixesPsr0[$first][$prefix],
(array) $paths $paths
); );
} }
} }
@ -226,9 +219,9 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either * Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace. * appending or prepending to the ones previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
@ -236,17 +229,18 @@ class ClassLoader
*/ */
public function addPsr4($prefix, $paths, $prepend = false) public function addPsr4($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
// Register directories for the root namespace. // Register directories for the root namespace.
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr4 $this->fallbackDirsPsr4
); );
} else { } else {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4, $this->fallbackDirsPsr4,
(array) $paths $paths
); );
} }
} elseif (!isset($this->prefixDirsPsr4[$prefix])) { } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@ -256,18 +250,18 @@ class ClassLoader
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
} }
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths; $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) { } elseif ($prepend) {
// Prepend directories for an already registered namespace. // Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixDirsPsr4[$prefix] $this->prefixDirsPsr4[$prefix]
); );
} else { } else {
// Append directories for an already registered namespace. // Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix], $this->prefixDirsPsr4[$prefix],
(array) $paths $paths
); );
} }
} }
@ -276,8 +270,8 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, * Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix. * replacing any others previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories * @param list<string>|string $paths The PSR-0 base directories
* *
* @return void * @return void
*/ */
@ -294,8 +288,8 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, * Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace. * replacing any others previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
@ -481,9 +475,9 @@ class ClassLoader
} }
/** /**
* Returns the currently registered loaders indexed by their corresponding vendor directories. * Returns the currently registered loaders keyed by their corresponding vendor directories.
* *
* @return self[] * @return array<string, self>
*/ */
public static function getRegisteredLoaders() public static function getRegisteredLoaders()
{ {

View File

@ -428,17 +428,17 @@
}, },
{ {
"name": "smarty/smarty", "name": "smarty/smarty",
"version": "v4.3.1", "version": "v4.5.3",
"version_normalized": "4.3.1.0", "version_normalized": "4.5.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/smarty-php/smarty.git", "url": "https://github.com/smarty-php/smarty.git",
"reference": "e28cb0915b4e3749bf57d4ebae2984e25395cfe5" "reference": "9fc96a13dbaf546c3d7bcf95466726578cd4e0fa"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/e28cb0915b4e3749bf57d4ebae2984e25395cfe5", "url": "https://api.github.com/repos/smarty-php/smarty/zipball/9fc96a13dbaf546c3d7bcf95466726578cd4e0fa",
"reference": "e28cb0915b4e3749bf57d4ebae2984e25395cfe5", "reference": "9fc96a13dbaf546c3d7bcf95466726578cd4e0fa",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -448,7 +448,7 @@
"phpunit/phpunit": "^8.5 || ^7.5", "phpunit/phpunit": "^8.5 || ^7.5",
"smarty/smarty-lexer": "^3.1" "smarty/smarty-lexer": "^3.1"
}, },
"time": "2023-03-28T19:47:03+00:00", "time": "2024-05-28T21:46:01+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -491,7 +491,7 @@
"support": { "support": {
"forum": "https://github.com/smarty-php/smarty/discussions", "forum": "https://github.com/smarty-php/smarty/discussions",
"issues": "https://github.com/smarty-php/smarty/issues", "issues": "https://github.com/smarty-php/smarty/issues",
"source": "https://github.com/smarty-php/smarty/tree/v4.3.1" "source": "https://github.com/smarty-php/smarty/tree/v4.5.3"
}, },
"install-path": "../smarty/smarty" "install-path": "../smarty/smarty"
} }

View File

@ -3,7 +3,7 @@
'name' => '__root__', 'name' => '__root__',
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => '54ec065e9828504253781c3720f0dabece50aa35', 'reference' => 'a9c0e955937e3ccb2ff050c71b77353b298a982b',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@ -13,7 +13,7 @@
'__root__' => array( '__root__' => array(
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => '54ec065e9828504253781c3720f0dabece50aa35', 'reference' => 'a9c0e955937e3ccb2ff050c71b77353b298a982b',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@ -83,9 +83,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'smarty/smarty' => array( 'smarty/smarty' => array(
'pretty_version' => 'v4.3.1', 'pretty_version' => 'v4.5.3',
'version' => '4.3.1.0', 'version' => '4.5.3.0',
'reference' => 'e28cb0915b4e3749bf57d4ebae2984e25395cfe5', 'reference' => '9fc96a13dbaf546c3d7bcf95466726578cd4e0fa',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../smarty/smarty', 'install_path' => __DIR__ . '/../smarty/smarty',
'aliases' => array(), 'aliases' => array(),

3625
system/vendor/smarty/smarty/CHANGELOG.md vendored Normal file

File diff suppressed because it is too large Load Diff

179
system/vendor/smarty/smarty/LICENSE vendored Normal file
View File

@ -0,0 +1,179 @@
Smarty: the PHP compiling template engine
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License below for more details.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

20
system/vendor/smarty/smarty/README.md vendored Normal file
View File

@ -0,0 +1,20 @@
# Smarty template engine
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic.
![CI](https://github.com/smarty-php/smarty/workflows/CI/badge.svg)
## Documentation
Read the [documentation](https://smarty-php.github.io/smarty/) to find out how to use it.
## Requirements
Smarty can be run with PHP 7.1 to PHP 8.3.
## Installation
Smarty versions 3.1.11 or later can be installed with [Composer](https://getcomposer.org/).
To get the latest stable version of Smarty use:
```bash
composer require smarty/smarty
````
More in the [Getting Started](./docs/getting-started.md) section of the docs.

20
system/vendor/smarty/smarty/SECURITY.md vendored Normal file
View File

@ -0,0 +1,20 @@
# Security Policy
## Supported Versions
Smarty currently supports the latest minor version of Smarty 3 and Smarty 4.
| Version | Supported |
|---------|--------------------|
| 4.3.x | :white_check_mark: |
| 3.1.x | :white_check_mark: |
| < 3.1 | :x: |
## Reporting a Vulnerability
If you have discovered a security issue with Smarty, please contact us at mail [at] simonwisselink.nl. Do not
disclose your findings publicly and **PLEASE** do not file an Issue (because that would disclose your findings
publicly.)
We will try to confirm the vulnerability and develop a fix if appropriate. When we release the fix, we will publish
a security release. Please let us know if you want to be credited.

View File

@ -0,0 +1,49 @@
{
"name": "smarty/smarty",
"type": "library",
"description": "Smarty - the compiling PHP template engine",
"keywords": [
"templating"
],
"homepage": "https://smarty-php.github.io/smarty/",
"license": "LGPL-3.0",
"authors": [
{
"name": "Monte Ohrt",
"email": "monte@ohrt.com"
},
{
"name": "Uwe Tews",
"email": "uwe.tews@googlemail.com"
},
{
"name": "Rodney Rehm",
"email": "rodney.rehm@medialize.de"
},
{
"name": "Simon Wisselink",
"homepage": "https://www.iwink.nl/"
}
],
"support": {
"issues": "https://github.com/smarty-php/smarty/issues",
"forum": "https://github.com/smarty-php/smarty/discussions"
},
"require": {
"php": "^7.1 || ^8.0"
},
"autoload": {
"classmap": [
"libs/"
]
},
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
}
},
"require-dev": {
"phpunit/phpunit": "^8.5 || ^7.5",
"smarty/smarty-lexer": "^3.1"
}
}

View File

@ -785,6 +785,9 @@ value(res) ::= ns1(c)DOUBLECOLON static_class_access(s). {
if (isset($this->smarty->registered_classes[c])) { if (isset($this->smarty->registered_classes[c])) {
res = $this->smarty->registered_classes[c].'::'.s[0].s[1]; res = $this->smarty->registered_classes[c].'::'.s[0].s[1];
} else { } else {
trigger_error('Using unregistered static method "' . c.'::'.s[0] . '" in a template is deprecated and will be ' .
'removed in a future release. Use Smarty::registerClass to explicitly register ' .
'a class for access.', E_USER_DEPRECATED);
res = c.'::'.s[0].s[1]; res = c.'::'.s[0].s[1];
} }
} else { } else {

View File

@ -107,7 +107,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '4.3.1'; const SMARTY_VERSION = '4.5.3';
/** /**
* define variable scopes * define variable scopes
*/ */

View File

@ -167,9 +167,7 @@
</html> </html>
{/capture} {/capture}
<script type="text/javascript"> <script type="text/javascript">
{$id = '__Smarty__'} _smarty_console = window.open("", "console{$targetWindow}", "width=1024,height=600,left={$offset},top={$offset},resizable,scrollbars=yes");
{if $display_mode}{$id = "$offset$template_name"|md5}{/if}
_smarty_console = window.open("", "console{$id}", "width=1024,height=600,left={$offset},top={$offset},resizable,scrollbars=yes");
_smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}"); _smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}");
_smarty_console.document.close(); _smarty_console.document.close();
</script> </script>

View File

@ -67,7 +67,7 @@ function smarty_function_math($params, $template)
$equation = preg_replace('/\s+/', '', $equation); $equation = preg_replace('/\s+/', '', $equation);
// Adapted from https://www.php.net/manual/en/function.eval.php#107377 // Adapted from https://www.php.net/manual/en/function.eval.php#107377
$number = '(?:\d+(?:[,.]\d+)?|pi|π)'; // What is a number $number = '-?(?:\d+(?:[,.]\d+)?|pi|π)'; // What is a number
$functionsOrVars = '((?:0x[a-fA-F0-9]+)|([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))'; $functionsOrVars = '((?:0x[a-fA-F0-9]+)|([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))';
$operators = '[,+\/*\^%-]'; // Allowed math operators $operators = '[,+\/*\^%-]'; // Allowed math operators
$regexp = '/^(('.$number.'|'.$functionsOrVars.'|('.$functionsOrVars.'\s*\((?1)*\)|\((?1)*\)))(?:'.$operators.'(?1))?)+$/'; $regexp = '/^(('.$number.'|'.$functionsOrVars.'|('.$functionsOrVars.'\s*\((?1)*\)|\((?1)*\)))(?:'.$operators.'(?1))?)+$/';

View File

@ -0,0 +1,15 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
function smarty_modifier_implode($values, $separator = '')
{
if (is_array($separator)) {
return implode((string) ($values ?? ''), (array) $separator);
}
return implode((string) ($separator ?? ''), (array) $values);
}

View File

@ -0,0 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
function smarty_modifiercompiler_json_encode($params) {
return 'json_encode(' . $params[0] . (isset($params[1]) ? ', (int) ' . $params[1] : '') . ')';
}

View File

@ -21,7 +21,7 @@
function smarty_modifiercompiler_strip_tags($params) function smarty_modifiercompiler_strip_tags($params)
{ {
if (!isset($params[ 1 ]) || $params[ 1 ] === true || trim($params[ 1 ], '"') === 'true') { if (!isset($params[ 1 ]) || $params[ 1 ] === true || trim($params[ 1 ], '"') === 'true') {
return "preg_replace('!<[^>]*?>!', ' ', {$params[0]} ?: '')"; return "preg_replace('!<[^>]*?>!', ' ', (string) {$params[0]})";
} else { } else {
return 'strip_tags((string) ' . $params[ 0 ] . ')'; return 'strip_tags((string) ' . $params[ 0 ] . ')';
} }

View File

@ -0,0 +1,12 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
function smarty_modifiercompiler_substr($params) {
return 'substr((string) ' . $params[0] . ', (int) ' . $params[1] .
(isset($params[2]) ? ', (int) ' . $params[2] : '') . ')';
}

View File

@ -30,7 +30,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
* *
* @var array * @var array
*/ */
public $optional_attributes = array('extends_resource'); public $optional_attributes = array();
/** /**
* Attribute definition: Overwrites base class. * Attribute definition: Overwrites base class.
@ -62,29 +62,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
} }
// add code to initialize inheritance // add code to initialize inheritance
$this->registerInit($compiler, true); $this->registerInit($compiler, true);
$file = trim($_attr[ 'file' ], '\'"'); $this->compileEndChild($compiler, $_attr[ 'file' ]);
if (strlen($file) > 8 && substr($file, 0, 8) === 'extends:') {
// generate code for each template
$files = array_reverse(explode('|', substr($file, 8)));
$i = 0;
foreach ($files as $file) {
if ($file[ 0 ] === '"') {
$file = trim($file, '".');
} else {
$file = "'{$file}'";
}
$i++;
if ($i === count($files) && isset($_attr[ 'extends_resource' ])) {
$this->compileEndChild($compiler);
}
$this->compileInclude($compiler, $file);
}
if (!isset($_attr[ 'extends_resource' ])) {
$this->compileEndChild($compiler);
}
} else {
$this->compileEndChild($compiler, $_attr[ 'file' ]);
}
$compiler->has_code = false; $compiler->has_code = false;
return ''; return '';
} }
@ -115,44 +93,4 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
'') . ");\n?>" '') . ");\n?>"
); );
} }
/**
* Add code for including subtemplate to end of template
*
* @param \Smarty_Internal_TemplateCompilerBase $compiler
* @param string $template subtemplate name
*
* @throws \SmartyCompilerException
* @throws \SmartyException
*/
private function compileInclude(Smarty_Internal_TemplateCompilerBase $compiler, $template)
{
$compiler->parser->template_postfix[] = new Smarty_Internal_ParseTree_Tag(
$compiler->parser,
$compiler->compileTag(
'include',
array(
$template,
array('scope' => 'parent')
)
)
);
}
/**
* Create source code for {extends} from source components array
*
* @param \Smarty_Internal_Template $template
*
* @return string
*/
public static function extendsSourceArrayCode(Smarty_Internal_Template $template)
{
$resources = array();
foreach ($template->source->components as $source) {
$resources[] = $source->resource;
}
return $template->smarty->left_delimiter . 'extends file=\'extends:' . join('|', $resources) .
'\' extends_resource=true' . $template->smarty->right_delimiter;
}
} }

View File

@ -109,9 +109,11 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
if (!is_object($compiler->smarty->security_policy) if (!is_object($compiler->smarty->security_policy)
|| $compiler->smarty->security_policy->isTrustedPhpModifier($modifier, $compiler) || $compiler->smarty->security_policy->isTrustedPhpModifier($modifier, $compiler)
) { ) {
trigger_error('Using php-function "' . $modifier . '" as a modifier is deprecated and will be ' . if (!in_array($modifier, ['time', 'join', 'is_array', 'in_array'])) {
'removed in a future release. Use Smarty::registerPlugin to explicitly register ' . trigger_error('Using unregistered function "' . $modifier . '" in a template is deprecated and will be ' .
'a custom modifier.', E_USER_DEPRECATED); 'removed in a future release. Use Smarty::registerPlugin to explicitly register ' .
'a custom modifier.', E_USER_DEPRECATED);
}
$output = "{$modifier}({$params})"; $output = "{$modifier}({$params})";
} }
$compiler->known_modifier_type[ $modifier ] = $type; $compiler->known_modifier_type[ $modifier ] = $type;

View File

@ -93,7 +93,7 @@ class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_C
} }
// autoescape html // autoescape html
if ($compiler->template->smarty->escape_html) { if ($compiler->template->smarty->escape_html) {
$output = "htmlspecialchars((string) {$output}, ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')"; $output = "htmlspecialchars((string) ({$output}), ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')";
} }
// loop over registered filters // loop over registered filters
if (!empty($compiler->template->smarty->registered_filters[ Smarty::FILTER_VARIABLE ])) { if (!empty($compiler->template->smarty->registered_filters[ Smarty::FILTER_VARIABLE ])) {

View File

@ -238,9 +238,12 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$_config_vars = $ptr->config_vars; $_config_vars = $ptr->config_vars;
ksort($_config_vars); ksort($_config_vars);
$debugging = $smarty->debugging; $debugging = $smarty->debugging;
$templateName = $obj->source->type . ':' . $obj->source->name;
$displayMode = $debugging === 2 || !$full;
$offset = $this->offset * 50;
$_template = new Smarty_Internal_Template($debObj->debug_tpl, $debObj); $_template = new Smarty_Internal_Template($debObj->debug_tpl, $debObj);
if ($obj->_isTplObj()) { if ($obj->_isTplObj()) {
$_template->assign('template_name', $obj->source->type . ':' . $obj->source->name); $_template->assign('template_name', $templateName);
} }
if ($obj->_objType === 1 || $full) { if ($obj->_objType === 1 || $full) {
$_template->assign('template_data', $this->template_data[ $this->index ]); $_template->assign('template_data', $this->template_data[ $this->index ]);
@ -250,8 +253,8 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$_template->assign('assigned_vars', $_assigned_vars); $_template->assign('assigned_vars', $_assigned_vars);
$_template->assign('config_vars', $_config_vars); $_template->assign('config_vars', $_config_vars);
$_template->assign('execution_time', microtime(true) - $smarty->start_time); $_template->assign('execution_time', microtime(true) - $smarty->start_time);
$_template->assign('display_mode', $debugging === 2 || !$full); $_template->assign('targetWindow', $displayMode ? md5("$offset$templateName") : '__Smarty__');
$_template->assign('offset', $this->offset * 50); $_template->assign('offset', $offset);
echo $_template->fetch(); echo $_template->fetch();
if (isset($full)) { if (isset($full)) {
$this->index--; $this->index--;

View File

@ -17,6 +17,12 @@ class Smarty_Internal_ErrorHandler
*/ */
public $allowUndefinedVars = true; public $allowUndefinedVars = true;
/**
* Allows {$foo->propName} where propName is undefined.
* @var bool
*/
public $allowUndefinedProperties = true;
/** /**
* Allows {$foo.bar} where bar is unset and {$foo.bar1.bar2} where either bar1 or bar2 is unset. * Allows {$foo.bar} where bar is unset and {$foo.bar1.bar2} where either bar1 or bar2 is unset.
* @var bool * @var bool
@ -80,8 +86,15 @@ class Smarty_Internal_ErrorHandler
return; // suppresses this error return; // suppresses this error
} }
if ($this->allowUndefinedProperties && preg_match(
'/^(Undefined property)/',
$errstr
)) {
return; // suppresses this error
}
if ($this->allowUndefinedArrayKeys && preg_match( if ($this->allowUndefinedArrayKeys && preg_match(
'/^(Undefined index|Undefined array key|Trying to access array offset on value of type)/', '/^(Undefined index|Undefined array key|Trying to access array offset on)/',
$errstr $errstr
)) { )) {
return; // suppresses this error return; // suppresses this error

View File

@ -455,15 +455,29 @@ abstract class Smarty_Internal_TemplateCompilerBase
$this->smarty->_current_file = $this->template->source->filepath; $this->smarty->_current_file = $this->template->source->filepath;
// get template source // get template source
if (!empty($this->template->source->components)) { if (!empty($this->template->source->components)) {
// we have array of inheritance templates by extends: resource $_compiled_code = '<?php $_smarty_tpl->_loadInheritance(); $_smarty_tpl->inheritance->init($_smarty_tpl, true); ?>';
// generate corresponding source code sequence
$_content = $i = 0;
Smarty_Internal_Compile_Extends::extendsSourceArrayCode($this->template); $reversed_components = array_reverse($this->template->getSource()->components);
foreach ($reversed_components as $source) {
$i++;
if ($i === count($reversed_components)) {
$_compiled_code .= '<?php $_smarty_tpl->inheritance->endChild($_smarty_tpl); ?>';
}
$_compiled_code .= $this->compileTag(
'include',
[
var_export($source->resource, true),
['scope' => 'parent'],
]
);
}
$_compiled_code = $this->postFilter($_compiled_code, $this->template);
} else { } else {
// get template source // get template source
$_content = $this->template->source->getContent(); $_content = $this->template->source->getContent();
$_compiled_code = $this->postFilter($this->doCompile($this->preFilter($_content), true));
} }
$_compiled_code = $this->postFilter($this->doCompile($this->preFilter($_content), true));
if (!empty($this->required_plugins[ 'compiled' ]) || !empty($this->required_plugins[ 'nocache' ])) { if (!empty($this->required_plugins[ 'compiled' ]) || !empty($this->required_plugins[ 'nocache' ])) {
$_compiled_code = '<?php ' . $this->compileRequiredPlugins() . "?>\n" . $_compiled_code; $_compiled_code = '<?php ' . $this->compileRequiredPlugins() . "?>\n" . $_compiled_code;
} }
@ -640,7 +654,18 @@ abstract class Smarty_Internal_TemplateCompilerBase
return $func_name . '(' . $parameter[ 0 ] . ')'; return $func_name . '(' . $parameter[ 0 ] . ')';
} }
} else { } else {
return $name . '(' . implode(',', $parameter) . ')';
if (
!$this->smarty->loadPlugin('smarty_modifiercompiler_' . $name)
&& !isset($this->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$name])
&& !in_array($name, ['time', 'join', 'is_array', 'in_array'])
) {
trigger_error('Using unregistered function "' . $name . '" in a template is deprecated and will be ' .
'removed in a future release. Use Smarty::registerPlugin to explicitly register ' .
'a custom modifier.', E_USER_DEPRECATED);
}
return $name . '(' . implode(',', $parameter) . ')';
} }
} else { } else {
$this->trigger_template_error("unknown function '{$name}'"); $this->trigger_template_error("unknown function '{$name}'");

View File

@ -2425,6 +2425,9 @@ public static $yy_action = array(
if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) { if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) {
$this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1]; $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1];
} else { } else {
trigger_error('Using unregistered static method "' . $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor[0] . '" in a template is deprecated and will be ' .
'removed in a future release. Use Smarty::registerClass to explicitly register ' .
'a class for access.', E_USER_DEPRECATED);
$this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1]; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1];
} }
} else { } else {

View File

@ -253,7 +253,7 @@ class Smarty_Security
* *
* @param string $function_name * @param string $function_name
* @param object $compiler compiler object * @param object $compiler compiler object
* * @deprecated
* @return boolean true if function is trusted * @return boolean true if function is trusted
*/ */
public function isTrustedPhpFunction($function_name, $compiler) public function isTrustedPhpFunction($function_name, $compiler)

View File

@ -85,7 +85,7 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
* *
* @param Smarty_Internal_Template $_template * @param Smarty_Internal_Template $_template
* *
* @return string * @return void
* @throws Exception * @throws Exception
*/ */
public function render(Smarty_Internal_Template $_template) public function render(Smarty_Internal_Template $_template)

125
system/vendor/smarty/smarty/mkdocs.yml vendored Normal file
View File

@ -0,0 +1,125 @@
site_name: Smarty Documentation
theme:
name: material
palette:
primary: amber
features:
- content.code.copy
- navigation.tabs
- navigation.tabs.sticky
- navigation.instant
- navigation.tracking
icon:
logo: material/lightbulb-on
favicon: images/favicon.ico
extra:
version:
provider: mike
markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
nav:
- Home: 'index.md'
- 'Getting started':
- Introduction: 'getting-started.md'
- 'Upgrading from an older version': 'upgrading.md'
- 'Designers':
- 'Basic Syntax':
- Introduction: 'designers/language-basic-syntax/index.md'
- Comments: 'designers/language-basic-syntax/language-syntax-comments.md'
- Variables: 'designers/language-basic-syntax/language-syntax-variables.md'
- Functions: 'designers/language-basic-syntax/language-syntax-functions.md'
- Attributes: 'designers/language-basic-syntax/language-syntax-attributes.md'
- Quotes: 'designers/language-basic-syntax/language-syntax-quotes.md'
- Math: 'designers/language-basic-syntax/language-math.md'
- 'Escaping Smarty parsing': 'designers/language-basic-syntax/language-escaping.md'
- 'Variables':
- 'Introduction': 'designers/language-variables/index.md'
- 'Assigned from PHP': 'designers/language-variables/language-assigned-variables.md'
- 'Variable scopes': 'designers/language-variables/language-variable-scopes.md'
- 'From config files': 'designers/language-variables/language-config-variables.md'
- '{$smarty}': 'designers/language-variables/language-variables-smarty.md'
- 'Modifiers':
- 'Introduction': 'designers/language-modifiers/index.md'
- 'capitalize': 'designers/language-modifiers/language-modifier-capitalize.md'
- 'cat': 'designers/language-modifiers/language-modifier-cat.md'
- 'count_characters': 'designers/language-modifiers/language-modifier-count-characters.md'
- 'count_paragraphs': 'designers/language-modifiers/language-modifier-count-paragraphs.md'
- 'count_sentences': 'designers/language-modifiers/language-modifier-count-sentences.md'
- 'count_words': 'designers/language-modifiers/language-modifier-count-words.md'
- 'date_format': 'designers/language-modifiers/language-modifier-date-format.md'
- 'default': 'designers/language-modifiers/language-modifier-default.md'
- 'escape': 'designers/language-modifiers/language-modifier-escape.md'
- 'from_charset': 'designers/language-modifiers/language-modifier-from-charset.md'
- 'indent': 'designers/language-modifiers/language-modifier-indent.md'
- 'lower': 'designers/language-modifiers/language-modifier-lower.md'
- 'nl2br': 'designers/language-modifiers/language-modifier-nl2br.md'
- 'regex_replace': 'designers/language-modifiers/language-modifier-regex-replace.md'
- 'replace': 'designers/language-modifiers/language-modifier-replace.md'
- 'spacify': 'designers/language-modifiers/language-modifier-spacify.md'
- 'string_format': 'designers/language-modifiers/language-modifier-string-format.md'
- 'strip': 'designers/language-modifiers/language-modifier-strip.md'
- 'strip_tags': 'designers/language-modifiers/language-modifier-strip-tags.md'
- 'to_charset': 'designers/language-modifiers/language-modifier-to-charset.md'
- 'truncate': 'designers/language-modifiers/language-modifier-truncate.md'
- 'unescape': 'designers/language-modifiers/language-modifier-unescape.md'
- 'upper': 'designers/language-modifiers/language-modifier-upper.md'
- 'wordwrap': 'designers/language-modifiers/language-modifier-wordwrap.md'
- 'designers/language-combining-modifiers.md'
- 'Builtin Functions':
- 'Introduction': 'designers/language-builtin-functions/index.md'
- '{append}': 'designers/language-builtin-functions/language-function-append.md'
- '{assign}': 'designers/language-builtin-functions/language-function-assign.md'
- '{block}': 'designers/language-builtin-functions/language-function-block.md'
- '{call}': 'designers/language-builtin-functions/language-function-call.md'
- '{capture}': 'designers/language-builtin-functions/language-function-capture.md'
- '{config_load}': 'designers/language-builtin-functions/language-function-config-load.md'
- '{debug}': 'designers/language-builtin-functions/language-function-debug.md'
- '{extends}': 'designers/language-builtin-functions/language-function-extends.md'
- '{for}': 'designers/language-builtin-functions/language-function-for.md'
- '{foreach}': 'designers/language-builtin-functions/language-function-foreach.md'
- '{function}': 'designers/language-builtin-functions/language-function-function.md'
- '{if},{elseif},{else}': 'designers/language-builtin-functions/language-function-if.md'
- '{include}': 'designers/language-builtin-functions/language-function-include.md'
- '{insert}': 'designers/language-builtin-functions/language-function-insert.md'
- '{ldelim},{rdelim}': 'designers/language-builtin-functions/language-function-ldelim.md'
- '{literal}': 'designers/language-builtin-functions/language-function-literal.md'
- '{nocache}': 'designers/language-builtin-functions/language-function-nocache.md'
- '{section}': 'designers/language-builtin-functions/language-function-section.md'
- '{setfilter}': 'designers/language-builtin-functions/language-function-setfilter.md'
- '{strip}': 'designers/language-builtin-functions/language-function-strip.md'
- '{while}': 'designers/language-builtin-functions/language-function-while.md'
- 'Custom Functions':
- 'Introduction': 'designers/language-custom-functions/index.md'
- '{counter}': 'designers/language-custom-functions/language-function-counter.md'
- '{cycle}': 'designers/language-custom-functions/language-function-cycle.md'
- '{debug}': 'designers/language-custom-functions/language-function-debug.md'
- '{eval}': 'designers/language-custom-functions/language-function-eval.md'
- '{fetch}': 'designers/language-custom-functions/language-function-fetch.md'
- '{html_checkboxes}': 'designers/language-custom-functions/language-function-html-checkboxes.md'
- '{html_image}': 'designers/language-custom-functions/language-function-html-image.md'
- '{html_options}': 'designers/language-custom-functions/language-function-html-options.md'
- '{html_radios}': 'designers/language-custom-functions/language-function-html-radios.md'
- '{html_select_date}': 'designers/language-custom-functions/language-function-html-select-date.md'
- '{html_select_time}': 'designers/language-custom-functions/language-function-html-select-time.md'
- '{html_table}': 'designers/language-custom-functions/language-function-html-table.md'
- '{mailto}': 'designers/language-custom-functions/language-function-mailto.md'
- '{math}': 'designers/language-custom-functions/language-function-math.md'
- '{textformat}': 'designers/language-custom-functions/language-function-textformat.md'
- 'designers/config-files.md'
- 'designers/chapter-debugging-console.md'
- 'Programmers':
- 'programmers/charset.md'
- 'programmers/smarty-constants.md'
- 'programmers/api-variables.md'
- 'programmers/api-functions.md'
- 'programmers/caching.md'
- 'programmers/resources.md'
- 'programmers/advanced-features.md'
- 'programmers/plugins.md'

View File

@ -0,0 +1,17 @@
#!/bin/bash
# Runs tests for all supported PHP versions
# Usage examples:
# - ./run-tests-for-all-php-versions.sh --group 20221124
# - ./run-tests-for-all-php-versions.sh --exclude-group slow
COMPOSE_CMD="mutagen-compose"
$COMPOSE_CMD run --rm php71 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php72 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php73 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php74 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php80 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php81 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php82 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php83 ./run-tests.sh $@

10
system/vendor/smarty/smarty/run-tests.sh vendored Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# Runs composer update, echoes php version and runs PHPUnit
# Usage examples:
# - ./run-tests.sh --group 20221124
# - ./run-tests.sh --exclude-group slow
composer update --quiet
#php -r 'echo "\nPHP version " . phpversion() . ". ";'
php ./vendor/phpunit/phpunit/phpunit $@

0
ui/compiled/index.html Normal file
View File

View File

@ -89,9 +89,12 @@
<div class="form-group"> <div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Recharge Using')}</label> <label class="col-md-2 control-label">{Lang::T('Recharge Using')}</label>
<div class="col-md-6"> <div class="col-md-6">
<input type="text" name="payment_usings" class="form-control" value="{$_c['payment_usings']}" placeholder="{Lang::T('Cash')}, {Lang::T('Bank Transfer')}"> <input type="text" name="payment_usings" class="form-control"
value="{$_c['payment_usings']}"
placeholder="{Lang::T('Cash')}, {Lang::T('Bank Transfer')}">
</div> </div>
<p class="help-block col-md-4">This used for admin to select payment in recharge, using comma for every new options</p> <p class="help-block col-md-4">This used for admin to select payment in recharge, using comma
for every new options</p>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-2 control-label">APP URL</label> <label class="col-md-2 control-label">APP URL</label>
@ -606,17 +609,18 @@
<label class="col-md-2 control-label">{Lang::T('Extend Package Expiry')}</label> <label class="col-md-2 control-label">{Lang::T('Extend Package Expiry')}</label>
<div class="col-md-6"> <div class="col-md-6">
<select name="extend_expiry" id="extend_expiry" class="form-control"> <select name="extend_expiry" id="extend_expiry" class="form-control">
<option value="yes" {if $_c['extend_expiry']=='yes' }selected="selected" {/if}>
{Lang::T('Yes')}</option>
<option value="no" {if $_c['extend_expiry']=='no' }selected="selected" {/if}> <option value="no" {if $_c['extend_expiry']=='no' }selected="selected" {/if}>
{Lang::T('No')} {Lang::T('No')}</option>
<option value="yes" {if $_c['extend_expiry']=='yes' }selected="selected"
{/if}> {Lang::T('Yes')}
</select> </select>
</div> </div>
<p class="help-block col-md-4">{Lang::T('If user buy same internet plan, expiry date will extend')}</p> <p class="help-block col-md-4">
{Lang::T('If user buy same internet plan, expiry date will extend')}</p>
</div> </div>
</div> </div>
<div class="panel-heading"> <div class="panel-heading">
<div class="btn-group pull-right"> <div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"> <button class="btn btn-primary btn-xs" title="save" type="submit">
<span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span> <span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>

View File

@ -87,11 +87,11 @@
} }
} }
/* /*
* maintenance top-bar * maintenance top-bar
*/ */
.notification-top-bar { .notification-top-bar {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@ -142,7 +142,7 @@
} }
</style> </style>
{if isset($xheader)} {if isset($xheader)}
{$xheader} {$xheader}
{/if} {/if}
</head> </head>
@ -212,71 +212,71 @@
</li> </li>
{$_MENU_AFTER_DASHBOARD} {$_MENU_AFTER_DASHBOARD}
{if !in_array($_admin['user_type'],['Report'])} {if !in_array($_admin['user_type'],['Report'])}
<li class="{if in_array($_system_menu, ['customers', 'map'])}active{/if} treeview"> <li class="{if in_array($_system_menu, ['customers', 'map'])}active{/if} treeview">
<a href="#"> <a href="#">
<i class="fa fa-users"></i> <span>{Lang::T('Customer')}</span> <i class="fa fa-users"></i> <span>{Lang::T('Customer')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_system_menu eq 'customers' }class="active" {/if}><a <li {if $_system_menu eq 'customers' }class="active" {/if}><a
href="{$_url}customers">{Lang::T('Lists')}</a></li> href="{$_url}customers">{Lang::T('Lists')}</a></li>
<li {if $_system_menu eq 'map' }class="active" {/if}><a <li {if $_system_menu eq 'map' }class="active" {/if}><a
href="{$_url}map/customer">{Lang::T('Location')}</a></li> href="{$_url}map/customer">{Lang::T('Location')}</a></li>
{$_MENU_CUSTOMERS} {$_MENU_CUSTOMERS}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_CUSTOMERS} {$_MENU_AFTER_CUSTOMERS}
<li class="{if $_system_menu eq 'plan'}active{/if} treeview"> <li class="{if $_system_menu eq 'plan'}active{/if} treeview">
<a href="#"> <a href="#">
<i class="fa fa-ticket"></i> <span>{Lang::T('Services')}</span> <i class="fa fa-ticket"></i> <span>{Lang::T('Services')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}plan/list">{Lang::T('Active Users')}</a></li> href="{$_url}plan/list">{Lang::T('Active Users')}</a></li>
{if $_c['disable_voucher'] != 'yes'} {if $_c['disable_voucher'] != 'yes'}
<li {if $_routes[1] eq 'voucher' }class="active" {/if}><a <li {if $_routes[1] eq 'voucher' }class="active" {/if}><a
href="{$_url}plan/voucher">{Lang::T('Vouchers')}</a></li> href="{$_url}plan/voucher">{Lang::T('Vouchers')}</a></li>
<li {if $_routes[1] eq 'refill' }class="active" {/if}><a <li {if $_routes[1] eq 'refill' }class="active" {/if}><a
href="{$_url}plan/refill">{Lang::T('Refill Customer')}</a></li> href="{$_url}plan/refill">{Lang::T('Refill Customer')}</a></li>
{/if} {/if}
<li {if $_routes[1] eq 'recharge' }class="active" {/if}><a <li {if $_routes[1] eq 'recharge' }class="active" {/if}><a
href="{$_url}plan/recharge">{Lang::T('Recharge Customer')}</a></li> href="{$_url}plan/recharge">{Lang::T('Recharge Customer')}</a></li>
{if $_c['enable_balance'] == 'yes'} {if $_c['enable_balance'] == 'yes'}
<li {if $_routes[1] eq 'deposit' }class="active" {/if}><a <li {if $_routes[1] eq 'deposit' }class="active" {/if}><a
href="{$_url}plan/deposit">{Lang::T('Refill Balance')}</a></li> href="{$_url}plan/deposit">{Lang::T('Refill Balance')}</a></li>
{/if} {/if}
{$_MENU_SERVICES} {$_MENU_SERVICES}
</ul> </ul>
</li> </li>
{/if} {/if}
{$_MENU_AFTER_SERVICES} {$_MENU_AFTER_SERVICES}
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li class="{if $_system_menu eq 'services'}active{/if} treeview"> <li class="{if $_system_menu eq 'services'}active{/if} treeview">
<a href="#"> <a href="#">
<i class="ion ion-cube"></i> <span>{Lang::T('Internet Plan')}</span> <i class="ion ion-cube"></i> <span>{Lang::T('Internet Plan')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[1] eq 'hotspot' }class="active" {/if}><a <li {if $_routes[1] eq 'hotspot' }class="active" {/if}><a
href="{$_url}services/hotspot">Hotspot</a></li> href="{$_url}services/hotspot">Hotspot</a></li>
<li {if $_routes[1] eq 'pppoe' }class="active" {/if}><a <li {if $_routes[1] eq 'pppoe' }class="active" {/if}><a
href="{$_url}services/pppoe">PPPOE</a></li> href="{$_url}services/pppoe">PPPOE</a></li>
<li {if $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}bandwidth/list">{Lang::T('Bandwidth')}</a></li> href="{$_url}bandwidth/list">{Lang::T('Bandwidth')}</a></li>
{if $_c['enable_balance'] == 'yes'} {if $_c['enable_balance'] == 'yes'}
<li {if $_routes[1] eq 'balance' }class="active" {/if}><a <li {if $_routes[1] eq 'balance' }class="active" {/if}><a
href="{$_url}services/balance">{Lang::T('Customer Balance')}</a></li> href="{$_url}services/balance">{Lang::T('Customer Balance')}</a></li>
{/if} {/if}
{$_MENU_PLANS} {$_MENU_PLANS}
</ul> </ul>
</li> </li>
{/if} {/if}
{$_MENU_AFTER_PLANS} {$_MENU_AFTER_PLANS}
<li class="{if $_system_menu eq 'reports'}active{/if} treeview"> <li class="{if $_system_menu eq 'reports'}active{/if} treeview">
@ -314,64 +314,64 @@
</li> </li>
{$_MENU_AFTER_MESSAGE} {$_MENU_AFTER_MESSAGE}
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li class="{if $_system_menu eq 'network'}active{/if} treeview"> <li class="{if $_system_menu eq 'network'}active{/if} treeview">
<a href="#"> <a href="#">
<i class="ion ion-network"></i> <span>{Lang::T('Network')}</span> <i class="ion ion-network"></i> <span>{Lang::T('Network')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[0] eq 'routers' and $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[0] eq 'routers' and $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}routers/list">{Lang::T('Routers')}</a></li> href="{$_url}routers/list">{Lang::T('Routers')}</a></li>
<li {if $_routes[0] eq 'pool' and $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[0] eq 'pool' and $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}pool/list">{Lang::T('IP Pool')}</a></li> href="{$_url}pool/list">{Lang::T('IP Pool')}</a></li>
{$_MENU_NETWORK} {$_MENU_NETWORK}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_NETWORKS} {$_MENU_AFTER_NETWORKS}
{if $_c['radius_enable']} {if $_c['radius_enable']}
<li class="{if $_system_menu eq 'radius'}active{/if} treeview"> <li class="{if $_system_menu eq 'radius'}active{/if} treeview">
<a href="#"> <a href="#">
<i class="fa fa-database"></i> <span>{Lang::T('Radius')}</span> <i class="fa fa-database"></i> <span>{Lang::T('Radius')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[0] eq 'radius' and $_routes[1] eq 'nas-list' }class="active" {/if}><a <li {if $_routes[0] eq 'radius' and $_routes[1] eq 'nas-list' }class="active" {/if}><a
href="{$_url}radius/nas-list">{Lang::T('Radius NAS')}</a></li> href="{$_url}radius/nas-list">{Lang::T('Radius NAS')}</a></li>
{$_MENU_RADIUS} {$_MENU_RADIUS}
</ul> </ul>
</li>
{/if}
{$_MENU_AFTER_RADIUS}
<li class="{if $_system_menu eq 'pages'}active{/if} treeview">
<a href="#">
<i class="ion ion-document"></i> <span>{Lang::T("Static Pages")}</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li {if $_routes[1] eq 'Order_Voucher' }class="active" {/if}><a
href="{$_url}pages/Order_Voucher">{Lang::T('Order Voucher')}</a></li>
<li {if $_routes[1] eq 'Voucher' }class="active" {/if}><a
href="{$_url}pages/Voucher">{Lang::T('Voucher')} Template</a></li>
<li {if $_routes[1] eq 'Announcement' }class="active" {/if}><a
href="{$_url}pages/Announcement">{Lang::T('Announcement')}</a></li>
<li {if $_routes[1] eq 'Announcement_Customer' }class="active" {/if}><a
href="{$_url}pages/Announcement_Customer">{Lang::T('Customer Announcement')}</a>
</li> </li>
<li {if $_routes[1] eq 'Registration_Info' }class="active" {/if}><a {/if}
href="{$_url}pages/Registration_Info">{Lang::T('Registration Info')}</a></li> {$_MENU_AFTER_RADIUS}
<li {if $_routes[1] eq 'Privacy_Policy' }class="active" {/if}><a <li class="{if $_system_menu eq 'pages'}active{/if} treeview">
href="{$_url}pages/Privacy_Policy">{Lang::T('Privacy Policy')}</a></li> <a href="#">
<li {if $_routes[1] eq 'Terms_and_Conditions' }class="active" {/if}><a <i class="ion ion-document"></i> <span>{Lang::T("Static Pages")}</span>
href="{$_url}pages/Terms_and_Conditions">{Lang::T('Terms and Conditions')}</a></li> <span class="pull-right-container">
{$_MENU_PAGES} <i class="fa fa-angle-left pull-right"></i>
</ul> </span>
</li> </a>
<ul class="treeview-menu">
<li {if $_routes[1] eq 'Order_Voucher' }class="active" {/if}><a
href="{$_url}pages/Order_Voucher">{Lang::T('Order Voucher')}</a></li>
<li {if $_routes[1] eq 'Voucher' }class="active" {/if}><a
href="{$_url}pages/Voucher">{Lang::T('Voucher')} Template</a></li>
<li {if $_routes[1] eq 'Announcement' }class="active" {/if}><a
href="{$_url}pages/Announcement">{Lang::T('Announcement')}</a></li>
<li {if $_routes[1] eq 'Announcement_Customer' }class="active" {/if}><a
href="{$_url}pages/Announcement_Customer">{Lang::T('Customer Announcement')}</a>
</li>
<li {if $_routes[1] eq 'Registration_Info' }class="active" {/if}><a
href="{$_url}pages/Registration_Info">{Lang::T('Registration Info')}</a></li>
<li {if $_routes[1] eq 'Privacy_Policy' }class="active" {/if}><a
href="{$_url}pages/Privacy_Policy">{Lang::T('Privacy Policy')}</a></li>
<li {if $_routes[1] eq 'Terms_and_Conditions' }class="active" {/if}><a
href="{$_url}pages/Terms_and_Conditions">{Lang::T('Terms and Conditions')}</a></li>
{$_MENU_PAGES}
</ul>
</li>
{/if} {/if}
{$_MENU_AFTER_PAGES} {$_MENU_AFTER_PAGES}
<li <li
@ -384,33 +384,33 @@
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li {if $_routes[1] eq 'app' }class="active" {/if}><a <li {if $_routes[1] eq 'app' }class="active" {/if}><a
href="{$_url}settings/app">{Lang::T('General Settings')}</a></li> href="{$_url}settings/app">{Lang::T('General Settings')}</a></li>
<li {if $_routes[1] eq 'localisation' }class="active" {/if}><a <li {if $_routes[1] eq 'localisation' }class="active" {/if}><a
href="{$_url}settings/localisation">{Lang::T('Localisation')}</a></li> href="{$_url}settings/localisation">{Lang::T('Localisation')}</a></li>
<li {if $_routes[1] eq 'maintenance' }class="active" {/if}><a <li {if $_routes[1] eq 'maintenance' }class="active" {/if}><a
href="{$_url}settings/maintenance">{Lang::T('Maintenance Mode')}</a></li> href="{$_url}settings/maintenance">{Lang::T('Maintenance Mode')}</a></li>
<li {if $_routes[1] eq 'notifications' }class="active" {/if}><a <li {if $_routes[1] eq 'notifications' }class="active" {/if}><a
href="{$_url}settings/notifications">{Lang::T('User Notification')}</a></li> href="{$_url}settings/notifications">{Lang::T('User Notification')}</a></li>
{/if} {/if}
{if in_array($_admin['user_type'],['SuperAdmin','Admin','Agent'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin','Agent'])}
<li {if $_routes[1] eq 'users' }class="active" {/if}><a <li {if $_routes[1] eq 'users' }class="active" {/if}><a
href="{$_url}settings/users">{Lang::T('Administrator Users')}</a></li> href="{$_url}settings/users">{Lang::T('Administrator Users')}</a></li>
{/if} {/if}
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li {if $_routes[1] eq 'dbstatus' }class="active" {/if}><a <li {if $_routes[1] eq 'dbstatus' }class="active" {/if}><a
href="{$_url}settings/dbstatus">{Lang::T('Backup/Restore')}</a></li> href="{$_url}settings/dbstatus">{Lang::T('Backup/Restore')}</a></li>
<li {if $_system_menu eq 'paymentgateway' }class="active" {/if}> <li {if $_system_menu eq 'paymentgateway' }class="active" {/if}>
<a href="{$_url}paymentgateway"> <a href="{$_url}paymentgateway">
<span class="text">{Lang::T('Payment Gateway')}</span> <span class="text">{Lang::T('Payment Gateway')}</span>
</a> </a>
</li> </li>
{$_MENU_SETTINGS} {$_MENU_SETTINGS}
<li {if $_routes[0] eq 'pluginmanager' }class="active" {/if}> <li {if $_routes[0] eq 'pluginmanager' }class="active" {/if}>
<a href="{$_url}pluginmanager"><i class="glyphicon glyphicon-tasks"></i> <a href="{$_url}pluginmanager"><i class="glyphicon glyphicon-tasks"></i>
{Lang::T('Plugin Manager')} <small class="label pull-right">Free</small></a> {Lang::T('Plugin Manager')} <small class="label pull-right">Free</small></a>
</li> </li>
{* <li {if $_routes[0] eq 'codecanyon' }class="active" {/if}> {* <li {if $_routes[0] eq 'codecanyon' }class="active" {/if}>
<a href="{$_url}codecanyon"><i class="glyphicon glyphicon-shopping-cart"></i> <a href="{$_url}codecanyon"><i class="glyphicon glyphicon-shopping-cart"></i>
Codecanyon.net <small class="label pull-right">Paid</small></a> Codecanyon.net <small class="label pull-right">Paid</small></a>
</li> *} </li> *}
@ -419,24 +419,24 @@
</li> </li>
{$_MENU_AFTER_SETTINGS} {$_MENU_AFTER_SETTINGS}
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li class="{if $_system_menu eq 'logs' }active{/if} treeview"> <li class="{if $_system_menu eq 'logs' }active{/if} treeview">
<a href="#"> <a href="#">
<i class="ion ion-clock"></i> <span>{Lang::T('Logs')}</span> <i class="ion ion-clock"></i> <span>{Lang::T('Logs')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}logs/phpnuxbill">PhpNuxBill</a></li> href="{$_url}logs/phpnuxbill">PhpNuxBill</a></li>
{if $_c['radius_enable']} {if $_c['radius_enable']}
<li {if $_routes[1] eq 'radius' }class="active" {/if}><a <li {if $_routes[1] eq 'radius' }class="active" {/if}><a
href="{$_url}logs/radius">Radius</a> href="{$_url}logs/radius">Radius</a>
</li> </li>
{/if} {/if}
</ul> </ul>
{$_MENU_LOGS} {$_MENU_LOGS}
</li> </li>
{/if} {/if}
{$_MENU_AFTER_LOGS} {$_MENU_AFTER_LOGS}
<li {if $_system_menu eq 'community' }class="active" {/if}> <li {if $_system_menu eq 'community' }class="active" {/if}>
@ -451,11 +451,11 @@
</aside> </aside>
{if $_c['maintenance_mode'] == 1} {if $_c['maintenance_mode'] == 1}
<div class="notification-top-bar"> <div class="notification-top-bar">
<p>{Lang::T('The website is currently in maintenance mode, this means that some or all functionality may be <p>{Lang::T('The website is currently in maintenance mode, this means that some or all functionality may be
unavailable to regular users during this time.')}<small> &nbsp;&nbsp;<a unavailable to regular users during this time.')}<small> &nbsp;&nbsp;<a
href="{$_url}settings/maintenance">{Lang::T('Turn Off')}</a></small></p> href="{$_url}settings/maintenance">{Lang::T('Turn Off')}</a></small></p>
</div> </div>
{/if} {/if}
<div class="content-wrapper"> <div class="content-wrapper">
@ -467,20 +467,19 @@
<section class="content"> <section class="content">
{if isset($notify)} {if isset($notify)}
<script> <script>
// Display SweetAlert toast notification // Display SweetAlert toast notification
Swal.fire({ Swal.fire({
icon: '{if $notify_t == "s"}success{else}error{/if}', icon: '{if $notify_t == "s"}success{else}error{/if}',
title: '{$notify}', title: '{$notify}',
toast: true, position: 'top-end',
position: 'top-end', showConfirmButton: false,
showConfirmButton: false, timer: 5000,
timer: 5000, timerProgressBar: true,
timerProgressBar: true, didOpen: (toast) => {
didOpen: (toast) => { toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseenter', Swal.stopTimer) toast.addEventListener('mouseleave', Swal.resumeTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer) }
} });
}); </script>
</script> {/if}
{/if}

View File

@ -203,7 +203,6 @@
Swal.fire({ Swal.fire({
icon: '{if $notify_t == "s"}success{else}warning{/if}', icon: '{if $notify_t == "s"}success{else}warning{/if}',
title: '{$notify}', title: '{$notify}',
toast: true,
position: 'top-end', position: 'top-end',
showConfirmButton: false, showConfirmButton: false,
timer: 5000, timer: 5000,

View File

@ -1,3 +1,3 @@
{ {
"version": "2024.5.22" "version": "2024.5.27"
} }