45 lines
1.4 KiB
PHP
Executable File
45 lines
1.4 KiB
PHP
Executable File
<?php
|
|
|
|
// e1cib/data/Документ.ВедомостьНаВыплатуЗарплатыПеречислением?ref=814cbc2411b5e89c11ef6e5def7f7b74
|
|
// гарипов
|
|
//include_once 'api/php/sl.php';
|
|
|
|
//ini_set('display_errors', 1);
|
|
$smarty->caching = true;
|
|
$smarty->cache_lifetime = 3600;
|
|
|
|
class modClass
|
|
{
|
|
/* ----------------------------------------------------------------------
|
|
05.01.2024
|
|
Получаем то что подешевело
|
|
---------------------------------------------------------------------- */
|
|
static function getStaticImg($path)
|
|
{
|
|
|
|
require_once 'api/php/list_file.php';
|
|
$files=list_file($path);
|
|
$c=count($files);
|
|
for ($i=0; $i<$c; $i++)
|
|
$files[$i]='/'.$path.'/'.$files[$i];
|
|
return $files;
|
|
}
|
|
|
|
static function getInfo()
|
|
{
|
|
$info=\DB::getRow("SELECT * FROM `content` WHERE `site`=? AND `content_type`=? AND `status`=? AND `id`=? LIMIT 1", [$_SERVER['SERVER_NAME'], 'galery', 1, $_GET['id']]);
|
|
$massiv=\core::j($info['json']);
|
|
if ($massiv['path'])$result['list']=self::getStaticImg($massiv['path']);
|
|
return $result;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($_GET['id'])$smarty -> assign( 'list', modClass::getInfo()['list'] );
|
|
else{
|
|
$smarty -> assign( 'list_galerys', \DB::getAll("SELECT * FROM `content` WHERE `content_type`=? ORDER BY `title`", 'galery') );
|
|
}
|
|
|
|
?>
|