Project

General

Profile

1 560 Ruebenwurz
<?php
2 1375 FrankH
/**
3
 *
4
 * @category        module
5
 * @package         Form
6
 * @author          WebsiteBaker Project
7
 * @copyright       2009-2011, Website Baker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version         $Id$
13 1457 Luisehahne
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15 1538 Luisehahne
 * @description
16 1375 FrankH
 */
17 1538 Luisehahne
18 1420 Luisehahne
// Must include code to stop this file being access directly
19 1538 Luisehahne
/* -------------------------------------------------------- */
20
if(defined('WB_PATH') == false)
21
{
22
	// Stop this file being access directly
23
		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
24
}
25
/* -------------------------------------------------------- */
26 560 Ruebenwurz
27
// Insert an extra rows into the database
28 1437 DarkViper
$header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"98%\" summary=\"form\">';
29 560 Ruebenwurz
$field_loop = '<tr><td class=\"field_title\">{TITLE}{REQUIRED}:</td><td>{FIELD}</td></tr>';
30
$footer = '<tr><td>&nbsp;</td>
31
<td>
32
<input type=\"submit\" name=\"submit\" value=\"Submit Form\" />
33
</td>
34
</tr>
35
</table>';
36
$email_to = $admin->get_email();
37
$email_from = '';
38 638 thorn
$email_fromname = '';
39 560 Ruebenwurz
$email_subject = 'Results from form on website...';
40
$success_page = 'none';
41
$success_email_to = '';
42
$success_email_from = $admin->get_email();
43 638 thorn
$success_email_fromname = '';
44 560 Ruebenwurz
$success_email_text = 'Thank you for submitting your form on '.WEBSITE_TITLE;
45
$success_email_text = addslashes($success_email_text);
46
$success_email_subject = 'You have submitted a form';
47
$max_submissions = 50;
48
$stored_submissions = 50;
49 605 thorn
$use_captcha = true;
50 638 thorn
$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id,header,field_loop,footer,email_to,email_from,email_fromname,email_subject,success_page,success_email_to,success_email_from,success_email_fromname,success_email_text,success_email_subject,max_submissions,stored_submissions,use_captcha) VALUES ('$page_id','$section_id','$header','$field_loop','$footer','$email_to','$email_from','$email_fromname','$email_subject','$success_page','$success_email_to','$success_email_from','$success_email_fromname','$success_email_text','$success_email_subject','$max_submissions','$stored_submissions','$use_captcha')");