root/contributed_modules/modules/endpointman/uninstall.php

Revision 9907, 2.1 kB (checked in by tm1000, 3 years ago)

Added Endpoint Manager into the Repo

  • Property svn:eol-style set to native
Line 
1 <?PHP
2 /*
3 Endpoint Manager V2
4 Copyright (C) 2009-2010  Ed Macri, John Mullinix and Andrew Nagy
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19
20 http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 */
22 require dirname($_SERVER["SCRIPT_FILENAME"]). "/modules/endpointman/includes/functions.inc";
23
24 global $endpoint;
25
26 $endpoint = new endpointmanager();
27
28 global $db;
29
30 if (! function_exists("out")) {
31     function out($text) {
32         echo $text."<br />";
33     }
34 }
35
36 if (! function_exists("outn")) {
37     function outn($text) {
38         echo $text;
39     }
40 }
41
42 out("Removing Phone Modules Directory");
43 $endpoint->deltree(PHONE_MODULES_PATH);
44 exec("rm -R ". PHONE_MODULES_PATH);
45
46 out("Dropping all relevant tables");
47 $sql = "DROP TABLE `endpointman_brand_list`";
48 $result = $db->query($sql);
49
50 $sql = "DROP TABLE `endpointman_global_vars`";
51 $result = $db->query($sql);
52
53 $sql = "DROP TABLE `endpointman_mac_list`";
54 $result = $db->query($sql);
55
56 $sql = "DROP TABLE `endpointman_model_list`";
57 $result = $db->query($sql);
58
59 $sql = "DROP TABLE `endpointman_oui_list`";
60 $result = $db->query($sql);
61
62 $sql = "DROP TABLE `endpointman_product_list`";
63 $result = $db->query($sql);
64
65 $sql = "DROP TABLE `endpointman_template_list`";
66 $result = $db->query($sql);
67
68 $sql = "DROP TABLE `endpointman_time_zones`";
69 $result = $db->query($sql);
70
71 $sql = "DROP TABLE `endpointman_custom_configs`";
72 $result = $db->query($sql);
73
74 out("Removing ARI Module");       
75 unlink($amp_conf['AMPWEBROOT']."/recordings/modules/phonesettings.module");
76
77 ?>
Note: See TracBrowser for help on using the browser.