require 'auth.inc'; if(isset($_GET['deletePhotobookId'])) { $id = intval($_GET['deletePhotobookId']); if ($id > 0) { $res = safe_query("SELECT image FROM photo WHERE photobookId = $id"); while(list($image) = mysql_fetch_array($res)) deleteImages($image); safe_delete("DELETE FROM photo WHERE photobookId = $id"); safe_delete("DELETE FROM photobook WHERE id = $id"); } } if(isset($_GET['deleteFilebookId'])) { $id = intval($_GET['deleteFilebookId']); if ($id > 0) { $res = safe_query("SELECT filename FROM file WHERE filebookId = $id"); while(list($filename) = mysql_fetch_array($res)) { $filename=$_SERVER['DOCUMENT_ROOT']."/media/files/$filename"; unlink("$filename"); } safe_delete("DELETE FROM file WHERE filebookId = $id"); safe_delete("DELETE FROM filebook WHERE id=$id"); } } require 'header.inc'; include 'nav.inc'; ?>
Titel | Beschrijving | Verwijder | foreach($photobooks as $book) { ?>|
---|---|---|---|
![]() |
= $book['title'] ?> | = $book['text'] ?> | |
Bestanden |
|||
Titel | Beschrijving | Verwijder | foreach($filebooks as $file) { ?>|
![]() |
= $file['title'] ?> | = $file['text'] ?> |