-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb_uninstall.php
More file actions
69 lines (60 loc) · 1.97 KB
/
db_uninstall.php
File metadata and controls
69 lines (60 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
*
* @package mxBB Portal Module - mx_contact
* @version $Id: db_uninstall.php,v 1.2 2008/02/09 00:04:51 jonohlsson Exp $
* @copyright (c) 2003 [orynider@rdslink.ro, OryNider] mxBB Development Team
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2
*
*/
define('IN_PORTAL', true);
if ( !defined('IN_ADMIN') )
{
$mx_root_path = '../../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($mx_root_path . 'common.'.$phpEx);
//
// Start session management
//
$mx_user->init($user_ip, PAGE_INDEX);
if( !$userdata['session_logged_in'] )
{
die("Hacking attempt(3)");
}
if( $userdata['user_level'] != ADMIN )
{
die("Hacking attempt(4)");
}
//
// End session management
//
}
$sql = array(
"DROP TABLE ".$mx_table_prefix."contact_config",
"DROP TABLE ".$mx_table_prefix."contact_msgs",
"DROP TABLE ".$mx_table_prefix."contact_emails",
"DROP TABLE ".$mx_table_prefix."contact_mass_news",
"DROP TABLE ".$mx_table_prefix."contact"
);
$n = 0;
$message = "<b>This list is a result of the SQL queries needed to uninstall radio Module Addon</b><br/><br/>";
while($sql[$n])
{
$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
if( !$result = $db->sql_query($sql[$n]) )
{
$message .= '<b><font color=#FF0000>[Error or Already removed]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
}
else
{
$message .='<b><font color=#0000fF>[Removed]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
}
$n++;
}
$message .= ' <br />If you get some Error, relax, this is normal when updating modules';
echo '<br /> <br />';
echo '<table cellpadding="4" cellspacing="1" border="0" class="forumline">';
echo '<tr><th class="thHead" align="center">Module Installation Information</th></tr>';
echo '<tr><td class="row1" align="center"><span class="gen">' . $message . '</span></td></tr>';
echo '</table> <br />';
?>