View file Dasty_Social/modules/photo/inc/gallery_show_form.php

File size: 3.1Kb
<?
if ($user['level'] > $ank['level'] || $user['id'] == $ank['id'])
{
	if (isset($_GET['edit']) && $_GET['edit'] == 'rename')
	{
		?>
		
		<div class="menu">
		<form action="?edit=rename&amp;ok" method="post">
		<input placeholder="Название" type="text" name="name" value="<?=text($gallery['name'])?>" /><br />
		<textarea style="height:50px;" placeholder="Описание" name="opis"></textarea><br />
		<input placeholder="Пароль" type="text" name="pass" value="<?=text($gallery['pass'])?>" /></div>

		<div class="radio">
		<div class="mess">
		Могут смотреть:</br>
		<input id="0" name="privat" type="radio" <?=($gallery['privat'] == 0 ? ' checked="checked"' : null)?> value="0" /><label for='0'>Все</label></br>
		<input id="1" name="privat" type="radio" <?=($gallery['privat'] == 1 ? ' checked="checked"' : null)?>value="1" /><label for='1'>Друзья</label></br>
		<input id="2" name="privat" type="radio" <?=($gallery['privat'] == 2 ? ' checked="checked"' : null)?>value="2" /><label for='2'>Только я</label></br>

		Могут комментировать:</br>
		<input id="3" name="privat_komm" type="radio" <?=($gallery['privat_komm'] == 0 ? ' checked="checked"' : null)?> value="0" /><label for='3'>Все</label></br>
		<input id="4" name="privat_komm" type="radio" <?=($gallery['privat_komm'] == 1 ? ' checked="checked"' : null)?> value="1" /><label for='4'>Друзья</label></br>
		<input id="5" name="privat_komm" type="radio" <?=($gallery['privat_komm'] == 2 ? ' checked="checked"' : null)?> value="2" /><label for='5'>Только я</label>
		
		</div>
		</div>
		<div class="menu">
		<input class="submit" type="submit" value="Сохранить" />
		</form>
</div>
		<?
	
		include_once '../../sys/inc/tfoot.php';
		exit;
	}
}


if ((user_access('foto_alb_del') || isset($user) && $user['id'] == $ank['id']) && isset($_GET['act']) && $_GET['act'] == 'delete')
{
	
	?>
	<div class='menu'>
	Вы действительно хотите удалить фотоальбом <b><?=text($gallery['name'])?></b>, и все фотографии в нем?</br></br>
	<a style="background: #f59a93; padding: 3px 15px; color: white; border-radius: 3px;" href="?act=delete&amp;ok">Удалить</a> 
	<a style="background: #99d49b; padding: 3px 15px; color: white; border-radius: 3px;" href="/info.php">Отмена</a> 
	</div>
	<?
}


if (isset($user) && $user['id'] == $ank['id'] && isset($_GET['act']) && $_GET['act'] == 'upload')
{
	?>
	
	<div class="menu">
	<form id="photo_form" enctype="multipart/form-data" action="?act=upload&amp;ok" method="post">
	<input placeholder="Название" name="name" type="text" /><br />
	<input name="file" type="file" accept="image/*,image/jpeg" /><br />
	<textarea style="height:50px;" placeholder="Описение" name="opis"></textarea><br />
	<input id="0" type="checkbox" name="metka" value="1" /><label for="0">Метка <img src="/img/18.png"></label>
	<input class="submit" type="submit" value="Загрузить" /> 
	</form>
	</div>

	<?

	include_once '../../sys/inc/tfoot.php';
	exit;
}
?>