2009-05-10 10:50:39 +03:00
|
|
|
|
<?php
|
2008-09-21 09:36:57 +03:00
|
|
|
|
/*-------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* LiveStreet Engine Social Networking
|
|
|
|
|
* Copyright © 2008 Mzhelskiy Maxim
|
|
|
|
|
*
|
|
|
|
|
*--------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* Official site: www.livestreet.ru
|
|
|
|
|
* Contact e-mail: rus.engine@gmail.com
|
|
|
|
|
*
|
|
|
|
|
* GNU General Public License, version 2:
|
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
|
*
|
|
|
|
|
---------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Обрабатывает настройки профила юзера
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
class ActionSettings extends Action {
|
2008-10-14 21:36:36 +03:00
|
|
|
|
/**
|
|
|
|
|
* Какое меню активно
|
|
|
|
|
*
|
|
|
|
|
* @var unknown_type
|
|
|
|
|
*/
|
|
|
|
|
protected $sMenuItemSelect='settings';
|
|
|
|
|
/**
|
|
|
|
|
* Какое подменю активно
|
|
|
|
|
*
|
|
|
|
|
* @var unknown_type
|
|
|
|
|
*/
|
|
|
|
|
protected $sMenuSubItemSelect='profile';
|
2008-09-21 09:36:57 +03:00
|
|
|
|
/**
|
|
|
|
|
* Текущий юзер
|
|
|
|
|
*
|
|
|
|
|
* @var unknown_type
|
|
|
|
|
*/
|
|
|
|
|
protected $oUserCurrent=null;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Инициализация
|
|
|
|
|
*
|
|
|
|
|
* @return unknown
|
|
|
|
|
*/
|
|
|
|
|
public function Init() {
|
|
|
|
|
/**
|
|
|
|
|
* Проверяем авторизован ли юзер
|
|
|
|
|
*/
|
|
|
|
|
if (!$this->User_IsAuthorization()) {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddErrorSingle($this->Lang_Get('not_access'),$this->Lang_Get('error'));
|
2008-09-21 09:36:57 +03:00
|
|
|
|
return Router::Action('error');
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Получаем текущего юзера
|
|
|
|
|
*/
|
|
|
|
|
$this->oUserCurrent=$this->User_GetUserCurrent();
|
|
|
|
|
$this->SetDefaultEvent('profile');
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Viewer_AddHtmlTitle($this->Lang_Get('settings_menu'));
|
2008-09-21 09:36:57 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function RegisterEvent() {
|
2008-10-11 17:51:38 +03:00
|
|
|
|
$this->AddEvent('profile','EventProfile');
|
2008-10-14 21:36:36 +03:00
|
|
|
|
$this->AddEvent('invite','EventInvite');
|
|
|
|
|
$this->AddEvent('tuning','EventTuning');
|
2008-09-21 09:36:57 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************************
|
|
|
|
|
************************ РЕАЛИЗАЦИЯ ЭКШЕНА ***************************************
|
|
|
|
|
**********************************************************************************
|
|
|
|
|
*/
|
|
|
|
|
|
2008-10-14 21:36:36 +03:00
|
|
|
|
protected function EventTuning() {
|
|
|
|
|
$this->sMenuItemSelect='settings';
|
|
|
|
|
$this->sMenuSubItemSelect='tuning';
|
|
|
|
|
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Viewer_AddHtmlTitle($this->Lang_Get('settings_menu_tuning'));
|
2008-10-14 21:36:36 +03:00
|
|
|
|
|
2009-10-17 03:27:22 +03:00
|
|
|
|
if (isPost('submit_settings_tuning')) {
|
2009-10-20 02:42:23 +03:00
|
|
|
|
$this->Security_ValidateSendForm();
|
|
|
|
|
|
2008-10-14 21:36:36 +03:00
|
|
|
|
$this->oUserCurrent->setSettingsNoticeNewTopic( getRequest('settings_notice_new_topic') ? 1 : 0 );
|
|
|
|
|
$this->oUserCurrent->setSettingsNoticeNewComment( getRequest('settings_notice_new_comment') ? 1 : 0 );
|
|
|
|
|
$this->oUserCurrent->setSettingsNoticeNewTalk( getRequest('settings_notice_new_talk') ? 1 : 0 );
|
|
|
|
|
$this->oUserCurrent->setSettingsNoticeReplyComment( getRequest('settings_notice_reply_comment') ? 1 : 0 );
|
2008-10-28 21:24:35 +02:00
|
|
|
|
$this->oUserCurrent->setSettingsNoticeNewFriend( getRequest('settings_notice_new_friend') ? 1 : 0 );
|
2008-10-14 21:36:36 +03:00
|
|
|
|
$this->oUserCurrent->setProfileDate(date("Y-m-d H:i:s"));
|
|
|
|
|
if ($this->User_Update($this->oUserCurrent)) {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddNoticeSingle($this->Lang_Get('settings_tuning_submit_ok'));
|
2008-10-14 21:36:36 +03:00
|
|
|
|
} else {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'));
|
2008-10-14 21:36:36 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2008-10-11 17:51:38 +03:00
|
|
|
|
|
2008-10-14 21:36:36 +03:00
|
|
|
|
/**
|
|
|
|
|
* Показ и обработка формы приглаешний
|
|
|
|
|
*
|
|
|
|
|
* @return unknown
|
|
|
|
|
*/
|
2008-10-16 07:29:15 +03:00
|
|
|
|
protected function EventInvite() {
|
2009-08-20 10:43:06 +03:00
|
|
|
|
if (!Config::Get('general.reg.invite')) {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
return parent::EventNotFound();
|
2008-10-11 17:51:38 +03:00
|
|
|
|
}
|
|
|
|
|
|
2008-10-16 07:29:15 +03:00
|
|
|
|
$this->sMenuItemSelect='invite';
|
|
|
|
|
$this->sMenuSubItemSelect='';
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Viewer_AddHtmlTitle($this->Lang_Get('settings_menu_invite'));
|
2008-10-16 07:29:15 +03:00
|
|
|
|
|
2009-10-17 03:27:22 +03:00
|
|
|
|
if (isPost('submit_invite')) {
|
2009-10-20 02:42:23 +03:00
|
|
|
|
$this->Security_ValidateSendForm();
|
|
|
|
|
|
2008-10-21 07:58:03 +03:00
|
|
|
|
$bError=false;
|
|
|
|
|
if (!$this->ACL_CanSendInvite($this->oUserCurrent) and !$this->oUserCurrent->isAdministrator()) {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddError($this->Lang_Get('settings_invite_available_no'),$this->Lang_Get('error'));
|
2008-10-21 07:58:03 +03:00
|
|
|
|
$bError=true;
|
|
|
|
|
}
|
|
|
|
|
if (!func_check(getRequest('invite_mail'),'mail')) {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddError($this->Lang_Get('settings_invite_mail_error'),$this->Lang_Get('error'));
|
2008-10-21 07:58:03 +03:00
|
|
|
|
$bError=true;
|
|
|
|
|
}
|
|
|
|
|
if (!$bError) {
|
|
|
|
|
$oInvite=$this->User_GenerateInvite($this->oUserCurrent);
|
|
|
|
|
$this->Notify_SendInvite($this->oUserCurrent,getRequest('invite_mail'),$oInvite);
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddNoticeSingle($this->Lang_Get('settings_invite_submit_ok'));
|
2008-10-21 07:58:03 +03:00
|
|
|
|
}
|
2008-10-11 17:51:38 +03:00
|
|
|
|
}
|
|
|
|
|
|
2008-10-21 07:58:03 +03:00
|
|
|
|
$this->Viewer_Assign('iCountInviteAvailable',$this->User_GetCountInviteAvailable($this->oUserCurrent));
|
|
|
|
|
$this->Viewer_Assign('iCountInviteUsed',$this->User_GetCountInviteUsed($this->oUserCurrent->getId()));
|
2008-10-11 17:51:38 +03:00
|
|
|
|
}
|
|
|
|
|
|
2008-09-21 09:36:57 +03:00
|
|
|
|
/**
|
|
|
|
|
* Выводит форму для редактирования профиля и обрабатывает её
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
protected function EventProfile() {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Viewer_AddHtmlTitle($this->Lang_Get('settings_menu_profile'));
|
2008-09-21 09:36:57 +03:00
|
|
|
|
/**
|
|
|
|
|
* Если нажали кнопку "Сохранить"
|
|
|
|
|
*/
|
2009-10-17 03:27:22 +03:00
|
|
|
|
if (isPost('submit_profile_edit')) {
|
2009-10-20 02:42:23 +03:00
|
|
|
|
$this->Security_ValidateSendForm();
|
|
|
|
|
|
2008-09-21 09:36:57 +03:00
|
|
|
|
$bError=false;
|
|
|
|
|
/**
|
|
|
|
|
* Заполняем профиль из полей формы
|
|
|
|
|
*/
|
|
|
|
|
/**
|
|
|
|
|
* Проверяем имя
|
|
|
|
|
*/
|
|
|
|
|
if (func_check(getRequest('profile_name'),'text',2,20)) {
|
|
|
|
|
$this->oUserCurrent->setProfileName(getRequest('profile_name'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileName(null);
|
|
|
|
|
}
|
2008-09-21 13:27:13 +03:00
|
|
|
|
/**
|
|
|
|
|
* Проверка мыла
|
|
|
|
|
*/
|
|
|
|
|
if (func_check(getRequest('mail'),'mail')) {
|
|
|
|
|
if ($oUserMail=$this->User_GetUserByMail(getRequest('mail')) and $oUserMail->getId()!=$this->oUserCurrent->getId()) {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddError($this->Lang_Get('settings_profile_mail_error_used'),$this->Lang_Get('error'));
|
2008-09-21 13:27:13 +03:00
|
|
|
|
$bError=true;
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setMail(getRequest('mail'));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddError($this->Lang_Get('settings_profile_mail_error'),$this->Lang_Get('error'));
|
2008-09-21 13:27:13 +03:00
|
|
|
|
$bError=true;
|
|
|
|
|
}
|
2008-09-21 09:36:57 +03:00
|
|
|
|
/**
|
|
|
|
|
* Проверяем пол
|
|
|
|
|
*/
|
|
|
|
|
if (in_array(getRequest('profile_sex'),array('man','woman','other'))) {
|
|
|
|
|
$this->oUserCurrent->setProfileSex(getRequest('profile_sex'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileSex('other');
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Проверяем дату рождения
|
|
|
|
|
*/
|
|
|
|
|
if (func_check(getRequest('profile_birthday_day'),'id',1,2) and func_check(getRequest('profile_birthday_month'),'id',1,2) and func_check(getRequest('profile_birthday_year'),'id',4,4)) {
|
|
|
|
|
$this->oUserCurrent->setProfileBirthday(date("Y-m-d H:i:s",mktime(0,0,0,getRequest('profile_birthday_month'),getRequest('profile_birthday_day'),getRequest('profile_birthday_year'))));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileBirthday(null);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Проверяем страну
|
|
|
|
|
*/
|
|
|
|
|
if (func_check(getRequest('profile_country'),'text',1,30)) {
|
|
|
|
|
$this->oUserCurrent->setProfileCountry(getRequest('profile_country'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileCountry(null);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Проверяем регион
|
2008-11-01 08:16:18 +02:00
|
|
|
|
* пока отключим регион, т.к. не понятно нужен ли он вообще =)
|
2008-09-21 09:36:57 +03:00
|
|
|
|
*/
|
2008-11-01 08:16:18 +02:00
|
|
|
|
/*
|
2008-09-21 09:36:57 +03:00
|
|
|
|
if (func_check(getRequest('profile_region'),'text',1,30)) {
|
|
|
|
|
$this->oUserCurrent->setProfileRegion(getRequest('profile_region'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileRegion(null);
|
|
|
|
|
}
|
2008-11-01 08:16:18 +02:00
|
|
|
|
*/
|
2008-09-21 09:36:57 +03:00
|
|
|
|
/**
|
|
|
|
|
* Проверяем город
|
|
|
|
|
*/
|
|
|
|
|
if (func_check(getRequest('profile_city'),'text',1,30)) {
|
|
|
|
|
$this->oUserCurrent->setProfileCity(getRequest('profile_city'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileCity(null);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Проверяем ICQ
|
|
|
|
|
*/
|
|
|
|
|
if (func_check(getRequest('profile_icq'),'id',4,15)) {
|
|
|
|
|
$this->oUserCurrent->setProfileIcq(getRequest('profile_icq'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileIcq(null);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Проверяем сайт
|
|
|
|
|
*/
|
|
|
|
|
if (func_check(getRequest('profile_site'),'text',3,200)) {
|
|
|
|
|
$this->oUserCurrent->setProfileSite(getRequest('profile_site'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileSite(null);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Проверяем название сайта
|
|
|
|
|
*/
|
|
|
|
|
if (func_check(getRequest('profile_site_name'),'text',3,50)) {
|
|
|
|
|
$this->oUserCurrent->setProfileSiteName(getRequest('profile_site_name'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileSiteName(null);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Проверяем информацию о себе
|
|
|
|
|
*/
|
|
|
|
|
if (func_check(getRequest('profile_about'),'text',1,3000)) {
|
|
|
|
|
$this->oUserCurrent->setProfileAbout(getRequest('profile_about'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->oUserCurrent->setProfileAbout(null);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Проверка на смену пароля
|
|
|
|
|
*/
|
|
|
|
|
if (getRequest('password','')!='') {
|
|
|
|
|
if (func_check(getRequest('password'),'password',5)) {
|
|
|
|
|
if (getRequest('password')==getRequest('password_confirm')) {
|
|
|
|
|
if (func_encrypt(getRequest('password_now'))==$this->oUserCurrent->getPassword()) {
|
|
|
|
|
$this->oUserCurrent->setPassword(func_encrypt(getRequest('password')));
|
|
|
|
|
} else {
|
|
|
|
|
$bError=true;
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddError($this->Lang_Get('settings_profile_password_current_error'),$this->Lang_Get('error'));
|
2008-09-21 09:36:57 +03:00
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$bError=true;
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddError($this->Lang_Get('settings_profile_password_confirm_error'),$this->Lang_Get('error'));
|
2008-09-21 09:36:57 +03:00
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$bError=true;
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddError($this->Lang_Get('settings_profile_password_new_error'),$this->Lang_Get('error'));
|
2008-09-21 09:36:57 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Загрузка аватара, делаем ресайзы
|
2009-09-15 01:14:44 +03:00
|
|
|
|
*/
|
|
|
|
|
if (isset($_FILES['avatar']) and is_uploaded_file($_FILES['avatar']['tmp_name'])) {
|
2009-12-13 17:22:47 +02:00
|
|
|
|
/**
|
|
|
|
|
* Получаем список текущих аватаров
|
|
|
|
|
*/
|
|
|
|
|
$sPathOld = $this->oUserCurrent->getProfileAvatar();
|
|
|
|
|
$aUserAvatars = array();
|
|
|
|
|
if($sPathOld) {
|
|
|
|
|
foreach (array(100,64,48,24,0) as $iSize) {
|
|
|
|
|
$aUserAvatars[$iSize] = $this->oUserCurrent->getProfileAvatarPath($iSize);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-10 18:57:30 +02:00
|
|
|
|
if($sPath=$this->User_UploadAvatar($_FILES['avatar'],$this->oUserCurrent)) {
|
2009-12-10 20:30:05 +02:00
|
|
|
|
$this->oUserCurrent->setProfileAvatar($sPath);
|
2009-12-13 17:22:47 +02:00
|
|
|
|
/**
|
|
|
|
|
* Удаляем старые, если путь не совпадает с текущими аватарками
|
|
|
|
|
*/
|
|
|
|
|
if($sPathOld and $sPath!=$sPathOld and count($aUserAvatars)) {
|
|
|
|
|
foreach ($aUserAvatars as $iSize=>$sAvatarPath) {
|
|
|
|
|
@unlink($this->Image_GetServerPath($sAvatarPath));
|
|
|
|
|
}
|
|
|
|
|
}
|
2008-09-21 09:36:57 +03:00
|
|
|
|
} else {
|
|
|
|
|
$bError=true;
|
2009-09-15 01:14:44 +03:00
|
|
|
|
$this->Message_AddError($this->Lang_Get('settings_profile_avatar_error'),$this->Lang_Get('error'));
|
2008-09-21 09:36:57 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Удалить аватара
|
|
|
|
|
*/
|
2009-12-13 17:22:47 +02:00
|
|
|
|
if (getRequest('avatar_delete')) {
|
2009-12-11 10:49:44 +02:00
|
|
|
|
$this->User_DeleteAvatar($this->oUserCurrent);
|
2009-12-13 17:22:47 +02:00
|
|
|
|
$this->oUserCurrent->setProfileAvatar(null);
|
2008-09-21 09:36:57 +03:00
|
|
|
|
}
|
2009-01-14 23:12:35 +02:00
|
|
|
|
/**
|
|
|
|
|
* Загрузка фото, делаем ресайзы
|
|
|
|
|
*/
|
2009-09-15 01:14:44 +03:00
|
|
|
|
if (isset($_FILES['foto']) and is_uploaded_file($_FILES['foto']['tmp_name'])) {
|
2009-12-10 18:57:30 +02:00
|
|
|
|
if ($sFileFoto=$this->User_UploadFoto($_FILES['foto'],$this->oUserCurrent)) {
|
2009-12-10 20:30:05 +02:00
|
|
|
|
$this->oUserCurrent->setProfileFoto($sFileFoto);
|
2009-01-14 23:12:35 +02:00
|
|
|
|
} else {
|
|
|
|
|
$bError=true;
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddError($this->Lang_Get('settings_profile_foto_error'),$this->Lang_Get('error'));
|
2009-01-14 23:12:35 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Удалить фото
|
|
|
|
|
*/
|
2009-09-15 01:14:44 +03:00
|
|
|
|
if (isset($_REQUEST['foto_delete'])) {
|
2009-12-11 10:49:44 +02:00
|
|
|
|
$this->User_DeleteFoto($this->oUserCurrent);
|
2009-01-14 23:12:35 +02:00
|
|
|
|
$this->oUserCurrent->setProfileFoto(null);
|
|
|
|
|
}
|
2008-09-21 09:36:57 +03:00
|
|
|
|
/**
|
|
|
|
|
* Ставим дату последнего изменения профиля
|
|
|
|
|
*/
|
|
|
|
|
$this->oUserCurrent->setProfileDate(date("Y-m-d H:i:s"));
|
|
|
|
|
/**
|
|
|
|
|
* Сохраняем изменения профиля
|
|
|
|
|
*/
|
|
|
|
|
if (!$bError) {
|
|
|
|
|
if ($this->User_Update($this->oUserCurrent)) {
|
2008-11-01 08:16:18 +02:00
|
|
|
|
/**
|
|
|
|
|
* Добавляем страну
|
|
|
|
|
*/
|
|
|
|
|
if ($this->oUserCurrent->getProfileCountry()) {
|
|
|
|
|
if (!($oCountry=$this->User_GetCountryByName($this->oUserCurrent->getProfileCountry()))) {
|
2009-09-08 15:02:51 +03:00
|
|
|
|
$oCountry=Engine::GetEntity('User_Country');
|
2008-11-01 08:16:18 +02:00
|
|
|
|
$oCountry->setName($this->oUserCurrent->getProfileCountry());
|
|
|
|
|
$this->User_AddCountry($oCountry);
|
|
|
|
|
}
|
|
|
|
|
$this->User_SetCountryUser($oCountry->getId(),$this->oUserCurrent->getId());
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Добавляем город
|
|
|
|
|
*/
|
|
|
|
|
if ($this->oUserCurrent->getProfileCity()) {
|
|
|
|
|
if (!($oCity=$this->User_GetCityByName($this->oUserCurrent->getProfileCity()))) {
|
2009-09-08 15:02:51 +03:00
|
|
|
|
$oCity=Engine::GetEntity('User_City');
|
2008-11-01 08:16:18 +02:00
|
|
|
|
$oCity->setName($this->oUserCurrent->getProfileCity());
|
|
|
|
|
$this->User_AddCity($oCity);
|
|
|
|
|
}
|
|
|
|
|
$this->User_SetCityUser($oCity->getId(),$this->oUserCurrent->getId());
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddNoticeSingle($this->Lang_Get('settings_profile_submit_ok'));
|
2008-09-21 09:36:57 +03:00
|
|
|
|
} else {
|
2009-04-11 14:50:42 +03:00
|
|
|
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'));
|
2008-09-21 09:36:57 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2008-10-14 21:36:36 +03:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Выполняется при завершении работы экшена
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public function EventShutdown() {
|
|
|
|
|
/**
|
|
|
|
|
* Загружаем в шаблон необходимые переменные
|
|
|
|
|
*/
|
|
|
|
|
$this->Viewer_Assign('sMenuItemSelect',$this->sMenuItemSelect);
|
|
|
|
|
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
|
|
|
|
|
}
|
2008-09-21 09:36:57 +03:00
|
|
|
|
}
|
|
|
|
|
?>
|