Revision 1714
Added by Luisehahne over 12 years ago
branches/2.8.x/CHANGELOG | ||
---|---|---|
13 | 13 |
|
14 | 14 |
|
15 | 15 |
|
16 |
29 Aug-2012 Build 1714 Dietmar Woellbrink (Luisehahne) |
|
17 |
! update module form |
|
18 |
! not auth users get no confirmation mail, but can print message |
|
19 |
! add replyto to received messages, so answer is possible by e-mail client |
|
20 |
! add pagination to submissionlist |
|
16 | 21 |
29 Aug-2012 Build 1713 Dietmar Woellbrink (Luisehahne) |
17 | 22 |
! remove html markup from code to a template |
18 | 23 |
29 Aug-2012 Build 1712 Dietmar Woellbrink (Luisehahne) |
branches/2.8.x/wb/admin/interface/version.php | ||
---|---|---|
51 | 51 |
|
52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.3'); |
54 |
if(!defined('REVISION')) define('REVISION', '1713');
|
|
54 |
if(!defined('REVISION')) define('REVISION', '1714');
|
|
55 | 55 |
if(!defined('SP')) define('SP', ''); |
branches/2.8.x/wb/modules/form/modify_field.php | ||
---|---|---|
12 | 12 |
* @version $Id$ |
13 | 13 |
* @filesource $HeadURL$ |
14 | 14 |
* @lastmodified $Date$ |
15 |
* @description
|
|
15 |
* @description |
|
16 | 16 |
*/ |
17 | 17 |
|
18 | 18 |
require('../../config.php'); |
... | ... | |
157 | 157 |
<td><?php echo $TEXT['ALLOW_MULTIPLE_SELECTIONS']; ?>:</td> |
158 | 158 |
<td> |
159 | 159 |
<input type="radio" name="multiselect" id="multiselect_true" value="multiple" <?php if($form['extra'][1] == 'multiple') { echo ' checked="checked"'; } ?> /> |
160 |
<a href="#" onclick="javascript: document.getElementById('multiselect_true').checked = true;">
|
|
160 |
<a href="#" onclick="javascript:document.getElementById('multiselect_true').checked = true;"> |
|
161 | 161 |
<?php echo $TEXT['YES']; ?> |
162 | 162 |
</a> |
163 | 163 |
|
164 | 164 |
<input type="radio" name="multiselect" id="multiselect_false" value="" <?php if($form['extra'][1] == '') { echo ' checked="checked"'; } ?> /> |
165 |
<a href="#" onclick="javascript: document.getElementById('multiselect_false').checked = true;">
|
|
165 |
<a href="#" onclick="javascript:document.getElementById('multiselect_false').checked = true;"> |
|
166 | 166 |
<?php echo $TEXT['NO']; ?> |
167 | 167 |
</a> |
168 | 168 |
</td> |
... | ... | |
206 | 206 |
<td align="center"> |
207 | 207 |
<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: 200px; margin-top: 5px;" /> |
208 | 208 |
</td> |
209 |
<?php }
|
|
209 |
<?php } |
|
210 | 210 |
// end addition |
211 | 211 |
?> |
212 | 212 |
<td align="right"> |
branches/2.8.x/wb/modules/form/info.php | ||
---|---|---|
4 | 4 |
* @category module |
5 | 5 |
* @package Form |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2012, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V. |
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.3 |
... | ... | |
12 | 12 |
* @version $Id$ |
13 | 13 |
* @filesource $HeadURL$ |
14 | 14 |
* @lastmodified $Date$ |
15 |
* @description
|
|
15 |
* @description |
|
16 | 16 |
*/ |
17 | 17 |
|
18 | 18 |
// Must include code to stop this file being access directly |
... | ... | |
24 | 24 |
$module_directory = 'form'; |
25 | 25 |
$module_name = 'Form'; |
26 | 26 |
$module_function = 'page'; |
27 |
$module_version = '2.8.5';
|
|
27 |
$module_version = '2.9.0';
|
|
28 | 28 |
$module_platform = '2.8.3'; |
29 | 29 |
$module_author = 'Ryan Djurovich & Rudolph Lartey - additions John Maats - PCWacht, dev-team'; |
30 | 30 |
$module_license = 'GNU General Public License'; |
branches/2.8.x/wb/modules/form/save_field.php | ||
---|---|---|
4 | 4 |
* @category module |
5 | 5 |
* @package Form |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
12 | 12 |
* @version $Id$ |
13 | 13 |
* @filesource $HeadURL$ |
14 | 14 |
* @lastmodified $Date$ |
15 |
* @description
|
|
15 |
* @description |
|
16 | 16 |
*/ |
17 | 17 |
|
18 | 18 |
require('../../config.php'); |
... | ... | |
103 | 103 |
$extra = $admin->add_slashes($extra); |
104 | 104 |
$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '', extra = '$extra' WHERE field_id = '$field_id'"); |
105 | 105 |
} elseif($admin->get_post('type') == 'select') { |
106 |
$extra = $admin->get_post_escaped('size').','.$admin->get_post_escaped('multiselect');
|
|
106 |
$extra = intval($admin->get_post_escaped('size')).','.$admin->get_post_escaped('multiselect');
|
|
107 | 107 |
$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'"); |
108 | 108 |
} elseif($admin->get_post('type') == 'checkbox') { |
109 | 109 |
$extra = str_replace(array("[[", "]]"), '', $admin->get_post_escaped('seperator')); |
branches/2.8.x/wb/modules/form/css/MsdnSearchStyle.css | ||
---|---|---|
1 |
/* |
|
2 |
Plugin Name: WP-Digg Style Paginator |
|
3 |
Plugin URI: http://www.mis-algoritmos.com/2007/09/09/wp-digg-style-pagination-plugin-v-10/ |
|
4 |
Author: Victor De la Rocha |
|
5 |
Author URI: http://www.mis-algoritmos.com |
|
6 |
*/ |
|
7 |
/*CSS MsdnSearchStyle pagination*/ |
|
8 |
div.pagination { font-family :Verdana,Tahoma,Arial,Helvetica,Sans-Serif; font-size :13px; text-align :left; padding :4px 6px 4px 0; background-color :#ffffff; color :#313031; } |
|
9 |
div.pagination a { color :#0030ce; text-decoration :none; padding :5px 6px 4px 5px; margin :0 3px 0 3px; border :1px solid #b7d8ee; } |
|
10 |
div.pagination a:hover, div.pagination a:active { color :#0066a7; border :1px solid #b7d8ee; background-color :#d2eaf6; } |
|
11 |
div.pagination span.current { padding :5px 6px 4px 5px; margin :0 3px 0 3px; border :1px solid #b7d8ee; font-weight :bold; color :#444444; background-color :#d2eaf6; } |
|
12 |
div.pagination span.disabled { display :none; } |
|
0 | 13 |
branches/2.8.x/wb/modules/form/css/DiggStyle.css | ||
---|---|---|
1 |
/* |
|
2 |
Plugin Name: WP-Digg Style Paginator |
|
3 |
Plugin URI: http://www.mis-algoritmos.com/2007/09/09/wp-digg-style-pagination-plugin-v-10/ |
|
4 |
Author: Victor De la Rocha |
|
5 |
Author URI: http://www.mis-algoritmos.com |
|
6 |
*/ |
|
7 |
/*CSS Digg style pagination*/ |
|
8 |
div.pagination { padding :3px; margin :3px; text-align :left; } |
|
9 |
div.pagination a { padding :2px 5px 2px 5px; margin :2px; border :1px solid #aaaadd; text-decoration :none; /* no underline */ color :#000099; } |
|
10 |
div.pagination a:hover, div.digg a:active { border :1px solid #000099; color :#000000; } |
|
11 |
div.pagination span.current { padding :2px 5px 2px 5px; margin :2px; border :1px solid #000099; font-weight :bold; background-color :#000099; color :#ffffff; } |
|
12 |
div.pagination span.disabled { padding :2px 5px 2px 5px; margin :2px; border :1px solid #eeeeee; color :#dddddd; } |
|
0 | 13 |
branches/2.8.x/wb/modules/form/css/FlickrStyle.css | ||
---|---|---|
1 |
/* |
|
2 |
Plugin Name: WP-Digg Style Paginator |
|
3 |
Plugin URI: http://www.mis-algoritmos.com/2007/09/09/wp-digg-style-pagination-plugin-v-10/ |
|
4 |
Author: Victor De la Rocha |
|
5 |
Author URI: http://www.mis-algoritmos.com |
|
6 |
*/ |
|
7 |
/*CSS FlickrStyle pagination*/ |
|
8 |
div.pagination { padding :3px; margin :3px; text-align :left; } |
|
9 |
div.pagination a { border :1px solid #dedfde; margin-right :3px; padding :2px 6px; background-position :bottom; text-decoration :none; color :#0061de; } |
|
10 |
div.pagination a:hover, div.meneame a:active { border :1px solid #000000; background-image :none; background-color :#0061de; color :#ffffff; } |
|
11 |
div.pagination span.current { margin-right :3px; padding :2px 6px; font-weight :bold; color :#ff0084; } |
|
12 |
div.pagination span.disabled { margin-right :3px; padding :2px 6px; color :#adaaad; } |
|
0 | 13 |
branches/2.8.x/wb/modules/form/css/GrayRedStyle.css | ||
---|---|---|
1 |
/* |
|
2 |
Plugin Name: WP-Digg Style Paginator |
|
3 |
Plugin URI: http://www.mis-algoritmos.com/2007/09/09/wp-digg-style-pagination-plugin-v-10/ |
|
4 |
Author: Victor De la Rocha |
|
5 |
Author URI: http://www.mis-algoritmos.com |
|
6 |
*/ |
|
7 |
/*GrayRedStyle Pagination*/ |
|
8 |
div.pagination { font-size :11px; font-family :Tahoma, Arial, Helvetica, Sans-serif; padding :2px; background-color :#c1c1c1; } |
|
9 |
div.pagination a { padding :2px 5px 2px 5px; margin :2px; background-color :#c1c1c1; text-decoration :none; /* no underline */ color :#000000; } |
|
10 |
div.pagination a:hover, div.pagination a:active { background-color :#99ffff; color :#000000; } |
|
11 |
div.pagination span.current { padding :2px 5px 2px 5px; margin :2px; font-weight :bold; background-color :#ffffff; color :#303030; } |
|
12 |
div.pagination span.disabled { padding :2px 5px 2px 5px; margin :2px; background-color :#c1c1c1; color :#797979; } |
|
0 | 13 |
branches/2.8.x/wb/modules/form/css/YahooStyle.css | ||
---|---|---|
1 |
/* |
|
2 |
Plugin Name: WP-Digg Style Paginator |
|
3 |
Plugin URI: http://www.mis-algoritmos.com/2007/09/09/wp-digg-style-pagination-plugin-v-10/ |
|
4 |
Author: Victor De la Rocha |
|
5 |
Author URI: http://www.mis-algoritmos.com |
|
6 |
*/ |
|
7 |
/*CSS Yahoo new version style pagination*/ |
|
8 |
div.pagination { padding :3px; margin :3px; text-align :left; font-family :Tahoma,Helvetica,sans-serif; font-size :.85em; } |
|
9 |
div.pagination a { border :1px solid #ccdbe4; margin-right :3px; padding :2px 8px; background-position :bottom; text-decoration :none; color :#0061de; } |
|
10 |
div.pagination a:hover, div.pagination a:active { border :1px solid #2b55af; background-image :none; background-color :#3666d4; color :#ffffff; } |
|
11 |
div.pagination span.current { margin-right :3px; padding :2px 6px; font-weight :bold; color :#000000; } |
|
12 |
div.pagination span.disabled { display :none; } |
|
13 |
div.pagination a.next{ border :2px solid #ccdbe4; margin :0 0 0 10px; } |
|
14 |
div.pagination a.next:hover{ border :2px solid #2b55af; } |
|
15 |
div.pagination a.prev{ border :2px solid #ccdbe4; margin :0 10px 0 0; } |
|
16 |
div.pagination a.prev:hover{ border :2px solid #2b55af; } |
|
0 | 17 |
branches/2.8.x/wb/modules/form/css/QuotesStyle.css | ||
---|---|---|
1 |
/* |
|
2 |
Plugin Name: WP-Digg Style Paginator |
|
3 |
Plugin URI: http://www.mis-algoritmos.com/2007/09/09/wp-digg-style-pagination-plugin-v-10/ |
|
4 |
Author: Victor De la Rocha |
|
5 |
Author URI: http://www.mis-algoritmos.com |
|
6 |
*/ |
|
7 |
/*QuotesStyle*/ |
|
8 |
div.pagination { padding :3px; margin :3px; text-align :left; } |
|
9 |
div.pagination a { padding :2px 5px 2px 5px; margin-right :2px; border :1px solid #dddddd; text-decoration :none; color :#aaaaaa; } |
|
10 |
div.pagination a:hover, div.pagination a:active { padding :2px 5px 2px 5px; margin-right :2px; border :1px solid #a0a0a0; } |
|
11 |
div.pagination span.current { padding :2px 5px 2px 5px; margin-right :2px; border :1px solid #e0e0e0; font-weight :bold; background-color :#f0f0f0; color :#aaaaaa; } |
|
12 |
div.pagination span.disabled { padding :2px 5px 2px 5px; margin-right :2px; border :1px solid #f3f3f3; color :#cccccc; } |
|
0 | 13 |
branches/2.8.x/wb/modules/form/css/SabrosusStyle.css | ||
---|---|---|
1 |
/* |
|
2 |
Plugin Name: WP-Digg Style Paginator |
|
3 |
Plugin URI: http://www.mis-algoritmos.com/2007/09/09/wp-digg-style-pagination-plugin-v-10/ |
|
4 |
Author: Victor De la Rocha |
|
5 |
Author URI: http://www.mis-algoritmos.com |
|
6 |
*/ |
|
7 |
/*CSS SabrosusStyle pagination*/ |
|
8 |
div.pagination { padding :3px; margin :3px; text-align :left; } |
|
9 |
div.pagination a { padding :2px 5px 2px 5px; margin-right :2px; border :1px solid #9aafe5; text-decoration :none; color :#2e6ab1; } |
|
10 |
div.pagination a:hover, div.pagination a:active { border :1px solid #2b66a5; color :#000000; background-color :#ffffe0; } |
|
11 |
div.pagination span.current { padding :2px 5px 2px 5px; margin-right :2px; border :1px solid #000080; font-weight :bold; background-color :#2e6ab1; color :#ffffff; } |
|
12 |
div.pagination span.disabled { padding :2px 5px 2px 5px; margin-right :2px; border :1px solid #929292; color :#929292; } |
|
0 | 13 |
branches/2.8.x/wb/modules/form/css/512megasStyle.css | ||
---|---|---|
1 |
/* |
|
2 |
Plugin Name: WP-Digg Style Paginator |
|
3 |
Plugin URI: http://www.mis-algoritmos.com/2007/09/09/wp-digg-style-pagination-plugin-v-10/ |
|
4 |
Author: Victor De la Rocha |
|
5 |
Author URI: http://www.mis-algoritmos.com |
|
6 |
*/ |
|
7 |
/* 512megasStyle 512megas.com */ |
|
8 |
div.pagination { padding :3px; margin :3px; text-align :left; } |
|
9 |
div.pagination a { border :1px solid #dedfde; margin-right :3px; padding :2px 6px; background-position :bottom; text-decoration :none; color :#99210b; } |
|
10 |
div.pagination a:hover, div.pagination a:active { border :1px solid #000000; background-image :none; background-color :#777777; color :#ffffff; } |
|
11 |
div.pagination span.current { border :1px solid #000; margin-right :3px; padding :2px 6px; font-weight :bold; color :#000; } |
|
12 |
div.pagination span.disabled { margin-right :3px; padding :2px 6px; color :#adaaad; } |
|
0 | 13 |
branches/2.8.x/wb/modules/form/css/Black-RedStyle.css | ||
---|---|---|
1 |
/* |
|
2 |
Plugin Name: WP-Digg Style Paginator |
|
3 |
Plugin URI: http://www.mis-algoritmos.com/2007/09/09/wp-digg-style-pagination-plugin-v-10/ |
|
4 |
Author: Victor De la Rocha |
|
5 |
Author URI: http://www.mis-algoritmos.com |
|
6 |
*/ |
|
7 |
div.pagination { font-size :11px; font-family :Tahoma, Arial, Helvetica, Sans-serif; background-color :#3e3e3e; color :#ffffff; } |
|
8 |
div.pagination a { padding :2px 5px 2px 5px; margin :2px; background-color :#3e3e3e; text-decoration :none; /* no underline */ color :#ffffff; } |
|
9 |
div.pagination a:hover, div.pagination a:active { background-color :#ec5210; color :#ffffff; } |
|
10 |
div.pagination span.current { padding :2px 5px 2px 5px; margin :2px; font-weight :bold; background-color :#313131; color :#ffffff; } |
|
11 |
div.pagination span.disabled { padding :2px 5px 2px 5px; margin :2px; background-color :#3e3e3e; color :#868686; } |
|
0 | 12 |
branches/2.8.x/wb/modules/form/install.php | ||
---|---|---|
17 | 17 |
|
18 | 18 |
if(defined('WB_URL')) |
19 | 19 |
{ |
20 |
|
|
20 |
|
|
21 | 21 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`"); |
22 | 22 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`"); |
23 | 23 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`"); |
... | ... | |
54 | 54 |
. ' `success_email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,' |
55 | 55 |
. ' `stored_submissions` INT NOT NULL DEFAULT \'0\' ,' |
56 | 56 |
. ' `max_submissions` INT NOT NULL DEFAULT \'0\' ,' |
57 |
. ' `perpage_submissions` INT NOT NULL DEFAULT \'10\' ,' |
|
57 | 58 |
. ' `use_captcha` INT NOT NULL DEFAULT \'0\' ,' |
58 | 59 |
. ' PRIMARY KEY ( `section_id` ) ' |
59 | 60 |
. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'; |
60 | 61 |
$database->query($mod_form); |
61 |
|
|
62 |
|
|
62 | 63 |
$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,' |
63 | 64 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,' |
64 | 65 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,' |
... | ... | |
68 | 69 |
. ' PRIMARY KEY ( `submission_id` ) ' |
69 | 70 |
. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'; |
70 | 71 |
$database->query($mod_form); |
71 |
|
|
72 |
|
|
72 | 73 |
$mod_search = "SELECT * FROM ".TABLE_PREFIX."search WHERE value = 'form'"; |
73 | 74 |
$insert_search = $database->query($mod_search); |
74 | 75 |
if( $insert_search->numRows() == 0 ) |
branches/2.8.x/wb/modules/form/modify_settings.php | ||
---|---|---|
12 | 12 |
* @version $Id$ |
13 | 13 |
* @filesource $HeadURL$ |
14 | 14 |
* @lastmodified $Date$ |
15 |
* @description
|
|
15 |
* @description |
|
16 | 16 |
*/ |
17 | 17 |
|
18 | 18 |
require('../../config.php'); |
... | ... | |
30 | 30 |
$lang = (dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php'; |
31 | 31 |
require_once(!file_exists($lang) ? (dirname(__FILE__)) . '/languages/EN.php' : $lang ); |
32 | 32 |
|
33 |
// later in upgrade.php |
|
34 |
$table_name = TABLE_PREFIX.'mod_form_settings'; |
|
35 |
$field_name = 'perpage_submissions'; |
|
36 |
$description = "INT NOT NULL DEFAULT '10' AFTER `max_submissions`"; |
|
37 |
if(!$database->field_exists($table_name,$field_name)) { |
|
38 |
$database->field_add($table_name, $field_name, $description); |
|
39 |
} |
|
40 |
|
|
33 | 41 |
$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' ) ? '#'.SEC_ANCHOR.$section['section_id'] : '' ); |
34 | 42 |
|
35 | 43 |
if (!function_exists('emailAdmin')) { |
... | ... | |
113 | 121 |
</td> |
114 | 122 |
</tr> |
115 | 123 |
<tr> |
124 |
<td class="frm-setting_name"><?php echo $TEXT['SUBMISSIONS_PERPAGE']; ?>:</td> |
|
125 |
<td class="frm-setting_value"> |
|
126 |
<input type="text" name="perpage_submissions" style="width: 30px;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['perpage_submissions'])); ?>" /> |
|
127 |
</td> |
|
128 |
</tr> |
|
129 |
<tr> |
|
116 | 130 |
<td class="frm-setting_name"><?php echo $TEXT['HEADER']; ?>:</td> |
117 | 131 |
<td class="frm-setting_value"> |
118 | 132 |
<textarea name="header" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo ($setting['header']); ?></textarea> |
... | ... | |
130 | 144 |
<textarea name="footer" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo str_replace($raw, $friendly, ($setting['footer'])); ?></textarea> |
131 | 145 |
</td> |
132 | 146 |
</tr> |
133 |
</table>
|
|
147 |
</table> |
|
134 | 148 |
<!-- E-Mail Optionen --> |
135 | 149 |
<table summary="<?php echo $TEXT['EMAIL'].' '.$TEXT['SETTINGS']; ?>" class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%" style="margin-top: 3px;"> |
136 | 150 |
<tr> |
... | ... | |
169 | 183 |
<td class="frm-setting_name"><?php echo $TEXT['EMAIL'].' '.$MOD_FORM['TO']; ?>:</td> |
170 | 184 |
<td class="frm-setting_value"><?php echo $MOD_FORM['RECIPIENT'] ?> </td> |
171 | 185 |
</tr> |
172 |
|
|
173 | 186 |
<tr> |
187 |
<td colspan="2"><p class="frm-warning"><?php echo $MOD_FORM['SPAM']; ?></p></td> |
|
188 |
</tr> |
|
189 |
<tr> |
|
190 |
<td class="frm-setting_name"><?php echo $MOD_FORM['REPLYTO']; ?>:</td> |
|
191 |
<td class="frm-setting_value"> |
|
192 |
<select name="success_email_to" style="width: 98%;"> |
|
193 |
<option value="" onclick="javascript: document.getElementById('success_email_to').style.display = 'block';"><?php echo $TEXT['NONE']; ?></option> |
|
194 |
<?php |
|
195 |
$success_email_to = str_replace($raw, $friendly, ($setting['success_email_to'])); |
|
196 |
$sql = 'SELECT `field_id`, `title` FROM `'.TABLE_PREFIX.'mod_form_fields` '; |
|
197 |
$sql .= 'WHERE `section_id` = '.(int)$section_id.' '; |
|
198 |
$sql .= ' AND `type` = \'email\' '; |
|
199 |
$sql .= 'ORDER BY `position` ASC '; |
|
200 |
if($query_email_fields = $database->query($sql)) { |
|
201 |
if($query_email_fields->numRows() > 0) { |
|
202 |
while($field = $query_email_fields->fetchRow(MYSQL_ASSOC)) { |
|
203 |
?> |
|
204 |
<option value="field<?php echo $field['field_id']; ?>"<?php if($success_email_to == 'field'.$field['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_from').style.display = 'none';"> |
|
205 |
<?php echo $TEXT['FIELD'].': '.$field['title']; ?> |
|
206 |
</option> |
|
207 |
<?php |
|
208 |
} |
|
209 |
} |
|
210 |
} |
|
211 |
?> |
|
212 |
</select> |
|
213 |
</td> |
|
214 |
</tr> |
|
215 |
<tr> |
|
174 | 216 |
<td class="frm-setting_name"><?php echo $TEXT['DISPLAY_NAME']; ?>:</td> |
175 | 217 |
<td class="frm-setting_value"> |
176 | 218 |
<?php $setting['success_email_fromname'] = ($setting['success_email_fromname'] != '' ? $setting['success_email_fromname'] : WBMAILER_DEFAULT_SENDERNAME); ?> |
... | ... | |
195 | 237 |
<td class="frm-newsection"> |
196 | 238 |
<select name="success_page"> |
197 | 239 |
<option value="none"><?php echo $TEXT['NONE']; ?></option> |
198 |
<?php
|
|
240 |
<?php |
|
199 | 241 |
// Get exisiting pages and show the pagenames |
200 | 242 |
$query = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE visibility <> 'deleted'"); |
201 | 243 |
while($mail_page = $query->fetchRow(MYSQL_ASSOC)) { |
202 | 244 |
if(!$admin->page_is_visible($mail_page)) |
203 | 245 |
continue; |
204 |
$mail_pagename = $mail_page['menu_title'];
|
|
246 |
$mail_pagename = $mail_page['menu_title']; |
|
205 | 247 |
$success_page = $mail_page['page_id']; |
206 | 248 |
// echo $success_page.':'.$setting['success_page'].':'; not vailde |
207 | 249 |
if($setting['success_page'] == $success_page) { |
branches/2.8.x/wb/modules/form/htt/OverviewSubmission.htt | ||
---|---|---|
1 |
<!-- BEGIN main_block --> |
|
2 |
<br /><br /> |
|
3 |
<h2 id="submissions">{TEXT_SUBMISSIONS}</h2> |
|
4 |
<table summary="" width="100%" cellpadding="2" cellspacing="0" border="0" class=""> |
|
5 |
<thead> |
|
6 |
<tr style="background-color: #dddddd; font-weight: bold;"> |
|
7 |
<th width="23" style="text-align: center;"> </th> |
|
8 |
<th width="33" style="text-align: right;"> ID </th> |
|
9 |
<th width="200" style="padding-left: 10px;">{TEXT_SUBMITTED}</th> |
|
10 |
<th width="200" style="padding-left: 10px;">{TEXT_USER}</th> |
|
11 |
<th width="350">{TEXT_EMAIL} {MOD_FORM_FROM}</th> |
|
12 |
<th width="20"> </th> |
|
13 |
<th width="20"> </th> |
|
14 |
<th width="20"> </th> |
|
15 |
<th width="20"> </th> |
|
16 |
</tr> |
|
17 |
</thead> |
|
18 |
<tfoot class="frm-pagination"> |
|
19 |
<tr style="background-color: #dddddd; font-weight: bold;"> |
|
20 |
<td colspan="9" style="text-align: left;"> |
|
21 |
{PAGINATION} |
|
22 |
</td> |
|
23 |
</tr> |
|
24 |
</tfoot> |
|
25 |
<tbody> |
|
26 |
<!-- BEGIN loop_submmission_block --> |
|
27 |
<tr class="row_{ROW_BIT}"> |
|
28 |
<td width="20" style="padding-left: 5px;text-align: center;"> |
|
29 |
<a href="{WB_URL}/modules/form/view_submission.php?{QUERYSTR}" title="{TEXT_OPEN}"> |
|
30 |
<img src="{THEME_URL}/images/folder_16.png" alt="{TEXT_OPEN}" /> |
|
31 |
</a> |
|
32 |
</td> |
|
33 |
<td width="30" style="padding-right: 5px;text-align: right;">{SUBMISSION_ID}</td> |
|
34 |
<td width="200" style="padding-left: 10px;">{SUBMISSION_CREATE_WHEN}</td> |
|
35 |
<td width="200" style="padding-left: 10px;">{SUBMISSION_BY}</td> |
|
36 |
<td width="350">{SUBMISSION_EMAIL}</td> |
|
37 |
<td width="20" style="text-align: center;"> </td> |
|
38 |
<td width="20"> </td> |
|
39 |
<td width="20" style="text-align: center;"> |
|
40 |
<a href="javascript:confirm_link('{TEXT_ARE_YOU_SURE}','{WB_URL}/modules/form/delete_submission.php?{QUERYSTR}');" title="{TEXT_DELETE}"> |
|
41 |
<img src="{THEME_URL}/images/delete_16.png" alt="X" /> |
|
42 |
</a> |
|
43 |
</td> |
|
44 |
<td width="20"> </td> |
|
45 |
</tr> |
|
46 |
<!-- END loop_submmission_block --> |
|
47 |
|
|
48 |
<tr><td colspan="9">{TEXT_NONE_FOUND}</td></tr> |
|
49 |
|
|
50 |
</tbody> |
|
51 |
</table> |
|
52 |
|
|
53 |
<!-- END main_block --> |
|
0 | 54 |
branches/2.8.x/wb/modules/form/htt/submessage.htt | ||
---|---|---|
1 |
<!-- BEGIN main_block --> |
|
2 |
|
|
3 |
<div class="previewPrintTop"> |
|
4 |
<a title="{TEXT_PRINT_PAGE} ({TEXT_REQUIRED_JS})" href="javascript:window.print()"> |
|
5 |
{TEXT_PRINT_PAGE}<img width="16px" height="14px" alt="" src="{MODULE_URL}/htt/print.gif" /> |
|
6 |
</a> |
|
7 |
</div> |
|
8 |
|
|
9 |
<table class="frm-submission print-email"> |
|
10 |
<tr> |
|
11 |
<td colspan="2">{SUCCESS_EMAIL_TEXT}</td> |
|
12 |
</tr> |
|
13 |
<tr> |
|
14 |
<td colspan="2"><p class="frm-warning {NIX_HIER}">{SUCCESS_PRINT}</p></td> |
|
15 |
</tr> |
|
16 |
|
|
17 |
<tr> |
|
18 |
<td>{TEXT_SUBMISSION_ID}:</td> |
|
19 |
<td>{submission_submission_id}</td> |
|
20 |
</tr> |
|
21 |
<tr> |
|
22 |
<td>{TEXT_SUBMITTED}:</td> |
|
23 |
<td>{submission_submitted_when}</td> |
|
24 |
</tr> |
|
25 |
<tr> |
|
26 |
<td>{TEXT_USER}:</td> |
|
27 |
<td>{user_display_name} ({user_username})</td> |
|
28 |
</tr> |
|
29 |
<tr> |
|
30 |
<td colspan="2"><hr /></td> |
|
31 |
</tr> |
|
32 |
<tr> |
|
33 |
<td colspan="2">{submission_body}</td> |
|
34 |
</tr> |
|
35 |
</table> |
|
36 |
|
|
37 |
<!-- END main_block --> |
|
0 | 38 |
branches/2.8.x/wb/modules/form/save_field_new.php | ||
---|---|---|
4 | 4 |
* @category module |
5 | 5 |
* @package Form |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
46 | 46 |
|
47 | 47 |
// Validate all fields |
48 | 48 |
if($admin->get_post('title') == '' OR $admin->get_post('type') == '') { |
49 |
$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$admin->getIDKEY($field_id));
|
|
49 |
$admin->print_error($MESSAGE['GENERIC_FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$admin->getIDKEY($field_id));
|
|
50 | 50 |
} else { |
51 | 51 |
$title = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->get_post_escaped('title'), ENT_QUOTES)); |
52 | 52 |
$type = $admin->add_slashes($admin->get_post('type')); |
... | ... | |
54 | 54 |
} |
55 | 55 |
|
56 | 56 |
// If field type has multiple options, get all values and implode them |
57 |
$value = $extra = '';
|
|
57 |
$value = $extra = ''; |
|
58 | 58 |
$list_count = $admin->get_post('list_count'); |
59 | 59 |
if(is_numeric($list_count)) { |
60 | 60 |
$values = array(); |
... | ... | |
81 | 81 |
$extra = $admin->add_slashes($extra); |
82 | 82 |
break; |
83 | 83 |
case 'select': |
84 |
$extra = $admin->get_post_escaped('size').','.$admin->get_post_escaped('multiselect');
|
|
84 |
$extra = intval($admin->get_post_escaped('size')).','.$admin->get_post_escaped('multiselect');
|
|
85 | 85 |
break; |
86 | 86 |
case 'checkbox': |
87 | 87 |
$extra = str_replace(array("[[", "]]"), '', $admin->get_post_escaped('seperator')); |
branches/2.8.x/wb/modules/form/view.php | ||
---|---|---|
4 | 4 |
* @category module |
5 | 5 |
* @package Form |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
20 | 20 |
if(defined('WB_PATH') == false) |
21 | 21 |
{ |
22 | 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>');
|
|
23 |
die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
|
|
24 | 24 |
} |
25 | 25 |
/* -------------------------------------------------------- */ |
26 | 26 |
|
... | ... | |
42 | 42 |
return $value === removebreaks($value); |
43 | 43 |
} |
44 | 44 |
*/ |
45 |
|
|
45 |
$aSuccess =array(); |
|
46 | 46 |
if (!function_exists('emailAdmin')) { |
47 | 47 |
function emailAdmin() { |
48 | 48 |
global $database,$admin; |
... | ... | |
151 | 151 |
} |
152 | 152 |
|
153 | 153 |
// do not use sec_anchor, can destroy some layouts |
154 |
$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' ) ? '#'.SEC_ANCHOR.$section['section_id'] : '' );
|
|
154 |
$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' ) ? '#'.SEC_ANCHOR.$fetch_settings['section_id'] : '' );
|
|
155 | 155 |
|
156 | 156 |
// Get list of fields |
157 | 157 |
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'mod_form_fields` '; |
... | ... | |
174 | 174 |
if(ENABLED_ASP) { // first add some honeypot-fields |
175 | 175 |
?> |
176 | 176 |
<input type="hidden" name="submitted_when" value="<?php $t=time(); echo $t; $_SESSION['submitted_when']=$t; ?>" /> |
177 |
<p class="frm-nixhier">
|
|
177 |
<p class="nixhier"> |
|
178 | 178 |
email address: |
179 | 179 |
<label for="email">Leave this field email-address blank:</label> |
180 | 180 |
<input id="email" name="email" size="56" value="" /><br /> |
... | ... | |
221 | 221 |
$options = explode(',', $value); |
222 | 222 |
array_walk($options, 'make_option', (isset($_SESSION['field'.$field_id])?$_SESSION['field'.$field_id]:array())); |
223 | 223 |
$field['extra'] = explode(',',$field['extra']); |
224 |
$field['extra'][1] = ($field['extra'][1]='multiple') ? $field['extra'][1].'="'.$field['extra'][1].'"' : ''; |
|
224 | 225 |
$values[] = '<select name="field'.$field_id.'[]" id="field'.$field_id.'" size="'.$field['extra'][0].'" '.$field['extra'][1].' class="frm-select">'.implode($options).'</select>'.PHP_EOL; |
225 | 226 |
} elseif($field['type'] == 'heading') { |
226 | 227 |
$vars[] = '{FIELD}'; |
... | ... | |
296 | 297 |
(!isset($_POST['url']) OR $_POST['url']) |
297 | 298 |
)) { |
298 | 299 |
// spam |
299 |
header("Location: ".WB_URL.PAGES_DIRECTORY."");
|
|
300 |
header("Location: ".WB_URL.""); |
|
300 | 301 |
exit(); |
301 | 302 |
} |
302 | 303 |
// Submit form data |
303 | 304 |
// First start message settings |
304 | 305 |
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'mod_form_settings` '; |
305 | 306 |
$sql .= 'WHERE `section_id` = '.(int)$section_id.''; |
306 |
if($query_settings = $database->query($sql) ) { |
|
307 |
if($query_settings->numRows() > 0) { |
|
307 |
if($query_settings = $database->query($sql) ) |
|
308 |
{ |
|
309 |
if($query_settings->numRows() > 0) |
|
310 |
{ |
|
308 | 311 |
$fetch_settings = $query_settings->fetchRow(MYSQL_ASSOC); |
309 | 312 |
|
310 | 313 |
// $email_to = $fetch_settings['email_to']; |
311 | 314 |
$email_to = (($fetch_settings['email_to'] != '') ? $fetch_settings['email_to'] : emailAdmin()); |
312 |
$email_from = $admin->add_slashes(SERVER_EMAIL);
|
|
315 |
$email_from = $wb->add_slashes(SERVER_EMAIL);
|
|
313 | 316 |
/* |
314 | 317 |
if(substr($email_from, 0, 5) == 'field') { |
315 | 318 |
// Set the email from field to what the user entered in the specified field |
... | ... | |
317 | 320 |
} |
318 | 321 |
*/ |
319 | 322 |
$email_fromname = $fetch_settings['email_fromname']; |
320 |
// $email_fromname = (($mail_replyName='') ? $fetch_settings['email_fromname'] : $mail_replyName);
|
|
321 |
$email_fromname = (($mail_replyName='') ? htmlspecialchars($wb->add_slashes($fetch_settings['email_fromname'])) : $mail_replyName); |
|
323 |
$email_fromname = (($mail_replyName='') ? $fetch_settings['email_fromname'] : $mail_replyName); |
|
324 |
// $email_fromname = (($mail_replyName='') ? htmlspecialchars($wb->add_slashes($fetch_settings['email_fromname'])) : $mail_replyName);
|
|
322 | 325 |
|
323 | 326 |
if(substr($email_fromname, 0, 5) == 'field') { |
324 | 327 |
// Set the email_fromname to field to what the user entered in the specified field |
... | ... | |
328 | 331 |
$email_subject = (($fetch_settings['email_subject'] != '') ? $fetch_settings['email_subject'] : $MOD_FORM['EMAIL_SUBJECT']); |
329 | 332 |
$success_page = $fetch_settings['success_page']; |
330 | 333 |
$success_email_to = $mail_replyto; |
334 |
$success_email_from = $wb->add_slashes(SERVER_EMAIL); |
|
335 |
$success_email_fromname = $fetch_settings['success_email_fromname']; |
|
331 | 336 |
/* |
332 |
$success_email_to = (($fetch_settings['success_email_to'] != '') ? $fetch_settings['success_email_to'] : ''); |
|
333 |
if(substr($success_email_to, 0, 5) == 'field') { |
|
334 |
// Set the success_email to field to what the user entered in the specified field |
|
335 |
$success_email_to = htmlspecialchars($wb->add_slashes($_POST[$success_email_to])); |
|
337 |
*/ |
|
338 |
if($mail_replyto == '') { |
|
339 |
$success_email_to = (($fetch_settings['success_email_to'] != '') ? $fetch_settings['success_email_to'] : ''); |
|
340 |
if(substr($success_email_to, 0, 5) == 'field') { |
|
341 |
// Set the success_email to field to what the user entered in the specified field |
|
342 |
$mail_replyto = $success_email_to = htmlspecialchars($wb->add_slashes($_POST[$success_email_to])); |
|
343 |
} |
|
344 |
$success_email_to = ''; |
|
345 |
$email_fromname = $TEXT['UNKNOWN']; |
|
346 |
// $success_email_fromname = $TEXT['UNKNOWN']; |
|
347 |
// $email_from = $TEXT['UNKNOWN']; |
|
336 | 348 |
} |
337 |
*/ |
|
338 |
$success_email_from = $admin->add_slashes(SERVER_EMAIL); |
|
339 |
$success_email_fromname = $fetch_settings['success_email_fromname']; |
|
349 |
|
|
340 | 350 |
$success_email_text = htmlspecialchars($wb->add_slashes($fetch_settings['success_email_text'])); |
341 | 351 |
$success_email_text = (($success_email_text != '') ? $success_email_text : $MOD_FORM['SUCCESS_EMAIL_TEXT']); |
342 | 352 |
$success_email_subject = (($fetch_settings['success_email_subject'] != '') ? $fetch_settings['success_email_subject'] : $MOD_FORM['SUCCESS_EMAIL_SUBJECT']); |
... | ... | |
388 | 398 |
$_SESSION['field'.$field['field_id']] = str_replace(array("[[", "]]"), array("[[", "]]"), htmlspecialchars($wb->strip_slashes($_POST['field'.$field['field_id']]))); |
389 | 399 |
} |
390 | 400 |
|
391 |
if($field['type'] == 'email' AND $admin->validate_email($_POST['field'.$field['field_id']]) == false) {
|
|
401 |
if($field['type'] == 'email' AND $wb->validate_email($_POST['field'.$field['field_id']]) == false) {
|
|
392 | 402 |
$email_error = $MESSAGE['USERS_INVALID_EMAIL']; |
393 | 403 |
$required[]= ''; |
394 | 404 |
} |
... | ... | |
420 | 430 |
} else { |
421 | 431 |
echo '<h3>'.$MESSAGE['MOD_FORM_REQUIRED_FIELDS'].'</h3>'; |
422 | 432 |
} |
423 |
echo "<ul>\n";
|
|
433 |
echo "<ol class=\"warning\">\n";
|
|
424 | 434 |
foreach($required AS $field_title) { |
425 | 435 |
if($field_title!=''){ |
426 | 436 |
echo '<li>'.$field_title."</li>\n"; |
... | ... | |
436 | 446 |
} |
437 | 447 |
// Create blank "required" array |
438 | 448 |
$required = array(); |
439 |
echo "</ul>\n";
|
|
449 |
echo "</ol>\n";
|
|
440 | 450 |
|
441 | 451 |
echo '<p> </p>'."\n".'<p><a href="'.htmlspecialchars(strip_tags($_SERVER['SCRIPT_NAME'])).'">'.$TEXT['BACK'].'</a></p>'."\n"; |
442 | 452 |
} else { |
443 | 453 |
if(isset($email_error)) { |
444 |
echo '<br /><ul>'."\n";
|
|
454 |
echo '<br /><ol class=\"warning\">'."\n";
|
|
445 | 455 |
echo '<li>'.$email_error.'</li>'."\n"; |
446 |
echo '</ul>'."\n";
|
|
456 |
echo '</ol>'."\n";
|
|
447 | 457 |
echo '<a href="'.htmlspecialchars(strip_tags($_SERVER['SCRIPT_NAME'])).'">'.$TEXT['BACK'].'</a>'; |
448 | 458 |
} elseif(isset($captcha_error)) { |
449 |
echo '<br /><ul>'."\n";
|
|
459 |
echo '<br /><ol class=\"warning\">'."\n";
|
|
450 | 460 |
echo '<li>'.$captcha_error.'</li>'."\n"; |
451 |
echo '</ul>'."\n";
|
|
461 |
echo '</ol>'."\n";
|
|
452 | 462 |
echo '<p> </p>'."\n".'<p><a href="'.htmlspecialchars(strip_tags($_SERVER['SCRIPT_NAME'])).'">'.$TEXT['BACK'].'</a></p>'."\n"; |
453 | 463 |
} else { |
454 | 464 |
// Check how many times form has been submitted in last hour |
... | ... | |
474 | 484 |
$email_fromname = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $recipient ); |
475 | 485 |
$email_body = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $email_body ); |
476 | 486 |
|
477 |
if($email_to != '') { |
|
487 |
if($mail_replyto != '') { |
|
488 |
|
|
478 | 489 |
if($email_from != '') { |
479 | 490 |
$success = $wb->mail(SERVER_EMAIL,$email_to,$email_subject,$email_body,$email_fromname,$mail_replyto); |
480 | 491 |
} else { |
... | ... | |
487 | 498 |
$recipient = preg_replace( "/[^a-z0-9 !?:;,.\/_\-=+@#$&\*\(\)]/im", "", $success_email_fromname ); |
488 | 499 |
$success_email_fromname = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $recipient ); |
489 | 500 |
$success_email_text = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $success_email_text ); |
490 |
if($success_email_to != '') { |
|
491 |
if($success_email_from != '') { |
|
492 |
$success = $wb->mail(SERVER_EMAIL,$success_email_to,$success_email_subject,($success_email_text).$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'],$success_email_fromname,$mail_replyto); |
|
501 |
if($success_email_to != '') |
|
502 |
{ |
|
503 |
if($success_email_from != '') |
|
504 |
{ |
|
505 |
$success = $wb->mail(SERVER_EMAIL,$success_email_to,$success_email_subject,($success_email_text).'<br /><br />'.($email_body).$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'],$success_email_fromname); |
|
493 | 506 |
} else { |
494 |
$success = $wb->mail('',$success_email_to,$success_email_subject,($success_email_text).$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'],$success_email_fromname,$mail_replyto);
|
|
507 |
$success = $wb->mail('',$success_email_to,$success_email_subject,($success_email_text).'<br /><br />'.($email_body).$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'],$success_email_fromname);
|
|
495 | 508 |
} |
496 | 509 |
} |
497 | 510 |
} |
498 | 511 |
|
499 | 512 |
if($success==true) |
500 | 513 |
{ |
514 |
$aSuccess[] .= 'INSERT INTO '.TABLE_PREFIX.'mod_form_submissions<br /> ';; |
|
501 | 515 |
// Write submission to database |
502 |
if(isset($admin) AND $admin->is_authenticated() AND $admin->get_user_id() > 0) {
|
|
503 |
$submitted_by = $admin->get_user_id();
|
|
516 |
if(isset($wb) AND $wb->is_authenticated() AND $wb->get_user_id() > 0) {
|
|
517 |
$submitted_by = $wb->get_user_id();
|
|
504 | 518 |
} else { |
505 | 519 |
$submitted_by = 0; |
506 | 520 |
} |
... | ... | |
514 | 528 |
$sql .= 'body=\''.$email_body.'\' '; |
515 | 529 |
if($database->query($sql)) |
516 | 530 |
{ |
531 |
// Get the page id |
|
532 |
$iSubmissionId = intval($database->get_one("SELECT LAST_INSERT_ID()")); |
|
533 |
|
|
517 | 534 |
if(!$database->is_error()) { |
518 | 535 |
$success = true; |
519 | 536 |
} |
... | ... | |
556 | 573 |
if(isset($success) && $success == true) |
557 | 574 |
{ |
558 | 575 |
if ($success_page=='none') { |
559 |
echo str_replace("\n","<br />",($success_email_text)); |
|
560 |
echo '<p> </p>'.PHP_EOL.'<p><a href="'.htmlspecialchars(strip_tags($_SERVER['SCRIPT_NAME'])).'">'.$TEXT['BACK'].'</a></p>'.PHP_EOL; |
|
576 |
|
|
577 |
// Get submission details |
|
578 |
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'mod_form_submissions` '; |
|
579 |
$sql .= 'WHERE submission_id = '.$iSubmissionId.' '; |
|
580 |
if($query_content = $database->query($sql)) { |
|
581 |
$submission = $query_content->fetchRow(MYSQL_ASSOC); |
|
582 |
} |
|
583 |
$Message = ''; |
|
584 |
$NixHier = 'nixhier'; |
|
585 |
// Get the user details of whoever did this submission |
|
586 |
$sql = 'SELECT `username`,`display_name` FROM `'.TABLE_PREFIX.'users` '; |
|
587 |
$sql .= 'WHERE `user_id` = '.$submission['submitted_by']; |
|
588 |
if($get_user = $database->query($sql)) |
|
589 |
{ |
|
590 |
if($get_user->numRows() != 0) { |
|
591 |
$user = $get_user->fetchRow(MYSQL_ASSOC); |
|
592 |
} else { |
|
593 |
$Message = $MOD_FORM['PRINT']; |
|
594 |
$NixHier = ''; |
|
595 |
$user['display_name'] = $TEXT['GUEST']; |
|
596 |
$user['username'] = $TEXT['UNKNOWN']; |
|
597 |
} |
|
598 |
} |
|
599 |
|
|
600 |
$aSubSuccess = array(); |
|
601 |
// set template file and assign module and template block |
|
602 |
$oTpl = new Template(WB_PATH.'/modules/form/htt','keep'); |
|
603 |
// $tpl = new Template(dirname($admin->correct_theme_source('switchform.htt')),'keep'); |
|
604 |
$oTpl->set_file('page', 'submessage.htt'); |
|
605 |
$oTpl->debug = false; // false, true |
|
606 |
$oTpl->set_block('page', 'main_block', 'main'); |
|
607 |
$oTpl->set_var(array( |
|
608 |
'ADMIN_URL' => ADMIN_URL, |
|
609 |
'THEME_URL' => THEME_URL, |
|
610 |
'MODULE_URL' => dirname(__FILE__), |
|
611 |
'WB_URL' => WB_URL |
|
612 |
) |
|
613 |
); |
|
614 |
$oTpl->set_var(array( |
|
615 |
'SUCCESS_EMAIL_TEXT' => $success_email_text, |
|
616 |
'TEXT_SUBMISSION_ID' => $TEXT['SUBMISSION_ID'], |
|
617 |
'submission_submission_id' => $submission['submission_id'], |
|
618 |
'TEXT_SUBMITTED' => $TEXT['SUBMITTED'], |
|
619 |
'submission_submitted_when' => gmdate( DATE_FORMAT .', '.TIME_FORMAT, $submission['submitted_when']+TIMEZONE ), |
|
620 |
'NIX_HIER' => $NixHier, |
|
621 |
'TEXT_USER' => $TEXT['USER'], |
|
622 |
'TEXT_PRINT_PAGE' => $TEXT['PRINT_PAGE'], |
|
623 |
'TEXT_REQUIRED_JS' => $TEXT['REQUIRED_JS'], |
|
624 |
'user_display_name' => $user['display_name'], |
|
625 |
'user_username' => $user['username'], |
|
626 |
'SUCCESS_PRINT' => $Message, |
|
627 |
'submission_body' => nl2br($submission['body']) |
|
628 |
) |
|
629 |
); |
|
630 |
|
|
631 |
$oTpl->parse('main', 'main_block', false); |
|
632 |
$output = $oTpl->finish($oTpl->parse('output', 'page')); |
|
633 |
unset($oTpl); |
|
634 |
print $output; |
|
635 |
|
|
561 | 636 |
} else { |
562 | 637 |
echo "<script type='text/javascript'>location.href='".$sSuccessLink."';</script>"; |
563 | 638 |
} |
branches/2.8.x/wb/modules/form/save_settings.php | ||
---|---|---|
4 | 4 |
* @category module |
5 | 5 |
* @package Form |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
12 | 12 |
* @version $Id$ |
13 | 13 |
* @filesource $HeadURL$ |
14 | 14 |
* @lastmodified $Date$ |
15 |
* @description
|
|
15 |
* @description |
|
16 | 16 |
*/ |
17 | 17 |
|
18 | 18 |
require('../../config.php'); |
... | ... | |
48 | 48 |
// load module language file |
49 | 49 |
$lang = (dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php'; |
50 | 50 |
require_once(!file_exists($lang) ? (dirname(__FILE__)) . '/languages/EN.php' : $lang ); |
51 |
// later in upgrade.php |
|
52 |
$table_name = TABLE_PREFIX.'mod_form_settings'; |
|
53 |
$field_name = 'perpage_submissions'; |
|
54 |
$description = "INT NOT NULL DEFAULT '10' AFTER `max_submissions`"; |
|
55 |
if(!$database->field_exists($table_name,$field_name)) { |
|
56 |
$database->field_add($table_name, $field_name, $description); |
|
57 |
} |
|
51 | 58 |
|
59 |
|
|
52 | 60 |
// This code removes any <?php tags and adds slashes |
53 | 61 |
$friendly = array('<', '>', '?php'); |
54 | 62 |
$raw = array('<', '>', ''); |
55 |
$header = $admin->add_slashes($_POST['header']); |
|
63 |
$header = $admin->add_slashes($_POST['header']);
|
|
56 | 64 |
$field_loop = $admin->add_slashes($_POST['field_loop']); |
57 |
$footer = $admin->add_slashes($_POST['footer']); |
|
58 |
$email_to = $admin->add_slashes($_POST['email_to']); |
|
59 |
$email_to = ($email_to != '' ? $email_to : emailAdmin()); |
|
65 |
$footer = $admin->add_slashes($_POST['footer']);
|
|
66 |
$email_to = $admin->add_slashes($_POST['email_to']);
|
|
67 |
$email_to = ($email_to != '' ? $email_to : emailAdmin());
|
|
60 | 68 |
$email_from = $admin->add_slashes(SERVER_EMAIL); |
61 | 69 |
$use_captcha = $admin->add_slashes($_POST['use_captcha']); |
62 | 70 |
/* |
... | ... | |
84 | 92 |
$success_email_subject = $admin->add_slashes($_POST['success_email_subject']); |
85 | 93 |
$success_email_subject = (($success_email_subject != '') ? $success_email_subject : ''); |
86 | 94 |
|
95 |
//print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.''.' );</strong> basename: '.basename(__FILE__).' line: '.__LINE__.' -> <br />'; |
|
96 |
//print_r( $_POST ); print '</pre>'; |
|
97 |
|
|
87 | 98 |
if(!is_numeric($_POST['max_submissions'])) { |
88 | 99 |
$max_submissions = 50; |
89 | 100 |
} else { |
... | ... | |
94 | 105 |
} else { |
95 | 106 |
$stored_submissions = $_POST['stored_submissions']; |
96 | 107 |
} |
108 |
if(!is_numeric($_POST['perpage_submissions'])) { |
|
109 |
$perpage_submissions = 10; |
|
110 |
} else { |
|
111 |
$perpage_submissions = $_POST['perpage_submissions']; |
|
112 |
} |
|
97 | 113 |
// Make sure max submissions is not greater than stored submissions if stored_submissions <>0 |
98 | 114 |
if($max_submissions > $stored_submissions) { |
99 | 115 |
$max_submissions = $stored_submissions; |
... | ... | |
117 | 133 |
$sql .= '`success_email_subject` = \''.$success_email_subject.'\', '; |
118 | 134 |
$sql .= '`max_submissions` = \''.$max_submissions.'\', '; |
119 | 135 |
$sql .= '`stored_submissions` = \''.$stored_submissions.'\', '; |
136 |
$sql .= '`perpage_submissions` = \''.$perpage_submissions.'\', '; |
|
120 | 137 |
$sql .= '`use_captcha` = \''.$use_captcha.'\' '; |
121 | 138 |
$sql .= 'WHERE `section_id` = '.(int)$section_id.' '; |
122 | 139 |
$sql .= ''; |
branches/2.8.x/wb/modules/form/languages/NL.php | ||
---|---|---|
32 | 32 |
$MOD_FORM['EMAIL_SUBJECT'] = 'Delivering a message from {{WEBSITE_TITLE}}'; |
33 | 33 |
$MOD_FORM['SUCCESS_EMAIL_SUBJECT'] = 'You have submitted a message by {{WEBSITE_TITLE}}'; |
34 | 34 |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}'; |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}! '; |
|
36 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] .= 'We will be going to contact you as soon as possible'; |
|
37 |
|
|
36 | 38 |
$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'] = "\n\n\n" |
37 | 39 |
."****************************************************************************\n" |
38 | 40 |
."This is an automatically generated e-mail. The sender\'s address of this e-mail\n" |
... | ... | |
40 | 42 |
."If you have received this e-mail by mistake, please contact us and delete this message\n" |
41 | 43 |
."****************************************************************************\n"; |
42 | 44 |
|
45 |
$MOD_FORM['REPLYTO'] = 'E-Mail reply to'; |
|
43 | 46 |
$MOD_FORM['FROM'] = 'Sender'; |
44 | 47 |
$MOD_FORM['TO'] = 'Recipient'; |
45 | 48 |
|
46 | 49 |
$MOD_FORM['EXCESS_SUBMISSIONS'] = 'Sorry, this form has been submitted too many times so far this hour. Please retry in the next hour.'; |
47 | 50 |
$MOD_FORM['INCORRECT_CAPTCHA'] = 'The verification number (also known as Captcha) that you entered is incorrect. If you are having problems reading the Captcha, please email to the <a href="mailto:{{webmaster_email}}">webmaster</a>'; |
51 |
|
|
52 |
$MOD_FORM['PRINT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible! '; |
|
53 |
$MOD_FORM['PRINT'] .= 'Please print this message!'; |
|
54 |
|
|
48 | 55 |
$MOD_FORM['REQUIRED_FIELDS'] = 'You must enter details for the following fields'; |
49 | 56 |
$MOD_FORM['RECIPIENT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible!'; |
50 | 57 |
$MOD_FORM['ERROR'] = 'E-Mail could not send!!'; |
58 |
|
|
59 |
$TEXT['GUEST'] = 'Guest'; |
|
60 |
$TEXT['PRINT_PAGE'] = 'Print page'; |
|
61 |
$TEXT['REQUIRED_JS'] = 'Required Javascript'; |
|
62 |
$TEXT['SUBMISSIONS_PERPAGE'] = 'Show submissions rows per page'; |
|
63 |
$TEXT['UNKNOWN'] = 'Unknown'; |
branches/2.8.x/wb/modules/form/languages/NO.php | ||
---|---|---|
32 | 32 |
$MOD_FORM['EMAIL_SUBJECT'] = 'Delivering a message from {{WEBSITE_TITLE}}'; |
33 | 33 |
$MOD_FORM['SUCCESS_EMAIL_SUBJECT'] = 'You have submitted a message by {{WEBSITE_TITLE}}'; |
34 | 34 |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}'; |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}! '; |
|
36 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] .= 'We will be going to contact you as soon as possible'; |
|
37 |
|
|
36 | 38 |
$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'] = "\n\n\n" |
37 | 39 |
."****************************************************************************\n" |
38 | 40 |
."This is an automatically generated e-mail. The sender\'s address of this e-mail\n" |
... | ... | |
40 | 42 |
."If you have received this e-mail by mistake, please contact us and delete this message\n" |
41 | 43 |
."****************************************************************************\n"; |
42 | 44 |
|
45 |
$MOD_FORM['REPLYTO'] = 'E-Mail reply to'; |
|
43 | 46 |
$MOD_FORM['FROM'] = 'Sender'; |
44 | 47 |
$MOD_FORM['TO'] = 'Recipient'; |
45 | 48 |
|
46 | 49 |
$MOD_FORM['EXCESS_SUBMISSIONS'] = 'Sorry, this form has been submitted too many times so far this hour. Please retry in the next hour.'; |
47 | 50 |
$MOD_FORM['INCORRECT_CAPTCHA'] = 'The verification number (also known as Captcha) that you entered is incorrect. If you are having problems reading the Captcha, please email to the <a href="mailto:{{webmaster_email}}">webmaster</a>'; |
51 |
|
|
52 |
$MOD_FORM['PRINT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible! '; |
|
53 |
$MOD_FORM['PRINT'] .= 'Please print this message!'; |
|
54 |
|
|
48 | 55 |
$MOD_FORM['REQUIRED_FIELDS'] = 'You must enter details for the following fields'; |
49 | 56 |
$MOD_FORM['RECIPIENT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible!'; |
50 | 57 |
$MOD_FORM['ERROR'] = 'E-Mail could not send!!'; |
58 |
|
|
59 |
$TEXT['GUEST'] = 'Guest'; |
|
60 |
$TEXT['PRINT_PAGE'] = 'Print page'; |
|
61 |
$TEXT['REQUIRED_JS'] = 'Required Javascript'; |
|
62 |
$TEXT['SUBMISSIONS_PERPAGE'] = 'Show submissions rows per page'; |
|
63 |
$TEXT['UNKNOWN'] = 'Unknown'; |
branches/2.8.x/wb/modules/form/languages/EN.php | ||
---|---|---|
4 | 4 |
* @category module |
5 | 5 |
* @package Form |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
32 | 32 |
$MOD_FORM['EMAIL_SUBJECT'] = 'Delivering a message from {{WEBSITE_TITLE}}'; |
33 | 33 |
$MOD_FORM['SUCCESS_EMAIL_SUBJECT'] = 'You have submitted a message by {{WEBSITE_TITLE}}'; |
34 | 34 |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}'; |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}! '; |
|
36 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] .= 'We will be going to contact you as soon as possible'; |
|
37 |
|
|
36 | 38 |
$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'] = "\n\n\n" |
37 | 39 |
."****************************************************************************\n" |
38 | 40 |
."This is an automatically generated e-mail. The sender\'s address of this e-mail\n" |
... | ... | |
40 | 42 |
."If you have received this e-mail by mistake, please contact us and delete this message\n" |
41 | 43 |
."****************************************************************************\n"; |
42 | 44 |
|
45 |
$MOD_FORM['REPLYTO'] = 'E-Mail reply to'; |
|
43 | 46 |
$MOD_FORM['FROM'] = 'Sender'; |
44 | 47 |
$MOD_FORM['TO'] = 'Recipient'; |
45 | 48 |
|
46 | 49 |
$MOD_FORM['EXCESS_SUBMISSIONS'] = 'Sorry, this form has been submitted too many times so far this hour. Please retry in the next hour.'; |
47 | 50 |
$MOD_FORM['INCORRECT_CAPTCHA'] = 'The verification number (also known as Captcha) that you entered is incorrect. If you are having problems reading the Captcha, please email to the <a href="mailto:{{webmaster_email}}">webmaster</a>'; |
51 |
|
|
52 |
$MOD_FORM['PRINT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible! '; |
|
53 |
$MOD_FORM['PRINT'] .= 'Please print this message!'; |
|
54 |
|
|
48 | 55 |
$MOD_FORM['REQUIRED_FIELDS'] = 'You must enter details for the following fields'; |
49 | 56 |
$MOD_FORM['RECIPIENT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible!'; |
50 | 57 |
$MOD_FORM['ERROR'] = 'E-Mail could not send!!'; |
58 |
|
|
59 |
$TEXT['GUEST'] = 'Guest'; |
|
60 |
$TEXT['PRINT_PAGE'] = 'Print page'; |
|
61 |
$TEXT['REQUIRED_JS'] = 'Required Javascript'; |
|
62 |
$TEXT['SUBMISSIONS_PERPAGE'] = 'Show submissions rows per page'; |
|
63 |
$TEXT['UNKNOWN'] = 'Unknown'; |
branches/2.8.x/wb/modules/form/languages/DA.php | ||
---|---|---|
32 | 32 |
$MOD_FORM['EMAIL_SUBJECT'] = 'Delivering a message from {{WEBSITE_TITLE}}'; |
33 | 33 |
$MOD_FORM['SUCCESS_EMAIL_SUBJECT'] = 'You have submitted a message by {{WEBSITE_TITLE}}'; |
34 | 34 |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}'; |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}! '; |
|
36 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] .= 'We will be going to contact you as soon as possible'; |
|
37 |
|
|
36 | 38 |
$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'] = "\n\n\n" |
37 | 39 |
."****************************************************************************\n" |
38 | 40 |
."This is an automatically generated e-mail. The sender\'s address of this e-mail\n" |
... | ... | |
40 | 42 |
."If you have received this e-mail by mistake, please contact us and delete this message\n" |
41 | 43 |
."****************************************************************************\n"; |
42 | 44 |
|
45 |
$MOD_FORM['REPLYTO'] = 'E-Mail reply to'; |
|
43 | 46 |
$MOD_FORM['FROM'] = 'Sender'; |
44 | 47 |
$MOD_FORM['TO'] = 'Recipient'; |
45 | 48 |
|
46 | 49 |
$MOD_FORM['EXCESS_SUBMISSIONS'] = 'Sorry, this form has been submitted too many times so far this hour. Please retry in the next hour.'; |
47 | 50 |
$MOD_FORM['INCORRECT_CAPTCHA'] = 'The verification number (also known as Captcha) that you entered is incorrect. If you are having problems reading the Captcha, please email to the <a href="mailto:{{webmaster_email}}">webmaster</a>'; |
51 |
|
|
52 |
$MOD_FORM['PRINT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible! '; |
|
53 |
$MOD_FORM['PRINT'] .= 'Please print this message!'; |
|
54 |
|
|
48 | 55 |
$MOD_FORM['REQUIRED_FIELDS'] = 'You must enter details for the following fields'; |
49 | 56 |
$MOD_FORM['RECIPIENT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible!'; |
50 | 57 |
$MOD_FORM['ERROR'] = 'E-Mail could not send!!'; |
58 |
|
|
59 |
$TEXT['GUEST'] = 'Guest'; |
|
60 |
$TEXT['PRINT_PAGE'] = 'Print page'; |
|
61 |
$TEXT['REQUIRED_JS'] = 'Required Javascript'; |
|
62 |
$TEXT['SUBMISSIONS_PERPAGE'] = 'Show submissions rows per page'; |
|
63 |
$TEXT['UNKNOWN'] = 'Unknown'; |
branches/2.8.x/wb/modules/form/languages/RU.php | ||
---|---|---|
23 | 23 |
/* -------------------------------------------------------- */ |
24 | 24 |
|
25 | 25 |
//Modul Description |
26 |
$module_description = 'Модуль позволяет создавать различные настраиваемые формы, например формы обратной связи. Rudolph Lartey помог улучшить данный модуль.'; |
|
27 | 26 |
|
28 | 27 |
//Variables for the backend |
29 | 28 |
$MOD_FORM['SETTINGS'] = 'Form Settings'; |
... | ... | |
32 | 31 |
$MOD_FORM['EMAIL_SUBJECT'] = 'Delivering a message from {{WEBSITE_TITLE}}'; |
33 | 32 |
$MOD_FORM['SUCCESS_EMAIL_SUBJECT'] = 'You have submitted a message by {{WEBSITE_TITLE}}'; |
34 | 33 |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}'; |
|
34 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}! '; |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] .= 'We will be going to contact you as soon as possible'; |
|
36 |
|
|
36 | 37 |
$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'] = "\n\n\n" |
37 | 38 |
."****************************************************************************\n" |
38 | 39 |
."This is an automatically generated e-mail. The sender\'s address of this e-mail\n" |
... | ... | |
40 | 41 |
."If you have received this e-mail by mistake, please contact us and delete this message\n" |
41 | 42 |
."****************************************************************************\n"; |
42 | 43 |
|
44 |
$MOD_FORM['REPLYTO'] = 'E-Mail reply to'; |
|
43 | 45 |
$MOD_FORM['FROM'] = 'Sender'; |
44 | 46 |
$MOD_FORM['TO'] = 'Recipient'; |
45 | 47 |
|
46 | 48 |
$MOD_FORM['EXCESS_SUBMISSIONS'] = 'Sorry, this form has been submitted too many times so far this hour. Please retry in the next hour.'; |
47 | 49 |
$MOD_FORM['INCORRECT_CAPTCHA'] = 'The verification number (also known as Captcha) that you entered is incorrect. If you are having problems reading the Captcha, please email to the <a href="mailto:{{webmaster_email}}">webmaster</a>'; |
50 |
|
|
51 |
$MOD_FORM['PRINT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible! '; |
|
52 |
$MOD_FORM['PRINT'] .= 'Please print this message!'; |
|
53 |
|
|
48 | 54 |
$MOD_FORM['REQUIRED_FIELDS'] = 'You must enter details for the following fields'; |
49 | 55 |
$MOD_FORM['RECIPIENT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible!'; |
50 | 56 |
$MOD_FORM['ERROR'] = 'E-Mail could not send!!'; |
57 |
|
|
58 |
$TEXT['GUEST'] = 'Guest'; |
|
59 |
$TEXT['PRINT_PAGE'] = 'Print page'; |
|
60 |
$TEXT['REQUIRED_JS'] = 'Required Javascript'; |
|
61 |
$TEXT['SUBMISSIONS_PERPAGE'] = 'Show submissions rows per page'; |
|
62 |
$TEXT['UNKNOWN'] = 'Unknown'; |
branches/2.8.x/wb/modules/form/languages/FR.php | ||
---|---|---|
4 | 4 |
* @category module |
5 | 5 |
* @package Form |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
32 | 32 |
$MOD_FORM['EMAIL_SUBJECT'] = 'Delivering a message from {{WEBSITE_TITLE}}'; |
33 | 33 |
$MOD_FORM['SUCCESS_EMAIL_SUBJECT'] = 'You have submitted a message by {{WEBSITE_TITLE}}'; |
34 | 34 |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}'; |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Thank you for sending your message to {{WEBSITE_TITLE}}! '; |
|
36 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] .= 'We will be going to contact you as soon as possible'; |
|
37 |
|
|
36 | 38 |
$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'] = "\n\n\n" |
37 | 39 |
."****************************************************************************\n" |
38 | 40 |
."This is an automatically generated e-mail. The sender\'s address of this e-mail\n" |
... | ... | |
40 | 42 |
."If you have received this e-mail by mistake, please contact us and delete this message\n" |
41 | 43 |
."****************************************************************************\n"; |
42 | 44 |
|
45 |
$MOD_FORM['REPLYTO'] = 'E-Mail reply to'; |
|
43 | 46 |
$MOD_FORM['FROM'] = 'Sender'; |
44 | 47 |
$MOD_FORM['TO'] = 'Recipient'; |
45 | 48 |
|
46 | 49 |
$MOD_FORM['EXCESS_SUBMISSIONS'] = 'Sorry, this form has been submitted too many times so far this hour. Please retry in the next hour.'; |
47 | 50 |
$MOD_FORM['INCORRECT_CAPTCHA'] = 'The verification number (also known as Captcha) that you entered is incorrect. If you are having problems reading the Captcha, please email to the <a href="mailto:{{webmaster_email}}">webmaster</a>'; |
51 |
|
|
52 |
$MOD_FORM['PRINT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible! '; |
|
53 |
$MOD_FORM['PRINT'] .= 'Please print this message!'; |
|
54 |
|
|
48 | 55 |
$MOD_FORM['REQUIRED_FIELDS'] = 'You must enter details for the following fields'; |
49 | 56 |
$MOD_FORM['RECIPIENT'] = 'E-mail confirmation occurs only to valid e-mail address of the user announced in each case! Dispatch to unchecked addresses is not possible!'; |
50 | 57 |
$MOD_FORM['ERROR'] = 'E-Mail could not send!!'; |
58 |
|
|
59 |
$TEXT['GUEST'] = 'Guest'; |
|
60 |
$TEXT['PRINT_PAGE'] = 'Print page'; |
|
61 |
$TEXT['REQUIRED_JS'] = 'Required Javascript'; |
|
62 |
$TEXT['SUBMISSIONS_PERPAGE'] = 'Show submissions rows per page'; |
|
63 |
$TEXT['UNKNOWN'] = 'Unknown'; |
branches/2.8.x/wb/modules/form/languages/DE.php | ||
---|---|---|
4 | 4 |
* @category module |
5 | 5 |
* @package Form |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
32 | 32 |
$MOD_FORM['EMAIL_SUBJECT'] = 'Sie haben eine Nachricht über {{WEBSITE_TITLE}} erhalten'; |
33 | 33 |
$MOD_FORM['SUCCESS_EMAIL_SUBJECT'] = 'Sie haben ein Forumlar über {{WEBSITE_TITLE}} gesendet'; |
34 | 34 |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Vielen Dank für die Übermittlung Ihrer Nachricht an {{WEBSITE_TITLE}}'; |
|
35 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] = 'Vielen Dank für die Übermittlung Ihrer Nachricht an {{WEBSITE_TITLE}} '; |
|
36 |
$MOD_FORM['SUCCESS_EMAIL_TEXT'] .= 'Wir setzen uns schnellstens mit Ihnen in Verbindung'; |
|
37 |
|
|
36 | 38 |
$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'] = "\n\n\n" |
37 | 39 |
."**************************************************************\n" |
38 | 40 |
."Dies ist eine automatisch generierte E-Mail. Die Absenderadresse dieser E-Mail\n" |
39 | 41 |
."ist nur zum Versand, und nicht zum Empfang von Nachrichten eingerichtet!\n" |
40 | 42 |
."Falls Sie diese E-Mail versehentlich erhalten haben, setzen Sie sich bitte\n" |
41 |
."mit uns in Verbindung und löschen diese Nachricht von Ihrem Computer.\n"
|
|
43 |
."mit uns in Verbindung und löschen diese Nachricht von Ihrem Computer.\n"
|
|
42 | 44 |
."**************************************************************\n"; |
43 | 45 |
|
46 |
$MOD_FORM['REPLYTO'] = 'E-Mail beantworten'; |
|
44 | 47 |
$MOD_FORM['FROM'] = 'Absender'; |
45 | 48 |
$MOD_FORM['TO'] = 'Empfänger'; |
46 | 49 |
|
47 | 50 |
$MOD_FORM['EXCESS_SUBMISSIONS'] = 'Dieses Formular wurde zu oft aufgerufen. Bitte versuchen Sie es in einer Stunde noch einmal.'; |
51 |
$MOD_FORM['ERROR'] = 'E-Mail konnte nicht gesendet werden!!'; |
|
48 | 52 |
$MOD_FORM['INCORRECT_CAPTCHA'] = 'Die eingegebene Prüfziffer stimmt nicht überein. Wenn Sie Probleme mit dem Lesen der Prüfziffer haben, bitte schreiben Sie eine E-Mail an den <a href="mailto:{{webmaster_email}}">Webmaster</a>'; |
53 |
|
|
54 |
$MOD_FORM['PRINT'] = 'E-Mail Bestätigung erfolgt nur an die gültige E-Mail Adresse eines jeweils angemeldeten Benutzers! Versand an ungeprüfte Adressen ist nicht möglich! '; |
|
55 |
$MOD_FORM['PRINT'] .= 'Drucken Sie bitte diese Nachricht aus!'; |
|
56 |
|
|
49 | 57 |
$MOD_FORM['REQUIRED_FIELDS'] = 'Bitte folgende Angaben ergänzen'; |
50 |
$MOD_FORM['RECIPIENT'] = 'E-Mail Bestätigung erfolgt nur an die gültige E-Mail Adresse des jeweils angemeldeten Benutzers! Versand an ungeprüfte Adressen ist nicht möglich! '; |
|
51 |
$MOD_FORM['ERROR'] = 'E-Mail konnte nicht gesendet werden!!'; |
|
58 |
$MOD_FORM['RECIPIENT'] = 'E-Mail Bestätigung erfolgt nur an die gültige E-Mail Adresse des jeweils angemeldeten Benutzers! Versand an ungeprüfte Adressen ist nicht möglich!'; |
|
59 |
$MOD_FORM['SPAM'] = 'ACHTUNG! Beantworten einer ungeprüften E-Mail kann als Spam abgemahnt werden! '; |
|
60 |
|
|
61 |
$TEXT['GUEST'] = 'Gast'; |
|
62 |
$TEXT['PRINT_PAGE'] = 'Seite drucken'; |
|
63 |
$TEXT['REQUIRED_JS'] = 'Javascript erforderlich'; |
|
64 |
$TEXT['SUBMISSIONS_PERPAGE'] = 'Anzeige gespeicherte Einträge pro Seite'; |
|
65 |
$TEXT['UNKNOWN'] = 'Unbekannt'; |
branches/2.8.x/wb/modules/form/frontend.css | ||
---|---|---|
10 | 10 |
.frm-radio_label { font-size :11px; cursor :pointer; } |
11 | 11 |
.frm-email { font-size :12px; width : 90%; } |
12 | 12 |
/*** Don't remove the class nixhier, this is required for ASP ***/ |
13 |
.nixhier, |
|
13 | 14 |
.frm-nixhier { display :none; } |
14 |
.frm-submission { margin :0 auto; position :relative; width :auto; } |
|
15 |
.frm-submission { margin :0 auto; position :relative; width :auto; } |
|
16 |
.print-email { font-size :0.8em; color :#000; margin :10px auto; } |
|
17 |
.frm-warning { background :#ffeeee; border :0.2em #884444 solid; color :#e10000; margin-bottom :1em; padding :0.8em; font-size :1.2em; font-weight :bold; } |
|
18 |
.frm-note { background :#eeffee; border :0.2em #448844 solid; color :#004400; margin-bottom :1em; padding :0.8em; font-size :1.2em; font-weight :bold; } |
|
19 |
.previewPrintTop { text-align :right; font-size :0.9em; } |
|
20 |
.previewPrintTop img { padding-left :16px; } |
branches/2.8.x/wb/modules/form/DiggPagination.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
class m_form_DiggPagination |
|
4 |
{ |
|
5 |
|
|
6 |
/** |
|
7 |
* Builds & returns a variable containing the HTML code to display pagination links based on given params |
|
8 |
* |
|
9 |
* @param int $page - the current page |
|
10 |
* @param int $totalitems - the number of items to paginate (not total number of pages) |
|
11 |
* @param int $limit - the number of items per page |
|
12 |
* @param int $adjacents - the number of page links to put adjacent to the current page |
|
13 |
* @param string $targetpage - URL to the web page requiring pagination links |
|
14 |
* @param string $pagestring - the URL params to pass the new page value e.g. page/ (the number is inserted at the end of the string) |
|
15 |
* @param string $cssClass - the class of the containing DIV tag for the returned pagination |
|
16 |
* @return void |
|
17 |
* @author Stranger Studios, adapted by Rich Milns |
|
18 |
* @see http://www.strangerstudios.com/sandbox/pagination/diggstyle.php |
|
19 |
*/ |
|
20 |
static public function Pager( $page = 1, $totalitems, $limit = 15, $adjacents = 1, $targetpage = null, |
|
21 |
$pagestring = "?page=", $cssClass = 'pagination') |
|
22 |
{ |
|
23 |
$script_name = $_SERVER['SCRIPT_NAME']; |
|
24 |
$query_string = '&' . preg_replace( "/page=[0-9]{0,10}&/", "", $_SERVER['QUERY_STRING']) . '#submissions'; |
|
25 |
//$query_string = $_SERVER['QUERY_STRING']; |
|
26 |
|
|
27 |
//defaults |
|
28 |
if ( !$adjacents) { $adjacents = 1; } |
|
29 |
if ( !$limit) { $limit = 15; } |
|
30 |
if ( !$page) { $page = 1; } |
|
31 |
if ( !$targetpage) { $targetpage = $script_name; } |
|
32 |
if ( !isset( $margin)) { $margin = 5; } |
|
33 |
if ( !isset( $padding)) { $padding = 1; } |
|
34 |
//other vars |
|
35 |
$prev = $page - 1; //previous page is page - 1 |
|
36 |
$next = $page + 1; //next page is page + 1 |
|
37 |
$lastpage = ceil( $totalitems / $limit); //lastpage is = total items / items per page, rounded up. |
|
38 |
$lpm1 = $lastpage - 1; //last page minus 1 |
|
39 |
|
|
40 |
/* |
|
41 |
Now we apply our rules and draw the pagination object. |
|
42 |
We're actually saving the code to a variable in case we want to draw it more than once. |
|
43 |
*/ |
|
44 |
$pagination = ""; |
|
45 |
if ( $lastpage > 1) { |
|
46 |
$pagination .= "<div class=\"" . $cssClass . "\""; |
|
47 |
if ( $margin || $padding) { |
|
48 |
$pagination .= " style=\""; |
|
49 |
if ( $margin) { $pagination .= "margin: $margin;"; } |
|
50 |
if ( $padding) { $pagination .= "padding: $padding;"; } |
|
51 |
$pagination .= "\""; |
|
52 |
} |
|
53 |
$pagination .= ">"; |
|
54 |
|
|
55 |
//previous button |
|
56 |
if ( $page > 1) { |
|
57 |
$pagination .= "<a href=\"$targetpage$pagestring$prev$query_string\">« prev</a>"; |
|
58 |
} else { |
|
59 |
$pagination .= "<span class=\"disabled\">« prev</span>"; |
|
60 |
} |
|
61 |
|
|
62 |
//pages |
Also available in: Unified diff
! update module form
! not auth users get no confirmation mail, but can print message
! add replyto to received messages, so answer is possible by e-mail client
! add pagination to submissionlist