<?
if ((user_access('foto_alb_del') || isset($user) && $user['id']==$ank['id']) && isset($_GET['act']) && $_GET['act']=='delete')
{
echo "<form action='?act=delete&amp;ok&amp;page=$page' method='post'>";
echo "<div class='err'>Подтвердите удаление фотоальбома</div>\n";
echo "<input class=\"submit\" type=\"submit\" value=\"Удалить\" /><br />\n";
echo "&laquo;<a href='?'>Отмена</a><br />\n";
echo "</form>";
}

if (isset($user) && $user['id']==$ank['id'] && isset($_GET['act']) && $_GET['act']=='upload')
{
echo "<form enctype='multipart/form-data' action='?act=upload&amp;ok&amp;page=$page' method='post'>";
echo "Название:<br />\n";
echo "<input name='name' type='text' /><br />\n";
echo "Файл:<br />\n";
echo "<input name='file' type='file' accept='image/*,image/jpeg' /><br />\n";
echo "Описание:<br />\n";
echo "<textarea name='opis'></textarea><br />\n";
####
echo '<input name="sex" type="checkbox" value="1"> файл 18+<br />';
####
echo "<input class='submit' type='submit' value='Выгрузить' /><br />\n";
echo "&laquo;<a href='?'>Отмена</a><br />\n";
echo "</form>";
}

if (isset($user) && $user['id']==$ank['id'] || user_access('foto_alb_del')){
echo "<div class='fyt'>\n";
if (isset($user) && $user['id']==$ank['id'])
echo "<img src='/style/images/foto.png' alt='ENK'> <a href='?act=upload'>Новое фото</a><br />\n";
if (user_access('foto_alb_del') || isset($user) && $user['id']==$ank['id'])
echo "<img src='/style/images/cancel.png' alt='ENK'> <a href='?act=delete'>Удалить фотоальбом</a><br />\n";
echo "</div>\n";
}
?>