Файл: CMS/users/index.php
Строк: 141
<?php
define('CMS',TRUE);
define('ROOT','../');
require('../core/inc.php');
if (!defined('USERS_PHOTOS_DIR')) define('USERS_PHOTOS_DIR', ROOT . 'upload/photos/');
define('EMPTY_ADS',TRUE); // Отключили рекламу для юзеров
$id = !empty($_GET['id']) ? num($_GET['id']) : 0;
$mod = !empty($_GET['m']) ? check($_GET['m']) : '';
$page = !empty($_GET['page']) ? num($_GET['page']) : 1;
$uz = !empty($_GET['uz']) ? check($_GET['uz']) : '';
$countries = get_vars('country');
if (!$countries || !is_array($countries)) {
$countries = array();
$rows = $db->select("SELECT `tld`,`name` FROM ?_country ORDER BY `name` ASC;");
foreach($rows as $row) $countries[$row['tld']] = $row['name'];
set_vars('country', $countries);
}
# Проверка пользователей на бан и подтверждение реги
if ($is_logged) {
if (!empty($uset['users_ban'])) {
redirect($config['site_url'] . DS . gen_uri('ban', '', RND));
}
if ($config['allow_regkeys'] > 0 && $uset['users_confirmreg'] > 0 && empty($uset['users_ban'])) {
redirect($config['site_url'] . DS . gen_uri('key', '', RND));
}
}
if (!empty($uz)) {
switch($mod):
case 'account':
include( MODULES_PATH . 'users_account.php' );
break;
case 'album':
include( MODULES_PATH . 'users_album.php' );
break;
case 'anketa':
include( MODULES_PATH . 'users_anketa.php' );
break;
case 'avatars': case 'buy_avatars': case 'load_avatars': case 'create_avatars':
include( MODULES_PATH . 'users_avatars.php' );
break;
case 'blogs':
include( MODULES_PATH . 'users_blogs.php' );
break;
case 'boards':
include( MODULES_PATH . 'users_boards.php' );
break;
case 'bookmarks':
include( MODULES_PATH . 'users_bookmarks.php' );
break;
case 'jobs':
include( MODULES_PATH . 'users_jobs.php' );
break;
case 'lenta': case 'authors': case 'add_authors':
include( MODULES_PATH . 'users_lenta.php' );
break;
case 'setting':
include( MODULES_PATH . 'users_setting.php' );
break;
case 'profil':
include( MODULES_PATH . 'users_profil.php' );
break;
case 'present': case 'send_present':
include( MODULES_PATH . 'users_present.php' );
break;
case 'my_presents':
include( MODULES_PATH . 'users_presents.php' );
break;
case 'file':
include( MODULES_PATH . 'users_file.php' );
break;
case 'files':
include( MODULES_PATH . 'users_files.php' );
break;
case 'add_folder':
include( MODULES_PATH . 'users_files_add_folder.php' );
break;
case 'add_file':
include( MODULES_PATH . 'users_files_add_file.php' );
break;
case 'add_screen':
include( MODULES_PATH . 'users_files_add_screen.php' );
break;
case 'edit_folder':
include( MODULES_PATH . 'users_files_edit_folder.php' );
break;
case 'edit_file':
include( MODULES_PATH . 'users_files_edit_file.php' );
break;
case 'read':
include( MODULES_PATH . 'users_files_read.php' );
break;
case 'download':
include( MODULES_PATH . 'users_files_download.php' );
break;
case 'send_link':
include( MODULES_PATH . 'users_files_send_link.php' );
break;
case 'in_zone':
include( MODULES_PATH . 'users_files_in_zone.php' );
break;
case 'place':
include( MODULES_PATH . 'users_files_place.php' );
break;
case 'rules_files':
include( MODULES_PATH . 'users_files_rules.php' );
break;
//case 'rar':
//include( MODULES_PATH . 'users_files_rar.php' );
//break;
case 'zip':
include( MODULES_PATH . 'users_files_zip.php' );
break;
case 'journal':
include( MODULES_PATH . 'users_journal.php' );
break;
case 'friends': case 'add_friends': case 'friends_requests': case 'friends_proposals':
include( MODULES_PATH . 'users_friends.php' );
break;
case 'privat': case 'inbox': case 'outbox': case 'trash': case 'add_privat': case 'spam_privat': case 'history':
include( MODULES_PATH . 'users_privat.php' );
break;
case 'contact': case 'clear_contact': case 'note_contact':
include( MODULES_PATH . 'users_contact.php' );
break;
case 'ignor': case 'clear_ignor': case 'note_ignor':
include( MODULES_PATH . 'users_ignor.php' );
break;
case 'nick': case 'nick_color':
include( MODULES_PATH . 'users_nick.php' );
break;
case 'forum':
include( MODULES_PATH . 'users_forum.php' );
break;
case 'soo':
include( MODULES_PATH . 'users_soo.php' );
break;
case 'wall':
include( MODULES_PATH . 'users_wall.php' );
break;
case 'upload':
include( MODULES_PATH . 'users_upload.php' );
break;
case 'transfer_money':
include( MODULES_PATH . 'users_transfer_money.php' );
break;
case 'logs':
include( MODULES_PATH . 'users_logs.php' );
break;
case 'status_color':
include( MODULES_PATH . 'users_status_color.php' );
break;
case 'forum_posts': case 'forum_themes':
include( MODULES_PATH . 'users_forum.php' );
break;
case 'rating':
include( MODULES_PATH . 'users_rating.php' );
break;
case 'rating_history':
include( MODULES_PATH . 'users_ratingh.php' );
break;
case 'help': case 'faq':
include( MODULES_PATH . 'users_help.php' );
break;
case 'my_purchases':
include( MODULES_PATH . 'users_my_purchases.php' );
break;
case 'start':
include( MODULES_PATH . 'users_start.php' );
break;
case 'set_index':
include( MODULES_PATH . 'users_set_index.php' );
break;
default: case 'index':
include( MODULES_PATH . 'users_index.php' );
break;
endswitch;
show_footer();
}
else {
$inSes->addMessage('Ошибка! Пользователя не существует!');
redirect($config['site_url']);
}
?>