wb-archiv283/tags/2.8.2/wb/modules/form/add.php @ 1679
1 |
<?php
|
---|---|
2 |
/**
|
3 |
*
|
4 |
* @category module
|
5 |
* @package Form
|
6 |
* @author WebsiteBaker Project
|
7 |
* @copyright 2004-2009, Ryan Djurovich
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
9 |
* @link http://www.websitebaker2.org/
|
10 |
* @license http://www.gnu.org/licenses/gpl.html
|
11 |
* @platform WebsiteBaker 2.8.x
|
12 |
* @requirements PHP 5.2.2 and higher
|
13 |
* @version $Id: add.php 1457 2011-06-25 17:18:50Z Luisehahne $
|
14 |
* @filesource $HeadURL: svn://isteam.dynxs.de/wb-archiv/tags/2.8.2/wb/modules/form/add.php $
|
15 |
* @lastmodified $Date: 2011-06-25 19:18:50 +0200 (Sat, 25 Jun 2011) $
|
16 |
* @description
|
17 |
*/
|
18 |
// Must include code to stop this file being access directly
|
19 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); } |
20 |
|
21 |
// Insert an extra rows into the database
|
22 |
$header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"98%\" summary=\"form\">'; |
23 |
$field_loop = '<tr><td class=\"field_title\">{TITLE}{REQUIRED}:</td><td>{FIELD}</td></tr>'; |
24 |
$footer = '<tr><td> </td> |
25 |
<td>
|
26 |
<input type=\"submit\" name=\"submit\" value=\"Submit Form\" />
|
27 |
</td>
|
28 |
</tr>
|
29 |
</table>'; |
30 |
$email_to = $admin->get_email(); |
31 |
$email_from = ''; |
32 |
$email_fromname = ''; |
33 |
$email_subject = 'Results from form on website...'; |
34 |
$success_page = 'none'; |
35 |
$success_email_to = ''; |
36 |
$success_email_from = $admin->get_email(); |
37 |
$success_email_fromname = ''; |
38 |
$success_email_text = 'Thank you for submitting your form on '.WEBSITE_TITLE; |
39 |
$success_email_text = addslashes($success_email_text); |
40 |
$success_email_subject = 'You have submitted a form'; |
41 |
$max_submissions = 50; |
42 |
$stored_submissions = 50; |
43 |
$use_captcha = true; |
44 |
$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')"); |
45 |
|
46 |
?>
|