Revision 1375
Added by FrankH about 14 years ago
- Security fix for Form module (new version is 2.8)
- bugfix for delete_field in Form module
branches/2.8.x/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
|
13 | 13 |
------------------------------------- 2.8.2 ------------------------------------- |
14 |
10 Jan-2011 Build 1375 Frank Heyne (FrankH) |
|
15 |
# Security fix for Form module (new version is 2.8) |
|
16 |
# bugfix for delete_field in Form module |
|
14 | 17 |
10 Jan-2011 Build 1374 Dietmar Woellbrink (Luisehahne) |
15 | 18 |
# fixed headerinfos |
16 | 19 |
10 Jan-2011 Build 1373 Dietmar Woellbrink (Luisehahne) |
branches/2.8.x/wb/admin/interface/version.php | ||
---|---|---|
52 | 52 |
|
53 | 53 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
54 | 54 |
if(!defined('VERSION')) define('VERSION', '2.8.2.RC4'); |
55 |
if(!defined('REVISION')) define('REVISION', '1374');
|
|
55 |
if(!defined('REVISION')) define('REVISION', '1375');
|
|
56 | 56 |
|
57 | 57 |
?> |
branches/2.8.x/wb/modules/form/modify_field.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$
|
|
19 |
require('../../config.php');
|
|
4 | 20 |
|
5 |
/* |
|
21 |
// Include WB admin wrapper script |
|
22 |
require(WB_PATH.'/modules/admin.php'); |
|
6 | 23 |
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 |
require('../../config.php'); |
|
32 |
|
|
33 | 24 |
// Get id |
34 |
if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) { |
|
35 |
header("Location: ".ADMIN_URL."/pages/index.php"); |
|
36 |
exit(0); |
|
37 |
} else { |
|
38 |
$field_id = $_GET['field_id']; |
|
25 |
$field_id = $admin->checkIDKEY('field_id', false, 'GET'); |
|
26 |
if (!$field_id) { |
|
27 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']." MF: $field_id :-(", ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
|
28 |
exit(); |
|
39 | 29 |
} |
40 | 30 |
|
41 |
// Include WB admin wrapper script |
|
42 |
require(WB_PATH.'/modules/admin.php'); |
|
43 |
|
|
44 | 31 |
// Get header and footer |
45 | 32 |
$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'"); |
46 | 33 |
$form = $query_content->fetchRow(); |
... | ... | |
59 | 46 |
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" /> |
60 | 47 |
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" /> |
61 | 48 |
<input type="hidden" name="field_id" value="<?php echo $field_id; ?>" /> |
49 |
<?php echo $admin->getFTAN(); ?> |
|
62 | 50 |
|
63 | 51 |
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%"> |
64 | 52 |
<tr> |
branches/2.8.x/wb/modules/form/add_field.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
require('../../config.php'); |
32 | 20 |
|
33 | 21 |
// Include WB admin wrapper script |
... | ... | |
47 | 35 |
|
48 | 36 |
// Say that a new record has been added, then redirect to modify page |
49 | 37 |
if($database->is_error()) { |
50 |
$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$field_id);
|
|
38 |
$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$admin->getIDKEY($field_id));
|
|
51 | 39 |
} else { |
52 |
$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$field_id);
|
|
40 |
$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$admin->getIDKEY($field_id));
|
|
53 | 41 |
} |
54 | 42 |
|
55 | 43 |
// Print admin footer |
branches/2.8.x/wb/modules/form/info.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
$module_directory = 'form'; |
32 | 20 |
$module_name = 'Form'; |
33 | 21 |
$module_function = 'page'; |
34 |
$module_version = '2.7';
|
|
22 |
$module_version = '2.8';
|
|
35 | 23 |
$module_platform = '2.7 | 2.8.x'; |
36 | 24 |
$module_author = 'Ryan Djurovich & Rudolph Lartey - additions John Maats - PCWacht'; |
37 | 25 |
$module_license = 'GNU General Public License'; |
branches/2.8.x/wb/modules/form/move_down.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$
|
|
19 |
require('../../config.php');
|
|
4 | 20 |
|
5 |
/* |
|
21 |
// Include WB admin wrapper script |
|
22 |
require(WB_PATH.'/modules/admin.php'); |
|
6 | 23 |
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 |
require('../../config.php'); |
|
32 |
|
|
33 | 24 |
// Get id |
34 |
if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) { |
|
35 |
header("Location: index.php"); |
|
36 |
exit(0); |
|
37 |
} else { |
|
38 |
$field_id = $_GET['field_id']; |
|
25 |
$field_id = $admin->checkIDKEY('field_id', false, 'GET'); |
|
26 |
if (!$field_id) { |
|
27 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
|
28 |
exit(); |
|
39 | 29 |
} |
40 | 30 |
|
41 |
// Include WB admin wrapper script |
|
42 |
require(WB_PATH.'/modules/admin.php'); |
|
43 |
|
|
44 | 31 |
// Include the ordering class |
45 | 32 |
require(WB_PATH.'/framework/class.order.php'); |
46 | 33 |
|
branches/2.8.x/wb/modules/form/save_field.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
require('../../config.php'); |
20 |
require(WB_PATH.'/modules/admin.php'); |
|
32 | 21 |
|
33 | 22 |
// Get id |
34 | 23 |
if(!isset($_POST['field_id']) OR !is_numeric($_POST['field_id'])) { |
35 |
header("Location: ".ADMIN_URL."/pages/index.php");
|
|
24 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
|
|
36 | 25 |
exit(0); |
37 | 26 |
} else { |
38 | 27 |
$field_id = $_POST['field_id']; |
... | ... | |
40 | 29 |
|
41 | 30 |
// Include WB admin wrapper script |
42 | 31 |
$update_when_modified = true; // Tells script to update when this page was last updated |
43 |
require(WB_PATH.'/modules/admin.php'); |
|
44 | 32 |
|
33 |
if (!$admin->checkFTAN()) |
|
34 |
{ |
|
35 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
|
36 |
exit(); |
|
37 |
} |
|
38 |
|
|
45 | 39 |
// Validate all fields |
46 | 40 |
if($admin->get_post('title') == '' OR $admin->get_post('type') == '') { |
47 |
$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$field_id);
|
|
41 |
$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$admin->getIDKEY($field_id));
|
|
48 | 42 |
} else { |
49 | 43 |
$title = htmlspecialchars($admin->get_post_escaped('title'), ENT_QUOTES); |
50 | 44 |
$type = $admin->add_slashes($admin->get_post('type')); |
... | ... | |
93 | 87 |
|
94 | 88 |
// Check if there is a db error, otherwise say successful |
95 | 89 |
if($database->is_error()) { |
96 |
$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$field_id);
|
|
90 |
$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$admin->getIDKEY($field_id));
|
|
97 | 91 |
} else { |
98 |
$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$field_id);
|
|
92 |
$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$admin->getIDKEY($field_id));
|
|
99 | 93 |
} |
100 | 94 |
|
101 | 95 |
// Print admin footer |
branches/2.8.x/wb/modules/form/delete.php | ||
---|---|---|
23 | 23 |
|
24 | 24 |
*/ |
25 | 25 |
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
26 |
// Must include code to stop this file being access directly |
|
27 |
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); } |
|
30 | 28 |
|
31 | 29 |
// Delete page from mod_wysiwyg |
32 | 30 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE page_id = '$page_id' AND section_id='$section_id'"); |
branches/2.8.x/wb/modules/form/search.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 | 19 |
function form_search($func_vars) { |
27 | 20 |
extract($func_vars, EXTR_PREFIX_ALL, 'func'); |
28 | 21 |
|
branches/2.8.x/wb/modules/form/delete_field.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
require('../../config.php'); |
32 | 20 |
|
33 |
// Get id |
|
34 |
if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) { |
|
35 |
header("Location: ".ADMIN_URL."/pages/index.php"); |
|
36 |
exit(0); |
|
37 |
} else { |
|
38 |
$field_id = $_GET['field_id']; |
|
39 |
} |
|
40 |
|
|
41 | 21 |
// Include WB admin wrapper script |
42 | 22 |
$update_when_modified = true; // Tells script to update when this page was last updated |
43 | 23 |
require(WB_PATH.'/modules/admin.php'); |
44 | 24 |
|
25 |
// Get id |
|
26 |
$field_id = $admin->checkIDKEY('field_id', false, 'GET'); |
|
27 |
if (!$field_id) { |
|
28 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
|
29 |
exit(); |
|
30 |
} |
|
31 |
|
|
45 | 32 |
// Delete row |
46 | 33 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'"); |
47 | 34 |
|
48 |
// Check if there is a db error, otherwise say successful |
|
49 |
if($database->is_error()) { |
|
35 |
// Include the ordering class |
|
36 |
require(WB_PATH.'/framework/class.order.php'); |
|
37 |
|
|
38 |
// Create new order object an reorder |
|
39 |
$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id'); |
|
40 |
|
|
41 |
if($order->clean($section_id)) { |
|
50 | 42 |
$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
51 | 43 |
} else { |
52 | 44 |
$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
branches/2.8.x/wb/modules/form/index.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
header('Location: ../index.php'); |
32 | 20 |
|
33 | 21 |
?> |
branches/2.8.x/wb/modules/form/modify_settings.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
require('../../config.php'); |
32 | 20 |
|
33 | 21 |
// Include WB admin wrapper script |
... | ... | |
75 | 63 |
|
76 | 64 |
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" /> |
77 | 65 |
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" /> |
66 |
<?php echo $admin->getFTAN(); ?> |
|
78 | 67 |
|
79 | 68 |
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%"> |
80 | 69 |
<tr> |
branches/2.8.x/wb/modules/form/uninstall.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
// Must include code to stop this file being access directly |
32 | 20 |
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); } |
33 | 21 |
|
branches/2.8.x/wb/modules/form/view.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
* @category frontend |
|
25 |
* @package outputfilter |
|
26 |
* @author(s) Dietmar W?llbrink <Luisehahne>, Dietrich Roland Pehlke <Aldus> |
|
27 |
* @platform WB 2.8.0 |
|
28 |
* @require PHP 5.2.x |
|
29 |
* @license http://www.gnu.org/licenses/gpl.html |
|
30 |
* @link http://project.websitebaker2.org/browser/branches/2.8.x/wb/modules/form/view.php |
|
31 |
* @changeset 2009/12/03 comment out ob_end_flush line 259 |
|
32 |
*/ |
|
33 |
|
|
34 |
/* |
|
35 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
36 |
for his contributions to this module - adding extra field types |
|
37 |
*/ |
|
38 |
|
|
39 | 19 |
// Must include code to stop this file being access directly |
40 | 20 |
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); } |
41 | 21 |
|
... | ... | |
147 | 127 |
<form <?php echo ( ( (strlen($form_name) > 0) AND (false == $use_xhtml_strict) ) ? "name=\"".$form_name."\"" : ""); ?> action="<?php echo htmlspecialchars(strip_tags($_SERVER['PHP_SELF'])); ?>#wb_<?PHP echo $section_id;?>" method="post"> |
148 | 128 |
<div> |
149 | 129 |
<input type="hidden" name="submission_id" value="<?php echo $_SESSION['form_submission_id']; ?>" /> |
130 |
<?php echo $admin->getFTAN(); ?> |
|
150 | 131 |
</div> |
151 | 132 |
<?php |
152 | 133 |
if(ENABLED_ASP) { // first add some honeypot-fields |
... | ... | |
283 | 264 |
exit(header("Location: ".WB_URL.PAGES_DIRECTORY."")); |
284 | 265 |
} |
285 | 266 |
|
267 |
if (!$admin->checkFTAN()) |
|
268 |
{ |
|
269 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']); |
|
270 |
exit(); |
|
271 |
} |
|
272 |
|
|
286 | 273 |
// Submit form data |
287 | 274 |
// First start message settings |
288 | 275 |
$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'"); |
branches/2.8.x/wb/modules/form/move_up.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$
|
|
19 |
require('../../config.php');
|
|
4 | 20 |
|
5 |
/* |
|
21 |
// Include WB admin wrapper script |
|
22 |
require(WB_PATH.'/modules/admin.php'); |
|
6 | 23 |
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 |
require('../../config.php'); |
|
32 |
|
|
33 | 24 |
// Get id |
34 |
if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) { |
|
35 |
header("Location: index.php"); |
|
36 |
exit(0); |
|
37 |
} else { |
|
38 |
$field_id = $_GET['field_id']; |
|
25 |
$field_id = $admin->checkIDKEY('field_id', false, 'GET'); |
|
26 |
if (!$field_id) { |
|
27 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
|
28 |
exit(); |
|
39 | 29 |
} |
40 | 30 |
|
41 |
// Include WB admin wrapper script |
|
42 |
require(WB_PATH.'/modules/admin.php'); |
|
43 |
|
|
44 | 31 |
// Include the ordering class |
45 | 32 |
require(WB_PATH.'/framework/class.order.php'); |
46 | 33 |
|
branches/2.8.x/wb/modules/form/delete_submission.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra submission types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
require('../../config.php'); |
32 | 20 |
|
33 |
// Get id |
|
34 |
if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) { |
|
35 |
header("Location: ".ADMIN_URL."/pages/index.php"); |
|
36 |
exit(0); |
|
37 |
} else { |
|
38 |
$submission_id = $_GET['submission_id']; |
|
39 |
} |
|
40 |
|
|
41 | 21 |
// Include WB admin wrapper script |
42 | 22 |
$update_when_modified = true; // Tells script to update when this page was last updated |
43 | 23 |
require(WB_PATH.'/modules/admin.php'); |
44 | 24 |
|
25 |
// Get id |
|
26 |
$submission_id = $admin->checkIDKEY('submission_id', false, 'GET'); |
|
27 |
if (!$submission_id) { |
|
28 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
|
29 |
exit(); |
|
30 |
} |
|
31 |
|
|
45 | 32 |
// Delete row |
46 | 33 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'"); |
47 | 34 |
|
branches/2.8.x/wb/modules/form/save_settings.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
require('../../config.php'); |
32 | 20 |
|
33 | 21 |
// Include WB admin wrapper script |
34 | 22 |
$update_when_modified = true; // Tells script to update when this page was last updated |
35 | 23 |
require(WB_PATH.'/modules/admin.php'); |
36 | 24 |
|
25 |
if (!$admin->checkFTAN()) |
|
26 |
{ |
|
27 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
|
28 |
exit(); |
|
29 |
} |
|
30 |
|
|
37 | 31 |
// This code removes any <?php tags and adds slashes |
38 | 32 |
$friendly = array('<', '>', '?php'); |
39 | 33 |
$raw = array('<', '>', ''); |
branches/2.8.x/wb/modules/form/view_submission.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$
|
|
19 |
require('../../config.php');
|
|
4 | 20 |
|
5 |
/* |
|
21 |
// Include WB admin wrapper script |
|
22 |
require(WB_PATH.'/modules/admin.php'); |
|
6 | 23 |
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 |
require('../../config.php'); |
|
32 |
|
|
33 | 24 |
// Get id |
34 |
if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) { |
|
35 |
header("Location: ".ADMIN_URL."/pages/index.php"); |
|
36 |
exit(0); |
|
37 |
} else { |
|
38 |
$submission_id = $_GET['submission_id']; |
|
25 |
$submission_id = $admin->checkIDKEY('submission_id', false, 'GET'); |
|
26 |
if (!$submission_id) { |
|
27 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id); |
|
28 |
exit(); |
|
39 | 29 |
} |
40 | 30 |
|
41 |
// Include WB admin wrapper script |
|
42 |
require(WB_PATH.'/modules/admin.php'); |
|
43 |
|
|
44 | 31 |
// Get submission details |
45 | 32 |
$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'"); |
46 | 33 |
$submission = $query_content->fetchRow(); |
... | ... | |
84 | 71 |
<br /> |
85 | 72 |
|
86 | 73 |
<input type="button" value="<?php echo $TEXT['CLOSE']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 150px; margin-top: 5px;" /> |
87 |
<input type="button" value="<?php echo $TEXT['DELETE']; ?>" onclick="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission_id; ?>');" style="width: 150px; margin-top: 5px;" />
|
|
74 |
<input type="button" value="<?php echo $TEXT['DELETE']; ?>" onclick="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&submission_id=<?php echo $admin->getIDKEY($submission_id); ?>');" style="width: 150px; margin-top: 5px;" />
|
|
88 | 75 |
<?php |
89 | 76 |
|
90 | 77 |
// Print admin footer |
branches/2.8.x/wb/modules/form/modify.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
// Must include code to stop this file being access directly |
32 | 20 |
if(!defined('WB_PATH')) { exit("Cannot access this file directly"); } |
33 | 21 |
|
... | ... | |
68 | 56 |
?> |
69 | 57 |
<tr class="row_<?php echo $row; ?>"> |
70 | 58 |
<td width="20" style="padding-left: 5px;"> |
71 |
<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
|
|
59 |
<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $admin->getIDKEY($field['field_id']); ?>" title="<?php echo $TEXT['MODIFY']; ?>">
|
|
72 | 60 |
<img src="<?php echo THEME_URL; ?>/images/modify_16.png" border="0" alt="^" /> |
73 | 61 |
</a> |
74 | 62 |
</td> |
75 | 63 |
<td> |
76 |
<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>">
|
|
64 |
<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $admin->getIDKEY($field['field_id']); ?>">
|
|
77 | 65 |
<?php echo $field['title']; ?> |
78 | 66 |
</a> |
79 | 67 |
</td> |
... | ... | |
114 | 102 |
</td> |
115 | 103 |
<td width="20"> |
116 | 104 |
<?php if($field['position'] != 1) { ?> |
117 |
<a href="<?php echo WB_URL; ?>/modules/form/move_up.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
|
|
105 |
<a href="<?php echo WB_URL; ?>/modules/form/move_up.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $admin->getIDKEY($field['field_id']); ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
|
|
118 | 106 |
<img src="<?php echo THEME_URL; ?>/images/up_16.png" border="0" alt="^" /> |
119 | 107 |
</a> |
120 | 108 |
<?php } ?> |
121 | 109 |
</td> |
122 | 110 |
<td width="20"> |
123 | 111 |
<?php if($field['position'] != $num_fields) { ?> |
124 |
<a href="<?php echo WB_URL; ?>/modules/form/move_down.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
|
|
112 |
<a href="<?php echo WB_URL; ?>/modules/form/move_down.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $admin->getIDKEY($field['field_id']); ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
|
|
125 | 113 |
<img src="<?php echo THEME_URL; ?>/images/down_16.png" border="0" alt="v" /> |
126 | 114 |
</a> |
127 | 115 |
<?php } ?> |
128 | 116 |
</td> |
129 | 117 |
<td width="20"> |
130 |
<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
118 |
<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $admin->getIDKEY($field['field_id']); ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
131 | 119 |
<img src="<?php echo THEME_URL; ?>/images/delete_16.png" border="0" alt="X" /> |
132 | 120 |
</a> |
133 | 121 |
</td> |
... | ... | |
167 | 155 |
?> |
168 | 156 |
<tr class="row_<?php echo $row; ?>"> |
169 | 157 |
<td width="20" style="padding-left: 5px;"> |
170 |
<a href="<?php echo WB_URL; ?>/modules/form/view_submission.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>" title="<?php echo $TEXT['OPEN']; ?>">
|
|
158 |
<a href="<?php echo WB_URL; ?>/modules/form/view_submission.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&submission_id=<?php echo $admin->getIDKEY($submission['submission_id']); ?>" title="<?php echo $TEXT['OPEN']; ?>">
|
|
171 | 159 |
<img src="<?php echo THEME_URL; ?>/images/folder_16.png" alt="<?php echo $TEXT['OPEN']; ?>" border="0" /> |
172 | 160 |
</a> |
173 | 161 |
</td> |
174 | 162 |
<td width="237"><?php echo $TEXT['SUBMISSION_ID'].': '.$submission['submission_id']; ?></td> |
175 | 163 |
<td><?php echo $TEXT['SUBMITTED'].': '.gmdate(TIME_FORMAT.', '.DATE_FORMAT, $submission['submitted_when']+TIMEZONE); ?></td> |
176 | 164 |
<td width="20"> |
177 |
<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
165 |
<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&submission_id=<?php echo $admin->getIDKEY($submission['submission_id']); ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
178 | 166 |
<img src="<?php echo THEME_URL; ?>/images/delete_16.png" border="0" alt="X" /> |
179 | 167 |
</a> |
180 | 168 |
</td> |
branches/2.8.x/wb/modules/form/add.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category module |
|
5 |
* @package Form |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL: $ |
|
15 |
* @lastmodified $Date: $ |
|
16 |
* @description |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
/* |
|
27 |
The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com> |
|
28 |
for his contributions to this module - adding extra field types |
|
29 |
*/ |
|
30 |
|
|
31 | 19 |
// Insert an extra rows into the database |
32 | 20 |
$header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"98%\">'; |
33 | 21 |
$field_loop = '<tr><td class=\"field_title\">{TITLE}{REQUIRED}:</td><td>{FIELD}</td></tr>'; |
Also available in: Unified diff