EngineGP/system/acp/engine/tarifs.php
Sergei Solovev 276ec7f3eb Updating the server name reference in code
This change replaces the use of $_SERVER['SERVER_NAME'] with $_SERVER['HTTP_HOST'] throughout the codebase. The modification ensures consistency and compliance with best practices, since $_SERVER['HTTP_HOST'] is often used to extract the host header from an HTTP request. This update may improve compatibility and security, especially in scenarios where the Host header plays a key role in proper server configuration and routing. Please review and test the changes carefully to ensure smooth functionality in different environments.
2023-12-23 04:50:14 +03:00

33 lines
685 B
PHP

<?php
if (!DEFINED('EGP'))
exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
$info = '<i class="fa fa-shopping-bag"></i> Управление тарифами';
$aSection = array(
'index',
'add',
'copy',
'stats',
'delete'
);
if (!in_array($section, $aSection))
$section = 'index';
$html->get('menu', 'sections/tarifs');
$html->unit('s_' . $section, true);
unset($aSection[array_search($section, $aSection)]);
foreach ($aSection as $noactive)
$html->unit('s_' . $noactive);
$sql->query('SELECT `id` FROM `tarifs`');
$html->set('tarifs', $sql->num());
$html->pack('menu');
include(SEC . 'tarifs/' . $section . '.php');
?>