core/api/modules/lk/index.php

31 lines
1.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
ini_set( 'display_errors', 0 );
if ( !$_SESSION['user_id'] ) header ( 'Location: /login/' );
/* ----------------------------------------------------------------------
15.10.2022
Получаем список регионов
---------------------------------------------------------------------- */
$strana_id = \core::getSettings('strana');
$region = \DB::getAll('SELECT * FROM `region` WHERE `strana_id` = ' . $strana_id);
$smarty -> assign( 'region', $region );
/* ----------------------------------------------------------------------
15.10.2022
Получаем список городов
---------------------------------------------------------------------- */
$city = \DB::getAll('SELECT * FROM `city` WHERE `strana_id` = ' . $strana_id);
$smarty -> assign( 'city', $city );
/* ----------------------------------------------------------------------
14.10.2022
Меню личного кабинета
---------------------------------------------------------------------- */
$smarty -> assign ( 'mnulk', 'skin/inc/mnulk.html');
/* ----------------------------------------------------------------------
02.06.2022
Получаем информацию о пользователе
---------------------------------------------------------------------- */
$user_info = \DB::getAll('SELECT * FROM `users` WHERE `id` = ' . $_SESSION['user_id'] . ' LIMIT 1');
$smarty -> assign( 'user_info', $user_info );
$userOption = \DB::getAll('SELECT * FROM `userOption` WHERE `user_id` = ' . $_SESSION['user_id'] . ' LIMIT 1');
$smarty -> assign( 'userOption', $userOption );
?>