-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodify_settings.php
57 lines (46 loc) · 1.77 KB
/
modify_settings.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
57
<?php
/**
* CMS module: Download Gallery 3
* Copyright and more information see file info.php
**/
require_once '../../config.php';
require_once WB_PATH.'/modules/admin.php';
require_once realpath( dirname(__FILE__).'/info.php' );
require_once realpath( dirname(__FILE__).'/functions.php' );
if(LANGUAGE_LOADED) {
require WB_PATH.'/modules/'.$dlgmodname.'/languages/EN.php';
if (file_exists (WB_PATH.'/modules/'.$dlgmodname.'/languages/'.LANGUAGE.'.php')) {
require WB_PATH.'/modules/'.$dlgmodname.'/languages/'.LANGUAGE.'.php';
}
}
// STEP 0: initialize some variables
$page_id = (int) $page_id;
$section_id = (int) $section_id;
// initialize template data
$dir = pathinfo(dirname(__FILE__),PATHINFO_BASENAME);
$data = array(
'FTAN' => (method_exists($admin,'getFTAN') ? $admin->getFTAN() : ''),
'heading' => "$module_name - ".$TEXT['PAGE']." $page_id",
'modify_link' => ADMIN_URL.'/pages/modify.php',
'self_link' => WB_URL.'/modules/'.$dir,
'mod_version' => $module_version,
'settings' => array(),
'fileext' => array(),
'tpldirs' => array(),
);
// Get General Settings
$query_content = $database->query("SELECT * FROM `".TABLE_PREFIX.$tablename."_settings` WHERE `section_id` = '$section_id' AND `page_id` = '$page_id'");
$data['settings'] = $query_content->fetchRow();
// List Extension types
$query_fileext = $database->query("SELECT * FROM `".TABLE_PREFIX.$tablename."_file_ext` WHERE `section_id` = '$section_id' AND `page_id` = '$page_id'");
if($query_fileext->numRows())
{
while($row = $query_fileext->fetchRow())
{
$data['fileext'][] = $row;
}
}
$data['tpldirs'] = dlg_gettpldirs();
$data = (object) $data;
include dirname(__FILE__).'/templates/default/backend/modify_settings.phtml';
$admin->print_footer();