Repository navigation
Expand file tree
/
Copy pathdb_install.php
More file actions
54 lines (43 loc) · 1.65 KB
/
Copy pathdb_install.php
File metadata and controls
54 lines (43 loc) · 1.65 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
<?php
/**
*
* @package MX-Publisher Module - mx_phpbb2blocks
* @version $Id: db_install.php,v 1.11 2013/06/28 15:36:41 orynider Exp $
* @copyright (c) 2002-2008 MX-Publisher Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2
* @link http://mxpcms.sourceforge.net/
*
*/
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(1)" );
}
if ( $userdata['user_level'] != ADMIN )
{
die( "Hacking attempt(2)" );
}
// End session management
}
$mx_module_version = 'MX-Publisher Core Module';
$mx_module_copy = 'Original MX-Publisher <i>phpBB2Blocks</i> module by [MarcMoris/Jon Ohlsson] <a href="http://mxpcms.sourceforge.net/" target="_blank"> The MX-Publisher Development Team</a>';
$message = "<b>" . $lang['fresh_install'] . "!</b><br/><br/>";
$sql = array();
$sql[] = "UPDATE " . $mx_table_prefix . "module" . "
SET module_version = '" . $mx_module_version . "',
module_copy = '" . $mx_module_copy . "'
WHERE module_id = '" . $mx_module_id . "'";
$message .= mx_do_install_upgrade( $sql );
echo "<br /><br />";
echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">";
echo "<tr><th class=\"thHead\" align=\"center\">" . $lang['module_install_info'] . "</th></tr>";
echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>";
echo "</table><br />";
?>