61 lines
3.1 KiB
PHP
61 lines
3.1 KiB
PHP
<?php
|
|
ini_set('display_errors', 0);
|
|
|
|
|
|
/* ----------------------------------------------------------------------
|
|
07.12.2023
|
|
Получаем список своих организаций
|
|
---------------------------------------------------------------------- */
|
|
$listMyOrgs=\DB::getAll("SELECT * FROM `multiOrg` WHERE `user_id`=? AND `status`=1", $_SESSION['user_id']);
|
|
for ($i=0; $i<count($listMyOrgs); $i++)$listMyOrgs[$i]['txt'] = \DB::getValue("SELECT `txt` FROM `org` WHERE `id`=?", $listMyOrgs[$i]['org_id']);
|
|
$smarty -> assign( 'listMyOrgs', $listMyOrgs );
|
|
|
|
/* ----------------------------------------------------------------------
|
|
07.12.2023
|
|
Получаем список своих организаций на проверке
|
|
---------------------------------------------------------------------- */
|
|
$listMyOrgsCheck=\DB::getAll("SELECT * FROM `multiOrg` WHERE `user_id`=? AND `status`=0", $_SESSION['user_id']);
|
|
for ($i=0; $i<count($listMyOrgsCheck); $i++)$listMyOrgsCheck[$i]['txt'] = \DB::getValue("SELECT `txt` FROM `org` WHERE `id`=?", $listMyOrgsCheck[$i]['org_id']);
|
|
$smarty -> assign( 'listMyOrgsCheck', $listMyOrgsCheck );
|
|
/* ----------------------------------------------------------------------
|
|
14.10.2022
|
|
Меню личного кабинета
|
|
---------------------------------------------------------------------- */
|
|
//$smarty -> assign ( 'mnulk', MYDIR . '/skin/inc/mnulk.html');
|
|
|
|
/* ----------------------------------------------------------------------
|
|
01.05.2021
|
|
Выгонялка
|
|
---------------------------------------------------------------------- */
|
|
|
|
if ( !$_SESSION['user_id'] && !ID ) header ( 'Location: /login/' );
|
|
|
|
/* ----------------------------------------------------------------------
|
|
15.02.2022
|
|
Получаем справочник типов складов
|
|
---------------------------------------------------------------------- */
|
|
$smarty -> assign( 'sp_sklad_tip', \DB::getAll("SELECT * FROM `sp_sklad_tip` ORDER BY `txt`") );
|
|
|
|
/* ----------------------------------------------------------------------
|
|
15.02.2022
|
|
Получаем справочник регионов
|
|
---------------------------------------------------------------------- */
|
|
$smarty -> assign( 'region', \DB::getAll("SELECT * FROM `region` WHERE `strana_id`=1 ORDER BY `txt`") );
|
|
|
|
/* ----------------------------------------------------------------------
|
|
15.02.2022
|
|
Получаем справочник городов
|
|
---------------------------------------------------------------------- */
|
|
$smarty -> assign( 'city', \DB::getAll("SELECT * FROM `city` WHERE `strana_id`=1 ORDER BY `txt`") );
|
|
|
|
|
|
/* ----------------------------------------------------------------------
|
|
15.02.2022
|
|
Подключение модулей
|
|
---------------------------------------------------------------------- */
|
|
$smarty -> assign( 'modal_new_sklad', "api/modules/lk-my-orgs/modal_new_sklad.html" );
|
|
$smarty -> assign( 'inc_org_edit', "api/modules/lk-my-orgs/inc_org_edit.html" );
|
|
|
|
|
|
|
|
?>
|