File size: 1.75Kb
<?php
if (isset($_GET['pass'])) {
if ($_GET['pass'] == $gallery['pass']) {
$_SESSION['pass'] = $gallery['pass'];
header('Location: ?');
exit;
}
$err[] = 'Неверный пароль от фотоальбома';
}
$set['title'] = 'Доступ ограничен';
include_once H . 'sys/inc/thead.php';
title();
aut();
err();
?>
<?php
if (isset($msg)) {
?>
<div class="mess">
<?php
if (is_array($msg)) {
foreach ($msg AS $key => $value) {
?>
<div class="off"><?php
echo $value;
?></div><?php
}
}
?>
</div>
<?php
}
?>
<?php
if (isset($gallery) && $gallery) {
if ($gallery['privat'] == 3 && $gallery['pass'] && !$ph->is_access($gallery_id, $user_id)) {
?>
<form class="mess">
Альбом <b><?php
echo text($gallery['name']);
?></b> доступен только по паролю:<br/>
Пароль: <input type="text" name="pass"/><br/>
<button type="submit">OK</button>
</form>
<?php
}
if ($gallery['privat'] == 1) {
?>
<div class="mess">
Доступ к альбому <b><?php
echo text($gallery['name']);
?></b> открыт только для друзей.
</div>
<?php
}
if ($gallery['privat'] == 2) {
?>
<div class="mess">
Доступ к альбому <b><?php
echo text($gallery['name']);
?></b> закрыт.
</div>
<?php
}
}
include_once H . 'sys/inc/tfoot.php';