remove old readme
[atutor.git] / docs / mods / _standard / social / admin / delete_applications.php
1 <?php
2 /****************************************************************/
3 /* ATutor                                                                                                               */
4 /****************************************************************/
5 /* Copyright (c) 2002-2009                                                                              */
6 /* Inclusive Design Institute                                   */
7 /* http://atutor.ca                                                                                             */
8 /*                                                              */
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 /****************************************************************/
13 // $Id$
14 $_user_location = 'admin';
15
16 define('AT_INCLUDE_PATH', '../../../../include/');
17 require(AT_INCLUDE_PATH.'vitals.inc.php');
18 require(AT_SOCIAL_INCLUDE.'constants.inc.php');
19 require(AT_SOCIAL_INCLUDE.'friends.inc.php');
20 include(AT_SOCIAL_INCLUDE.'classes/Application.class.php');
21 $_custom_css = $_base_path . AT_SOCIAL_BASENAME . 'module.css'; // use a custom stylesheet
22
23 //initialization
24 $apps = new Applications();
25
26 //handles deletion
27 if (isset($_POST['delete'])){
28         if (isset($_POST['apps']) && !empty($_POST['apps'])){
29                 //need confirm box
30                 $apps->deleteApplications($_POST['apps']);
31                 $msg->addFeedback('GADGET_REMOVED_SUCCESSFULLY');
32         } else {
33                 //cannot be empty
34                 $msg->addError('GADGET_DELETED_CANNOT_BE_EMPTY');
35         }
36 }
37
38 //data
39 $all_apps = $apps->listApplications();
40
41 include(AT_INCLUDE_PATH.'header.inc.php');
42 $savant->assign('all_apps', $all_apps);
43 $savant->display('social/admin/delete_applications.tmpl.php');
44 include(AT_INCLUDE_PATH.'footer.inc.php');
45 ?>