// Show user's settings block or login block // Показывает блок пользовательских настроек или блок авторизации
function html_profile($user, $lang)
{
if ($user->id != 0) {
$html_aside = new Html_aside_rich($lang['menu_profile'], "{$lang['welcome']}, <a href='{$this->base}member/{$user->id}/'><b>{$user->name}</b></a>");
if ($user->status == "admin") {
$html_aside->text("<a href='{$this->base}cp/'>{$lang['menu_cp']}</a>");
}
$html_aside->text("<a href='{$this->base}settings/'>{$lang['menu_settings']}</a>");
$html_aside->text("<a href='{$this->base}logout/'>{$lang['menu_logout']}</a>");
} else {
$html_aside = new Html_aside_rich($lang['menu_login']);
$html_aside->text($this->form_login($user, $lang));
$html_aside->text("<a href='{$this->base}recovery/'>{$lang['forgot_password']}</a>");
$html_aside->text("<a href='{$this->base}register/'>{$lang['want_register']}</a>");
}
$this->html_aside($html_aside->output());
}