Index: trunk/wb/modules/form/install.php
===================================================================
--- trunk/wb/modules/form/install.php	(revision 80)
+++ trunk/wb/modules/form/install.php	(nonexistent)
@@ -1,103 +0,0 @@
-<?php
-
-// $Id: install.php,v 1.6 2005/04/02 08:21:46 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-if(defined('WB_URL')) {
-		
-	// Create tables
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`");
-	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_fields` ( `field_id` INT NOT NULL AUTO_INCREMENT,'
-	                 . ' `section_id` INT NOT NULL ,'
-	                 . ' `page_id` INT NOT NULL ,'
-	                 . ' `position` INT NOT NULL ,'
-	                 . ' `title` VARCHAR(255) NOT NULL ,'
-	                 . ' `type` VARCHAR(255) NOT NULL ,'
-	                 . ' `required` INT NOT NULL ,'
-	                 . ' `value` TEXT NOT NULL ,'
-	                 . ' `extra` TEXT NOT NULL ,'
-	                 . ' PRIMARY KEY ( `field_id` ) )'
-	                 . ' ';
-	$database->query($mod_form);
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`");
-	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_settings` ('
-						  . ' `section_id` INT NOT NULL,'
-						  . ' `page_id` INT NOT NULL,'
-	                 . ' `header` TEXT NOT NULL ,'
-	                 . ' `field_loop` TEXT NOT NULL ,'
-	                 . ' `footer` TEXT NOT NULL ,'
-	                 . ' `email_to` TEXT NOT NULL ,'
-	                 . ' `email_from` VARCHAR(255) NOT NULL ,'
-	                 . ' `email_subject` VARCHAR(255) NOT NULL ,'
-	                 . ' `success_message` TEXT NOT NULL ,'
-						  . ' `stored_submissions` INT NOT NULL,'
-						  . ' `max_submissions` INT NOT NULL,'
-	                 . ' PRIMARY KEY ( `section_id` ) )'
-	                 . ' ';
-	$database->query($mod_form);
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`");
-	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,'
-						  . ' `section_id` INT NOT NULL,'
-						  . ' `page_id` INT NOT NULL,'
-						  . ' `submitted_when` INT NOT NULL,'
-						  . ' `submitted_by` INT NOT NULL,'
-	                 . ' `body` TEXT NOT NULL ,'
-	                 . ' PRIMARY KEY ( `submission_id` ) )'
-	                 . ' ';
-	$database->query($mod_form);
-		
-	// Insert info into the search table
-	// Module query info
-	$field_info = array();
-	$field_info['page_id'] = 'page_id';
-	$field_info['title'] = 'page_title';
-	$field_info['link'] = 'link';
-	$field_info['description'] = 'description';
-	$field_info['modified_when'] = 'modified_when';
-	$field_info['modified_by'] = 'modified_by';
-	$field_info = serialize($field_info);
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'form', '$field_info')");
-	// Query start
-	$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 ";
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'form')");
-	// Query body
-	$query_body_code = " [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.header [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
-	OR [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.footer [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
-	OR [TP]pages.page_id = [TP]mod_form_fields.page_id AND [TP]mod_form_fields.title [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'";
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'form')");
-	// Query end
-	$query_end_code = '';
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'form')");
-	
-	// Insert blank row (there needs to be at least on row for the search to work)
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (page_id,section_id) VALUES ('0','0')");
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id) VALUES ('0','0')");
-
-}
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/install.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/modify_settings.php
===================================================================
--- trunk/wb/modules/form/modify_settings.php	(revision 80)
+++ trunk/wb/modules/form/modify_settings.php	(nonexistent)
@@ -1,147 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-require('../../config.php');
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Get header and footer
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
-$setting = $query_content->fetchRow();
-
-// Set raw html <'s and >'s to be replace by friendly html code
-$raw = array('<', '>');
-$friendly = array('&lt;', '&gt;');
-
-?>
-
-<style type="text/css">
-.setting_name {
-	vertical-align: top;
-}
-</style>
-
-<form name="edit" action="<?php echo WB_URL; ?>/modules/form/save_settings.php" method="post" style="margin: 0;">
-
-<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
-<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
-
-<table cellpadding="2" cellspacing="0" border="0" width="100%">
-<tr>
-	<td class="setting_name" width="220"><?php echo $TEXT['HEADER']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->strip_slashes_dummy($setting['header']); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['FIELD'].' '.$TEXT['LOOP']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="field_loop" style="width: 100%; height: 60px;"><?php echo $admin->strip_slashes_dummy($setting['field_loop']); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['footer'])); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="email_to" style="width: 100%; height: 30px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['email_to'])); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['FROM']; ?>:</td>
-	<td class="setting_name">
-		<select name="email_from_field" style="width: 100%;">
-			<option value="" onclick="javascript: document.getElementById('email_from').style.display = 'block';"><?php echo $TEXT['CUSTOM']; ?>:</option>
-			<?php
-			$email_from_value = str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['email_from']));
-			$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields ORDER BY position ASC");
-			if($query_email_fields->numRows() > 0) {
-				while($field = $query_email_fields->fetchRow()) {
-					?>
-					<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';">
-						<?php echo $TEXT['FIELD'].': '.$field['title']; ?>
-					</option>
-					<?php
-				}
-			}
-			?>
-		</select>
-		<input type="text" name="email_from" id="email_from" style="width: 100%; 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; } ?>" />
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td>
-	<td class="setting_name">
-		<input type="text" name="email_subject" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['email_subject'])); ?>" />
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['SUCCESS'].' '.$TEXT['MESSAGE']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="success_message" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['success_message'])); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['MAX_SUBMISSIONS_PER_HOUR']; ?>:</td>
-	<td class="setting_name">
-		<input type="text" name="max_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['max_submissions'])); ?>" />
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['SUBMISSIONS_STORED_IN_DATABASE']; ?>:</td>
-	<td class="setting_name">
-		<input type="text" name="stored_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['stored_submissions'])); ?>" />
-	</td>
-</tr>
-</table>
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="225">&nbsp;</td>
-	<td align="left">
-		<input name="save" type="submit" value="<?php echo $TEXT['SAVE'].' '.$TEXT['SETTINGS']; ?>" style="width: 200px; margin-top: 5px;"></form>
-	</td>
-	<td align="right">
-		<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;" />
-	</td>
-</tr>
-</table>
-
-
-<?php
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/modify_settings.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/delete_submission.php
===================================================================
--- trunk/wb/modules/form/delete_submission.php	(revision 80)
+++ trunk/wb/modules/form/delete_submission.php	(nonexistent)
@@ -1,57 +0,0 @@
-<?php
-
-// $Id: delete_submission.php,v 1.1 2005/03/28 04:35:39 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra submission types
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$submission_id = $_GET['submission_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Delete row
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/delete_submission.php
___________________________________________________________________
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/save_settings.php
===================================================================
--- trunk/wb/modules/form/save_settings.php	(revision 80)
+++ trunk/wb/modules/form/save_settings.php	(nonexistent)
@@ -1,79 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-require('../../config.php');
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// This code removes any <?php tags and adds slashes
-$friendly = array('&lt;', '&gt;', '?php');
-$raw = array('<', '>', '');
-$header = $admin->add_slashes($_POST['header']);
-$field_loop = $admin->add_slashes($_POST['field_loop']);
-$footer = $admin->add_slashes($_POST['footer']);
-$email_to = $admin->add_slashes($_POST['email_to']);
-if($_POST['email_from_field'] == '') {
-	$email_from = $admin->add_slashes($_POST['email_from']);
-} else {
-	$email_from = $admin->add_slashes($_POST['email_from_field']);
-}
-$email_subject = $admin->add_slashes($_POST['email_subject']);
-$success_message = $admin->add_slashes($_POST['success_message']);
-if(!is_numeric($_POST['max_submissions'])) {
-	$max_submissions = 50;
-} else {
-	$max_submissions = $_POST['max_submissions'];
-}
-if(!is_numeric($_POST['stored_submissions'])) {
-	$stored_submissions = 100;
-} else {
-	$stored_submissions = $_POST['stored_submissions'];
-}
-// Make sure max submissions is not smaller than stored submissions
-if($max_submissions < $stored_submissions) {
-	$max_submissions = $stored_submissions;
-}
-
-// Update settings
-$database->query("UPDATE ".TABLE_PREFIX."mod_form_settings SET header = '$header', field_loop = '$field_loop', footer = '$footer', email_to = '$email_to', email_from = '$email_from', email_subject = '$email_subject', success_message = '$success_message', max_submissions = '$max_submissions', stored_submissions = '$stored_submissions' WHERE section_id = '$section_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/save_settings.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/move_up.php
===================================================================
--- trunk/wb/modules/form/move_up.php	(revision 80)
+++ trunk/wb/modules/form/move_up.php	(nonexistent)
@@ -1,57 +0,0 @@
-<?php
-
-// $Id: move_up.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
-	header("Location: index.php");
-} else {
-	$field_id = $_GET['field_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-
-// Create new order object an reorder
-$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
-if($order->move_up($field_id)) {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/move_up.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/view.php
===================================================================
--- trunk/wb/modules/form/view.php	(revision 80)
+++ trunk/wb/modules/form/view.php	(nonexistent)
@@ -1,323 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-// Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
-
-// Function for generating an optionsfor a select field
-function make_option(&$n) {
-	// start option group if it exists
-	if (substr($n,0,2) == '[=') {
-	 	$n = '<optgroup label="'.substr($n,2,strlen($n)).'">';
-	} elseif ($n == ']') {
-		$n = '</optgroup>';
-	} else {
-		$n = '<option value="'.$n.'">'.$n.'</option>';
-	}
-}
-
-// Function for generating a checkbox
-function make_checkbox(&$n, $idx, $params) {
-	$field_id = $params[0];
-	$seperator = $params[1];
-	//$n = '<input class="field_checkbox" type="checkbox" id="'.$n.'" name="field'.$field_id.'" value="'.$n.'">'.'<font class="checkbox_label" onclick="javascript: document.getElementById(\''.$n.'\').checked = !document.getElementById(\''.$n.'\').checked;">'.$n.'</font>'.$seperator;
-	$n = '<input class="field_checkbox" type="checkbox" id="'.$n.'" name="field'.$field_id.'['.$idx.']" value="'.$n.'">'.'<font class="checkbox_label" onclick="javascript: document.getElementById(\''.$n.'\').checked = !document.getElementById(\''.$n.'\').checked;">'.$n.'</font>'.$seperator;
-}
-
-// Function for generating a radio button
-function make_radio(&$n, $idx, $params) {
-	$field_id = $params[0];
-	$group = $params[1];
-	$seperator = $params[2];
-	$n = '<input class="field_radio" type="radio" id="'.$n.'" name="field'.$field_id.'" value="'.$n.'">'.'<font class="radio_label" onclick="javascript: document.getElementById(\''.$n.'\').checked = true;">'.$n.'</font>'.$seperator;
-}
-
-// Work-out if the form has been submitted or not
-if($_POST == array()) {
-
-?>
-<style type="text/css">
-.required {
-	color: #FF0000;
-}
-.field_title {
-	font-size: 12px;
-	width: 100px;
-	vertical-align: top;
-	text-align:right;
-}
-.textfield {
-	font-size: 12px;
-	width: 200px;
-}
-.textarea {
-	font-size: 12px;
-	width: 90%;
-	height: 100px;
-}
-.field_heading {
-	font-size: 12px;
-	font-weight: bold;
-	border-bottom-width: 2px;
-	border-bottom-style: solid;
-	border-bottom-color: #666666;
-	padding-top: 10px;
-	color: #666666;
-}
-.select {
-	font-size: 12px;
-}
-.checkbox_label {
-	font-size: 11px;
-	cursor: pointer;
-}
-.radio_label {
-	font-size: 11px;
-	cursor: pointer;
-}
-.email {
-	font-size: 12px;
-	width: 200px;
-}
-</style>
-<?php
-
-// Get settings
-$query_settings = $database->query("SELECT header,field_loop,footer FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
-if($query_settings->numRows() > 0) {
-	$fetch_settings = $query_settings->fetchRow();
-	$header = $this->strip_slashes_dummy($fetch_settings['header']);
-	$field_loop = $this->strip_slashes_dummy($fetch_settings['field_loop']);
-	$footer = $this->strip_slashes_dummy($fetch_settings['footer']);
-} else {
-	$header = '';
-	$field_loop = '';
-	$footer = '';
-}
-
-// Add form starter code
-?>
-<form name="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
-<?php
-
-// Print header
-echo $header;
-
-// Get list of fields
-$query_fields = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' ORDER BY position ASC");
-if($query_fields->numRows() > 0) {
-	while($field = $query_fields->fetchRow()) {
-		// Set field values
-		$field_id = $field['field_id'];
-		$value = $this->strip_slashes_dummy($field['value']);
-		// Print field_loop after replacing vars with values
-		$vars = array('{TITLE}', '{REQUIRED}');
-		$values = array($field['title']);
-		if($field['required'] == 1) {
-			$values[] = '<font class="required">*</font>';
-		} else {
-			$values[] = '';
-		}
-		if($field['type'] == 'textfield') {
-			$vars[] = '{FIELD}';
-			$values[] = '<input type="text" name="field'.$field_id.'" id="field'.$field_id.'" maxlength="'.$field['extra'].'" value="'.$value.'" class="textfield" />';
-		} elseif($field['type'] == 'textarea') {
-			$vars[] = '{FIELD}';
-			$values[] = '<textarea name="field'.$field_id.'" id="field'.$field_id.'" class="textarea">'.$value.'</textarea>';
-		} elseif($field['type'] == 'select') {
-			$vars[] = '{FIELD}';
-			$options = explode(',', $value);
-			array_walk($options, 'make_option');
-			$field['extra'] = explode(',',$field['extra']); 
-			$values[] = '<select name="field'.$field_id.'[]" id="field'.$field_id.'" size="'.$field['extra'][0].'" '.$field['extra'][1].' class="select">'.implode($options).'</select>';
-		} elseif($field['type'] == 'heading') {
-			$vars[] = '{FIELD}';
-			$values[] = '<input type="hidden" name="field'.$field_id.'" id="field'.$field_id.'" value="===['.$field['title'].']===" />';
-			$tmp_field_loop = $field_loop;		// temporarily modify the field loop template
-			$field_loop = $field['extra'];
-		} elseif($field['type'] == 'checkbox') {
-			$vars[] = '{FIELD}';
-			$options = explode(',', $value);
-			array_walk($options, 'make_checkbox',array($field_id,$field['extra']));
-			$values[] = implode($options);
-		} elseif($field['type'] == 'radio') {
-			$vars[] = '{FIELD}';
-			$options = explode(',', $value);
-			array_walk($options, 'make_radio',array($field_id,$field['title'],$field['extra']));
-			$values[] = implode($options);
-		} elseif($field['type'] == 'email') {
-			$vars[] = '{FIELD}';
-			$values[] = '<input type="text" name="field'.$field_id.'" id="field'.$field_id.'" maxlength="'.$field['extra'].'" class="email" />';
-		}
-		if($field['type'] != '') {
-			echo str_replace($vars, $values, $field_loop);
-		}
-		if (isset($tmp_field_loop)) $field_loop = $tmp_field_loop;
-	}
-}
-
-// Print footer
-echo $footer;
-
-// Add form end code
-?>
-</form>
-<?php
-
-} else {
-	
-	// Submit form data
-	// First start message settings
-	$query_settings = $database->query("SELECT email_to,email_from,email_subject,success_message,max_submissions,stored_submissions FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
-	if($query_settings->numRows() > 0) {
-		$fetch_settings = $query_settings->fetchRow();
-		$email_to = $this->strip_slashes_dummy($fetch_settings['email_to']);
-		$email_from = $this->strip_slashes_dummy($fetch_settings['email_from']);
-		if(substr($email_from, 0, 5) == 'field') {
-			// Set the email from field to what the user entered in the specified field
-			$email_from = $this->add_slashes($_POST[$email_from]);
-		}
-		$email_subject = $this->strip_slashes_dummy($fetch_settings['email_subject']);
-		$success_message = $this->strip_slashes_dummy($fetch_settings['success_message']);
-		$max_submissions = $this->strip_slashes_dummy($fetch_settings['max_submissions']);
-		$stored_submissions = $this->strip_slashes_dummy($fetch_settings['stored_submissions']);
-	} else {
-		exit($TEXT['UNDER_CONSTRUCTION']);
-	}
-	$email_body = '';
-	
-	// Create blank "required" array
-	$required = array();
-	
-	// Loop through fields and add to message body
-	// Get list of fields
-	$query_fields = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' ORDER BY position ASC");
-	if($query_fields->numRows() > 0) {
-		while($field = $query_fields->fetchRow()) {
-			// Add to message body
-			if($field['type'] != '') {
-				if(!empty($_POST['field'.$field['field_id']])) {
-					if($field['type'] == 'heading') {
-					$email_body .= '
-					
-	'.$_POST['field'.$field['field_id']];
-					} elseif (!is_array($_POST['field'.$field['field_id']])) {
-					$email_body .= '
-					
-	'.$this->strip_slashes_dummy($field['title']).': '.$_POST['field'.$field['field_id']]."\n";
-					} else {
-						$email_body .= '
-					
-	'.$this->strip_slashes_dummy($field['title']).": \n";
-						foreach ($_POST['field'.$field['field_id']] as $k=>$v) {
-							$email_body .= '
-					
-	'.$v;
-						}
-					}
-				} elseif($field['required'] == 1) {
-				$required[] = $this->strip_slashes_dummy($field['title']);
-				}
-			}
-		}
-	}
-	
-	// Addslashes to email body - proposed by Icheb in topic=1170.0
-	// $email_body = $this->add_slashes($email_body);
-	
-	// Check if the user forgot to enter values into all the required fields
-	if($required != array()) {
-		if(!isset($MESSAGE['MOD_FORM']['REQUIRED_FIELDS'])) {
-			echo 'You must enter details for the following fields';
-		} else {
-			echo $MESSAGE['MOD_FORM']['REQUIRED_FIELDS'];
-		}
-		echo ':<br /><ul>';
-		foreach($required AS $field_title) {
-			echo '<li>'.$field_title;
-		}
-		echo '</ul><a href="javascript: history.go(-1);">'.$TEXT['BACK'].'</a>';
-		
-	} else {
-		
-		// Check how many times form has been submitted in last hour
-		$query_submissions = $database->query("SELECT submission_id FROM ".TABLE_PREFIX."mod_form_submissions WHERE submitted_when >= '3600'");
-		if($query_submissions->numRows() > $max_submissions) {
-			// Too many submissions so far this hour
-			echo $MESSAGE['MOD_FORM']['EXCESS_SUBMISSIONS'];
-			$success = false;
-		} else {
-			// Now send the email
-			if($email_to != '') {
-				if($email_from != '') {
-					if(mail($email_to,$email_subject,str_replace('\n', '', $email_body),"From: ".$email_from)) { $success = true; }
-				} else {
-					if(mail($email_to,$email_subject,str_replace('\n', '', $email_body))) { $success = true; }
-				}
-			}				
-			// Write submission to database
-			if(isset($admin) AND $admin->get_user_id() > 0) {
-				$admin->get_user_id();
-			} else {
-				$submitted_by = 0;
-			}
-			$email_body = $this->add_slashes($email_body);
-			$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_submissions (page_id,section_id,submitted_when,submitted_by,body) VALUES ('".PAGE_ID."','$section_id','".mktime()."','$submitted_by','$email_body')");
-			// Make sure submissions table isn't too full
-			$query_submissions = $database->query("SELECT submission_id FROM ".TABLE_PREFIX."mod_form_submissions ORDER BY submitted_when");
-			$num_submissions = $query_submissions->numRows();
-			if($num_submissions > $stored_submissions) {
-				// Remove excess submission
-				$num_to_remove = $num_submissions-$stored_submissions;
-				while($submission = $query_submissions->fetchRow()) {
-					if($num_to_remove > 0) {
-						$submission_id = $submission['submission_id'];
-						$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
-						$num_to_remove = $num_to_remove-1;
-					}
-				}
-			}
-			if(!$database->is_error()) {
-				$success = true;
-			}
-		}
-		
-		// Now check if the email was sent successfully
-		if(isset($success) AND $success == true) {
-			echo $success_message;
-		} else {
-			echo $TEXT['ERROR'];
-		}
-	
-	}
-	
-}
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/view.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/view_submission.php
===================================================================
--- trunk/wb/modules/form/view_submission.php	(revision 80)
+++ trunk/wb/modules/form/view_submission.php	(nonexistent)
@@ -1,92 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$submission_id = $_GET['submission_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Get submission details
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
-$submission = $query_content->fetchRow();
-
-// Get the user details of whoever did this submission
-$query_user = "SELECT username,display_name FROM ".TABLE_PREFIX."users WHERE user_id = '".$submission['submitted_by']."'";
-$get_user = $database->query($query_user);
-if($get_user->numRows() != 0) {
-	$user = $get_user->fetchRow();
-} else {
-	$user['display_name'] = 'Unknown';
-	$user['username'] = 'unknown';
-}
-
-?>
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td><?php echo $TEXT['SUBMISSION_ID']; ?>:</td>
-	<td><?php echo $submission['submission_id']; ?></td>
-</tr>
-<tr>
-	<td><?php echo $TEXT['SUBMITTED']; ?>:</td>
-	<td><?php echo gmdate(TIME_FORMAT.', '.DATE_FORMAT, $submission['submitted_when']+TIMEZONE); ?></td>
-</td>
-<tr>
-	<td><?php echo $TEXT['USER']; ?>:</td>
-	<td><?php echo $user['display_name'].' ('.$user['username'].')'; ?></td>
-</tr>
-<tr>
-	<td colspan="2">
-		<hr />
-	</td>
-</tr>
-<tr>
-	<td colspan="2">
-		<?php echo $admin->strip_slashes_dummy(str_replace('\n', '<br />', $submission['body'])); ?>
-	</td>
-</tr>
-</table>
-
-<br />
-
-<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;" />
-<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; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission_id; ?>');" style="width: 150px; margin-top: 5px;" />
-<?php
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/view_submission.php
___________________________________________________________________
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/modify.php
===================================================================
--- trunk/wb/modules/form/modify.php	(revision 80)
+++ trunk/wb/modules/form/modify.php	(nonexistent)
@@ -1,191 +0,0 @@
-<?php
-
-// $Id: modify.php,v 1.5 2005/03/28 11:58:04 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-// Must include code to stop this file being access directly
-if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
-
-?>
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td align="left" width="33%">
-		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['FIELD']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/add_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
-	</td>
-	<td align="right" width="33%">
-		<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/modify_settings.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
-	</td>
-</tr>
-</table>
-
-<br />
-
-<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['FIELD']; ?></h2>
-<?php
-
-// Loop through existing fields
-$query_fields = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_form_fields` WHERE section_id = '$section_id' ORDER BY position ASC");
-if($query_fields->numRows() > 0) {
-	$num_fields = $query_fields->numRows();
-	$row = 'a';
-	?>
-	<table cellpadding="2" cellspacing="0" border="0" width="100%">
-	<?php
-	while($field = $query_fields->fetchRow()) {
-		?>
-		<tr class="row_<?php echo $row; ?>" height="20">
-			<td width="20" style="padding-left: 5px;">
-				<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="^" />
-				</a>
-			</td>		
-			<td>
-				<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>">
-					<?php echo $field['title']; ?>
-				</a>
-			</td>
-			<td width="175">
-				<?php
-				echo $TEXT['TYPE'].':';
-				if($field['type'] == 'textfield') {
-					echo $TEXT['SHORT_TEXT'];
-				} elseif($field['type'] == 'textarea') {
-					echo $TEXT['LONG_TEXT'];
-				} elseif($field['type'] == 'heading') {
-					echo $TEXT['HEADING'];
-				} elseif($field['type'] == 'select') {
-					echo $TEXT['SELECT_BOX'];
-				} elseif($field['type'] == 'checkbox') {
-					echo $TEXT['CHECKBOX_GROUP'];
-				} elseif($field['type'] == 'radio') {
-					echo $TEXT['RADIO_BUTTON_GROUP'];
-				} elseif($field['type'] == 'email') {
-					echo $TEXT['EMAIL_ADDRESS'];
-				}
-				?>
-			</td>
-			<td width="95">		-			<?php 
-			if ($field['type'] != 'group_begin') {
-				echo $TEXT['REQUIRED'].': '; if($field['required'] == 1) { echo $TEXT['YES']; } else { echo $TEXT['NO']; }
-			}
-			?>
-			</td>
-			<td width="110">
-			<?php
-			if ($field['type'] == 'select') {
-				$field['extra'] = explode(',',$field['extra']);
-				echo $TEXT['MULTISELECT'].': '; if($field['extra'][1] == 'multiple') { echo $TEXT['YES']; } else { echo $TEXT['NO']; }
-			}
-			?>
-			</td>
-			<td width="20">
-			<?php if($field['position'] != 1) { ?>
-				<a href="<?php echo WB_URL; ?>/modules/form/move_up.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/up_16.png" border="0" alt="^" />
-				</a>
-			<?php } ?>
-			</td>
-			<td width="20">
-			<?php if($field['position'] != $num_fields) { ?>
-				<a href="<?php echo WB_URL; ?>/modules/form/move_down.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/down_16.png" border="0" alt="v" />
-				</a>
-			<?php } ?>
-			</td>
-			<td width="20">
-				<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; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
-				</a>
-			</td>
-		</tr>
-		<?php
-		// Alternate row color
-		if($row == 'a') {
-			$row = 'b';
-		} else {
-			$row = 'a';
-		}
-	}
-	?>
-	</table>
-	<?php
-} else {
-	echo $TEXT['NONE_FOUND'];
-}
-
-?>
-
-<br /><br />
-
-<h2><?php echo $TEXT['SUBMISSIONS']; ?></h2>
-
-<?php
-
-// Query submissions table
-$query_submissions = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_form_submissions` WHERE section_id = '$section_id' ORDER BY submitted_when ASC");
-if($query_submissions->numRows() > 0) {
-	?>
-	<table cellpadding="2" cellspacing="0" border="0" width="100%">
-	<?php
-	// List submissions
-	$row = 'a';
-	while($submission = $query_submissions->fetchRow()) {
-		?>
-		<tr class="row_<?php echo $row; ?>" height="20">
-			<td width="20" style="padding-left: 5px;">
-				<a href="<?php echo WB_URL; ?>/modules/form/view_submission.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/folder_16.png" alt="<?php echo $TEXT['OPEN']; ?>" border="0" />
-				</a>
-			</td>
-			<td width="237"><?php echo $TEXT['SUBMISSION_ID'].': '.$submission['submission_id']; ?></td>
-			<td><?php echo $TEXT['SUBMITTED'].': '.gmdate(TIME_FORMAT.', '.DATE_FORMAT, $submission['submitted_when']+TIMEZONE); ?></td>
-			<td width="20">
-				<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; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
-				</a>
-			</td>
-		</tr>
-		<?php
-		// Alternate row color
-		if($row == 'a') {
-			$row = 'b';
-		} else {
-			$row = 'a';
-		}
-	}
-	?>
-	</table>
-	<?php
-} else {
-	echo $TEXT['NONE_FOUND'];
-}
-
-?>
-
-<br />
\ No newline at end of file

Property changes on: trunk/wb/modules/form/modify.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/move_down.php
===================================================================
--- trunk/wb/modules/form/move_down.php	(revision 80)
+++ trunk/wb/modules/form/move_down.php	(nonexistent)
@@ -1,57 +0,0 @@
-<?php
-
-// $Id: move_down.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
-	header("Location: index.php");
-} else {
-	$field_id = $_GET['field_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-
-// Create new order object an reorder
-$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
-if($order->move_down($field_id)) {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/move_down.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/modify_field.php
===================================================================
--- trunk/wb/modules/form/modify_field.php	(revision 80)
+++ trunk/wb/modules/form/modify_field.php	(nonexistent)
@@ -1,218 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$field_id = $_GET['field_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Get header and footer
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'");
-$form = $query_content->fetchRow();
-$type = $form['type'];
-if($type == '') {
-	$type = 'none';
-}
-
-// Set raw html <'s and >'s to be replaced by friendly html code
-$raw = array('<', '>');
-$friendly = array('&lt;', '&gt;');
-?>
-
-<form name="modify" action="<?php echo WB_URL; ?>/modules/form/save_field.php" method="post" style="margin: 0;">
-
-<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
-<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
-<input type="hidden" name="field_id" value="<?php echo $field_id; ?>">
-
-<table cellpadding="4" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
-	<td>
-		<input type="text" name="title" value="<?php echo htmlspecialchars($admin->strip_slashes_dummy($form['title'])); ?>" style="width: 100%;" maxlength="255" />
-	</td>
-</tr>
-<tr>
-	<td><?php echo $TEXT['TYPE']; ?>:</td>
-	<td>
-		<select name="type" style="width: 100%;">
-			<option value=""><?php echo $TEXT['PLEASE_SELECT']; ?>...</option>
-			<option value="heading"<?php if($type == 'heading') { echo ' selected'; } ?>><?php echo $TEXT['HEADING']; ?></option>
-			<option value="textfield"<?php if($type == 'textfield') { echo ' selected'; } ?>><?php echo $TEXT['SHORT'].' '.$TEXT['TEXT']; ?> (Textfield)</option>
-			<option value="textarea"<?php if($type == 'textarea') { echo ' selected'; } ?>><?php echo $TEXT['LONG'].' '.$TEXT['TEXT']; ?> (Textarea)</option>
-			<option value="select"<?php if($type == 'select') { echo ' selected'; } ?>><?php echo $TEXT['SELECT_BOX']; ?></option>
-			<option value="checkbox"<?php if($type == 'checkbox') { echo ' selected'; } ?>><?php echo $TEXT['CHECKBOX_GROUP']; ?></option>
-			<option value="radio"<?php if($type == 'radio') { echo ' selected'; } ?>><?php echo $TEXT['RADIO_BUTTON_GROUP']; ?></option>
-			<option value="email"<?php if($type == 'email') { echo ' selected'; } ?>><?php echo $TEXT['EMAIL_ADDRESS']; ?></option>
-		</select>
-	</td>
-</tr>
-<?php if($type != 'none' AND $type != 'email') { ?>
-	<?php if($type == 'heading') { ?>
-	<tr>
-		<td valign="top"><?php echo $TEXT['TEMPLATE']; ?>:</td>
-		<td>
-		<textarea name="template" style="width: 100%; height: 20px;"><?php echo htmlspecialchars($admin->strip_slashes_dummy($form['extra'])); ?></textarea>
-		</td>
-	</tr>
-	<?php } elseif($type == 'textfield') { ?>
-	<tr>
-		<td><?php echo $TEXT['LENGTH']; ?>:</td>
-		<td>
-			<input type="text" name="length" value="<?php echo $form['extra']; ?>" style="width: 100%;" maxlength="3" />
-		</td>
-	</tr>
-	<tr>
-		<td><?php echo $TEXT['DEFAULT_TEXT']; ?>:</td>
-		<td>
-			<input type="text" name="value" value="<?php echo $form['value']; ?>" style="width: 100%;" />
-		</td>
-	</tr>
-	<?php } elseif($type == 'textarea') { ?>
-	<tr>
-		<td valign="top"><?php echo $TEXT['DEFAULT_TEXT']; ?>:</td>
-		<td>
-			<textarea name="value" style="width: 100%; height: 100px;"><?php echo $form['value']; ?></textarea>
-		</td>
-	</tr>
-	<?php } elseif($type == 'select' OR $type = 'radio' OR $type = 'checkbox') { ?>
-	<tr>
-		<td valign="top"><?php echo 'List'; ?>:</td>
-		<td>
-			<?php
-			$option_count = 0;
-			$list = explode(',', $form['value']);
-			foreach($list AS $option_value) {
-				$option_count = $option_count+1;
-				?>
-				<table cellpadding="3" cellspacing="0" width="100%" border="0">
-				<tr>
-					<td width="70"><?php echo $TEXT['OPTION'].' '.$option_count; ?>:</td>
-					<td>
-						<input type="text" name="value<?php echo $option_count; ?>" value="<?php echo $option_value; ?>" style="width: 250px;" />
-					</td>
-				</tr>
-				</table>
-				<?php
-			}
-			for($i = 0; $i < 2; $i++) {
-				$option_count = $option_count+1;
-				?>
-				<table cellpadding="3" cellspacing="0" width="100%" border="0">
-				<tr>
-					<td width="70"><?php echo $TEXT['OPTION'].' '.$option_count; ?>:</td>
-					<td>
-						<input type="text" name="value<?php echo $option_count; ?>" value="" style="width: 250px;" />
-					</td>
-				</tr>
-				</table>
-				<?php
-			}
-			?>
-			<input type="hidden" name="list_count" value="<?php echo $option_count; ?>" />
-		</td>
-	</tr>
-	<?php } ?>
-	<?php if($type == 'select') { ?>
-	<tr>
-		<td><?php echo $TEXT['SIZE']; ?>:</td>
-		<td>
-			<?php $form['extra'] = explode(',',$form['extra']); ?>
-			<input type="text" name="size" value="<?php echo trim($form['extra'][0]); ?>" style="width: 100%;" maxlength="3" />
-		</td>
-	</tr>
-	<tr>
-		<td><?php echo $TEXT['ALLOW_MULTIPLE_SELECTIONS']; ?>:</td>
-		<td>
-			<input type="radio" name="multiselect" id="multiselect_true" value="multiple" <?php if($form['extra'][1] == 'multiple') { echo ' checked'; } ?> />
-			<a href="#" onclick="javascript: document.getElementById('multiselect_true').checked = true;">
-			<?php echo $TEXT['YES']; ?>
-			</a>
-			&nbsp;
-			<input type="radio" name="multiselect" id="multiselect_false" value="" <?php if($form['extra'][1] == '') { echo ' checked'; } ?> />
-			<a href="#" onclick="javascript: document.getElementById('multiselect_false').checked = true;">
-			<?php echo $TEXT['NO']; ?>
-			</a>
-		</td>
-	</tr>
-	<?php } elseif($type == 'checkbox' OR $type == 'radio') { ?>
-	<tr>
-		<td valign="top"><?php echo $TEXT['SEPERATOR']; ?>:</td>
-		<td>
-			<input type="text" name="seperator" value="<?php echo $form['extra']; ?>" style="width: 100%;" />
-		</td>
-	</tr>
-	<?php } ?>
-<?php } ?>
-<?php if($type != 'heading' AND $type != 'none') { ?>
-<tr>
-	<td><?php echo $TEXT['REQUIRED']; ?>:</td>
-	<td>
-		<input type="radio" name="required" id="required_true" value="1" <?php if($form['required'] == 1) { echo ' checked'; } ?> />
-		<a href="#" onclick="javascript: document.getElementById('required_true').checked = true;">
-		<?php echo $TEXT['YES']; ?>
-		</a>
-		&nbsp;
-		<input type="radio" name="required" id="required_false" value="0" <?php if($form['required'] == 0) { echo ' checked'; } ?> />
-		<a href="#" onclick="javascript: document.getElementById('required_false').checked = true;">
-		<?php echo $TEXT['NO']; ?>
-		</a>
-	</td>
-</tr>
-<?php } ?>
-</table>
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="90">&nbsp;
-		
-	</td>
-	<td align="left">
-		<input name="save" type="submit" value="<?php echo $TEXT['SAVE'].' '.$TEXT['FIELD']; ?>" style="width: 200px; margin-top: 5px;"></form>
-	</td>
-	<td align="right">
-		<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: 100px; margin-top: 5px;" />
-	</td>
-</tr>
-</table>
-
-<?php
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/modify_field.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/add_field.php
===================================================================
--- trunk/wb/modules/form/add_field.php	(revision 80)
+++ trunk/wb/modules/form/add_field.php	(nonexistent)
@@ -1,58 +0,0 @@
-<?php
-
-// $Id: add_field.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-require('../../config.php');
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-// Get new order
-$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
-$position = $order->get_new($section_id);
-
-// Insert new row into database
-$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (section_id,page_id,position,required) VALUES ('$section_id','$page_id','$position','0')");
-
-// Get the id
-$field_id = $database->get_one("SELECT LAST_INSERT_ID()");
-
-// Say that a new record has been added, then redirect to modify page
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/add_field.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/add.php
===================================================================
--- trunk/wb/modules/form/add.php	(revision 80)
+++ trunk/wb/modules/form/add.php	(nonexistent)
@@ -1,48 +0,0 @@
-<?php
-
-// $Id: add.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-// Insert an extra rows into the database
-$header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">';
-$field_loop = '<tr><td class=\"field_title\">{TITLE}{REQUIRED}:</td><td>{FIELD}</td></tr>';
-$footer = '<tr><td>&nbsp;</td>
-<td>
-<input type=\"submit\" name=\"submit\" value=\"Submit Form\" />
-</td>
-</tr>
-</table>';
-$email_to = $admin->get_email();
-$email_from = '';
-$email_subject = 'Results from form on website...';
-$success_message = 'Thank-you.';
-$max_submissions = 50;
-$stored_submissions = 100;
-$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id,header,field_loop,footer,email_to,email_from,email_subject,success_message,max_submissions,stored_submissions) VALUES ('$page_id','$section_id','$header','$field_loop','$footer','$email_to','$email_from','$email_subject','$success_message','$max_submissions','$stored_submissions')");
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/add.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/index.php
===================================================================
--- trunk/wb/modules/form/index.php	(revision 80)
+++ trunk/wb/modules/form/index.php	(nonexistent)
@@ -1,33 +0,0 @@
-<?php
-
-// $Id: index.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-header('Location: ../index.php');
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/index.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/save_field.php
===================================================================
--- trunk/wb/modules/form/save_field.php	(revision 80)
+++ trunk/wb/modules/form/save_field.php	(nonexistent)
@@ -1,103 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_POST['field_id']) OR !is_numeric($_POST['field_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$field_id = $_POST['field_id'];
-	$field_id = $field_id;
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Validate all fields
-if($admin->get_post('title') == '' OR $admin->get_post('type') == '') {
-	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-} else {
-	$title = $admin->add_slashes($admin->get_post('title'));
-	$type = $admin->get_post('type');
-	$required = $admin->get_post('required');
-}
-
-// Update row
-$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET title = '$title', type = '$type', required = '$required' WHERE field_id = '$field_id'");
-
-// If field type has multiple options, get all values and implode them
-$list_count = $admin->get_post('list_count');
-if(is_numeric($list_count)) {
-	$values = array();
-	for($i = 1; $i <= $list_count; $i++) {
-		if($admin->get_post('value'.$i) != '') {
-			$values[] = $admin->get_post('value'.$i);
-		}
-	}
-	$value = implode(',', $values);
-}
-
-// Get extra fields for field-type-specific settings
-if($admin->get_post('type') == 'textfield') {
-	$length = $admin->get_post('length');
-	$value = $admin->get_post('value');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$length' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'textarea') {
-	$value = $admin->get_post('value');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'heading') {
-	$extra = $admin->get_post('template');
-	if(trim($extra) == '') $extra = '<tr><td class="field_heading" colspan="2">{TITLE}{FIELD}</td></tr>';
-	$extra = $admin->add_slashes($extra);
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '', extra = '$extra' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'select') {
-	$extra = $admin->get_post('size').','.$admin->get_post('multiselect');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'checkbox') {
-	$extra = $admin->get_post('seperator');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'radio') {
-	$extra = $admin->get_post('seperator');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
-}
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/save_field.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/delete.php
===================================================================
--- trunk/wb/modules/form/delete.php	(revision 80)
+++ trunk/wb/modules/form/delete.php	(nonexistent)
@@ -1,35 +0,0 @@
-<?php
-
-// $Id: delete.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-// Delete page from mod_wysiwyg
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE page_id = '$page_id'");
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_settings WHERE page_id = '$page_id'");
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/delete.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/info.php
===================================================================
--- trunk/wb/modules/form/info.php	(revision 80)
+++ trunk/wb/modules/form/info.php	(nonexistent)
@@ -1,40 +0,0 @@
-<?php
-
-// $Id: info.php,v 1.4 2005/04/08 09:58:26 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-$module_directory = 'form';
-$module_name = 'Form';
-$module_type = 'page';
-$module_version = '2.5';
-$module_designed_for = '2.x';
-$module_author = 'Ryan Djurovich & Rudolph Lartey';
-$module_description = 'This module allows you to create customised online forms, such as a feedback form. '.
-'Thank-you to Rudolph Lartey who help enhance this module, providing code for extra field types, etc.';
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/info.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/form/delete_field.php
===================================================================
--- trunk/wb/modules/form/delete_field.php	(revision 80)
+++ trunk/wb/modules/form/delete_field.php	(nonexistent)
@@ -1,57 +0,0 @@
-<?php
-
-// $Id: delete_field.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
-for his contributions to this module - adding extra field types
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$field_id = $_GET['field_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Delete row
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/form/delete_field.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: addons/modules/form/save_field.php
===================================================================
--- addons/modules/form/save_field.php	(nonexistent)
+++ addons/modules/form/save_field.php	(revision 81)
@@ -0,0 +1,103 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_POST['field_id']) OR !is_numeric($_POST['field_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$field_id = $_POST['field_id'];
+	$field_id = $field_id;
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Validate all fields
+if($admin->get_post('title') == '' OR $admin->get_post('type') == '') {
+	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+} else {
+	$title = $admin->add_slashes($admin->get_post('title'));
+	$type = $admin->get_post('type');
+	$required = $admin->get_post('required');
+}
+
+// Update row
+$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET title = '$title', type = '$type', required = '$required' WHERE field_id = '$field_id'");
+
+// If field type has multiple options, get all values and implode them
+$list_count = $admin->get_post('list_count');
+if(is_numeric($list_count)) {
+	$values = array();
+	for($i = 1; $i <= $list_count; $i++) {
+		if($admin->get_post('value'.$i) != '') {
+			$values[] = $admin->get_post('value'.$i);
+		}
+	}
+	$value = implode(',', $values);
+}
+
+// Get extra fields for field-type-specific settings
+if($admin->get_post('type') == 'textfield') {
+	$length = $admin->get_post('length');
+	$value = $admin->get_post('value');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$length' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'textarea') {
+	$value = $admin->get_post('value');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'heading') {
+	$extra = $admin->get_post('template');
+	if(trim($extra) == '') $extra = '<tr><td class="field_heading" colspan="2">{TITLE}{FIELD}</td></tr>';
+	$extra = $admin->add_slashes($extra);
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '', extra = '$extra' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'select') {
+	$extra = $admin->get_post('size').','.$admin->get_post('multiselect');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'checkbox') {
+	$extra = $admin->get_post('seperator');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'radio') {
+	$extra = $admin->get_post('seperator');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
+}
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/save_field.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/modify_field.php
===================================================================
--- addons/modules/form/modify_field.php	(nonexistent)
+++ addons/modules/form/modify_field.php	(revision 81)
@@ -0,0 +1,218 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$field_id = $_GET['field_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Get header and footer
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'");
+$form = $query_content->fetchRow();
+$type = $form['type'];
+if($type == '') {
+	$type = 'none';
+}
+
+// Set raw html <'s and >'s to be replaced by friendly html code
+$raw = array('<', '>');
+$friendly = array('&lt;', '&gt;');
+?>
+
+<form name="modify" action="<?php echo WB_URL; ?>/modules/form/save_field.php" method="post" style="margin: 0;">
+
+<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
+<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
+<input type="hidden" name="field_id" value="<?php echo $field_id; ?>">
+
+<table cellpadding="4" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
+	<td>
+		<input type="text" name="title" value="<?php echo htmlspecialchars($admin->strip_slashes_dummy($form['title'])); ?>" style="width: 100%;" maxlength="255" />
+	</td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['TYPE']; ?>:</td>
+	<td>
+		<select name="type" style="width: 100%;">
+			<option value=""><?php echo $TEXT['PLEASE_SELECT']; ?>...</option>
+			<option value="heading"<?php if($type == 'heading') { echo ' selected'; } ?>><?php echo $TEXT['HEADING']; ?></option>
+			<option value="textfield"<?php if($type == 'textfield') { echo ' selected'; } ?>><?php echo $TEXT['SHORT'].' '.$TEXT['TEXT']; ?> (Textfield)</option>
+			<option value="textarea"<?php if($type == 'textarea') { echo ' selected'; } ?>><?php echo $TEXT['LONG'].' '.$TEXT['TEXT']; ?> (Textarea)</option>
+			<option value="select"<?php if($type == 'select') { echo ' selected'; } ?>><?php echo $TEXT['SELECT_BOX']; ?></option>
+			<option value="checkbox"<?php if($type == 'checkbox') { echo ' selected'; } ?>><?php echo $TEXT['CHECKBOX_GROUP']; ?></option>
+			<option value="radio"<?php if($type == 'radio') { echo ' selected'; } ?>><?php echo $TEXT['RADIO_BUTTON_GROUP']; ?></option>
+			<option value="email"<?php if($type == 'email') { echo ' selected'; } ?>><?php echo $TEXT['EMAIL_ADDRESS']; ?></option>
+		</select>
+	</td>
+</tr>
+<?php if($type != 'none' AND $type != 'email') { ?>
+	<?php if($type == 'heading') { ?>
+	<tr>
+		<td valign="top"><?php echo $TEXT['TEMPLATE']; ?>:</td>
+		<td>
+		<textarea name="template" style="width: 100%; height: 20px;"><?php echo htmlspecialchars($admin->strip_slashes_dummy($form['extra'])); ?></textarea>
+		</td>
+	</tr>
+	<?php } elseif($type == 'textfield') { ?>
+	<tr>
+		<td><?php echo $TEXT['LENGTH']; ?>:</td>
+		<td>
+			<input type="text" name="length" value="<?php echo $form['extra']; ?>" style="width: 100%;" maxlength="3" />
+		</td>
+	</tr>
+	<tr>
+		<td><?php echo $TEXT['DEFAULT_TEXT']; ?>:</td>
+		<td>
+			<input type="text" name="value" value="<?php echo $form['value']; ?>" style="width: 100%;" />
+		</td>
+	</tr>
+	<?php } elseif($type == 'textarea') { ?>
+	<tr>
+		<td valign="top"><?php echo $TEXT['DEFAULT_TEXT']; ?>:</td>
+		<td>
+			<textarea name="value" style="width: 100%; height: 100px;"><?php echo $form['value']; ?></textarea>
+		</td>
+	</tr>
+	<?php } elseif($type == 'select' OR $type = 'radio' OR $type = 'checkbox') { ?>
+	<tr>
+		<td valign="top"><?php echo 'List'; ?>:</td>
+		<td>
+			<?php
+			$option_count = 0;
+			$list = explode(',', $form['value']);
+			foreach($list AS $option_value) {
+				$option_count = $option_count+1;
+				?>
+				<table cellpadding="3" cellspacing="0" width="100%" border="0">
+				<tr>
+					<td width="70"><?php echo $TEXT['OPTION'].' '.$option_count; ?>:</td>
+					<td>
+						<input type="text" name="value<?php echo $option_count; ?>" value="<?php echo $option_value; ?>" style="width: 250px;" />
+					</td>
+				</tr>
+				</table>
+				<?php
+			}
+			for($i = 0; $i < 2; $i++) {
+				$option_count = $option_count+1;
+				?>
+				<table cellpadding="3" cellspacing="0" width="100%" border="0">
+				<tr>
+					<td width="70"><?php echo $TEXT['OPTION'].' '.$option_count; ?>:</td>
+					<td>
+						<input type="text" name="value<?php echo $option_count; ?>" value="" style="width: 250px;" />
+					</td>
+				</tr>
+				</table>
+				<?php
+			}
+			?>
+			<input type="hidden" name="list_count" value="<?php echo $option_count; ?>" />
+		</td>
+	</tr>
+	<?php } ?>
+	<?php if($type == 'select') { ?>
+	<tr>
+		<td><?php echo $TEXT['SIZE']; ?>:</td>
+		<td>
+			<?php $form['extra'] = explode(',',$form['extra']); ?>
+			<input type="text" name="size" value="<?php echo trim($form['extra'][0]); ?>" style="width: 100%;" maxlength="3" />
+		</td>
+	</tr>
+	<tr>
+		<td><?php echo $TEXT['ALLOW_MULTIPLE_SELECTIONS']; ?>:</td>
+		<td>
+			<input type="radio" name="multiselect" id="multiselect_true" value="multiple" <?php if($form['extra'][1] == 'multiple') { echo ' checked'; } ?> />
+			<a href="#" onclick="javascript: document.getElementById('multiselect_true').checked = true;">
+			<?php echo $TEXT['YES']; ?>
+			</a>
+			&nbsp;
+			<input type="radio" name="multiselect" id="multiselect_false" value="" <?php if($form['extra'][1] == '') { echo ' checked'; } ?> />
+			<a href="#" onclick="javascript: document.getElementById('multiselect_false').checked = true;">
+			<?php echo $TEXT['NO']; ?>
+			</a>
+		</td>
+	</tr>
+	<?php } elseif($type == 'checkbox' OR $type == 'radio') { ?>
+	<tr>
+		<td valign="top"><?php echo $TEXT['SEPERATOR']; ?>:</td>
+		<td>
+			<input type="text" name="seperator" value="<?php echo $form['extra']; ?>" style="width: 100%;" />
+		</td>
+	</tr>
+	<?php } ?>
+<?php } ?>
+<?php if($type != 'heading' AND $type != 'none') { ?>
+<tr>
+	<td><?php echo $TEXT['REQUIRED']; ?>:</td>
+	<td>
+		<input type="radio" name="required" id="required_true" value="1" <?php if($form['required'] == 1) { echo ' checked'; } ?> />
+		<a href="#" onclick="javascript: document.getElementById('required_true').checked = true;">
+		<?php echo $TEXT['YES']; ?>
+		</a>
+		&nbsp;
+		<input type="radio" name="required" id="required_false" value="0" <?php if($form['required'] == 0) { echo ' checked'; } ?> />
+		<a href="#" onclick="javascript: document.getElementById('required_false').checked = true;">
+		<?php echo $TEXT['NO']; ?>
+		</a>
+	</td>
+</tr>
+<?php } ?>
+</table>
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="90">&nbsp;
+		
+	</td>
+	<td align="left">
+		<input name="save" type="submit" value="<?php echo $TEXT['SAVE'].' '.$TEXT['FIELD']; ?>" style="width: 200px; margin-top: 5px;"></form>
+	</td>
+	<td align="right">
+		<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: 100px; margin-top: 5px;" />
+	</td>
+</tr>
+</table>
+
+<?php
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/modify_field.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/modify_settings.php
===================================================================
--- addons/modules/form/modify_settings.php	(nonexistent)
+++ addons/modules/form/modify_settings.php	(revision 81)
@@ -0,0 +1,147 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+require('../../config.php');
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Get header and footer
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
+$setting = $query_content->fetchRow();
+
+// Set raw html <'s and >'s to be replace by friendly html code
+$raw = array('<', '>');
+$friendly = array('&lt;', '&gt;');
+
+?>
+
+<style type="text/css">
+.setting_name {
+	vertical-align: top;
+}
+</style>
+
+<form name="edit" action="<?php echo WB_URL; ?>/modules/form/save_settings.php" method="post" style="margin: 0;">
+
+<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
+<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
+
+<table cellpadding="2" cellspacing="0" border="0" width="100%">
+<tr>
+	<td class="setting_name" width="220"><?php echo $TEXT['HEADER']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->strip_slashes_dummy($setting['header']); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['FIELD'].' '.$TEXT['LOOP']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="field_loop" style="width: 100%; height: 60px;"><?php echo $admin->strip_slashes_dummy($setting['field_loop']); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['footer'])); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="email_to" style="width: 100%; height: 30px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['email_to'])); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['FROM']; ?>:</td>
+	<td class="setting_name">
+		<select name="email_from_field" style="width: 100%;">
+			<option value="" onclick="javascript: document.getElementById('email_from').style.display = 'block';"><?php echo $TEXT['CUSTOM']; ?>:</option>
+			<?php
+			$email_from_value = str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['email_from']));
+			$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields ORDER BY position ASC");
+			if($query_email_fields->numRows() > 0) {
+				while($field = $query_email_fields->fetchRow()) {
+					?>
+					<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';">
+						<?php echo $TEXT['FIELD'].': '.$field['title']; ?>
+					</option>
+					<?php
+				}
+			}
+			?>
+		</select>
+		<input type="text" name="email_from" id="email_from" style="width: 100%; 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; } ?>" />
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td>
+	<td class="setting_name">
+		<input type="text" name="email_subject" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['email_subject'])); ?>" />
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['SUCCESS'].' '.$TEXT['MESSAGE']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="success_message" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['success_message'])); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['MAX_SUBMISSIONS_PER_HOUR']; ?>:</td>
+	<td class="setting_name">
+		<input type="text" name="max_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['max_submissions'])); ?>" />
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['SUBMISSIONS_STORED_IN_DATABASE']; ?>:</td>
+	<td class="setting_name">
+		<input type="text" name="stored_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($setting['stored_submissions'])); ?>" />
+	</td>
+</tr>
+</table>
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="225">&nbsp;</td>
+	<td align="left">
+		<input name="save" type="submit" value="<?php echo $TEXT['SAVE'].' '.$TEXT['SETTINGS']; ?>" style="width: 200px; margin-top: 5px;"></form>
+	</td>
+	<td align="right">
+		<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;" />
+	</td>
+</tr>
+</table>
+
+
+<?php
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/modify_settings.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/view.php
===================================================================
--- addons/modules/form/view.php	(nonexistent)
+++ addons/modules/form/view.php	(revision 81)
@@ -0,0 +1,323 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+// Must include code to stop this file being access directly
+if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+
+// Function for generating an optionsfor a select field
+function make_option(&$n) {
+	// start option group if it exists
+	if (substr($n,0,2) == '[=') {
+	 	$n = '<optgroup label="'.substr($n,2,strlen($n)).'">';
+	} elseif ($n == ']') {
+		$n = '</optgroup>';
+	} else {
+		$n = '<option value="'.$n.'">'.$n.'</option>';
+	}
+}
+
+// Function for generating a checkbox
+function make_checkbox(&$n, $idx, $params) {
+	$field_id = $params[0];
+	$seperator = $params[1];
+	//$n = '<input class="field_checkbox" type="checkbox" id="'.$n.'" name="field'.$field_id.'" value="'.$n.'">'.'<font class="checkbox_label" onclick="javascript: document.getElementById(\''.$n.'\').checked = !document.getElementById(\''.$n.'\').checked;">'.$n.'</font>'.$seperator;
+	$n = '<input class="field_checkbox" type="checkbox" id="'.$n.'" name="field'.$field_id.'['.$idx.']" value="'.$n.'">'.'<font class="checkbox_label" onclick="javascript: document.getElementById(\''.$n.'\').checked = !document.getElementById(\''.$n.'\').checked;">'.$n.'</font>'.$seperator;
+}
+
+// Function for generating a radio button
+function make_radio(&$n, $idx, $params) {
+	$field_id = $params[0];
+	$group = $params[1];
+	$seperator = $params[2];
+	$n = '<input class="field_radio" type="radio" id="'.$n.'" name="field'.$field_id.'" value="'.$n.'">'.'<font class="radio_label" onclick="javascript: document.getElementById(\''.$n.'\').checked = true;">'.$n.'</font>'.$seperator;
+}
+
+// Work-out if the form has been submitted or not
+if($_POST == array()) {
+
+?>
+<style type="text/css">
+.required {
+	color: #FF0000;
+}
+.field_title {
+	font-size: 12px;
+	width: 100px;
+	vertical-align: top;
+	text-align:right;
+}
+.textfield {
+	font-size: 12px;
+	width: 200px;
+}
+.textarea {
+	font-size: 12px;
+	width: 90%;
+	height: 100px;
+}
+.field_heading {
+	font-size: 12px;
+	font-weight: bold;
+	border-bottom-width: 2px;
+	border-bottom-style: solid;
+	border-bottom-color: #666666;
+	padding-top: 10px;
+	color: #666666;
+}
+.select {
+	font-size: 12px;
+}
+.checkbox_label {
+	font-size: 11px;
+	cursor: pointer;
+}
+.radio_label {
+	font-size: 11px;
+	cursor: pointer;
+}
+.email {
+	font-size: 12px;
+	width: 200px;
+}
+</style>
+<?php
+
+// Get settings
+$query_settings = $database->query("SELECT header,field_loop,footer FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
+if($query_settings->numRows() > 0) {
+	$fetch_settings = $query_settings->fetchRow();
+	$header = $this->strip_slashes_dummy($fetch_settings['header']);
+	$field_loop = $this->strip_slashes_dummy($fetch_settings['field_loop']);
+	$footer = $this->strip_slashes_dummy($fetch_settings['footer']);
+} else {
+	$header = '';
+	$field_loop = '';
+	$footer = '';
+}
+
+// Add form starter code
+?>
+<form name="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+<?php
+
+// Print header
+echo $header;
+
+// Get list of fields
+$query_fields = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' ORDER BY position ASC");
+if($query_fields->numRows() > 0) {
+	while($field = $query_fields->fetchRow()) {
+		// Set field values
+		$field_id = $field['field_id'];
+		$value = $this->strip_slashes_dummy($field['value']);
+		// Print field_loop after replacing vars with values
+		$vars = array('{TITLE}', '{REQUIRED}');
+		$values = array($field['title']);
+		if($field['required'] == 1) {
+			$values[] = '<font class="required">*</font>';
+		} else {
+			$values[] = '';
+		}
+		if($field['type'] == 'textfield') {
+			$vars[] = '{FIELD}';
+			$values[] = '<input type="text" name="field'.$field_id.'" id="field'.$field_id.'" maxlength="'.$field['extra'].'" value="'.$value.'" class="textfield" />';
+		} elseif($field['type'] == 'textarea') {
+			$vars[] = '{FIELD}';
+			$values[] = '<textarea name="field'.$field_id.'" id="field'.$field_id.'" class="textarea">'.$value.'</textarea>';
+		} elseif($field['type'] == 'select') {
+			$vars[] = '{FIELD}';
+			$options = explode(',', $value);
+			array_walk($options, 'make_option');
+			$field['extra'] = explode(',',$field['extra']); 
+			$values[] = '<select name="field'.$field_id.'[]" id="field'.$field_id.'" size="'.$field['extra'][0].'" '.$field['extra'][1].' class="select">'.implode($options).'</select>';
+		} elseif($field['type'] == 'heading') {
+			$vars[] = '{FIELD}';
+			$values[] = '<input type="hidden" name="field'.$field_id.'" id="field'.$field_id.'" value="===['.$field['title'].']===" />';
+			$tmp_field_loop = $field_loop;		// temporarily modify the field loop template
+			$field_loop = $field['extra'];
+		} elseif($field['type'] == 'checkbox') {
+			$vars[] = '{FIELD}';
+			$options = explode(',', $value);
+			array_walk($options, 'make_checkbox',array($field_id,$field['extra']));
+			$values[] = implode($options);
+		} elseif($field['type'] == 'radio') {
+			$vars[] = '{FIELD}';
+			$options = explode(',', $value);
+			array_walk($options, 'make_radio',array($field_id,$field['title'],$field['extra']));
+			$values[] = implode($options);
+		} elseif($field['type'] == 'email') {
+			$vars[] = '{FIELD}';
+			$values[] = '<input type="text" name="field'.$field_id.'" id="field'.$field_id.'" maxlength="'.$field['extra'].'" class="email" />';
+		}
+		if($field['type'] != '') {
+			echo str_replace($vars, $values, $field_loop);
+		}
+		if (isset($tmp_field_loop)) $field_loop = $tmp_field_loop;
+	}
+}
+
+// Print footer
+echo $footer;
+
+// Add form end code
+?>
+</form>
+<?php
+
+} else {
+	
+	// Submit form data
+	// First start message settings
+	$query_settings = $database->query("SELECT email_to,email_from,email_subject,success_message,max_submissions,stored_submissions FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
+	if($query_settings->numRows() > 0) {
+		$fetch_settings = $query_settings->fetchRow();
+		$email_to = $this->strip_slashes_dummy($fetch_settings['email_to']);
+		$email_from = $this->strip_slashes_dummy($fetch_settings['email_from']);
+		if(substr($email_from, 0, 5) == 'field') {
+			// Set the email from field to what the user entered in the specified field
+			$email_from = $this->add_slashes($_POST[$email_from]);
+		}
+		$email_subject = $this->strip_slashes_dummy($fetch_settings['email_subject']);
+		$success_message = $this->strip_slashes_dummy($fetch_settings['success_message']);
+		$max_submissions = $this->strip_slashes_dummy($fetch_settings['max_submissions']);
+		$stored_submissions = $this->strip_slashes_dummy($fetch_settings['stored_submissions']);
+	} else {
+		exit($TEXT['UNDER_CONSTRUCTION']);
+	}
+	$email_body = '';
+	
+	// Create blank "required" array
+	$required = array();
+	
+	// Loop through fields and add to message body
+	// Get list of fields
+	$query_fields = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' ORDER BY position ASC");
+	if($query_fields->numRows() > 0) {
+		while($field = $query_fields->fetchRow()) {
+			// Add to message body
+			if($field['type'] != '') {
+				if(!empty($_POST['field'.$field['field_id']])) {
+					if($field['type'] == 'heading') {
+					$email_body .= '
+					
+	'.$_POST['field'.$field['field_id']];
+					} elseif (!is_array($_POST['field'.$field['field_id']])) {
+					$email_body .= '
+					
+	'.$this->strip_slashes_dummy($field['title']).': '.$_POST['field'.$field['field_id']]."\n";
+					} else {
+						$email_body .= '
+					
+	'.$this->strip_slashes_dummy($field['title']).": \n";
+						foreach ($_POST['field'.$field['field_id']] as $k=>$v) {
+							$email_body .= '
+					
+	'.$v;
+						}
+					}
+				} elseif($field['required'] == 1) {
+				$required[] = $this->strip_slashes_dummy($field['title']);
+				}
+			}
+		}
+	}
+	
+	// Addslashes to email body - proposed by Icheb in topic=1170.0
+	// $email_body = $this->add_slashes($email_body);
+	
+	// Check if the user forgot to enter values into all the required fields
+	if($required != array()) {
+		if(!isset($MESSAGE['MOD_FORM']['REQUIRED_FIELDS'])) {
+			echo 'You must enter details for the following fields';
+		} else {
+			echo $MESSAGE['MOD_FORM']['REQUIRED_FIELDS'];
+		}
+		echo ':<br /><ul>';
+		foreach($required AS $field_title) {
+			echo '<li>'.$field_title;
+		}
+		echo '</ul><a href="javascript: history.go(-1);">'.$TEXT['BACK'].'</a>';
+		
+	} else {
+		
+		// Check how many times form has been submitted in last hour
+		$query_submissions = $database->query("SELECT submission_id FROM ".TABLE_PREFIX."mod_form_submissions WHERE submitted_when >= '3600'");
+		if($query_submissions->numRows() > $max_submissions) {
+			// Too many submissions so far this hour
+			echo $MESSAGE['MOD_FORM']['EXCESS_SUBMISSIONS'];
+			$success = false;
+		} else {
+			// Now send the email
+			if($email_to != '') {
+				if($email_from != '') {
+					if(mail($email_to,$email_subject,str_replace('\n', '', $email_body),"From: ".$email_from)) { $success = true; }
+				} else {
+					if(mail($email_to,$email_subject,str_replace('\n', '', $email_body))) { $success = true; }
+				}
+			}				
+			// Write submission to database
+			if(isset($admin) AND $admin->get_user_id() > 0) {
+				$admin->get_user_id();
+			} else {
+				$submitted_by = 0;
+			}
+			$email_body = $this->add_slashes($email_body);
+			$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_submissions (page_id,section_id,submitted_when,submitted_by,body) VALUES ('".PAGE_ID."','$section_id','".mktime()."','$submitted_by','$email_body')");
+			// Make sure submissions table isn't too full
+			$query_submissions = $database->query("SELECT submission_id FROM ".TABLE_PREFIX."mod_form_submissions ORDER BY submitted_when");
+			$num_submissions = $query_submissions->numRows();
+			if($num_submissions > $stored_submissions) {
+				// Remove excess submission
+				$num_to_remove = $num_submissions-$stored_submissions;
+				while($submission = $query_submissions->fetchRow()) {
+					if($num_to_remove > 0) {
+						$submission_id = $submission['submission_id'];
+						$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
+						$num_to_remove = $num_to_remove-1;
+					}
+				}
+			}
+			if(!$database->is_error()) {
+				$success = true;
+			}
+		}
+		
+		// Now check if the email was sent successfully
+		if(isset($success) AND $success == true) {
+			echo $success_message;
+		} else {
+			echo $TEXT['ERROR'];
+		}
+	
+	}
+	
+}
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/view.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/view_submission.php
===================================================================
--- addons/modules/form/view_submission.php	(nonexistent)
+++ addons/modules/form/view_submission.php	(revision 81)
@@ -0,0 +1,92 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$submission_id = $_GET['submission_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Get submission details
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
+$submission = $query_content->fetchRow();
+
+// Get the user details of whoever did this submission
+$query_user = "SELECT username,display_name FROM ".TABLE_PREFIX."users WHERE user_id = '".$submission['submitted_by']."'";
+$get_user = $database->query($query_user);
+if($get_user->numRows() != 0) {
+	$user = $get_user->fetchRow();
+} else {
+	$user['display_name'] = 'Unknown';
+	$user['username'] = 'unknown';
+}
+
+?>
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td><?php echo $TEXT['SUBMISSION_ID']; ?>:</td>
+	<td><?php echo $submission['submission_id']; ?></td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['SUBMITTED']; ?>:</td>
+	<td><?php echo gmdate(TIME_FORMAT.', '.DATE_FORMAT, $submission['submitted_when']+TIMEZONE); ?></td>
+</td>
+<tr>
+	<td><?php echo $TEXT['USER']; ?>:</td>
+	<td><?php echo $user['display_name'].' ('.$user['username'].')'; ?></td>
+</tr>
+<tr>
+	<td colspan="2">
+		<hr />
+	</td>
+</tr>
+<tr>
+	<td colspan="2">
+		<?php echo $admin->strip_slashes_dummy(str_replace('\n', '<br />', $submission['body'])); ?>
+	</td>
+</tr>
+</table>
+
+<br />
+
+<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;" />
+<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; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission_id; ?>');" style="width: 150px; margin-top: 5px;" />
+<?php
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/view_submission.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/save_settings.php
===================================================================
--- addons/modules/form/save_settings.php	(nonexistent)
+++ addons/modules/form/save_settings.php	(revision 81)
@@ -0,0 +1,79 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+require('../../config.php');
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// This code removes any <?php tags and adds slashes
+$friendly = array('&lt;', '&gt;', '?php');
+$raw = array('<', '>', '');
+$header = $admin->add_slashes($_POST['header']);
+$field_loop = $admin->add_slashes($_POST['field_loop']);
+$footer = $admin->add_slashes($_POST['footer']);
+$email_to = $admin->add_slashes($_POST['email_to']);
+if($_POST['email_from_field'] == '') {
+	$email_from = $admin->add_slashes($_POST['email_from']);
+} else {
+	$email_from = $admin->add_slashes($_POST['email_from_field']);
+}
+$email_subject = $admin->add_slashes($_POST['email_subject']);
+$success_message = $admin->add_slashes($_POST['success_message']);
+if(!is_numeric($_POST['max_submissions'])) {
+	$max_submissions = 50;
+} else {
+	$max_submissions = $_POST['max_submissions'];
+}
+if(!is_numeric($_POST['stored_submissions'])) {
+	$stored_submissions = 100;
+} else {
+	$stored_submissions = $_POST['stored_submissions'];
+}
+// Make sure max submissions is not smaller than stored submissions
+if($max_submissions < $stored_submissions) {
+	$max_submissions = $stored_submissions;
+}
+
+// Update settings
+$database->query("UPDATE ".TABLE_PREFIX."mod_form_settings SET header = '$header', field_loop = '$field_loop', footer = '$footer', email_to = '$email_to', email_from = '$email_from', email_subject = '$email_subject', success_message = '$success_message', max_submissions = '$max_submissions', stored_submissions = '$stored_submissions' WHERE section_id = '$section_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/save_settings.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/add_field.php
===================================================================
--- addons/modules/form/add_field.php	(nonexistent)
+++ addons/modules/form/add_field.php	(revision 81)
@@ -0,0 +1,58 @@
+<?php
+
+// $Id: add_field.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+require('../../config.php');
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+// Get new order
+$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
+$position = $order->get_new($section_id);
+
+// Insert new row into database
+$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (section_id,page_id,position,required) VALUES ('$section_id','$page_id','$position','0')");
+
+// Get the id
+$field_id = $database->get_one("SELECT LAST_INSERT_ID()");
+
+// Say that a new record has been added, then redirect to modify page
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/add_field.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/info.php
===================================================================
--- addons/modules/form/info.php	(nonexistent)
+++ addons/modules/form/info.php	(revision 81)
@@ -0,0 +1,40 @@
+<?php
+
+// $Id: info.php,v 1.4 2005/04/08 09:58:26 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+$module_directory = 'form';
+$module_name = 'Form';
+$module_type = 'page';
+$module_version = '2.5';
+$module_designed_for = '2.x';
+$module_author = 'Ryan Djurovich & Rudolph Lartey';
+$module_description = 'This module allows you to create customised online forms, such as a feedback form. '.
+'Thank-you to Rudolph Lartey who help enhance this module, providing code for extra field types, etc.';
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/info.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/move_down.php
===================================================================
--- addons/modules/form/move_down.php	(nonexistent)
+++ addons/modules/form/move_down.php	(revision 81)
@@ -0,0 +1,57 @@
+<?php
+
+// $Id: move_down.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
+	header("Location: index.php");
+} else {
+	$field_id = $_GET['field_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+
+// Create new order object an reorder
+$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
+if($order->move_down($field_id)) {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/move_down.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/delete.php
===================================================================
--- addons/modules/form/delete.php	(nonexistent)
+++ addons/modules/form/delete.php	(revision 81)
@@ -0,0 +1,35 @@
+<?php
+
+// $Id: delete.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+// Delete page from mod_wysiwyg
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE page_id = '$page_id'");
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_settings WHERE page_id = '$page_id'");
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/delete.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/delete_field.php
===================================================================
--- addons/modules/form/delete_field.php	(nonexistent)
+++ addons/modules/form/delete_field.php	(revision 81)
@@ -0,0 +1,57 @@
+<?php
+
+// $Id: delete_field.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$field_id = $_GET['field_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Delete row
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/delete_field.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/install.php
===================================================================
--- addons/modules/form/install.php	(nonexistent)
+++ addons/modules/form/install.php	(revision 81)
@@ -0,0 +1,103 @@
+<?php
+
+// $Id: install.php,v 1.6 2005/04/02 08:21:46 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+if(defined('WB_URL')) {
+		
+	// Create tables
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`");
+	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_fields` ( `field_id` INT NOT NULL AUTO_INCREMENT,'
+	                 . ' `section_id` INT NOT NULL ,'
+	                 . ' `page_id` INT NOT NULL ,'
+	                 . ' `position` INT NOT NULL ,'
+	                 . ' `title` VARCHAR(255) NOT NULL ,'
+	                 . ' `type` VARCHAR(255) NOT NULL ,'
+	                 . ' `required` INT NOT NULL ,'
+	                 . ' `value` TEXT NOT NULL ,'
+	                 . ' `extra` TEXT NOT NULL ,'
+	                 . ' PRIMARY KEY ( `field_id` ) )'
+	                 . ' ';
+	$database->query($mod_form);
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`");
+	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_settings` ('
+						  . ' `section_id` INT NOT NULL,'
+						  . ' `page_id` INT NOT NULL,'
+	                 . ' `header` TEXT NOT NULL ,'
+	                 . ' `field_loop` TEXT NOT NULL ,'
+	                 . ' `footer` TEXT NOT NULL ,'
+	                 . ' `email_to` TEXT NOT NULL ,'
+	                 . ' `email_from` VARCHAR(255) NOT NULL ,'
+	                 . ' `email_subject` VARCHAR(255) NOT NULL ,'
+	                 . ' `success_message` TEXT NOT NULL ,'
+						  . ' `stored_submissions` INT NOT NULL,'
+						  . ' `max_submissions` INT NOT NULL,'
+	                 . ' PRIMARY KEY ( `section_id` ) )'
+	                 . ' ';
+	$database->query($mod_form);
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`");
+	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,'
+						  . ' `section_id` INT NOT NULL,'
+						  . ' `page_id` INT NOT NULL,'
+						  . ' `submitted_when` INT NOT NULL,'
+						  . ' `submitted_by` INT NOT NULL,'
+	                 . ' `body` TEXT NOT NULL ,'
+	                 . ' PRIMARY KEY ( `submission_id` ) )'
+	                 . ' ';
+	$database->query($mod_form);
+		
+	// Insert info into the search table
+	// Module query info
+	$field_info = array();
+	$field_info['page_id'] = 'page_id';
+	$field_info['title'] = 'page_title';
+	$field_info['link'] = 'link';
+	$field_info['description'] = 'description';
+	$field_info['modified_when'] = 'modified_when';
+	$field_info['modified_by'] = 'modified_by';
+	$field_info = serialize($field_info);
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'form', '$field_info')");
+	// Query start
+	$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 ";
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'form')");
+	// Query body
+	$query_body_code = " [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.header [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
+	OR [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.footer [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
+	OR [TP]pages.page_id = [TP]mod_form_fields.page_id AND [TP]mod_form_fields.title [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'";
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'form')");
+	// Query end
+	$query_end_code = '';
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'form')");
+	
+	// Insert blank row (there needs to be at least on row for the search to work)
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (page_id,section_id) VALUES ('0','0')");
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id) VALUES ('0','0')");
+
+}
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/install.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/index.php
===================================================================
--- addons/modules/form/index.php	(nonexistent)
+++ addons/modules/form/index.php	(revision 81)
@@ -0,0 +1,33 @@
+<?php
+
+// $Id: index.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+header('Location: ../index.php');
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/index.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/move_up.php
===================================================================
--- addons/modules/form/move_up.php	(nonexistent)
+++ addons/modules/form/move_up.php	(revision 81)
@@ -0,0 +1,57 @@
+<?php
+
+// $Id: move_up.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
+	header("Location: index.php");
+} else {
+	$field_id = $_GET['field_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+
+// Create new order object an reorder
+$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
+if($order->move_up($field_id)) {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/move_up.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/delete_submission.php
===================================================================
--- addons/modules/form/delete_submission.php	(nonexistent)
+++ addons/modules/form/delete_submission.php	(revision 81)
@@ -0,0 +1,57 @@
+<?php
+
+// $Id: delete_submission.php,v 1.1 2005/03/28 04:35:39 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra submission types
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$submission_id = $_GET['submission_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Delete row
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/delete_submission.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/modify.php
===================================================================
--- addons/modules/form/modify.php	(nonexistent)
+++ addons/modules/form/modify.php	(revision 81)
@@ -0,0 +1,191 @@
+<?php
+
+// $Id: modify.php,v 1.5 2005/03/28 11:58:04 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+// Must include code to stop this file being access directly
+if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
+
+?>
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td align="left" width="33%">
+		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['FIELD']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/add_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
+	</td>
+	<td align="right" width="33%">
+		<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/modify_settings.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
+	</td>
+</tr>
+</table>
+
+<br />
+
+<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['FIELD']; ?></h2>
+<?php
+
+// Loop through existing fields
+$query_fields = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_form_fields` WHERE section_id = '$section_id' ORDER BY position ASC");
+if($query_fields->numRows() > 0) {
+	$num_fields = $query_fields->numRows();
+	$row = 'a';
+	?>
+	<table cellpadding="2" cellspacing="0" border="0" width="100%">
+	<?php
+	while($field = $query_fields->fetchRow()) {
+		?>
+		<tr class="row_<?php echo $row; ?>" height="20">
+			<td width="20" style="padding-left: 5px;">
+				<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="^" />
+				</a>
+			</td>		
+			<td>
+				<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>">
+					<?php echo $field['title']; ?>
+				</a>
+			</td>
+			<td width="175">
+				<?php
+				echo $TEXT['TYPE'].':';
+				if($field['type'] == 'textfield') {
+					echo $TEXT['SHORT_TEXT'];
+				} elseif($field['type'] == 'textarea') {
+					echo $TEXT['LONG_TEXT'];
+				} elseif($field['type'] == 'heading') {
+					echo $TEXT['HEADING'];
+				} elseif($field['type'] == 'select') {
+					echo $TEXT['SELECT_BOX'];
+				} elseif($field['type'] == 'checkbox') {
+					echo $TEXT['CHECKBOX_GROUP'];
+				} elseif($field['type'] == 'radio') {
+					echo $TEXT['RADIO_BUTTON_GROUP'];
+				} elseif($field['type'] == 'email') {
+					echo $TEXT['EMAIL_ADDRESS'];
+				}
+				?>
+			</td>
+			<td width="95">		+			<?php 
+			if ($field['type'] != 'group_begin') {
+				echo $TEXT['REQUIRED'].': '; if($field['required'] == 1) { echo $TEXT['YES']; } else { echo $TEXT['NO']; }
+			}
+			?>
+			</td>
+			<td width="110">
+			<?php
+			if ($field['type'] == 'select') {
+				$field['extra'] = explode(',',$field['extra']);
+				echo $TEXT['MULTISELECT'].': '; if($field['extra'][1] == 'multiple') { echo $TEXT['YES']; } else { echo $TEXT['NO']; }
+			}
+			?>
+			</td>
+			<td width="20">
+			<?php if($field['position'] != 1) { ?>
+				<a href="<?php echo WB_URL; ?>/modules/form/move_up.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/up_16.png" border="0" alt="^" />
+				</a>
+			<?php } ?>
+			</td>
+			<td width="20">
+			<?php if($field['position'] != $num_fields) { ?>
+				<a href="<?php echo WB_URL; ?>/modules/form/move_down.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/down_16.png" border="0" alt="v" />
+				</a>
+			<?php } ?>
+			</td>
+			<td width="20">
+				<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; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
+				</a>
+			</td>
+		</tr>
+		<?php
+		// Alternate row color
+		if($row == 'a') {
+			$row = 'b';
+		} else {
+			$row = 'a';
+		}
+	}
+	?>
+	</table>
+	<?php
+} else {
+	echo $TEXT['NONE_FOUND'];
+}
+
+?>
+
+<br /><br />
+
+<h2><?php echo $TEXT['SUBMISSIONS']; ?></h2>
+
+<?php
+
+// Query submissions table
+$query_submissions = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_form_submissions` WHERE section_id = '$section_id' ORDER BY submitted_when ASC");
+if($query_submissions->numRows() > 0) {
+	?>
+	<table cellpadding="2" cellspacing="0" border="0" width="100%">
+	<?php
+	// List submissions
+	$row = 'a';
+	while($submission = $query_submissions->fetchRow()) {
+		?>
+		<tr class="row_<?php echo $row; ?>" height="20">
+			<td width="20" style="padding-left: 5px;">
+				<a href="<?php echo WB_URL; ?>/modules/form/view_submission.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/folder_16.png" alt="<?php echo $TEXT['OPEN']; ?>" border="0" />
+				</a>
+			</td>
+			<td width="237"><?php echo $TEXT['SUBMISSION_ID'].': '.$submission['submission_id']; ?></td>
+			<td><?php echo $TEXT['SUBMITTED'].': '.gmdate(TIME_FORMAT.', '.DATE_FORMAT, $submission['submitted_when']+TIMEZONE); ?></td>
+			<td width="20">
+				<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; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
+				</a>
+			</td>
+		</tr>
+		<?php
+		// Alternate row color
+		if($row == 'a') {
+			$row = 'b';
+		} else {
+			$row = 'a';
+		}
+	}
+	?>
+	</table>
+	<?php
+} else {
+	echo $TEXT['NONE_FOUND'];
+}
+
+?>
+
+<br />
\ No newline at end of file

Property changes on: addons/modules/form/modify.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/form/add.php
===================================================================
--- addons/modules/form/add.php	(nonexistent)
+++ addons/modules/form/add.php	(revision 81)
@@ -0,0 +1,48 @@
+<?php
+
+// $Id: add.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
+for his contributions to this module - adding extra field types
+*/
+
+// Insert an extra rows into the database
+$header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">';
+$field_loop = '<tr><td class=\"field_title\">{TITLE}{REQUIRED}:</td><td>{FIELD}</td></tr>';
+$footer = '<tr><td>&nbsp;</td>
+<td>
+<input type=\"submit\" name=\"submit\" value=\"Submit Form\" />
+</td>
+</tr>
+</table>';
+$email_to = $admin->get_email();
+$email_from = '';
+$email_subject = 'Results from form on website...';
+$success_message = 'Thank-you.';
+$max_submissions = 50;
+$stored_submissions = 100;
+$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id,header,field_loop,footer,email_to,email_from,email_subject,success_message,max_submissions,stored_submissions) VALUES ('$page_id','$section_id','$header','$field_loop','$footer','$email_to','$email_from','$email_subject','$success_message','$max_submissions','$stored_submissions')");
+
+?>
\ No newline at end of file

Property changes on: addons/modules/form/add.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
