72 lines
2.7 KiB
PHP
72 lines
2.7 KiB
PHP
|
<?php
|
|||
|
ini_set('display_errors', 0);
|
|||
|
|
|||
|
|
|||
|
$db->free_sql2('CREATE TABLE IF NOT EXISTS `multiCity` (`id` INTEGER PRIMARY KEY NOT NULL, `user_id` INTEGER, `city_id` INTEGER)');
|
|||
|
|
|||
|
|
|||
|
/* ----------------------------------------------------------------------
|
|||
|
14.10.2022
|
|||
|
Меню личного кабинета
|
|||
|
---------------------------------------------------------------------- */
|
|||
|
$smarty -> assign ( 'mnulk', MYDIR . '/skin/inc/mnulk.html');
|
|||
|
|
|||
|
/* ----------------------------------------------------------------------
|
|||
|
01.05.2021
|
|||
|
Личный кабинет
|
|||
|
---------------------------------------------------------------------- */
|
|||
|
|
|||
|
if ( !$_SESSION['user_id'] && !ID ) header ( 'Location: /login/' );
|
|||
|
$mod = new main ( BD_NAME, BD_TYPE, BD_HOST, BD_USER, BD_PWD, MOD );
|
|||
|
|
|||
|
//$mod2 = new main ( 'p006', 'MYSQL', 'yurecnt.ru', 'admin', '32143214' );
|
|||
|
/* ----------------------------------------------------------------------
|
|||
|
03.06.2022
|
|||
|
Чтобы html отображал ковычки в названии организации
|
|||
|
---------------------------------------------------------------------- */
|
|||
|
|
|||
|
function qutes( $txt ){
|
|||
|
$old = array( '"' );
|
|||
|
$new = array( '"' );
|
|||
|
$txt = str_replace( $old, $new, $txt );
|
|||
|
return $txt;
|
|||
|
}
|
|||
|
|
|||
|
/* ----------------------------------------------------------------------
|
|||
|
02.06.2022
|
|||
|
Получаем информацию о пользователе
|
|||
|
---------------------------------------------------------------------- */
|
|||
|
|
|||
|
$user_info = $mod -> get_user_info();
|
|||
|
$smarty -> assign( 'user_info', $user_info );
|
|||
|
$userOption = $mod -> get_user_option();
|
|||
|
print_r($userOption);
|
|||
|
$smarty -> assign( 'userOption', $userOption );
|
|||
|
/* ----------------------------------------------------------------------
|
|||
|
15.10.2022
|
|||
|
Получаем список регионов
|
|||
|
---------------------------------------------------------------------- */
|
|||
|
unset($a);
|
|||
|
$a['strana_id']=$settings['strana'];
|
|||
|
$region=$db->get_massiv('region', $a, 'txt');
|
|||
|
$smarty -> assign( 'region', $region );
|
|||
|
|
|||
|
/* ----------------------------------------------------------------------
|
|||
|
15.10.2022
|
|||
|
Получаем список городов
|
|||
|
---------------------------------------------------------------------- */
|
|||
|
unset($a);
|
|||
|
$a['strana_id']=$settings['strana'];
|
|||
|
$city=$db->get_massiv('city', $a, 'txt');
|
|||
|
$smarty -> assign( 'city', $city );
|
|||
|
|
|||
|
/* ----------------------------------------------------------------------
|
|||
|
30.10.2022
|
|||
|
Получаем список городов обитания
|
|||
|
---------------------------------------------------------------------- */
|
|||
|
$smarty -> assign( 'myCity', $mod->getCityWork());
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
?>
|