Revision 1753
Added by Dietmar about 12 years ago
sections.php | ||
---|---|---|
31 | 31 |
require_once(WB_PATH.'/framework/functions.php'); |
32 | 32 |
// Create new admin object |
33 | 33 |
require_once(WB_PATH.'/framework/class.admin.php'); |
34 |
$admin = new admin('Pages', 'pages_modify', false);
|
|
34 |
$admin = new admin('Pages', 'pages_view', false);
|
|
35 | 35 |
|
36 | 36 |
$action = 'show'; |
37 | 37 |
// Get page id |
... | ... | |
51 | 51 |
|
52 | 52 |
switch ($action): |
53 | 53 |
case 'delete' : |
54 |
if($admin->get_permission('pages_delete') == false) |
|
55 |
{ |
|
56 |
$admin->print_header(); |
|
57 |
$admin->print_error($module.' '.strtolower($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']),$backlink); |
|
58 |
} |
|
54 | 59 |
|
55 | 60 |
if( ( !($section_id = intval($admin->checkIDKEY('section_id', 0, $_SERVER['REQUEST_METHOD'])) )) ) |
56 | 61 |
{ |
... | ... | |
90 | 95 |
|
91 | 96 |
break; |
92 | 97 |
case 'add' : |
93 |
|
|
98 |
if($admin->get_permission('pages_add') == false) |
|
99 |
{ |
|
100 |
$admin->print_header(); |
|
101 |
$admin->print_error($module.' '.strtolower($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']),$backlink); |
|
102 |
} |
|
94 | 103 |
if (!$admin->checkFTAN()) |
95 | 104 |
{ |
96 | 105 |
$admin->print_header(); |
... | ... | |
107 | 116 |
$sql .= '`page_id` = '.(int)$page_id.', '; |
108 | 117 |
$sql .= '`module` = \''.$module.'\', '; |
109 | 118 |
$sql .= '`position` = '.(int)$position.', '; |
110 |
$sql .= '`block` = 1'; |
|
119 |
$sql .= '`block` = \'1\', '; |
|
120 |
$sql .= '`publ_start` = \'0\','; |
|
121 |
$sql .= '`publ_end` = \'0\' '; |
|
122 |
|
|
111 | 123 |
if($database->query($sql)) { |
112 | 124 |
// Get the section id |
113 | 125 |
$section_id = $database->get_one("SELECT LAST_INSERT_ID()"); |
Also available in: Unified diff
! fixed calendar time, now all Calendar in WB shows right user TIMEZONE
please check module for saving timestamp minus TIMEZONE
there was a problem, if blocks and menus are disabled