Revision 1538
Added by Luisehahne almost 14 years ago
| branches/2.8.x/CHANGELOG | ||
|---|---|---|
| 11 | 11 |
! = Update/Change |
| 12 | 12 |
|
| 13 | 13 |
=========================== add small Features 2.8.2 ========================== |
| 14 |
10 Dez-2011 Build 1538 Dietmar Woellbrink (Luisehahne) |
|
| 15 |
! add table db engine in module install scripts |
|
| 16 |
! some small updates in modules |
|
| 14 | 17 |
10 Dez-2011 Build 1537 Dietmar Woellbrink (Luisehahne) |
| 15 | 18 |
! continue updating headerinfos, adding upgrade scripts to module |
| 16 | 19 |
10 Dez-2011 Build 1536 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');
|
| 55 |
if(!defined('REVISION')) define('REVISION', '1537');
|
|
| 55 |
if(!defined('REVISION')) define('REVISION', '1538');
|
|
| 56 | 56 |
if(!defined('SP')) define('SP', 'SP2');
|
| branches/2.8.x/wb/modules/wrapper/view.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wrapper |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 19 | 18 |
// Must include code to stop this file being access directly |
| 20 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
|
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| 21 | 26 |
|
| 22 | 27 |
// check if module language file exists for the language set by the user (e.g. DE, EN) |
| 23 | 28 |
if(!file_exists(WB_PATH .'/modules/wrapper/languages/'.LANGUAGE .'.php')) {
|
| branches/2.8.x/wb/modules/wrapper/info.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wrapper |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 15 | 14 |
* @lastmodified $Date: 2011-01-10 13:21:47 +0100 (Mo, 10 Jan 2011) $ |
| 16 | 15 |
* |
| 17 | 16 |
*/ |
| 17 |
// Must include code to stop this file being access directly |
|
| 18 |
/* -------------------------------------------------------- */ |
|
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 23 |
} |
|
| 24 |
/* -------------------------------------------------------- */ |
|
| 18 | 25 |
|
| 19 | 26 |
$module_directory = 'wrapper'; |
| 20 |
$module_name = 'Wrapper'; |
|
| 27 |
$module_name = 'Wrapper 2.8.3';
|
|
| 21 | 28 |
$module_function = 'page'; |
| 22 |
$module_version = '2.8'; |
|
| 29 |
$module_version = '2.8.3';
|
|
| 23 | 30 |
$module_platform = '2.7 | 2.8.x'; |
| 24 | 31 |
$module_author = 'Ryan Djurovich'; |
| 25 | 32 |
$module_license = 'GNU General Public License'; |
| 26 | 33 |
$module_description = 'This module allows you to wrap your site around another using an inline frame'; |
| 27 |
|
|
| 28 |
?> |
|
| branches/2.8.x/wb/modules/wrapper/save.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wrapper |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 50 | 49 |
|
| 51 | 50 |
// Print admin footer |
| 52 | 51 |
$admin->print_footer(); |
| 53 |
|
|
| 54 |
?> |
|
| branches/2.8.x/wb/modules/wrapper/delete.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wrapper |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 19 | 18 |
// Must include code to stop this file being access directly |
| 20 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
|
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| 21 | 26 |
|
| 22 | 27 |
// Delete page from mod_wrapper |
| 23 | 28 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'");
|
| 24 |
|
|
| 25 |
?> |
|
| branches/2.8.x/wb/modules/wrapper/install.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wrapper |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 26 | 25 |
. ' `url` TEXT NOT NULL,' |
| 27 | 26 |
. ' `height` INT NOT NULL DEFAULT \'0\',' |
| 28 | 27 |
. ' PRIMARY KEY ( `section_id` ) ' |
| 29 |
. ' )'; |
|
| 28 |
. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
|
|
| 30 | 29 |
$database->query($mod_wrapper); |
| 31 | 30 |
} |
| 32 |
|
|
| 33 |
?> |
|
| branches/2.8.x/wb/modules/wrapper/modify.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wrapper |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 19 | 18 |
// Must include code to stop this file being access directly |
| 20 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
|
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| 21 | 26 |
|
| 22 | 27 |
// Setup template object |
| 23 | 28 |
$template = new Template(WB_PATH.'/modules/wrapper'); |
| ... | ... | |
| 49 | 54 |
// Parse template object |
| 50 | 55 |
$template->parse('main', 'main_block', false);
|
| 51 | 56 |
$template->pparse('output', 'page');
|
| 52 |
|
|
| 53 |
?> |
|
| branches/2.8.x/wb/modules/wrapper/upgrade.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
/** |
|
| 3 |
* |
|
| 4 |
* @category modules |
|
| 5 |
* @package wrapper |
|
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
| 8 |
* @link http://www.websitebaker2.org/ |
|
| 9 |
* @license http://www.gnu.org/licenses/gpl.html |
|
| 10 |
* @platform WebsiteBaker 2.8.x |
|
| 11 |
* @requirements PHP 5.2.2 and higher |
|
| 12 |
* @version $Id$ |
|
| 13 |
* @filesource $HeadURL$ |
|
| 14 |
* @lastmodified $Date$ |
|
| 15 |
* |
|
| 16 |
*/ |
|
| 17 |
// Must include code to stop this file being access directly |
|
| 18 |
/* -------------------------------------------------------- */ |
|
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 23 |
} |
|
| 24 |
/* -------------------------------------------------------- */ |
|
| 25 |
|
|
| 26 |
$msg = ''; |
|
| 27 |
$sTable = TABLE_PREFIX.'mod_wrapper'; |
|
| 28 |
if(($sOldType = $database->getTableEngine($sTable))) {
|
|
| 29 |
if(('myisam' != strtolower($sOldType))) {
|
|
| 30 |
if(!$database->query('ALTER TABLE `'.$sTable.'` Engine = \'MyISAM\' ')) {
|
|
| 31 |
$msg = $database->get_error(); |
|
| 32 |
} |
|
| 33 |
} |
|
| 34 |
} else {
|
|
| 35 |
$msg = $database->get_error(); |
|
| 36 |
} |
|
| 37 |
// ------------------------------------ |
|
| 0 | 38 | |
| branches/2.8.x/wb/modules/wrapper/add.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wrapper |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 19 | 18 |
// Must include code to stop this file being access directly |
| 20 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
|
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| 21 | 26 |
|
| 22 | 27 |
// Insert an extra row into the database |
| 23 | 28 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_wrapper (page_id,section_id,height) VALUES ('$page_id','$section_id','400')");
|
| 24 |
|
|
| 25 |
?> |
|
| branches/2.8.x/wb/modules/wysiwyg/view.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wysiwyg |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 16 | 15 |
* |
| 17 | 16 |
*/ |
| 18 | 17 |
// Must include code to stop this file being access directly |
| 19 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
|
|
| 18 |
/* -------------------------------------------------------- */ |
|
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 23 |
} |
|
| 24 |
/* -------------------------------------------------------- */ |
|
| 20 | 25 |
// Get content |
| 21 | 26 |
$get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'");
|
| 22 | 27 |
$fetch_content = $get_content->fetchRow(); |
| 23 | 28 |
$content = ($fetch_content['content']); |
| 24 | 29 |
|
| 25 | 30 |
echo $content; |
| 26 |
|
|
| 27 |
?> |
|
| branches/2.8.x/wb/modules/wysiwyg/info.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wysiwyg |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 15 | 14 |
* @lastmodified $Date$ |
| 16 | 15 |
* |
| 17 | 16 |
*/ |
| 17 |
/* -------------------------------------------------------- */ |
|
| 18 |
if(defined('WB_PATH') == false)
|
|
| 19 |
{
|
|
| 20 |
// Stop this file being access directly |
|
| 21 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 22 |
} |
|
| 23 |
/* -------------------------------------------------------- */ |
|
| 18 | 24 |
|
| 19 | 25 |
$module_directory = 'wysiwyg'; |
| 20 |
$module_name = 'WYSIWYG'; |
|
| 26 |
$module_name = 'WYSIWYG 2.8.3';
|
|
| 21 | 27 |
$module_function = 'page'; |
| 22 |
$module_version = '2.8.2';
|
|
| 28 |
$module_version = '2.8.3';
|
|
| 23 | 29 |
$module_platform = '2.8.2'; |
| 24 | 30 |
$module_author = 'Ryan Djurovich'; |
| 25 | 31 |
$module_license = 'GNU General Public License'; |
| branches/2.8.x/wb/modules/wysiwyg/save.php | ||
|---|---|---|
| 4 | 4 |
* @category backend |
| 5 | 5 |
* @package wysiwyg |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 61 | 60 |
|
| 62 | 61 |
// Print admin footer |
| 63 | 62 |
$admin->print_footer(); |
| 64 |
|
|
| 65 |
?> |
|
| branches/2.8.x/wb/modules/wysiwyg/delete.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wysiwyg |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 16 | 15 |
* |
| 17 | 16 |
*/ |
| 18 | 17 |
// Must include code to stop this file being access directly |
| 19 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
|
|
| 18 |
/* -------------------------------------------------------- */ |
|
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 23 |
} |
|
| 24 |
/* -------------------------------------------------------- */ |
|
| 20 | 25 |
// Delete record from the database |
| 21 | 26 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'");
|
| 22 |
|
|
| 23 |
?> |
|
| branches/2.8.x/wb/modules/wysiwyg/install.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wysiwyg |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 15 | 14 |
* @lastmodified $Date$ |
| 16 | 15 |
* |
| 17 | 16 |
*/ |
| 17 |
// Must include code to stop this file being access directly |
|
| 18 |
/* -------------------------------------------------------- */ |
|
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 23 |
} |
|
| 24 |
/* -------------------------------------------------------- */ |
|
| 18 | 25 |
|
| 19 | 26 |
if(defined('WB_URL'))
|
| 20 | 27 |
{
|
| 21 |
|
|
| 28 |
|
|
| 22 | 29 |
// Create table |
| 23 | 30 |
//$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_wysiwyg`");
|
| 24 | 31 |
$mod_wysiwyg = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_wysiwyg` ( ' |
| ... | ... | |
| 27 | 34 |
. ' `content` LONGTEXT NOT NULL ,' |
| 28 | 35 |
. ' `text` LONGTEXT NOT NULL ,' |
| 29 | 36 |
. ' PRIMARY KEY ( `section_id` ) ' |
| 30 |
. ' )'; |
|
| 37 |
. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
|
|
| 31 | 38 |
$database->query($mod_wysiwyg); |
| 32 |
|
|
| 33 | 39 |
|
| 40 |
|
|
| 34 | 41 |
$mod_search = "SELECT * FROM ".TABLE_PREFIX."search WHERE value = 'wysiwyg'"; |
| 35 | 42 |
$insert_search = $database->query($mod_search); |
| 36 | 43 |
if( $insert_search->numRows() == 0 ) |
| ... | ... | |
| 62 | 69 |
|
| 63 | 70 |
} |
| 64 | 71 |
} |
| 65 |
|
|
| 66 |
?> |
|
| branches/2.8.x/wb/modules/wysiwyg/modify.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wysiwyg |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 16 | 15 |
* |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 19 |
if(!defined('WB_PATH')) exit('Direct access to this file is not allowed');
|
|
| 18 |
/* -------------------------------------------------------- */ |
|
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 23 |
} |
|
| 24 |
/* -------------------------------------------------------- */ |
|
| 20 | 25 |
|
| 21 | 26 |
// Get page content |
| 22 | 27 |
$query = "SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'"; |
| branches/2.8.x/wb/modules/wysiwyg/upgrade.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
/** |
|
| 3 |
* |
|
| 4 |
* @category modules |
|
| 5 |
* @package wysiwyg |
|
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
| 8 |
* @link http://www.websitebaker2.org/ |
|
| 9 |
* @license http://www.gnu.org/licenses/gpl.html |
|
| 10 |
* @platform WebsiteBaker 2.8.x |
|
| 11 |
* @requirements PHP 5.2.2 and higher |
|
| 12 |
* @version $Id$ |
|
| 13 |
* @filesource $HeadURL$ |
|
| 14 |
* @lastmodified $Date$ |
|
| 15 |
* |
|
| 16 |
*/ |
|
| 17 |
// Must include code to stop this file being access directly |
|
| 18 |
/* -------------------------------------------------------- */ |
|
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 23 |
} |
|
| 24 |
/* -------------------------------------------------------- */ |
|
| 25 |
|
|
| 26 |
$msg = ''; |
|
| 27 |
$sTable = TABLE_PREFIX.'mod_wysiwyg'; |
|
| 28 |
if(($sOldType = $database->getTableEngine($sTable))) {
|
|
| 29 |
if(('myisam' != strtolower($sOldType))) {
|
|
| 30 |
if(!$database->query('ALTER TABLE `'.$sTable.'` Engine = \'MyISAM\' ')) {
|
|
| 31 |
$msg = $database->get_error(); |
|
| 32 |
} |
|
| 33 |
} |
|
| 34 |
} else {
|
|
| 35 |
$msg = $database->get_error(); |
|
| 36 |
} |
|
| 37 |
// ------------------------------------ |
|
| 0 | 38 | |
| branches/2.8.x/wb/modules/wysiwyg/add.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wysiwyg |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 16 | 15 |
* |
| 17 | 16 |
*/ |
| 18 | 17 |
// Must include code to stop this file being access directly |
| 19 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
|
|
| 18 |
/* -------------------------------------------------------- */ |
|
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 23 |
} |
|
| 24 |
/* -------------------------------------------------------- */ |
|
| 20 | 25 |
// Insert an extra row into the database |
| 21 | 26 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_wysiwyg (page_id,section_id) VALUES ('$page_id','$section_id')");
|
| 22 | 27 |
|
| 23 |
?> |
|
| branches/2.8.x/wb/modules/SecureFormSwitcher/uninstall.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package SecureFormSwitcher |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 19 | 18 |
// Must include code to stop this file being access directly |
| 20 |
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
|
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| 21 | 26 |
|
| 22 | 27 |
require_once(WB_PATH.'/framework/class.database.php'); |
| 23 | 28 |
require_once(WB_PATH.'/framework/functions.php'); |
| ... | ... | |
| 37 | 42 |
@unlink($dest_to_delete); |
| 38 | 43 |
} |
| 39 | 44 |
|
| 40 |
|
|
| 41 |
|
|
| branches/2.8.x/wb/modules/SecureFormSwitcher/info.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package SecureFormSwitcher |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 16 | 15 |
* |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 18 |
// Must include code to stop this file being access directly |
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| 19 | 26 |
$module_directory = 'SecureFormSwitcher'; |
| 20 | 27 |
$module_name = 'SecureForm Switcher'; |
| 21 | 28 |
$module_function = 'tool'; |
| branches/2.8.x/wb/modules/SecureFormSwitcher/tool.php | ||
|---|---|---|
| 3 | 3 |
* |
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package SecureFormSwitcher |
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright (C) 2011, D Woellbrink |
|
| 6 |
* @author WebsiteBaker Project, D Woellbrink |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| branches/2.8.x/wb/modules/SecureFormSwitcher/language_load.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package SecureFormSwitcher |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| branches/2.8.x/wb/modules/SecureFormSwitcher/install.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package SecureFormSwitcher |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 19 | 18 |
// Must include code to stop this file being access directly |
| 20 |
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
|
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| 21 | 26 |
|
| 22 | 27 |
require_once(WB_PATH.'/framework/class.database.php'); |
| 23 | 28 |
require_once(WB_PATH.'/framework/functions.php'); |
| ... | ... | |
| 37 | 42 |
|
| 38 | 43 |
db_update_key_value('settings', $aDefault );
|
| 39 | 44 |
|
| 40 |
|
|
| branches/2.8.x/wb/modules/SecureFormSwitcher/upgrade.php | ||
|---|---|---|
| 16 | 16 |
*/ |
| 17 | 17 |
|
| 18 | 18 |
// Must include code to stop this file being access directly |
| 19 |
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
|
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| branches/2.8.x/wb/modules/form/modify_field.php | ||
|---|---|---|
| 4 | 4 |
* @category module |
| 5 | 5 |
* @package Form |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| branches/2.8.x/wb/modules/form/add_field.php | ||
|---|---|---|
| 4 | 4 |
* @category module |
| 5 | 5 |
* @package Form |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 13 | 12 |
* @version $Id$ |
| 14 | 13 |
* @filesource $HeadURL$ |
| 15 | 14 |
* @lastmodified $Date$ |
| 16 |
* @description
|
|
| 15 |
* @description |
|
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 19 | 18 |
require('../../config.php');
|
| ... | ... | |
| 42 | 41 |
|
| 43 | 42 |
// Print admin footer |
| 44 | 43 |
$admin->print_footer(); |
| 45 |
|
|
| 46 |
?> |
|
| branches/2.8.x/wb/modules/form/info.php | ||
|---|---|---|
| 4 | 4 |
* @category module |
| 5 | 5 |
* @package Form |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 16 | 15 |
* @description |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| 18 |
// Must include code to stop this file being access directly |
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| 19 | 26 |
$module_directory = 'form'; |
| 20 | 27 |
$module_name = 'Form'; |
| 21 | 28 |
$module_function = 'page'; |
| 22 |
$module_version = '2.8.1';
|
|
| 29 |
$module_version = '2.8.3';
|
|
| 23 | 30 |
$module_platform = '2.8.x'; |
| 24 | 31 |
$module_author = 'Ryan Djurovich & Rudolph Lartey - additions John Maats - PCWacht'; |
| 25 | 32 |
$module_license = 'GNU General Public License'; |
| 26 | 33 |
$module_description = 'This module allows you to create customised online forms, such as a feedback form. '. |
| 27 | 34 |
'Thank-you to Rudolph Lartey who help enhance this module, providing code for extra field types, etc.'; |
| 28 |
|
|
| branches/2.8.x/wb/modules/form/save_field.php | ||
|---|---|---|
| 4 | 4 |
* @category module |
| 5 | 5 |
* @package Form |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| branches/2.8.x/wb/modules/form/delete.php | ||
|---|---|---|
| 1 | 1 |
<?php |
| 2 |
/** |
|
| 3 |
* |
|
| 4 |
* @category module |
|
| 5 |
* @package Form |
|
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
| 8 |
* @link http://www.websitebaker2.org/ |
|
| 9 |
* @license http://www.gnu.org/licenses/gpl.html |
|
| 10 |
* @platform WebsiteBaker 2.8.x |
|
| 11 |
* @requirements PHP 5.2.2 and higher |
|
| 12 |
* @version $Id$ |
|
| 13 |
* @filesource $HeadURL$ |
|
| 14 |
* @lastmodified $Date$ |
|
| 15 |
* @description |
|
| 16 |
*/ |
|
| 2 | 17 |
|
| 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 | 18 |
// Must include code to stop this file being access directly |
| 27 |
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
|
|
| 19 |
/* -------------------------------------------------------- */ |
|
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 24 |
} |
|
| 25 |
/* -------------------------------------------------------- */ |
|
| 28 | 26 |
|
| 29 | 27 |
// Delete page from mod_wysiwyg |
| 30 | 28 |
$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 | ||
|---|---|---|
| 4 | 4 |
* @category module |
| 5 | 5 |
* @package Form |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| ... | ... | |
| 16 | 15 |
* @description |
| 17 | 16 |
*/ |
| 18 | 17 |
// Must include code to stop this file being access directly |
| 19 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
|
|
| 18 |
/* -------------------------------------------------------- */ |
|
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 23 |
} |
|
| 24 |
/* -------------------------------------------------------- */ |
|
| 20 | 25 |
|
| 21 | 26 |
function form_search($func_vars) {
|
| 22 | 27 |
extract($func_vars, EXTR_PREFIX_ALL, 'func'); |
| ... | ... | |
| 56 | 61 |
} |
| 57 | 62 |
return $result; |
| 58 | 63 |
} |
| 59 |
|
|
| 60 |
?> |
|
| branches/2.8.x/wb/modules/form/delete_field.php | ||
|---|---|---|
| 4 | 4 |
* @category module |
| 5 | 5 |
* @package Form |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| branches/2.8.x/wb/modules/form/install.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
/** |
|
| 3 |
* |
|
| 4 |
* @category modules |
|
| 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 |
* |
|
| 17 |
*/ |
|
| 18 |
|
|
| 19 |
if(defined('WB_URL'))
|
|
| 20 |
{
|
|
| 21 |
|
|
| 22 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`");
|
|
| 23 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`");
|
|
| 24 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`");
|
|
| 25 |
|
|
| 26 |
// Create tables |
|
| 27 |
$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_fields` ( `field_id` INT NOT NULL AUTO_INCREMENT,' |
|
| 28 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 29 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 30 |
. ' `position` INT NOT NULL DEFAULT \'0\' ,' |
|
| 31 |
. ' `title` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 32 |
. ' `type` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 33 |
. ' `required` INT NOT NULL DEFAULT \'0\' ,' |
|
| 34 |
. ' `value` TEXT NOT NULL ,' |
|
| 35 |
. ' `extra` TEXT NOT NULL ,' |
|
| 36 |
. ' PRIMARY KEY ( `field_id` ) ' |
|
| 37 |
. ' )'; |
|
| 38 |
$database->query($mod_form); |
|
| 39 |
|
|
| 40 |
$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_settings` ('
|
|
| 41 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 42 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 43 |
. ' `header` TEXT NOT NULL ,' |
|
| 44 |
. ' `field_loop` TEXT NOT NULL ,' |
|
| 45 |
. ' `footer` TEXT NOT NULL ,' |
|
| 46 |
. ' `email_to` TEXT NOT NULL ,' |
|
| 47 |
. ' `email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 48 |
. ' `email_fromname` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 49 |
. ' `email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 50 |
. ' `success_page` TEXT NOT NULL ,' |
|
| 51 |
. ' `success_email_to` TEXT NOT NULL ,' |
|
| 52 |
. ' `success_email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 53 |
. ' `success_email_fromname` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 54 |
. ' `success_email_text` TEXT NOT NULL ,' |
|
| 55 |
. ' `success_email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 56 |
. ' `stored_submissions` INT NOT NULL DEFAULT \'0\' ,' |
|
| 57 |
. ' `max_submissions` INT NOT NULL DEFAULT \'0\' ,' |
|
| 58 |
. ' `use_captcha` INT NOT NULL DEFAULT \'0\' ,' |
|
| 59 |
. ' PRIMARY KEY ( `section_id` ) ' |
|
| 60 |
. ' )'; |
|
| 61 |
$database->query($mod_form); |
|
| 62 |
|
|
| 63 |
$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,' |
|
| 64 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 65 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 66 |
. ' `submitted_when` INT NOT NULL DEFAULT \'0\' ,' |
|
| 67 |
. ' `submitted_by` INT NOT NULL DEFAULT \'0\',' |
|
| 68 |
. ' `body` TEXT NOT NULL,' |
|
| 69 |
. ' PRIMARY KEY ( `submission_id` ) ' |
|
| 70 |
. ' )'; |
|
| 71 |
$database->query($mod_form); |
|
| 72 |
|
|
| 73 |
$mod_search = "SELECT * FROM ".TABLE_PREFIX."search WHERE value = 'form'"; |
|
| 74 |
$insert_search = $database->query($mod_search); |
|
| 75 |
if( $insert_search->numRows() == 0 ) |
|
| 76 |
{
|
|
| 77 |
// Insert info into the search table |
|
| 78 |
// Module query info |
|
| 79 |
$field_info = array(); |
|
| 80 |
$field_info['page_id'] = 'page_id'; |
|
| 81 |
$field_info['title'] = 'page_title'; |
|
| 82 |
$field_info['link'] = 'link'; |
|
| 83 |
$field_info['description'] = 'description'; |
|
| 84 |
$field_info['modified_when'] = 'modified_when'; |
|
| 85 |
$field_info['modified_by'] = 'modified_by'; |
|
| 86 |
$field_info = serialize($field_info); |
|
| 87 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'form', '$field_info')");
|
|
| 88 |
// Query start |
|
| 89 |
$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title, [TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by FROM [TP]mod_form_fields, [TP]mod_form_settings, [TP]pages WHERE "; |
|
| 90 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'form')");
|
|
| 91 |
// Query body |
|
| 92 |
$query_body_code = " [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.header LIKE \'%[STRING]%\' |
|
| 93 |
OR [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.footer LIKE \'%[STRING]%\' |
|
| 94 |
OR [TP]pages.page_id = [TP]mod_form_fields.page_id AND [TP]mod_form_fields.title LIKE \'%[STRING]%\' "; |
|
| 95 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'form')");
|
|
| 96 |
// Query end |
|
| 97 |
$query_end_code = ""; |
|
| 98 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'form')");
|
|
| 99 |
|
|
| 100 |
// Insert blank row (there needs to be at least on row for the search to work) |
|
| 101 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (page_id,section_id) VALUES ('0','0')");
|
|
| 102 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id) VALUES ('0','0')");
|
|
| 103 |
|
|
| 104 |
} |
|
| 105 |
} |
|
| 106 |
|
|
| 107 |
?> |
|
| 1 |
<?php |
|
| 2 |
/** |
|
| 3 |
* |
|
| 4 |
* @category modules |
|
| 5 |
* @package form |
|
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
| 8 |
* @link http://www.websitebaker2.org/ |
|
| 9 |
* @license http://www.gnu.org/licenses/gpl.html |
|
| 10 |
* @platform WebsiteBaker 2.8.x |
|
| 11 |
* @requirements PHP 5.2.2 and higher |
|
| 12 |
* @version $Id$ |
|
| 13 |
* @filesource $HeadURL$ |
|
| 14 |
* @lastmodified $Date$ |
|
| 15 |
* |
|
| 16 |
*/ |
|
| 17 |
|
|
| 18 |
if(defined('WB_URL'))
|
|
| 19 |
{
|
|
| 20 |
|
|
| 21 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`");
|
|
| 22 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`");
|
|
| 23 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`");
|
|
| 24 |
|
|
| 25 |
// Create tables |
|
| 26 |
$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_fields` ( `field_id` INT NOT NULL AUTO_INCREMENT,' |
|
| 27 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 28 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 29 |
. ' `position` INT NOT NULL DEFAULT \'0\' ,' |
|
| 30 |
. ' `title` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 31 |
. ' `type` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 32 |
. ' `required` INT NOT NULL DEFAULT \'0\' ,' |
|
| 33 |
. ' `value` TEXT NOT NULL ,' |
|
| 34 |
. ' `extra` TEXT NOT NULL ,' |
|
| 35 |
. ' PRIMARY KEY ( `field_id` ) ' |
|
| 36 |
. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'; |
|
| 37 |
$database->query($mod_form); |
|
| 38 |
|
|
| 39 |
$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_settings` ('
|
|
| 40 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 41 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 42 |
. ' `header` TEXT NOT NULL ,' |
|
| 43 |
. ' `field_loop` TEXT NOT NULL ,' |
|
| 44 |
. ' `footer` TEXT NOT NULL ,' |
|
| 45 |
. ' `email_to` TEXT NOT NULL ,' |
|
| 46 |
. ' `email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 47 |
. ' `email_fromname` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 48 |
. ' `email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 49 |
. ' `success_page` TEXT NOT NULL ,' |
|
| 50 |
. ' `success_email_to` TEXT NOT NULL ,' |
|
| 51 |
. ' `success_email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 52 |
. ' `success_email_fromname` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 53 |
. ' `success_email_text` TEXT NOT NULL ,' |
|
| 54 |
. ' `success_email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
|
| 55 |
. ' `stored_submissions` INT NOT NULL DEFAULT \'0\' ,' |
|
| 56 |
. ' `max_submissions` INT NOT NULL DEFAULT \'0\' ,' |
|
| 57 |
. ' `use_captcha` INT NOT NULL DEFAULT \'0\' ,' |
|
| 58 |
. ' PRIMARY KEY ( `section_id` ) ' |
|
| 59 |
. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'; |
|
| 60 |
$database->query($mod_form); |
|
| 61 |
|
|
| 62 |
$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,' |
|
| 63 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 64 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,' |
|
| 65 |
. ' `submitted_when` INT NOT NULL DEFAULT \'0\' ,' |
|
| 66 |
. ' `submitted_by` INT NOT NULL DEFAULT \'0\',' |
|
| 67 |
. ' `body` TEXT NOT NULL,' |
|
| 68 |
. ' PRIMARY KEY ( `submission_id` ) ' |
|
| 69 |
. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'; |
|
| 70 |
$database->query($mod_form); |
|
| 71 |
|
|
| 72 |
$mod_search = "SELECT * FROM ".TABLE_PREFIX."search WHERE value = 'form'"; |
|
| 73 |
$insert_search = $database->query($mod_search); |
|
| 74 |
if( $insert_search->numRows() == 0 ) |
|
| 75 |
{
|
|
| 76 |
// Insert info into the search table |
|
| 77 |
// Module query info |
|
| 78 |
$field_info = array(); |
|
| 79 |
$field_info['page_id'] = 'page_id'; |
|
| 80 |
$field_info['title'] = 'page_title'; |
|
| 81 |
$field_info['link'] = 'link'; |
|
| 82 |
$field_info['description'] = 'description'; |
|
| 83 |
$field_info['modified_when'] = 'modified_when'; |
|
| 84 |
$field_info['modified_by'] = 'modified_by'; |
|
| 85 |
$field_info = serialize($field_info); |
|
| 86 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'form', '$field_info')");
|
|
| 87 |
// Query start |
|
| 88 |
$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title, [TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by FROM [TP]mod_form_fields, [TP]mod_form_settings, [TP]pages WHERE "; |
|
| 89 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'form')");
|
|
| 90 |
// Query body |
|
| 91 |
$query_body_code = " [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.header LIKE \'%[STRING]%\' |
|
| 92 |
OR [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.footer LIKE \'%[STRING]%\' |
|
| 93 |
OR [TP]pages.page_id = [TP]mod_form_fields.page_id AND [TP]mod_form_fields.title LIKE \'%[STRING]%\' "; |
|
| 94 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'form')");
|
|
| 95 |
// Query end |
|
| 96 |
$query_end_code = ""; |
|
| 97 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'form')");
|
|
| 98 |
|
|
| 99 |
// Insert blank row (there needs to be at least on row for the search to work) |
|
| 100 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (page_id,section_id) VALUES ('0','0')");
|
|
| 101 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id) VALUES ('0','0')");
|
|
| 102 |
|
|
| 103 |
} |
|
| 104 |
} |
|
| branches/2.8.x/wb/modules/form/modify_settings.php | ||
|---|---|---|
| 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 |
*/ |
|
| 18 |
|
|
| 19 |
require('../../config.php');
|
|
| 20 |
|
|
| 21 |
$print_info_banner = true; |
|
| 22 |
// Tells script to update when this page was last updated |
|
| 23 |
$update_when_modified = false; |
|
| 24 |
// Include WB admin wrapper script |
|
| 25 |
require(WB_PATH.'/modules/admin.php'); |
|
| 26 |
|
|
| 27 |
// include core functions of WB 2.7 to edit the optional module CSS files (frontend.css, backend.css) |
|
| 28 |
@include_once(WB_PATH .'/framework/module.functions.php'); |
|
| 29 |
|
|
| 30 |
// load module language file |
|
| 31 |
$lang = (dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php'; |
|
| 32 |
require_once(!file_exists($lang) ? (dirname(__FILE__)) . '/languages/EN.php' : $lang ); |
|
| 33 |
|
|
| 34 |
// Get header and footer |
|
| 35 |
$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
|
|
| 36 |
$setting = $query_content->fetchRow(); |
|
| 37 |
|
|
| 38 |
// Set raw html <'s and >'s to be replace by friendly html code |
|
| 39 |
$raw = array('<', '>');
|
|
| 40 |
$friendly = array('<', '>');
|
|
| 41 |
/* |
|
| 42 |
// check if backend.css file needs to be included into the <body></body> of modify.php |
|
| 43 |
if(!method_exists($admin, 'register_backend_modfiles') && file_exists(WB_PATH ."/modules/form/backend.css")) {
|
|
| 44 |
echo '<style type="text/css">'; |
|
| 45 |
include(WB_PATH .'/modules/form/backend.css'); |
|
| 46 |
echo "\n</style>\n"; |
|
| 47 |
} |
|
| 48 |
*/ |
|
| 49 |
?> |
|
| 50 |
<h2><?php echo $MOD_FORM['SETTINGS']; ?></h2> |
|
| 51 |
<?php |
|
| 52 |
// include the button to edit the optional module CSS files |
|
| 53 |
// Note: CSS styles for the button are defined in backend.css (div class="mod_moduledirectory_edit_css") |
|
| 54 |
// Place this call outside of any <form></form> construct!!! |
|
| 55 |
if(function_exists('edit_module_css')) {
|
|
| 56 |
edit_module_css('form');
|
|
| 57 |
} |
|
| 58 |
?> |
|
| 59 |
|
|
| 60 |
<form name="edit" action="<?php echo WB_URL; ?>/modules/form/save_settings.php" method="post" style="margin: 0;"> |
|
| 61 |
|
|
| 62 |
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" /> |
|
| 63 |
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" /> |
|
| 64 |
<?php echo $admin->getFTAN(); ?> |
|
| 65 |
|
|
| 66 |
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%"> |
|
| 67 |
<tr> |
|
| 68 |
<td colspan="2"><strong><?php echo $HEADING['GENERAL_SETTINGS']; ?></strong></td> |
|
| 69 |
</tr> |
|
| 70 |
<tr> |
|
| 71 |
<td class="setting_name"><?php echo $TEXT['CAPTCHA_VERIFICATION']; ?>:</td> |
|
| 72 |
<td> |
|
| 73 |
<input type="radio" name="use_captcha" id="use_captcha_true" value="1"<?php if($setting['use_captcha'] == true) { echo ' checked="checked"'; } ?> />
|
|
| 74 |
<label for="use_captcha_true"><?php echo $TEXT['ENABLED']; ?></label> |
|
| 75 |
<input type="radio" name="use_captcha" id="use_captcha_false" value="0"<?php if($setting['use_captcha'] == false) { echo ' checked="checked"'; } ?> />
|
|
| 76 |
<label for="use_captcha_false"><?php echo $TEXT['DISABLED']; ?></label> |
|
| 77 |
</td> |
|
| 78 |
</tr> |
|
| 79 |
<tr> |
|
| 80 |
<td class="setting_name"><?php echo $TEXT['MAX_SUBMISSIONS_PER_HOUR']; ?>:</td> |
|
| 81 |
<td class="setting_value"> |
|
| 82 |
<input type="text" name="max_submissions" style="width: 30px;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['max_submissions'])); ?>" /> |
|
| 83 |
</td> |
|
| 84 |
</tr> |
|
| 85 |
<tr> |
|
| 86 |
<td class="setting_name"><?php echo $TEXT['SUBMISSIONS_STORED_IN_DATABASE']; ?>:</td> |
|
| 87 |
<td class="setting_value"> |
|
| 88 |
<input type="text" name="stored_submissions" style="width: 30px;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['stored_submissions'])); ?>" /> |
|
| 89 |
</td> |
|
| 90 |
</tr> |
|
| 91 |
<tr> |
|
| 92 |
<td class="setting_name"><?php echo $TEXT['HEADER']; ?>:</td> |
|
| 93 |
<td class="setting_value"> |
|
| 94 |
<textarea name="header" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo ($setting['header']); ?></textarea> |
|
| 95 |
</td> |
|
| 96 |
</tr> |
|
| 97 |
<tr> |
|
| 98 |
<td class="setting_name"><?php echo $TEXT['FIELD'].' '.$TEXT['LOOP']; ?>:</td> |
|
| 99 |
<td class="setting_value"> |
|
| 100 |
<textarea name="field_loop" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo ($setting['field_loop']); ?></textarea> |
|
| 101 |
</td> |
|
| 102 |
</tr> |
|
| 103 |
<tr> |
|
| 104 |
<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td> |
|
| 105 |
<td class="setting_value"> |
|
| 106 |
<textarea name="footer" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo str_replace($raw, $friendly, ($setting['footer'])); ?></textarea> |
|
| 107 |
</td> |
|
| 108 |
</tr> |
|
| 109 |
</table> |
|
| 110 |
|
|
| 111 |
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%" style="margin-top: 3px;"> |
|
| 112 |
<tr> |
|
| 113 |
<td colspan="2"><strong><?php echo $TEXT['EMAIL'].' '.$TEXT['SETTINGS']; ?></strong></td> |
|
| 114 |
</tr> |
|
| 115 |
<tr> |
|
| 116 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td> |
|
| 117 |
<td class="setting_value"> |
|
| 118 |
<input type="text" name="email_to" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_to'])); ?>" /> |
|
| 119 |
</td> |
|
| 120 |
</tr> |
|
| 121 |
<tr> |
|
| 122 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['FROM']; ?>:</td> |
|
| 123 |
<td class="setting_value"> |
|
| 124 |
<select name="email_from_field" style="width: 98%;"> |
|
| 125 |
<option value="" onclick="javascript: document.getElementById('email_from').style.display = 'block';"><?php echo $TEXT['CUSTOM']; ?>:</option>
|
|
| 126 |
<?php |
|
| 127 |
$email_from_value = str_replace($raw, $friendly, ($setting['email_from'])); |
|
| 128 |
$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' AND ( type = 'textfield' OR type = 'email' ) ORDER BY position ASC");
|
|
| 129 |
if($query_email_fields->numRows() > 0) {
|
|
| 130 |
while($field = $query_email_fields->fetchRow()) {
|
|
| 131 |
?> |
|
| 132 |
<option value="field<?php echo $field['field_id']; ?>"<?php if($email_from_value == 'field'.$field['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_from').style.display = 'none';">
|
|
| 133 |
<?php echo $TEXT['FIELD'].': '.$field['title']; ?> |
|
| 134 |
</option> |
|
| 135 |
<?php |
|
| 136 |
} |
|
| 137 |
} |
|
| 138 |
?> |
|
| 139 |
</select> |
|
| 140 |
<input type="text" name="email_from" id="email_from" style="width: 98%; display: <?php if(isset($selected) AND $selected == true) { echo 'none'; } else { echo 'block'; } ?>;" maxlength="255" value="<?php if(substr($email_from_value, 0, 5) != 'field') { echo $email_from_value; } ?>" />
|
|
| 141 |
</td> |
|
| 142 |
</tr> |
|
| 143 |
<tr> |
|
| 144 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['NAME']; ?>:</td> |
|
| 145 |
<td class="setting_value"> |
|
| 146 |
<input type="text" name="email_fromname" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_fromname'])); ?>" /> |
|
| 147 |
</td> |
|
| 148 |
</tr> |
|
| 149 |
<tr> |
|
| 150 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td> |
|
| 151 |
<td class="setting_value"> |
|
| 152 |
<input type="text" name="email_subject" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_subject'])); ?>" /> |
|
| 153 |
</td> |
|
| 154 |
</tr> |
|
| 155 |
</table> |
|
| 156 |
|
|
| 157 |
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%" style="margin-top: 3px;"> |
|
| 158 |
<tr> |
|
| 159 |
<td colspan="2"><strong><?php echo $TEXT['SUCCESS'].' '.$TEXT['SETTINGS']; ?></strong></td> |
|
| 160 |
</tr> |
|
| 161 |
<tr> |
|
| 162 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td> |
|
| 163 |
<td class="setting_value"> |
|
| 164 |
<select name="success_email_to" style="width: 98%;"> |
|
| 165 |
<option value="" onclick="javascript: document.getElementById('success_email_to').style.display = 'block';"><?php echo $TEXT['NONE']; ?></option>
|
|
| 166 |
<?php |
|
| 167 |
$success_email_to = str_replace($raw, $friendly, ($setting['success_email_to'])); |
|
| 168 |
$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' AND ( type = 'textfield' OR type = 'email' ) ORDER BY position ASC");
|
|
| 169 |
if($query_email_fields->numRows() > 0) {
|
|
| 170 |
while($field = $query_email_fields->fetchRow()) {
|
|
| 171 |
?> |
|
| 172 |
<option value="field<?php echo $field['field_id']; ?>"<?php if($success_email_to == 'field'.$field['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_from').style.display = 'none';">
|
|
| 173 |
<?php echo $TEXT['FIELD'].': '.$field['title']; ?> |
|
| 174 |
</option> |
|
| 175 |
<?php |
|
| 176 |
} |
|
| 177 |
} |
|
| 178 |
?> |
|
| 179 |
</select> |
|
| 180 |
</td> |
|
| 181 |
</tr> |
|
| 182 |
<tr> |
|
| 183 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['FROM']; ?>:</td> |
|
| 184 |
<td class="setting_value"> |
|
| 185 |
<input type="text" name="success_email_from" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_from'])); ?>" /> |
|
| 186 |
</td> |
|
| 187 |
</tr> |
|
| 188 |
<tr> |
|
| 189 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['NAME']; ?>:</td> |
|
| 190 |
<td class="setting_value"> |
|
| 191 |
<input type="text" name="success_email_fromname" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_fromname'])); ?>" /> |
|
| 192 |
</td> |
|
| 193 |
</tr> |
|
| 194 |
<tr> |
|
| 195 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td> |
|
| 196 |
<td class="setting_value"> |
|
| 197 |
<input type="text" name="success_email_subject" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_subject'])); ?>" /> |
|
| 198 |
</td> |
|
| 199 |
</tr> |
|
| 200 |
<tr> |
|
| 201 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TEXT']; ?>:</td> |
|
| 202 |
<td class="setting_value"> |
|
| 203 |
<textarea name="success_email_text" cols="80" rows="1" style="width: 98%; height: 80px;"><?php echo str_replace($raw, $friendly, ($setting['success_email_text'])); ?></textarea> |
|
| 204 |
</td> |
|
| 205 |
</tr> |
|
| 206 |
<tr> |
|
| 207 |
<td class="newsection"><?php echo $TEXT['SUCCESS'].' '.$TEXT['PAGE']; ?>:</td> |
|
| 208 |
<td class="newsection"> |
|
| 209 |
<select name="success_page"> |
|
| 210 |
<option value="none"><?php echo $TEXT['NONE']; ?></option> |
|
| 211 |
<?php |
|
| 212 |
// Get exisiting pages and show the pagenames |
|
| 213 |
$query = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE visibility <> 'deleted'");
|
|
| 214 |
while($mail_page = $query->fetchRow()) {
|
|
| 215 |
if(!$admin->page_is_visible($mail_page)) |
|
| 216 |
continue; |
|
| 217 |
$mail_pagename = $mail_page['menu_title']; |
|
| 218 |
$success_page = $mail_page['page_id']; |
|
| 219 |
// echo $success_page.':'.$setting['success_page'].':'; not vailde |
|
| 220 |
if($setting['success_page'] == $success_page) {
|
|
| 221 |
$selected = ' selected="selected"'; |
|
| 222 |
} else {
|
|
| 223 |
$selected = ''; |
|
| 224 |
} |
|
| 225 |
echo '<option value="'.$success_page.'"'.$selected.'>'.$mail_pagename.'</option>'; |
|
| 226 |
} |
|
| 227 |
?> |
|
| 228 |
</select> |
|
| 229 |
</td> |
|
| 230 |
</tr> |
|
| 231 |
</table> |
|
| 232 |
|
|
| 233 |
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
| 234 |
<tr> |
|
| 235 |
<td align="left"> |
|
| 236 |
<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;"> |
|
| 237 |
</td> |
|
| 238 |
<td align="right"> |
|
| 239 |
<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" /> |
|
| 240 |
</td> |
|
| 241 |
</tr> |
|
| 242 |
</table> |
|
| 243 |
</form> |
|
| 244 |
<?php |
|
| 245 |
|
|
| 246 |
// Print admin footer |
|
| 247 |
$admin->print_footer(); |
|
| 1 |
<?php |
|
| 2 |
/** |
|
| 3 |
* |
|
| 4 |
* @category module |
|
| 5 |
* @package Form |
|
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
| 8 |
* @link http://www.websitebaker2.org/ |
|
| 9 |
* @license http://www.gnu.org/licenses/gpl.html |
|
| 10 |
* @platform WebsiteBaker 2.8.x |
|
| 11 |
* @requirements PHP 5.2.2 and higher |
|
| 12 |
* @version $Id$ |
|
| 13 |
* @filesource $HeadURL$ |
|
| 14 |
* @lastmodified $Date$ |
|
| 15 |
* @description |
|
| 16 |
*/ |
|
| 17 |
|
|
| 18 |
require('../../config.php');
|
|
| 19 |
|
|
| 20 |
$print_info_banner = true; |
|
| 21 |
// Tells script to update when this page was last updated |
|
| 22 |
$update_when_modified = false; |
|
| 23 |
// Include WB admin wrapper script |
|
| 24 |
require(WB_PATH.'/modules/admin.php'); |
|
| 25 |
|
|
| 26 |
// include core functions of WB 2.7 to edit the optional module CSS files (frontend.css, backend.css) |
|
| 27 |
@include_once(WB_PATH .'/framework/module.functions.php'); |
|
| 28 |
|
|
| 29 |
// load module language file |
|
| 30 |
$lang = (dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php'; |
|
| 31 |
require_once(!file_exists($lang) ? (dirname(__FILE__)) . '/languages/EN.php' : $lang ); |
|
| 32 |
|
|
| 33 |
// Get header and footer |
|
| 34 |
$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
|
|
| 35 |
$setting = $query_content->fetchRow(); |
|
| 36 |
|
|
| 37 |
// Set raw html <'s and >'s to be replace by friendly html code |
|
| 38 |
$raw = array('<', '>');
|
|
| 39 |
$friendly = array('<', '>');
|
|
| 40 |
/* |
|
| 41 |
// check if backend.css file needs to be included into the <body></body> of modify.php |
|
| 42 |
if(!method_exists($admin, 'register_backend_modfiles') && file_exists(WB_PATH ."/modules/form/backend.css")) {
|
|
| 43 |
echo '<style type="text/css">'; |
|
| 44 |
include(WB_PATH .'/modules/form/backend.css'); |
|
| 45 |
echo "\n</style>\n"; |
|
| 46 |
} |
|
| 47 |
*/ |
|
| 48 |
?> |
|
| 49 |
<h2><?php echo $MOD_FORM['SETTINGS']; ?></h2> |
|
| 50 |
<?php |
|
| 51 |
// include the button to edit the optional module CSS files |
|
| 52 |
// Note: CSS styles for the button are defined in backend.css (div class="mod_moduledirectory_edit_css") |
|
| 53 |
// Place this call outside of any <form></form> construct!!! |
|
| 54 |
if(function_exists('edit_module_css')) {
|
|
| 55 |
edit_module_css('form');
|
|
| 56 |
} |
|
| 57 |
?> |
|
| 58 |
|
|
| 59 |
<form name="edit" action="<?php echo WB_URL; ?>/modules/form/save_settings.php" method="post" style="margin: 0;"> |
|
| 60 |
|
|
| 61 |
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" /> |
|
| 62 |
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" /> |
|
| 63 |
<?php echo $admin->getFTAN(); ?> |
|
| 64 |
|
|
| 65 |
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%"> |
|
| 66 |
<tr> |
|
| 67 |
<td colspan="2"><strong><?php echo $HEADING['GENERAL_SETTINGS']; ?></strong></td> |
|
| 68 |
</tr> |
|
| 69 |
<tr> |
|
| 70 |
<td class="setting_name"><?php echo $TEXT['CAPTCHA_VERIFICATION']; ?>:</td> |
|
| 71 |
<td> |
|
| 72 |
<input type="radio" name="use_captcha" id="use_captcha_true" value="1"<?php if($setting['use_captcha'] == true) { echo ' checked="checked"'; } ?> />
|
|
| 73 |
<label for="use_captcha_true"><?php echo $TEXT['ENABLED']; ?></label> |
|
| 74 |
<input type="radio" name="use_captcha" id="use_captcha_false" value="0"<?php if($setting['use_captcha'] == false) { echo ' checked="checked"'; } ?> />
|
|
| 75 |
<label for="use_captcha_false"><?php echo $TEXT['DISABLED']; ?></label> |
|
| 76 |
</td> |
|
| 77 |
</tr> |
|
| 78 |
<tr> |
|
| 79 |
<td class="setting_name"><?php echo $TEXT['MAX_SUBMISSIONS_PER_HOUR']; ?>:</td> |
|
| 80 |
<td class="setting_value"> |
|
| 81 |
<input type="text" name="max_submissions" style="width: 30px;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['max_submissions'])); ?>" /> |
|
| 82 |
</td> |
|
| 83 |
</tr> |
|
| 84 |
<tr> |
|
| 85 |
<td class="setting_name"><?php echo $TEXT['SUBMISSIONS_STORED_IN_DATABASE']; ?>:</td> |
|
| 86 |
<td class="setting_value"> |
|
| 87 |
<input type="text" name="stored_submissions" style="width: 30px;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['stored_submissions'])); ?>" /> |
|
| 88 |
</td> |
|
| 89 |
</tr> |
|
| 90 |
<tr> |
|
| 91 |
<td class="setting_name"><?php echo $TEXT['HEADER']; ?>:</td> |
|
| 92 |
<td class="setting_value"> |
|
| 93 |
<textarea name="header" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo ($setting['header']); ?></textarea> |
|
| 94 |
</td> |
|
| 95 |
</tr> |
|
| 96 |
<tr> |
|
| 97 |
<td class="setting_name"><?php echo $TEXT['FIELD'].' '.$TEXT['LOOP']; ?>:</td> |
|
| 98 |
<td class="setting_value"> |
|
| 99 |
<textarea name="field_loop" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo ($setting['field_loop']); ?></textarea> |
|
| 100 |
</td> |
|
| 101 |
</tr> |
|
| 102 |
<tr> |
|
| 103 |
<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td> |
|
| 104 |
<td class="setting_value"> |
|
| 105 |
<textarea name="footer" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo str_replace($raw, $friendly, ($setting['footer'])); ?></textarea> |
|
| 106 |
</td> |
|
| 107 |
</tr> |
|
| 108 |
</table> |
|
| 109 |
|
|
| 110 |
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%" style="margin-top: 3px;"> |
|
| 111 |
<tr> |
|
| 112 |
<td colspan="2"><strong><?php echo $TEXT['EMAIL'].' '.$TEXT['SETTINGS']; ?></strong></td> |
|
| 113 |
</tr> |
|
| 114 |
<tr> |
|
| 115 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td> |
|
| 116 |
<td class="setting_value"> |
|
| 117 |
<input type="text" name="email_to" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_to'])); ?>" /> |
|
| 118 |
</td> |
|
| 119 |
</tr> |
|
| 120 |
<tr> |
|
| 121 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['FROM']; ?>:</td> |
|
| 122 |
<td class="setting_value"> |
|
| 123 |
<select name="email_from_field" style="width: 98%;"> |
|
| 124 |
<option value="" onclick="javascript: document.getElementById('email_from').style.display = 'block';"><?php echo $TEXT['CUSTOM']; ?>:</option>
|
|
| 125 |
<?php |
|
| 126 |
$email_from_value = str_replace($raw, $friendly, ($setting['email_from'])); |
|
| 127 |
$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' AND ( type = 'textfield' OR type = 'email' ) ORDER BY position ASC");
|
|
| 128 |
if($query_email_fields->numRows() > 0) {
|
|
| 129 |
while($field = $query_email_fields->fetchRow()) {
|
|
| 130 |
?> |
|
| 131 |
<option value="field<?php echo $field['field_id']; ?>"<?php if($email_from_value == 'field'.$field['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_from').style.display = 'none';">
|
|
| 132 |
<?php echo $TEXT['FIELD'].': '.$field['title']; ?> |
|
| 133 |
</option> |
|
| 134 |
<?php |
|
| 135 |
} |
|
| 136 |
} |
|
| 137 |
?> |
|
| 138 |
</select> |
|
| 139 |
<input type="text" name="email_from" id="email_from" style="width: 98%; display: <?php if(isset($selected) AND $selected == true) { echo 'none'; } else { echo 'block'; } ?>;" maxlength="255" value="<?php if(substr($email_from_value, 0, 5) != 'field') { echo $email_from_value; } ?>" />
|
|
| 140 |
</td> |
|
| 141 |
</tr> |
|
| 142 |
<tr> |
|
| 143 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['NAME']; ?>:</td> |
|
| 144 |
<td class="setting_value"> |
|
| 145 |
<input type="text" name="email_fromname" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_fromname'])); ?>" /> |
|
| 146 |
</td> |
|
| 147 |
</tr> |
|
| 148 |
<tr> |
|
| 149 |
<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td> |
|
| 150 |
<td class="setting_value"> |
|
| 151 |
<input type="text" name="email_subject" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_subject'])); ?>" /> |
|
| 152 |
</td> |
|
Also available in: Unified diff
! add table db engine in module install scripts
! some small updates in modules