2 /***********************************************************************/
4 /***********************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /***********************************************************************/
14 $_user_location = 'public';
16 define('AT_INCLUDE_PATH', '../../../include/');
17 require (AT_INCLUDE_PATH.'vitals.inc.php');
18 include (AT_INCLUDE_PATH.'../mods/_core/file_manager/filemanager.inc.php'); //clr_dir()
19 //include (AT_INCLUDE_PATH.'lib/filemanager.inc.php'); //clr_dir()
20 include (AT_PA_INCLUDE.'lib.inc.php'); //album_filepath
21 include (AT_PA_INCLUDE.'classes/PhotoAlbum.class.php');
23 //validates if this is me/have the privilege to delete.
24 $id = intval($_REQUEST['id']);
25 $pa = new PhotoAlbum($id);
26 $info = $pa->getAlbumInfo();
28 if (!$pa->checkAlbumPriv($_SESSION['member_id'])){
29 $msg->addError('ACCESS_DENIED');
30 header('Location: index.php');
34 if ($_POST['submit_no']) {
35 $msg->addFeedback('CANCELLED');
36 Header('Location: index.php');
40 if ($_POST['submit_yes']) {
44 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
46 if($info['type_id']== AT_PA_TYPE_COURSE_ALBUM){
47 Header('Location: course_albums.php');
50 Header('Location: index.php');
56 require(AT_INCLUDE_PATH.'header.inc.php');
58 $hidden_vars['id'] = $id;
59 $msg->addConfirm(array('PA_DELETE_ALBUM', AT_print($info['name'], 'photo_albums.name')), $hidden_vars);
62 require(AT_INCLUDE_PATH.'footer.inc.php');