* Copyright 2014 * * Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/imageslider.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $imageSliderObj = new ImageSlider($mysqli); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Home Page Images"); $consoleObj->select($cID); if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $imageSliderObj->select($_POST['imgID'])) { $imageSliderInfo = $imageSliderObj->get_info_filtered(); if (isset($_POST['confirm'])) { unlink("../../../../" . $imageSliderInfo['imageurl']); $imageSliderObj->delete(); include "imagelist.php"; } else { echo "\n\t\t\t\n\t\t\t\t<div id='confirmDeleteImage' style='display: none'>\n\t\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\t\tAre you sure you want to delete <b>" . $imageSliderInfo['name'] . "</b>?\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('#confirmDeleteImage').dialog({\n\t\t\t\t\t\t\ttitle: 'Confirm Delete - Home Page Image',\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tzIndex: 999999,\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\t\$('#imageList').fadeOut(200);\n\t\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/news/include/delete_image.php', { imgID: '" . $_POST['imgID'] . "', confirm: 1 }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\$('#imageList').html(data);\n\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\t\$('#imageList').fadeIn(200);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\n\t\t\t"; } } }