if(isset($_GET['del'])) { $del = mysql_fetch_assoc(mysql_query("SELECT * FROM `smile` WHERE `id` = '" . intval($_GET['del']) . "' LIMIT 1")); @unlink(H.'style/smiles/' . $del['id'] . '.gif'); mysql_query("DELETE FROM `smile` WHERE `id` = '".intval($_GET['del'])."'"); $_SESSION['message'] = 'Смайл успешно удален'; header('Location: ?id=' . intval($_GET['id'])); exit; }