-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.php
58 lines (52 loc) · 2.14 KB
/
install.php
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
<?php
/**
* @category modules
* @package onebyone
* @author WBCE Project
* @copyright florian
* @license WTFPL
*/
//no direct file access
if(count(get_included_files()) ==1){$z="HTTP/1.0 404 Not Found";header($z);die($z);}
// Create DB table
//$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_onebyone`");
$mod_onebyone = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_onebyone` ( '
. ' `section_id` INT NOT NULL DEFAULT \'0\','
. ' `page_id` INT NOT NULL DEFAULT \'0\','
. ' `content1_code` LONGTEXT NOT NULL ,'
. ' `content1_wysiwyg` LONGTEXT NOT NULL ,'
. ' `content2_code` LONGTEXT NOT NULL ,'
. ' `content2_wysiwyg` LONGTEXT NOT NULL ,'
. ' `content3_code` LONGTEXT NOT NULL ,'
. ' `content3_wysiwyg` LONGTEXT NOT NULL ,'
. ' `obo_modus` TEXT NOT NULL ,'
. ' `obo_dimensions` TEXT NOT NULL ,'
. ' `obo_global_headline` TEXT NOT NULL,'
. ' `obo_global_headline_size` TEXT NOT NULL,'
. ' `obo_before` TEXT NOT NULL,'
. ' `obo_after` TEXT NOT NULL,'
. ' `obo_content1_headline` TEXT NOT NULL,'
. ' `obo_content1_headline_size` TEXT NOT NULL,'
. ' `obo_content1_link` TEXT NOT NULL,'
. ' `obo_content1_image` TEXT NOT NULL,'
. ' `obo_content1_image_alt` TEXT NOT NULL,'
. ' `obo_content2_headline` TEXT NOT NULL,'
. ' `obo_content2_headline_size` TEXT NOT NULL,'
. ' `obo_content2_link` TEXT NOT NULL,'
. ' `obo_content2_image` TEXT NOT NULL,'
. ' `obo_content2_image_alt` TEXT NOT NULL,'
. ' `obo_content3_headline` TEXT NOT NULL,'
. ' `obo_content3_headline_size` TEXT NOT NULL,'
. ' `obo_content3_link` TEXT NOT NULL,'
. ' `obo_content3_image` TEXT NOT NULL,'
. ' `obo_content3_image_alt` TEXT NOT NULL,'
. ' PRIMARY KEY ( `section_id` ) '
. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
$database->query($mod_onebyone);
require_once(WB_PATH.'/framework/functions.php');
$path = WB_PATH.'/modules/onebyone/';
if(file_exists($path.'module_settings.default.php')) {
if(!rename($path.'module_settings.default.php',$path.'module_settings.php')) {
echo "<h2>Error renaming module_settings.php. Please rename module_settings.default.php manually to module_settings.php</h2>";
}
}