Файл: modules/user/cabinet.php
Строк: 84
<?php
/****
* @package LiveCMS
* @link livecms.org
* @author MyZik
* @version See attached file VERSION.txt
* @license See attached file LICENSE.txt
* @copyright Copyright (C) LiveCMS Development Team
****/
$title = $lang['my_cabinet']; // Заголовок страницы
$module = 'cabinet'; // Модуль
/**
* Проверка наличия авторизации
**/
if (!isset($user)) {
require_once(HOME .'/incfiles/header.php');
echo '<div class="error">' . $lang['only_users'] . '</div>';
echo '<div class="home">' .
'<img src="/design/themes/' . $set_user['theme'] . '/images/back.png" alt="" /> <a href="/index.php">' . $lang['back'] . '</a>' .
'</div>';
require_once(HOME .'/incfiles/footer.php');
}
require_once(HOME .'/incfiles/header.php'); // подключаем шапку
$icons_dir = '/design/icons/cabinet/'; // папка с иконками
echo '<div class="sohr">' . $lang['hello'] . ', <b>' . $user['login'] . '</b>!</div>'; // выводим приветствие
/**
* Отображаем ссылки
**/
echo '<div class="title" align="right"><b>' . $lang['profile_control'] . '</b></div>' .
'<div class="list1">' .
'<img src="' . $icons_dir . 'personal_data.png" alt="" /> <a href="profile.php">' . $lang['my_profile'] . '</a> | [<a href="edit.php">' . $lang['my_profile_edit'] . '</a>]<br />' .
'<img src="' . $icons_dir . 'avatar.png" alt="" /> <a href="avatar.php">' . $lang['my_avatar'] . '</a><br />' .
'<img src="' . $icons_dir . 'profile_photo.png" alt="" /> <a href="photo.php">' . $lang['photo_profile'] . '</a>' .
'</div>' .
'<div class="title" align="right"><b>' . $lang['modules'] . '</b></div>' .
'<div class="list2">' .
'<img src="' . $icons_dir . 'mail.png" alt="" /> <a href="/mail/">' . $lang['my_mails'] . '</a> [' . mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contacts` WHERE `user_id` = '" . $user['id'] . "'"), 0) . ' / ' . mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE `user_id` = '" . $user['id'] . "'"), 0) . ']<br />' .
'<img src="' . $icons_dir . 'new_journal.png" alt="" /> <a href="journal.php">' . $lang['journal'] . '</a> [' . mysql_result(mysql_query("SELECT COUNT(*) FROM `journal` WHERE `user_id` = '" . $user['id'] . "'"), 0) . ']' .
'</div>' .
'<div class="title" align="right"><b>' . $lang['settings'] . '</b></div>' .
'<div class="list1">' .
'<img src="' . $icons_dir . 'settings.png" alt="" /> <a href="settings.php">' . $lang['my_settings'] . '</a><br />' .
'<img src="' . $icons_dir . 'password.png" alt="" /> <a href="change_password.php">' . $lang['change_password'] . '</a>' .
'</div>' .
'<div class="title" align="right"><b>' . $lang['other'] . '</b></div>' .
'<div class="list2">' .
($user['rights'] >= 1 ? '<img src="' . $icons_dir . 'direct_panel.png" alt="" /> <a href="/dpanel/"><b>' . $lang['direct_panel'] . '</b></a><br />' : '') .
'<img src="' . $icons_dir . 'exit.png" alt="" /> <a href="exit.php">' . $lang['end_session'] . ' "' . $user['login'] . '"</a>' .
'</div>';
require_once(HOME .'/incfiles/footer.php'); // подключаем ноги
?>