<?

if (user_access('obmen_file_edit') || $user['id']==$file_id['id_user'])
{
if (isset($_GET['act']) && $_GET['act']=='edit' && $l!='/')
{
echo "<form method='post'  action='?showinfo&amp;act=edit&amp;ok'>\n";
echo "Название файла:<br />\n";
echo "<input name='name' type='text' maxlength='32' value='$file_id[name]' /><br />\n";
echo "Описание:<br />\n";
echo "<textarea name='opis'>".esc(trim(stripcslashes(htmlspecialchars($file_id['opis']))))."</textarea><br />\n";
if ($user['set_translit']==1)echo "<label><input type=\"checkbox\" name=\"translit1\" value=\"1\" /> Транслит</label><br />\n";
echo "<input value=\"Изменить\" type=\"submit\" /></form>\n";
echo "<div class='fyt'>
&laquo;<a href='?showinfo'>Отмена</a><br />
</div>\n";
require '../sys/inc/tfoot.php';
exit;
}else{
echo "<div class='fyt'>
<img src='/style/images/nastr.png' alt='soc' /> <a href='?showinfo&amp;act=edit'>Редактировать файл</a><br />
</div>\n";
}
}

if (user_access('obmen_file_delete') || $user['id']==$file_id['id_user'])
{
if (isset($_GET['act']) && $_GET['act']=='delete' && $l!='/')
{
echo "<div class='err'>";
echo "Удалить файл \"$file_id[name]\"?<br />\n";
echo "[<a href='?showinfo&amp;act=delete&amp;ok'>Да</a>] \n";
echo "[<a href='?showinfo'>Нет</a>]<br />\n";
echo "</div>";
}else{
echo "<div class='fyt'>\n";
echo "<img src='/style/images/trash_16.png' alt='soc' /> <a href='?showinfo&amp;act=delete'>Удалить файл</a><br />\n";
echo "</div>\n";
}
}
?>