
17.11.2009, 15:05
|
|
Познавший АНТИЧАТ
Регистрация: 23.08.2007
Сообщений: 1,237
С нами:
9851426
Репутация:
1676
|
|
PHP код:
<?php
/*
=====================================================
MOD "Files v.3.3" for DataLife Engine - by Snake
url = http://mynokia.su/
email - igramnet@gmail.com
Форум поддержки модуля http://savgroup.ru/
=====================================================
DataLife Engine - by SoftNews Media Group
-----------------------------------------------------
http://dle-news.ru/
-----------------------------------------------------
Copyright (c) 2004,2009 SoftNews Media Group
=====================================================
Данный код защищен авторскими правами
=====================================================
Файл: files_options.php
-----------------------------------------------------
Назначение: Вывод архива файлов
=====================================================
*/
if (! defined ( 'DATALIFEENGINE' ))
die ( "Hacking attempt!" );
if ($is_logged) {
$tpl->load_template ( '' . $modulname . '/options.tpl' );
$metatags ['title'] = "Настройки пользователя";
$tpl->set ( '{title}', $metatags ['title'] );
$save_options = $_REQUEST ['save_options'];
if ($save_options) {
$allow_options = user_options ();
$allow_options [0] = $allow_options [0];
$allow_options [1] = intval ( $_REQUEST ['show_files_on_front'] );
$allow_options [2] = intval ( $_REQUEST ['show_button_email'] );
$allow_options [3] = intval ( $_REQUEST ['show_file_screenshot'] );
$allow_options [4] = intval ( $_REQUEST ['show_files_alpha'] );
$allow_options [5] = intval ( $_REQUEST ['show_files_comments'] );
$allow_options [6] = intval ( $_REQUEST ['show_files_related'] );
$allow_options [7] = intval ( $_REQUEST ['show_files_tags'] );
$allow_options [8] = intval ( $_REQUEST ['show_files_rating'] );
$allow_options [9] = trim ( stripslashes ( $_REQUEST ['show_files_view'] ) );
$allow_options [9] = htmlspecialchars ( $allow_options [9], ENT_QUOTES );
$options = implode ( "|", $allow_options );
$db->query ( "UPDATE `" . USERPREFIX . "_users` SET `" . $modulname . "_options` = '{$options}' WHERE `name` = '{$member_id["name"]}'" );
@unlink( ENGINE_DIR . '/cache/system/usergroup.php' );
}
$allow_options = user_options ();
$show_files_on_front = $allow_options [1];
$show_button_email = $allow_options [2];
$show_file_screenshot = $allow_options [3];
$show_files_alpha = $allow_options [4];
$show_files_comments = $allow_options [5];
$show_files_related = $allow_options [6];
$show_files_tags = $allow_options [7];
$show_files_rating = $allow_options [8];
$show_files_view = $allow_options [9];
// Проверка на вывод
// Вывод на главной
if ($show_files_on_front == 1) {
$tpl->set ( '{show_files_on_front1}', "checked" );
$tpl->set ( '{show_files_on_front0}', "" );
} elseif ($show_files_on_front == 0) {
$tpl->set ( '{show_files_on_front1}', "" );
$tpl->set ( '{show_files_on_front0}', "checked" );
} else {
$tpl->set ( '{show_files_on_front1}', "" );
$tpl->set ( '{show_files_on_front0}', "" );
}
// Вывод email
if ($show_button_email == 1) {
$tpl->set ( '{show_button_email1}', "checked" );
$tpl->set ( '{show_button_email0}', "" );
} elseif ($show_button_email == 0) {
$tpl->set ( '{show_button_email1}', "" );
$tpl->set ( '{show_button_email0}', "checked" );
} else {
$tpl->set ( '{show_button_email1}', "" );
$tpl->set ( '{show_button_email0}', "" );
}
// Вывод скриншота
if ($show_file_screenshot == 1) {
$tpl->set ( '{show_file_screenshot1}', "checked" );
$tpl->set ( '{show_file_screenshot0}', "" );
} elseif ($show_file_screenshot == 0) {
$tpl->set ( '{show_file_screenshot1}', "" );
$tpl->set ( '{show_file_screenshot0}', "checked" );
} else {
$tpl->set ( '{show_file_screenshot1}', "" );
$tpl->set ( '{show_file_screenshot0}', "" );
}
// Вывод алфавита
if ($show_files_alpha == 1) {
$tpl->set ( '{show_files_alpha1}', "checked" );
$tpl->set ( '{show_files_alpha0}', "" );
} elseif ($show_files_alpha == 0) {
$tpl->set ( '{show_files_alpha1}', "" );
$tpl->set ( '{show_files_alpha0}', "checked" );
} else {
$tpl->set ( '{show_files_alpha1}', "" );
$tpl->set ( '{show_files_alpha0}', "" );
}
// Вывод комментариев
if ($show_files_comments == 1) {
$tpl->set ( '{show_files_comments1}', "checked" );
$tpl->set ( '{show_files_comments0}', "" );
} elseif ($show_files_comments == 0) {
$tpl->set ( '{show_files_comments1}', "" );
$tpl->set ( '{show_files_comments0}', "checked" );
} else {
$tpl->set ( '{show_files_comments1}', "" );
$tpl->set ( '{show_files_comments0}', "" );
}
// Вывод похожих новостей
if ($show_files_related == 1) {
$tpl->set ( '{show_files_related1}', "checked" );
$tpl->set ( '{show_files_related0}', "" );
} elseif ($show_files_related == 0) {
$tpl->set ( '{show_files_related1}', "" );
$tpl->set ( '{show_files_related0}', "checked" );
} else {
$tpl->set ( '{show_files_related1}', "" );
$tpl->set ( '{show_files_related0}', "" );
}
// Вывод тегов
if ($show_files_tags == 1) {
$tpl->set ( '{show_files_tags1}', "checked" );
$tpl->set ( '{show_files_tags0}', "" );
} elseif ($show_files_tags == 0) {
$tpl->set ( '{show_files_tags1}', "" );
$tpl->set ( '{show_files_tags0}', "checked" );
} else {
$tpl->set ( '{show_files_tags1}', "" );
$tpl->set ( '{show_files_tags0}', "" );
}
// Вывод рейтинга
if ($show_files_rating == 1) {
$tpl->set ( '{show_files_rating1}', "checked" );
$tpl->set ( '{show_files_rating0}', "" );
} elseif ($show_files_rating == 0) {
$tpl->set ( '{show_files_rating1}', "" );
$tpl->set ( '{show_files_rating0}', "checked" );
} else {
$tpl->set ( '{show_files_rating1}', "" );
$tpl->set ( '{show_files_rating0}', "" );
}
// Вид архива
if ($show_files_view == "")
$tpl->set ( '{show_files_view}', $filesConfig ['view'] );
else
$tpl->set ( '{show_files_view}', $show_files_view );
$tpl->compile ( 'content' );
$tpl->clear ();
} else
msgbox ( "Ошибка", "Вы не авторизированы.<br /><a href=\"javascript:history.go(-1)\">Вернуться назад</a>." );
?>
|
|
|
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|