File size: 2.66Kb
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<title>LinkExchanger ADMIN AREA</title>
</head>
<?
include "../config.php";
include "menu.php";
echo "<body bgcolor=$bgcolor>";
if ($_GET[action] == delete AND $_GET[id]) {
$file=file("../base.dat");
$fp=fopen("../base.dat","w");
flock($fp, LOCK_EX);
for ($i=0;$i<count($file);$i++) {
$a = explode("|", $file[$i]);
if ($a[0] == $_GET[id]) unset($file[$i]);
}
fputs($fp,implode("",$file));
flock($fp, LOCK_UN);
fclose($fp);
echo "<center><table cellpadding=3 width=500>";
echo "<tr><td><font face=$bigwrn_face size=$bigwrn_size color=$bigwrn_color><b>Ссылка удалена!</b></font><hr size=1></td></tr>";
echo "</table></center>";
exit;
}
if ($_GET[id]) {
$file=file("../base.dat");
for ($i=0;$i<count($file);$i++) {
$a = explode("|", $file[$i]);
if ($a[0] == $_GET[id]) {
echo "<center><table cellpadding=3 width=500>";
echo "<tr><td colspan=2><font face=$bigwrn_face size=$bigwrn_size color=$bigwrn_color><b>Удаление ссылки:</b></font><hr size=1></td></tr>";
echo "<tr><td colspan=2><font face=$font_face size=$font_size color=$font_color>Вы собираетесь удалить следующие данные:</font></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>Из категории:</font></td><td align=right><input type=text name=category value='$a[4]' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>ID:</font></td><td align=right><input type=text name=id value='$a[0]' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>Имя или nickname:</font></td><td align=right><input type=text name=nick value='$a[1]' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>URL сайта:</font></td><td align=right><input type=text name=url value='$a[2]' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>e-mail:</font></td><td align=right><input type=text name=mail value='$a[3]' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>Кнопка:</font></td><td align=right>$a[6]</td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>Текстовая ссылка:</font></td><td align=right><font face=$font_face size=$font_size color=$font_color>$a[5]</font></td></tr>";
echo "<tr><td colspan=2><hr size=1></td></tr>";
echo "<tr><td colspan=2 align=center><font face=$font_face size=$font_size color=$font_color>| <a href='$_SERVER[PHP_SELF]?id=$a[0]&action=delete'>Удалить</a> || <a href='index.php'>Не удалять</a> |</font></td></tr>";
echo "</table></center>";
} else {}
}
}
?>
</body>
</html>