Project

General

Profile

« Previous | Next » 

Revision 1457

Added by Dietmar almost 13 years ago

Preparing 2.8.2 stable, last tests

View differences:

save_field.php
11 11
 * @platform        WebsiteBaker 2.8.x
12 12
 * @requirements    PHP 5.2.2 and higher
13 13
 * @version         $Id$
14
 * @filesource		$HeadURL:  $
15
 * @lastmodified    $Date:  $
14
 * @filesource		$HeadURL$
15
 * @lastmodified    $Date$
16 16
 * @description     
17 17
 */
18 18

  
19 19
require('../../config.php');
20

  
21
// suppress to print the header, so no new FTAN will be set
22
$admin_header = false;
23
// Tells script to update when this page was last updated
24
$update_when_modified = true;
25
// Include WB admin wrapper script
20 26
require(WB_PATH.'/modules/admin.php');
27
/* */
21 28

  
29
// check FTAN
30
if (!$admin->checkFTAN())
31
{
32
	$admin->print_header();
33
	$admin->print_error('::'.$MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
34
}
35
// After check print the header
36
$admin->print_header();
37

  
38

  
39
/*  */
22 40
// Get id
41
$field_id = intval($admin->checkIDKEY('field_id', false ));
42
if (!$field_id) {
43
 $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'].'::', ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
44
}
45
/*
46
// Get id
23 47
if(!isset($_POST['field_id']) OR !is_numeric($_POST['field_id'])) {
24 48
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
25
	exit(0);
26 49
} else {
27
	$field_id = $_POST['field_id'];
50
	$field_id = (int)$_POST['field_id'];
28 51
}
29

  
52
/*
30 53
// Include WB admin wrapper script
31 54
$update_when_modified = true; // Tells script to update when this page was last updated
32 55

  
......
35 58
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
36 59
	exit();
37 60
}
38

  
61
*/
39 62
// Validate all fields
40 63
if($admin->get_post('title') == '' OR $admin->get_post('type') == '') {
41 64
	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$admin->getIDKEY($field_id));
......
94 117

  
95 118
// Print admin footer
96 119
$admin->print_footer();
97

  
98
?>
99 120

  

Also available in: Unified diff