wb-archiv283/branches/2.8.x/wb/modules/form/add.php @ 1543
1 |
<?php
|
---|---|
2 |
/**
|
3 |
*
|
4 |
* @category module
|
5 |
* @package Form
|
6 |
* @author WebsiteBaker Project
|
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
8 |
* @link http://www.websitebaker2.org/
|
9 |
* @license http://www.gnu.org/licenses/gpl.html
|
10 |
* @platform WebsiteBaker 2.8.x
|
11 |
* @requirements PHP 5.2.2 and higher
|
12 |
* @version $Id: add.php 1538 2011-12-10 15:06:15Z Luisehahne $
|
13 |
* @filesource $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/modules/form/add.php $
|
14 |
* @lastmodified $Date: 2011-12-10 16:06:15 +0100 (Sat, 10 Dec 2011) $
|
15 |
* @description
|
16 |
*/
|
17 |
|
18 |
// Must include code to stop this file being access directly
|
19 |
/* -------------------------------------------------------- */
|
20 |
if(defined('WB_PATH') == false) |
21 |
{
|
22 |
// Stop this file being access directly
|
23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>'); |
24 |
}
|
25 |
/* -------------------------------------------------------- */
|
26 |
|
27 |
// Insert an extra rows into the database
|
28 |
$header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"98%\" summary=\"form\">'; |
29 |
$field_loop = '<tr><td class=\"field_title\">{TITLE}{REQUIRED}:</td><td>{FIELD}</td></tr>'; |
30 |
$footer = '<tr><td> </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 |
$email_fromname = ''; |
39 |
$email_subject = 'Results from form on website...'; |
40 |
$success_page = 'none'; |
41 |
$success_email_to = ''; |
42 |
$success_email_from = $admin->get_email(); |
43 |
$success_email_fromname = ''; |
44 |
$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 |
$use_captcha = true; |
50 |
$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')"); |