Revision 1402
Added by Dietmar almost 14 years ago
sections.php | ||
---|---|---|
25 | 25 |
header('Location: '.ADMIN_URL.'/pages/index.php'); |
26 | 26 |
exit(0); |
27 | 27 |
} |
28 |
/* */ |
|
29 |
$debug = false; // to show position and section_id |
|
30 |
If(!defined('DEBUG')) { define('DEBUG',$debug);} |
|
31 |
// Create new admin object |
|
32 |
require_once(WB_PATH.'/framework/class.admin.php'); |
|
33 |
$admin = new admin('Pages', 'pages_modify'); |
|
28 | 34 |
|
29 | 35 |
// Get page id |
30 | 36 |
if(!isset($_GET['page_id']) || !is_numeric($_GET['page_id'])) |
... | ... | |
35 | 41 |
$page_id = $_GET['page_id']; |
36 | 42 |
} |
37 | 43 |
|
38 |
$debug = false; // to show position and section_id |
|
39 |
If(!defined('DEBUG')) { define('DEBUG',$debug);} |
|
40 |
// Create new admin object |
|
41 |
require_once(WB_PATH.'/framework/class.admin.php'); |
|
42 |
$admin = new admin('Pages', 'pages_modify'); |
|
44 |
/* |
|
45 |
if( (!($page_id = $admin->checkIDKEY('page_id', 0, $_SERVER['REQUEST_METHOD']))) ) |
|
46 |
{ |
|
47 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']); |
|
48 |
exit(); |
|
49 |
} |
|
50 |
*/ |
|
43 | 51 |
|
44 | 52 |
// Check if we are supposed to add or delete a section |
45 | 53 |
if(isset($_GET['section_id']) && is_numeric($_GET['section_id'])) |
... | ... | |
71 | 79 |
require(WB_PATH.'/framework/class.order.php'); |
72 | 80 |
$order = new order(TABLE_PREFIX.'sections', 'position', 'section_id', 'page_id'); |
73 | 81 |
$order->clean($page_id); |
74 |
$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/sections.php?page_id='.$page_id);
|
|
82 |
$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/sections.php?page_id='.$admin->getIDKEY($page_id));
|
|
75 | 83 |
$admin->print_footer(); |
76 | 84 |
exit(); |
77 | 85 |
} |
... | ... | |
181 | 189 |
// set first defaults and messages |
182 | 190 |
$template->set_var(array( |
183 | 191 |
'PAGE_ID' => $results_array['page_id'], |
192 |
// 'PAGE_IDKEY' => $admin->getIDKEY($results_array['page_id']), |
|
193 |
'PAGE_IDKEY' => $results_array['page_id'], |
|
184 | 194 |
'TEXT_PAGE' => $TEXT['PAGE'], |
185 | 195 |
'PAGE_TITLE' => ($results_array['page_title']), |
186 | 196 |
'MENU_TITLE' => ($results_array['menu_title']), |
... | ... | |
203 | 213 |
|
204 | 214 |
// Insert variables |
205 | 215 |
$template->set_var(array( |
206 |
'VAR_PAGE_ID' => $results_array['page_id'], |
|
216 |
'PAGE_ID' => $results_array['page_id'], |
|
217 |
// 'PAGE_IDKEY' => $admin->getIDKEY($results_array['page_id']), |
|
218 |
'PAGE_IDKEY' => $results_array['page_id'], |
|
207 | 219 |
'VAR_PAGE_TITLE' => $results_array['page_title'], |
208 |
'SETTINGS_LINK' => ADMIN_URL.'/pages/settings.php?page_id='.$results_array['page_id'], |
|
209 |
'MODIFY_LINK' => ADMIN_URL.'/pages/modify.php?page_id='.$results_array['page_id'] |
|
210 |
)
|
|
220 |
'SETTINGS_LINK' => ADMIN_URL.'/pages/settings.php?page_id='./*$admin->getIDKEY()*/$results_array['page_id'],
|
|
221 |
'MODIFY_LINK' => ADMIN_URL.'/pages/modify.php?page_id='./*$admin->getIDKEY()*/$results_array['page_id']
|
|
222 |
) |
|
211 | 223 |
); |
212 | 224 |
|
213 | 225 |
$sql = 'SELECT `section_id`,`module`,`position`,`block`,`publ_start`,`publ_end` '; |
... | ... | |
233 | 245 |
{ |
234 | 246 |
$edit_page = ''; |
235 | 247 |
} |
236 |
$edit_page_0 = '<a id="sid'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='.$page_id;
|
|
248 |
$edit_page_0 = '<a id="sid'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='./*$admin->getIDKEY()*/$results_array['page_id'];
|
|
237 | 249 |
$edit_page_1 = $section['section_id'].'">'.$section['module'].'</a>'; |
238 | 250 |
if(SECTION_BLOCKS) |
239 | 251 |
{ |
... | ... | |
252 | 264 |
'NAME_SIZE' => 300, |
253 | 265 |
'INPUT_ATTRIBUTE' => $input_attribute, |
254 | 266 |
'VAR_SECTION_ID' => $section['section_id'], |
267 |
// 'VAR_SECTION_IDKEY' => $admin->getIDKEY($section['section_id']), |
|
268 |
'VAR_SECTION_IDKEY' => $section['section_id'], |
|
255 | 269 |
'VAR_POSITION' => $section['position'], |
256 | 270 |
'LINK_MODIFY_URL_VAR_MODUL_NAME' => $edit_page, |
257 | 271 |
'SELECT' => '', |
... | ... | |
284 | 298 |
'NAME_SIZE' => 300, |
285 | 299 |
'INPUT_ATTRIBUTE' => $input_attribute, |
286 | 300 |
'VAR_SECTION_ID' => $section['section_id'], |
301 |
// 'VAR_SECTION_IDKEY' => $admin->getIDKEY($section['section_id']), |
|
302 |
'VAR_SECTION_IDKEY' => $section['section_id'], |
|
287 | 303 |
'VAR_POSITION' => $section['position'], |
288 | 304 |
'LINK_MODIFY_URL_VAR_MODUL_NAME' => $edit_page, |
289 | 305 |
'NAME' => htmlentities(strip_tags($block[1])), |
Also available in: Unified diff
secure peparing and beginning fix admin/pages