veliant9
Пользователь
Как подключить данную форму? все настроил, а зайти не могу
Код:
в index.php
print_page('index.tpl');
заменил на
if(!IS_GUEST){
print_page('index.tpl');
}
else
{
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel='stylesheet prefetch' href='https://fontastic.s3.amazonaws.com/tyyroC3qVqR4rWNhyhMTRB/icons.css'>
<link rel="shortcut icon" href="http://www.rudebox.org.ua/wp-content/themes/mystique/favicon.ico" />
<link rel="stylesheet" href="styles/templates/default/css/style1.css" media="screen" type="text/css" />
</head>
<body>
<div class="bg-wrapper">
<div class="bg-grad orange active"></div>
<div class="bg-grad red"></div>
<div class="bg-grad purple"></div>
<div class="bg-grad blue"></div>
<div class="bg-grad green"></div>
<div class="bg-grad yellow"></div>
</div>
<font color=white>
<div class="login-wrapper">
<div class="x-wrapper">
<div class="y-wrapper">
<div class="title-wrapper">
<h2>Здравствуйте!</h2>
<h4>пожалуйста войдите</h4></font>
</div>
<div class="input-box">
<input type="text" id="username" value="" placeholder="Логин" />
<input type="password" id="password" value="" placeholder="Пароль" /><span class="show-pass icon-eye" title="show characters"></span>
</div>
<div class="button-wrapper">
<a href="/profile.php?mode=sendpassword">забыли пароль?</a> | <a href="/profile.php?mode=register">регистрация</a>
<span class="login-btn">Войти»</span>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="http://www.rudebox.org.ua/js/jquery.js"></script>
<script src="styles/js/index.js"></script>
</body>
</html>
<?php
}
в login.php
print_page('login.tpl');
}
redirect($redirect_url);
заменил на
print_page('login.tpl','','content_only');
bb_exit();
}
redirect($redirect_url);
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);
}
}
login.tpl
вставил
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel='stylesheet prefetch' href='https://fontastic.s3.amazonaws.com/tyyroC3qVqR4rWNhyhMTRB/icons.css'>
<link rel="shortcut icon" href="http://www.rudebox.org.ua/wp-content/themes/mystique/favicon.ico" />
<link rel="stylesheet" href="styles/templates/default/css/style1.css" media="screen" type="text/css" />
</head>
<body>
<div class="bg-wrapper">
<div class="bg-grad orange active"></div>
<div class="bg-grad red"></div>
<div class="bg-grad purple"></div>
<div class="bg-grad blue"></div>
<div class="bg-grad green"></div>
<div class="bg-grad yellow"></div>
</div>
<font color=white>
<div class="login-wrapper">
<div class="x-wrapper">
<div class="y-wrapper">
<div class="title-wrapper">
<h2>Здравствуйте!</h2>
<h4>пожалуйста войдите</h4></font>
</div>
<div class="input-box">
<input type="text" id="username" value="" placeholder="Логин" />
<input type="password" id="password" value="" placeholder="Пароль" /><span class="show-pass icon-eye" title="show characters"></span>
</div>
<div class="button-wrapper">
<a href="/profile.php?mode=sendpassword">забыли пароль?</a> | <a href="/profile.php?mode=register">регистрация</a>
<span class="login-btn">Войти»</span>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="http://www.rudebox.org.ua/js/jquery.js"></script>
<script src="styles/js/index.js"></script>
</body>
</html>