Public Class Aktuality_foto_odstranit
    Inherits System.Web.UI.Page

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

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

        DB.ExecuteCommand("DELETE FROM [aktuality].[fotogalerie] WHERE id = '" & sID & "'")

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

        _NotifyText = "Fotografie je odstraněná."

        Response.Redirect("/id-" & sZaznamID & gadrAktuality_upravit)

    End Sub

End Class