Public Class Odstranit
	Inherits System.Web.UI.Page

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

		Dim sID As String = Request.QueryString("id")
		If sID = "" Then Exit Sub
		If _UserID = "" Then Exit Sub

        DB.ExecuteCommand("DELETE FROM [aktuality].[list] WHERE id = '" & sID & "'")
        DB.ExecuteCommand("DELETE FROM [aktuality].[fotogalerie] WHERE zaznamid = '" & sID & "'")
        DB.ExecuteCommand("DELETE FROM [nastaveni].[adresy] WHERE zaznamid = '" & sID & "' AND strankaid = 100")

        Try
			Dim p As New PCSolution.DirectoryDelete
			p.Delete(_PathFoto & "\Aktuality\" & sID)
		Catch ex As Exception

		End Try

		_NotifyText = "Aktualita je odstraněná."

		Response.Redirect(gadrAktuality)

	End Sub

End Class