Version Description
- 11.12.2012 =
- NEW : Galician language file is added to the plugin.
- NEW : Multilanguage labels for fields is added to the plugin.
- Update : The shortcode structure was changed.
Download this release
Release Info
Developer | bestwebsoft |
Plugin | Contact Form by BestWebSoft |
Version | 3.28 |
Comparing to | |
See all releases |
Code changes from version 3.27 to 3.28
- contact_form.php +374 -135
- css/style.css +33 -20
- images/gray-grad.png +0 -0
- js/script.js +108 -19
- languages/contact_form-ar.mo +0 -0
- languages/contact_form-ar.po +183 -109
- languages/contact_form-bg_BG.mo +0 -0
- languages/contact_form-bg_BG.po +183 -109
- languages/contact_form-cs_CZ.mo +0 -0
- languages/contact_form-cs_CZ.po +183 -109
- languages/contact_form-da_DK.mo +0 -0
- languages/contact_form-da_DK.po +184 -109
- languages/contact_form-de_DE.mo +0 -0
- languages/contact_form-de_DE.po +186 -110
- languages/contact_form-el_GR.mo +0 -0
- languages/contact_form-el_GR.po +185 -109
- languages/contact_form-es_ES.mo +0 -0
- languages/contact_form-es_ES.po +184 -109
- languages/contact_form-fa_IR.mo +0 -0
- languages/contact_form-fa_IR.po +183 -109
- languages/contact_form-fr_FR.mo +0 -0
- languages/contact_form-fr_FR.po +185 -109
- languages/contact_form-gl_ES.mo +0 -0
- languages/contact_form-gl_ES.po +442 -0
- languages/contact_form-he_IL.mo +0 -0
- languages/contact_form-he_IL.po +194 -119
- languages/contact_form-hi_IN.mo +0 -0
- languages/contact_form-hi_IN.po +183 -109
- languages/contact_form-it_IT.mo +0 -0
- languages/contact_form-it_IT.po +183 -109
- languages/contact_form-ja.mo +0 -0
- languages/contact_form-ja.po +182 -109
- languages/contact_form-lt_LT.mo +0 -0
- languages/contact_form-lt_LT.po +183 -109
- languages/contact_form-nb_NO.mo +0 -0
- languages/contact_form-nb_NO.po +184 -109
- languages/contact_form-nl_NL.mo +0 -0
- languages/contact_form-nl_NL.po +183 -109
- languages/contact_form-pl_PL.mo +0 -0
- languages/contact_form-pl_PL.po +194 -119
- languages/contact_form-pt_BR.mo +0 -0
- languages/contact_form-pt_BR.po +184 -110
- languages/contact_form-pt_PT.mo +0 -0
- languages/contact_form-pt_PT.po +184 -110
- languages/contact_form-ro_RO.mo +0 -0
- languages/contact_form-ro_RO.po +183 -109
- languages/contact_form-ru_RU.mo +0 -0
- languages/contact_form-ru_RU.po +183 -109
- languages/contact_form-sr_RS.mo +0 -0
- languages/contact_form-sr_RS.po +183 -109
- languages/contact_form-sv_SE.mo +0 -0
- languages/contact_form-sv_SE.po +184 -109
- languages/contact_form-tr_TR.mo +0 -0
- languages/contact_form-tr_TR.po +183 -109
- readme.txt +10 -1
- screenshot-4.jpg +0 -0
contact_form.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form Plugin
|
|
4 |
Plugin URI: http://bestwebsoft.com/plugin/
|
5 |
Description: Plugin for Contact Form.
|
6 |
Author: BestWebSoft
|
7 |
-
Version: 3.
|
8 |
Author URI: http://bestwebsoft.com/
|
9 |
License: GPLv2 or later
|
10 |
*/
|
@@ -115,12 +115,14 @@ if( ! function_exists( 'cntctfrm_admin_menu' ) ) {
|
|
115 |
// Register settings for plugin
|
116 |
if( ! function_exists( 'cntctfrm_settings' ) ) {
|
117 |
function cntctfrm_settings() {
|
118 |
-
global $cntctfrm_options;
|
119 |
|
120 |
$cntctfrm_option_defaults = array(
|
121 |
'cntctfrm_user_email' => 'admin',
|
122 |
'cntctfrm_custom_email' => '',
|
123 |
'cntctfrm_select_email' => 'user',
|
|
|
|
|
124 |
'cntctfrm_additions_options' => 0,
|
125 |
'cntctfrm_attachment' => 0,
|
126 |
'cntctfrm_attachment_explanations' => 1,
|
@@ -138,21 +140,49 @@ if( ! function_exists( 'cntctfrm_settings' ) ) {
|
|
138 |
'cntctfrm_mail_method' => 'wp-mail',
|
139 |
'cntctfrm_display_coming_from' => 1,
|
140 |
'cntctfrm_display_user_agent' => 1,
|
|
|
141 |
'cntctfrm_change_label' => 0,
|
142 |
-
'cntctfrm_name_label' => __( "Name:", 'contact_form' ),
|
143 |
-
'cntctfrm_email_label' => __( "E-Mail Address:", 'contact_form' ),
|
144 |
-
'cntctfrm_phone_label' => __( "Phone:", 'contact_form' ),
|
145 |
-
'cntctfrm_subject_label' => __( "Subject:", 'contact_form' ),
|
146 |
-
'cntctfrm_message_label' => __( "Message:", 'contact_form' ),
|
147 |
-
'cntctfrm_attachment_label' => __( "Attachment:", 'contact_form' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
'cntctfrm_action_after_send' => 1,
|
149 |
-
'cntctfrm_thank_text' => __( "Thank you for contacting us.", 'contact_form' ),
|
150 |
'cntctfrm_redirect_url' => ''
|
151 |
);
|
152 |
if( ! get_option( 'cntctfrm_options' ) )
|
153 |
add_option( 'cntctfrm_options', $cntctfrm_option_defaults, '', 'yes' );
|
154 |
|
155 |
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
$cntctfrm_options = array_merge( $cntctfrm_option_defaults, $cntctfrm_options );
|
157 |
update_option( 'cntctfrm_options', $cntctfrm_options );
|
158 |
}
|
@@ -171,6 +201,8 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
171 |
$cntctfrm_options_submit['cntctfrm_user_email'] = $_REQUEST['cntctfrm_user_email'];
|
172 |
$cntctfrm_options_submit['cntctfrm_custom_email'] = stripslashes( $_REQUEST['cntctfrm_custom_email'] );
|
173 |
$cntctfrm_options_submit['cntctfrm_select_email'] = $_REQUEST['cntctfrm_select_email'];
|
|
|
|
|
174 |
$cntctfrm_options_submit['cntctfrm_additions_options'] = isset( $_REQUEST['cntctfrm_additions_options']) ? $_REQUEST['cntctfrm_additions_options'] : 0;
|
175 |
if($cntctfrm_options_submit['cntctfrm_additions_options'] == 0) {
|
176 |
$cntctfrm_options_submit['cntctfrm_attachment'] = 0;
|
@@ -190,29 +222,59 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
190 |
$cntctfrm_options_submit['cntctfrm_display_coming_from'] = 1;
|
191 |
$cntctfrm_options_submit['cntctfrm_display_user_agent'] = 1;
|
192 |
$cntctfrm_options_submit['cntctfrm_change_label'] = 0;
|
193 |
-
$cntctfrm_options_submit['cntctfrm_name_label'] = __( "Name:", 'contact_form' );
|
194 |
-
$cntctfrm_options_submit['cntctfrm_email_label'] = __( "E-Mail Address:", 'contact_form' );
|
195 |
-
$cntctfrm_options_submit['cntctfrm_subject_label'] = __( "Subject:", 'contact_form' );
|
196 |
-
$cntctfrm_options_submit['cntctfrm_message_label'] = __( "Message:", 'contact_form' );
|
197 |
-
$cntctfrm_options_submit['cntctfrm_attachment_label'] = __( "Attachment:", 'contact_form' );
|
198 |
$cntctfrm_options_submit['cntctfrm_action_after_send'] = 1;
|
199 |
-
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
} else {
|
202 |
-
$cntctfrm_options_submit['cntctfrm_attachment']
|
203 |
-
$cntctfrm_options_submit['cntctfrm_attachment_explanations']
|
204 |
-
$cntctfrm_options_submit['cntctfrm_send_copy']
|
205 |
-
$cntctfrm_options_submit['cntctfrm_from_field']
|
206 |
-
$cntctfrm_options_submit['cntctfrm_mail_method']
|
207 |
-
$cntctfrm_options_submit['cntctfrm_mail_method']
|
208 |
-
$cntctfrm_options_submit['cntctfrm_display_add_info']
|
209 |
-
$cntctfrm_options_submit['cntctfrm_change_label']
|
210 |
$cntctfrm_options_submit['cntctfrm_display_phone_field'] = isset( $_REQUEST['cntctfrm_display_phone_field']) ? 1 : 0;
|
211 |
$cntctfrm_options_submit['cntctfrm_required_name_field'] = isset( $_REQUEST['cntctfrm_required_name_field']) ? 1 : 0;
|
212 |
$cntctfrm_options_submit['cntctfrm_required_email_field'] = isset( $_REQUEST['cntctfrm_required_email_field']) ? 1 : 0;
|
213 |
$cntctfrm_options_submit['cntctfrm_required_phone_field'] = isset( $_REQUEST['cntctfrm_required_phone_field']) ? 1 : 0;
|
214 |
-
$cntctfrm_options_submit['cntctfrm_required_subject_field']
|
215 |
-
$cntctfrm_options_submit['cntctfrm_required_message_field']
|
216 |
|
217 |
if( $cntctfrm_options_submit['cntctfrm_display_add_info'] == 1 ) {
|
218 |
$cntctfrm_options_submit['cntctfrm_display_sent_from'] = isset( $_REQUEST['cntctfrm_display_sent_from']) ? 1 : 0;
|
@@ -227,25 +289,66 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
227 |
$cntctfrm_options_submit['cntctfrm_display_user_agent'] = 1;
|
228 |
}
|
229 |
if( $cntctfrm_options_submit['cntctfrm_change_label'] == 1 ) {
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
}
|
237 |
else {
|
238 |
-
$
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
}
|
245 |
$cntctfrm_options_submit['cntctfrm_action_after_send'] = $_REQUEST['cntctfrm_action_after_send'];
|
246 |
-
|
247 |
-
|
248 |
-
}
|
249 |
$cntctfrm_options = array_merge( $cntctfrm_options, $cntctfrm_options_submit );
|
250 |
if( $cntctfrm_options_submit['cntctfrm_action_after_send'] == 0
|
251 |
&& ( trim( $cntctfrm_options_submit['cntctfrm_redirect_url'] ) == ""
|
@@ -254,32 +357,44 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
254 |
$cntctfrm_options['cntctfrm_action_after_send'] = 1;
|
255 |
}
|
256 |
if( 'user' == $cntctfrm_options_submit['cntctfrm_select_email'] ) {
|
257 |
-
if( function_exists('get_userdatabylogin') && false !== get_userdatabylogin( $cntctfrm_options_submit['cntctfrm_user_email'] ) )
|
258 |
-
{
|
259 |
-
update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
|
260 |
-
$message = __( "Options saved.", 'contact_form' );
|
261 |
}
|
262 |
-
else if( false !== get_user_by( 'login', $cntctfrm_options_submit['cntctfrm_user_email'] ) )
|
263 |
-
{
|
264 |
-
update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
|
265 |
-
$message = __( "Options saved.", 'contact_form' );
|
266 |
}
|
267 |
else {
|
268 |
$error .=__( "Such user is not exist. Settings are not saved.", 'contact_form' );
|
269 |
}
|
270 |
}
|
271 |
else {
|
272 |
-
if( $cntctfrm_options_submit['cntctfrm_custom_email']
|
273 |
-
update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
|
274 |
-
$message = __( "Options saved.", 'contact_form' );
|
275 |
-
}
|
276 |
-
else {
|
277 |
-
var_dump($cntctfrm_options_submit['cntctfrm_custom_email']);
|
278 |
$error .= __( "Please input correct email. Settings are not saved.", 'contact_form' );
|
279 |
}
|
280 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
}
|
282 |
// Display form on the setting page
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
?>
|
284 |
<div class="wrap">
|
285 |
<div class="icon32 icon32-bws" id="icon-options-general"></div>
|
@@ -288,16 +403,14 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
288 |
<div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
|
289 |
<form method="post" action="admin.php?page=contact_form.php">
|
290 |
<span style="margin-bottom:15px;">
|
291 |
-
<p><?php _e( "If you would like to add a Contact Form to your website, just copy and put this shortcode onto your post or page or widget:", 'contact_form' ); ?> [contact_form]</p>
|
292 |
<?php _e( "If information in the below fields are empty then the message will be send to an address which was specified during registration.", 'contact_form' ); ?>
|
293 |
</span>
|
294 |
<table class="form-table">
|
295 |
<tr valign="top">
|
296 |
<th scope="row" style="width:195px;"><?php _e( "Use email of wordpress user:", 'contact_form' ); ?> </th>
|
297 |
-
<td
|
298 |
<input type="radio" id="cntctfrm_select_email_user" name="cntctfrm_select_email" value="user" <?php if($cntctfrm_options['cntctfrm_select_email'] == 'user') echo "checked=\"checked\" "; ?>/>
|
299 |
-
</td>
|
300 |
-
<td>
|
301 |
<select name="cntctfrm_user_email">
|
302 |
<option disabled><?php _e( "Select user name", 'contact_form' ); ?></option>
|
303 |
<?php while( list( $key, $value ) = each( $userslogin ) ) { ?>
|
@@ -309,11 +422,8 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
309 |
</tr>
|
310 |
<tr valign="top">
|
311 |
<th scope="row" style="width:195px;"><?php _e( "Use this email:", 'contact_form' ); ?> </th>
|
312 |
-
<td>
|
313 |
-
<input type="radio" id="cntctfrm_select_email_custom" name="cntctfrm_select_email" value="custom" <?php if($cntctfrm_options['cntctfrm_select_email'] == 'custom') echo "checked=\"checked\" "; ?>/>
|
314 |
-
</td>
|
315 |
-
<td>
|
316 |
-
<input type="text" name="cntctfrm_custom_email" value="<?php echo $cntctfrm_options['cntctfrm_custom_email']; ?>" onfocus="document.getElementById('cntctfrm_select_email_custom').checked = true;" />
|
317 |
<span class="cntctfrm_info"><?php _e( "Set an email address which will be used for messages receiving.", 'contact_form' ); ?></span>
|
318 |
</td>
|
319 |
</tr>
|
@@ -322,20 +432,14 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
322 |
</tr>
|
323 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
324 |
<th scope="row" style="width:195px;"><?php _e( "Display Attachment block", 'contact_form' ); ?></th>
|
325 |
-
<td>
|
326 |
-
<input type="checkbox" id="cntctfrm_attachment" name="cntctfrm_attachment" value="1" <?php if($cntctfrm_options['cntctfrm_attachment'] == '1') echo "checked=\"checked\" "; ?>/>
|
327 |
-
</td>
|
328 |
-
<td>
|
329 |
-
<span class="cntctfrm_info"><?php echo __( "Users can attach files of the following types", 'contact_form' ) . ": html, txt, css, gif, png, jpeg, jpg, tiff, bmp, ai, eps, ps, rtf, pdf, doc, docx, xls, zip, rar, wav, mp3, ppt"; ?></span>
|
330 |
</td>
|
331 |
</tr>
|
332 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
333 |
<th scope="row" style="width:195px;"><?php _e( "Display Attachment explanations", 'contact_form' ); ?></th>
|
334 |
-
<td>
|
335 |
-
<input type="checkbox" id="cntctfrm_attachment_explanations" name="cntctfrm_attachment_explanations" value="1" <?php if( $cntctfrm_options['cntctfrm_attachment_explanations'] == '1' && $cntctfrm_options['cntctfrm_attachment'] == '1' ) echo "checked=\"checked\" "; ?>/>
|
336 |
-
</td>
|
337 |
-
<td>
|
338 |
-
<span class="cntctfrm_info"><?php echo __( "Display explanations after Attachment block", 'contact_form' ); ?></span>
|
339 |
</td>
|
340 |
</tr>
|
341 |
<tr valign="top" class="cntctfrm_additions_block <?php if( $cntctfrm_options['cntctfrm_additions_options'] == '0' ) echo "cntctfrm_hidden"; ?>">
|
@@ -346,84 +450,155 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
346 |
</tr>
|
347 |
<tr class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
348 |
<th rowspan="2"><?php _e( 'What use?', 'contact_form' ); ?></th>
|
349 |
-
<td>
|
350 |
<input type='radio' name='cntctfrm_mail_method' value='wp-mail' <?php if( $cntctfrm_options['cntctfrm_mail_method'] == 'wp-mail' ) echo "checked=\"checked\" "; ?>/>
|
351 |
-
</td>
|
352 |
-
<td>
|
353 |
<?php _e( 'Wp-mail', 'mail-send' ); ?>
|
354 |
<span class="cntctfrm_info">(<?php _e( 'To send mail you can use the wordpress wp_mail function', 'mail_send' ); ?>)</span>
|
355 |
</td>
|
356 |
</tr>
|
357 |
<tr class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
358 |
-
<td>
|
359 |
<input type='radio' name='cntctfrm_mail_method' value='mail' <?php if($cntctfrm_options['cntctfrm_mail_method'] == 'mail') echo "checked=\"checked\" "; ?>/>
|
360 |
-
</td>
|
361 |
-
<td>
|
362 |
<?php _e( 'Mail', 'mail-send' ); ?>
|
363 |
<span class="cntctfrm_info">(<?php _e( 'To send mail you can use the php mail function', 'mail_send' ); ?>)</span>
|
364 |
</td>
|
365 |
</tr>
|
366 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
367 |
-
<th scope="row" style="width:195px;"><?php _e( "Change FROM
|
368 |
<td colspan="2">
|
369 |
<input type="text" style="width:200px;" name="cntctfrm_from_field" value="<?php echo stripslashes( $cntctfrm_options['cntctfrm_from_field'] ); ?>" /><br />
|
370 |
</td>
|
371 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
373 |
<th scope="row" style="width:195px;"><?php _e( "Display phone field", 'contact_form' ); ?></th>
|
374 |
-
<td>
|
375 |
<input type="checkbox" id="cntctfrm_display_phone_field" name="cntctfrm_display_phone_field" value="1" <?php if($cntctfrm_options['cntctfrm_display_phone_field'] == '1') echo "checked=\"checked\" "; ?>/>
|
376 |
</td>
|
377 |
</tr>
|
378 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
379 |
<th scope="row" style="width:195px;"><?php _e( "Required field", 'contact_form' ); ?></th>
|
380 |
-
<td>
|
381 |
-
<input type="checkbox" id="cntctfrm_required_name_field" name="cntctfrm_required_name_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_name_field'] == '1') echo "checked=\"checked\" ";
|
382 |
-
<input type="checkbox" id="cntctfrm_required_email_field" name="cntctfrm_required_email_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_email_field'] == '1') echo "checked=\"checked\" ";
|
383 |
-
<input type="checkbox" id="cntctfrm_required_phone_field" name="cntctfrm_required_phone_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_phone_field'] == '1') echo "checked=\"checked\" ";
|
384 |
-
<input type="checkbox" id="cntctfrm_required_subject_field" name="cntctfrm_required_subject_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_subject_field'] == '1') echo "checked=\"checked\" ";
|
385 |
-
<input type="checkbox" id="cntctfrm_required_message_field" name="cntctfrm_required_message_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_message_field'] == '1') echo "checked=\"checked\" "; ?>/>
|
386 |
-
</td>
|
387 |
-
<td>
|
388 |
-
<span class="cntctfrm_info"><?php _e( "Name", 'contact_form' ); ?></span><br />
|
389 |
-
<span class="cntctfrm_info"><?php _e( "E-Mail Address", 'contact_form' ); ?></span><br />
|
390 |
-
<span class="cntctfrm_info"><?php _e( "Phone", 'contact_form' ); ?></span><br />
|
391 |
-
<span class="cntctfrm_info"><?php _e( "Subject", 'contact_form' ); ?></span><br />
|
392 |
-
<span class="cntctfrm_info"><?php _e( "Message", 'contact_form' ); ?></span>
|
393 |
</td>
|
394 |
</tr>
|
395 |
-
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
396 |
<th scope="row" style="width:195px;"><?php _e( "Display additional info in email", 'contact_form' ); ?></th>
|
397 |
-
<td>
|
398 |
<input type="checkbox" id="cntctfrm_display_add_info" name="cntctfrm_display_add_info" value="1" <?php if($cntctfrm_options['cntctfrm_display_add_info'] == '1') echo "checked=\"checked\" "; ?>/>
|
399 |
</td>
|
400 |
-
<td class="cntctfrm_display_add_info_block <?php if($cntctfrm_options['cntctfrm_display_add_info'] == '0') echo "cntctfrm_hidden"; ?>">
|
401 |
-
<input type="checkbox" id="cntctfrm_display_sent_from" name="cntctfrm_display_sent_from" value="1" <?php if($cntctfrm_options['cntctfrm_display_sent_from'] == '1') echo "checked=\"checked\" "; ?>/>
|
402 |
-
<input type="checkbox" id="cntctfrm_display_date_time" name="cntctfrm_display_date_time" value="1" <?php if($cntctfrm_options['cntctfrm_display_date_time'] == '1') echo "checked=\"checked\" "; ?>/>
|
403 |
-
<input type="checkbox" id="cntctfrm_display_coming_from" name="cntctfrm_display_coming_from" value="1" <?php if($cntctfrm_options['cntctfrm_display_coming_from'] == '1') echo "checked=\"checked\" "; ?>/>
|
404 |
-
<input type="checkbox" id="cntctfrm_display_user_agent" name="cntctfrm_display_user_agent" value="1" <?php if($cntctfrm_options['cntctfrm_display_user_agent'] == '1') echo "checked=\"checked\" "; ?>/>
|
405 |
</td>
|
406 |
</tr>
|
407 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
408 |
-
<th scope="row" style="width:195px;"><?php _e( "
|
409 |
-
<td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
<input type="checkbox" id="cntctfrm_change_label" name="cntctfrm_change_label" value="1" <?php if($cntctfrm_options['cntctfrm_change_label'] == '1') echo "checked=\"checked\" "; ?>/>
|
411 |
</td>
|
412 |
<td class="cntctfrm_change_label_block <?php if($cntctfrm_options['cntctfrm_change_label'] == '0') echo "cntctfrm_hidden"; ?>">
|
413 |
-
<
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
</td>
|
420 |
</tr>
|
421 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
422 |
<th scope="row" style="width:195px;"><?php _e( "Action after the send mail", 'contact_form' ); ?></th>
|
423 |
<td colspan="2" class="cntctfrm_action_after_send_block">
|
424 |
-
|
425 |
-
<
|
426 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
427 |
<input type="text" name="cntctfrm_redirect_url" value="<?php echo $cntctfrm_options['cntctfrm_redirect_url']; ?>" /> <span class="cntctfrm_info"><?php _e( "Url", 'contact_form' ); ?></span><br />
|
428 |
</td>
|
429 |
</table>
|
@@ -440,8 +615,9 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
440 |
|
441 |
// Display contact form in front end - page or post
|
442 |
if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
443 |
-
function cntctfrm_display_form() {
|
444 |
global $error_message, $cntctfrm_options, $cntctfrm_result;
|
|
|
445 |
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
446 |
$content = "";
|
447 |
|
@@ -460,7 +636,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
|
460 |
if( true === $cntctfrm_result ) {
|
461 |
$_SESSION['cntctfrm_send_mail'] = true;
|
462 |
if( $cntctfrm_options['cntctfrm_action_after_send'] == 1 )
|
463 |
-
$content .= $cntctfrm_options['cntctfrm_thank_text'];
|
464 |
else
|
465 |
$content .= "<script type='text/javascript'>window.location.href = '".$cntctfrm_options['cntctfrm_redirect_url']."';</script>";
|
466 |
}
|
@@ -477,7 +653,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
|
477 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_form'].'</div>';
|
478 |
}
|
479 |
$content .= '<div style="text-align: left; padding-top: 5px;">
|
480 |
-
<label for="cntctfrm_contact_name">'. $cntctfrm_options['cntctfrm_name_label'] . ( $cntctfrm_options['cntctfrm_required_name_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
481 |
</div>';
|
482 |
if( isset( $error_message['error_name'] ) ) {
|
483 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_name'].'</div>';
|
@@ -487,7 +663,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
|
487 |
</div>
|
488 |
|
489 |
<div style="text-align: left;">
|
490 |
-
<label for="cntctfrm_contact_email">'. $cntctfrm_options['cntctfrm_email_label'] . ( $cntctfrm_options['cntctfrm_required_email_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
491 |
</div>';
|
492 |
if( isset( $error_message['error_email'] ) ) {
|
493 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_email'].'</div>';
|
@@ -498,7 +674,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
|
498 |
';
|
499 |
if( $cntctfrm_options['cntctfrm_display_phone_field'] == 1 ) {
|
500 |
$content .= '<div style="text-align: left;">
|
501 |
-
<label for="cntctfrm_contact_phone">'. $cntctfrm_options['cntctfrm_phone_label'] . ( $cntctfrm_options['cntctfrm_required_phone_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
502 |
</div>';
|
503 |
if( isset( $error_message['error_phone'] ) ) {
|
504 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_phone'].'</div>';
|
@@ -509,7 +685,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
|
509 |
';
|
510 |
}
|
511 |
$content .= '<div style="text-align: left;">
|
512 |
-
<label for="cntctfrm_contact_subject">'. $cntctfrm_options['cntctfrm_subject_label'] . ( $cntctfrm_options['cntctfrm_required_subject_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
513 |
</div>';
|
514 |
if( isset( $error_message['error_subject'] ) ) {
|
515 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_subject'].'</div>';
|
@@ -519,7 +695,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
|
519 |
</div>
|
520 |
|
521 |
<div style="text-align: left;">
|
522 |
-
<label for="cntctfrm_contact_message">'. $cntctfrm_options['cntctfrm_message_label'] . ( $cntctfrm_options['cntctfrm_required_message_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
523 |
</div>';
|
524 |
if( isset( $error_message['error_message'] ) ) {
|
525 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_message'].'</div>';
|
@@ -529,7 +705,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
|
529 |
</div>';
|
530 |
if($cntctfrm_options['cntctfrm_attachment'] == 1 ) {
|
531 |
$content .= '<div style="text-align: left;">
|
532 |
-
<label for="cntctfrm_contact_attachment">'. $cntctfrm_options['cntctfrm_attachment_label'] . '</label>
|
533 |
</div>';
|
534 |
if( isset( $error_message['error_attachment'] ) ) {
|
535 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_attachment'].'</div>';
|
@@ -555,7 +731,8 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
|
555 |
|
556 |
$content .= '<div style="text-align: left; padding-top: 8px;">
|
557 |
<input type="hidden" value="send" name="cntctfrm_contact_action"><input type="hidden" value="Version: 3.26" />
|
558 |
-
<input type="
|
|
|
559 |
</div>
|
560 |
</form>';
|
561 |
}
|
@@ -567,8 +744,7 @@ if( ! function_exists( 'cntctfrm_check_and_send' ) ) {
|
|
567 |
function cntctfrm_check_and_send() {
|
568 |
global $cntctfrm_result;
|
569 |
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
570 |
-
if( isset( $_REQUEST['cntctfrm_contact_action'] ) )
|
571 |
-
{
|
572 |
// Check all input data
|
573 |
$cntctfrm_result = cntctfrm_check_form();
|
574 |
}
|
@@ -588,6 +764,8 @@ if( ! function_exists( 'cntctfrm_check_form' ) ) {
|
|
588 |
function cntctfrm_check_form() {
|
589 |
global $error_message;
|
590 |
global $cntctfrm_options;
|
|
|
|
|
591 |
$path_of_uploaded_file = '';
|
592 |
if( empty( $cntctfrm_options ) )
|
593 |
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
@@ -595,16 +773,16 @@ if( ! function_exists( 'cntctfrm_check_form' ) ) {
|
|
595 |
// Error messages array
|
596 |
$error_message = array();
|
597 |
if( $cntctfrm_options['cntctfrm_required_name_field'] == 1 )
|
598 |
-
$error_message['error_name'] =
|
599 |
if( $cntctfrm_options['cntctfrm_required_email_field'] == 1 )
|
600 |
-
$error_message['error_email'] =
|
601 |
if( $cntctfrm_options['cntctfrm_required_subject_field'] == 1 )
|
602 |
-
$error_message['error_subject'] =
|
603 |
if( $cntctfrm_options['cntctfrm_required_message_field'] == 1 )
|
604 |
-
$error_message['error_message'] =
|
605 |
if( $cntctfrm_options['cntctfrm_required_phone_field'] == 1 )
|
606 |
-
$error_message['error_phone'] =
|
607 |
-
$error_message['error_form'] =
|
608 |
if( $cntctfrm_options['cntctfrm_attachment'] == 1 ) {
|
609 |
global $path_of_uploaded_file;
|
610 |
global $mime_type;
|
@@ -636,7 +814,7 @@ if( ! function_exists( 'cntctfrm_check_form' ) ) {
|
|
636 |
'wav'=>'audio/wav',
|
637 |
'mp3'=>'audio/mp3',
|
638 |
'ppt'=>'application/vnd.ms-powerpoint');
|
639 |
-
$error_message['error_attachment'] =
|
640 |
}
|
641 |
// Check information wich was input in fields
|
642 |
if( $cntctfrm_options['cntctfrm_required_name_field'] == 1 && "" != $_REQUEST['cntctfrm_contact_name'] )
|
@@ -651,7 +829,7 @@ if( ! function_exists( 'cntctfrm_check_form' ) ) {
|
|
651 |
unset( $error_message['error_phone'] );
|
652 |
// If captcha plugin exists
|
653 |
if( ! apply_filters( 'cntctfrm_check_form', $_REQUEST ) )
|
654 |
-
$error_message['error_captcha'] =
|
655 |
if( isset($_FILES["cntctfrm_contact_attachment"]["tmp_name"]) && $_FILES["cntctfrm_contact_attachment"]["tmp_name"] != "") {
|
656 |
if( is_multisite() ){
|
657 |
if( defined('UPLOADS') ) {
|
@@ -805,7 +983,10 @@ if( ! function_exists( 'cntctfrm_send_mail' ) ) {
|
|
805 |
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
|
806 |
|
807 |
// Additional headers
|
808 |
-
|
|
|
|
|
|
|
809 |
if( $cntctfrm_options['cntctfrm_attachment'] == 1 && isset($_FILES["cntctfrm_contact_attachment"]["tmp_name"]) && $_FILES["cntctfrm_contact_attachment"]["tmp_name"] != "") {
|
810 |
$attachments = array( $path_of_uploaded_file );
|
811 |
}
|
@@ -823,7 +1004,10 @@ if( ! function_exists( 'cntctfrm_send_mail' ) ) {
|
|
823 |
$message_block = $message;
|
824 |
|
825 |
// Additional headers
|
826 |
-
|
|
|
|
|
|
|
827 |
|
828 |
$bound_text = "jimmyP123";
|
829 |
|
@@ -859,7 +1043,10 @@ if( ! function_exists( 'cntctfrm_send_mail' ) ) {
|
|
859 |
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
|
860 |
|
861 |
// Additional headers
|
862 |
-
|
|
|
|
|
|
|
863 |
}
|
864 |
if( isset( $_REQUEST['cntctfrm_contact_send_copy'] ) && $_REQUEST['cntctfrm_contact_send_copy'] == 1 )
|
865 |
@mail( stripslashes( $_REQUEST['cntctfrm_contact_email'] ), stripslashes( strip_tags( $subject ) ), stripslashes( $message ), $headers );
|
@@ -935,6 +1122,7 @@ if ( ! function_exists ( 'cntctfrm_admin_head' ) ) {
|
|
935 |
function cntctfrm_admin_head() {
|
936 |
wp_enqueue_style( 'cntctfrmStylesheet', plugins_url( 'css/style.css', __FILE__ ) );
|
937 |
wp_enqueue_script( 'cntctfrmScript', plugins_url( 'js/script.js', __FILE__ ) );
|
|
|
938 |
}
|
939 |
}
|
940 |
|
@@ -952,6 +1140,53 @@ function cntctfrm_email_name_filter( $data ){
|
|
952 |
return $data;
|
953 |
}
|
954 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
955 |
add_action( 'init', 'cntctfrm_plugin_init' );
|
956 |
|
957 |
add_action( 'init', 'cntctfrm_check_and_send' );
|
@@ -973,4 +1208,8 @@ add_action( 'admin_menu', 'cntctfrm_admin_menu' );
|
|
973 |
add_filter( 'widget_text', 'do_shortcode' );
|
974 |
|
975 |
add_filter( 'wp_mail_from_name', 'cntctfrm_email_name_filter', 10, 1);
|
|
|
|
|
|
|
|
|
976 |
?>
|
4 |
Plugin URI: http://bestwebsoft.com/plugin/
|
5 |
Description: Plugin for Contact Form.
|
6 |
Author: BestWebSoft
|
7 |
+
Version: 3.28
|
8 |
Author URI: http://bestwebsoft.com/
|
9 |
License: GPLv2 or later
|
10 |
*/
|
115 |
// Register settings for plugin
|
116 |
if( ! function_exists( 'cntctfrm_settings' ) ) {
|
117 |
function cntctfrm_settings() {
|
118 |
+
global $cntctfrm_options, $cntctfrm_option_defaults;
|
119 |
|
120 |
$cntctfrm_option_defaults = array(
|
121 |
'cntctfrm_user_email' => 'admin',
|
122 |
'cntctfrm_custom_email' => '',
|
123 |
'cntctfrm_select_email' => 'user',
|
124 |
+
'cntctfrm_from_email' => 'user',
|
125 |
+
'cntctfrm_custom_from_email' => '',
|
126 |
'cntctfrm_additions_options' => 0,
|
127 |
'cntctfrm_attachment' => 0,
|
128 |
'cntctfrm_attachment_explanations' => 1,
|
140 |
'cntctfrm_mail_method' => 'wp-mail',
|
141 |
'cntctfrm_display_coming_from' => 1,
|
142 |
'cntctfrm_display_user_agent' => 1,
|
143 |
+
'cntctfrm_language' => array(),
|
144 |
'cntctfrm_change_label' => 0,
|
145 |
+
'cntctfrm_name_label' => array( 'en' => __( "Name:", 'contact_form' ) ),
|
146 |
+
'cntctfrm_email_label' => array( 'en' => __( "E-Mail Address:", 'contact_form' ) ),
|
147 |
+
'cntctfrm_phone_label' => array( 'en' => __( "Phone:", 'contact_form' ) ),
|
148 |
+
'cntctfrm_subject_label' => array( 'en' => __( "Subject:", 'contact_form' ) ),
|
149 |
+
'cntctfrm_message_label' => array( 'en' => __( "Message:", 'contact_form' ) ),
|
150 |
+
'cntctfrm_attachment_label' => array( 'en' => __( "Attachment:", 'contact_form' ) ),
|
151 |
+
'cntctfrm_submit_label' => array( 'en' => __( "Submit", 'contact_form' ) ),
|
152 |
+
'cntctfrm_name_error' => array( 'en' => __( "Your name is required.", 'contact_form' ) ),
|
153 |
+
'cntctfrm_email_error' => array( 'en' => __( "A proper e-mail address is required.", 'contact_form' ) ),
|
154 |
+
'cntctfrm_phone_error' => array( 'en' => __( "Subject text is required.", 'contact_form' ) ),
|
155 |
+
'cntctfrm_subject_error' => array( 'en' => __( "Message text is required.", 'contact_form' ) ),
|
156 |
+
'cntctfrm_message_error' => array( 'en' => __( "Phone is required field.", 'contact_form' ) ),
|
157 |
+
'cntctfrm_attachment_error' => array( 'en' => __( "Attachment is broken.", 'contact_form' ) ),
|
158 |
+
'cntctfrm_captcha_error' => array( 'en' => __( "Please complete the CAPTCHA.", 'contact_form' ) ),
|
159 |
+
'cntctfrm_form_error' => array( 'en' => __( "Please make corrections below and try again.", 'contact_form' ) ),
|
160 |
'cntctfrm_action_after_send' => 1,
|
161 |
+
'cntctfrm_thank_text' => array( 'en' => __( "Thank you for contacting us.", 'contact_form' ) ),
|
162 |
'cntctfrm_redirect_url' => ''
|
163 |
);
|
164 |
if( ! get_option( 'cntctfrm_options' ) )
|
165 |
add_option( 'cntctfrm_options', $cntctfrm_option_defaults, '', 'yes' );
|
166 |
|
167 |
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
168 |
+
if( empty( $cntctfrm_options['cntctfrm_language'] ) && ! is_array( $cntctfrm_options['cntctfrm_name_label'] ) ) {
|
169 |
+
$cntctfrm_options['cntctfrm_name_label'] = array( 'en' => $cntctfrm_options['cntctfrm_name_label'] );
|
170 |
+
$cntctfrm_options['cntctfrm_email_label'] = array( 'en' => $cntctfrm_options['cntctfrm_email_label'] );
|
171 |
+
$cntctfrm_options['cntctfrm_phone_label'] = array( 'en' => $cntctfrm_options['cntctfrm_phone_label'] );
|
172 |
+
$cntctfrm_options['cntctfrm_subject_label'] = array( 'en' => $cntctfrm_options['cntctfrm_subject_label'] );
|
173 |
+
$cntctfrm_options['cntctfrm_message_label'] = array( 'en' => $cntctfrm_options['cntctfrm_message_label'] );
|
174 |
+
$cntctfrm_options['cntctfrm_attachment_label'] = array( 'en' => $cntctfrm_options['cntctfrm_attachment_label'] );
|
175 |
+
$cntctfrm_options['cntctfrm_thank_text'] = array( 'en' => $cntctfrm_options['cntctfrm_thank_text'] );
|
176 |
+
$cntctfrm_options['cntctfrm_submit_label'] = array( 'en' => $cntctfrm_option_defaults['cntctfrm_submit_label']['en'] );
|
177 |
+
$cntctfrm_options['cntctfrm_name_error'] = array( 'en' => $cntctfrm_option_defaults['cntctfrm_name_error']['en'] );
|
178 |
+
$cntctfrm_options['cntctfrm_email_error'] = array( 'en' => $cntctfrm_option_defaults['cntctfrm_email_error']['en'] );
|
179 |
+
$cntctfrm_options['cntctfrm_phone_error'] = array( 'en' => $cntctfrm_option_defaults['cntctfrm_phone_error']['en'] );
|
180 |
+
$cntctfrm_options['cntctfrm_subject_error'] = array( 'en' => $cntctfrm_option_defaults['cntctfrm_subject_error']['en'] );
|
181 |
+
$cntctfrm_options['cntctfrm_message_error'] = array( 'en' => $cntctfrm_option_defaults['cntctfrm_message_error']['en'] );
|
182 |
+
$cntctfrm_options['cntctfrm_attachment_error'] = array( 'en' => $cntctfrm_option_defaults['cntctfrm_attachment_error']['en'] );
|
183 |
+
$cntctfrm_options['cntctfrm_captcha_error'] = array( 'en' => $cntctfrm_option_defaults['cntctfrm_captcha_error']['en'] );
|
184 |
+
$cntctfrm_options['cntctfrm_form_error'] = array( 'en' => $cntctfrm_option_defaults['cntctfrm_form_error']['en'] );
|
185 |
+
}
|
186 |
$cntctfrm_options = array_merge( $cntctfrm_option_defaults, $cntctfrm_options );
|
187 |
update_option( 'cntctfrm_options', $cntctfrm_options );
|
188 |
}
|
201 |
$cntctfrm_options_submit['cntctfrm_user_email'] = $_REQUEST['cntctfrm_user_email'];
|
202 |
$cntctfrm_options_submit['cntctfrm_custom_email'] = stripslashes( $_REQUEST['cntctfrm_custom_email'] );
|
203 |
$cntctfrm_options_submit['cntctfrm_select_email'] = $_REQUEST['cntctfrm_select_email'];
|
204 |
+
$cntctfrm_options_submit['cntctfrm_from_email'] = $_REQUEST['cntctfrm_from_email'];
|
205 |
+
$cntctfrm_options_submit['cntctfrm_custom_from_email'] = stripslashes( $_REQUEST['cntctfrm_custom_from_email'] );
|
206 |
$cntctfrm_options_submit['cntctfrm_additions_options'] = isset( $_REQUEST['cntctfrm_additions_options']) ? $_REQUEST['cntctfrm_additions_options'] : 0;
|
207 |
if($cntctfrm_options_submit['cntctfrm_additions_options'] == 0) {
|
208 |
$cntctfrm_options_submit['cntctfrm_attachment'] = 0;
|
222 |
$cntctfrm_options_submit['cntctfrm_display_coming_from'] = 1;
|
223 |
$cntctfrm_options_submit['cntctfrm_display_user_agent'] = 1;
|
224 |
$cntctfrm_options_submit['cntctfrm_change_label'] = 0;
|
|
|
|
|
|
|
|
|
|
|
225 |
$cntctfrm_options_submit['cntctfrm_action_after_send'] = 1;
|
226 |
+
if( empty( $cntctfrm_options['cntctfrm_language'] ) ) {
|
227 |
+
$cntctfrm_options_submit['cntctfrm_name_label'] = $cntctfrm_option_defaults['cntctfrm_name_label'];
|
228 |
+
$cntctfrm_options_submit['cntctfrm_email_label'] = $cntctfrm_option_defaults['cntctfrm_email_label'];
|
229 |
+
$cntctfrm_options_submit['cntctfrm_phone_label'] = $cntctfrm_option_defaults['cntctfrm_phone_label'];
|
230 |
+
$cntctfrm_options_submit['cntctfrm_subject_label'] = $cntctfrm_option_defaults['cntctfrm_subject_label'];
|
231 |
+
$cntctfrm_options_submit['cntctfrm_message_label'] = $cntctfrm_option_defaults['cntctfrm_message_label'];
|
232 |
+
$cntctfrm_options_submit['cntctfrm_attachment_label'] = $cntctfrm_option_defaults['cntctfrm_attachment_label'];
|
233 |
+
$cntctfrm_options_submit['cntctfrm_thank_text'] = $cntctfrm_option_defaults['cntctfrm_thank_text'];
|
234 |
+
$cntctfrm_options_submit['cntctfrm_submit_label'] = $cntctfrm_option_defaults['cntctfrm_submit_label'];
|
235 |
+
$cntctfrm_options_submit['cntctfrm_name_error'] = $cntctfrm_option_defaults['cntctfrm_name_error'];
|
236 |
+
$cntctfrm_options_submit['cntctfrm_email_error'] = $cntctfrm_option_defaults['cntctfrm_email_error'];
|
237 |
+
$cntctfrm_options_submit['cntctfrm_phone_error'] = $cntctfrm_option_defaults['cntctfrm_phone_error'];
|
238 |
+
$cntctfrm_options_submit['cntctfrm_subject_error'] = $cntctfrm_option_defaults['cntctfrm_subject_error'];
|
239 |
+
$cntctfrm_options_submit['cntctfrm_message_error'] = $cntctfrm_option_defaults['cntctfrm_message_error'];
|
240 |
+
$cntctfrm_options_submit['cntctfrm_attachment_error'] = $cntctfrm_option_defaults['cntctfrm_attachment_error'];
|
241 |
+
$cntctfrm_options_submit['cntctfrm_captcha_error'] = $cntctfrm_option_defaults['cntctfrm_captcha_error'];
|
242 |
+
$cntctfrm_options_submit['cntctfrm_form_error'] = $cntctfrm_option_defaults['cntctfrm_form_error'];
|
243 |
+
}
|
244 |
+
else{
|
245 |
+
$cntctfrm_options_submit['cntctfrm_name_label']['en'] = $cntctfrm_option_defaults['cntctfrm_name_label']['en'];
|
246 |
+
$cntctfrm_options_submit['cntctfrm_email_label']['en'] = $cntctfrm_option_defaults['cntctfrm_email_label']['en'];
|
247 |
+
$cntctfrm_options_submit['cntctfrm_phone_label']['en'] = $cntctfrm_option_defaults['cntctfrm_phone_label']['en'];
|
248 |
+
$cntctfrm_options_submit['cntctfrm_subject_label']['en'] = $cntctfrm_option_defaults['cntctfrm_subject_label']['en'];
|
249 |
+
$cntctfrm_options_submit['cntctfrm_message_label']['en'] = $cntctfrm_option_defaults['cntctfrm_message_label']['en'];
|
250 |
+
$cntctfrm_options_submit['cntctfrm_attachment_label']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_label']['en'];
|
251 |
+
$cntctfrm_options_submit['cntctfrm_thank_text']['en'] = $cntctfrm_option_defaults['cntctfrm_thank_text']['en'];
|
252 |
+
$cntctfrm_options_submit['cntctfrm_submit_label']['en'] = $cntctfrm_option_defaults['cntctfrm_submit_label']['en'];
|
253 |
+
$cntctfrm_options_submit['cntctfrm_name_error']['en'] = $cntctfrm_option_defaults['cntctfrm_name_error']['en'];
|
254 |
+
$cntctfrm_options_submit['cntctfrm_email_error']['en'] = $cntctfrm_option_defaults['cntctfrm_email_error']['en'];
|
255 |
+
$cntctfrm_options_submit['cntctfrm_phone_error']['en'] = $cntctfrm_option_defaults['cntctfrm_phone_error']['en'];
|
256 |
+
$cntctfrm_options_submit['cntctfrm_subject_error']['en'] = $cntctfrm_option_defaults['cntctfrm_subject_error']['en'];
|
257 |
+
$cntctfrm_options_submit['cntctfrm_message_error']['en'] = $cntctfrm_option_defaults['cntctfrm_message_error']['en'];
|
258 |
+
$cntctfrm_options_submit['cntctfrm_attachment_error']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_error']['en'];
|
259 |
+
$cntctfrm_options_submit['cntctfrm_captcha_error']['en'] = $cntctfrm_option_defaults['cntctfrm_captcha_error']['en'];
|
260 |
+
$cntctfrm_options_submit['cntctfrm_form_error']['en'] = $cntctfrm_option_defaults['cntctfrm_form_error']['en'];
|
261 |
+
}
|
262 |
+
$cntctfrm_options_submit['cntctfrm_redirect_url'] = '';
|
263 |
} else {
|
264 |
+
$cntctfrm_options_submit['cntctfrm_attachment'] = isset( $_REQUEST['cntctfrm_attachment']) ? $_REQUEST['cntctfrm_attachment'] : 0;
|
265 |
+
$cntctfrm_options_submit['cntctfrm_attachment_explanations'] = isset( $_REQUEST['cntctfrm_attachment_explanations']) ? $_REQUEST['cntctfrm_attachment_explanations'] : 0;
|
266 |
+
$cntctfrm_options_submit['cntctfrm_send_copy'] = isset( $_REQUEST['cntctfrm_send_copy']) ? $_REQUEST['cntctfrm_send_copy'] : 0;
|
267 |
+
$cntctfrm_options_submit['cntctfrm_from_field'] = $_REQUEST['cntctfrm_from_field'];
|
268 |
+
$cntctfrm_options_submit['cntctfrm_mail_method'] = $_REQUEST['cntctfrm_mail_method'];
|
269 |
+
$cntctfrm_options_submit['cntctfrm_mail_method'] = $_REQUEST['cntctfrm_mail_method'];
|
270 |
+
$cntctfrm_options_submit['cntctfrm_display_add_info'] = isset( $_REQUEST['cntctfrm_display_add_info']) ? 1 : 0;
|
271 |
+
$cntctfrm_options_submit['cntctfrm_change_label'] = isset( $_REQUEST['cntctfrm_change_label']) ? 1 : 0;
|
272 |
$cntctfrm_options_submit['cntctfrm_display_phone_field'] = isset( $_REQUEST['cntctfrm_display_phone_field']) ? 1 : 0;
|
273 |
$cntctfrm_options_submit['cntctfrm_required_name_field'] = isset( $_REQUEST['cntctfrm_required_name_field']) ? 1 : 0;
|
274 |
$cntctfrm_options_submit['cntctfrm_required_email_field'] = isset( $_REQUEST['cntctfrm_required_email_field']) ? 1 : 0;
|
275 |
$cntctfrm_options_submit['cntctfrm_required_phone_field'] = isset( $_REQUEST['cntctfrm_required_phone_field']) ? 1 : 0;
|
276 |
+
$cntctfrm_options_submit['cntctfrm_required_subject_field'] = isset( $_REQUEST['cntctfrm_required_subject_field']) ? 1 : 0;
|
277 |
+
$cntctfrm_options_submit['cntctfrm_required_message_field'] = isset( $_REQUEST['cntctfrm_required_message_field']) ? 1 : 0;
|
278 |
|
279 |
if( $cntctfrm_options_submit['cntctfrm_display_add_info'] == 1 ) {
|
280 |
$cntctfrm_options_submit['cntctfrm_display_sent_from'] = isset( $_REQUEST['cntctfrm_display_sent_from']) ? 1 : 0;
|
289 |
$cntctfrm_options_submit['cntctfrm_display_user_agent'] = 1;
|
290 |
}
|
291 |
if( $cntctfrm_options_submit['cntctfrm_change_label'] == 1 ) {
|
292 |
+
foreach( $_REQUEST['cntctfrm_name_label'] as $key=>$val ){
|
293 |
+
$cntctfrm_options_submit['cntctfrm_name_label'][$key] = $_REQUEST['cntctfrm_name_label'][$key];
|
294 |
+
$cntctfrm_options_submit['cntctfrm_email_label'][$key] = $_REQUEST['cntctfrm_email_label'][$key];
|
295 |
+
$cntctfrm_options_submit['cntctfrm_phone_label'][$key] = $_REQUEST['cntctfrm_phone_label'][$key];
|
296 |
+
$cntctfrm_options_submit['cntctfrm_subject_label'][$key] = $_REQUEST['cntctfrm_subject_label'][$key];
|
297 |
+
$cntctfrm_options_submit['cntctfrm_message_label'][$key] = $_REQUEST['cntctfrm_message_label'][$key];
|
298 |
+
$cntctfrm_options_submit['cntctfrm_attachment_label'][$key] = $_REQUEST['cntctfrm_attachment_label'][$key];
|
299 |
+
$cntctfrm_options_submit['cntctfrm_thank_text'][$key] = $_REQUEST['cntctfrm_thank_text'][$key];
|
300 |
+
$cntctfrm_options_submit['cntctfrm_submit_label'][$key] = $_REQUEST['cntctfrm_submit_label'][$key];
|
301 |
+
$cntctfrm_options_submit['cntctfrm_name_error'][$key] = $_REQUEST['cntctfrm_name_error'][$key];
|
302 |
+
$cntctfrm_options_submit['cntctfrm_email_error'][$key] = $_REQUEST['cntctfrm_email_error'][$key];
|
303 |
+
$cntctfrm_options_submit['cntctfrm_phone_error'][$key] = $_REQUEST['cntctfrm_phone_error'][$key];
|
304 |
+
$cntctfrm_options_submit['cntctfrm_subject_error'][$key] = $_REQUEST['cntctfrm_subject_error'][$key];
|
305 |
+
$cntctfrm_options_submit['cntctfrm_message_error'][$key] = $_REQUEST['cntctfrm_message_error'][$key];
|
306 |
+
$cntctfrm_options_submit['cntctfrm_attachment_error'][$key] = $_REQUEST['cntctfrm_attachment_error'][$key];
|
307 |
+
$cntctfrm_options_submit['cntctfrm_captcha_error'][$key] = $_REQUEST['cntctfrm_captcha_error'][$key];
|
308 |
+
$cntctfrm_options_submit['cntctfrm_form_error'][$key] = $_REQUEST['cntctfrm_form_error'][$key];
|
309 |
+
}
|
310 |
}
|
311 |
else {
|
312 |
+
if( empty( $cntctfrm_options['cntctfrm_language'] ) ) {
|
313 |
+
$cntctfrm_options_submit['cntctfrm_name_label'] = $cntctfrm_option_defaults['cntctfrm_name_label'];
|
314 |
+
$cntctfrm_options_submit['cntctfrm_email_label'] = $cntctfrm_option_defaults['cntctfrm_email_label'];
|
315 |
+
$cntctfrm_options_submit['cntctfrm_phone_label'] = $cntctfrm_option_defaults['cntctfrm_phone_label'];
|
316 |
+
$cntctfrm_options_submit['cntctfrm_subject_label'] = $cntctfrm_option_defaults['cntctfrm_subject_label'];
|
317 |
+
$cntctfrm_options_submit['cntctfrm_message_label'] = $cntctfrm_option_defaults['cntctfrm_message_label'];
|
318 |
+
$cntctfrm_options_submit['cntctfrm_attachment_label'] = $cntctfrm_option_defaults['cntctfrm_attachment_label'];
|
319 |
+
$cntctfrm_options_submit['cntctfrm_thank_text'] = $cntctfrm_option_defaults['cntctfrm_thank_text'];
|
320 |
+
$cntctfrm_options_submit['cntctfrm_submit_label'] = $cntctfrm_option_defaults['cntctfrm_submit_label'];
|
321 |
+
$cntctfrm_options_submit['cntctfrm_name_error'] = $cntctfrm_option_defaults['cntctfrm_name_error'];
|
322 |
+
$cntctfrm_options_submit['cntctfrm_email_error'] = $cntctfrm_option_defaults['cntctfrm_email_error'];
|
323 |
+
$cntctfrm_options_submit['cntctfrm_phone_error'] = $cntctfrm_option_defaults['cntctfrm_phone_error'];
|
324 |
+
$cntctfrm_options_submit['cntctfrm_subject_error'] = $cntctfrm_option_defaults['cntctfrm_subject_error'];
|
325 |
+
$cntctfrm_options_submit['cntctfrm_message_error'] = $cntctfrm_option_defaults['cntctfrm_message_error'];
|
326 |
+
$cntctfrm_options_submit['cntctfrm_attachment_error'] = $cntctfrm_option_defaults['cntctfrm_attachment_error'];
|
327 |
+
$cntctfrm_options_submit['cntctfrm_captcha_error'] = $cntctfrm_option_defaults['cntctfrm_captcha_error'];
|
328 |
+
$cntctfrm_options_submit['cntctfrm_form_error'] = $cntctfrm_option_defaults['cntctfrm_form_error'];
|
329 |
+
}
|
330 |
+
else{
|
331 |
+
$cntctfrm_options_submit['cntctfrm_name_label']['en'] = $cntctfrm_option_defaults['cntctfrm_name_label']['en'];
|
332 |
+
$cntctfrm_options_submit['cntctfrm_email_label']['en'] = $cntctfrm_option_defaults['cntctfrm_email_label']['en'];
|
333 |
+
$cntctfrm_options_submit['cntctfrm_phone_label']['en'] = $cntctfrm_option_defaults['cntctfrm_phone_label']['en'];
|
334 |
+
$cntctfrm_options_submit['cntctfrm_subject_label']['en'] = $cntctfrm_option_defaults['cntctfrm_subject_label']['en'];
|
335 |
+
$cntctfrm_options_submit['cntctfrm_message_label']['en'] = $cntctfrm_option_defaults['cntctfrm_message_label']['en'];
|
336 |
+
$cntctfrm_options_submit['cntctfrm_attachment_label']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_label']['en'];
|
337 |
+
$cntctfrm_options_submit['cntctfrm_thank_text']['en'] = $cntctfrm_option_defaults['cntctfrm_thank_text']['en'];
|
338 |
+
$cntctfrm_options_submit['cntctfrm_submit_label']['en'] = $cntctfrm_option_defaults['cntctfrm_submit_label']['en'];
|
339 |
+
$cntctfrm_options_submit['cntctfrm_name_error']['en'] = $cntctfrm_option_defaults['cntctfrm_name_error']['en'];
|
340 |
+
$cntctfrm_options_submit['cntctfrm_email_error']['en'] = $cntctfrm_option_defaults['cntctfrm_email_error']['en'];
|
341 |
+
$cntctfrm_options_submit['cntctfrm_phone_error']['en'] = $cntctfrm_option_defaults['cntctfrm_phone_error']['en'];
|
342 |
+
$cntctfrm_options_submit['cntctfrm_subject_error']['en'] = $cntctfrm_option_defaults['cntctfrm_subject_error']['en'];
|
343 |
+
$cntctfrm_options_submit['cntctfrm_message_error']['en'] = $cntctfrm_option_defaults['cntctfrm_message_error']['en'];
|
344 |
+
$cntctfrm_options_submit['cntctfrm_attachment_error']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_error']['en'];
|
345 |
+
$cntctfrm_options_submit['cntctfrm_captcha_error']['en'] = $cntctfrm_option_defaults['cntctfrm_captcha_error']['en'];
|
346 |
+
$cntctfrm_options_submit['cntctfrm_form_error']['en'] = $cntctfrm_option_defaults['cntctfrm_form_error']['en'];
|
347 |
+
}
|
348 |
}
|
349 |
$cntctfrm_options_submit['cntctfrm_action_after_send'] = $_REQUEST['cntctfrm_action_after_send'];
|
350 |
+
$cntctfrm_options_submit['cntctfrm_redirect_url'] = $_REQUEST['cntctfrm_redirect_url'];
|
351 |
+
}
|
|
|
352 |
$cntctfrm_options = array_merge( $cntctfrm_options, $cntctfrm_options_submit );
|
353 |
if( $cntctfrm_options_submit['cntctfrm_action_after_send'] == 0
|
354 |
&& ( trim( $cntctfrm_options_submit['cntctfrm_redirect_url'] ) == ""
|
357 |
$cntctfrm_options['cntctfrm_action_after_send'] = 1;
|
358 |
}
|
359 |
if( 'user' == $cntctfrm_options_submit['cntctfrm_select_email'] ) {
|
360 |
+
if( function_exists('get_userdatabylogin') && false !== get_userdatabylogin( $cntctfrm_options_submit['cntctfrm_user_email'] ) ){
|
|
|
|
|
|
|
361 |
}
|
362 |
+
else if( false !== get_user_by( 'login', $cntctfrm_options_submit['cntctfrm_user_email'] ) ){
|
|
|
|
|
|
|
363 |
}
|
364 |
else {
|
365 |
$error .=__( "Such user is not exist. Settings are not saved.", 'contact_form' );
|
366 |
}
|
367 |
}
|
368 |
else {
|
369 |
+
if( $cntctfrm_options_submit['cntctfrm_custom_email'] == "" || !preg_match( "/^((?:[a-z0-9']+(?:[a-z0-9\-_\.']+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})[, ]*)+$/i", trim( $cntctfrm_options_submit['cntctfrm_custom_email'] ) ) ){
|
|
|
|
|
|
|
|
|
|
|
370 |
$error .= __( "Please input correct email. Settings are not saved.", 'contact_form' );
|
371 |
}
|
372 |
}
|
373 |
+
if( 'custom' == $cntctfrm_options_submit['cntctfrm_from_email'] ) {
|
374 |
+
if( $cntctfrm_options_submit['cntctfrm_custom_from_email'] == ""
|
375 |
+
&& !preg_match( "/^((?:[a-z0-9']+(?:[a-z0-9\-_\.']+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})[, ]*)+$/i", trim( $cntctfrm_options_submit['cntctfrm_custom_from_email'] ) ) ) {
|
376 |
+
$error .= __( "Please input correct 'FROM' email. Settings are not saved.", 'contact_form' );
|
377 |
+
}
|
378 |
+
}
|
379 |
+
if( $error == '' ){
|
380 |
+
update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
|
381 |
+
$message = __( "Options saved.", 'contact_form' );
|
382 |
+
}
|
383 |
}
|
384 |
// Display form on the setting page
|
385 |
+
$lang_codes = array(
|
386 |
+
'aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'bm' => 'Bambara', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali',
|
387 |
+
'bh' => 'Bihari', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan; Valencian', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'zh' => 'Chinese', 'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree',
|
388 |
+
'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi; Dhivehi; Maldivian', 'nl' => 'Dutch; Flemish', 'dz' => 'Dzongkha', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijjian', 'fi' => 'Finnish', 'fr' => 'French', 'fy' => 'Western Frisian', 'ff' => 'Fulah', 'ka' => 'Georgian', 'de' => 'German', 'gd' => 'Gaelic; Scottish Gaelic',
|
389 |
+
'ga' => 'Irish', 'gl' => 'Galician', 'gv' => 'Manx', 'el' => 'Greek, Modern', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian; Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'ig' => 'Igbo', 'is' => 'Icelandic', 'io' => 'Ido', 'ii' => 'Sichuan Yi', 'iu' => 'Inuktitut', 'ie' => 'Interlingue',
|
390 |
+
'ia' => 'Interlingua (International Auxiliary Language Association)', 'id' => 'Indonesian', 'ik' => 'Inupiaq', 'it' => 'Italian', 'jv' => 'Javanese', 'ja' => 'Japanese', 'kl' => 'Kalaallisut; Greenlandic', 'kn' => 'Kannada', 'ks' => 'Kashmiri', 'kr' => 'Kanuri', 'kk' => 'Kazakh', 'km' => 'Central Khmer', 'ki' => 'Kikuyu; Gikuyu', 'rw' => 'Kinyarwanda', 'ky' => 'Kirghiz; Kyrgyz',
|
391 |
+
'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kuanyama; Kwanyama', 'ku' => 'Kurdish', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'li' => 'Limburgan; Limburger; Limburgish', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lb' => 'Luxembourgish; Letzeburgesch', 'lu' => 'Luba-Katanga', 'lg' => 'Ganda', 'mk' => 'Macedonian', 'mh' => 'Marshallese', 'ml' => 'Malayalam',
|
392 |
+
'mi' => 'Maori', 'mr' => 'Marathi', 'ms' => 'Malay', 'mg' => 'Malagasy', 'mt' => 'Maltese', 'mo' => 'Moldavian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo; Navaho', 'nr' => 'Ndebele, South; South Ndebele', 'nd' => 'Ndebele, North; North Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'nn' => 'Norwegian Nynorsk; Nynorsk, Norwegian', 'nb' => 'Bokmål, Norwegian, Norwegian Bokmål',
|
393 |
+
'no' => 'Norwegian', 'ny' => 'Chichewa; Chewa; Nyanja', 'oc' => 'Occitan, Provençal', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian; Ossetic', 'pa' => 'Panjabi; Punjabi', 'fa' => 'Persian', 'pi' => 'Pali', 'pl' => 'Polish', 'pt' => 'Portuguese', 'ps' => 'Pushto', 'qu' => 'Quechua', 'rm' => 'Romansh', 'ro' => 'Romanian', 'rn' => 'Rundi', 'ru' => 'Russian',
|
394 |
+
'sg' => 'Sango', 'sa' => 'Sanskrit', 'sr' => 'Serbian', 'hr' => 'Croatian', 'si' => 'Sinhala; Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'se' => 'Northern Sami', 'sm' => 'Samoan', 'sn' => 'Shona', 'sd' => 'Sindhi', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'es' => 'Spanish; Castilian', 'sc' => 'Sardinian', 'ss' => 'Swati', 'su' => 'Sundanese', 'sw' => 'Swahili',
|
395 |
+
'sv' => 'Swedish', 'ty' => 'Tahitian', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'tg' => 'Tajik', 'tl' => 'Tagalog', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'tn' => 'Tswana', 'ts' => 'Tsonga', 'tk' => 'Turkmen', 'tr' => 'Turkish', 'tw' => 'Twi', 'ug' => 'Uighur; Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek',
|
396 |
+
've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volapük', 'cy' => 'Welsh','wa' => 'Walloon','wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang; Chuang', 'zu' => 'Zulu' );
|
397 |
+
|
398 |
?>
|
399 |
<div class="wrap">
|
400 |
<div class="icon32 icon32-bws" id="icon-options-general"></div>
|
403 |
<div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
|
404 |
<form method="post" action="admin.php?page=contact_form.php">
|
405 |
<span style="margin-bottom:15px;">
|
406 |
+
<p><?php _e( "If you would like to add a Contact Form to your website, just copy and put this shortcode onto your post or page or widget:", 'contact_form' ); ?> [contact_form] or [contact_form lang=en]</p>
|
407 |
<?php _e( "If information in the below fields are empty then the message will be send to an address which was specified during registration.", 'contact_form' ); ?>
|
408 |
</span>
|
409 |
<table class="form-table">
|
410 |
<tr valign="top">
|
411 |
<th scope="row" style="width:195px;"><?php _e( "Use email of wordpress user:", 'contact_form' ); ?> </th>
|
412 |
+
<td colspan="2">
|
413 |
<input type="radio" id="cntctfrm_select_email_user" name="cntctfrm_select_email" value="user" <?php if($cntctfrm_options['cntctfrm_select_email'] == 'user') echo "checked=\"checked\" "; ?>/>
|
|
|
|
|
414 |
<select name="cntctfrm_user_email">
|
415 |
<option disabled><?php _e( "Select user name", 'contact_form' ); ?></option>
|
416 |
<?php while( list( $key, $value ) = each( $userslogin ) ) { ?>
|
422 |
</tr>
|
423 |
<tr valign="top">
|
424 |
<th scope="row" style="width:195px;"><?php _e( "Use this email:", 'contact_form' ); ?> </th>
|
425 |
+
<td colspan="2">
|
426 |
+
<input type="radio" id="cntctfrm_select_email_custom" name="cntctfrm_select_email" value="custom" <?php if($cntctfrm_options['cntctfrm_select_email'] == 'custom') echo "checked=\"checked\" "; ?>/> <input type="text" name="cntctfrm_custom_email" value="<?php echo $cntctfrm_options['cntctfrm_custom_email']; ?>" onfocus="document.getElementById('cntctfrm_select_email_custom').checked = true;" />
|
|
|
|
|
|
|
427 |
<span class="cntctfrm_info"><?php _e( "Set an email address which will be used for messages receiving.", 'contact_form' ); ?></span>
|
428 |
</td>
|
429 |
</tr>
|
432 |
</tr>
|
433 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
434 |
<th scope="row" style="width:195px;"><?php _e( "Display Attachment block", 'contact_form' ); ?></th>
|
435 |
+
<td colspan="2">
|
436 |
+
<input type="checkbox" id="cntctfrm_attachment" name="cntctfrm_attachment" value="1" <?php if($cntctfrm_options['cntctfrm_attachment'] == '1') echo "checked=\"checked\" "; ?>/> <span class="cntctfrm_info"><?php echo __( "Users can attach files of the following types", 'contact_form' ) . ": html, txt, css, gif, png, jpeg, jpg, tiff, bmp, ai, eps, ps, rtf, pdf, doc, docx, xls, zip, rar, wav, mp3, ppt"; ?></span>
|
|
|
|
|
|
|
437 |
</td>
|
438 |
</tr>
|
439 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
440 |
<th scope="row" style="width:195px;"><?php _e( "Display Attachment explanations", 'contact_form' ); ?></th>
|
441 |
+
<td colspan="2">
|
442 |
+
<input type="checkbox" id="cntctfrm_attachment_explanations" name="cntctfrm_attachment_explanations" value="1" <?php if( $cntctfrm_options['cntctfrm_attachment_explanations'] == '1' && $cntctfrm_options['cntctfrm_attachment'] == '1' ) echo "checked=\"checked\" "; ?>/> <span class="cntctfrm_info"><?php echo __( "Display explanations after Attachment block", 'contact_form' ); ?></span>
|
|
|
|
|
|
|
443 |
</td>
|
444 |
</tr>
|
445 |
<tr valign="top" class="cntctfrm_additions_block <?php if( $cntctfrm_options['cntctfrm_additions_options'] == '0' ) echo "cntctfrm_hidden"; ?>">
|
450 |
</tr>
|
451 |
<tr class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
452 |
<th rowspan="2"><?php _e( 'What use?', 'contact_form' ); ?></th>
|
453 |
+
<td colspan="2">
|
454 |
<input type='radio' name='cntctfrm_mail_method' value='wp-mail' <?php if( $cntctfrm_options['cntctfrm_mail_method'] == 'wp-mail' ) echo "checked=\"checked\" "; ?>/>
|
|
|
|
|
455 |
<?php _e( 'Wp-mail', 'mail-send' ); ?>
|
456 |
<span class="cntctfrm_info">(<?php _e( 'To send mail you can use the wordpress wp_mail function', 'mail_send' ); ?>)</span>
|
457 |
</td>
|
458 |
</tr>
|
459 |
<tr class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
460 |
+
<td colspan="2">
|
461 |
<input type='radio' name='cntctfrm_mail_method' value='mail' <?php if($cntctfrm_options['cntctfrm_mail_method'] == 'mail') echo "checked=\"checked\" "; ?>/>
|
|
|
|
|
462 |
<?php _e( 'Mail', 'mail-send' ); ?>
|
463 |
<span class="cntctfrm_info">(<?php _e( 'To send mail you can use the php mail function', 'mail_send' ); ?>)</span>
|
464 |
</td>
|
465 |
</tr>
|
466 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
467 |
+
<th scope="row" style="width:195px;"><?php _e( "Change text for 'FROM' field of the email", 'contact_form' ); ?></th>
|
468 |
<td colspan="2">
|
469 |
<input type="text" style="width:200px;" name="cntctfrm_from_field" value="<?php echo stripslashes( $cntctfrm_options['cntctfrm_from_field'] ); ?>" /><br />
|
470 |
</td>
|
471 |
</tr>
|
472 |
+
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
473 |
+
<th scope="row" style="width:195px;"><?php _e( "Select email for 'FROM' field of the email", 'contact_form' ); ?></th>
|
474 |
+
<td colspan="2">
|
475 |
+
<input type="radio" id="cntctfrm_from_email" name="cntctfrm_from_email" value="user" <?php if( $cntctfrm_options['cntctfrm_from_email'] == 'user' ) echo "checked=\"checked\" "; ?>/> User email <span class="cntctfrm_info">(<?php _e( "In the field 'From' in the mail it will use email of that user who fills the form.", 'contact_form' ); ?>)</span><br />
|
476 |
+
<input type="radio" id="cntctfrm_from_custom_email" name="cntctfrm_from_email" value="custom" <?php if($cntctfrm_options['cntctfrm_from_email'] == 'custom') echo "checked=\"checked\" "; ?>/> <input type="text" name="cntctfrm_custom_from_email" value="<?php echo $cntctfrm_options['cntctfrm_custom_from_email']; ?>" onfocus="document.getElementById('cntctfrm_from_custom_email').checked = true;" />
|
477 |
+
<span class="cntctfrm_info">(<?php _e( "In the field 'From' it will use this email.", 'contact_form' ); ?>)</span>
|
478 |
+
</td>
|
479 |
+
</tr>
|
480 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
481 |
<th scope="row" style="width:195px;"><?php _e( "Display phone field", 'contact_form' ); ?></th>
|
482 |
+
<td colspan="2">
|
483 |
<input type="checkbox" id="cntctfrm_display_phone_field" name="cntctfrm_display_phone_field" value="1" <?php if($cntctfrm_options['cntctfrm_display_phone_field'] == '1') echo "checked=\"checked\" "; ?>/>
|
484 |
</td>
|
485 |
</tr>
|
486 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
487 |
<th scope="row" style="width:195px;"><?php _e( "Required field", 'contact_form' ); ?></th>
|
488 |
+
<td colspan="2">
|
489 |
+
<input type="checkbox" id="cntctfrm_required_name_field" name="cntctfrm_required_name_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_name_field'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "Name", 'contact_form' ); ?><br />
|
490 |
+
<input type="checkbox" id="cntctfrm_required_email_field" name="cntctfrm_required_email_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_email_field'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "E-Mail Address", 'contact_form' ); ?><br />
|
491 |
+
<input type="checkbox" id="cntctfrm_required_phone_field" name="cntctfrm_required_phone_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_phone_field'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "Phone", 'contact_form' ); ?><br />
|
492 |
+
<input type="checkbox" id="cntctfrm_required_subject_field" name="cntctfrm_required_subject_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_subject_field'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "Subject", 'contact_form' ); ?><br />
|
493 |
+
<input type="checkbox" id="cntctfrm_required_message_field" name="cntctfrm_required_message_field" value="1" <?php if($cntctfrm_options['cntctfrm_required_message_field'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "Message", 'contact_form' ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
</td>
|
495 |
</tr>
|
496 |
+
<tr valign="top" class="cntctfrm_additions_block <?php if( $cntctfrm_options['cntctfrm_additions_options'] == '0' ) echo "cntctfrm_hidden"; ?>">
|
497 |
<th scope="row" style="width:195px;"><?php _e( "Display additional info in email", 'contact_form' ); ?></th>
|
498 |
+
<td style="width:15px;">
|
499 |
<input type="checkbox" id="cntctfrm_display_add_info" name="cntctfrm_display_add_info" value="1" <?php if($cntctfrm_options['cntctfrm_display_add_info'] == '1') echo "checked=\"checked\" "; ?>/>
|
500 |
</td>
|
501 |
+
<td class="cntctfrm_display_add_info_block <?php if( $cntctfrm_options['cntctfrm_display_add_info'] == '0' ) echo "cntctfrm_hidden"; ?>">
|
502 |
+
<input type="checkbox" id="cntctfrm_display_sent_from" name="cntctfrm_display_sent_from" value="1" <?php if($cntctfrm_options['cntctfrm_display_sent_from'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "Sent from (ip address)", 'contact_form' ); ?><br />
|
503 |
+
<input type="checkbox" id="cntctfrm_display_date_time" name="cntctfrm_display_date_time" value="1" <?php if($cntctfrm_options['cntctfrm_display_date_time'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "Date/Time", 'contact_form' ); ?><br />
|
504 |
+
<input type="checkbox" id="cntctfrm_display_coming_from" name="cntctfrm_display_coming_from" value="1" <?php if($cntctfrm_options['cntctfrm_display_coming_from'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "Coming from (referer)", 'contact_form' ); ?><br />
|
505 |
+
<input type="checkbox" id="cntctfrm_display_user_agent" name="cntctfrm_display_user_agent" value="1" <?php if($cntctfrm_options['cntctfrm_display_user_agent'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "Using (user agent)", 'contact_form' ); ?><br />
|
506 |
</td>
|
507 |
</tr>
|
508 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
509 |
+
<th scope="row" style="width:195px;"><?php _e( "Language settings for label fields", 'contact_form' ); ?></th>
|
510 |
+
<td colspan="2">
|
511 |
+
<select name="cntctfrm_languages" id="cntctfrm_languages" style="width:300px;">
|
512 |
+
<?php foreach ( $lang_codes as $key=>$val ) {
|
513 |
+
if( in_array( $key, $cntctfrm_options['cntctfrm_language'] ) )
|
514 |
+
continue;
|
515 |
+
echo '<option value="' . esc_attr( $key ) . '"> ' . esc_html ( $val ) . '</option>';
|
516 |
+
} ?>
|
517 |
+
</select>
|
518 |
+
<input type="button" class="button-primary" id="cntctfrm_add_language_button" value="<?php _e('Add language', 'contact_form'); ?>" />
|
519 |
+
</td>
|
520 |
+
</tr>
|
521 |
+
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
522 |
+
<th scope="row" style="width:195px;"><?php _e( "Change label for fields of the contact form and error messages", 'contact_form' ); ?></th>
|
523 |
+
<td style="width:15px;">
|
524 |
<input type="checkbox" id="cntctfrm_change_label" name="cntctfrm_change_label" value="1" <?php if($cntctfrm_options['cntctfrm_change_label'] == '1') echo "checked=\"checked\" "; ?>/>
|
525 |
</td>
|
526 |
<td class="cntctfrm_change_label_block <?php if($cntctfrm_options['cntctfrm_change_label'] == '0') echo "cntctfrm_hidden"; ?>">
|
527 |
+
<div class="cntctfrm_label_language_tab cntctfrm_active" id="cntctfrm_label_en"><?php _e('English', 'contact_form'); ?></div>
|
528 |
+
<?php if( ! empty( $cntctfrm_options['cntctfrm_language'] ) ){
|
529 |
+
foreach( $cntctfrm_options['cntctfrm_language'] as $val ) {
|
530 |
+
echo '<div class="cntctfrm_label_language_tab" id="cntctfrm_label_'.$val.'">'.$lang_codes[$val].' <span class="cntctfrm_delete" rel="'.$val.'">X</span></div>';
|
531 |
+
}
|
532 |
+
} ?>
|
533 |
+
<div class="clear"></div>
|
534 |
+
<div class="cntctfrm_language_tab cntctfrm_tab_en">
|
535 |
+
<input type="text" name="cntctfrm_name_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_name_label']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Name:", 'contact_form' ); ?></span><br />
|
536 |
+
<input type="text" name="cntctfrm_email_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_email_label']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "E-Mail Address:", 'contact_form' ); ?></span><br />
|
537 |
+
<input type="text" name="cntctfrm_phone_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_phone_label']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Phone:", 'contact_form' ); ?></span><br />
|
538 |
+
<input type="text" name="cntctfrm_subject_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_subject_label']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Subject:", 'contact_form' ); ?></span><br />
|
539 |
+
<input type="text" name="cntctfrm_message_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_message_label']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Message:", 'contact_form' ); ?></span><br />
|
540 |
+
<input type="text" name="cntctfrm_attachment_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_label']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Attachment:", 'contact_form' ); ?></span><br />
|
541 |
+
<input type="text" name="cntctfrm_submit_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_submit_label']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Submit", 'contact_form' ); ?></span><br />
|
542 |
+
<input type="text" name="cntctfrm_name_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_name_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for name field", 'contact_form' ); ?></span><br />
|
543 |
+
<input type="text" name="cntctfrm_email_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_email_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for email field", 'contact_form' ); ?></span><br />
|
544 |
+
<input type="text" name="cntctfrm_phone_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_phone_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for phone field", 'contact_form' ); ?></span><br />
|
545 |
+
<input type="text" name="cntctfrm_subject_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_subject_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for subject field", 'contact_form' ); ?></span><br />
|
546 |
+
<input type="text" name="cntctfrm_message_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_message_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for message field", 'contact_form' ); ?></span><br />
|
547 |
+
<input type="text" name="cntctfrm_attachment_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for attachment field", 'contact_form' ); ?></span><br />
|
548 |
+
<input type="text" name="cntctfrm_captcha_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_captcha_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for captcha", 'contact_form' ); ?></span><br />
|
549 |
+
<input type="text" name="cntctfrm_form_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_form_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for all form", 'contact_form' ); ?></span><br />
|
550 |
+
<span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [contact_form lang=en] or [contact_form] "; _e( "for this language", 'contact_form' ); ?></span>
|
551 |
+
</div>
|
552 |
+
<?php if( ! empty( $cntctfrm_options['cntctfrm_language'] ) ){
|
553 |
+
foreach( $cntctfrm_options['cntctfrm_language'] as $val ) { ?>
|
554 |
+
<div class="cntctfrm_language_tab hidden cntctfrm_tab_<?php echo $val; ?>">
|
555 |
+
<input type="text" name="cntctfrm_name_label[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_name_label'][$val] ) ) echo $cntctfrm_options['cntctfrm_name_label'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Name:", 'contact_form' ); ?></span><br />
|
556 |
+
<input type="text" name="cntctfrm_email_label[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_email_label'][$val] ) ) echo $cntctfrm_options['cntctfrm_email_label'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "E-Mail Address:", 'contact_form' ); ?></span><br />
|
557 |
+
<input type="text" name="cntctfrm_phone_label[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_phone_label'][$val] ) ) echo $cntctfrm_options['cntctfrm_phone_label'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Phone:", 'contact_form' ); ?></span><br />
|
558 |
+
<input type="text" name="cntctfrm_subject_label[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_subject_label'][$val] ) ) echo $cntctfrm_options['cntctfrm_subject_label'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Subject:", 'contact_form' ); ?></span><br />
|
559 |
+
<input type="text" name="cntctfrm_message_label[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_message_label'][$val] ) ) echo $cntctfrm_options['cntctfrm_message_label'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Message:", 'contact_form' ); ?></span><br />
|
560 |
+
<input type="text" name="cntctfrm_attachment_label[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_attachment_label'][$val] ) ) echo $cntctfrm_options['cntctfrm_attachment_label'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Attachment:", 'contact_form' ); ?></span><br />
|
561 |
+
<input type="text" name="cntctfrm_submit_label[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_submit_label'][$val] ) ) echo $cntctfrm_options['cntctfrm_submit_label'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Submit", 'contact_form' ); ?></span><br />
|
562 |
+
<input type="text" name="cntctfrm_name_error[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_name_error'][$val] ) ) echo $cntctfrm_options['cntctfrm_name_error'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for name field", 'contact_form' ); ?></span><br />
|
563 |
+
<input type="text" name="cntctfrm_email_error[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_email_error'][$val] ) ) echo $cntctfrm_options['cntctfrm_email_error'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for email field", 'contact_form' ); ?></span><br />
|
564 |
+
<input type="text" name="cntctfrm_phone_error[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_phone_error'][$val] ) ) echo $cntctfrm_options['cntctfrm_phone_error'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for phone field", 'contact_form' ); ?></span><br />
|
565 |
+
<input type="text" name="cntctfrm_subject_error[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_subject_error'][$val] ) ) echo $cntctfrm_options['cntctfrm_subject_error'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for subject field", 'contact_form' ); ?></span><br />
|
566 |
+
<input type="text" name="cntctfrm_message_error[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_message_error'][$val] ) ) echo $cntctfrm_options['cntctfrm_message_error'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for message field", 'contact_form' ); ?></span><br />
|
567 |
+
<input type="text" name="cntctfrm_attachment_error[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_attachment_error'][$val] ) ) echo $cntctfrm_options['cntctfrm_attachment_error'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for attachment field", 'contact_form' ); ?></span><br />
|
568 |
+
<input type="text" name="cntctfrm_captcha_error[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_captcha_error'][$val] ) ) echo $cntctfrm_options['cntctfrm_captcha_error'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for captcha", 'contact_form' ); ?></span><br />
|
569 |
+
<input type="text" name="cntctfrm_form_error[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_form_error'][$val] ) ) echo $cntctfrm_options['cntctfrm_form_error'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for all form", 'contact_form' ); ?></span><br />
|
570 |
+
<span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [contact_form lang=".$val."] "; _e( "for this language", 'contact_form' ); ?></span>
|
571 |
+
</div>
|
572 |
+
<?php }
|
573 |
+
} ?>
|
574 |
</td>
|
575 |
</tr>
|
576 |
<tr valign="top" class="cntctfrm_additions_block <?php if($cntctfrm_options['cntctfrm_additions_options'] == '0') echo "cntctfrm_hidden"; ?>">
|
577 |
<th scope="row" style="width:195px;"><?php _e( "Action after the send mail", 'contact_form' ); ?></th>
|
578 |
<td colspan="2" class="cntctfrm_action_after_send_block">
|
579 |
+
<input type="radio" id="cntctfrm_action_after_send" name="cntctfrm_action_after_send" value="1" <?php if($cntctfrm_options['cntctfrm_action_after_send'] == '1') echo "checked=\"checked\" "; ?>/> <?php _e( "Display text", 'contact_form' ); ?><br />
|
580 |
+
<div class="cntctfrm_label_language_tab cntctfrm_active" id="cntctfrm_text_en"><?php _e('English', 'contact_form'); ?></div>
|
581 |
+
<?php if( ! empty( $cntctfrm_options['cntctfrm_language'] ) ){
|
582 |
+
foreach( $cntctfrm_options['cntctfrm_language'] as $val ) {
|
583 |
+
echo '<div class="cntctfrm_label_language_tab" id="cntctfrm_text_'.$val.'">'.$lang_codes[$val].' <span class="cntctfrm_delete" rel="'.$val.'">X</span></div>';
|
584 |
+
}
|
585 |
+
} ?>
|
586 |
+
<div class="clear"></div>
|
587 |
+
<div class="cntctfrm_language_tab cntctfrm_tab_en">
|
588 |
+
<input type="text" name="cntctfrm_thank_text[en]" value="<?php echo $cntctfrm_options['cntctfrm_thank_text']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Text", 'contact_form' ); ?></span><br />
|
589 |
+
<span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [contact_form=en] or [contact_form] "; _e( "for this language", 'contact_form' ); ?></span>
|
590 |
+
</div>
|
591 |
+
<?php if( ! empty( $cntctfrm_options['cntctfrm_language'] ) ){
|
592 |
+
foreach( $cntctfrm_options['cntctfrm_language'] as $val ) { ?>
|
593 |
+
<div class="cntctfrm_language_tab hidden cntctfrm_tab_<?php echo $val; ?>">
|
594 |
+
<input type="text" name="cntctfrm_thank_text[<?php echo $val; ?>]" value="<?php if( isset( $cntctfrm_options['cntctfrm_thank_text'][$val] ) ) echo $cntctfrm_options['cntctfrm_thank_text'][$val]; ?>" /> <span class="cntctfrm_info"><?php _e( "Text", 'contact_form' ); ?></span><br />
|
595 |
+
<span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [contact_form lang=".$val."] "; _e( "for this language", 'contact_form' ); ?></span>
|
596 |
+
</div>
|
597 |
+
<?php }
|
598 |
+
} ?>
|
599 |
+
<div id="cntctfrm_before"></div>
|
600 |
+
<br />
|
601 |
+
<input type="radio" id="cntctfrm_action_after_send" name="cntctfrm_action_after_send" value="0" <?php if($cntctfrm_options['cntctfrm_action_after_send'] == '0') echo "checked=\"checked\" "; ?>/> <?php _e( "Redirect to page", 'contact_form' ); ?><br />
|
602 |
<input type="text" name="cntctfrm_redirect_url" value="<?php echo $cntctfrm_options['cntctfrm_redirect_url']; ?>" /> <span class="cntctfrm_info"><?php _e( "Url", 'contact_form' ); ?></span><br />
|
603 |
</td>
|
604 |
</table>
|
615 |
|
616 |
// Display contact form in front end - page or post
|
617 |
if( ! function_exists( 'cntctfrm_display_form' ) ) {
|
618 |
+
function cntctfrm_display_form( $atts = array( 'lang' => 'en' ) ) {
|
619 |
global $error_message, $cntctfrm_options, $cntctfrm_result;
|
620 |
+
extract( shortcode_atts( array( 'lang' => 'en' ), $atts ) );
|
621 |
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
622 |
$content = "";
|
623 |
|
636 |
if( true === $cntctfrm_result ) {
|
637 |
$_SESSION['cntctfrm_send_mail'] = true;
|
638 |
if( $cntctfrm_options['cntctfrm_action_after_send'] == 1 )
|
639 |
+
$content .= $cntctfrm_options['cntctfrm_thank_text'][$lang];
|
640 |
else
|
641 |
$content .= "<script type='text/javascript'>window.location.href = '".$cntctfrm_options['cntctfrm_redirect_url']."';</script>";
|
642 |
}
|
653 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_form'].'</div>';
|
654 |
}
|
655 |
$content .= '<div style="text-align: left; padding-top: 5px;">
|
656 |
+
<label for="cntctfrm_contact_name">'. $cntctfrm_options['cntctfrm_name_label'][$lang] . ( $cntctfrm_options['cntctfrm_required_name_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
657 |
</div>';
|
658 |
if( isset( $error_message['error_name'] ) ) {
|
659 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_name'].'</div>';
|
663 |
</div>
|
664 |
|
665 |
<div style="text-align: left;">
|
666 |
+
<label for="cntctfrm_contact_email">'. $cntctfrm_options['cntctfrm_email_label'][$lang] . ( $cntctfrm_options['cntctfrm_required_email_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
667 |
</div>';
|
668 |
if( isset( $error_message['error_email'] ) ) {
|
669 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_email'].'</div>';
|
674 |
';
|
675 |
if( $cntctfrm_options['cntctfrm_display_phone_field'] == 1 ) {
|
676 |
$content .= '<div style="text-align: left;">
|
677 |
+
<label for="cntctfrm_contact_phone">'. $cntctfrm_options['cntctfrm_phone_label'][$lang] . ( $cntctfrm_options['cntctfrm_required_phone_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
678 |
</div>';
|
679 |
if( isset( $error_message['error_phone'] ) ) {
|
680 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_phone'].'</div>';
|
685 |
';
|
686 |
}
|
687 |
$content .= '<div style="text-align: left;">
|
688 |
+
<label for="cntctfrm_contact_subject">'. $cntctfrm_options['cntctfrm_subject_label'][$lang] . ( $cntctfrm_options['cntctfrm_required_subject_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
689 |
</div>';
|
690 |
if( isset( $error_message['error_subject'] ) ) {
|
691 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_subject'].'</div>';
|
695 |
</div>
|
696 |
|
697 |
<div style="text-align: left;">
|
698 |
+
<label for="cntctfrm_contact_message">'. $cntctfrm_options['cntctfrm_message_label'][$lang] . ( $cntctfrm_options['cntctfrm_required_message_field'] == 1 ? '<span class="required"> *</span></label>' : '</label>' ) . '
|
699 |
</div>';
|
700 |
if( isset( $error_message['error_message'] ) ) {
|
701 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_message'].'</div>';
|
705 |
</div>';
|
706 |
if($cntctfrm_options['cntctfrm_attachment'] == 1 ) {
|
707 |
$content .= '<div style="text-align: left;">
|
708 |
+
<label for="cntctfrm_contact_attachment">'. $cntctfrm_options['cntctfrm_attachment_label'][$lang] . '</label>
|
709 |
</div>';
|
710 |
if( isset( $error_message['error_attachment'] ) ) {
|
711 |
$content .= '<div style="text-align: left; color: red;">'.$error_message['error_attachment'].'</div>';
|
731 |
|
732 |
$content .= '<div style="text-align: left; padding-top: 8px;">
|
733 |
<input type="hidden" value="send" name="cntctfrm_contact_action"><input type="hidden" value="Version: 3.26" />
|
734 |
+
<input type="hidden" value="'.$lang.'" name="cntctfrm_language">
|
735 |
+
<input type="submit" value="'. $cntctfrm_options['cntctfrm_submit_label'][$lang]. '" style="cursor: pointer; margin: 0pt; text-align: center;margin-bottom:10px;" />
|
736 |
</div>
|
737 |
</form>';
|
738 |
}
|
744 |
function cntctfrm_check_and_send() {
|
745 |
global $cntctfrm_result;
|
746 |
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
747 |
+
if( isset( $_REQUEST['cntctfrm_contact_action'] ) ){
|
|
|
748 |
// Check all input data
|
749 |
$cntctfrm_result = cntctfrm_check_form();
|
750 |
}
|
764 |
function cntctfrm_check_form() {
|
765 |
global $error_message;
|
766 |
global $cntctfrm_options;
|
767 |
+
|
768 |
+
$language = isset( $_REQUEST['cntctfrm_language'] ) ? $_REQUEST['cntctfrm_language'] : 'en';
|
769 |
$path_of_uploaded_file = '';
|
770 |
if( empty( $cntctfrm_options ) )
|
771 |
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
773 |
// Error messages array
|
774 |
$error_message = array();
|
775 |
if( $cntctfrm_options['cntctfrm_required_name_field'] == 1 )
|
776 |
+
$error_message['error_name'] = $cntctfrm_options['cntctfrm_name_error'][$language];
|
777 |
if( $cntctfrm_options['cntctfrm_required_email_field'] == 1 )
|
778 |
+
$error_message['error_email'] = $cntctfrm_options['cntctfrm_email_error'][$language];
|
779 |
if( $cntctfrm_options['cntctfrm_required_subject_field'] == 1 )
|
780 |
+
$error_message['error_subject'] = $cntctfrm_options['cntctfrm_subject_error'][$language];
|
781 |
if( $cntctfrm_options['cntctfrm_required_message_field'] == 1 )
|
782 |
+
$error_message['error_message'] = $cntctfrm_options['cntctfrm_message_error'][$language];
|
783 |
if( $cntctfrm_options['cntctfrm_required_phone_field'] == 1 )
|
784 |
+
$error_message['error_phone'] = $cntctfrm_options['cntctfrm_phone_error'][$language];
|
785 |
+
$error_message['error_form'] = $cntctfrm_options['cntctfrm_form_error'][$language];
|
786 |
if( $cntctfrm_options['cntctfrm_attachment'] == 1 ) {
|
787 |
global $path_of_uploaded_file;
|
788 |
global $mime_type;
|
814 |
'wav'=>'audio/wav',
|
815 |
'mp3'=>'audio/mp3',
|
816 |
'ppt'=>'application/vnd.ms-powerpoint');
|
817 |
+
$error_message['error_attachment'] = $cntctfrm_options['cntctfrm_attachment_error'][$language];
|
818 |
}
|
819 |
// Check information wich was input in fields
|
820 |
if( $cntctfrm_options['cntctfrm_required_name_field'] == 1 && "" != $_REQUEST['cntctfrm_contact_name'] )
|
829 |
unset( $error_message['error_phone'] );
|
830 |
// If captcha plugin exists
|
831 |
if( ! apply_filters( 'cntctfrm_check_form', $_REQUEST ) )
|
832 |
+
$error_message['error_captcha'] = $cntctfrm_options['cntctfrm_captcha_error'][$language];
|
833 |
if( isset($_FILES["cntctfrm_contact_attachment"]["tmp_name"]) && $_FILES["cntctfrm_contact_attachment"]["tmp_name"] != "") {
|
834 |
if( is_multisite() ){
|
835 |
if( defined('UPLOADS') ) {
|
983 |
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
|
984 |
|
985 |
// Additional headers
|
986 |
+
if( 'custom' == $cntctfrm_options['cntctfrm_from_email'] )
|
987 |
+
$headers .= 'From: '.stripslashes( $cntctfrm_options['cntctfrm_custom_from_email'] ). '\r\n';
|
988 |
+
else
|
989 |
+
$headers .= 'From: '.stripslashes( $_REQUEST['cntctfrm_contact_email'] ). '\r\n';
|
990 |
if( $cntctfrm_options['cntctfrm_attachment'] == 1 && isset($_FILES["cntctfrm_contact_attachment"]["tmp_name"]) && $_FILES["cntctfrm_contact_attachment"]["tmp_name"] != "") {
|
991 |
$attachments = array( $path_of_uploaded_file );
|
992 |
}
|
1004 |
$message_block = $message;
|
1005 |
|
1006 |
// Additional headers
|
1007 |
+
if( 'custom' == $cntctfrm_options['cntctfrm_from_email'] )
|
1008 |
+
$headers .= 'From: '.stripslashes( $cntctfrm_options['cntctfrm_from_field'] ).' <'.stripslashes( $cntctfrm_options['cntctfrm_custom_from_email'] ). '>\r\n';
|
1009 |
+
else
|
1010 |
+
$headers .= 'From: '.stripslashes( $cntctfrm_options['cntctfrm_from_field'] ).' <'.stripslashes( $_REQUEST['cntctfrm_contact_email'] ). '>\r\n';
|
1011 |
|
1012 |
$bound_text = "jimmyP123";
|
1013 |
|
1043 |
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
|
1044 |
|
1045 |
// Additional headers
|
1046 |
+
if( 'custom' == $cntctfrm_options['cntctfrm_from_email'] )
|
1047 |
+
$headers .= 'From: '.stripslashes( $cntctfrm_options['cntctfrm_from_field'] ).' <'.stripslashes( $cntctfrm_options['cntctfrm_custom_from_email'] ). '>\r\n';
|
1048 |
+
else
|
1049 |
+
$headers .= 'From: '.stripslashes( $cntctfrm_options['cntctfrm_from_field'] ).' <'.stripslashes( $_REQUEST['cntctfrm_contact_email'] ). '>\r\n';
|
1050 |
}
|
1051 |
if( isset( $_REQUEST['cntctfrm_contact_send_copy'] ) && $_REQUEST['cntctfrm_contact_send_copy'] == 1 )
|
1052 |
@mail( stripslashes( $_REQUEST['cntctfrm_contact_email'] ), stripslashes( strip_tags( $subject ) ), stripslashes( $message ), $headers );
|
1122 |
function cntctfrm_admin_head() {
|
1123 |
wp_enqueue_style( 'cntctfrmStylesheet', plugins_url( 'css/style.css', __FILE__ ) );
|
1124 |
wp_enqueue_script( 'cntctfrmScript', plugins_url( 'js/script.js', __FILE__ ) );
|
1125 |
+
echo '<script type="text/javascript">var confirm_text = "'.__('Are you sure you want to delete this language?', 'contact_form').'"</script>';
|
1126 |
}
|
1127 |
}
|
1128 |
|
1140 |
return $data;
|
1141 |
}
|
1142 |
|
1143 |
+
function cntctfrm_add_language(){
|
1144 |
+
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
1145 |
+
$cntctfrm_options['cntctfrm_language'][] = $_REQUEST['lang'];
|
1146 |
+
update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
|
1147 |
+
die();
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
function cntctfrm_remove_language(){
|
1151 |
+
$cntctfrm_options = get_option( 'cntctfrm_options' );
|
1152 |
+
if( $key = array_search( $_REQUEST['lang'], $cntctfrm_options['cntctfrm_language'] ) !== false )
|
1153 |
+
$cntctfrm_options['cntctfrm_language'] = array_diff( $cntctfrm_options['cntctfrm_language'], array( $_REQUEST['lang'] ) );
|
1154 |
+
if( isset( $cntctfrm_options['cntctfrm_name_label'][$_REQUEST['lang']] ) )
|
1155 |
+
unset( $cntctfrm_options['cntctfrm_name_label'][$_REQUEST['lang']]);
|
1156 |
+
if( isset( $cntctfrm_options['cntctfrm_email_label'][$_REQUEST['lang']] ) )
|
1157 |
+
unset( $cntctfrm_options['cntctfrm_email_label'][$_REQUEST['lang']]);
|
1158 |
+
if( isset( $cntctfrm_options['cntctfrm_phone_label'][$_REQUEST['lang']] ) )
|
1159 |
+
unset( $cntctfrm_options['cntctfrm_phone_label'][$_REQUEST['lang']]);
|
1160 |
+
if( isset( $cntctfrm_options['cntctfrm_subject_label'][$_REQUEST['lang']] ) )
|
1161 |
+
unset( $cntctfrm_options['cntctfrm_subject_label'][$_REQUEST['lang']]);
|
1162 |
+
if( isset( $cntctfrm_options['cntctfrm_message_label'][$_REQUEST['lang']] ) )
|
1163 |
+
unset( $cntctfrm_options['cntctfrm_message_label'][$_REQUEST['lang']]);
|
1164 |
+
if( isset( $cntctfrm_options['cntctfrm_attachment_label'][$_REQUEST['lang']] ) )
|
1165 |
+
unset( $cntctfrm_options['cntctfrm_attachment_label'][$_REQUEST['lang']]);
|
1166 |
+
if( isset( $cntctfrm_options['cntctfrm_thank_text'][$_REQUEST['lang']] ) )
|
1167 |
+
unset( $cntctfrm_options['cntctfrm_thank_text'][$_REQUEST['lang']]);
|
1168 |
+
if( isset( $cntctfrm_options['cntctfrm_submit_label'][$_REQUEST['lang']] ) )
|
1169 |
+
unset( $cntctfrm_options['cntctfrm_submit_label'][$_REQUEST['lang']]);
|
1170 |
+
if( isset( $cntctfrm_options['cntctfrm_name_error'][$_REQUEST['lang']] ) )
|
1171 |
+
unset( $cntctfrm_options['cntctfrm_name_error'][$_REQUEST['lang']]);
|
1172 |
+
if( isset( $cntctfrm_options['cntctfrm_email_error'][$_REQUEST['lang']] ) )
|
1173 |
+
unset( $cntctfrm_options['cntctfrm_email_error'][$_REQUEST['lang']]);
|
1174 |
+
if( isset( $cntctfrm_options['cntctfrm_phone_error'][$_REQUEST['lang']] ) )
|
1175 |
+
unset( $cntctfrm_options['cntctfrm_phone_error'][$_REQUEST['lang']]);
|
1176 |
+
if( isset( $cntctfrm_options['cntctfrm_subject_error'][$_REQUEST['lang']] ) )
|
1177 |
+
unset( $cntctfrm_options['cntctfrm_subject_error'][$_REQUEST['lang']]);
|
1178 |
+
if( isset( $cntctfrm_options['cntctfrm_message_error'][$_REQUEST['lang']] ) )
|
1179 |
+
unset( $cntctfrm_options['cntctfrm_message_error'][$_REQUEST['lang']]);
|
1180 |
+
if( isset( $cntctfrm_options['cntctfrm_attachment_error'][$_REQUEST['lang']] ) )
|
1181 |
+
unset( $cntctfrm_options['cntctfrm_attachment_error'][$_REQUEST['lang']]);
|
1182 |
+
if( isset( $cntctfrm_options['cntctfrm_captcha_error'][$_REQUEST['lang']] ) )
|
1183 |
+
unset( $cntctfrm_options['cntctfrm_captcha_error'][$_REQUEST['lang']]);
|
1184 |
+
if( isset( $cntctfrm_options['cntctfrm_form_error'][$_REQUEST['lang']] ) )
|
1185 |
+
unset( $cntctfrm_options['cntctfrm_form_error'][$_REQUEST['lang']]);
|
1186 |
+
update_option( 'cntctfrm_options', $cntctfrm_options );
|
1187 |
+
die();
|
1188 |
+
}
|
1189 |
+
|
1190 |
add_action( 'init', 'cntctfrm_plugin_init' );
|
1191 |
|
1192 |
add_action( 'init', 'cntctfrm_check_and_send' );
|
1208 |
add_filter( 'widget_text', 'do_shortcode' );
|
1209 |
|
1210 |
add_filter( 'wp_mail_from_name', 'cntctfrm_email_name_filter', 10, 1);
|
1211 |
+
|
1212 |
+
add_action( 'wp_ajax_cntctfrm_add_language', 'cntctfrm_add_language' );
|
1213 |
+
add_action( 'wp_ajax_cntctfrm_remove_language', 'cntctfrm_remove_language' );
|
1214 |
+
|
1215 |
?>
|
css/style.css
CHANGED
@@ -6,12 +6,9 @@
|
|
6 |
#cntctfrm_contact_subject {
|
7 |
width:320px;
|
8 |
}
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
#cntctfrm_required_subject_field,
|
13 |
-
#cntctfrm_required_message_field {
|
14 |
-
margin: 3px 0 4px;
|
15 |
}
|
16 |
#adminmenu #toplevel_page_bws_plugins div.wp-menu-image
|
17 |
{
|
@@ -45,21 +42,13 @@
|
|
45 |
#cntctfrm_contact_attachment {
|
46 |
margin-bottom:0;
|
47 |
}
|
48 |
-
|
49 |
-
position:relative;
|
50 |
-
top:2px;
|
51 |
-
}
|
52 |
-
#cntctfrm_attachment, #cntctfrm_send_copy, #cntctfrm_change_label {
|
53 |
-
position:relative;
|
54 |
-
top:3px;
|
55 |
-
}
|
56 |
-
#cntctfrm_select_email_user, #cntctfrm_select_email_custom {
|
57 |
-
position:relative;
|
58 |
-
top:5px;
|
59 |
-
}
|
60 |
.cntctfrm_change_label_block input, .cntctfrm_action_after_send_block input {
|
61 |
margin: 1px 0;
|
62 |
}
|
|
|
|
|
|
|
63 |
|
64 |
.cntctfrm_action_after_send_block input[type="text"] {
|
65 |
width:250px;
|
@@ -80,6 +69,30 @@
|
|
80 |
width: 200px !important;
|
81 |
}
|
82 |
|
83 |
-
.
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
}
|
6 |
#cntctfrm_contact_subject {
|
7 |
width:320px;
|
8 |
}
|
9 |
+
.bws-plugins_page_contact_form input[type="checkbox"], .bws-plugins_page_contact_form input[type="radio"]{
|
10 |
+
position:relative;
|
11 |
+
top:-2px
|
|
|
|
|
|
|
12 |
}
|
13 |
#adminmenu #toplevel_page_bws_plugins div.wp-menu-image
|
14 |
{
|
42 |
#cntctfrm_contact_attachment {
|
43 |
margin-bottom:0;
|
44 |
}
|
45 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
.cntctfrm_change_label_block input, .cntctfrm_action_after_send_block input {
|
47 |
margin: 1px 0;
|
48 |
}
|
49 |
+
.cntctfrm_change_label_block input[type="text"], .cntctfrm_action_after_send_block input[type="text"] {
|
50 |
+
width: 300px;
|
51 |
+
}
|
52 |
|
53 |
.cntctfrm_action_after_send_block input[type="text"] {
|
54 |
width:250px;
|
69 |
width: 200px !important;
|
70 |
}
|
71 |
|
72 |
+
.cntctfrm_label_language_tab{
|
73 |
+
float: left;
|
74 |
+
padding:2px 5px;
|
75 |
+
border-radius: 4px 4px 0px 0px;
|
76 |
+
border:1px solid #DFDFDF;
|
77 |
+
background: url("../images/gray-grad.png") repeat-x scroll left top #DFDFDF;
|
78 |
+
cursor: pointer;
|
79 |
+
margin-right:3px;
|
80 |
+
}
|
81 |
+
|
82 |
+
.cntctfrm_language_tab{
|
83 |
+
padding: 5px 10px 5px 5px;
|
84 |
+
border:1px solid #DFDFDF;
|
85 |
+
}
|
86 |
+
|
87 |
+
.cntctfrm_active{
|
88 |
+
color:#21759B;
|
89 |
+
}
|
90 |
+
|
91 |
+
.cntctfrm_delete{
|
92 |
+
color: red;
|
93 |
+
display: block;
|
94 |
+
float: right;
|
95 |
+
margin-left: 7px;
|
96 |
+
position: relative;
|
97 |
+
right: -3px;
|
98 |
}
|
images/gray-grad.png
ADDED
Binary file
|
js/script.js
CHANGED
@@ -1,20 +1,109 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
});
|
8 |
-
|
9 |
-
if(jQuery(this).is(':checked') )
|
10 |
-
jQuery('.cntctfrm_change_label_block').removeClass('cntctfrm_hidden');
|
11 |
-
else
|
12 |
-
jQuery('.cntctfrm_change_label_block').addClass('cntctfrm_hidden');
|
13 |
-
});
|
14 |
-
jQuery('#cntctfrm_display_add_info').change( function() {
|
15 |
-
if(jQuery(this).is(':checked') )
|
16 |
-
jQuery('.cntctfrm_display_add_info_block').removeClass('cntctfrm_hidden');
|
17 |
-
else
|
18 |
-
jQuery('.cntctfrm_display_add_info_block').addClass('cntctfrm_hidden');
|
19 |
-
});
|
20 |
-
});
|
1 |
+
(function($){
|
2 |
+
$(document).ready(function(){
|
3 |
+
$('#cntctfrm_additions_options').change( function() {
|
4 |
+
if($(this).is(':checked') )
|
5 |
+
$('.cntctfrm_additions_block').removeClass('cntctfrm_hidden');
|
6 |
+
else
|
7 |
+
$('.cntctfrm_additions_block').addClass('cntctfrm_hidden');
|
8 |
+
});
|
9 |
+
$('#cntctfrm_change_label').change( function() {
|
10 |
+
if($(this).is(':checked') )
|
11 |
+
$('.cntctfrm_change_label_block').removeClass('cntctfrm_hidden');
|
12 |
+
else
|
13 |
+
$('.cntctfrm_change_label_block').addClass('cntctfrm_hidden');
|
14 |
+
});
|
15 |
+
$('#cntctfrm_display_add_info').change( function() {
|
16 |
+
if($(this).is(':checked') )
|
17 |
+
$('.cntctfrm_display_add_info_block').removeClass('cntctfrm_hidden');
|
18 |
+
else
|
19 |
+
$('.cntctfrm_display_add_info_block').addClass('cntctfrm_hidden');
|
20 |
+
});
|
21 |
+
$('#cntctfrm_add_language_button').click(function(){
|
22 |
+
$.ajax({
|
23 |
+
url: '../wp-admin/admin-ajax.php',//update_url,
|
24 |
+
type: "POST",
|
25 |
+
data: "action=cntctfrm_add_language&lang="+$('#cntctfrm_languages').val(),
|
26 |
+
success: function(result) {
|
27 |
+
var lang_val = $('#cntctfrm_languages').val();
|
28 |
+
$('.cntctfrm_change_label_block .cntctfrm_language_tab, .cntctfrm_action_after_send_block .cntctfrm_language_tab').each(function(){
|
29 |
+
$(this).addClass('hidden');
|
30 |
+
});
|
31 |
+
$('.cntctfrm_change_label_block .cntctfrm_language_tab').first().clone().appendTo(".cntctfrm_change_label_block").removeClass('hidden').removeClass('cntctfrm_tab_en').addClass('cntctfrm_tab_'+lang_val);
|
32 |
+
$('.cntctfrm_action_after_send_block .cntctfrm_language_tab').first().clone().insertBefore("#cntctfrm_before").removeClass('hidden').removeClass('cntctfrm_tab_en').addClass('cntctfrm_tab_'+lang_val);
|
33 |
+
$('.cntctfrm_change_label_block .cntctfrm_language_tab').last().find('input').each(function(){
|
34 |
+
$(this).val('');
|
35 |
+
$(this).attr('name', $(this).attr('name').replace('[en]', '['+lang_val+']'));
|
36 |
+
});
|
37 |
+
var text = $('.cntctfrm_change_label_block .cntctfrm_language_tab').last().find('.cntctfrm_info').last().text();
|
38 |
+
text = text.replace('lang=en', 'lang='+lang_val);
|
39 |
+
text = text.replace(' or [contact_form]', '');
|
40 |
+
$('.cntctfrm_change_label_block .cntctfrm_language_tab').last().find('.cntctfrm_info').last().text(text);
|
41 |
+
$('.cntctfrm_action_after_send_block .cntctfrm_language_tab').last().find('input').val('').attr('name', $('.cntctfrm_action_after_send_block .cntctfrm_language_tab').last().find('input').attr('name').replace('[en]', '['+lang_val+']'));
|
42 |
+
text = $('.cntctfrm_change_label_block .cntctfrm_language_tab').last().find('.cntctfrm_info').last().text();
|
43 |
+
text = text.replace('lang=en', 'lang='+lang_val);
|
44 |
+
text = text.replace(' or [contact_form]', '');
|
45 |
+
$('.cntctfrm_action_after_send_block .cntctfrm_language_tab').last().find('.cntctfrm_info').last().text(text);
|
46 |
+
$('.cntctfrm_change_label_block .cntctfrm_label_language_tab, .cntctfrm_action_after_send_block .cntctfrm_label_language_tab').each(function(){
|
47 |
+
$(this).removeClass('cntctfrm_active');
|
48 |
+
});
|
49 |
+
$('.cntctfrm_change_label_block .clear').prev().clone().attr('id','cntctfrm_label_'+lang_val).addClass('cntctfrm_active').html($('#cntctfrm_languages option:selected').text()+' <span class="cntctfrm_delete" rel="'+lang_val+'">X</span>').insertBefore('.cntctfrm_change_label_block .clear');
|
50 |
+
$('.cntctfrm_action_after_send_block .clear').prev().clone().attr('id','cntctfrm_label_'+lang_val).addClass('cntctfrm_active').html($('#cntctfrm_languages option:selected').text()+' <span class="cntctfrm_delete" rel="'+lang_val+'">X</span>').insertBefore('.cntctfrm_action_after_send_block .clear');
|
51 |
+
$('#cntctfrm_languages option:selected').remove();
|
52 |
+
},
|
53 |
+
error: function( request, status, error ) {
|
54 |
+
alert( error + request.status );
|
55 |
+
}
|
56 |
+
});
|
57 |
+
});
|
58 |
+
$('.cntctfrm_change_label_block .cntctfrm_label_language_tab').live('click', function(){
|
59 |
+
$('.cntctfrm_label_language_tab').each(function(){
|
60 |
+
$(this).removeClass('cntctfrm_active');
|
61 |
+
});
|
62 |
+
var index = $('.cntctfrm_change_label_block .cntctfrm_label_language_tab').index($(this));
|
63 |
+
$(this).addClass('cntctfrm_active');
|
64 |
+
var blocks = $('.cntctfrm_action_after_send_block .cntctfrm_label_language_tab');
|
65 |
+
$(blocks[index]).addClass('cntctfrm_active');
|
66 |
+
$('.cntctfrm_language_tab').each(function(){
|
67 |
+
$(this).addClass('hidden');
|
68 |
+
});
|
69 |
+
$('.'+this.id.replace('label', 'tab')).removeClass('hidden');
|
70 |
+
});
|
71 |
+
$('.cntctfrm_action_after_send_block .cntctfrm_label_language_tab').live('click', function(){
|
72 |
+
$('.cntctfrm_label_language_tab').each(function(){
|
73 |
+
$(this).removeClass('cntctfrm_active');
|
74 |
+
});
|
75 |
+
var index = $('.cntctfrm_action_after_send_block .cntctfrm_label_language_tab').index($(this));
|
76 |
+
$(this).addClass('cntctfrm_active');
|
77 |
+
var blocks = $('.cntctfrm_change_label_block .cntctfrm_label_language_tab')
|
78 |
+
$(blocks[index]).addClass('cntctfrm_active');
|
79 |
+
$('.cntctfrm_language_tab').each(function(){
|
80 |
+
$(this).addClass('hidden');
|
81 |
+
});
|
82 |
+
console.log(this.id.replace('text', 'tab'), index);
|
83 |
+
$('.'+this.id.replace('text', 'tab')).removeClass('hidden');
|
84 |
+
});
|
85 |
+
$('.cntctfrm_delete').live('click', function( event ){
|
86 |
+
event.stopPropagation();
|
87 |
+
if ( confirm( confirm_text ) ) {
|
88 |
+
var lang = $(this).attr('rel');
|
89 |
+
$.ajax({
|
90 |
+
url: '../wp-admin/admin-ajax.php',//update_url,
|
91 |
+
type: "POST",
|
92 |
+
data: "action=cntctfrm_remove_language&lang="+lang,
|
93 |
+
success: function(result) {
|
94 |
+
$('.cntctfrm_active, .cntctfrm_tab_'+lang).each(function(){
|
95 |
+
$(this).remove();
|
96 |
+
});
|
97 |
+
$('.cntctfrm_change_label_block .cntctfrm_label_language_tab').first().addClass('cntctfrm_active');
|
98 |
+
$('.cntctfrm_action_after_send_block .cntctfrm_label_language_tab').first().addClass('cntctfrm_active');
|
99 |
+
$('.cntctfrm_change_label_block .cntctfrm_language_tab').first().removeClass('hidden');
|
100 |
+
$('.cntctfrm_action_after_send_block .cntctfrm_language_tab').first().removeClass('hidden');
|
101 |
+
},
|
102 |
+
error: function( request, status, error ) {
|
103 |
+
alert( error + request.status );
|
104 |
+
}
|
105 |
+
});
|
106 |
+
}
|
107 |
+
});
|
108 |
});
|
109 |
+
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/contact_form-ar.mo
CHANGED
Binary file
|
languages/contact_form-ar.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: contact_form\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-11
|
6 |
-
"PO-Revision-Date: 2012-11
|
7 |
"Last-Translator: BWS <zos@bestwebsoft.com>\n"
|
8 |
"Language-Team: Hammad Alshammari (ABU HATIM) www.abuhatim.net <al3zz."
|
9 |
"com@gmail.com>\n"
|
@@ -25,7 +25,7 @@ msgstr "تفعيل الإضافات"
|
|
25 |
msgid "Read more"
|
26 |
msgstr "اقرأ المزيد"
|
27 |
|
28 |
-
#: contact_form.php:78 contact_form.php:
|
29 |
msgid "Settings"
|
30 |
msgstr "إعدادات"
|
31 |
|
@@ -58,7 +58,7 @@ msgstr ""
|
|
58 |
"إذا كان لديك أي أسئلة، يرجى الاتصال بنا عبر plugin@bestwebsoft.com أو ملء "
|
59 |
"استمارة الاتصال على موقعنا"
|
60 |
|
61 |
-
#: contact_form.php:108 contact_form.php:
|
62 |
msgid "Contact Form Options"
|
63 |
msgstr "خيارات نموذج اتصل بنا"
|
64 |
|
@@ -66,58 +66,95 @@ msgstr "خيارات نموذج اتصل بنا"
|
|
66 |
msgid "Contact Form"
|
67 |
msgstr "نموذج الاتصال"
|
68 |
|
69 |
-
#: contact_form.php:
|
70 |
-
#: contact_form.php:413
|
71 |
msgid "Name:"
|
72 |
msgstr "الأسم:"
|
73 |
|
74 |
-
#: contact_form.php:
|
75 |
-
#: contact_form.php:414
|
76 |
msgid "E-Mail Address:"
|
77 |
msgstr "البريد الالكتروني:"
|
78 |
|
79 |
-
#: contact_form.php:
|
80 |
msgid "Phone:"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: contact_form.php:
|
84 |
-
#: contact_form.php:416
|
85 |
msgid "Subject:"
|
86 |
msgstr "موضوع الرسالة:"
|
87 |
|
88 |
-
#: contact_form.php:
|
89 |
-
#: contact_form.php:417
|
90 |
msgid "Message:"
|
91 |
msgstr "الرسالة:"
|
92 |
|
93 |
-
#: contact_form.php:
|
94 |
-
#: contact_form.php:418
|
95 |
msgid "Attachment:"
|
96 |
msgstr "المرفقات:"
|
97 |
|
98 |
-
#: contact_form.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
msgid "Thank you for contacting us."
|
100 |
msgstr "أشكركم على الاتصال بنا. سيتم الرد عليكم في أقرب فرصة."
|
101 |
|
102 |
-
#: contact_form.php:
|
103 |
msgid ""
|
104 |
"If the option 'Redirect to page' is selected then url field should be "
|
105 |
"fillied in the following format"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: contact_form.php:
|
109 |
-
msgid "Options saved."
|
110 |
-
msgstr "الخيارات حُفظت."
|
111 |
-
|
112 |
-
#: contact_form.php:268
|
113 |
msgid "Such user is not exist. Settings are not saved."
|
114 |
msgstr "هذا المستخدم لا وجود له. لم يتم حفظ الإعدادات."
|
115 |
|
116 |
-
#: contact_form.php:
|
117 |
msgid "Please input correct email. Settings are not saved."
|
118 |
msgstr "الرجاء إدخال بريد الكتروني صحيح. الاعدادات لم تُحفظ."
|
119 |
|
120 |
-
#: contact_form.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
msgid ""
|
122 |
"If you would like to add a Contact Form to your website, just copy and put "
|
123 |
"this shortcode onto your post or page or widget:"
|
@@ -125,7 +162,7 @@ msgstr ""
|
|
125 |
"إذا كنت ترغب في إضافة نموذج الاتصال إلى موقع الويب الخاص بك، قم بنسخ ولصق "
|
126 |
"هذا الرمز القصير:"
|
127 |
|
128 |
-
#: contact_form.php:
|
129 |
msgid ""
|
130 |
"If information in the below fields are empty then the message will be send "
|
131 |
"to an address which was specified during registration."
|
@@ -133,227 +170,264 @@ msgstr ""
|
|
133 |
"إذا كانت المعلومات في الحقول أدناه فارغة سيتم إرسال الرسالة إلى عنوان الذي "
|
134 |
"تم تحديده أثناء التسجيل."
|
135 |
|
136 |
-
#: contact_form.php:
|
137 |
msgid "Use email of wordpress user:"
|
138 |
msgstr "أستخدم بريد العضو في وورد بريس:"
|
139 |
|
140 |
-
#: contact_form.php:
|
141 |
msgid "Select user name"
|
142 |
msgstr "اختر اسم المستخدم"
|
143 |
|
144 |
-
#: contact_form.php:
|
145 |
msgid "Set a name of user who will get messages from a contact form."
|
146 |
msgstr "تعيين اسم المستخدم من الذين سيحصلون على رسائل من شكل من أشكال الاتصال."
|
147 |
|
148 |
-
#: contact_form.php:
|
149 |
msgid "Use this email:"
|
150 |
msgstr "استخدام هذا البريد الالكتروني:"
|
151 |
|
152 |
-
#: contact_form.php:
|
153 |
msgid "Set an email address which will be used for messages receiving."
|
154 |
msgstr "تعيين عنوان البريد الإلكتروني التي سيتم استخدامها لاستقبال الرسائل."
|
155 |
|
156 |
-
#: contact_form.php:
|
157 |
msgid "Additional options"
|
158 |
msgstr "خيارات إضافية"
|
159 |
|
160 |
-
#: contact_form.php:
|
161 |
msgid "Display Attachment block"
|
162 |
msgstr "عرض حقل المرفقات"
|
163 |
|
164 |
-
#: contact_form.php:
|
165 |
msgid "Users can attach files of the following types"
|
166 |
msgstr "يمكن للمستخدمين إرفاق الملفات من الأنواع التالية"
|
167 |
|
168 |
-
#: contact_form.php:
|
169 |
#, fuzzy
|
170 |
msgid "Display Attachment explanations"
|
171 |
msgstr "عرض حقل المرفقات"
|
172 |
|
173 |
-
#: contact_form.php:
|
174 |
#, fuzzy
|
175 |
msgid "Display explanations after Attachment block"
|
176 |
msgstr "عرض حقل المرفقات"
|
177 |
|
178 |
-
#: contact_form.php:
|
179 |
msgid "Display Send me a copy block"
|
180 |
msgstr "عرض خيار (أرسل لي نسخة)"
|
181 |
|
182 |
-
#: contact_form.php:
|
183 |
msgid "What use?"
|
184 |
msgstr "ماذا تستخدم؟"
|
185 |
|
186 |
-
#: contact_form.php:
|
187 |
msgid "Wp-mail"
|
188 |
msgstr "Wp-mail"
|
189 |
|
190 |
-
#: contact_form.php:
|
191 |
msgid "To send mail you can use the wordpress wp_mail function"
|
192 |
msgstr "لإرسال البريد يمكنك استخدام وظيفة wp_mail"
|
193 |
|
194 |
-
#: contact_form.php:
|
195 |
msgid "Mail"
|
196 |
msgstr "Mail"
|
197 |
|
198 |
-
#: contact_form.php:
|
199 |
msgid "To send mail you can use the php mail function"
|
200 |
msgstr "لإرسال البريد يمكنك استخدام وظيفة البريد PHP"
|
201 |
|
202 |
-
#: contact_form.php:
|
203 |
-
|
|
|
204 |
msgstr "تغيير من الحقول من نموذج الاتصال"
|
205 |
|
206 |
-
#: contact_form.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
msgid "Display phone field"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: contact_form.php:
|
211 |
msgid "Required field"
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: contact_form.php:
|
215 |
msgid "Name"
|
216 |
msgstr "الأسم"
|
217 |
|
218 |
-
#: contact_form.php:
|
219 |
#, fuzzy
|
220 |
msgid "E-Mail Address"
|
221 |
msgstr "البريد الالكتروني:"
|
222 |
|
223 |
-
#: contact_form.php:
|
224 |
msgid "Phone"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: contact_form.php:
|
228 |
msgid "Subject"
|
229 |
msgstr "موضوع الرسالة"
|
230 |
|
231 |
-
#: contact_form.php:
|
232 |
msgid "Message"
|
233 |
msgstr "الرسالة"
|
234 |
|
235 |
-
#: contact_form.php:
|
236 |
msgid "Display additional info in email"
|
237 |
msgstr "عرض معلومات اضافية في البريد الالكتروني"
|
238 |
|
239 |
-
#: contact_form.php:
|
240 |
msgid "Sent from (ip address)"
|
241 |
msgstr "ارسلت من (عنوان IP)"
|
242 |
|
243 |
-
#: contact_form.php:
|
244 |
msgid "Date/Time"
|
245 |
msgstr "الوقت/التاريخ"
|
246 |
|
247 |
-
#: contact_form.php:
|
248 |
msgid "Coming from (referer)"
|
249 |
msgstr "Coming from (referer)"
|
250 |
|
251 |
-
#: contact_form.php:
|
252 |
msgid "Using (user agent)"
|
253 |
msgstr "باستخدام (وكيل المستخدم)"
|
254 |
|
255 |
-
#: contact_form.php:
|
256 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
msgstr "تغيير تسمية حقول نموذج الاتصال"
|
258 |
|
259 |
-
#: contact_form.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
msgid "Action after the send mail"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: contact_form.php:
|
264 |
#, fuzzy
|
265 |
msgid "Display text"
|
266 |
msgstr "عرض حقل المرفقات"
|
267 |
|
268 |
-
#: contact_form.php:
|
269 |
msgid "Text"
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: contact_form.php:
|
273 |
msgid "Redirect to page"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: contact_form.php:
|
277 |
msgid "Url"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: contact_form.php:
|
281 |
msgid "Save Changes"
|
282 |
msgstr "حفظ التغييرات"
|
283 |
|
284 |
-
#: contact_form.php:
|
285 |
msgid "Sorry, your e-mail could not be delivered."
|
286 |
msgstr "عذراً, لم نستطيع تسليم رسالتك."
|
287 |
|
288 |
-
#: contact_form.php:
|
289 |
msgid "You can attach files of the following types"
|
290 |
msgstr "يمكنك إرفاق الملفات من الأنواع التالية"
|
291 |
|
292 |
-
#: contact_form.php:
|
293 |
msgid "Send me a copy"
|
294 |
msgstr "أرسل لي نسخة"
|
295 |
|
296 |
-
#: contact_form.php:
|
297 |
-
msgid "Submit"
|
298 |
-
msgstr "تقدم"
|
299 |
-
|
300 |
-
#: contact_form.php:598
|
301 |
-
msgid "Your name is required."
|
302 |
-
msgstr "مطلوب اسمك."
|
303 |
-
|
304 |
-
#: contact_form.php:600
|
305 |
-
msgid "A proper e-mail address is required."
|
306 |
-
msgstr "مطلوب بريد الكتروني صحيح."
|
307 |
-
|
308 |
-
#: contact_form.php:602
|
309 |
-
msgid "Subject text is required."
|
310 |
-
msgstr "مطلوب نص الموضوع."
|
311 |
-
|
312 |
-
#: contact_form.php:604
|
313 |
-
msgid "Message text is required."
|
314 |
-
msgstr "مطلوب نص الرسالة."
|
315 |
-
|
316 |
-
#: contact_form.php:606
|
317 |
-
#, fuzzy
|
318 |
-
msgid "Phone is required field."
|
319 |
-
msgstr "مطلوب اسمك."
|
320 |
-
|
321 |
-
#: contact_form.php:607
|
322 |
-
msgid "Please make corrections below and try again."
|
323 |
-
msgstr "يرجى إجراء التصحيحات أدناه وحاول مرة أخرى."
|
324 |
-
|
325 |
-
#: contact_form.php:639
|
326 |
-
msgid "Attachment is broken."
|
327 |
-
msgstr "المرفق تعطل."
|
328 |
-
|
329 |
-
#: contact_form.php:654
|
330 |
-
msgid "Please complete the CAPTCHA."
|
331 |
-
msgstr "يرجى استكمال رمز التحقق."
|
332 |
-
|
333 |
-
#: contact_form.php:770
|
334 |
msgid "Contact from"
|
335 |
msgstr "اتصل من"
|
336 |
|
337 |
-
#: contact_form.php:
|
338 |
msgid "Email"
|
339 |
msgstr "البريد الألكتروني"
|
340 |
|
341 |
-
#: contact_form.php:
|
342 |
msgid "Site"
|
343 |
msgstr "الموقع"
|
344 |
|
345 |
-
#: contact_form.php:
|
346 |
msgid "If you can see this MIME than your client doesn't accept MIME types!"
|
347 |
msgstr "إذا يمكنك أن ترى هذه MIME من العميل الخاص بك لا يقبل أنواع MIME!"
|
348 |
|
349 |
-
#: contact_form.php:
|
350 |
msgid "FAQ"
|
351 |
msgstr "أسئلة وأجوبة"
|
352 |
|
353 |
-
#: contact_form.php:
|
354 |
msgid "Support"
|
355 |
msgstr "دعم"
|
356 |
|
|
|
|
|
|
|
|
|
357 |
#~ msgid "E-Mail Addresse:"
|
358 |
#~ msgstr "Indirizzo e-mail:"
|
359 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: contact_form\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-12-11 13:38+0200\n"
|
6 |
+
"PO-Revision-Date: 2012-12-11 13:38+0200\n"
|
7 |
"Last-Translator: BWS <zos@bestwebsoft.com>\n"
|
8 |
"Language-Team: Hammad Alshammari (ABU HATIM) www.abuhatim.net <al3zz."
|
9 |
"com@gmail.com>\n"
|
25 |
msgid "Read more"
|
26 |
msgstr "اقرأ المزيد"
|
27 |
|
28 |
+
#: contact_form.php:78 contact_form.php:1068 contact_form.php:1077
|
29 |
msgid "Settings"
|
30 |
msgstr "إعدادات"
|
31 |
|
58 |
"إذا كان لديك أي أسئلة، يرجى الاتصال بنا عبر plugin@bestwebsoft.com أو ملء "
|
59 |
"استمارة الاتصال على موقعنا"
|
60 |
|
61 |
+
#: contact_form.php:108 contact_form.php:401
|
62 |
msgid "Contact Form Options"
|
63 |
msgstr "خيارات نموذج اتصل بنا"
|
64 |
|
66 |
msgid "Contact Form"
|
67 |
msgstr "نموذج الاتصال"
|
68 |
|
69 |
+
#: contact_form.php:145 contact_form.php:535 contact_form.php:555
|
|
|
70 |
msgid "Name:"
|
71 |
msgstr "الأسم:"
|
72 |
|
73 |
+
#: contact_form.php:146 contact_form.php:536 contact_form.php:556
|
|
|
74 |
msgid "E-Mail Address:"
|
75 |
msgstr "البريد الالكتروني:"
|
76 |
|
77 |
+
#: contact_form.php:147 contact_form.php:537 contact_form.php:557
|
78 |
msgid "Phone:"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: contact_form.php:148 contact_form.php:538 contact_form.php:558
|
|
|
82 |
msgid "Subject:"
|
83 |
msgstr "موضوع الرسالة:"
|
84 |
|
85 |
+
#: contact_form.php:149 contact_form.php:539 contact_form.php:559
|
|
|
86 |
msgid "Message:"
|
87 |
msgstr "الرسالة:"
|
88 |
|
89 |
+
#: contact_form.php:150 contact_form.php:540 contact_form.php:560
|
|
|
90 |
msgid "Attachment:"
|
91 |
msgstr "المرفقات:"
|
92 |
|
93 |
+
#: contact_form.php:151 contact_form.php:541 contact_form.php:561
|
94 |
+
msgid "Submit"
|
95 |
+
msgstr "تقدم"
|
96 |
+
|
97 |
+
#: contact_form.php:152
|
98 |
+
msgid "Your name is required."
|
99 |
+
msgstr "مطلوب اسمك."
|
100 |
+
|
101 |
+
#: contact_form.php:153
|
102 |
+
msgid "A proper e-mail address is required."
|
103 |
+
msgstr "مطلوب بريد الكتروني صحيح."
|
104 |
+
|
105 |
+
#: contact_form.php:154
|
106 |
+
msgid "Subject text is required."
|
107 |
+
msgstr "مطلوب نص الموضوع."
|
108 |
+
|
109 |
+
#: contact_form.php:155
|
110 |
+
msgid "Message text is required."
|
111 |
+
msgstr "مطلوب نص الرسالة."
|
112 |
+
|
113 |
+
#: contact_form.php:156
|
114 |
+
#, fuzzy
|
115 |
+
msgid "Phone is required field."
|
116 |
+
msgstr "مطلوب اسمك."
|
117 |
+
|
118 |
+
#: contact_form.php:157
|
119 |
+
msgid "Attachment is broken."
|
120 |
+
msgstr "المرفق تعطل."
|
121 |
+
|
122 |
+
#: contact_form.php:158
|
123 |
+
msgid "Please complete the CAPTCHA."
|
124 |
+
msgstr "يرجى استكمال رمز التحقق."
|
125 |
+
|
126 |
+
#: contact_form.php:159
|
127 |
+
msgid "Please make corrections below and try again."
|
128 |
+
msgstr "يرجى إجراء التصحيحات أدناه وحاول مرة أخرى."
|
129 |
+
|
130 |
+
#: contact_form.php:161
|
131 |
msgid "Thank you for contacting us."
|
132 |
msgstr "أشكركم على الاتصال بنا. سيتم الرد عليكم في أقرب فرصة."
|
133 |
|
134 |
+
#: contact_form.php:356
|
135 |
msgid ""
|
136 |
"If the option 'Redirect to page' is selected then url field should be "
|
137 |
"fillied in the following format"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: contact_form.php:365
|
|
|
|
|
|
|
|
|
141 |
msgid "Such user is not exist. Settings are not saved."
|
142 |
msgstr "هذا المستخدم لا وجود له. لم يتم حفظ الإعدادات."
|
143 |
|
144 |
+
#: contact_form.php:370
|
145 |
msgid "Please input correct email. Settings are not saved."
|
146 |
msgstr "الرجاء إدخال بريد الكتروني صحيح. الاعدادات لم تُحفظ."
|
147 |
|
148 |
+
#: contact_form.php:376
|
149 |
+
#, fuzzy
|
150 |
+
msgid "Please input correct 'FROM' email. Settings are not saved."
|
151 |
+
msgstr "الرجاء إدخال بريد الكتروني صحيح. الاعدادات لم تُحفظ."
|
152 |
+
|
153 |
+
#: contact_form.php:381
|
154 |
+
msgid "Options saved."
|
155 |
+
msgstr "الخيارات حُفظت."
|
156 |
+
|
157 |
+
#: contact_form.php:406
|
158 |
msgid ""
|
159 |
"If you would like to add a Contact Form to your website, just copy and put "
|
160 |
"this shortcode onto your post or page or widget:"
|
162 |
"إذا كنت ترغب في إضافة نموذج الاتصال إلى موقع الويب الخاص بك، قم بنسخ ولصق "
|
163 |
"هذا الرمز القصير:"
|
164 |
|
165 |
+
#: contact_form.php:407
|
166 |
msgid ""
|
167 |
"If information in the below fields are empty then the message will be send "
|
168 |
"to an address which was specified during registration."
|
170 |
"إذا كانت المعلومات في الحقول أدناه فارغة سيتم إرسال الرسالة إلى عنوان الذي "
|
171 |
"تم تحديده أثناء التسجيل."
|
172 |
|
173 |
+
#: contact_form.php:411
|
174 |
msgid "Use email of wordpress user:"
|
175 |
msgstr "أستخدم بريد العضو في وورد بريس:"
|
176 |
|
177 |
+
#: contact_form.php:415
|
178 |
msgid "Select user name"
|
179 |
msgstr "اختر اسم المستخدم"
|
180 |
|
181 |
+
#: contact_form.php:420
|
182 |
msgid "Set a name of user who will get messages from a contact form."
|
183 |
msgstr "تعيين اسم المستخدم من الذين سيحصلون على رسائل من شكل من أشكال الاتصال."
|
184 |
|
185 |
+
#: contact_form.php:424
|
186 |
msgid "Use this email:"
|
187 |
msgstr "استخدام هذا البريد الالكتروني:"
|
188 |
|
189 |
+
#: contact_form.php:427
|
190 |
msgid "Set an email address which will be used for messages receiving."
|
191 |
msgstr "تعيين عنوان البريد الإلكتروني التي سيتم استخدامها لاستقبال الرسائل."
|
192 |
|
193 |
+
#: contact_form.php:431
|
194 |
msgid "Additional options"
|
195 |
msgstr "خيارات إضافية"
|
196 |
|
197 |
+
#: contact_form.php:434
|
198 |
msgid "Display Attachment block"
|
199 |
msgstr "عرض حقل المرفقات"
|
200 |
|
201 |
+
#: contact_form.php:436
|
202 |
msgid "Users can attach files of the following types"
|
203 |
msgstr "يمكن للمستخدمين إرفاق الملفات من الأنواع التالية"
|
204 |
|
205 |
+
#: contact_form.php:440
|
206 |
#, fuzzy
|
207 |
msgid "Display Attachment explanations"
|
208 |
msgstr "عرض حقل المرفقات"
|
209 |
|
210 |
+
#: contact_form.php:442
|
211 |
#, fuzzy
|
212 |
msgid "Display explanations after Attachment block"
|
213 |
msgstr "عرض حقل المرفقات"
|
214 |
|
215 |
+
#: contact_form.php:446
|
216 |
msgid "Display Send me a copy block"
|
217 |
msgstr "عرض خيار (أرسل لي نسخة)"
|
218 |
|
219 |
+
#: contact_form.php:452
|
220 |
msgid "What use?"
|
221 |
msgstr "ماذا تستخدم؟"
|
222 |
|
223 |
+
#: contact_form.php:455
|
224 |
msgid "Wp-mail"
|
225 |
msgstr "Wp-mail"
|
226 |
|
227 |
+
#: contact_form.php:456
|
228 |
msgid "To send mail you can use the wordpress wp_mail function"
|
229 |
msgstr "لإرسال البريد يمكنك استخدام وظيفة wp_mail"
|
230 |
|
231 |
+
#: contact_form.php:462
|
232 |
msgid "Mail"
|
233 |
msgstr "Mail"
|
234 |
|
235 |
+
#: contact_form.php:463
|
236 |
msgid "To send mail you can use the php mail function"
|
237 |
msgstr "لإرسال البريد يمكنك استخدام وظيفة البريد PHP"
|
238 |
|
239 |
+
#: contact_form.php:467
|
240 |
+
#, fuzzy
|
241 |
+
msgid "Change text for 'FROM' field of the email"
|
242 |
msgstr "تغيير من الحقول من نموذج الاتصال"
|
243 |
|
244 |
+
#: contact_form.php:473
|
245 |
+
msgid "Select email for 'FROM' field of the email"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: contact_form.php:475
|
249 |
+
msgid ""
|
250 |
+
"In the field 'From' in the mail it will use email of that user who fills the "
|
251 |
+
"form."
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: contact_form.php:477
|
255 |
+
msgid "In the field 'From' it will use this email."
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: contact_form.php:481
|
259 |
msgid "Display phone field"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: contact_form.php:487
|
263 |
msgid "Required field"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: contact_form.php:489 contact_form.php:953
|
267 |
msgid "Name"
|
268 |
msgstr "الأسم"
|
269 |
|
270 |
+
#: contact_form.php:490
|
271 |
#, fuzzy
|
272 |
msgid "E-Mail Address"
|
273 |
msgstr "البريد الالكتروني:"
|
274 |
|
275 |
+
#: contact_form.php:491 contact_form.php:961
|
276 |
msgid "Phone"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: contact_form.php:492 contact_form.php:964
|
280 |
msgid "Subject"
|
281 |
msgstr "موضوع الرسالة"
|
282 |
|
283 |
+
#: contact_form.php:493 contact_form.php:967
|
284 |
msgid "Message"
|
285 |
msgstr "الرسالة"
|
286 |
|
287 |
+
#: contact_form.php:497
|
288 |
msgid "Display additional info in email"
|
289 |
msgstr "عرض معلومات اضافية في البريد الالكتروني"
|
290 |
|
291 |
+
#: contact_form.php:502 contact_form.php:925
|
292 |
msgid "Sent from (ip address)"
|
293 |
msgstr "ارسلت من (عنوان IP)"
|
294 |
|
295 |
+
#: contact_form.php:503 contact_form.php:930
|
296 |
msgid "Date/Time"
|
297 |
msgstr "الوقت/التاريخ"
|
298 |
|
299 |
+
#: contact_form.php:504 contact_form.php:935
|
300 |
msgid "Coming from (referer)"
|
301 |
msgstr "Coming from (referer)"
|
302 |
|
303 |
+
#: contact_form.php:505 contact_form.php:940
|
304 |
msgid "Using (user agent)"
|
305 |
msgstr "باستخدام (وكيل المستخدم)"
|
306 |
|
307 |
+
#: contact_form.php:509
|
308 |
+
msgid "Language settings for label fields"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: contact_form.php:518
|
312 |
+
msgid "Add language"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: contact_form.php:522
|
316 |
+
#, fuzzy
|
317 |
+
msgid "Change label for fields of the contact form and error messages"
|
318 |
msgstr "تغيير تسمية حقول نموذج الاتصال"
|
319 |
|
320 |
+
#: contact_form.php:527 contact_form.php:580
|
321 |
+
msgid "English"
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: contact_form.php:542 contact_form.php:562
|
325 |
+
msgid "Error message for name field"
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: contact_form.php:543 contact_form.php:563
|
329 |
+
msgid "Error message for email field"
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#: contact_form.php:544 contact_form.php:564
|
333 |
+
msgid "Error message for phone field"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: contact_form.php:545 contact_form.php:565
|
337 |
+
msgid "Error message for subject field"
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: contact_form.php:546 contact_form.php:566
|
341 |
+
msgid "Error message for message field"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: contact_form.php:547 contact_form.php:567
|
345 |
+
msgid "Error message for attachment field"
|
346 |
+
msgstr ""
|
347 |
+
|
348 |
+
#: contact_form.php:548 contact_form.php:568
|
349 |
+
msgid "Error message for captcha"
|
350 |
+
msgstr ""
|
351 |
+
|
352 |
+
#: contact_form.php:549 contact_form.php:569
|
353 |
+
msgid "Error message for all form"
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: contact_form.php:550 contact_form.php:570 contact_form.php:589
|
357 |
+
#: contact_form.php:595
|
358 |
+
msgid "Use shortcode"
|
359 |
+
msgstr ""
|
360 |
+
|
361 |
+
#: contact_form.php:550 contact_form.php:570 contact_form.php:589
|
362 |
+
#: contact_form.php:595
|
363 |
+
msgid "for this language"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: contact_form.php:577
|
367 |
msgid "Action after the send mail"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: contact_form.php:579
|
371 |
#, fuzzy
|
372 |
msgid "Display text"
|
373 |
msgstr "عرض حقل المرفقات"
|
374 |
|
375 |
+
#: contact_form.php:588 contact_form.php:594
|
376 |
msgid "Text"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: contact_form.php:601
|
380 |
msgid "Redirect to page"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: contact_form.php:602
|
384 |
msgid "Url"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: contact_form.php:607
|
388 |
msgid "Save Changes"
|
389 |
msgstr "حفظ التغييرات"
|
390 |
|
391 |
+
#: contact_form.php:646
|
392 |
msgid "Sorry, your e-mail could not be delivered."
|
393 |
msgstr "عذراً, لم نستطيع تسليم رسالتك."
|
394 |
|
395 |
+
#: contact_form.php:716
|
396 |
msgid "You can attach files of the following types"
|
397 |
msgstr "يمكنك إرفاق الملفات من الأنواع التالية"
|
398 |
|
399 |
+
#: contact_form.php:724
|
400 |
msgid "Send me a copy"
|
401 |
msgstr "أرسل لي نسخة"
|
402 |
|
403 |
+
#: contact_form.php:948
|
|
|
|
|
|
|