veliant9
Пользователь

Код:
Редактируемые файлы:
/index.php
/login.php
/includes/functions.php
/templates/default/login.tpl
==============================
1. Скидываем папку Index из архива в корень сайта
Открываем index.php
ищем в самом конце кода
print_page('index.tpl');
заменяем на
if(!IS_GUEST){
print_page('index.tpl');
}
else
{
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="index/ss.css">
<title>Авторизация :: НАЗВАНИЕ ВАШЕГО ТРЕКЕРА</title>
</head>
<body>
<h1>Вход</h1>
<div id="wrapper">
<form id="signin" method="post" action="/login.php" autocomplete="off">
<input type="text" id="user" name="login_username" tabindex="1" accesskey="l" placeholder="Логин" />
<input type="password" id="pass" name="login_password" tabindex="2" placeholder="Пароль" />
<button type="submit" name="login" tabindex="4"></button>
<center><p>Забыли пароль? <a href="profile.php?mode=sendpassword">нажмите здесь</a></p></center>
<center><p><a href="profile.php?mode=register">Регистрация</a></p></center>
</form>
</div>
</body>
</html>
<?php
}
Открываем login.php
ищем
print_page('login.tpl');
}
redirect($redirect_url);
заменяем на
print_page('login.tpl','','content_only');
bb_exit();
}
redirect($redirect_url);
Открываем /includes/functions.php
ищем
function print_page ($args, $type = '', $mode = '')
{
global $template, $gen_simple_header;
$tpl = (is_array($args) && !empty($args['tpl'])) ? $args['tpl'] : $args;
$tpl = ($type === 'admin') ? ADMIN_TPL_DIR . $tpl : $tpl;
$gen_simple_header = (is_array($args) && !empty($args['simple']) OR $type === 'simple') ? true : $gen_simple_header;
if ($mode !== 'no_header')
{
require(PAGE_HEADER);
}
$template->set_filenames(array('body' => $tpl));
$template->pparse('body');
if ($mode !== 'no_footer')
{
require(PAGE_FOOTER);
}
}
заменяем на
function print_page ($args, $type = '', $mode = '')
{
global $template, $gen_simple_header;
$tpl = (is_array($args) && !empty($args['tpl'])) ? $args['tpl'] : $args;
$tpl = ($type === 'admin') ? ADMIN_TPL_DIR . $tpl : $tpl;
$gen_simple_header = (is_array($args) && !empty($args['simple']) OR $type === 'simple') ? true : $gen_simple_header;
if ($mode !== 'no_header' && $mode !== 'content_only')
{
require(PAGE_HEADER);
}
$template->set_filenames(array('body' => $tpl));
$template->pparse('body');
if ($mode !== 'no_footer' && $mode !== 'content_only')
{
require(PAGE_FOOTER);
}
}
Открываем /templates/default/login.tpl
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="index/ss.css">
<title>Авторизация :: НАЗВАНИЕ ВАШЕГО ТРЕКЕРА</title>
</head>
<body>
<h1>Вход</h1>
<div id="wrapper">
<form id="signin" method="post" action="/login.php" autocomplete="off">
<input type="text" id="user" name="login_username" tabindex="1" accesskey="l" placeholder="Логин" />
<input type="password" id="pass" name="login_password" tabindex="2" placeholder="Пароль" />
<button type="submit" name="login" tabindex="4"></button>
<center><p>Забыли пароль? <a href="profile.php?mode=sendpassword">нажмите здесь</a></p></center>
<center><p><a href="profile.php?mode=register">Регистрация</a></p></center>
</form>
</div>
</body>
</html>