require_once __DIR__ . '/../../includes/helpers.php'; require_once __DIR__ . '/../../loader.php'; Session::checkSession(); $a = new Auth(); if (!$a->isLoggedIn()) { redirect_to('login.php'); exit; } $u = User::getUser(); $pics = Pics::getAllPics(); //$l = Logger::start(); $msg = ""; if (isset($_POST['del'])) { $id = intval($_POST['did']); $d = Pics::delete($id); if ($d) { $msg = opmsg("Pic Deleted Successfully", "success"); redirect_to('managepics.php'); } else { $msg = opmsg("Pic Not Deleted", "danger"); } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->