Custom Contact Forms - Version 4.0.0.b9

Version Description

We are planning to add popover forms and file attachments soon.

Download this release

Release Info

Developer tlovett1
Plugin Icon 128x128 Custom Contact Forms
Version 4.0.0.b9
Comparing to
See all releases

Code changes from version 4.0.0.b8 to 4.0.0.b9

css/custom-contact-forms-admin.css CHANGED
@@ -55,18 +55,21 @@
55
  margin:20px 1em 1em 5px;
56
  }
57
 
58
- #customcontactforms-admin a.rate-me {
59
  background-color:#FFFEEB;
60
  width:920px;
61
  border:1px solid #cccccc;
62
  padding:7px;
63
  display:block;
 
64
  text-align:center;
65
  margin:.5em 0 .8em 5px;
66
  -moz-border-radius:11px;
67
  -webkit-border-radius:11px;
68
  border-radius:11px;
69
  }
 
 
70
  .ccf-tooltip {
71
  background-color:#FFFEEB;
72
  border:2px solid #666666;
@@ -114,8 +117,7 @@
114
  width:1000px;
115
  margin:20px 1em 1em 5px;
116
  }
117
- #customcontactforms-admin #import { margin:0; padding:0 0 12px 0; }
118
- #customcontactforms-admin #import { padding:9px 0 0px 0; border-top:1px solid #cccccc; }
119
  #customcontactforms-admin #import .choose_import { font-size:1.1em; clear:both; font-weight:bold; }
120
  #customcontactforms-admin #import input[type=file] { margin:6px; }
121
  #customcontactforms-admin #import ul { margin:6px; }
@@ -209,6 +211,15 @@
209
  margin:10px 0 0 10px;
210
  border:0;
211
  }
 
 
 
 
 
 
 
 
 
212
  #customcontactforms-admin #create-styles {
213
  clear:both;
214
  width:1000px;
@@ -268,9 +279,10 @@
268
  width:1000px;
269
  }
270
  #customcontactforms-admin #manage-fields td { border:0; }
271
- #customcontactforms-admin #manage-fields .field-instructions {
272
- float:left;
273
  }
 
274
  #customcontactforms-admin #manage-fields .attach-field-options {
275
  float:left;
276
  padding: 0 0 0 9px;
@@ -278,10 +290,10 @@
278
  clear:none;
279
  }
280
  #customcontactforms-admin #manage-fields .dettach-field-options {
 
281
  float:left;
282
  padding: 0 0 0 30px;
283
  width:300px;
284
- clear:none;
285
  }
286
  #customcontactforms-admin #manage-forms {
287
  width:1000px;
@@ -292,6 +304,7 @@
292
  width:1000px;
293
  }
294
  #customcontactforms-admin #manage-fixed-fields td { border:0; }
 
295
  #customcontactforms-admin .nobordertop {
296
  border-top:none;
297
  }
@@ -324,7 +337,7 @@
324
  }
325
  #customcontactforms-admin #plugin-nav { text-align:center; border-bottom:1px #ccc dashed; margin:0 0 10px 0; padding:0 0 6px 0; }
326
  #customcontactforms-admin #plugin-nav li {
327
- border-right:1px solid #666; display:inline; padding:0 8px 0 3px;
328
  }
329
  #customcontactforms-admin #plugin-nav li.last {
330
  border-right:none;
55
  margin:20px 1em 1em 5px;
56
  }
57
 
58
+ #customcontactforms-admin .rate-me {
59
  background-color:#FFFEEB;
60
  width:920px;
61
  border:1px solid #cccccc;
62
  padding:7px;
63
  display:block;
64
+ height:30px;
65
  text-align:center;
66
  margin:.5em 0 .8em 5px;
67
  -moz-border-radius:11px;
68
  -webkit-border-radius:11px;
69
  border-radius:11px;
70
  }
71
+ #customcontactforms-admin .rate-me a { font-weight:bold; width:auto; margin-left:20px; display:block; float:left; text-decoration:none; margin:6px 0 10px 0; }
72
+ #customcontactforms-admin .rate-me input[type=image] { float:right; }
73
  .ccf-tooltip {
74
  background-color:#FFFEEB;
75
  border:2px solid #666666;
117
  width:1000px;
118
  margin:20px 1em 1em 5px;
119
  }
120
+ #customcontactforms-admin #export p { padding:0; margin:0; }
 
121
  #customcontactforms-admin #import .choose_import { font-size:1.1em; clear:both; font-weight:bold; }
122
  #customcontactforms-admin #import input[type=file] { margin:6px; }
123
  #customcontactforms-admin #import ul { margin:6px; }
211
  margin:10px 0 0 10px;
212
  border:0;
213
  }
214
+ #customcontactforms-admin #configure-mail {
215
+ clear:both;
216
+ width:1000px;
217
+ margin:20px 1em 1em 5px;
218
+ }
219
+ #customcontactforms-admin #configure-mail p { padding:0; margin:0; }
220
+ #customcontactforms-admin #configure-mail form div { margin:10px 0 0 0; padding-top:10px; border-top:1px solid #ccc;}
221
+ #customcontactforms-admin #configure-mail ul.left { float:left; width:48%; }
222
+ #customcontactforms-admin #configure-mail ul.right { margin-left:48%; width:48%; }
223
  #customcontactforms-admin #create-styles {
224
  clear:both;
225
  width:1000px;
279
  width:1000px;
280
  }
281
  #customcontactforms-admin #manage-fields td { border:0; }
282
+ #customcontactforms-admin #manage-fields .row-one {
283
+ margin-bottom:6px;
284
  }
285
+ #customcontactforms-admin #manage-fields .row-one label { margin-right:4px; }
286
  #customcontactforms-admin #manage-fields .attach-field-options {
287
  float:left;
288
  padding: 0 0 0 9px;
290
  clear:none;
291
  }
292
  #customcontactforms-admin #manage-fields .dettach-field-options {
293
+ clear:left;
294
  float:left;
295
  padding: 0 0 0 30px;
296
  width:300px;
 
297
  }
298
  #customcontactforms-admin #manage-forms {
299
  width:1000px;
304
  width:1000px;
305
  }
306
  #customcontactforms-admin #manage-fixed-fields td { border:0; }
307
+ #customcontactforms-admin #manage-fixed-fields .field_descrip { padding-bottom:5px; }
308
  #customcontactforms-admin .nobordertop {
309
  border-top:none;
310
  }
337
  }
338
  #customcontactforms-admin #plugin-nav { text-align:center; border-bottom:1px #ccc dashed; margin:0 0 10px 0; padding:0 0 6px 0; }
339
  #customcontactforms-admin #plugin-nav li {
340
+ border-right:1px solid #666; display:inline; padding:0 8px 0 8px;
341
  }
342
  #customcontactforms-admin #plugin-nav li.last {
343
  border-right:none;
custom-contact-forms-admin.php CHANGED
@@ -13,7 +13,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
13
  }
14
 
15
  function insertUsagePopover() {
16
- require_once('custom-contact-forms-usage-popover.php');
17
  }
18
 
19
  function isPluginAdminPage() {
@@ -32,7 +32,8 @@ if (!class_exists('CustomContactFormsAdmin')) {
32
 
33
  function downloadExportFile() {
34
  if ($_POST['ccf_export']) {
35
- require_once('custom-contact-forms-export.php');
 
36
  $transit = new CustomContactFormsExport(parent::getAdminOptionsName());
37
  $transit->exportAll();
38
  $file = $transit->exportToFile();
@@ -42,7 +43,8 @@ if (!class_exists('CustomContactFormsAdmin')) {
42
 
43
  function runImport() {
44
  if ($_POST['ccf_clear_import'] || $_POST['ccf_merge_import']) {
45
- require_once('custom-contact-forms-export.php');
 
46
  $transit = new CustomContactFormsExport(parent::getAdminOptionsName());
47
  $settings['import_general_settings'] = ($_POST['ccf_import_overwrite_settings'] == 1) ? true : false;
48
  $settings['import_forms'] = ($_POST['ccf_import_forms'] == 1) ? true : false;
@@ -58,16 +60,32 @@ if (!class_exists('CustomContactFormsAdmin')) {
58
 
59
  function contactAuthor($name, $email, $website, $message, $type) {
60
  if (empty($message)) return false;
61
- require_once('custom-contact-forms-mailer.php');
 
 
 
 
 
 
 
62
  $admin_options = parent::getAdminOptions();
63
- $body = "Name: $name\n";
64
- $body .= "Email: $email\n";
65
- $body .= "Website: $website\n";
66
- $body .= "Message: $message\n";
67
- $body .= "Message Type: $type\n";
68
- $body .= 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "\n";
69
- $mailer = new CustomContactFormsMailer('admin@taylorlovett.com', $email, "CCF Message: $type", stripslashes($body), $admin_options['wp_mail_function']);
70
- $mailer->send();
 
 
 
 
 
 
 
 
 
71
  return true;
72
  }
73
 
@@ -199,6 +217,9 @@ if (!class_exists('CustomContactFormsAdmin')) {
199
  $admin_options['enable_widget_tooltips'] = $_POST['enable_widget_tooltips'];
200
  $admin_options['remember_field_values'] = $_POST['remember_field_values'];
201
  update_option(parent::getAdminOptionsName(), $admin_options);
 
 
 
202
  } elseif ($_POST['field_edit']) {
203
  parent::updateField($_POST['field'], $_POST['fid']);
204
  } elseif ($_POST['field_delete']) {
@@ -310,7 +331,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
310
  foreach ($styles as $style)
311
  $style_options .= '<option value="'.$style->id.'">'.$style->style_slug.'</option>';
312
  // Insert plugin admin page XHTML
313
- require_once('custom-contact-forms-export.php');
314
  ?>
315
  <div id="customcontactforms-admin">
316
  <div id="icon-themes" class="icon32"></div>
@@ -318,58 +339,33 @@ if (!class_exists('CustomContactFormsAdmin')) {
318
  <?php _e("Custom Contact Forms", 'custom-contact-forms'); ?>
319
  </h2>
320
  <ul id="plugin-nav">
321
- <li><a href="#instructions">
322
- <?php _e("Plugin Instructions", 'custom-contact-forms'); ?>
323
- </a></li>
324
- <li><a href="#general-settings">
325
- <?php _e("General Settings", 'custom-contact-forms'); ?>
326
- </a></li>
327
- <li><a href="#create-fields">
328
- <?php _e("Create Fields", 'custom-contact-forms'); ?>
329
- </a></li>
330
- <li><a href="#create-forms">
331
- <?php _e("Create Forms", 'custom-contact-forms'); ?>
332
- </a></li>
333
- <li><a href="#manage-fields">
334
- <?php _e("Manage Fields", 'custom-contact-forms'); ?>
335
- </a></li>
336
- <li><a href="#manage-fixed-fields">
337
- <?php _e("Manage Fixed Fields", 'custom-contact-forms'); ?>
338
- </a></li>
339
- <li><a href="#manage-forms">
340
- <?php _e("Manage Forms", 'custom-contact-forms'); ?>
341
- </a></li>
342
- <li><a href="#form-submissions">
343
- <?php _e("Saved Form Submissions (New!)", 'custom-contact-forms'); ?>
344
- </a></li>
345
- <li><a href="#create-styles">
346
- <?php _e("Create Styles", 'custom-contact-forms'); ?>
347
- </a></li>
348
- <li><a href="#manage-styles">
349
- <?php _e("Manage Styles", 'custom-contact-forms'); ?>
350
- </a></li>
351
- <li><a href="#manage-field-options">
352
- <?php _e("Manage Field Options", 'custom-contact-forms'); ?>
353
- </a></li>
354
- <li><a href="#contact-author">
355
- <?php _e("Suggest a Feature", 'custom-contact-forms'); ?>
356
- </a></li>
357
- <li><a href="#contact-author">
358
- <?php _e("Bug Report", 'custom-contact-forms'); ?>
359
- </a></li>
360
- <li><a href="#custom-html">
361
- <?php _e("Custom HTML Forms", 'custom-contact-forms'); ?>
362
- </a></li>
363
- <li><a href="#import-export">
364
- <?php _e("Import / Export (New!)", 'custom-contact-forms'); ?>
365
- </a></li>
366
- <li class="last"><a href="#plugin-news">
367
- <?php _e("Plugin News", 'custom-contact-forms'); ?>
368
- </a></li>
369
  </ul>
370
- <a class="rate-me" href="http://wordpress.org/extend/plugins/custom-contact-forms" title="<?php _e("Rate This Plugin", 'custom-contact-forms'); ?>">
371
- <?php _e("We need your help to continue development! Please <span>rate this plugin</span> to show your support.", 'custom-contact-forms'); ?>
372
- </a> <a name="create-fields"></a>
 
 
 
 
 
 
 
373
  <div id="create-fields" class="postbox">
374
  <h3 class="hndle"><span>
375
  <?php _e("Create A Form Field", 'custom-contact-forms'); ?>
@@ -379,11 +375,11 @@ if (!class_exists('CustomContactFormsAdmin')) {
379
  <ul>
380
  <li>
381
  <label for="field_slug">*
382
- <?php _e("Slug (Name):", 'custom-contact-forms'); ?>
383
  </label>
384
  <input name="field[field_slug]" type="text" maxlength="40" />
385
  <br />
386
- <?php _e("(A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.)", 'custom-contact-forms'); ?>
387
  </li>
388
  <li>
389
  <label for="field_label">
@@ -391,7 +387,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
391
  </label>
392
  <input name="field[field_label]" type="text" maxlength="100" />
393
  <br />
394
- <?php _e("(The field label is displayed next to the field and is visible to the user.)", 'custom-contact-forms'); ?>
395
  </li>
396
  <li>
397
  <label for="field_type">*
@@ -416,9 +412,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
416
  <?php _e("This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox
417
  'Are you human?', I would set the initial value to 'Yes'.", 'custom-contact-forms'); ?>
418
  <?php _e("If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the", 'custom-contact-forms'); ?>
419
- <a href="#manage-field-options" title="<?php _e("Create a Field Option", 'custom-contact-forms'); ?>">
420
- <?php _e("field option", 'custom-contact-forms'); ?>
421
- </a>
422
  <?php _e("you would like initially selected.", 'custom-contact-forms'); ?>
423
  ) </li>
424
  <li>
@@ -427,7 +421,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
427
  </label>
428
  <input class="width50" size="10" name="field[field_maxlength]" type="text" maxlength="4" />
429
  <br />
430
- <?php _e("(0 for no limit; only applies to Text fields)", 'custom-contact-forms'); ?>
431
  </li>
432
  <li>
433
  <label for="field_required">*
@@ -442,15 +436,31 @@ if (!class_exists('CustomContactFormsAdmin')) {
442
  </option>
443
  </select>
444
  <br />
445
- <?php _e("(If a field is required and a user leaves it blank, the plugin will display an error message explainging the problem.)", 'custom-contact-forms'); ?>
446
  </li>
447
  <li>
448
- <label for="field_value">
449
  <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
450
  </label>
451
  <input name="field[field_instructions]" type="text" />
452
  <br />
453
- <?php _e("(If this is filled out, a tooltip popover displaying this text will show when the field is selected.)", 'custom-contact-forms'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  </li>
455
  <li>
456
  <input type="hidden" name="field[user_field]" value="1" />
@@ -474,14 +484,14 @@ if (!class_exists('CustomContactFormsAdmin')) {
474
  </label>
475
  <input type="text" maxlength="100" name="form[form_slug]" />
476
  <br />
477
- <?php _e("(Must be unique and contain only underscores and alphanumeric characters.)", 'custom-contact-forms'); ?>
478
  </li>
479
  <li>
480
  <label for="form[form_title]">
481
  <?php _e("Form Title:", 'custom-contact-forms'); ?>
482
  </label>
483
  <input type="text" maxlength="200" name="form[form_title]" />
484
- <?php _e("(The form header text)", 'custom-contact-forms'); ?>
485
  </li>
486
  <li>
487
  <label for="form[form_method]">*
@@ -491,7 +501,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
491
  <option>Post</option>
492
  <option>Get</option>
493
  </select>
494
- <?php _e("(If unsure, leave as is.)", 'custom-contact-forms'); ?>
495
  </li>
496
  <li>
497
  <label for="form[form_action]">
@@ -499,7 +509,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
499
  </label>
500
  <input type="text" name="form[form_action]" value="" />
501
  <br />
502
- <?php _e("(If unsure, leave blank. Enter a URL here, if and only if you want to process your forms somewhere else, for example with a service like Aweber or InfusionSoft.)", 'custom-contact-forms'); ?>
503
  </li>
504
  <li>
505
  <label for="form[form_action]">
@@ -508,9 +518,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
508
  <select name="form[form_style]" class="form_style_input">
509
  <?php echo $style_options; ?>
510
  </select>
511
- (<a href="#create-styles">
512
- <?php _e("Click to create a style", 'custom-contact-forms'); ?>
513
- </a>)</li>
514
  <li>
515
  <label for="form[submit_button_text]">
516
  <?php _e("Submit Button Text:", 'custom-contact-forms'); ?>
@@ -523,7 +531,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
523
  </label>
524
  <input type="text" name="form[custom_code]" />
525
  <br />
526
- <?php _e("(If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.)", 'custom-contact-forms'); ?>
527
  </li>
528
  <li>
529
  <label for="form[form_email]">
@@ -531,7 +539,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
531
  </label>
532
  <input type="text" name="form[form_email]" />
533
  <br />
534
- <?php _e("(Will receive all submissions from this form; if left blank it will use the default specified in general settings.)", 'custom-contact-forms'); ?>
535
  </li>
536
  <li>
537
  <label for="form[form_success_message]">
@@ -539,7 +547,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
539
  </label>
540
  <input type="text" name="form[form_success_message]" />
541
  <br />
542
- <?php _e("(Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.)", 'custom-contact-forms'); ?>
543
  </li>
544
  <li>
545
  <label for="form[form_success_title]">
@@ -547,7 +555,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
547
  </label>
548
  <input type="text" name="form[form_success_title]" />
549
  <br />
550
- <?php _e("(Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.)", 'custom-contact-forms'); ?>
551
  </li>
552
  <li>
553
  <label for="form[form_thank_you_page]">
@@ -555,7 +563,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
555
  </label>
556
  <input type="text" name="form[form_thank_you_page]" />
557
  <br />
558
- <?php _e("(If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.)", 'custom-contact-forms'); ?>
559
  </li>
560
  <li>
561
  <input type="submit" value="<?php _e("Create Form", 'custom-contact-forms'); ?>" name="form_create" />
@@ -620,22 +628,29 @@ if (!class_exists('CustomContactFormsAdmin')) {
620
  </tr>
621
  <?php $show_field_options = ($fields[$i]->field_type == 'Radio' || $fields[$i]->field_type == 'Dropdown') ? true : false; ?>
622
  <tr<?php if ($z % 2 == 1) echo ' class="evenrow"'; ?>>
623
- <td class="fields-extra-options" colspan="7"><div class="field-instructions">
 
 
624
  <label for="field_instructions">
625
  <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
626
  </label>
627
  <input type="text" class="width150" name="field[field_instructions]" value="<?php echo $fields[$i]->field_instructions; ?>" />
628
- <?php if ($show_field_options) echo '<br />'; ?>
629
- <label for="field_class">
630
  <?php _e("Field Class:", 'custom-contact-forms'); ?>
631
  </label>
632
  <input type="text" class="width100" name="field[field_class]" value="<?php echo $fields[$i]->field_class; ?>" />
633
- <a href="javascript:void(0)" class="toollink" title="<?php _e('If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a "Form Style" other than the default, styles inherited from the "Field Class" might be overwritten.', 'custom-contact-forms'); ?>">(?)</a> </div>
 
 
 
 
 
634
  <?php
635
  if ($show_field_options) { ?>
636
  <div class="dettach-field-options">
637
  <?php if (empty($attached_options)) { ?>
638
- <select name="dettach_object_id">
639
  <option value="-1">Nothing Attached!</option>
640
  </select>
641
  <?php } else { ?>
@@ -760,16 +775,24 @@ if (!class_exists('CustomContactFormsAdmin')) {
760
  </tr>
761
  <tr <?php if ($z % 2 == 0) echo ' class="evenrow"'; ?>>
762
  <td class="fixed-fields-extra-options" colspan="7"><label for="field_class">
 
763
  <?php _e('Field Class:', 'custom-contact-forms'); ?>
764
  </label>
765
  <input type="text" value="<?php echo $fields[$i]->field_class; ?>" name="field[field_class]" />
766
  <?php if ($fields[$i]->field_slug != 'resetButton') { ?>
 
767
  <label for="field_instructions">
768
  <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
769
  </label>
770
  <input type="text" name="field[field_instructions]" class="width200" value="<?php echo $fields[$i]->field_instructions; ?>" />
 
 
 
 
 
771
  <br />
772
- <?php } echo $GLOBALS['ccf_fixed_fields'][$fields[$i]->field_slug]; ?></td>
 
773
  </tr>
774
  </form>
775
  <?php
@@ -966,9 +989,9 @@ if (!class_exists('CustomContactFormsAdmin')) {
966
  </span></label>
967
  <?php
968
  $attached_fields = parent::getAttachedFieldsArray($forms[$i]->id);
969
- if (empty($attached_fields)) echo '<select name="dettach_object_id"><option value="-1">Nothing Attached!</option></select> ';
970
  else {
971
- echo '<select name="dettach_object_id" class="onObject' . $forms[$i]->id . '" objectTypeForm>';
972
  foreach($attached_fields as $attached_field) {
973
  $this_field = parent::selectField($attached_field, '');
974
  echo $this_field->field_slug . ' <option value="'.$this_field->id.'">'.$this_field->field_slug.'</option>';
@@ -1034,7 +1057,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
1034
  </tfoot>
1035
  </table>
1036
  <?php
1037
- require_once('custom-contact-forms-user-data.php');
1038
  $user_data_array = parent::selectAllUserData();
1039
  ?>
1040
  <a name="form-submissions"></a>
@@ -1129,7 +1152,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
1129
  </select>
1130
  </li>
1131
  <li class="descrip">
1132
- <?php _e("When a user fills out one of your forms, the info he submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info.", 'custom-contact-forms'); ?>
1133
  </li>
1134
  <li>
1135
  <label for="default_to_email">
@@ -1265,22 +1288,6 @@ if (!class_exists('CustomContactFormsAdmin')) {
1265
  <li class="descrip">
1266
  <?php _e("If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below.", 'custom-contact-forms'); ?>
1267
  </li>
1268
- <li>
1269
- <label for="wp_mail_function">
1270
- <?php _e("Use Wordpress Mail Function:", 'custom-contact-forms'); ?>
1271
- </label>
1272
- <select name="wp_mail_function">
1273
- <option value="1">
1274
- <?php _e("Yes", 'custom-contact-forms'); ?>
1275
- </option>
1276
- <option <?php if ($admin_options['wp_mail_function'] == 0) echo 'selected="selected"'; ?> value="0">
1277
- <?php _e("No", 'custom-contact-forms'); ?>
1278
- </option>
1279
- </select>
1280
- </li>
1281
- <li class="descrip">
1282
- <?php _e("Setting this to no will use the PHP mail function. If your forms aren't sending mail properly try setting this to no.", 'custom-contact-forms'); ?>
1283
- </li>
1284
  <li class="show-widget"><b>
1285
  <?php _e("Show Sidebar Widget:", 'custom-contact-forms'); ?>
1286
  </b></li>
@@ -1370,6 +1377,39 @@ if (!class_exists('CustomContactFormsAdmin')) {
1370
  <div class="ccf-success-popover-example"></div>
1371
  </div>
1372
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1373
  <a name="create-styles"></a>
1374
  <div id="create-styles" class="postbox">
1375
  <h3 class="hndle"><span>
@@ -1998,19 +2038,19 @@ if (!class_exists('CustomContactFormsAdmin')) {
1998
  hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately.", 'custom-contact-forms'); ?>
1999
  </p>
2000
  <textarea id="custom_html_textarea">
2001
- &lt;form method=&quot;post&quot; action=&quot;&quot;&gt;
2002
- &lt;input type=&quot;hidden&quot; name=&quot;ccf_customhtml&quot; value=&quot;1&quot; /&gt;
2003
- &lt;input type=&quot;hidden&quot; name=&quot;success_message&quot; value=&quot;<?php _e("Thank you for filling out our form!", 'custom-contact-forms'); ?>&quot; /&gt;
2004
- &lt;input type=&quot;hidden&quot; name=&quot;thank_you_page&quot; value=&quot;http://www.google.com&quot; /&gt;
2005
- &lt;input type=&quot;hidden&quot; name=&quot;destination_email&quot; value=&quot;<?php echo $admin_options['default_to_email']; ?>&quot; /&gt;
2006
- &lt;input type=&quot;hidden&quot; name=&quot;required_fields&quot; value=&quot;field_name1, field_name2&quot; /&gt;
2007
-
2008
- &lt;!-- <?php _e("Build your form in here. It is recommended you only use this feature if you are experienced with HTML.
2009
- The success_message field will add a popover containing the message when the form is completed successfully, the thank_you_page field will force
2010
- the user to be redirected to that specific page on successful form completion. The required_fields hidden field is optional; to use it seperate
2011
- the field names you want required by commas. Remember to use underscores instead of spaces in field names!", 'custom-contact-forms'); ?> --&gt;
2012
-
2013
- &lt;/form&gt;</textarea>
2014
  </div>
2015
  </div>
2016
  <a name="import-export"></a>
13
  }
14
 
15
  function insertUsagePopover() {
16
+ require_once('modules/usage_popover/custom-contact-forms-usage-popover.php');
17
  }
18
 
19
  function isPluginAdminPage() {
32
 
33
  function downloadExportFile() {
34
  if ($_POST['ccf_export']) {
35
+ chmod('export/', 0777);
36
+ require_once('modules/export/custom-contact-forms-export.php');
37
  $transit = new CustomContactFormsExport(parent::getAdminOptionsName());
38
  $transit->exportAll();
39
  $file = $transit->exportToFile();
43
 
44
  function runImport() {
45
  if ($_POST['ccf_clear_import'] || $_POST['ccf_merge_import']) {
46
+ chmod('export/', 0777);
47
+ require_once('modules/export/custom-contact-forms-export.php');
48
  $transit = new CustomContactFormsExport(parent::getAdminOptionsName());
49
  $settings['import_general_settings'] = ($_POST['ccf_import_overwrite_settings'] == 1) ? true : false;
50
  $settings['import_forms'] = ($_POST['ccf_import_forms'] == 1) ? true : false;
60
 
61
  function contactAuthor($name, $email, $website, $message, $type) {
62
  if (empty($message)) return false;
63
+ $mail = new PHPMailer();
64
+ $body = "Name: $name<br />\n";
65
+ $body .= "Email: $email<br />\n";
66
+ $body .= "Website: $website<br />\n";
67
+ $body .= "Message: $message<br />\n";
68
+ $body .= "Message Type: $type<br />\n";
69
+ $body .= 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "<br />\n";
70
+ require_once('modules/phpmailer/class.phpmailer.php');
71
  $admin_options = parent::getAdminOptions();
72
+ if ($admin_options['mail_function'] == 'smtp') {
73
+ $mail->IsSMTP();
74
+ $mail->Host = $admin_options['smtp_host'];
75
+ if ($admin_options['smtp_authentication'] == 1) {
76
+ $mail->SMTPAuth = true;
77
+ $mail->Username = $admin_options['smtp_username'];
78
+ $mail->Password = $admin_options['smtp_password'];
79
+ $mail->Port = $admin_options['smtp_port'];
80
+ } else
81
+ $mail->SMTPAuth = false;
82
+ }
83
+ $mail->SetFrom($email, 'Custom Contact Forms');
84
+ $mail->AddAddress('admin@taylorlovett.com');
85
+ $mail->Subject = "CCF Message: $type";
86
+ $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
87
+ $mail->MsgHTML($body);
88
+ $mail->Send();
89
  return true;
90
  }
91
 
217
  $admin_options['enable_widget_tooltips'] = $_POST['enable_widget_tooltips'];
218
  $admin_options['remember_field_values'] = $_POST['remember_field_values'];
219
  update_option(parent::getAdminOptionsName(), $admin_options);
220
+ } elseif($_POST['configure_mail']) {
221
+ $admin_options = $_POST['mail_config'];
222
+ update_option(parent::getAdminOptionsName(), $admin_options);
223
  } elseif ($_POST['field_edit']) {
224
  parent::updateField($_POST['field'], $_POST['fid']);
225
  } elseif ($_POST['field_delete']) {
331
  foreach ($styles as $style)
332
  $style_options .= '<option value="'.$style->id.'">'.$style->style_slug.'</option>';
333
  // Insert plugin admin page XHTML
334
+ require_once('modules/export/custom-contact-forms-export.php');
335
  ?>
336
  <div id="customcontactforms-admin">
337
  <div id="icon-themes" class="icon32"></div>
339
  <?php _e("Custom Contact Forms", 'custom-contact-forms'); ?>
340
  </h2>
341
  <ul id="plugin-nav">
342
+ <li><a href="#instructions"><?php _e("Plugin Instructions", 'custom-contact-forms'); ?></a></li>
343
+ <li><a href="#general-settings"><?php _e("General Settings", 'custom-contact-forms'); ?></a></li>
344
+ <li><a href="#create-fields"><?php _e("Create Fields", 'custom-contact-forms'); ?></a></li>
345
+ <li><a href="#create-forms"><?php _e("Create Forms", 'custom-contact-forms'); ?></a></li>
346
+ <li><a href="#manage-fields"><?php _e("Manage Fields", 'custom-contact-forms'); ?></a></li>
347
+ <li><a href="#manage-fixed-fields"><?php _e("Manage Fixed Fields", 'custom-contact-forms'); ?></a></li>
348
+ <li><a href="#manage-forms"><?php _e("Manage Forms", 'custom-contact-forms'); ?></a></li>
349
+ <li><a href="#form-submissions"><?php _e("Saved Form Submissions (New!)", 'custom-contact-forms'); ?></a></li>
350
+ <li><a href="#create-styles"><?php _e("Create Styles", 'custom-contact-forms'); ?></a></li>
351
+ <li><a href="#manage-styles"><?php _e("Manage Styles", 'custom-contact-forms'); ?></a></li>
352
+ <li><a href="#manage-field-options"><?php _e("Manage Field Options", 'custom-contact-forms'); ?></a></li>
353
+ <li><a href="#contact-author"><?php _e("Suggest a Feature", 'custom-contact-forms'); ?></a></li>
354
+ <li><a href="#contact-author"><?php _e("Bug Report", 'custom-contact-forms'); ?></a></li>
355
+ <li><a href="#custom-html"><?php _e("Custom HTML Forms", 'custom-contact-forms'); ?></a></li>
356
+ <li><a href="#import-export"><?php _e("Import / Export (New!)", 'custom-contact-forms'); ?></a></li>
357
+ <li class="last"><a href="#plugin-news"><?php _e("Plugin News", 'custom-contact-forms'); ?></a></li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
  </ul>
359
+ <form class="rate-me" action="https://www.paypal.com/cgi-bin/webscr" method="post">
360
+ <input type="hidden" name="cmd" value="_s-xclick">
361
+ <input type="hidden" name="hosted_button_id" value="TXYVDCH955V28">
362
+ <a href="http://wordpress.org/extend/plugins/custom-contact-forms" title="<?php _e("Rate This Plugin", 'custom-contact-forms'); ?>">
363
+ <?php _e("We need your help to continue development! Please <span>rate this plugin</span> to show your support.", 'custom-contact-forms'); ?></a>
364
+ <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
365
+ <img alt="Donate to Custom Contact Forms plugin" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
366
+ </form>
367
+
368
+ </a> <a name="create-fields"></a>
369
  <div id="create-fields" class="postbox">
370
  <h3 class="hndle"><span>
371
  <?php _e("Create A Form Field", 'custom-contact-forms'); ?>
375
  <ul>
376
  <li>
377
  <label for="field_slug">*
378
+ <?php _e("Field Slug:", 'custom-contact-forms'); ?>
379
  </label>
380
  <input name="field[field_slug]" type="text" maxlength="40" />
381
  <br />
382
+ <?php _e("This is just a unique way for CCF to refer to your field. Must be unique from other slugs and contain only underscores and alphanumeric characters.", 'custom-contact-forms'); ?>
383
  </li>
384
  <li>
385
  <label for="field_label">
387
  </label>
388
  <input name="field[field_label]" type="text" maxlength="100" />
389
  <br />
390
+ <?php _e("The field label is displayed next to the field and is visible to the user.", 'custom-contact-forms'); ?>
391
  </li>
392
  <li>
393
  <label for="field_type">*
412
  <?php _e("This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox
413
  'Are you human?', I would set the initial value to 'Yes'.", 'custom-contact-forms'); ?>
414
  <?php _e("If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the", 'custom-contact-forms'); ?>
415
+ <a href="#manage-field-options" title="<?php _e("Create a Field Option", 'custom-contact-forms'); ?>"><?php _e("field option", 'custom-contact-forms'); ?></a>
 
 
416
  <?php _e("you would like initially selected.", 'custom-contact-forms'); ?>
417
  ) </li>
418
  <li>
421
  </label>
422
  <input class="width50" size="10" name="field[field_maxlength]" type="text" maxlength="4" />
423
  <br />
424
+ <?php _e("0 for no limit; only applies to Text fields", 'custom-contact-forms'); ?>
425
  </li>
426
  <li>
427
  <label for="field_required">*
436
  </option>
437
  </select>
438
  <br />
439
+ <?php _e("If a field is required and a user leaves it blank, the plugin will display an error message (which you can customize using 'Field Error') explaining the problem.", 'custom-contact-forms'); ?>
440
  </li>
441
  <li>
442
+ <label for="field_instructions">
443
  <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
444
  </label>
445
  <input name="field[field_instructions]" type="text" />
446
  <br />
447
+ <?php _e("If this is filled out, a tooltip popover displaying this text will show when the field is selected.", 'custom-contact-forms'); ?>
448
+ </li>
449
+ <li>
450
+ <label for="field_class">
451
+ <?php _e("Field Class:", 'custom-contact-forms'); ?>
452
+ </label>
453
+ <input name="field[field_class]" type="text" />
454
+ <br />
455
+ <?php _e("If you manage your own .css stylesheet, you can use this to attach a class to this field. Leaving this blank will do nothing.", 'custom-contact-forms'); ?>
456
+ </li>
457
+ <li>
458
+ <label for="field_error">
459
+ <?php _e("Field Error:", 'custom-contact-forms'); ?>
460
+ </label>
461
+ <input name="field[field_error]" type="text" />
462
+ <br />
463
+ <?php _e("If a user leaves this field blank and the field is required, this error message will be shown. A generic default will show if left blank.", 'custom-contact-forms'); ?>
464
  </li>
465
  <li>
466
  <input type="hidden" name="field[user_field]" value="1" />
484
  </label>
485
  <input type="text" maxlength="100" name="form[form_slug]" />
486
  <br />
487
+ <?php _e("This is just a unique way for CCF to refer to your form. Must be unique from other slugs and contain only underscores and alphanumeric characters.", 'custom-contact-forms'); ?>
488
  </li>
489
  <li>
490
  <label for="form[form_title]">
491
  <?php _e("Form Title:", 'custom-contact-forms'); ?>
492
  </label>
493
  <input type="text" maxlength="200" name="form[form_title]" />
494
+ <?php _e("This text is displayed above the form as the heading.", 'custom-contact-forms'); ?>
495
  </li>
496
  <li>
497
  <label for="form[form_method]">*
501
  <option>Post</option>
502
  <option>Get</option>
503
  </select>
504
+ <?php _e("If unsure, leave as is.", 'custom-contact-forms'); ?>
505
  </li>
506
  <li>
507
  <label for="form[form_action]">
509
  </label>
510
  <input type="text" name="form[form_action]" value="" />
511
  <br />
512
+ <?php _e("If unsure, leave blank. Enter a URL here, if and only if you want to process your forms somewhere else, for example with a service like Aweber or InfusionSoft.", 'custom-contact-forms'); ?>
513
  </li>
514
  <li>
515
  <label for="form[form_action]">
518
  <select name="form[form_style]" class="form_style_input">
519
  <?php echo $style_options; ?>
520
  </select>
521
+ (<a href="#create-styles"><?php _e("Click to create a style", 'custom-contact-forms'); ?></a>)</li>
 
 
522
  <li>
523
  <label for="form[submit_button_text]">
524
  <?php _e("Submit Button Text:", 'custom-contact-forms'); ?>
531
  </label>
532
  <input type="text" name="form[custom_code]" />
533
  <br />
534
+ <?php _e("If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.", 'custom-contact-forms'); ?>
535
  </li>
536
  <li>
537
  <label for="form[form_email]">
539
  </label>
540
  <input type="text" name="form[form_email]" />
541
  <br />
542
+ <?php _e("Will receive all submissions from this form; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
543
  </li>
544
  <li>
545
  <label for="form[form_success_message]">
547
  </label>
548
  <input type="text" name="form[form_success_message]" />
549
  <br />
550
+ <?php _e("Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
551
  </li>
552
  <li>
553
  <label for="form[form_success_title]">
555
  </label>
556
  <input type="text" name="form[form_success_title]" />
557
  <br />
558
+ <?php _e("Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
559
  </li>
560
  <li>
561
  <label for="form[form_thank_you_page]">
563
  </label>
564
  <input type="text" name="form[form_thank_you_page]" />
565
  <br />
566
+ <?php _e("If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.", 'custom-contact-forms'); ?>
567
  </li>
568
  <li>
569
  <input type="submit" value="<?php _e("Create Form", 'custom-contact-forms'); ?>" name="form_create" />
628
  </tr>
629
  <?php $show_field_options = ($fields[$i]->field_type == 'Radio' || $fields[$i]->field_type == 'Dropdown') ? true : false; ?>
630
  <tr<?php if ($z % 2 == 1) echo ' class="evenrow"'; ?>>
631
+ <td class="fields-extra-options" colspan="7">
632
+ <div class="row-one">
633
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('If this is filled out, a tooltip popover displaying this text will show when the field is selected.', 'custom-contact-forms'); ?>">(?)</a>
634
  <label for="field_instructions">
635
  <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
636
  </label>
637
  <input type="text" class="width150" name="field[field_instructions]" value="<?php echo $fields[$i]->field_instructions; ?>" />
638
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a "Form Style" other than the default, styles inherited from the "Field Class" might be overwritten.', 'custom-contact-forms'); ?>">(?)</a>
639
+ <label for="field_class">
640
  <?php _e("Field Class:", 'custom-contact-forms'); ?>
641
  </label>
642
  <input type="text" class="width100" name="field[field_class]" value="<?php echo $fields[$i]->field_class; ?>" />
643
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('This lets you customize the error message displayed when this field is required and left blank.', 'custom-contact-forms'); ?>">(?)</a>
644
+ <label for="field_error">
645
+ <?php _e("Field Error:", 'custom-contact-forms'); ?>
646
+ </label>
647
+ <input type="text" class="width200" name="field[field_error]" value="<?php echo $fields[$i]->field_error; ?>" />
648
+ </div>
649
  <?php
650
  if ($show_field_options) { ?>
651
  <div class="dettach-field-options">
652
  <?php if (empty($attached_options)) { ?>
653
+ <select class="onObject<?php echo $fields[$i]->id ?> objectTypeField" name="dettach_object_id">
654
  <option value="-1">Nothing Attached!</option>
655
  </select>
656
  <?php } else { ?>
775
  </tr>
776
  <tr <?php if ($z % 2 == 0) echo ' class="evenrow"'; ?>>
777
  <td class="fixed-fields-extra-options" colspan="7"><label for="field_class">
778
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a "Form Style" other than the default, styles inherited from the "Field Class" might be overwritten.', 'custom-contact-forms'); ?>">(?)</a>
779
  <?php _e('Field Class:', 'custom-contact-forms'); ?>
780
  </label>
781
  <input type="text" value="<?php echo $fields[$i]->field_class; ?>" name="field[field_class]" />
782
  <?php if ($fields[$i]->field_slug != 'resetButton') { ?>
783
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('If this is filled out, a tooltip popover displaying this text will show when the field is selected.', 'custom-contact-forms'); ?>">(?)</a>
784
  <label for="field_instructions">
785
  <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
786
  </label>
787
  <input type="text" name="field[field_instructions]" class="width200" value="<?php echo $fields[$i]->field_instructions; ?>" />
788
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('This lets you customize the error message displayed when this field is required and left blank.', 'custom-contact-forms'); ?>">(?)</a>
789
+ <label for="field_error">
790
+ <?php _e("Field Error:", 'custom-contact-forms'); ?>
791
+ </label>
792
+ <input type="text" class="width200" name="field[field_error]" value="<?php echo $fields[$i]->field_error; ?>" />
793
  <br />
794
+ <?php } ?>
795
+ <div class="field_descrip"><?php echo $GLOBALS['ccf_fixed_fields'][$fields[$i]->field_slug]; ?></div></td>
796
  </tr>
797
  </form>
798
  <?php
989
  </span></label>
990
  <?php
991
  $attached_fields = parent::getAttachedFieldsArray($forms[$i]->id);
992
+ if (empty($attached_fields)) echo '<select class="onObject' . $forms[$i]->id . ' objectTypeForm" name="dettach_object_id"><option value="-1">Nothing Attached!</option></select> ';
993
  else {
994
+ echo '<select name="dettach_object_id" class="onObject' . $forms[$i]->id . ' objectTypeForm">';
995
  foreach($attached_fields as $attached_field) {
996
  $this_field = parent::selectField($attached_field, '');
997
  echo $this_field->field_slug . ' <option value="'.$this_field->id.'">'.$this_field->field_slug.'</option>';
1057
  </tfoot>
1058
  </table>
1059
  <?php
1060
+ require_once('modules/export/custom-contact-forms-user-data.php');
1061
  $user_data_array = parent::selectAllUserData();
1062
  ?>
1063
  <a name="form-submissions"></a>
1152
  </select>
1153
  </li>
1154
  <li class="descrip">
1155
+ <?php _e("When a user fills out one of your forms, the info submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info.", 'custom-contact-forms'); ?>
1156
  </li>
1157
  <li>
1158
  <label for="default_to_email">
1288
  <li class="descrip">
1289
  <?php _e("If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below.", 'custom-contact-forms'); ?>
1290
  </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1291
  <li class="show-widget"><b>
1292
  <?php _e("Show Sidebar Widget:", 'custom-contact-forms'); ?>
1293
  </b></li>
1377
  <div class="ccf-success-popover-example"></div>
1378
  </div>
1379
  </div>
1380
+ <a name="configure-mail"></a>
1381
+ <div id="configure-mail" class="postbox">
1382
+ <h3 class="hndle"><span>
1383
+ <?php _e("Configure Mail", 'custom-contact-forms'); ?>
1384
+ </span></h3>
1385
+ <div class="inside">
1386
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1387
+ <p><?php _e("There are two ways you can send emails: using the PHP mail() function or using SMTP (secure/insecure). If you choose to use the PHP mail() function you can ignore all the other options. For some people Wordpress's default way of sending mail does not work; if for some reason your mail is being sent you should try the SMTP option.", 'custom-contact-forms'); ?></p>
1388
+ <label for="mail_function"><?php _e("* Send My Emails Using the Following:", 'custom-contact-forms'); ?></label>
1389
+ <select name="mail_config[mail_function]">
1390
+ <option value="default"><?php _e("Wordpress Default", 'custom-contact-forms'); ?></option>
1391
+ <option <?php if ($admin_options['mail_function'] == 'smtp') echo 'selected="selected"'; ?> value="smtp"><?php _e("SMTP", 'custom-contact-forms'); ?></option>
1392
+ </select> <?php _e("(If mail isn't sending, try toggling this option.)", 'custom-contact-forms'); ?>
1393
+ <div>
1394
+ <ul class="left">
1395
+ <li><label for="smtp_host"><?php _e("SMTP Host:", 'custom-contact-forms'); ?></label> <input type="text" size="10" name="mail_config[smtp_host]" value="<?php echo $admin_options['smtp_host']; ?>" /></li>
1396
+ <li><label for="smtp_port"><?php _e("SMTP Port:", 'custom-contact-forms'); ?></label> <input type="text" size="10" name="mail_config[smtp_port]" value="<?php echo $admin_options['smtp_port']; ?>" /></li>
1397
+ <li><label for="smtp_encryption"><?php _e("Encryption:", 'custom-contact-forms'); ?></label> <select name="mail_config[smtp_encryption]">
1398
+ <option value="none"><?php _e("None", 'custom-contact-forms'); ?></option>
1399
+ <option <?php if ($admin_options['smtp_encryption'] == 'ssl') echo 'selected="selected"'; ?> value="ssl"><?php _e("SSL", 'custom-contact-forms'); ?></option>
1400
+ <option <?php if ($admin_options['smtp_encryption'] == 'tls') echo 'selected="selected"'; ?> value="tls"><?php _e("TLS", 'custom-contact-forms'); ?></option>
1401
+ </select></li>
1402
+ </ul>
1403
+ <ul class="right">
1404
+ <li><label for="smtp_authentication"><?php _e("SMTP Authentication:", 'custom-contact-forms'); ?></label> <select name="mail_config[smtp_authentication]"><option value="0"><?php _e("None Needed", 'custom-contact-forms'); ?></option><option <?php if ($admin_options['smtp_authentication'] == 1) echo 'selected="selected"'; ?> value="1"><?php _e("Use SMTP Username/Password", 'custom-contact-forms'); ?></option></select></li>
1405
+ <li><label for="smtp_username"><?php _e("SMTP Username:", 'custom-contact-forms'); ?></label> <input type="text" size="10" name="mail_config[smtp_username]" value="<?php echo $admin_options['smtp_username']; ?>" /></li>
1406
+ <li><label for="smtp_password"><?php _e("SMTP Password:", 'custom-contact-forms'); ?></label> <input type="text" size="10" name="mail_config[smtp_password]" value="<?php echo $admin_options['smtp_password']; ?>" /></li>
1407
+ </ul>
1408
+ </div>
1409
+ <input type="submit" name="configure_mail" value="<?php _e("Save Mail Sending Options", 'custom-contact-forms'); ?>" />
1410
+ </form>
1411
+ </div>
1412
+ </div>
1413
  <a name="create-styles"></a>
1414
  <div id="create-styles" class="postbox">
1415
  <h3 class="hndle"><span>
2038
  hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately.", 'custom-contact-forms'); ?>
2039
  </p>
2040
  <textarea id="custom_html_textarea">
2041
+ &lt;form method=&quot;post&quot; action=&quot;&quot;&gt;
2042
+ &lt;input type=&quot;hidden&quot; name=&quot;ccf_customhtml&quot; value=&quot;1&quot; /&gt;
2043
+ &lt;input type=&quot;hidden&quot; name=&quot;success_message&quot; value=&quot;<?php _e("Thank you for filling out our form!", 'custom-contact-forms'); ?>&quot; /&gt;
2044
+ &lt;input type=&quot;hidden&quot; name=&quot;thank_you_page&quot; value=&quot;http://www.google.com&quot; /&gt;
2045
+ &lt;input type=&quot;hidden&quot; name=&quot;destination_email&quot; value=&quot;<?php echo $admin_options['default_to_email']; ?>&quot; /&gt;
2046
+ &lt;input type=&quot;hidden&quot; name=&quot;required_fields&quot; value=&quot;field_name1, field_name2&quot; /&gt;
2047
+
2048
+ &lt;!-- <?php _e("Build your form in here. It is recommended you only use this feature if you are experienced with HTML.
2049
+ The success_message field will add a popover containing the message when the form is completed successfully, the thank_you_page field will force
2050
+ the user to be redirected to that specific page on successful form completion. The required_fields hidden field is optional; to use it seperate
2051
+ the field names you want required by commas. Remember to use underscores instead of spaces in field names!", 'custom-contact-forms'); ?> --&gt;
2052
+
2053
+ &lt;/form&gt;</textarea>
2054
  </div>
2055
  </div>
2056
  <a name="import-export"></a>
custom-contact-forms-export.php DELETED
@@ -1,130 +0,0 @@
1
- <?php
2
- /*
3
- Custom Contact Forms Plugin
4
- By Taylor Lovett - http://www.taylorlovett.com
5
- Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
- */
7
- class CustomContactFormsExport extends CustomContactFormsDB {
8
-
9
- var $last_export_content;
10
- var $last_export_file;
11
- var $exports_path;
12
- var $option_name;
13
-
14
- function CustomContactFormsExport($option_name) {
15
- $this->exports_path = CCF_BASE_PATH . 'export/';
16
- $this->option_name = $option_name;
17
- }
18
-
19
- function exportAll($backup_options = true) {
20
- $out = '';
21
- foreach ($GLOBALS['ccf_tables_array'] as $table)
22
- $out .= $this->exportTable($table);
23
- if ($backup_options) {
24
- $out .= "\n" . $this->generateOptionsUpdateQuery() . "\n";
25
- }
26
- $this->last_export_content = $out;
27
- return $out;
28
- }
29
-
30
- function exportTable($table) {
31
- $out = '';
32
- $data = parent::selectAllFromTable($table, ARRAY_A);
33
- foreach ($data as $row) {
34
- $no_insert = 0;
35
- $cols = '';
36
- $vals = '';
37
- foreach ($row as $k => $v) {
38
- $v = str_replace(';', '\;', $v);
39
- $cols .= "$k, ";
40
- $vals .= "'$v', ";
41
- }
42
- $vals = substr($vals, 0, strlen($vals) - 2);
43
- $cols = substr($cols, 0, strlen($cols) - 2);
44
- $statement = 'INSERT INTO `' . $table . '` (' . $cols . ') VALUES (' . CustomContactFormsStatic::escapeSemiColons($vals) . ');';
45
- $statement = $statement . "\n\n";
46
- $out .= $statement;
47
- }
48
- return $out;
49
- }
50
-
51
- function exportToFile($export_content = NULL) {
52
- if ($export_content == NULL) $export_content = $this->getLastExportContent();
53
- $export_file = "ccf-export-" . strtolower(date('j-M-Y--h-i-s')) . '.sql';
54
- if (($export_handle = @fopen($this->getExportsPath() . $export_file, 'w')) == false)
55
- return false;
56
- $comment = '## ' . __('Custom Contact Forms Export File', 'custom-contact-forms') . "\n";
57
- $comment .= '## '. __('It is recommended that you do not edit this file. The order of the', 'custom-contact-forms') . "\n";
58
- $comment .= '## ' . __('queries is important if you intend to use this file through the CCF', 'custom-contact-forms') . "\n";
59
- $comment .= '## ' . __('exporter. The query to update general settings MUST be the last query', 'custom-contact-forms') . "\n";
60
- $comment .= '## ' . __('in this file.', 'custom-contact-forms') . "\n\n";
61
- fwrite($export_handle, $comment . $export_content);
62
- fclose($export_handle);
63
- $this->last_export_file = $export_file;
64
- return $export_file;
65
- }
66
-
67
- function getExportsPath() {
68
- return $this->exports_path;
69
- }
70
-
71
- function getLastExportContent() {
72
- return $this->last_export_content;
73
- }
74
-
75
- function importFromFile($file, $settings = array('mode' => 'clear_import', 'import_general_settings' => false, 'import_forms' => true,'import_fields' => true, 'import_field_options' => true, 'import_styles' => true, 'import_saved_submissions' => false)) {
76
- $path = CCF_BASE_PATH. 'import/';
77
- $file_name = basename(time() . $file['name']);
78
- if (move_uploaded_file($file['tmp_name'], $path . $file_name)) {
79
- $data = file_get_contents($path . $file_name);
80
- $data = preg_replace('/^#.*?[\n\r]*$/ims', '', $data);
81
- $commands = $this->parseMultiQuery($data);
82
- $errors = 0;
83
- if ($settings['mode'] == 'clear_import') parent::emptyAllTables();
84
- foreach($commands as $command) {
85
- if (preg_match('/^[\s]*UPDATE/is', $command)) {
86
- if ($settings['import_general_settings'])
87
- if (!parent::query($command)) $errors++;
88
- } elseif (preg_match('/^[\s]*INSERT INTO/is', $command)) {
89
- $table_name = $this->extractTableFromQuery($command);
90
- $no_query = 0;
91
- if ($settings['import_forms'] == 0) if ($table_name == CCF_FORMS_TABLE) $no_query = 1;
92
- if ($settings['import_fields'] == 0) if ($table_name == CCF_FIELDS_TABLE) $no_query = 1;
93
- if ($settings['import_field_options'] == 0) if ($table_name == CCF_FIELD_OPTIONS_TABLE) $no_query = 1;
94
- if ($settings['import_styles'] == 0) if ($table_name == CCF_STYLES_TABLE) $no_query = 1;
95
- if ($settings['import_saved_submissions'] == 0) if ($table_name == CCF_USER_DATA_TABLE) $no_query = 1;
96
- if ($no_query == 0)
97
- if (!parent::query($command)) $errors++;
98
- }
99
- }
100
- return ($errors == 0) ? true : $errors;
101
- }
102
- return false;
103
- }
104
-
105
- function parseMultiQuery($sql, $unescape_semicolons = true, $replace_table_prefix = true) {
106
- if (empty($sql)) return false;
107
- $prefix = CustomContactFormsStatic::getWPTablePrefix();
108
- $commands = preg_split('/\);[\n\r]*/ims', $sql);
109
- foreach ($commands as $k => $v) {
110
- if (preg_match('/^[\s]*INSERT INTO/is', $v)) $commands[$k] = $v . ')';
111
- if ($unescape_semicolons)
112
- $commands[$k] = CustomContactFormsStatic::unescapeSemiColons($commands[$k]);
113
- if ($replace_table_prefix)
114
- $commands[$k] = preg_replace('/^([a-zA-Z0-9 \s]+?)`.+?customcontactforms_(.+?)`/is', '$1 `' . $prefix . 'customcontactforms_$2`', $commands[$k]);
115
- }
116
- return $commands;
117
- }
118
-
119
- function generateOptionsUpdateQuery($option_name = NULL) {
120
- if ($option_name == NULL) $option_name = $this->option_name;
121
- $prefix = CustomContactFormsStatic::getWPTablePrefix();
122
- $options = serialize(get_option($option_name));
123
- return 'UPDATE `' . $prefix . "options` SET `option_value`='$options' WHERE `option_name`='$option_name';";
124
- }
125
-
126
- function extractTableFromQuery($query) {
127
- return preg_replace('/^[\s]*?INSERT INTO[\s]*?`(.*?)`.*/is', '$1', $query);
128
- }
129
- }
130
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom-contact-forms-front.php CHANGED
@@ -151,9 +151,9 @@ if (!class_exists('CustomContactFormsFront')) {
151
  $fields = parent::getAttachedFieldsArray($fid);
152
  $hiddens = '';
153
  $code_type = ($admin_options['code_type'] == 'XHTML') ? ' /' : '';
 
154
  foreach ($fields as $field_id) {
155
  $field = parent::selectField($field_id, '');
156
- $add_reset = '';
157
  $req = ($field->field_required == 1 or $field->field_slug == 'ishuman') ? '* ' : '';
158
  $req_long = ($field->field_required == 1) ? ' ' . __('(required)', 'custom-contact-forms') : '';
159
  $input_id = 'id="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'-'.$form_key.'"';
@@ -163,12 +163,10 @@ if (!class_exists('CustomContactFormsFront')) {
163
  if ($_SESSION['fields'][$field->field_slug]) {
164
  if ($admin_options['remember_field_values'] == 1)
165
  $field_value = $_SESSION['fields'][$field->field_slug];
166
- } if ($field->user_field == 0) {
167
- if ($field->field_slug == 'captcha') {
168
- $out .= '<div>' . "\n" . $this->getCaptchaCode($form->id) . "\n" . '</div>' . "\n";
169
- } elseif ($field->field_slug == 'resetButton') {
170
- $add_reset = ' <input type="reset" '.$instructions.' class="reset-button '.$field->field_class.'" value="' . $field->field_value . '" />';
171
- }
172
  } elseif ($field->field_type == 'Text') {
173
  $maxlength = (empty($field->field_maxlength) or $field->field_maxlength <= 0) ? '' : ' maxlength="'.$field->field_maxlength.'"';
174
  $out .= '<div>'."\n".'<label for="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">'. $req .CustomContactFormsStatic::decodeOption($field->field_label, 1, 1).'</label>'."\n".'<input class="'.$field->field_class.'" '.$instructions.' '.$input_id.' type="text" name="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'" value="'.$field_value.'"'.$maxlength.''.$code_type.'>'."\n".'</div>' . "\n";
@@ -270,16 +268,33 @@ if (!class_exists('CustomContactFormsFront')) {
270
  $this->setFormError($err, $lang['field_blank'] . '"' . $err . '"');
271
  $errors = $this->getAllFormErrors();
272
  if (empty($errors)) {
273
- require_once('custom-contact-forms-user-data.php');
274
- require_once('custom-contact-forms-mailer.php');
275
  $data_object = new CustomContactFormsUserData(array('data_array' => $data_array, 'form_page' => $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'], 'form_id' => 0, 'data_time' => time()));
276
  parent::insertUserData($data_object);
277
  $body .= "\n" . $lang['form_page'] . $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'] . "\n" . $lang['sender_ip'] . $_SERVER['REMOTE_ADDR'] . "\n";
278
  if ($admin_options['email_form_submissions'] == 1) {
279
- $mailer = new CustomContactFormsMailer($_POST['destination_email'], $admin_options['default_from_email'], $admin_options['default_form_subject'], stripslashes($body), $admin_options['wp_mail_function']);
280
- $mailer->send();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  } if ($_POST['thank_you_page'])
282
- CustomContactFormsStatic::redirect($_POST['thank_you_page']);
283
  $this->current_thank_you_message = (!empty($_POST['success_message'])) ? $_POST['success_message'] : $admin_options['form_success_message'];
284
  $this->current_form = 0;
285
  add_action('wp_footer', array(&$this, 'insertFormSuccessCode'), 1);
@@ -297,17 +312,29 @@ if (!class_exists('CustomContactFormsFront')) {
297
  foreach ($fields as $field_id) {
298
  $field = parent::selectField($field_id, '');
299
  if ($field->field_slug == 'ishuman') {
300
- if ($_POST['ishuman'] != 1)
301
- $this->setFormError('ishuman', __('Only humans can use this form.', 'custom-contact-forms'));
 
 
 
302
  } elseif ($field->field_slug == 'captcha') {
303
- if ($_POST['captcha'] != $_SESSION[$cap_name])
304
- $this->setFormError('captcha', __('You copied the number from the captcha field incorrectly.', 'custom-contact-forms'));
 
 
 
305
  } elseif ($field->field_slug == 'fixedEmail' && $field->field_required == 1 && !empty($_POST['fixedEmail'])) {
306
- if (!$this->validEmail($_POST['fixedEmail'])) $this->setFormError('bad_email', __('The email address you provided is not valid.', 'custom-contact-forms'));
 
 
 
 
307
  } else {
308
  if ($field->field_required == 1 && empty($_POST[$field->field_slug])) {
309
  $field_error_label = (empty($field->field_label)) ? $field->field_slug : $field->field_label;
310
- $this->setFormError($field->field_slug, $lang['field_blank'] . '"'.$field_error_label.'"');
 
 
311
  }
312
  } if ($field->field_type == 'Checkbox')
313
  $checks[] = $field->field_slug;
@@ -319,7 +346,7 @@ if (!class_exists('CustomContactFormsFront')) {
319
  $field = parent::selectField('', $key);
320
  if (!array_key_exists($key, $GLOBALS['ccf_fixed_fields']) or $key == 'fixedEmail') {
321
  $mail_field_label = (empty($field->field_label)) ? $field->field_slug : $field->field_label;
322
- $body .= $mail_field_label . ': ' . $value . "\n";
323
  $data_array[$key] = $value;
324
  } if (in_array($key, $checks)) {
325
  $checks_key = array_search($key, $checks);
@@ -333,19 +360,37 @@ if (!class_exists('CustomContactFormsFront')) {
333
  }
334
  $errors = $this->getAllFormErrors();
335
  if (empty($errors)) {
336
- require_once('custom-contact-forms-user-data.php');
337
  unset($_SESSION['captcha_' . $_POST['fid']]);
338
  unset($_SESSION['fields']);
339
  $data_object = new CustomContactFormsUserData(array('data_array' => $data_array, 'form_page' => $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], 'form_id' => $form->id, 'data_time' => time()));
340
  parent::insertUserData($data_object);
341
- if ($admin_options['email_form_submission'] == 1) {
342
- require_once('custom-contact-forms-mailer.php');
343
- $body .= "\n" . $lang['form_page'] . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . "\n" . $lang['sender_ip'] . $_SERVER['REMOTE_ADDR'] . "\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  $to_email = (!empty($form->form_email)) ? $form->form_email : $admin_options['default_to_email'];
345
- $mailer = new CustomContactFormsMailer($to_email, $admin_options['default_from_email'], $admin_options['default_form_subject'], stripslashes($body), $admin_options['wp_mail_function'], $reply);
346
- $mailer->send();
 
 
 
 
 
347
  } if (!empty($form->form_thank_you_page))
348
- CustomContactFormsStatic::redirect($form->form_thank_you_page);
349
  $this->current_form = $form->id;
350
  add_action('wp_footer', array(&$this, 'insertFormSuccessCode'), 1);
351
  }
151
  $fields = parent::getAttachedFieldsArray($fid);
152
  $hiddens = '';
153
  $code_type = ($admin_options['code_type'] == 'XHTML') ? ' /' : '';
154
+ $add_reset = '';
155
  foreach ($fields as $field_id) {
156
  $field = parent::selectField($field_id, '');
 
157
  $req = ($field->field_required == 1 or $field->field_slug == 'ishuman') ? '* ' : '';
158
  $req_long = ($field->field_required == 1) ? ' ' . __('(required)', 'custom-contact-forms') : '';
159
  $input_id = 'id="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'-'.$form_key.'"';
163
  if ($_SESSION['fields'][$field->field_slug]) {
164
  if ($admin_options['remember_field_values'] == 1)
165
  $field_value = $_SESSION['fields'][$field->field_slug];
166
+ } if ($field->field_slug == 'captcha') {
167
+ $out .= '<div>' . "\n" . $this->getCaptchaCode($form->id) . "\n" . '</div>' . "\n";
168
+ } elseif ($field->field_slug == 'resetButton') {
169
+ $add_reset = ' <input type="reset" '.$instructions.' class="reset-button '.$field->field_class.'" value="' . $field->field_value . '" />';
 
 
170
  } elseif ($field->field_type == 'Text') {
171
  $maxlength = (empty($field->field_maxlength) or $field->field_maxlength <= 0) ? '' : ' maxlength="'.$field->field_maxlength.'"';
172
  $out .= '<div>'."\n".'<label for="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">'. $req .CustomContactFormsStatic::decodeOption($field->field_label, 1, 1).'</label>'."\n".'<input class="'.$field->field_class.'" '.$instructions.' '.$input_id.' type="text" name="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'" value="'.$field_value.'"'.$maxlength.''.$code_type.'>'."\n".'</div>' . "\n";
268
  $this->setFormError($err, $lang['field_blank'] . '"' . $err . '"');
269
  $errors = $this->getAllFormErrors();
270
  if (empty($errors)) {
271
+ require_once('modules/export/custom-contact-forms-user-data.php');
 
272
  $data_object = new CustomContactFormsUserData(array('data_array' => $data_array, 'form_page' => $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'], 'form_id' => 0, 'data_time' => time()));
273
  parent::insertUserData($data_object);
274
  $body .= "\n" . $lang['form_page'] . $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'] . "\n" . $lang['sender_ip'] . $_SERVER['REMOTE_ADDR'] . "\n";
275
  if ($admin_options['email_form_submissions'] == 1) {
276
+ require_once('modules/phpmailer/class.phpmailer.php');
277
+ $mail = new PHPMailer();
278
+ if ($admin_options['mail_function'] == 'smtp') {
279
+ $mail->IsSMTP();
280
+ $mail->Host = $admin_options['smtp_host'];
281
+ if ($admin_options['smtp_authentication'] == 1) {
282
+ $mail->SMTPAuth = true;
283
+ $mail->Username = $admin_options['smtp_username'];
284
+ $mail->Password = $admin_options['smtp_password'];
285
+ $mail->Port = $admin_options['smtp_port'];
286
+ } else
287
+ $mail->SMTPAuth = false;
288
+ }
289
+ $mail->SetFrom($admin_options['default_from_email'], 'Custom Contact Forms');
290
+ $mail->AddReplyTo($admin_options['default_from_email'], 'Custom Contact Forms');
291
+ $mail->AddAddress($_POST['destination_email']);
292
+ $mail->Subject = $admin_options['default_form_subject'];
293
+ $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
294
+ $mail->MsgHTML(stripslashes($body));
295
+ $mail->Send();
296
  } if ($_POST['thank_you_page'])
297
+ wp_redirect($_POST['thank_you_page']);
298
  $this->current_thank_you_message = (!empty($_POST['success_message'])) ? $_POST['success_message'] : $admin_options['form_success_message'];
299
  $this->current_form = 0;
300
  add_action('wp_footer', array(&$this, 'insertFormSuccessCode'), 1);
312
  foreach ($fields as $field_id) {
313
  $field = parent::selectField($field_id, '');
314
  if ($field->field_slug == 'ishuman') {
315
+ if ($_POST['ishuman'] != 1) {
316
+ if (empty($field->field_error))
317
+ $this->setFormError('ishuman', __('Only humans can use this form.', 'custom-contact-forms'));
318
+ else $this->setFormError('ishuman', $field->field_error);
319
+ }
320
  } elseif ($field->field_slug == 'captcha') {
321
+ if ($_POST['captcha'] != $_SESSION[$cap_name]) {
322
+ if (empty($field->field_error))
323
+ $this->setFormError('captcha', __('You copied the number from the captcha field incorrectly.', 'custom-contact-forms'));
324
+ else $this->setFormError('captcha', $field->field_error);
325
+ }
326
  } elseif ($field->field_slug == 'fixedEmail' && $field->field_required == 1 && !empty($_POST['fixedEmail'])) {
327
+ if (!$this->validEmail($_POST['fixedEmail'])) {
328
+ if (empty($field->field_error))
329
+ $this->setFormError('fixedEmail', __('The email address you provided is not valid.', 'custom-contact-forms'));
330
+ else $this->setFormError('fixedEmail', $field->field_error);
331
+ }
332
  } else {
333
  if ($field->field_required == 1 && empty($_POST[$field->field_slug])) {
334
  $field_error_label = (empty($field->field_label)) ? $field->field_slug : $field->field_label;
335
+ if (empty($field->field_error))
336
+ $this->setFormError($field->field_slug, $lang['field_blank'] . '"'.$field_error_label.'"');
337
+ else $this->setFormError($field->field_slug, $field->field_error);
338
  }
339
  } if ($field->field_type == 'Checkbox')
340
  $checks[] = $field->field_slug;
346
  $field = parent::selectField('', $key);
347
  if (!array_key_exists($key, $GLOBALS['ccf_fixed_fields']) or $key == 'fixedEmail') {
348
  $mail_field_label = (empty($field->field_label)) ? $field->field_slug : $field->field_label;
349
+ $body .= $mail_field_label . ': ' . $value . "<br />\n";
350
  $data_array[$key] = $value;
351
  } if (in_array($key, $checks)) {
352
  $checks_key = array_search($key, $checks);
360
  }
361
  $errors = $this->getAllFormErrors();
362
  if (empty($errors)) {
363
+ require_once('modules/export/custom-contact-forms-user-data.php');
364
  unset($_SESSION['captcha_' . $_POST['fid']]);
365
  unset($_SESSION['fields']);
366
  $data_object = new CustomContactFormsUserData(array('data_array' => $data_array, 'form_page' => $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], 'form_id' => $form->id, 'data_time' => time()));
367
  parent::insertUserData($data_object);
368
+ if ($admin_options['email_form_submissions'] == '1') {
369
+ $body .= "<br />\n" . $lang['form_page'] . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . "<br />\n" . $lang['sender_ip'] . $_SERVER['REMOTE_ADDR'] . "<br />\n";
370
+ require_once('modules/phpmailer/class.phpmailer.php');
371
+ $mail = new PHPMailer();
372
+ if ($admin_options['mail_function'] == 'smtp') {
373
+ $mail->IsSMTP();
374
+ $mail->Host = $admin_options['smtp_host'];
375
+ if ($admin_options['smtp_authentication'] == 1) {
376
+ $mail->SMTPAuth = true;
377
+ $mail->Username = $admin_options['smtp_username'];
378
+ $mail->Password = $admin_options['smtp_password'];
379
+ $mail->Port = $admin_options['smtp_port'];
380
+ } else
381
+ $mail->SMTPAuth = false;
382
+ }
383
+ $mail->SetFrom($admin_options['default_from_email'], 'Custom Contact Forms');
384
  $to_email = (!empty($form->form_email)) ? $form->form_email : $admin_options['default_to_email'];
385
+ $mail->AddAddress($to_email);
386
+ if ($reply != NULL) $mail->AddReplyTo($reply);
387
+ else $mail->AddReplyTo($admin_options['default_from_email'], 'Custom Contact Forms');
388
+ $mail->Subject = $admin_options['default_form_subject'];
389
+ $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
390
+ $mail->MsgHTML(stripslashes($body));
391
+ $mail->Send();
392
  } if (!empty($form->form_thank_you_page))
393
+ wp_redirect($form->form_thank_you_page);
394
  $this->current_form = $form->id;
395
  add_action('wp_footer', array(&$this, 'insertFormSuccessCode'), 1);
396
  }
custom-contact-forms-mailer.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
- /*
3
- Custom Contact Forms Plugin
4
- By Taylor Lovett - http://www.taylorlovett.com
5
- Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
- */
7
- if (!class_exists('CustomContactFormsMailer')) {
8
- class CustomContactFormsMailer {
9
- var $to;
10
- var $from;
11
- var $subject;
12
- var $body;
13
- var $headers;
14
- var $reply_to;
15
- var $wp_mail_function;
16
-
17
- function CustomContactFormsMailer($to, $from, $subject, $body, $wp_mail_function, $reply_to = NULL){
18
- $this->to = $to;
19
- $this->from = $from;
20
- $this->subject = $subject;
21
- $this->body = $body;
22
- $this->reply_to = $reply_to;
23
- $this->wp_mail_function = $wp_mail_function;
24
- }
25
-
26
- function send(){
27
- $reply = ($this->reply_to != NULL) ? $this->reply_to : $this->from;
28
- $this->addHeader('From: '.$this->from."\r\n");
29
- $this->addHeader('Reply-To: '.$reply."\r\n");
30
- $this->addHeader('Return-Path: '.$this->from."\r\n");
31
- $this->addHeader('X-mailer: ZFmail 1.0'."\r\n");
32
- $this->body .= "\n\n\n----------\n" . __("Sent by Custom Contact Forms\nA WordPress Plugin created by Taylor Lovett", 'custom-contact-forms') . "\n".__('Report a Bug/Get Support:', 'custom-contact-forms')." http://www.taylorlovett.com\n";
33
- if ($this->wp_mail_function == 1)
34
- wp_mail($this->to, $this->subject, $this->body, $this->headers);
35
- else
36
- mail($this->to, $this->subject, $this->body, $this->headers);
37
- }
38
-
39
- function addHeader($header){
40
- $this->headers .= $header;
41
- }
42
- }
43
- }
44
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom-contact-forms-static.php CHANGED
@@ -35,10 +35,6 @@ if (!class_exists('CustomContactFormsStatic')) {
35
  return $option;
36
  }
37
 
38
- function strstrb($h, $n){
39
- return array_shift(explode($n, $h, 2));
40
- }
41
-
42
  function definePluginConstants() {
43
  $prefix = CustomContactFormsStatic::getWPTablePrefix();
44
  define('CCF_FORMS_TABLE', $prefix . 'customcontactforms_forms');
@@ -57,14 +53,6 @@ if (!class_exists('CustomContactFormsStatic')) {
57
  'resetButton' => __('This field lets users reset all form fields to their initial values. This will be inserted next to the submit button.', 'custom-contact-forms')
58
  );
59
  }
60
-
61
- function escapeSemiColons($value) {
62
- return str_replace(';', '\;', $value);
63
- }
64
-
65
- function unescapeSemiColons($value) {
66
- return str_replace('\;', ';', $value);
67
- }
68
  }
69
  }
70
  ?>
35
  return $option;
36
  }
37
 
 
 
 
 
38
  function definePluginConstants() {
39
  $prefix = CustomContactFormsStatic::getWPTablePrefix();
40
  define('CCF_FORMS_TABLE', $prefix . 'customcontactforms_forms');
53
  'resetButton' => __('This field lets users reset all form fields to their initial values. This will be inserted next to the submit button.', 'custom-contact-forms')
54
  );
55
  }
 
 
 
 
 
 
 
 
56
  }
57
  }
58
  ?>
custom-contact-forms.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Custom Contact Forms
4
  Plugin URI: http://taylorlovett.com/wordpress-plugins
5
  Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form.
6
- Version: 4.0.0.b8
7
  Author: Taylor Lovett
8
  Author URI: http://www.taylorlovett.com
9
  */
@@ -30,7 +30,7 @@
30
  error_reporting(E_ALL ^ E_NOTICE);
31
  require_once('custom-contact-forms-static.php');
32
  CustomContactFormsStatic::definePluginConstants();
33
- require_once('custom-contact-forms-db.php');
34
  if (!class_exists('CustomContactForms')) {
35
  class CustomContactForms extends CustomContactFormsDB {
36
  var $adminOptionsName = 'customContactFormsAdminOptions';
@@ -38,7 +38,7 @@ if (!class_exists('CustomContactForms')) {
38
  function activatePlugin() {
39
  $admin_options = $this->getAdminOptions();
40
  $admin_options['show_install_popover'] = 1;
41
- update_option($this->adminOptionsName, $admin_options);
42
  parent::createTables();
43
  parent::updateTables();
44
  parent::insertFixedFields();
@@ -51,9 +51,9 @@ if (!class_exists('CustomContactForms')) {
51
  function getAdminOptions() {
52
  $admin_email = get_option('admin_email');
53
  $customcontactAdminOptions = array('show_widget_home' => 1, 'show_widget_pages' => 1, 'show_widget_singles' => 1, 'show_widget_categories' => 1, 'show_widget_archives' => 1, 'default_to_email' => $admin_email, 'default_from_email' => $admin_email, 'default_form_subject' => __('Someone Filled Out Your Contact Form!', 'custom-contact-forms'),
54
- 'remember_field_values' => 0, 'author_link' => 1, 'enable_widget_tooltips' => 1, 'wp_mail_function' => 1, 'form_success_message_title' => __('Successful Form Submission', 'custom-contact-forms'), 'form_success_message' => __('Thank you for filling out our web form. We will get back to you ASAP.', 'custom-contact-forms'), 'enable_jquery' => 1, 'code_type' => 'XHTML',
55
- 'show_install_popover' => 0, 'email_form_submissions' => 1, 'admin_ajax' => 1); // default general settings
56
- $customcontactOptions = get_option($this->getAdminOptionsName);
57
  if (!empty($customcontactOptions)) {
58
  foreach ($customcontactOptions as $key => $option)
59
  $customcontactAdminOptions[$key] = $option;
@@ -107,7 +107,7 @@ if (!is_admin()) { /* is front */
107
  }
108
 
109
  /* widget stuff */
110
- require_once('custom-contact-forms-widget.php');
111
  if (!function_exists('CCFWidgetInit')) {
112
  function CCFWidgetInit() {
113
  register_widget('CustomContactFormsWidget');
3
  Plugin Name: Custom Contact Forms
4
  Plugin URI: http://taylorlovett.com/wordpress-plugins
5
  Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form.
6
+ Version: 4.0.0.b9
7
  Author: Taylor Lovett
8
  Author URI: http://www.taylorlovett.com
9
  */
30
  error_reporting(E_ALL ^ E_NOTICE);
31
  require_once('custom-contact-forms-static.php');
32
  CustomContactFormsStatic::definePluginConstants();
33
+ require_once('modules/db/custom-contact-forms-db.php');
34
  if (!class_exists('CustomContactForms')) {
35
  class CustomContactForms extends CustomContactFormsDB {
36
  var $adminOptionsName = 'customContactFormsAdminOptions';
38
  function activatePlugin() {
39
  $admin_options = $this->getAdminOptions();
40
  $admin_options['show_install_popover'] = 1;
41
+ update_option($this->getAdminOptionsName(), $admin_options);
42
  parent::createTables();
43
  parent::updateTables();
44
  parent::insertFixedFields();
51
  function getAdminOptions() {
52
  $admin_email = get_option('admin_email');
53
  $customcontactAdminOptions = array('show_widget_home' => 1, 'show_widget_pages' => 1, 'show_widget_singles' => 1, 'show_widget_categories' => 1, 'show_widget_archives' => 1, 'default_to_email' => $admin_email, 'default_from_email' => $admin_email, 'default_form_subject' => __('Someone Filled Out Your Contact Form!', 'custom-contact-forms'),
54
+ 'remember_field_values' => 0, 'author_link' => 1, 'enable_widget_tooltips' => 1, 'mail_function' => 'default', 'form_success_message_title' => __('Successful Form Submission', 'custom-contact-forms'), 'form_success_message' => __('Thank you for filling out our web form. We will get back to you ASAP.', 'custom-contact-forms'), 'enable_jquery' => 1, 'code_type' => 'XHTML',
55
+ 'show_install_popover' => 0, 'email_form_submissions' => 1, 'admin_ajax' => 1, 'smtp_host' => '', 'smtp_encryption' => 'none', 'smtp_authentication' => 0, 'smtp_username' => '', 'smtp_password' => '', 'smtp_port' => ''); // default general settings
56
+ $customcontactOptions = get_option($this->getAdminOptionsName());
57
  if (!empty($customcontactOptions)) {
58
  foreach ($customcontactOptions as $key => $option)
59
  $customcontactAdminOptions[$key] = $option;
107
  }
108
 
109
  /* widget stuff */
110
+ require_once('modules/widget/custom-contact-forms-widget.php');
111
  if (!function_exists('CCFWidgetInit')) {
112
  function CCFWidgetInit() {
113
  register_widget('CustomContactFormsWidget');
image.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  error_reporting(0);
8
  header("Content-type: image/png");
9
- require_once('custom-contact-forms-images.php');
10
  $image = new CustomContactFormsImages();
11
  $str = rand(10000, 99999);
12
  if (!session_id())
6
  */
7
  error_reporting(0);
8
  header("Content-type: image/png");
9
+ require_once('modules/images/custom-contact-forms-images.php');
10
  $image = new CustomContactFormsImages();
11
  $str = rand(10000, 99999);
12
  if (!session_id())
lang/custom-contact-forms.mo CHANGED
Binary file
lang/custom-contact-forms.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: custom-contact-forms\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2010-10-26 17:07-0500\n"
6
- "PO-Revision-Date: 2010-10-27 10:35-0500\n"
7
  "Last-Translator: Taylor Lovett <sdfds@sfs.com>\n"
8
  "Language-Team: TaylorLovett.com <admin@taylorlovett.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -15,1298 +15,1329 @@ msgstr ""
15
  "X-Poedit-Country: UNITED STATES\n"
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
- #: ../custom-contact-forms-admin.php:3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  msgid "Custom Contact Forms"
20
  msgstr ""
21
 
22
- #: ../custom-contact-forms-admin.php:5
23
  msgid "Plugin Instructions"
24
  msgstr ""
25
 
26
- #: ../custom-contact-forms-admin.php:6
27
- #: ../custom-contact-forms-admin.php:619
28
  msgid "General Settings"
29
  msgstr ""
30
 
31
- #: ../custom-contact-forms-admin.php:7
32
  msgid "Create Fields"
33
  msgstr ""
34
 
35
- #: ../custom-contact-forms-admin.php:8
36
  msgid "Create Forms"
37
  msgstr ""
38
 
39
- #: ../custom-contact-forms-admin.php:9
40
  msgid "Manage Fields"
41
  msgstr ""
42
 
43
- #: ../custom-contact-forms-admin.php:10
44
- #: ../custom-contact-forms-admin.php:266
45
  msgid "Manage Fixed Fields"
46
  msgstr ""
47
 
48
- #: ../custom-contact-forms-admin.php:11
49
- #: ../custom-contact-forms-admin.php:425
50
  msgid "Manage Forms"
51
  msgstr ""
52
 
53
- #: ../custom-contact-forms-admin.php:12
54
  msgid "Saved Form Submissions (New!)"
55
  msgstr ""
56
 
57
- #: ../custom-contact-forms-admin.php:13
58
  msgid "Create Styles"
59
  msgstr ""
60
 
61
- #: ../custom-contact-forms-admin.php:14
62
  msgid "Manage Styles"
63
  msgstr ""
64
 
65
- #: ../custom-contact-forms-admin.php:15
66
  msgid "Manage Field Options"
67
  msgstr ""
68
 
69
- #: ../custom-contact-forms-admin.php:16
70
- #: ../custom-contact-forms-admin.php:1138
71
  msgid "Suggest a Feature"
72
  msgstr ""
73
 
74
- #: ../custom-contact-forms-admin.php:17
75
- #: ../custom-contact-forms-admin.php:1137
76
  msgid "Bug Report"
77
  msgstr ""
78
 
79
- #: ../custom-contact-forms-admin.php:18
80
  #: ../custom-contact-forms-usage-popover.php:20
81
  msgid "Custom HTML Forms"
82
  msgstr ""
83
 
84
- #: ../custom-contact-forms-admin.php:19
85
  msgid "Import / Export (New!)"
86
  msgstr ""
87
 
88
- #: ../custom-contact-forms-admin.php:20
89
  msgid "Plugin News"
90
  msgstr ""
91
 
92
- #: ../custom-contact-forms-admin.php:22
93
  msgid "Rate This Plugin"
94
  msgstr ""
95
 
96
- #: ../custom-contact-forms-admin.php:22
97
  msgid "We need your help to continue development! Please <span>rate this plugin</span> to show your support."
98
  msgstr ""
99
 
100
- #: ../custom-contact-forms-admin.php:24
101
  msgid "Create A Form Field"
102
  msgstr ""
103
 
104
- #: ../custom-contact-forms-admin.php:29
105
  msgid "Slug (Name):"
106
  msgstr ""
107
 
108
- #: ../custom-contact-forms-admin.php:32
109
  msgid "(A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.)"
110
  msgstr ""
111
 
112
- #: ../custom-contact-forms-admin.php:34
113
  #: ../custom-contact-forms-usage-popover.php:130
114
  msgid "Field Label:"
115
  msgstr ""
116
 
117
- #: ../custom-contact-forms-admin.php:37
118
  msgid "(The field label is displayed next to the field and is visible to the user.)"
119
  msgstr ""
120
 
121
- #: ../custom-contact-forms-admin.php:39
122
  #: ../custom-contact-forms-usage-popover.php:135
123
  msgid "Field Type:"
124
  msgstr ""
125
 
126
- #: ../custom-contact-forms-admin.php:50
127
  #: ../custom-contact-forms-usage-popover.php:140
128
  msgid "Initial Value:"
129
  msgstr ""
130
 
131
- #: ../custom-contact-forms-admin.php:53
132
  msgid ""
133
  "This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox \n"
134
- " 'Are you human?', I would set the initial value to 'Yes'."
135
  msgstr ""
136
 
137
- #: ../custom-contact-forms-admin.php:54
138
  msgid "If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the"
139
  msgstr ""
140
 
141
- #: ../custom-contact-forms-admin.php:54
142
- #: ../custom-contact-forms-admin.php:399
143
  msgid "Create a Field Option"
144
  msgstr ""
145
 
146
- #: ../custom-contact-forms-admin.php:54
147
  msgid "field option"
148
  msgstr ""
149
 
150
- #: ../custom-contact-forms-admin.php:54
151
  msgid "you would like initially selected."
152
  msgstr ""
153
 
154
- #: ../custom-contact-forms-admin.php:56
155
  #: ../custom-contact-forms-usage-popover.php:145
156
  msgid "Max Length:"
157
  msgstr ""
158
 
159
- #: ../custom-contact-forms-admin.php:59
160
  msgid "(0 for no limit; only applies to Text fields)"
161
  msgstr ""
162
 
163
- #: ../custom-contact-forms-admin.php:61
164
  #: ../custom-contact-forms-usage-popover.php:150
165
  msgid "Required Field:"
166
  msgstr ""
167
 
168
- #: ../custom-contact-forms-admin.php:63
169
- #: ../custom-contact-forms-admin.php:184
170
- #: ../custom-contact-forms-admin.php:305
171
- #: ../custom-contact-forms-admin.php:627
172
- #: ../custom-contact-forms-admin.php:668
173
- #: ../custom-contact-forms-admin.php:684
174
- #: ../custom-contact-forms-admin.php:707
175
  msgid "No"
176
  msgstr ""
177
 
178
- #: ../custom-contact-forms-admin.php:64
179
- #: ../custom-contact-forms-admin.php:183
180
- #: ../custom-contact-forms-admin.php:304
181
- #: ../custom-contact-forms-admin.php:311
182
- #: ../custom-contact-forms-admin.php:626
183
- #: ../custom-contact-forms-admin.php:667
184
- #: ../custom-contact-forms-admin.php:683
185
- #: ../custom-contact-forms-admin.php:706
186
  msgid "Yes"
187
  msgstr ""
188
 
189
- #: ../custom-contact-forms-admin.php:67
190
  msgid "(If a field is required and a user leaves it blank, the plugin will display an error message explainging the problem.)"
191
  msgstr ""
192
 
193
- #: ../custom-contact-forms-admin.php:69
194
- #: ../custom-contact-forms-admin.php:202
195
- #: ../custom-contact-forms-admin.php:330
196
  #: ../custom-contact-forms-usage-popover.php:155
197
  msgid "Field Instructions:"
198
  msgstr ""
199
 
200
- #: ../custom-contact-forms-admin.php:72
201
  msgid "(If this is filled out, a tooltip popover displaying this text will show when the field is selected.)"
202
  msgstr ""
203
 
204
- #: ../custom-contact-forms-admin.php:75
205
  msgid "Create Field"
206
  msgstr ""
207
 
208
- #: ../custom-contact-forms-admin.php:83
209
  msgid "Create A Form"
210
  msgstr ""
211
 
212
- #: ../custom-contact-forms-admin.php:88
213
  msgid "Form Slug:"
214
  msgstr ""
215
 
216
- #: ../custom-contact-forms-admin.php:91
217
  msgid "(Must be unique and contain only underscores and alphanumeric characters.)"
218
  msgstr ""
219
 
220
- #: ../custom-contact-forms-admin.php:93
221
  #: ../custom-contact-forms-usage-popover.php:211
222
  msgid "Form Title:"
223
  msgstr ""
224
 
225
- #: ../custom-contact-forms-admin.php:95
226
  msgid "(The form header text)"
227
  msgstr ""
228
 
229
- #: ../custom-contact-forms-admin.php:97
230
  #: ../custom-contact-forms-usage-popover.php:216
231
  msgid "Form Method:"
232
  msgstr ""
233
 
234
- #: ../custom-contact-forms-admin.php:102
235
  msgid "(If unsure, leave as is.)"
236
  msgstr ""
237
 
238
- #: ../custom-contact-forms-admin.php:104
239
  #: ../custom-contact-forms-usage-popover.php:221
240
  msgid "Form Action:"
241
  msgstr ""
242
 
243
- #: ../custom-contact-forms-admin.php:107
244
  msgid "(If unsure, leave blank. Enter a URL here, if and only if you want to process your forms somewhere else, for example with a service like Aweber or InfusionSoft.)"
245
  msgstr ""
246
 
247
- #: ../custom-contact-forms-admin.php:109
248
  #: ../custom-contact-forms-usage-popover.php:226
249
  msgid "Form Style:"
250
  msgstr ""
251
 
252
- #: ../custom-contact-forms-admin.php:113
253
  msgid "Click to create a style"
254
  msgstr ""
255
 
256
- #: ../custom-contact-forms-admin.php:115
257
  #: ../custom-contact-forms-usage-popover.php:231
258
  msgid "Submit Button Text:"
259
  msgstr ""
260
 
261
- #: ../custom-contact-forms-admin.php:119
262
- #: ../custom-contact-forms-admin.php:518
263
  #: ../custom-contact-forms-usage-popover.php:236
264
  msgid "Custom Code:"
265
  msgstr ""
266
 
267
- #: ../custom-contact-forms-admin.php:122
268
  msgid "(If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.)"
269
  msgstr ""
270
 
271
- #: ../custom-contact-forms-admin.php:124
272
  #: ../custom-contact-forms-usage-popover.php:241
273
  msgid "Form Destination Email:"
274
  msgstr ""
275
 
276
- #: ../custom-contact-forms-admin.php:127
277
  msgid "(Will receive all submissions from this form; if left blank it will use the default specified in general settings.)"
278
  msgstr ""
279
 
280
- #: ../custom-contact-forms-admin.php:129
281
  #: ../custom-contact-forms-usage-popover.php:246
282
  msgid "Form Success Message:"
283
  msgstr ""
284
 
285
- #: ../custom-contact-forms-admin.php:132
286
- #: ../custom-contact-forms-admin.php:137
287
  msgid "(Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.)"
288
  msgstr ""
289
 
290
- #: ../custom-contact-forms-admin.php:134
291
  #: ../custom-contact-forms-usage-popover.php:251
292
  msgid "Form Success Message Title:"
293
  msgstr ""
294
 
295
- #: ../custom-contact-forms-admin.php:139
296
  #: ../custom-contact-forms-usage-popover.php:256
297
  msgid "Custom Success URL:"
298
  msgstr ""
299
 
300
- #: ../custom-contact-forms-admin.php:142
301
  msgid "(If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.)"
302
  msgstr ""
303
 
304
- #: ../custom-contact-forms-admin.php:144
305
  msgid "Create Form"
306
  msgstr ""
307
 
308
- #: ../custom-contact-forms-admin.php:151
309
  msgid "Manage User Fields"
310
  msgstr ""
311
 
312
- #: ../custom-contact-forms-admin.php:155
313
- #: ../custom-contact-forms-admin.php:255
314
- #: ../custom-contact-forms-admin.php:270
315
- #: ../custom-contact-forms-admin.php:342
316
- #: ../custom-contact-forms-admin.php:357
317
- #: ../custom-contact-forms-admin.php:392
318
- #: ../custom-contact-forms-admin.php:430
319
- #: ../custom-contact-forms-admin.php:539
320
  msgid "Slug"
321
  msgstr ""
322
 
323
- #: ../custom-contact-forms-admin.php:156
324
- #: ../custom-contact-forms-admin.php:256
325
- #: ../custom-contact-forms-admin.php:271
326
- #: ../custom-contact-forms-admin.php:343
327
- #: ../custom-contact-forms-admin.php:358
328
- #: ../custom-contact-forms-admin.php:393
329
  msgid "Label"
330
  msgstr ""
331
 
332
- #: ../custom-contact-forms-admin.php:157
333
- #: ../custom-contact-forms-admin.php:257
334
- #: ../custom-contact-forms-admin.php:272
335
- #: ../custom-contact-forms-admin.php:344
336
  msgid "Type"
337
  msgstr ""
338
 
339
- #: ../custom-contact-forms-admin.php:158
340
- #: ../custom-contact-forms-admin.php:258
341
- #: ../custom-contact-forms-admin.php:273
342
- #: ../custom-contact-forms-admin.php:345
343
  msgid "Initial Value"
344
  msgstr ""
345
 
346
- #: ../custom-contact-forms-admin.php:159
347
- #: ../custom-contact-forms-admin.php:259
348
- #: ../custom-contact-forms-admin.php:274
349
- #: ../custom-contact-forms-admin.php:346
350
  msgid "Required"
351
  msgstr ""
352
 
353
- #: ../custom-contact-forms-admin.php:160
354
- #: ../custom-contact-forms-admin.php:260
355
- #: ../custom-contact-forms-admin.php:275
356
- #: ../custom-contact-forms-admin.php:347
357
  msgid "Maxlength"
358
  msgstr ""
359
 
360
- #: ../custom-contact-forms-admin.php:161
361
- #: ../custom-contact-forms-admin.php:261
362
- #: ../custom-contact-forms-admin.php:276
363
- #: ../custom-contact-forms-admin.php:348
364
- #: ../custom-contact-forms-admin.php:360
365
- #: ../custom-contact-forms-admin.php:395
366
- #: ../custom-contact-forms-admin.php:434
367
- #: ../custom-contact-forms-admin.php:543
368
- #: ../custom-contact-forms-admin.php:561
369
- #: ../custom-contact-forms-admin.php:613
370
  msgid "Action"
371
  msgstr ""
372
 
373
- #: ../custom-contact-forms-admin.php:195
374
- #: ../custom-contact-forms-admin.php:323
375
- #: ../custom-contact-forms-admin.php:373
376
- #: ../custom-contact-forms-admin.php:459
377
- #: ../custom-contact-forms-admin.php:977
378
  msgid "Save"
379
  msgstr ""
380
 
381
- #: ../custom-contact-forms-admin.php:196
382
- #: ../custom-contact-forms-admin.php:374
383
- #: ../custom-contact-forms-admin.php:460
384
- #: ../custom-contact-forms-admin.php:583
385
  msgid "Delete"
386
  msgstr ""
387
 
388
- #: ../custom-contact-forms-admin.php:206
389
- #: ../custom-contact-forms-admin.php:327
390
  msgid "Field Class:"
391
  msgstr ""
392
 
393
- #: ../custom-contact-forms-admin.php:208
394
  msgid "If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a \"Form Style\" other than the default, styles inherited from the \"Field Class\" might be overwritten."
395
  msgstr ""
396
 
397
- #: ../custom-contact-forms-admin.php:229
398
  msgid "Dettach Field Option"
399
  msgstr ""
400
 
401
- #: ../custom-contact-forms-admin.php:231
402
  msgid "Dettach field options you"
403
  msgstr ""
404
 
405
- #: ../custom-contact-forms-admin.php:231
406
- #: ../custom-contact-forms-admin.php:513
407
  msgid "create"
408
  msgstr ""
409
 
410
- #: ../custom-contact-forms-admin.php:240
411
  msgid "Attach Field Option"
412
  msgstr ""
413
 
414
- #: ../custom-contact-forms-admin.php:243
415
  msgid "Attach field options in the order you want them to display."
416
  msgstr ""
417
 
418
- #: ../custom-contact-forms-admin.php:291
419
- #: ../custom-contact-forms-admin.php:318
420
  msgid "None"
421
  msgstr ""
422
 
423
- #: ../custom-contact-forms-admin.php:354
424
  msgid "Manage Field Options (for Dropdown and Radio Fields)"
425
  msgstr ""
426
 
427
- #: ../custom-contact-forms-admin.php:359
428
- #: ../custom-contact-forms-admin.php:394
429
  msgid "Value"
430
  msgstr ""
431
 
432
- #: ../custom-contact-forms-admin.php:385
433
  msgid "No field options have been created."
434
  msgstr ""
435
 
436
- #: ../custom-contact-forms-admin.php:402
437
  msgid "Option Slug:"
438
  msgstr ""
439
 
440
- #: ../custom-contact-forms-admin.php:405
441
  msgid "(Used to identify this option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one')"
442
  msgstr ""
443
 
444
- #: ../custom-contact-forms-admin.php:407
445
  #: ../custom-contact-forms-usage-popover.php:183
446
  msgid "Option Label:"
447
  msgstr ""
448
 
449
- #: ../custom-contact-forms-admin.php:410
450
  msgid "(This is what is shown to the user in the dropdown or radio field. Example:)"
451
  msgstr ""
452
 
453
- #: ../custom-contact-forms-admin.php:412
454
  #: ../custom-contact-forms-usage-popover.php:188
455
  msgid "Option Value:"
456
  msgstr ""
457
 
458
- #: ../custom-contact-forms-admin.php:415
459
  msgid "(This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: \"The color green\" => \"green\" or \"Yes\" => \"1\".)"
460
  msgstr ""
461
 
462
- #: ../custom-contact-forms-admin.php:417
463
  msgid "Create Field Option"
464
  msgstr ""
465
 
466
- #: ../custom-contact-forms-admin.php:420
467
  msgid "The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually sent in the email to you. For dropdown fields the option value is optional, for radio fields it is required."
468
  msgstr ""
469
 
470
- #: ../custom-contact-forms-admin.php:429
471
  msgid "Form Display Code"
472
  msgstr ""
473
 
474
- #: ../custom-contact-forms-admin.php:431
475
- #: ../custom-contact-forms-admin.php:540
476
  msgid "Title"
477
  msgstr ""
478
 
479
- #: ../custom-contact-forms-admin.php:432
480
- #: ../custom-contact-forms-admin.php:541
481
  msgid "Button Text"
482
  msgstr ""
483
 
484
- #: ../custom-contact-forms-admin.php:433
485
- #: ../custom-contact-forms-admin.php:542
486
  msgid "Style"
487
  msgstr ""
488
 
489
- #: ../custom-contact-forms-admin.php:467
490
  msgid "Method"
491
  msgstr ""
492
 
493
- #: ../custom-contact-forms-admin.php:468
494
  msgid "Form Action"
495
  msgstr ""
496
 
497
- #: ../custom-contact-forms-admin.php:469
498
  msgid "Destination Email"
499
  msgstr ""
500
 
501
- #: ../custom-contact-forms-admin.php:470
502
  msgid "Success Message Title"
503
  msgstr ""
504
 
505
- #: ../custom-contact-forms-admin.php:471
506
  msgid "Success Message"
507
  msgstr ""
508
 
509
- #: ../custom-contact-forms-admin.php:472
510
  msgid "Custom Success URL"
511
  msgstr ""
512
 
513
- #: ../custom-contact-forms-admin.php:475
514
  msgid "The Form Method is the method by which information is transfer through your form. If you aren't an expert with HTML and PHP, leave this as Post."
515
  msgstr ""
516
 
517
- #: ../custom-contact-forms-admin.php:479
518
  msgid "This lets you process your forms through alternate scripts. If you use a service like InfusionSoft or Aweber, set this to be the same form action as the code provided to you by that service, otherwise leave this blank."
519
  msgstr ""
520
 
521
- #: ../custom-contact-forms-admin.php:481
522
  msgid "This email address will recieve form emails (provided that Email Form Submissions is set to Yes in general settings)."
523
  msgstr ""
524
 
525
- #: ../custom-contact-forms-admin.php:483
526
  msgid "This will be displayed as the header in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
527
  msgstr ""
528
 
529
- #: ../custom-contact-forms-admin.php:485
530
  msgid "This will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
531
  msgstr ""
532
 
533
- #: ../custom-contact-forms-admin.php:487
534
  msgid "If this is filled out, users will be sent to this thank you page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success."
535
  msgstr ""
536
 
537
- #: ../custom-contact-forms-admin.php:491
538
  msgid "Attached Fields:"
539
  msgstr ""
540
 
541
- #: ../custom-contact-forms-admin.php:504
542
  msgid "Dettach Field"
543
  msgstr ""
544
 
545
- #: ../custom-contact-forms-admin.php:506
546
  msgid "Attach fields in the order you want them displayed."
547
  msgstr ""
548
 
549
- #: ../custom-contact-forms-admin.php:507
550
  msgid "Attach Field:"
551
  msgstr ""
552
 
553
- #: ../custom-contact-forms-admin.php:511
554
  msgid "Attach Field"
555
  msgstr ""
556
 
557
- #: ../custom-contact-forms-admin.php:513
558
  msgid "Attach fixed fields or ones you"
559
  msgstr ""
560
 
561
- #: ../custom-contact-forms-admin.php:516
562
  msgid "The form display code above ([customcontact form=x]) will only work in Wordpress pages and posts. If you want to display this form in a theme file such as page.php, header.php, index.php, category.php, etc, then insert this PHP snippet."
563
  msgstr ""
564
 
565
- #: ../custom-contact-forms-admin.php:516
566
  msgid "Code to Display Form in Theme Files:"
567
  msgstr ""
568
 
569
- #: ../custom-contact-forms-admin.php:518
570
  msgid "This field allows you to insert HTML directly after the starting <form> tag."
571
  msgstr ""
572
 
573
- #: ../custom-contact-forms-admin.php:538
574
  msgid "Form Code"
575
  msgstr ""
576
 
577
- #: ../custom-contact-forms-admin.php:554
578
  #: ../custom-contact-forms-usage-popover.php:307
579
  msgid "Saved Form Submissions"
580
  msgstr ""
581
 
582
- #: ../custom-contact-forms-admin.php:558
583
- #: ../custom-contact-forms-admin.php:610
584
  msgid "Date Submitted"
585
  msgstr ""
586
 
587
- #: ../custom-contact-forms-admin.php:559
588
- #: ../custom-contact-forms-admin.php:611
589
  msgid "Form Submitted"
590
  msgstr ""
591
 
592
- #: ../custom-contact-forms-admin.php:560
593
- #: ../custom-contact-forms-admin.php:612
594
  msgid "Form Page"
595
  msgstr ""
596
 
597
- #: ../custom-contact-forms-admin.php:577
598
  msgid "Custom HTML Form"
599
  msgstr ""
600
 
601
- #: ../custom-contact-forms-admin.php:624
602
  msgid "Email Form Submissions:"
603
  msgstr ""
604
 
605
- #: ../custom-contact-forms-admin.php:630
606
  msgid "When a user fills out one of your forms, the info he submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info."
607
  msgstr ""
608
 
609
- #: ../custom-contact-forms-admin.php:632
610
  msgid "Default Email:"
611
  msgstr ""
612
 
613
- #: ../custom-contact-forms-admin.php:635
614
  msgid "Form emails will be sent <span>to</span> this address, if no destination email is specified by the form."
615
  msgstr ""
616
 
617
- #: ../custom-contact-forms-admin.php:637
618
  msgid "Front End JQuery:"
619
  msgstr ""
620
 
621
- #: ../custom-contact-forms-admin.php:639
622
- #: ../custom-contact-forms-admin.php:675
623
- #: ../custom-contact-forms-admin.php:698
624
  msgid "Enabled"
625
  msgstr ""
626
 
627
- #: ../custom-contact-forms-admin.php:640
628
- #: ../custom-contact-forms-admin.php:676
629
- #: ../custom-contact-forms-admin.php:699
630
  msgid "Disabled"
631
  msgstr ""
632
 
633
- #: ../custom-contact-forms-admin.php:643
634
  #, php-format
635
  msgid "Some plugins don't setup JQuery correctly, so when any other plugin uses JQuery (whether correctly or not), JQuery works for neither plugin. This plugin uses JQuery correctly. If another plugin isn't using JQuery correctly but is more important to you than this one: disable this option. 99% of this plugin's functionality will work without JQuery, just no field instruction tooltips."
636
  msgstr ""
637
 
638
- #: ../custom-contact-forms-admin.php:645
639
  msgid "Default From Email:"
640
  msgstr ""
641
 
642
- #: ../custom-contact-forms-admin.php:648
643
  msgid "Form emails will be sent <span>from</span> this address. It is recommended you provide a real email address that has been created through your host."
644
  msgstr ""
645
 
646
- #: ../custom-contact-forms-admin.php:650
647
  msgid "Default Email Subject:"
648
  msgstr ""
649
 
650
- #: ../custom-contact-forms-admin.php:653
651
  msgid "Default subject to be included in all form emails."
652
  msgstr ""
653
 
654
- #: ../custom-contact-forms-admin.php:655
655
  msgid "Default Form Success Message Title:"
656
  msgstr ""
657
 
658
- #: ../custom-contact-forms-admin.php:658
659
  msgid "If someone fills out a form for which a success message title is not provided and a custom success page is not provided, the plugin will show a popover using this field as the window title."
660
  msgstr ""
661
 
662
- #: ../custom-contact-forms-admin.php:660
663
  msgid "Default Form Success Message:"
664
  msgstr ""
665
 
666
- #: ../custom-contact-forms-admin.php:663
667
  msgid "If someone fills out a form for which a success message is not provided and a custom success page is not provided, the plugin will show a popover containing this message."
668
  msgstr ""
669
 
670
- #: ../custom-contact-forms-admin.php:665
671
  msgid "Remember Field Values:"
672
  msgstr ""
673
 
674
- #: ../custom-contact-forms-admin.php:671
675
  msgid "Selecting yes will make form fields remember how they were last filled out."
676
  msgstr ""
677
 
678
- #: ../custom-contact-forms-admin.php:673
679
  msgid "Tooltips in Widget:"
680
  msgstr ""
681
 
682
- #: ../custom-contact-forms-admin.php:679
683
  msgid "Enabling this shows tooltips containing field instructions on forms in the widget."
684
  msgstr ""
685
 
686
- #: ../custom-contact-forms-admin.php:681
687
  msgid "Hide Plugin Author Link in Code:"
688
  msgstr ""
689
 
690
- #: ../custom-contact-forms-admin.php:688
691
  msgid "Use Code Type:"
692
  msgstr ""
693
 
694
- #: ../custom-contact-forms-admin.php:694
695
  msgid "This lets you switch the form code between HTML and XHTML."
696
  msgstr ""
697
 
698
- #: ../custom-contact-forms-admin.php:696
699
  msgid "Fancy Admin AJAX Abilities:"
700
  msgstr ""
701
 
702
- #: ../custom-contact-forms-admin.php:702
703
  msgid "If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below."
704
  msgstr ""
705
 
706
- #: ../custom-contact-forms-admin.php:704
707
  msgid "Use Wordpress Mail Function:"
708
  msgstr ""
709
 
710
- #: ../custom-contact-forms-admin.php:710
711
  msgid "Setting this to no will use the PHP mail function. If your forms aren't sending mail properly try setting this to no."
712
  msgstr ""
713
 
714
- #: ../custom-contact-forms-admin.php:711
715
  msgid "Show Sidebar Widget:"
716
  msgstr ""
717
 
718
- #: ../custom-contact-forms-admin.php:715
719
  msgid "On Homepage"
720
  msgstr ""
721
 
722
- #: ../custom-contact-forms-admin.php:718
723
  msgid "On Pages"
724
  msgstr ""
725
 
726
- #: ../custom-contact-forms-admin.php:721
727
  msgid "On Single Posts"
728
  msgstr ""
729
 
730
- #: ../custom-contact-forms-admin.php:725
731
  msgid "On Categories"
732
  msgstr ""
733
 
734
- #: ../custom-contact-forms-admin.php:728
735
  msgid "On Archives"
736
  msgstr ""
737
 
738
- #: ../custom-contact-forms-admin.php:731
739
  msgid "Update"
740
  msgstr ""
741
 
742
- #: ../custom-contact-forms-admin.php:739
743
  msgid "Instructions"
744
  msgstr ""
745
 
746
- #: ../custom-contact-forms-admin.php:741
747
  msgid "The default content will help you get a better feel of ways this plugin can be used and is the best way to learn."
748
  msgstr ""
749
 
750
- #: ../custom-contact-forms-admin.php:744
751
  #: ../custom-contact-forms-usage-popover.php:41
752
  msgid "Insert Default Content"
753
  msgstr ""
754
 
755
- #: ../custom-contact-forms-admin.php:747
756
  msgid "1. Create a form."
757
  msgstr ""
758
 
759
- #: ../custom-contact-forms-admin.php:748
760
  msgid "2. Create fields and attach those fields to the forms of your choice."
761
  msgstr ""
762
 
763
- #: ../custom-contact-forms-admin.php:748
764
  msgid "Attach the fields in the order that you want them to show up in the form. If you mess up you can detach and reattach them. Create field options in the field option manager; field options should be attached to radio and dropdown fields."
765
  msgstr ""
766
 
767
- #: ../custom-contact-forms-admin.php:749
768
  msgid "3. Display those forms in posts and pages by inserting the code: [customcontact form=<b>FORMID</b>]. Replace <b>FORMID</b> with the id listed to the left of the form slug next to the form of your choice above. You can also display forms in theme files; the code for this is provided within each forms admin section."
769
  msgstr ""
770
 
771
- #: ../custom-contact-forms-admin.php:750
772
  msgid "4. Prevent spam by attaching the fixed field, captcha or ishuman. Captcha requires users to type in a number shown on an image. Ishuman requires users to check a box to prove they aren't a spam bot."
773
  msgstr ""
774
 
775
- #: ../custom-contact-forms-admin.php:751
776
  msgid "5. Add a form to your sidebar, by dragging the Custom Contact Form widget in to your sidebar."
777
  msgstr ""
778
 
779
- #: ../custom-contact-forms-admin.php:752
780
  msgid "6. Configure the General Settings appropriately; this is important if you want to receive your web form messages!"
781
  msgstr ""
782
 
783
- #: ../custom-contact-forms-admin.php:753
784
  msgid "7. Create form styles to change your forms appearances. The image below explains how each style field can change the look of your forms."
785
  msgstr ""
786
 
787
- #: ../custom-contact-forms-admin.php:754
788
  msgid "8. (advanced) If you are confident in your HTML and CSS skills, you can use the"
789
  msgstr ""
790
 
791
- #: ../custom-contact-forms-admin.php:754
792
  msgid "Custom HTML Forms feature"
793
  msgstr ""
794
 
795
- #: ../custom-contact-forms-admin.php:754
796
  msgid "as a framework and write your forms from scratch. This allows you to use this plugin simply to process your form requests. The Custom HTML Forms feature will process and email any form variables sent to it regardless of whether they are created in the fields manager."
797
  msgstr ""
798
 
799
- #: ../custom-contact-forms-admin.php:755
800
  msgid "These instructions briefly tell you in which order you should use forms, fields, field options, and styles."
801
  msgstr ""
802
 
803
- #: ../custom-contact-forms-admin.php:755
804
  msgid "If you want to read in detail about using forms, fields, field options, styles and the rest of this plugin, click the button below."
805
  msgstr ""
806
 
807
- #: ../custom-contact-forms-admin.php:757
808
  msgid "View Plugin Usage Popover"
809
  msgstr ""
810
 
811
- #: ../custom-contact-forms-admin.php:765
812
  msgid "Create A Style for Your Forms"
813
  msgstr ""
814
 
815
- #: ../custom-contact-forms-admin.php:767
816
  msgid "Use this manager to create styles for your forms. Each field is already filled out with nice look defaults. It is recommended you simply input a slug and click create to see the defaults before you start changing values."
817
  msgstr ""
818
 
819
- #: ../custom-contact-forms-admin.php:771
820
  msgid "Style Slug:"
821
  msgstr ""
822
 
823
- #: ../custom-contact-forms-admin.php:773
824
  msgid "(Must be unique)"
825
  msgstr ""
826
 
827
- #: ../custom-contact-forms-admin.php:775
828
- #: ../custom-contact-forms-admin.php:1020
829
- #: ../custom-contact-forms-admin.php:1025
830
  msgid "Title Font Size:"
831
  msgstr ""
832
 
833
- #: ../custom-contact-forms-admin.php:777
834
  msgid "(ex: 10pt, 10px, 1em)"
835
  msgstr ""
836
 
837
- #: ../custom-contact-forms-admin.php:779
838
- #: ../custom-contact-forms-admin.php:1047
839
- #: ../custom-contact-forms-admin.php:1089
840
  msgid "Title Font Color:"
841
  msgstr ""
842
 
843
- #: ../custom-contact-forms-admin.php:781
844
- #: ../custom-contact-forms-admin.php:793
845
- #: ../custom-contact-forms-admin.php:831
846
- #: ../custom-contact-forms-admin.php:891
847
- #: ../custom-contact-forms-admin.php:895
848
- #: ../custom-contact-forms-admin.php:911
849
  msgid "(ex: FF0000)"
850
  msgstr ""
851
 
852
- #: ../custom-contact-forms-admin.php:783
853
- #: ../custom-contact-forms-admin.php:1004
854
  msgid "Label Width:"
855
  msgstr ""
856
 
857
- #: ../custom-contact-forms-admin.php:785
858
  msgid "(ex: 100px or 20%)"
859
  msgstr ""
860
 
861
- #: ../custom-contact-forms-admin.php:787
862
- #: ../custom-contact-forms-admin.php:1028
863
  msgid "Label Font Size:"
864
  msgstr ""
865
 
866
- #: ../custom-contact-forms-admin.php:789
867
- #: ../custom-contact-forms-admin.php:887
868
  msgid "(ex: 10px, 10pt, 1em)"
869
  msgstr ""
870
 
871
- #: ../custom-contact-forms-admin.php:791
872
- #: ../custom-contact-forms-admin.php:1050
873
  msgid "Label Font Color:"
874
  msgstr ""
875
 
876
- #: ../custom-contact-forms-admin.php:795
877
- #: ../custom-contact-forms-admin.php:984
878
  msgid "Text Field Width:"
879
  msgstr ""
880
 
881
- #: ../custom-contact-forms-admin.php:797
882
- #: ../custom-contact-forms-admin.php:801
883
- #: ../custom-contact-forms-admin.php:805
884
- #: ../custom-contact-forms-admin.php:853
885
  msgid "(ex: 100px or 100%)"
886
  msgstr ""
887
 
888
- #: ../custom-contact-forms-admin.php:799
889
  msgid "Textarea Field Width:"
890
  msgstr ""
891
 
892
- #: ../custom-contact-forms-admin.php:803
893
  msgid "Textarea Field Height:"
894
  msgstr ""
895
 
896
- #: ../custom-contact-forms-admin.php:807
897
- #: ../custom-contact-forms-admin.php:1031
898
  msgid "Field Font Size:"
899
  msgstr ""
900
 
901
- #: ../custom-contact-forms-admin.php:809
902
  msgid "(ex: 10px, 10pt, 1em"
903
  msgstr ""
904
 
905
- #: ../custom-contact-forms-admin.php:811
906
- #: ../custom-contact-forms-admin.php:1053
907
  msgid "Field Font Color:"
908
  msgstr ""
909
 
910
- #: ../custom-contact-forms-admin.php:813
911
- #: ../custom-contact-forms-admin.php:835
912
  msgid "(ex: 333333)"
913
  msgstr ""
914
 
915
- #: ../custom-contact-forms-admin.php:815
916
- #: ../custom-contact-forms-admin.php:1083
917
  msgid "Field Border Style:"
918
  msgstr ""
919
 
920
- #: ../custom-contact-forms-admin.php:821
921
- #: ../custom-contact-forms-admin.php:1059
922
  msgid "Form Margin:"
923
  msgstr ""
924
 
925
- #: ../custom-contact-forms-admin.php:823
926
- #: ../custom-contact-forms-admin.php:827
927
- #: ../custom-contact-forms-admin.php:899
928
- #: ../custom-contact-forms-admin.php:903
929
  msgid "(ex: 5px or 1em)"
930
  msgstr ""
931
 
932
- #: ../custom-contact-forms-admin.php:825
933
- #: ../custom-contact-forms-admin.php:996
934
  msgid "Label Margin:"
935
  msgstr ""
936
 
937
- #: ../custom-contact-forms-admin.php:829
938
  msgid "Textarea Background Color:"
939
  msgstr ""
940
 
941
- #: ../custom-contact-forms-admin.php:833
942
  msgid "Success Popover Font Color:"
943
  msgstr ""
944
 
945
- #: ../custom-contact-forms-admin.php:837
946
  msgid "Success Popover Title Font Size:"
947
  msgstr ""
948
 
949
- #: ../custom-contact-forms-admin.php:839
950
- #: ../custom-contact-forms-admin.php:843
951
- #: ../custom-contact-forms-admin.php:915
952
- #: ../custom-contact-forms-admin.php:927
953
  msgid "(ex: 12px, 1em, 100%)"
954
  msgstr ""
955
 
956
- #: ../custom-contact-forms-admin.php:841
957
- #: ../custom-contact-forms-admin.php:1022
958
  msgid "Form Background Color:"
959
  msgstr ""
960
 
961
- #: ../custom-contact-forms-admin.php:845
962
  msgid "Tooltip Background Color:"
963
  msgstr ""
964
 
965
- #: ../custom-contact-forms-admin.php:847
966
  msgid "(ex: 000000 or black)"
967
  msgstr ""
968
 
969
- #: ../custom-contact-forms-admin.php:851
970
- #: ../custom-contact-forms-admin.php:1080
971
  msgid "Field Border Color:"
972
  msgstr ""
973
 
974
- #: ../custom-contact-forms-admin.php:855
975
- #: ../custom-contact-forms-admin.php:1069
976
  msgid "Form Border Style:"
977
  msgstr ""
978
 
979
- #: ../custom-contact-forms-admin.php:861
980
- #: ../custom-contact-forms-admin.php:1077
981
  msgid "Form Border Color:"
982
  msgstr ""
983
 
984
- #: ../custom-contact-forms-admin.php:863
985
  msgid "(ex: 000000)"
986
  msgstr ""
987
 
988
- #: ../custom-contact-forms-admin.php:865
989
- #: ../custom-contact-forms-admin.php:1074
990
  msgid "Form Border Width:"
991
  msgstr ""
992
 
993
- #: ../custom-contact-forms-admin.php:867
994
  msgid "(ex: 1px)"
995
  msgstr ""
996
 
997
- #: ../custom-contact-forms-admin.php:869
998
- #: ../custom-contact-forms-admin.php:981
999
  msgid "Form Width:"
1000
  msgstr ""
1001
 
1002
- #: ../custom-contact-forms-admin.php:871
1003
  msgid "(ex: 100px or 50%)"
1004
  msgstr ""
1005
 
1006
- #: ../custom-contact-forms-admin.php:873
1007
  msgid "Form Font Family:"
1008
  msgstr ""
1009
 
1010
- #: ../custom-contact-forms-admin.php:875
1011
  msgid "(ex: Verdana, Tahoma, Arial)"
1012
  msgstr ""
1013
 
1014
- #: ../custom-contact-forms-admin.php:877
1015
- #: ../custom-contact-forms-admin.php:1007
1016
  msgid "Button Width:"
1017
  msgstr ""
1018
 
1019
- #: ../custom-contact-forms-admin.php:879
1020
  msgid "(ex: 100px, 30%, auto)"
1021
  msgstr ""
1022
 
1023
- #: ../custom-contact-forms-admin.php:881
1024
- #: ../custom-contact-forms-admin.php:1010
1025
  msgid "Button Height:"
1026
  msgstr ""
1027
 
1028
- #: ../custom-contact-forms-admin.php:883
1029
  msgid "(ex: 100px or 30%)"
1030
  msgstr ""
1031
 
1032
- #: ../custom-contact-forms-admin.php:885
1033
- #: ../custom-contact-forms-admin.php:1034
1034
  msgid "Button Font Size:"
1035
  msgstr ""
1036
 
1037
- #: ../custom-contact-forms-admin.php:889
1038
- #: ../custom-contact-forms-admin.php:1056
1039
  msgid "Button Font Color:"
1040
  msgstr ""
1041
 
1042
- #: ../custom-contact-forms-admin.php:893
1043
- #: ../custom-contact-forms-admin.php:1013
1044
  msgid "Field Background Color:"
1045
  msgstr ""
1046
 
1047
- #: ../custom-contact-forms-admin.php:897
1048
- #: ../custom-contact-forms-admin.php:1037
1049
  msgid "Form Padding:"
1050
  msgstr ""
1051
 
1052
- #: ../custom-contact-forms-admin.php:901
1053
- #: ../custom-contact-forms-admin.php:1016
1054
  msgid "Title Margin:"
1055
  msgstr ""
1056
 
1057
- #: ../custom-contact-forms-admin.php:905
1058
- #: ../custom-contact-forms-admin.php:993
1059
  msgid "Dropdown Width:"
1060
  msgstr ""
1061
 
1062
- #: ../custom-contact-forms-admin.php:907
1063
  msgid "(ex: 30px, 20%, or auto)"
1064
  msgstr ""
1065
 
1066
- #: ../custom-contact-forms-admin.php:909
1067
  msgid "Success Popover Border Color:"
1068
  msgstr ""
1069
 
1070
- #: ../custom-contact-forms-admin.php:913
1071
  msgid "Success Popover Font Size:"
1072
  msgstr ""
1073
 
1074
- #: ../custom-contact-forms-admin.php:917
1075
  msgid "Success Popover Height:"
1076
  msgstr ""
1077
 
1078
- #: ../custom-contact-forms-admin.php:919
1079
  msgid "(ex: 200px, 6em, 50%)"
1080
  msgstr ""
1081
 
1082
- #: ../custom-contact-forms-admin.php:921
1083
- #: ../custom-contact-forms-admin.php:1092
1084
  msgid "Field Border Roundness:"
1085
  msgstr ""
1086
 
1087
- #: ../custom-contact-forms-admin.php:923
1088
  msgid "(ex: 6px, or 0px)"
1089
  msgstr ""
1090
 
1091
- #: ../custom-contact-forms-admin.php:925
1092
- #: ../custom-contact-forms-admin.php:974
1093
- #: ../custom-contact-forms-admin.php:1044
1094
  msgid "Tooltip"
1095
  msgstr ""
1096
 
1097
- #: ../custom-contact-forms-admin.php:925
1098
- #: ../custom-contact-forms-admin.php:974
1099
- #: ../custom-contact-forms-admin.php:1044
1100
  msgid "A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field."
1101
  msgstr ""
1102
 
1103
- #: ../custom-contact-forms-admin.php:925
1104
- #: ../custom-contact-forms-admin.php:1041
1105
  msgid "Font Size:"
1106
  msgstr ""
1107
 
1108
- #: ../custom-contact-forms-admin.php:929
1109
  msgid "Tooltip Font Color:"
1110
  msgstr ""
1111
 
1112
- #: ../custom-contact-forms-admin.php:931
1113
  msgid "(ex: ffffff or white)"
1114
  msgstr ""
1115
 
1116
- #: ../custom-contact-forms-admin.php:933
1117
  msgid "Create Style"
1118
  msgstr ""
1119
 
1120
- #: ../custom-contact-forms-admin.php:940
1121
  msgid "Manage Form Styles"
1122
  msgstr ""
1123
 
1124
- #: ../custom-contact-forms-admin.php:960
1125
  #: ../custom-contact-forms-usage-popover.php:125
1126
  #: ../custom-contact-forms-usage-popover.php:178
1127
  #: ../custom-contact-forms-usage-popover.php:206
1128
  msgid "Slug:"
1129
  msgstr ""
1130
 
1131
- #: ../custom-contact-forms-admin.php:963
1132
  msgid "Font Family:"
1133
  msgstr ""
1134
 
1135
- #: ../custom-contact-forms-admin.php:966
1136
  msgid "Textarea Background"
1137
  msgstr ""
1138
 
1139
- #: ../custom-contact-forms-admin.php:967
1140
  msgid "Color:"
1141
  msgstr ""
1142
 
1143
- #: ../custom-contact-forms-admin.php:970
1144
- #: ../custom-contact-forms-admin.php:999
1145
- #: ../custom-contact-forms-admin.php:1019
1146
- #: ../custom-contact-forms-admin.php:1040
1147
- #: ../custom-contact-forms-admin.php:1062
1148
- #: ../custom-contact-forms-admin.php:1088
1149
  msgid "Success Popover"
1150
  msgstr ""
1151
 
1152
- #: ../custom-contact-forms-admin.php:971
1153
  msgid "Border Color:"
1154
  msgstr ""
1155
 
1156
- #: ../custom-contact-forms-admin.php:974
1157
- #: ../custom-contact-forms-admin.php:1063
1158
  msgid "Font Color:"
1159
  msgstr ""
1160
 
1161
- #: ../custom-contact-forms-admin.php:979
1162
  msgid "Delete Style"
1163
  msgstr ""
1164
 
1165
- #: ../custom-contact-forms-admin.php:987
1166
  msgid "Textarea Width:"
1167
  msgstr ""
1168
 
1169
- #: ../custom-contact-forms-admin.php:990
1170
  msgid "Textarea Height:"
1171
  msgstr ""
1172
 
1173
- #: ../custom-contact-forms-admin.php:1000
1174
  msgid "Height:"
1175
  msgstr ""
1176
 
1177
- #: ../custom-contact-forms-admin.php:1044
1178
  msgid "Background Color:"
1179
  msgstr ""
1180
 
1181
- #: ../custom-contact-forms-admin.php:1066
1182
  msgid "Tooltip Font Size:"
1183
  msgstr ""
1184
 
1185
- #: ../custom-contact-forms-admin.php:1118
1186
  msgid "Report a Bug/Suggest a Feature"
1187
  msgstr ""
1188
 
1189
- #: ../custom-contact-forms-admin.php:1123
1190
  msgid "Your Name:"
1191
  msgstr ""
1192
 
1193
- #: ../custom-contact-forms-admin.php:1127
1194
  msgid "Your Email:"
1195
  msgstr ""
1196
 
1197
- #: ../custom-contact-forms-admin.php:1131
1198
  msgid "Your Message:"
1199
  msgstr ""
1200
 
1201
- #: ../custom-contact-forms-admin.php:1135
1202
  msgid "Purpose of this message:"
1203
  msgstr ""
1204
 
1205
- #: ../custom-contact-forms-admin.php:1139
1206
  msgid "Plugin Question"
1207
  msgstr ""
1208
 
1209
- #: ../custom-contact-forms-admin.php:1144
1210
  msgid "Send Message"
1211
  msgstr ""
1212
 
1213
- #: ../custom-contact-forms-admin.php:1151
1214
  msgid "Custom HTML Forms (Advanced)"
1215
  msgstr ""
1216
 
1217
- #: ../custom-contact-forms-admin.php:1153
1218
  msgid ""
1219
  "If you know HTML and simply want to use this plugin to process form requests, this feature is for you. \n"
1220
- " The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following: a) Keep the form action/method the same (yes the action is supposed to be empty), b) Include all the hidden fields shown below, c) provide a \n"
1221
- " hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately."
1222
  msgstr ""
1223
 
1224
- #: ../custom-contact-forms-admin.php:1159
1225
  msgid "Thank you for filling out our form!"
1226
  msgstr ""
1227
 
1228
- #: ../custom-contact-forms-admin.php:1164
1229
  msgid ""
1230
  "Build your form in here. It is recommended you only use this feature if you are experienced with HTML. \n"
1231
- "The success_message field will add a popover containing the message when the form is completed successfully, the thank_you_page field will force \n"
1232
- "the user to be redirected to that specific page on successful form completion. The required_fields hidden field is optional; to use it seperate \n"
1233
- "the field names you want required by commas. Remember to use underscores instead of spaces in field names!"
1234
  msgstr ""
1235
 
1236
- #: ../custom-contact-forms-admin.php:1174
1237
- #: ../custom-contact-forms-usage-popover.php:315
1238
- msgid "Import / Export"
1239
  msgstr ""
1240
 
1241
- #: ../custom-contact-forms-admin.php:1179
1242
  msgid ""
1243
  "Preforming a Custom Contact Forms export will create a file of the form \n"
1244
- " ccf-export-xxxx.sql on your web server. The file created contains SQL that \n"
1245
- " will recreate all the plugin data on any Wordpress installation. After Custom Contact Forms creates the export file, you will be prompted to download it. You can use this file as a backup in case your Wordpress database gets ruined."
1246
  msgstr ""
1247
 
1248
- #: ../custom-contact-forms-admin.php:1182
1249
  msgid "Export All CCF Plugin Content"
1250
  msgstr ""
1251
 
1252
- #: ../custom-contact-forms-admin.php:1185
 
 
 
 
1253
  msgid "Browse to a CCF .sql export file to import Custom Contact Form data from another Wordpress installation to this one. Pressing the 'Clear and Import' button deletes all current data and then imports the selected file; this will not work for merging to data!. Clearing all CCF data before importing prevents any conflicts from occuring. Before you attempt an import, you should always download a backup, by clicking the 'Export All' button."
1254
  msgstr ""
1255
 
1256
- #: ../custom-contact-forms-admin.php:1186
1257
  msgid "Choose What You Want to Use from the Import File:"
1258
  msgstr ""
1259
 
1260
- #: ../custom-contact-forms-admin.php:1190
1261
  msgid "Use General Settings"
1262
  msgstr ""
1263
 
1264
- #: ../custom-contact-forms-admin.php:1194
1265
- #: ../custom-contact-forms-admin.php:1206
1266
  #: ../custom-contact-forms-usage-popover.php:8
1267
  #: ../custom-contact-forms-usage-popover.php:199
1268
  msgid "Forms"
1269
  msgstr ""
1270
 
1271
- #: ../custom-contact-forms-admin.php:1198
1272
  #: ../custom-contact-forms-usage-popover.php:26
1273
  msgid "Form Submissions"
1274
  msgstr ""
1275
 
1276
- #: ../custom-contact-forms-admin.php:1202
1277
  #: ../custom-contact-forms-usage-popover.php:11
1278
  #: ../custom-contact-forms-usage-popover.php:49
1279
  msgid "Fields"
1280
  msgstr ""
1281
 
1282
- #: ../custom-contact-forms-admin.php:1210
1283
  #: ../custom-contact-forms-usage-popover.php:14
1284
  #: ../custom-contact-forms-usage-popover.php:171
1285
  msgid "Field Options"
1286
  msgstr ""
1287
 
1288
- #: ../custom-contact-forms-admin.php:1214
1289
  #: ../custom-contact-forms-usage-popover.php:17
1290
  msgid "Styles"
1291
  msgstr ""
1292
 
1293
- #: ../custom-contact-forms-admin.php:1217
1294
  msgid "Choose an Import File:"
1295
  msgstr ""
1296
 
1297
- #: ../custom-contact-forms-admin.php:1218
1298
  msgid "Clear and Import"
1299
  msgstr ""
1300
 
1301
- #: ../custom-contact-forms-admin.php:1219
1302
- msgid "Merge Import"
1303
- msgstr ""
1304
-
1305
- #: ../custom-contact-forms-admin.php:1220
1306
  msgid "Yes, I want to do this and have created a backup."
1307
  msgstr ""
1308
 
1309
- #: ../custom-contact-forms-admin.php:1227
1310
  msgid "Custom Contact Forms Plugin News"
1311
  msgstr ""
1312
 
@@ -1581,6 +1612,10 @@ msgstr ""
1581
  msgid "This features saves each user form submission. All the fields attached to the form along with the time of submission and form URL are saved in the database and displayed in a stylish format in the admin panel."
1582
  msgstr ""
1583
 
 
 
 
 
1584
  #: ../custom-contact-forms-usage-popover.php:318
1585
  msgid ""
1586
  "Import/export is a new feature that allows you to transfer forms, fields, field options, styles and everything else saved by the plugin between Wordpress installations. Clicking the Export All button will create a .SQL file for download. With the .SQL export file you can use the importer within the CCF plugin admin page to import the .SQL file. The built-in importer is completely safe as long as you only import files that have been generated by the CCF exporter. \n"
@@ -1597,35 +1632,3 @@ msgstr ""
1597
  msgid "Create a Form"
1598
  msgstr ""
1599
 
1600
- #: ../custom-contact-forms.php:130
1601
- msgid "Attaching"
1602
- msgstr ""
1603
-
1604
- #: ../custom-contact-forms.php:131
1605
- msgid "Dettaching"
1606
- msgstr ""
1607
-
1608
- #: ../custom-contact-forms.php:132
1609
- msgid "Saving"
1610
- msgstr ""
1611
-
1612
- #: ../custom-contact-forms.php:133
1613
- msgid "More Options"
1614
- msgstr ""
1615
-
1616
- #: ../custom-contact-forms.php:134
1617
- msgid "Expand"
1618
- msgstr ""
1619
-
1620
- #: ../custom-contact-forms.php:135
1621
- msgid "Click to Confirm"
1622
- msgstr ""
1623
-
1624
- #: ../custom-contact-forms.php:136
1625
- msgid "Are you sure you want to delete this"
1626
- msgstr ""
1627
-
1628
- #: ../custom-contact-forms.php:137
1629
- msgid "An error has occured. Please try again later."
1630
- msgstr ""
1631
-
2
  msgstr ""
3
  "Project-Id-Version: custom-contact-forms\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-10-30 13:13-0500\n"
6
+ "PO-Revision-Date: 2010-10-30 13:14-0500\n"
7
  "Last-Translator: Taylor Lovett <sdfds@sfs.com>\n"
8
  "Language-Team: TaylorLovett.com <admin@taylorlovett.com>\n"
9
  "MIME-Version: 1.0\n"
15
  "X-Poedit-Country: UNITED STATES\n"
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
+ #: ../custom-contact-forms-admin.php:138
19
+ msgid "Attaching"
20
+ msgstr ""
21
+
22
+ #: ../custom-contact-forms-admin.php:139
23
+ msgid "Dettaching"
24
+ msgstr ""
25
+
26
+ #: ../custom-contact-forms-admin.php:140
27
+ msgid "Saving"
28
+ msgstr ""
29
+
30
+ #: ../custom-contact-forms-admin.php:141
31
+ msgid "More Options"
32
+ msgstr ""
33
+
34
+ #: ../custom-contact-forms-admin.php:142
35
+ msgid "Expand"
36
+ msgstr ""
37
+
38
+ #: ../custom-contact-forms-admin.php:143
39
+ msgid "Click to Confirm"
40
+ msgstr ""
41
+
42
+ #: ../custom-contact-forms-admin.php:144
43
+ msgid "Are you sure you want to delete this"
44
+ msgstr ""
45
+
46
+ #: ../custom-contact-forms-admin.php:145
47
+ msgid "An error has occured. Please try again later."
48
+ msgstr ""
49
+
50
+ #: ../custom-contact-forms-admin.php:318
51
  msgid "Custom Contact Forms"
52
  msgstr ""
53
 
54
+ #: ../custom-contact-forms-admin.php:322
55
  msgid "Plugin Instructions"
56
  msgstr ""
57
 
58
+ #: ../custom-contact-forms-admin.php:325
59
+ #: ../custom-contact-forms-admin.php:1113
60
  msgid "General Settings"
61
  msgstr ""
62
 
63
+ #: ../custom-contact-forms-admin.php:328
64
  msgid "Create Fields"
65
  msgstr ""
66
 
67
+ #: ../custom-contact-forms-admin.php:331
68
  msgid "Create Forms"
69
  msgstr ""
70
 
71
+ #: ../custom-contact-forms-admin.php:334
72
  msgid "Manage Fields"
73
  msgstr ""
74
 
75
+ #: ../custom-contact-forms-admin.php:337
76
+ #: ../custom-contact-forms-admin.php:697
77
  msgid "Manage Fixed Fields"
78
  msgstr ""
79
 
80
+ #: ../custom-contact-forms-admin.php:340
81
+ #: ../custom-contact-forms-admin.php:897
82
  msgid "Manage Forms"
83
  msgstr ""
84
 
85
+ #: ../custom-contact-forms-admin.php:343
86
  msgid "Saved Form Submissions (New!)"
87
  msgstr ""
88
 
89
+ #: ../custom-contact-forms-admin.php:346
90
  msgid "Create Styles"
91
  msgstr ""
92
 
93
+ #: ../custom-contact-forms-admin.php:349
94
  msgid "Manage Styles"
95
  msgstr ""
96
 
97
+ #: ../custom-contact-forms-admin.php:352
98
  msgid "Manage Field Options"
99
  msgstr ""
100
 
101
+ #: ../custom-contact-forms-admin.php:355
102
+ #: ../custom-contact-forms-admin.php:1975
103
  msgid "Suggest a Feature"
104
  msgstr ""
105
 
106
+ #: ../custom-contact-forms-admin.php:358
107
+ #: ../custom-contact-forms-admin.php:1972
108
  msgid "Bug Report"
109
  msgstr ""
110
 
111
+ #: ../custom-contact-forms-admin.php:361
112
  #: ../custom-contact-forms-usage-popover.php:20
113
  msgid "Custom HTML Forms"
114
  msgstr ""
115
 
116
+ #: ../custom-contact-forms-admin.php:364
117
  msgid "Import / Export (New!)"
118
  msgstr ""
119
 
120
+ #: ../custom-contact-forms-admin.php:367
121
  msgid "Plugin News"
122
  msgstr ""
123
 
124
+ #: ../custom-contact-forms-admin.php:370
125
  msgid "Rate This Plugin"
126
  msgstr ""
127
 
128
+ #: ../custom-contact-forms-admin.php:371
129
  msgid "We need your help to continue development! Please <span>rate this plugin</span> to show your support."
130
  msgstr ""
131
 
132
+ #: ../custom-contact-forms-admin.php:375
133
  msgid "Create A Form Field"
134
  msgstr ""
135
 
136
+ #: ../custom-contact-forms-admin.php:382
137
  msgid "Slug (Name):"
138
  msgstr ""
139
 
140
+ #: ../custom-contact-forms-admin.php:386
141
  msgid "(A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.)"
142
  msgstr ""
143
 
144
+ #: ../custom-contact-forms-admin.php:390
145
  #: ../custom-contact-forms-usage-popover.php:130
146
  msgid "Field Label:"
147
  msgstr ""
148
 
149
+ #: ../custom-contact-forms-admin.php:394
150
  msgid "(The field label is displayed next to the field and is visible to the user.)"
151
  msgstr ""
152
 
153
+ #: ../custom-contact-forms-admin.php:398
154
  #: ../custom-contact-forms-usage-popover.php:135
155
  msgid "Field Type:"
156
  msgstr ""
157
 
158
+ #: ../custom-contact-forms-admin.php:411
159
  #: ../custom-contact-forms-usage-popover.php:140
160
  msgid "Initial Value:"
161
  msgstr ""
162
 
163
+ #: ../custom-contact-forms-admin.php:416
164
  msgid ""
165
  "This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox \n"
166
+ "\t\t\t\t\t\t'Are you human?', I would set the initial value to 'Yes'."
167
  msgstr ""
168
 
169
+ #: ../custom-contact-forms-admin.php:418
170
  msgid "If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the"
171
  msgstr ""
172
 
173
+ #: ../custom-contact-forms-admin.php:419
174
+ #: ../custom-contact-forms-admin.php:858
175
  msgid "Create a Field Option"
176
  msgstr ""
177
 
178
+ #: ../custom-contact-forms-admin.php:420
179
  msgid "field option"
180
  msgstr ""
181
 
182
+ #: ../custom-contact-forms-admin.php:422
183
  msgid "you would like initially selected."
184
  msgstr ""
185
 
186
+ #: ../custom-contact-forms-admin.php:426
187
  #: ../custom-contact-forms-usage-popover.php:145
188
  msgid "Max Length:"
189
  msgstr ""
190
 
191
+ #: ../custom-contact-forms-admin.php:430
192
  msgid "(0 for no limit; only applies to Text fields)"
193
  msgstr ""
194
 
195
+ #: ../custom-contact-forms-admin.php:434
196
  #: ../custom-contact-forms-usage-popover.php:150
197
  msgid "Required Field:"
198
  msgstr ""
199
 
200
+ #: ../custom-contact-forms-admin.php:438
201
+ #: ../custom-contact-forms-admin.php:606
202
+ #: ../custom-contact-forms-admin.php:740
203
+ #: ../custom-contact-forms-admin.php:1127
204
+ #: ../custom-contact-forms-admin.php:1204
205
+ #: ../custom-contact-forms-admin.php:1236
206
+ #: ../custom-contact-forms-admin.php:1277
207
  msgid "No"
208
  msgstr ""
209
 
210
+ #: ../custom-contact-forms-admin.php:441
211
+ #: ../custom-contact-forms-admin.php:603
212
+ #: ../custom-contact-forms-admin.php:737
213
+ #: ../custom-contact-forms-admin.php:747
214
+ #: ../custom-contact-forms-admin.php:1124
215
+ #: ../custom-contact-forms-admin.php:1201
216
+ #: ../custom-contact-forms-admin.php:1233
217
+ #: ../custom-contact-forms-admin.php:1274
218
  msgid "Yes"
219
  msgstr ""
220
 
221
+ #: ../custom-contact-forms-admin.php:445
222
  msgid "(If a field is required and a user leaves it blank, the plugin will display an error message explainging the problem.)"
223
  msgstr ""
224
 
225
+ #: ../custom-contact-forms-admin.php:449
226
+ #: ../custom-contact-forms-admin.php:625
227
+ #: ../custom-contact-forms-admin.php:768
228
  #: ../custom-contact-forms-usage-popover.php:155
229
  msgid "Field Instructions:"
230
  msgstr ""
231
 
232
+ #: ../custom-contact-forms-admin.php:453
233
  msgid "(If this is filled out, a tooltip popover displaying this text will show when the field is selected.)"
234
  msgstr ""
235
 
236
+ #: ../custom-contact-forms-admin.php:457
237
  msgid "Create Field"
238
  msgstr ""
239
 
240
+ #: ../custom-contact-forms-admin.php:466
241
  msgid "Create A Form"
242
  msgstr ""
243
 
244
+ #: ../custom-contact-forms-admin.php:473
245
  msgid "Form Slug:"
246
  msgstr ""
247
 
248
+ #: ../custom-contact-forms-admin.php:477
249
  msgid "(Must be unique and contain only underscores and alphanumeric characters.)"
250
  msgstr ""
251
 
252
+ #: ../custom-contact-forms-admin.php:481
253
  #: ../custom-contact-forms-usage-popover.php:211
254
  msgid "Form Title:"
255
  msgstr ""
256
 
257
+ #: ../custom-contact-forms-admin.php:484
258
  msgid "(The form header text)"
259
  msgstr ""
260
 
261
+ #: ../custom-contact-forms-admin.php:488
262
  #: ../custom-contact-forms-usage-popover.php:216
263
  msgid "Form Method:"
264
  msgstr ""
265
 
266
+ #: ../custom-contact-forms-admin.php:494
267
  msgid "(If unsure, leave as is.)"
268
  msgstr ""
269
 
270
+ #: ../custom-contact-forms-admin.php:498
271
  #: ../custom-contact-forms-usage-popover.php:221
272
  msgid "Form Action:"
273
  msgstr ""
274
 
275
+ #: ../custom-contact-forms-admin.php:502
276
  msgid "(If unsure, leave blank. Enter a URL here, if and only if you want to process your forms somewhere else, for example with a service like Aweber or InfusionSoft.)"
277
  msgstr ""
278
 
279
+ #: ../custom-contact-forms-admin.php:506
280
  #: ../custom-contact-forms-usage-popover.php:226
281
  msgid "Form Style:"
282
  msgstr ""
283
 
284
+ #: ../custom-contact-forms-admin.php:512
285
  msgid "Click to create a style"
286
  msgstr ""
287
 
288
+ #: ../custom-contact-forms-admin.php:516
289
  #: ../custom-contact-forms-usage-popover.php:231
290
  msgid "Submit Button Text:"
291
  msgstr ""
292
 
293
+ #: ../custom-contact-forms-admin.php:522
294
+ #: ../custom-contact-forms-admin.php:1004
295
  #: ../custom-contact-forms-usage-popover.php:236
296
  msgid "Custom Code:"
297
  msgstr ""
298
 
299
+ #: ../custom-contact-forms-admin.php:526
300
  msgid "(If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.)"
301
  msgstr ""
302
 
303
+ #: ../custom-contact-forms-admin.php:530
304
  #: ../custom-contact-forms-usage-popover.php:241
305
  msgid "Form Destination Email:"
306
  msgstr ""
307
 
308
+ #: ../custom-contact-forms-admin.php:534
309
  msgid "(Will receive all submissions from this form; if left blank it will use the default specified in general settings.)"
310
  msgstr ""
311
 
312
+ #: ../custom-contact-forms-admin.php:538
313
  #: ../custom-contact-forms-usage-popover.php:246
314
  msgid "Form Success Message:"
315
  msgstr ""
316
 
317
+ #: ../custom-contact-forms-admin.php:542
318
+ #: ../custom-contact-forms-admin.php:550
319
  msgid "(Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.)"
320
  msgstr ""
321
 
322
+ #: ../custom-contact-forms-admin.php:546
323
  #: ../custom-contact-forms-usage-popover.php:251
324
  msgid "Form Success Message Title:"
325
  msgstr ""
326
 
327
+ #: ../custom-contact-forms-admin.php:554
328
  #: ../custom-contact-forms-usage-popover.php:256
329
  msgid "Custom Success URL:"
330
  msgstr ""
331
 
332
+ #: ../custom-contact-forms-admin.php:558
333
  msgid "(If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.)"
334
  msgstr ""
335
 
336
+ #: ../custom-contact-forms-admin.php:561
337
  msgid "Create Form"
338
  msgstr ""
339
 
340
+ #: ../custom-contact-forms-admin.php:569
341
  msgid "Manage User Fields"
342
  msgstr ""
343
 
344
+ #: ../custom-contact-forms-admin.php:574
345
+ #: ../custom-contact-forms-admin.php:685
346
+ #: ../custom-contact-forms-admin.php:702
347
+ #: ../custom-contact-forms-admin.php:782
348
+ #: ../custom-contact-forms-admin.php:800
349
+ #: ../custom-contact-forms-admin.php:843
350
+ #: ../custom-contact-forms-admin.php:903
351
+ #: ../custom-contact-forms-admin.php:1026
352
  msgid "Slug"
353
  msgstr ""
354
 
355
+ #: ../custom-contact-forms-admin.php:575
356
+ #: ../custom-contact-forms-admin.php:686
357
+ #: ../custom-contact-forms-admin.php:703
358
+ #: ../custom-contact-forms-admin.php:783
359
+ #: ../custom-contact-forms-admin.php:803
360
+ #: ../custom-contact-forms-admin.php:846
361
  msgid "Label"
362
  msgstr ""
363
 
364
+ #: ../custom-contact-forms-admin.php:576
365
+ #: ../custom-contact-forms-admin.php:687
366
+ #: ../custom-contact-forms-admin.php:704
367
+ #: ../custom-contact-forms-admin.php:784
368
  msgid "Type"
369
  msgstr ""
370
 
371
+ #: ../custom-contact-forms-admin.php:577
372
+ #: ../custom-contact-forms-admin.php:688
373
+ #: ../custom-contact-forms-admin.php:705
374
+ #: ../custom-contact-forms-admin.php:785
375
  msgid "Initial Value"
376
  msgstr ""
377
 
378
+ #: ../custom-contact-forms-admin.php:578
379
+ #: ../custom-contact-forms-admin.php:689
380
+ #: ../custom-contact-forms-admin.php:706
381
+ #: ../custom-contact-forms-admin.php:786
382
  msgid "Required"
383
  msgstr ""
384
 
385
+ #: ../custom-contact-forms-admin.php:579
386
+ #: ../custom-contact-forms-admin.php:690
387
+ #: ../custom-contact-forms-admin.php:707
388
+ #: ../custom-contact-forms-admin.php:787
389
  msgid "Maxlength"
390
  msgstr ""
391
 
392
+ #: ../custom-contact-forms-admin.php:580
393
+ #: ../custom-contact-forms-admin.php:691
394
+ #: ../custom-contact-forms-admin.php:708
395
+ #: ../custom-contact-forms-admin.php:788
396
+ #: ../custom-contact-forms-admin.php:809
397
+ #: ../custom-contact-forms-admin.php:852
398
+ #: ../custom-contact-forms-admin.php:907
399
+ #: ../custom-contact-forms-admin.php:1030
400
+ #: ../custom-contact-forms-admin.php:1051
401
+ #: ../custom-contact-forms-admin.php:1105
402
  msgid "Action"
403
  msgstr ""
404
 
405
+ #: ../custom-contact-forms-admin.php:618
406
+ #: ../custom-contact-forms-admin.php:759
407
+ #: ../custom-contact-forms-admin.php:823
408
+ #: ../custom-contact-forms-admin.php:932
409
+ #: ../custom-contact-forms-admin.php:1724
410
  msgid "Save"
411
  msgstr ""
412
 
413
+ #: ../custom-contact-forms-admin.php:619
414
+ #: ../custom-contact-forms-admin.php:824
415
+ #: ../custom-contact-forms-admin.php:933
416
+ #: ../custom-contact-forms-admin.php:1074
417
  msgid "Delete"
418
  msgstr ""
419
 
420
+ #: ../custom-contact-forms-admin.php:630
421
+ #: ../custom-contact-forms-admin.php:763
422
  msgid "Field Class:"
423
  msgstr ""
424
 
425
+ #: ../custom-contact-forms-admin.php:633
426
  msgid "If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a \"Form Style\" other than the default, styles inherited from the \"Field Class\" might be overwritten."
427
  msgstr ""
428
 
429
+ #: ../custom-contact-forms-admin.php:653
430
  msgid "Dettach Field Option"
431
  msgstr ""
432
 
433
+ #: ../custom-contact-forms-admin.php:656
434
  msgid "Dettach field options you"
435
  msgstr ""
436
 
437
+ #: ../custom-contact-forms-admin.php:658
438
+ #: ../custom-contact-forms-admin.php:995
439
  msgid "create"
440
  msgstr ""
441
 
442
+ #: ../custom-contact-forms-admin.php:668
443
  msgid "Attach Field Option"
444
  msgstr ""
445
 
446
+ #: ../custom-contact-forms-admin.php:672
447
  msgid "Attach field options in the order you want them to display."
448
  msgstr ""
449
 
450
+ #: ../custom-contact-forms-admin.php:723
451
+ #: ../custom-contact-forms-admin.php:754
452
  msgid "None"
453
  msgstr ""
454
 
455
+ #: ../custom-contact-forms-admin.php:795
456
  msgid "Manage Field Options (for Dropdown and Radio Fields)"
457
  msgstr ""
458
 
459
+ #: ../custom-contact-forms-admin.php:806
460
+ #: ../custom-contact-forms-admin.php:849
461
  msgid "Value"
462
  msgstr ""
463
 
464
+ #: ../custom-contact-forms-admin.php:835
465
  msgid "No field options have been created."
466
  msgstr ""
467
 
468
+ #: ../custom-contact-forms-admin.php:863
469
  msgid "Option Slug:"
470
  msgstr ""
471
 
472
+ #: ../custom-contact-forms-admin.php:867
473
  msgid "(Used to identify this option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one')"
474
  msgstr ""
475
 
476
+ #: ../custom-contact-forms-admin.php:871
477
  #: ../custom-contact-forms-usage-popover.php:183
478
  msgid "Option Label:"
479
  msgstr ""
480
 
481
+ #: ../custom-contact-forms-admin.php:875
482
  msgid "(This is what is shown to the user in the dropdown or radio field. Example:)"
483
  msgstr ""
484
 
485
+ #: ../custom-contact-forms-admin.php:879
486
  #: ../custom-contact-forms-usage-popover.php:188
487
  msgid "Option Value:"
488
  msgstr ""
489
 
490
+ #: ../custom-contact-forms-admin.php:883
491
  msgid "(This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: \"The color green\" => \"green\" or \"Yes\" => \"1\".)"
492
  msgstr ""
493
 
494
+ #: ../custom-contact-forms-admin.php:886
495
  msgid "Create Field Option"
496
  msgstr ""
497
 
498
+ #: ../custom-contact-forms-admin.php:890
499
  msgid "The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually sent in the email to you. For dropdown fields the option value is optional, for radio fields it is required."
500
  msgstr ""
501
 
502
+ #: ../custom-contact-forms-admin.php:902
503
  msgid "Form Display Code"
504
  msgstr ""
505
 
506
+ #: ../custom-contact-forms-admin.php:904
507
+ #: ../custom-contact-forms-admin.php:1027
508
  msgid "Title"
509
  msgstr ""
510
 
511
+ #: ../custom-contact-forms-admin.php:905
512
+ #: ../custom-contact-forms-admin.php:1028
513
  msgid "Button Text"
514
  msgstr ""
515
 
516
+ #: ../custom-contact-forms-admin.php:906
517
+ #: ../custom-contact-forms-admin.php:1029
518
  msgid "Style"
519
  msgstr ""
520
 
521
+ #: ../custom-contact-forms-admin.php:940
522
  msgid "Method"
523
  msgstr ""
524
 
525
+ #: ../custom-contact-forms-admin.php:941
526
  msgid "Form Action"
527
  msgstr ""
528
 
529
+ #: ../custom-contact-forms-admin.php:942
530
  msgid "Destination Email"
531
  msgstr ""
532
 
533
+ #: ../custom-contact-forms-admin.php:943
534
  msgid "Success Message Title"
535
  msgstr ""
536
 
537
+ #: ../custom-contact-forms-admin.php:944
538
  msgid "Success Message"
539
  msgstr ""
540
 
541
+ #: ../custom-contact-forms-admin.php:945
542
  msgid "Custom Success URL"
543
  msgstr ""
544
 
545
+ #: ../custom-contact-forms-admin.php:948
546
  msgid "The Form Method is the method by which information is transfer through your form. If you aren't an expert with HTML and PHP, leave this as Post."
547
  msgstr ""
548
 
549
+ #: ../custom-contact-forms-admin.php:952
550
  msgid "This lets you process your forms through alternate scripts. If you use a service like InfusionSoft or Aweber, set this to be the same form action as the code provided to you by that service, otherwise leave this blank."
551
  msgstr ""
552
 
553
+ #: ../custom-contact-forms-admin.php:954
554
  msgid "This email address will recieve form emails (provided that Email Form Submissions is set to Yes in general settings)."
555
  msgstr ""
556
 
557
+ #: ../custom-contact-forms-admin.php:956
558
  msgid "This will be displayed as the header in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
559
  msgstr ""
560
 
561
+ #: ../custom-contact-forms-admin.php:958
562
  msgid "This will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
563
  msgstr ""
564
 
565
+ #: ../custom-contact-forms-admin.php:960
566
  msgid "If this is filled out, users will be sent to this thank you page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success."
567
  msgstr ""
568
 
569
+ #: ../custom-contact-forms-admin.php:965
570
  msgid "Attached Fields:"
571
  msgstr ""
572
 
573
+ #: ../custom-contact-forms-admin.php:979
574
  msgid "Dettach Field"
575
  msgstr ""
576
 
577
+ #: ../custom-contact-forms-admin.php:982
578
  msgid "Attach fields in the order you want them displayed."
579
  msgstr ""
580
 
581
+ #: ../custom-contact-forms-admin.php:985
582
  msgid "Attach Field:"
583
  msgstr ""
584
 
585
+ #: ../custom-contact-forms-admin.php:990
586
  msgid "Attach Field"
587
  msgstr ""
588
 
589
+ #: ../custom-contact-forms-admin.php:993
590
  msgid "Attach fixed fields or ones you"
591
  msgstr ""
592
 
593
+ #: ../custom-contact-forms-admin.php:999
594
  msgid "The form display code above ([customcontact form=x]) will only work in Wordpress pages and posts. If you want to display this form in a theme file such as page.php, header.php, index.php, category.php, etc, then insert this PHP snippet."
595
  msgstr ""
596
 
597
+ #: ../custom-contact-forms-admin.php:1000
598
  msgid "Code to Display Form in Theme Files:"
599
  msgstr ""
600
 
601
+ #: ../custom-contact-forms-admin.php:1003
602
  msgid "This field allows you to insert HTML directly after the starting <form> tag."
603
  msgstr ""
604
 
605
+ #: ../custom-contact-forms-admin.php:1025
606
  msgid "Form Code"
607
  msgstr ""
608
 
609
+ #: ../custom-contact-forms-admin.php:1042
610
  #: ../custom-contact-forms-usage-popover.php:307
611
  msgid "Saved Form Submissions"
612
  msgstr ""
613
 
614
+ #: ../custom-contact-forms-admin.php:1047
615
+ #: ../custom-contact-forms-admin.php:1101
616
  msgid "Date Submitted"
617
  msgstr ""
618
 
619
+ #: ../custom-contact-forms-admin.php:1048
620
+ #: ../custom-contact-forms-admin.php:1102
621
  msgid "Form Submitted"
622
  msgstr ""
623
 
624
+ #: ../custom-contact-forms-admin.php:1049
625
+ #: ../custom-contact-forms-admin.php:1103
626
  msgid "Form Page"
627
  msgstr ""
628
 
629
+ #: ../custom-contact-forms-admin.php:1068
630
  msgid "Custom HTML Form"
631
  msgstr ""
632
 
633
+ #: ../custom-contact-forms-admin.php:1120
634
  msgid "Email Form Submissions:"
635
  msgstr ""
636
 
637
+ #: ../custom-contact-forms-admin.php:1132
638
  msgid "When a user fills out one of your forms, the info he submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info."
639
  msgstr ""
640
 
641
+ #: ../custom-contact-forms-admin.php:1136
642
  msgid "Default Email:"
643
  msgstr ""
644
 
645
+ #: ../custom-contact-forms-admin.php:1141
646
  msgid "Form emails will be sent <span>to</span> this address, if no destination email is specified by the form."
647
  msgstr ""
648
 
649
+ #: ../custom-contact-forms-admin.php:1145
650
  msgid "Front End JQuery:"
651
  msgstr ""
652
 
653
+ #: ../custom-contact-forms-admin.php:1149
654
+ #: ../custom-contact-forms-admin.php:1217
655
+ #: ../custom-contact-forms-admin.php:1258
656
  msgid "Enabled"
657
  msgstr ""
658
 
659
+ #: ../custom-contact-forms-admin.php:1152
660
+ #: ../custom-contact-forms-admin.php:1220
661
+ #: ../custom-contact-forms-admin.php:1261
662
  msgid "Disabled"
663
  msgstr ""
664
 
665
+ #: ../custom-contact-forms-admin.php:1157
666
  #, php-format
667
  msgid "Some plugins don't setup JQuery correctly, so when any other plugin uses JQuery (whether correctly or not), JQuery works for neither plugin. This plugin uses JQuery correctly. If another plugin isn't using JQuery correctly but is more important to you than this one: disable this option. 99% of this plugin's functionality will work without JQuery, just no field instruction tooltips."
668
  msgstr ""
669
 
670
+ #: ../custom-contact-forms-admin.php:1161
671
  msgid "Default From Email:"
672
  msgstr ""
673
 
674
+ #: ../custom-contact-forms-admin.php:1166
675
  msgid "Form emails will be sent <span>from</span> this address. It is recommended you provide a real email address that has been created through your host."
676
  msgstr ""
677
 
678
+ #: ../custom-contact-forms-admin.php:1170
679
  msgid "Default Email Subject:"
680
  msgstr ""
681
 
682
+ #: ../custom-contact-forms-admin.php:1175
683
  msgid "Default subject to be included in all form emails."
684
  msgstr ""
685
 
686
+ #: ../custom-contact-forms-admin.php:1179
687
  msgid "Default Form Success Message Title:"
688
  msgstr ""
689
 
690
+ #: ../custom-contact-forms-admin.php:1184
691
  msgid "If someone fills out a form for which a success message title is not provided and a custom success page is not provided, the plugin will show a popover using this field as the window title."
692
  msgstr ""
693
 
694
+ #: ../custom-contact-forms-admin.php:1188
695
  msgid "Default Form Success Message:"
696
  msgstr ""
697
 
698
+ #: ../custom-contact-forms-admin.php:1193
699
  msgid "If someone fills out a form for which a success message is not provided and a custom success page is not provided, the plugin will show a popover containing this message."
700
  msgstr ""
701
 
702
+ #: ../custom-contact-forms-admin.php:1197
703
  msgid "Remember Field Values:"
704
  msgstr ""
705
 
706
+ #: ../custom-contact-forms-admin.php:1209
707
  msgid "Selecting yes will make form fields remember how they were last filled out."
708
  msgstr ""
709
 
710
+ #: ../custom-contact-forms-admin.php:1213
711
  msgid "Tooltips in Widget:"
712
  msgstr ""
713
 
714
+ #: ../custom-contact-forms-admin.php:1225
715
  msgid "Enabling this shows tooltips containing field instructions on forms in the widget."
716
  msgstr ""
717
 
718
+ #: ../custom-contact-forms-admin.php:1229
719
  msgid "Hide Plugin Author Link in Code:"
720
  msgstr ""
721
 
722
+ #: ../custom-contact-forms-admin.php:1242
723
  msgid "Use Code Type:"
724
  msgstr ""
725
 
726
+ #: ../custom-contact-forms-admin.php:1250
727
  msgid "This lets you switch the form code between HTML and XHTML."
728
  msgstr ""
729
 
730
+ #: ../custom-contact-forms-admin.php:1254
731
  msgid "Fancy Admin AJAX Abilities:"
732
  msgstr ""
733
 
734
+ #: ../custom-contact-forms-admin.php:1266
735
  msgid "If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below."
736
  msgstr ""
737
 
738
+ #: ../custom-contact-forms-admin.php:1270
739
  msgid "Use Wordpress Mail Function:"
740
  msgstr ""
741
 
742
+ #: ../custom-contact-forms-admin.php:1282
743
  msgid "Setting this to no will use the PHP mail function. If your forms aren't sending mail properly try setting this to no."
744
  msgstr ""
745
 
746
+ #: ../custom-contact-forms-admin.php:1285
747
  msgid "Show Sidebar Widget:"
748
  msgstr ""
749
 
750
+ #: ../custom-contact-forms-admin.php:1290
751
  msgid "On Homepage"
752
  msgstr ""
753
 
754
+ #: ../custom-contact-forms-admin.php:1294
755
  msgid "On Pages"
756
  msgstr ""
757
 
758
+ #: ../custom-contact-forms-admin.php:1298
759
  msgid "On Single Posts"
760
  msgstr ""
761
 
762
+ #: ../custom-contact-forms-admin.php:1303
763
  msgid "On Categories"
764
  msgstr ""
765
 
766
+ #: ../custom-contact-forms-admin.php:1307
767
  msgid "On Archives"
768
  msgstr ""
769
 
770
+ #: ../custom-contact-forms-admin.php:1311
771
  msgid "Update"
772
  msgstr ""
773
 
774
+ #: ../custom-contact-forms-admin.php:1320
775
  msgid "Instructions"
776
  msgstr ""
777
 
778
+ #: ../custom-contact-forms-admin.php:1324
779
  msgid "The default content will help you get a better feel of ways this plugin can be used and is the best way to learn."
780
  msgstr ""
781
 
782
+ #: ../custom-contact-forms-admin.php:1328
783
  #: ../custom-contact-forms-usage-popover.php:41
784
  msgid "Insert Default Content"
785
  msgstr ""
786
 
787
+ #: ../custom-contact-forms-admin.php:1332
788
  msgid "1. Create a form."
789
  msgstr ""
790
 
791
+ #: ../custom-contact-forms-admin.php:1335
792
  msgid "2. Create fields and attach those fields to the forms of your choice."
793
  msgstr ""
794
 
795
+ #: ../custom-contact-forms-admin.php:1337
796
  msgid "Attach the fields in the order that you want them to show up in the form. If you mess up you can detach and reattach them. Create field options in the field option manager; field options should be attached to radio and dropdown fields."
797
  msgstr ""
798
 
799
+ #: ../custom-contact-forms-admin.php:1340
800
  msgid "3. Display those forms in posts and pages by inserting the code: [customcontact form=<b>FORMID</b>]. Replace <b>FORMID</b> with the id listed to the left of the form slug next to the form of your choice above. You can also display forms in theme files; the code for this is provided within each forms admin section."
801
  msgstr ""
802
 
803
+ #: ../custom-contact-forms-admin.php:1343
804
  msgid "4. Prevent spam by attaching the fixed field, captcha or ishuman. Captcha requires users to type in a number shown on an image. Ishuman requires users to check a box to prove they aren't a spam bot."
805
  msgstr ""
806
 
807
+ #: ../custom-contact-forms-admin.php:1346
808
  msgid "5. Add a form to your sidebar, by dragging the Custom Contact Form widget in to your sidebar."
809
  msgstr ""
810
 
811
+ #: ../custom-contact-forms-admin.php:1349
812
  msgid "6. Configure the General Settings appropriately; this is important if you want to receive your web form messages!"
813
  msgstr ""
814
 
815
+ #: ../custom-contact-forms-admin.php:1352
816
  msgid "7. Create form styles to change your forms appearances. The image below explains how each style field can change the look of your forms."
817
  msgstr ""
818
 
819
+ #: ../custom-contact-forms-admin.php:1355
820
  msgid "8. (advanced) If you are confident in your HTML and CSS skills, you can use the"
821
  msgstr ""
822
 
823
+ #: ../custom-contact-forms-admin.php:1357
824
  msgid "Custom HTML Forms feature"
825
  msgstr ""
826
 
827
+ #: ../custom-contact-forms-admin.php:1359
828
  msgid "as a framework and write your forms from scratch. This allows you to use this plugin simply to process your form requests. The Custom HTML Forms feature will process and email any form variables sent to it regardless of whether they are created in the fields manager."
829
  msgstr ""
830
 
831
+ #: ../custom-contact-forms-admin.php:1362
832
  msgid "These instructions briefly tell you in which order you should use forms, fields, field options, and styles."
833
  msgstr ""
834
 
835
+ #: ../custom-contact-forms-admin.php:1364
836
  msgid "If you want to read in detail about using forms, fields, field options, styles and the rest of this plugin, click the button below."
837
  msgstr ""
838
 
839
+ #: ../custom-contact-forms-admin.php:1367
840
  msgid "View Plugin Usage Popover"
841
  msgstr ""
842
 
843
+ #: ../custom-contact-forms-admin.php:1376
844
  msgid "Create A Style for Your Forms"
845
  msgstr ""
846
 
847
+ #: ../custom-contact-forms-admin.php:1380
848
  msgid "Use this manager to create styles for your forms. Each field is already filled out with nice look defaults. It is recommended you simply input a slug and click create to see the defaults before you start changing values."
849
  msgstr ""
850
 
851
+ #: ../custom-contact-forms-admin.php:1386
852
  msgid "Style Slug:"
853
  msgstr ""
854
 
855
+ #: ../custom-contact-forms-admin.php:1389
856
  msgid "(Must be unique)"
857
  msgstr ""
858
 
859
+ #: ../custom-contact-forms-admin.php:1393
860
+ #: ../custom-contact-forms-admin.php:1794
861
+ #: ../custom-contact-forms-admin.php:1803
862
  msgid "Title Font Size:"
863
  msgstr ""
864
 
865
+ #: ../custom-contact-forms-admin.php:1396
866
  msgid "(ex: 10pt, 10px, 1em)"
867
  msgstr ""
868
 
869
+ #: ../custom-contact-forms-admin.php:1400
870
+ #: ../custom-contact-forms-admin.php:1842
871
+ #: ../custom-contact-forms-admin.php:1910
872
  msgid "Title Font Color:"
873
  msgstr ""
874
 
875
+ #: ../custom-contact-forms-admin.php:1403
876
+ #: ../custom-contact-forms-admin.php:1424
877
+ #: ../custom-contact-forms-admin.php:1488
878
+ #: ../custom-contact-forms-admin.php:1589
879
+ #: ../custom-contact-forms-admin.php:1596
880
+ #: ../custom-contact-forms-admin.php:1624
881
  msgid "(ex: FF0000)"
882
  msgstr ""
883
 
884
+ #: ../custom-contact-forms-admin.php:1407
885
+ #: ../custom-contact-forms-admin.php:1767
886
  msgid "Label Width:"
887
  msgstr ""
888
 
889
+ #: ../custom-contact-forms-admin.php:1410
890
  msgid "(ex: 100px or 20%)"
891
  msgstr ""
892
 
893
+ #: ../custom-contact-forms-admin.php:1414
894
+ #: ../custom-contact-forms-admin.php:1808
895
  msgid "Label Font Size:"
896
  msgstr ""
897
 
898
+ #: ../custom-contact-forms-admin.php:1417
899
+ #: ../custom-contact-forms-admin.php:1582
900
  msgid "(ex: 10px, 10pt, 1em)"
901
  msgstr ""
902
 
903
+ #: ../custom-contact-forms-admin.php:1421
904
+ #: ../custom-contact-forms-admin.php:1847
905
  msgid "Label Font Color:"
906
  msgstr ""
907
 
908
+ #: ../custom-contact-forms-admin.php:1428
909
+ #: ../custom-contact-forms-admin.php:1734
910
  msgid "Text Field Width:"
911
  msgstr ""
912
 
913
+ #: ../custom-contact-forms-admin.php:1431
914
+ #: ../custom-contact-forms-admin.php:1438
915
+ #: ../custom-contact-forms-admin.php:1445
916
+ #: ../custom-contact-forms-admin.php:1525
917
  msgid "(ex: 100px or 100%)"
918
  msgstr ""
919
 
920
+ #: ../custom-contact-forms-admin.php:1435
921
  msgid "Textarea Field Width:"
922
  msgstr ""
923
 
924
+ #: ../custom-contact-forms-admin.php:1442
925
  msgid "Textarea Field Height:"
926
  msgstr ""
927
 
928
+ #: ../custom-contact-forms-admin.php:1449
929
+ #: ../custom-contact-forms-admin.php:1813
930
  msgid "Field Font Size:"
931
  msgstr ""
932
 
933
+ #: ../custom-contact-forms-admin.php:1452
934
  msgid "(ex: 10px, 10pt, 1em"
935
  msgstr ""
936
 
937
+ #: ../custom-contact-forms-admin.php:1456
938
+ #: ../custom-contact-forms-admin.php:1852
939
  msgid "Field Font Color:"
940
  msgstr ""
941
 
942
+ #: ../custom-contact-forms-admin.php:1459
943
+ #: ../custom-contact-forms-admin.php:1495
944
  msgid "(ex: 333333)"
945
  msgstr ""
946
 
947
+ #: ../custom-contact-forms-admin.php:1463
948
+ #: ../custom-contact-forms-admin.php:1901
949
  msgid "Field Border Style:"
950
  msgstr ""
951
 
952
+ #: ../custom-contact-forms-admin.php:1471
953
+ #: ../custom-contact-forms-admin.php:1862
954
  msgid "Form Margin:"
955
  msgstr ""
956
 
957
+ #: ../custom-contact-forms-admin.php:1474
958
+ #: ../custom-contact-forms-admin.php:1481
959
+ #: ../custom-contact-forms-admin.php:1603
960
+ #: ../custom-contact-forms-admin.php:1610
961
  msgid "(ex: 5px or 1em)"
962
  msgstr ""
963
 
964
+ #: ../custom-contact-forms-admin.php:1478
965
+ #: ../custom-contact-forms-admin.php:1754
966
  msgid "Label Margin:"
967
  msgstr ""
968
 
969
+ #: ../custom-contact-forms-admin.php:1485
970
  msgid "Textarea Background Color:"
971
  msgstr ""
972
 
973
+ #: ../custom-contact-forms-admin.php:1492
974
  msgid "Success Popover Font Color:"
975
  msgstr ""
976
 
977
+ #: ../custom-contact-forms-admin.php:1499
978
  msgid "Success Popover Title Font Size:"
979
  msgstr ""
980
 
981
+ #: ../custom-contact-forms-admin.php:1502
982
+ #: ../custom-contact-forms-admin.php:1509
983
+ #: ../custom-contact-forms-admin.php:1631
984
+ #: ../custom-contact-forms-admin.php:1654
985
  msgid "(ex: 12px, 1em, 100%)"
986
  msgstr ""
987
 
988
+ #: ../custom-contact-forms-admin.php:1506
989
+ #: ../custom-contact-forms-admin.php:1798
990
  msgid "Form Background Color:"
991
  msgstr ""
992
 
993
+ #: ../custom-contact-forms-admin.php:1513
994
  msgid "Tooltip Background Color:"
995
  msgstr ""
996
 
997
+ #: ../custom-contact-forms-admin.php:1516
998
  msgid "(ex: 000000 or black)"
999
  msgstr ""
1000
 
1001
+ #: ../custom-contact-forms-admin.php:1522
1002
+ #: ../custom-contact-forms-admin.php:1896
1003
  msgid "Field Border Color:"
1004
  msgstr ""
1005
 
1006
+ #: ../custom-contact-forms-admin.php:1529
1007
+ #: ../custom-contact-forms-admin.php:1879
1008
  msgid "Form Border Style:"
1009
  msgstr ""
1010
 
1011
+ #: ../custom-contact-forms-admin.php:1537
1012
+ #: ../custom-contact-forms-admin.php:1891
1013
  msgid "Form Border Color:"
1014
  msgstr ""
1015
 
1016
+ #: ../custom-contact-forms-admin.php:1540
1017
  msgid "(ex: 000000)"
1018
  msgstr ""
1019
 
1020
+ #: ../custom-contact-forms-admin.php:1544
1021
+ #: ../custom-contact-forms-admin.php:1886
1022
  msgid "Form Border Width:"
1023
  msgstr ""
1024
 
1025
+ #: ../custom-contact-forms-admin.php:1547
1026
  msgid "(ex: 1px)"
1027
  msgstr ""
1028
 
1029
+ #: ../custom-contact-forms-admin.php:1551
1030
+ #: ../custom-contact-forms-admin.php:1729
1031
  msgid "Form Width:"
1032
  msgstr ""
1033
 
1034
+ #: ../custom-contact-forms-admin.php:1554
1035
  msgid "(ex: 100px or 50%)"
1036
  msgstr ""
1037
 
1038
+ #: ../custom-contact-forms-admin.php:1558
1039
  msgid "Form Font Family:"
1040
  msgstr ""
1041
 
1042
+ #: ../custom-contact-forms-admin.php:1561
1043
  msgid "(ex: Verdana, Tahoma, Arial)"
1044
  msgstr ""
1045
 
1046
+ #: ../custom-contact-forms-admin.php:1565
1047
+ #: ../custom-contact-forms-admin.php:1772
1048
  msgid "Button Width:"
1049
  msgstr ""
1050
 
1051
+ #: ../custom-contact-forms-admin.php:1568
1052
  msgid "(ex: 100px, 30%, auto)"
1053
  msgstr ""
1054
 
1055
+ #: ../custom-contact-forms-admin.php:1572
1056
+ #: ../custom-contact-forms-admin.php:1777
1057
  msgid "Button Height:"
1058
  msgstr ""
1059
 
1060
+ #: ../custom-contact-forms-admin.php:1575
1061
  msgid "(ex: 100px or 30%)"
1062
  msgstr ""
1063
 
1064
+ #: ../custom-contact-forms-admin.php:1579
1065
+ #: ../custom-contact-forms-admin.php:1818
1066
  msgid "Button Font Size:"
1067
  msgstr ""
1068
 
1069
+ #: ../custom-contact-forms-admin.php:1586
1070
+ #: ../custom-contact-forms-admin.php:1857
1071
  msgid "Button Font Color:"
1072
  msgstr ""
1073
 
1074
+ #: ../custom-contact-forms-admin.php:1593
1075
+ #: ../custom-contact-forms-admin.php:1782
1076
  msgid "Field Background Color:"
1077
  msgstr ""
1078
 
1079
+ #: ../custom-contact-forms-admin.php:1600
1080
+ #: ../custom-contact-forms-admin.php:1823
1081
  msgid "Form Padding:"
1082
  msgstr ""
1083
 
1084
+ #: ../custom-contact-forms-admin.php:1607
1085
+ #: ../custom-contact-forms-admin.php:1787
1086
  msgid "Title Margin:"
1087
  msgstr ""
1088
 
1089
+ #: ../custom-contact-forms-admin.php:1614
1090
+ #: ../custom-contact-forms-admin.php:1749
1091
  msgid "Dropdown Width:"
1092
  msgstr ""
1093
 
1094
+ #: ../custom-contact-forms-admin.php:1617
1095
  msgid "(ex: 30px, 20%, or auto)"
1096
  msgstr ""
1097
 
1098
+ #: ../custom-contact-forms-admin.php:1621
1099
  msgid "Success Popover Border Color:"
1100
  msgstr ""
1101
 
1102
+ #: ../custom-contact-forms-admin.php:1628
1103
  msgid "Success Popover Font Size:"
1104
  msgstr ""
1105
 
1106
+ #: ../custom-contact-forms-admin.php:1635
1107
  msgid "Success Popover Height:"
1108
  msgstr ""
1109
 
1110
+ #: ../custom-contact-forms-admin.php:1638
1111
  msgid "(ex: 200px, 6em, 50%)"
1112
  msgstr ""
1113
 
1114
+ #: ../custom-contact-forms-admin.php:1642
1115
+ #: ../custom-contact-forms-admin.php:1915
1116
  msgid "Field Border Roundness:"
1117
  msgstr ""
1118
 
1119
+ #: ../custom-contact-forms-admin.php:1645
1120
  msgid "(ex: 6px, or 0px)"
1121
  msgstr ""
1122
 
1123
+ #: ../custom-contact-forms-admin.php:1649
1124
+ #: ../custom-contact-forms-admin.php:1718
1125
+ #: ../custom-contact-forms-admin.php:1835
1126
  msgid "Tooltip"
1127
  msgstr ""
1128
 
1129
+ #: ../custom-contact-forms-admin.php:1650
1130
+ #: ../custom-contact-forms-admin.php:1719
1131
+ #: ../custom-contact-forms-admin.php:1836
1132
  msgid "A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field."
1133
  msgstr ""
1134
 
1135
+ #: ../custom-contact-forms-admin.php:1651
1136
+ #: ../custom-contact-forms-admin.php:1830
1137
  msgid "Font Size:"
1138
  msgstr ""
1139
 
1140
+ #: ../custom-contact-forms-admin.php:1658
1141
  msgid "Tooltip Font Color:"
1142
  msgstr ""
1143
 
1144
+ #: ../custom-contact-forms-admin.php:1661
1145
  msgid "(ex: ffffff or white)"
1146
  msgstr ""
1147
 
1148
+ #: ../custom-contact-forms-admin.php:1664
1149
  msgid "Create Style"
1150
  msgstr ""
1151
 
1152
+ #: ../custom-contact-forms-admin.php:1672
1153
  msgid "Manage Form Styles"
1154
  msgstr ""
1155
 
1156
+ #: ../custom-contact-forms-admin.php:1694
1157
  #: ../custom-contact-forms-usage-popover.php:125
1158
  #: ../custom-contact-forms-usage-popover.php:178
1159
  #: ../custom-contact-forms-usage-popover.php:206
1160
  msgid "Slug:"
1161
  msgstr ""
1162
 
1163
+ #: ../custom-contact-forms-admin.php:1699
1164
  msgid "Font Family:"
1165
  msgstr ""
1166
 
1167
+ #: ../custom-contact-forms-admin.php:1704
1168
  msgid "Textarea Background"
1169
  msgstr ""
1170
 
1171
+ #: ../custom-contact-forms-admin.php:1706
1172
  msgid "Color:"
1173
  msgstr ""
1174
 
1175
+ #: ../custom-contact-forms-admin.php:1711
1176
+ #: ../custom-contact-forms-admin.php:1759
1177
+ #: ../custom-contact-forms-admin.php:1792
1178
+ #: ../custom-contact-forms-admin.php:1828
1179
+ #: ../custom-contact-forms-admin.php:1867
1180
+ #: ../custom-contact-forms-admin.php:1908
1181
  msgid "Success Popover"
1182
  msgstr ""
1183
 
1184
+ #: ../custom-contact-forms-admin.php:1713
1185
  msgid "Border Color:"
1186
  msgstr ""
1187
 
1188
+ #: ../custom-contact-forms-admin.php:1720
1189
+ #: ../custom-contact-forms-admin.php:1869
1190
  msgid "Font Color:"
1191
  msgstr ""
1192
 
1193
+ #: ../custom-contact-forms-admin.php:1726
1194
  msgid "Delete Style"
1195
  msgstr ""
1196
 
1197
+ #: ../custom-contact-forms-admin.php:1739
1198
  msgid "Textarea Width:"
1199
  msgstr ""
1200
 
1201
+ #: ../custom-contact-forms-admin.php:1744
1202
  msgid "Textarea Height:"
1203
  msgstr ""
1204
 
1205
+ #: ../custom-contact-forms-admin.php:1761
1206
  msgid "Height:"
1207
  msgstr ""
1208
 
1209
+ #: ../custom-contact-forms-admin.php:1837
1210
  msgid "Background Color:"
1211
  msgstr ""
1212
 
1213
+ #: ../custom-contact-forms-admin.php:1874
1214
  msgid "Tooltip Font Size:"
1215
  msgstr ""
1216
 
1217
+ #: ../custom-contact-forms-admin.php:1943
1218
  msgid "Report a Bug/Suggest a Feature"
1219
  msgstr ""
1220
 
1221
+ #: ../custom-contact-forms-admin.php:1950
1222
  msgid "Your Name:"
1223
  msgstr ""
1224
 
1225
+ #: ../custom-contact-forms-admin.php:1956
1226
  msgid "Your Email:"
1227
  msgstr ""
1228
 
1229
+ #: ../custom-contact-forms-admin.php:1962
1230
  msgid "Your Message:"
1231
  msgstr ""
1232
 
1233
+ #: ../custom-contact-forms-admin.php:1968
1234
  msgid "Purpose of this message:"
1235
  msgstr ""
1236
 
1237
+ #: ../custom-contact-forms-admin.php:1978
1238
  msgid "Plugin Question"
1239
  msgstr ""
1240
 
1241
+ #: ../custom-contact-forms-admin.php:1984
1242
  msgid "Send Message"
1243
  msgstr ""
1244
 
1245
+ #: ../custom-contact-forms-admin.php:1992
1246
  msgid "Custom HTML Forms (Advanced)"
1247
  msgstr ""
1248
 
1249
+ #: ../custom-contact-forms-admin.php:1996
1250
  msgid ""
1251
  "If you know HTML and simply want to use this plugin to process form requests, this feature is for you. \n"
1252
+ "\t\t\t\t\tThe following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following: a) Keep the form action/method the same (yes the action is supposed to be empty), b) Include all the hidden fields shown below, c) provide a \n"
1253
+ "\t\t\t\t\thidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately."
1254
  msgstr ""
1255
 
1256
+ #: ../custom-contact-forms-admin.php:2003
1257
  msgid "Thank you for filling out our form!"
1258
  msgstr ""
1259
 
1260
+ #: ../custom-contact-forms-admin.php:2008
1261
  msgid ""
1262
  "Build your form in here. It is recommended you only use this feature if you are experienced with HTML. \n"
1263
+ "\t\t\tThe success_message field will add a popover containing the message when the form is completed successfully, the thank_you_page field will force \n"
1264
+ "\t\t\tthe user to be redirected to that specific page on successful form completion. The required_fields hidden field is optional; to use it seperate \n"
1265
+ "\t\t\tthe field names you want required by commas. Remember to use underscores instead of spaces in field names!"
1266
  msgstr ""
1267
 
1268
+ #: ../custom-contact-forms-admin.php:2019
1269
+ msgid "Export"
 
1270
  msgstr ""
1271
 
1272
+ #: ../custom-contact-forms-admin.php:2024
1273
  msgid ""
1274
  "Preforming a Custom Contact Forms export will create a file of the form \n"
1275
+ "\t\t\t\t\t\tccf-export-xxxx.sql on your web server. The file created contains SQL that \n"
1276
+ "\t\t\t\t\t\twill recreate all the plugin data on any Wordpress installation. After Custom Contact Forms creates the export file, you will be prompted to download it. You can use this file as a backup in case your Wordpress database gets ruined."
1277
  msgstr ""
1278
 
1279
+ #: ../custom-contact-forms-admin.php:2028
1280
  msgid "Export All CCF Plugin Content"
1281
  msgstr ""
1282
 
1283
+ #: ../custom-contact-forms-admin.php:2034
1284
+ msgid "Import"
1285
+ msgstr ""
1286
+
1287
+ #: ../custom-contact-forms-admin.php:2040
1288
  msgid "Browse to a CCF .sql export file to import Custom Contact Form data from another Wordpress installation to this one. Pressing the 'Clear and Import' button deletes all current data and then imports the selected file; this will not work for merging to data!. Clearing all CCF data before importing prevents any conflicts from occuring. Before you attempt an import, you should always download a backup, by clicking the 'Export All' button."
1289
  msgstr ""
1290
 
1291
+ #: ../custom-contact-forms-admin.php:2043
1292
  msgid "Choose What You Want to Use from the Import File:"
1293
  msgstr ""
1294
 
1295
+ #: ../custom-contact-forms-admin.php:2049
1296
  msgid "Use General Settings"
1297
  msgstr ""
1298
 
1299
+ #: ../custom-contact-forms-admin.php:2055
1300
+ #: ../custom-contact-forms-admin.php:2073
1301
  #: ../custom-contact-forms-usage-popover.php:8
1302
  #: ../custom-contact-forms-usage-popover.php:199
1303
  msgid "Forms"
1304
  msgstr ""
1305
 
1306
+ #: ../custom-contact-forms-admin.php:2061
1307
  #: ../custom-contact-forms-usage-popover.php:26
1308
  msgid "Form Submissions"
1309
  msgstr ""
1310
 
1311
+ #: ../custom-contact-forms-admin.php:2067
1312
  #: ../custom-contact-forms-usage-popover.php:11
1313
  #: ../custom-contact-forms-usage-popover.php:49
1314
  msgid "Fields"
1315
  msgstr ""
1316
 
1317
+ #: ../custom-contact-forms-admin.php:2079
1318
  #: ../custom-contact-forms-usage-popover.php:14
1319
  #: ../custom-contact-forms-usage-popover.php:171
1320
  msgid "Field Options"
1321
  msgstr ""
1322
 
1323
+ #: ../custom-contact-forms-admin.php:2085
1324
  #: ../custom-contact-forms-usage-popover.php:17
1325
  msgid "Styles"
1326
  msgstr ""
1327
 
1328
+ #: ../custom-contact-forms-admin.php:2091
1329
  msgid "Choose an Import File:"
1330
  msgstr ""
1331
 
1332
+ #: ../custom-contact-forms-admin.php:2095
1333
  msgid "Clear and Import"
1334
  msgstr ""
1335
 
1336
+ #: ../custom-contact-forms-admin.php:2097
 
 
 
 
1337
  msgid "Yes, I want to do this and have created a backup."
1338
  msgstr ""
1339
 
1340
+ #: ../custom-contact-forms-admin.php:2104
1341
  msgid "Custom Contact Forms Plugin News"
1342
  msgstr ""
1343
 
1612
  msgid "This features saves each user form submission. All the fields attached to the form along with the time of submission and form URL are saved in the database and displayed in a stylish format in the admin panel."
1613
  msgstr ""
1614
 
1615
+ #: ../custom-contact-forms-usage-popover.php:315
1616
+ msgid "Import / Export"
1617
+ msgstr ""
1618
+
1619
  #: ../custom-contact-forms-usage-popover.php:318
1620
  msgid ""
1621
  "Import/export is a new feature that allows you to transfer forms, fields, field options, styles and everything else saved by the plugin between Wordpress installations. Clicking the Export All button will create a .SQL file for download. With the .SQL export file you can use the importer within the CCF plugin admin page to import the .SQL file. The built-in importer is completely safe as long as you only import files that have been generated by the CCF exporter. \n"
1632
  msgid "Create a Form"
1633
  msgstr ""
1634
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom-contact-forms-db.php → modules/db/custom-contact-forms-db.php RENAMED
@@ -64,7 +64,7 @@ if (!class_exists('CustomContactFormsDB')) {
64
  `label_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
65
  `form_width` VARCHAR( 10 ) NOT NULL DEFAULT '100%',
66
  `submit_width` VARCHAR( 10 ) NOT NULL DEFAULT 'auto',
67
- `submit_height` VARCHAR( 10 ) NOT NULL DEFAULT '30px',
68
  `label_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1em',
69
  `title_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.2em',
70
  `field_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.3em',
@@ -148,6 +148,8 @@ if (!class_exists('CustomContactFormsDB')) {
148
  $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
149
  if (!$this->columnExists('field_class', CCF_FIELDS_TABLE))
150
  $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_class` VARCHAR( 50 ) NOT NULL");
 
 
151
 
152
  }
153
 
@@ -203,7 +205,7 @@ if (!class_exists('CustomContactFormsDB')) {
203
 
204
  function insertFieldOption($option) {
205
  global $wpdb;
206
- if (empty($option) or empty($option['option_slug']) or $this->fieldOptionsSlugExists($this->formatSlug($option['option_slug']))) return false;
207
  $option['option_slug'] = $this->formatSlug($option['option_slug']);
208
  foreach ($option as $key => $value)
209
  $option[$key] = CustomContactFormsStatic::encodeOption($value);
@@ -563,6 +565,7 @@ if (!class_exists('CustomContactFormsDB')) {
563
  'field_maxlength' => 0, 'field_type' => 'Dropdown');
564
  $email_field = $this->selectField(0, 'fixedEmail');
565
  $captcha_field = $this->selectField(0, 'captcha');
 
566
  $email_option = array('option_slug' => $option_slugs['email'], 'option_label' => __('By Email', 'custom-contact-forms'));
567
  $phone_option = array('option_slug' => $option_slugs['phone'], 'option_label' => __('By Phone', 'custom-contact-forms'));
568
  $nocontact_option = array('option_slug' => $option_slugs['nocontact'], 'option_label' => __('Do Not Contact Me', 'custom-contact-forms'));
@@ -590,6 +593,7 @@ if (!class_exists('CustomContactFormsDB')) {
590
  $this->addFieldToForm($contact_method_field_id, $contact_form_id);
591
  $this->addFieldToForm($message_field_id, $contact_form_id);
592
  $this->addFieldToForm($captcha_field->id, $contact_form_id);
 
593
  }
594
  }
595
  }
64
  `label_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
65
  `form_width` VARCHAR( 10 ) NOT NULL DEFAULT '100%',
66
  `submit_width` VARCHAR( 10 ) NOT NULL DEFAULT 'auto',
67
+ `submit_height` VARCHAR( 10 ) NOT NULL DEFAULT '40px',
68
  `label_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1em',
69
  `title_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.2em',
70
  `field_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.3em',
148
  $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
149
  if (!$this->columnExists('field_class', CCF_FIELDS_TABLE))
150
  $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_class` VARCHAR( 50 ) NOT NULL");
151
+ if (!$this->columnExists('field_error', CCF_FIELDS_TABLE))
152
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_error` VARCHAR( 300 ) NOT NULL");
153
 
154
  }
155
 
205
 
206
  function insertFieldOption($option) {
207
  global $wpdb;
208
+ if (empty($option) or empty($option['option_slug']) or empty($option['option_label']) or $this->fieldOptionsSlugExists($this->formatSlug($option['option_slug']))) return false;
209
  $option['option_slug'] = $this->formatSlug($option['option_slug']);
210
  foreach ($option as $key => $value)
211
  $option[$key] = CustomContactFormsStatic::encodeOption($value);
565
  'field_maxlength' => 0, 'field_type' => 'Dropdown');
566
  $email_field = $this->selectField(0, 'fixedEmail');
567
  $captcha_field = $this->selectField(0, 'captcha');
568
+ $reset_button = $this->selectField(0, 'resetButton');
569
  $email_option = array('option_slug' => $option_slugs['email'], 'option_label' => __('By Email', 'custom-contact-forms'));
570
  $phone_option = array('option_slug' => $option_slugs['phone'], 'option_label' => __('By Phone', 'custom-contact-forms'));
571
  $nocontact_option = array('option_slug' => $option_slugs['nocontact'], 'option_label' => __('Do Not Contact Me', 'custom-contact-forms'));
593
  $this->addFieldToForm($contact_method_field_id, $contact_form_id);
594
  $this->addFieldToForm($message_field_id, $contact_form_id);
595
  $this->addFieldToForm($captcha_field->id, $contact_form_id);
596
+ $this->addFieldToForm($reset_button->id, $contact_form_id);
597
  }
598
  }
599
  }
modules/export/custom-contact-forms-export.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Custom Contact Forms Plugin
4
+ By Taylor Lovett - http://www.taylorlovett.com
5
+ Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
+ */
7
+ if (!class_exists('CustomContactFormsExport')) {
8
+ class CustomContactFormsExport extends CustomContactFormsDB {
9
+
10
+ var $last_export_content;
11
+ var $last_export_file;
12
+ var $exports_path;
13
+ var $option_name;
14
+
15
+ function CustomContactFormsExport($option_name) {
16
+ $this->exports_path = CCF_BASE_PATH . 'export/';
17
+ $this->option_name = $option_name;
18
+ }
19
+
20
+ function exportAll($backup_options = true) {
21
+ $out = '';
22
+ foreach ($GLOBALS['ccf_tables_array'] as $table)
23
+ $out .= $this->exportTable($table);
24
+ if ($backup_options) {
25
+ $out .= "\n" . $this->generateOptionsUpdateQuery() . "\n";
26
+ }
27
+ $this->last_export_content = $out;
28
+ return $out;
29
+ }
30
+
31
+ function exportTable($table) {
32
+ $out = '';
33
+ $data = parent::selectAllFromTable($table, ARRAY_A);
34
+ foreach ($data as $row) {
35
+ $no_insert = 0;
36
+ $cols = '';
37
+ $vals = '';
38
+ foreach ($row as $k => $v) {
39
+ $v = str_replace(';', '\;', $v);
40
+ $cols .= "$k, ";
41
+ $vals .= "'$v', ";
42
+ }
43
+ $vals = substr($vals, 0, strlen($vals) - 2);
44
+ $cols = substr($cols, 0, strlen($cols) - 2);
45
+ $statement = 'INSERT INTO `' . $table . '` (' . $cols . ') VALUES (' . $this->escapeSemiColons($vals) . ');';
46
+ $statement = $statement . "\n\n";
47
+ $out .= $statement;
48
+ }
49
+ return $out;
50
+ }
51
+
52
+ function exportToFile($export_content = NULL) {
53
+ if ($export_content == NULL) $export_content = $this->getLastExportContent();
54
+ $export_file = "ccf-export-" . strtolower(date('j-M-Y--h-i-s')) . '.sql';
55
+ if (($export_handle = @fopen($this->getExportsPath() . $export_file, 'w')) == false)
56
+ return false;
57
+ $comment = '## ' . __('Custom Contact Forms Export File', 'custom-contact-forms') . "\n";
58
+ $comment .= '## '. __('It is recommended that you do not edit this file. The order of the', 'custom-contact-forms') . "\n";
59
+ $comment .= '## ' . __('queries is important if you intend to use this file through the CCF', 'custom-contact-forms') . "\n";
60
+ $comment .= '## ' . __('exporter. The query to update general settings MUST be the last query', 'custom-contact-forms') . "\n";
61
+ $comment .= '## ' . __('in this file.', 'custom-contact-forms') . "\n\n";
62
+ fwrite($export_handle, $comment . $export_content);
63
+ fclose($export_handle);
64
+ $this->last_export_file = $export_file;
65
+ return $export_file;
66
+ }
67
+
68
+ function getExportsPath() {
69
+ return $this->exports_path;
70
+ }
71
+
72
+ function getLastExportContent() {
73
+ return $this->last_export_content;
74
+ }
75
+
76
+ function importFromFile($file, $settings = array('mode' => 'clear_import', 'import_general_settings' => false, 'import_forms' => true,'import_fields' => true, 'import_field_options' => true, 'import_styles' => true, 'import_saved_submissions' => false)) {
77
+ $path = CCF_BASE_PATH. 'import/';
78
+ $file_name = basename(time() . $file['name']);
79
+ if (move_uploaded_file($file['tmp_name'], $path . $file_name)) {
80
+ $data = file_get_contents($path . $file_name);
81
+ $data = preg_replace('/^#.*?[\n\r]*$/ims', '', $data);
82
+ $commands = $this->parseMultiQuery($data);
83
+ $errors = 0;
84
+ if ($settings['mode'] == 'clear_import') parent::emptyAllTables();
85
+ foreach($commands as $command) {
86
+ if (preg_match('/^[\s]*UPDATE/is', $command)) {
87
+ if ($settings['import_general_settings'])
88
+ if (!parent::query($command)) $errors++;
89
+ } elseif (preg_match('/^[\s]*INSERT INTO/is', $command)) {
90
+ $table_name = $this->extractTableFromQuery($command);
91
+ $no_query = 0;
92
+ if ($settings['import_forms'] == 0) if ($table_name == CCF_FORMS_TABLE) $no_query = 1;
93
+ if ($settings['import_fields'] == 0) if ($table_name == CCF_FIELDS_TABLE) $no_query = 1;
94
+ if ($settings['import_field_options'] == 0) if ($table_name == CCF_FIELD_OPTIONS_TABLE) $no_query = 1;
95
+ if ($settings['import_styles'] == 0) if ($table_name == CCF_STYLES_TABLE) $no_query = 1;
96
+ if ($settings['import_saved_submissions'] == 0) if ($table_name == CCF_USER_DATA_TABLE) $no_query = 1;
97
+ if ($no_query == 0)
98
+ if (!parent::query($command)) $errors++;
99
+ }
100
+ }
101
+ return ($errors == 0) ? true : $errors;
102
+ }
103
+ return false;
104
+ }
105
+
106
+ function parseMultiQuery($sql, $unescape_semicolons = true, $replace_table_prefix = true) {
107
+ if (empty($sql)) return false;
108
+ $prefix = CustomContactFormsStatic::getWPTablePrefix();
109
+ $commands = preg_split('/\);[\n\r]*/ims', $sql);
110
+ foreach ($commands as $k => $v) {
111
+ if (preg_match('/^[\s]*INSERT INTO/is', $v)) $commands[$k] = $v . ')';
112
+ if ($unescape_semicolons)
113
+ $commands[$k] = $this->unescapeSemiColons($commands[$k]);
114
+ if ($replace_table_prefix)
115
+ $commands[$k] = preg_replace('/^([a-zA-Z0-9 \s]+?)`.+?customcontactforms_(.+?)`/is', '$1 `' . $prefix . 'customcontactforms_$2`', $commands[$k]);
116
+ }
117
+ return $commands;
118
+ }
119
+
120
+ function generateOptionsUpdateQuery($option_name = NULL) {
121
+ if ($option_name == NULL) $option_name = $this->option_name;
122
+ $prefix = CustomContactFormsStatic::getWPTablePrefix();
123
+ $options = serialize(get_option($option_name));
124
+ return 'UPDATE `' . $prefix . "options` SET `option_value`='$options' WHERE `option_name`='$option_name';";
125
+ }
126
+
127
+ function extractTableFromQuery($query) {
128
+ return preg_replace('/^[\s]*?INSERT INTO[\s]*?`(.*?)`.*/is', '$1', $query);
129
+ }
130
+
131
+ function escapeSemiColons($value) {
132
+ return str_replace(';', '\;', $value);
133
+ }
134
+
135
+ function unescapeSemiColons($value) {
136
+ return str_replace('\;', ';', $value);
137
+ }
138
+ }
139
+ }
140
+ ?>
custom-contact-forms-user-data.php → modules/export/custom-contact-forms-user-data.php RENAMED
@@ -49,12 +49,12 @@ if (!class_exists('CustomContactFormsUserData')) {
49
  $data = $this->getEncodedData();
50
  $data_array = array();
51
  while (!empty($data)) {
52
- $key_length = CustomContactFormsStatic::strstrb($data, ':"');
53
  $key_length = str_replace('s:', '', $key_length);
54
  $piece_length = 6 + strlen($key_length) + (int) $key_length;
55
  $key = substr($data, (4 + strlen($key_length)), (int) $key_length);
56
  $data = substr($data, $piece_length);
57
- $value_length = CustomContactFormsStatic::strstrb($data, ':"');
58
  $value_length = str_replace('s:', '', $value_length);
59
  $piece_length = 6 + strlen($value_length) + (int) $value_length;
60
  $value = substr($data, (4 + strlen($value_length)), (int) $value_length);
@@ -64,6 +64,10 @@ if (!class_exists('CustomContactFormsUserData')) {
64
  $this->setDataArray($data_array);
65
  }
66
 
 
 
 
 
67
  /* Getters and Setters */
68
  function setFormID($form_id) { $this->form_id = $form_id; }
69
  function setFormPage($form_page) { $this->form_page = $form_page; }
49
  $data = $this->getEncodedData();
50
  $data_array = array();
51
  while (!empty($data)) {
52
+ $key_length = $this->strstrb($data, ':"');
53
  $key_length = str_replace('s:', '', $key_length);
54
  $piece_length = 6 + strlen($key_length) + (int) $key_length;
55
  $key = substr($data, (4 + strlen($key_length)), (int) $key_length);
56
  $data = substr($data, $piece_length);
57
+ $value_length = $this->strstrb($data, ':"');
58
  $value_length = str_replace('s:', '', $value_length);
59
  $piece_length = 6 + strlen($value_length) + (int) $value_length;
60
  $value = substr($data, (4 + strlen($value_length)), (int) $value_length);
64
  $this->setDataArray($data_array);
65
  }
66
 
67
+ function strstrb($h, $n){
68
+ return array_shift(explode($n, $h, 2));
69
+ }
70
+
71
  /* Getters and Setters */
72
  function setFormID($form_id) { $this->form_id = $form_id; }
73
  function setFormPage($form_page) { $this->form_page = $form_page; }
custom-contact-forms-images.php → modules/images/custom-contact-forms-images.php RENAMED
File without changes
modules/phpmailer/class.phpmailer.php ADDED
@@ -0,0 +1,2320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*~ class.phpmailer.php
3
+ .---------------------------------------------------------------------------.
4
+ | Software: PHPMailer - PHP email class |
5
+ | Version: 5.1 |
6
+ | Contact: via sourceforge.net support pages (also www.worxware.com) |
7
+ | Info: http://phpmailer.sourceforge.net |
8
+ | Support: http://sourceforge.net/projects/phpmailer/ |
9
+ | ------------------------------------------------------------------------- |
10
+ | Admin: Andy Prevost (project admininistrator) |
11
+ | Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
12
+ | : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |
13
+ | Founder: Brent R. Matzelle (original founder) |
14
+ | Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. |
15
+ | Copyright (c) 2001-2003, Brent R. Matzelle |
16
+ | ------------------------------------------------------------------------- |
17
+ | License: Distributed under the Lesser General Public License (LGPL) |
18
+ | http://www.gnu.org/copyleft/lesser.html |
19
+ | This program is distributed in the hope that it will be useful - WITHOUT |
20
+ | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
21
+ | FITNESS FOR A PARTICULAR PURPOSE. |
22
+ | ------------------------------------------------------------------------- |
23
+ | We offer a number of paid services (www.worxware.com): |
24
+ | - Web Hosting on highly optimized fast and secure servers |
25
+ | - Technology Consulting |
26
+ | - Oursourcing (highly qualified programmers and graphic designers) |
27
+ '---------------------------------------------------------------------------'
28
+ */
29
+
30
+ /**
31
+ * PHPMailer - PHP email transport class
32
+ * NOTE: Requires PHP version 5 or later
33
+ * @package PHPMailer
34
+ * @author Andy Prevost
35
+ * @author Marcus Bointon
36
+ * @copyright 2004 - 2009 Andy Prevost
37
+ * @version $Id: class.phpmailer.php 447 2009-05-25 01:36:38Z codeworxtech $
38
+ * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
39
+ */
40
+
41
+ if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n");
42
+
43
+ class PHPMailer {
44
+
45
+ /////////////////////////////////////////////////
46
+ // PROPERTIES, PUBLIC
47
+ /////////////////////////////////////////////////
48
+
49
+ /**
50
+ * Email priority (1 = High, 3 = Normal, 5 = low).
51
+ * @var int
52
+ */
53
+ public $Priority = 3;
54
+
55
+ /**
56
+ * Sets the CharSet of the message.
57
+ * @var string
58
+ */
59
+ public $CharSet = 'iso-8859-1';
60
+
61
+ /**
62
+ * Sets the Content-type of the message.
63
+ * @var string
64
+ */
65
+ public $ContentType = 'text/plain';
66
+
67
+ /**
68
+ * Sets the Encoding of the message. Options for this are
69
+ * "8bit", "7bit", "binary", "base64", and "quoted-printable".
70
+ * @var string
71
+ */
72
+ public $Encoding = '8bit';
73
+
74
+ /**
75
+ * Holds the most recent mailer error message.
76
+ * @var string
77
+ */
78
+ public $ErrorInfo = '';
79
+
80
+ /**
81
+ * Sets the From email address for the message.
82
+ * @var string
83
+ */
84
+ public $From = 'root@localhost';
85
+
86
+ /**
87
+ * Sets the From name of the message.
88
+ * @var string
89
+ */
90
+ public $FromName = 'Root User';
91
+
92
+ /**
93
+ * Sets the Sender email (Return-Path) of the message. If not empty,
94
+ * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
95
+ * @var string
96
+ */
97
+ public $Sender = '';
98
+
99
+ /**
100
+ * Sets the Subject of the message.
101
+ * @var string
102
+ */
103
+ public $Subject = '';
104
+
105
+ /**
106
+ * Sets the Body of the message. This can be either an HTML or text body.
107
+ * If HTML then run IsHTML(true).
108
+ * @var string
109
+ */
110
+ public $Body = '';
111
+
112
+ /**
113
+ * Sets the text-only body of the message. This automatically sets the
114
+ * email to multipart/alternative. This body can be read by mail
115
+ * clients that do not have HTML email capability such as mutt. Clients
116
+ * that can read HTML will view the normal Body.
117
+ * @var string
118
+ */
119
+ public $AltBody = '';
120
+
121
+ /**
122
+ * Sets word wrapping on the body of the message to a given number of
123
+ * characters.
124
+ * @var int
125
+ */
126
+ public $WordWrap = 0;
127
+
128
+ /**
129
+ * Method to send mail: ("mail", "sendmail", or "smtp").
130
+ * @var string
131
+ */
132
+ public $Mailer = 'mail';
133
+
134
+ /**
135
+ * Sets the path of the sendmail program.
136
+ * @var string
137
+ */
138
+ public $Sendmail = '/usr/sbin/sendmail';
139
+
140
+ /**
141
+ * Path to PHPMailer plugins. Useful if the SMTP class
142
+ * is in a different directory than the PHP include path.
143
+ * @var string
144
+ */
145
+ public $PluginDir = '';
146
+
147
+ /**
148
+ * Sets the email address that a reading confirmation will be sent.
149
+ * @var string
150
+ */
151
+ public $ConfirmReadingTo = '';
152
+
153
+ /**
154
+ * Sets the hostname to use in Message-Id and Received headers
155
+ * and as default HELO string. If empty, the value returned
156
+ * by SERVER_NAME is used or 'localhost.localdomain'.
157
+ * @var string
158
+ */
159
+ public $Hostname = '';
160
+
161
+ /**
162
+ * Sets the message ID to be used in the Message-Id header.
163
+ * If empty, a unique id will be generated.
164
+ * @var string
165
+ */
166
+ public $MessageID = '';
167
+
168
+ /////////////////////////////////////////////////
169
+ // PROPERTIES FOR SMTP
170
+ /////////////////////////////////////////////////
171
+
172
+ /**
173
+ * Sets the SMTP hosts. All hosts must be separated by a
174
+ * semicolon. You can also specify a different port
175
+ * for each host by using this format: [hostname:port]
176
+ * (e.g. "smtp1.example.com:25;smtp2.example.com").
177
+ * Hosts will be tried in order.
178
+ * @var string
179
+ */
180
+ public $Host = 'localhost';
181
+
182
+ /**
183
+ * Sets the default SMTP server port.
184
+ * @var int
185
+ */
186
+ public $Port = 25;
187
+
188
+ /**
189
+ * Sets the SMTP HELO of the message (Default is $Hostname).
190
+ * @var string
191
+ */
192
+ public $Helo = '';
193
+
194
+ /**
195
+ * Sets connection prefix.
196
+ * Options are "", "ssl" or "tls"
197
+ * @var string
198
+ */
199
+ public $SMTPSecure = '';
200
+
201
+ /**
202
+ * Sets SMTP authentication. Utilizes the Username and Password variables.
203
+ * @var bool
204
+ */
205
+ public $SMTPAuth = false;
206
+
207
+ /**
208
+ * Sets SMTP username.
209
+ * @var string
210
+ */
211
+ public $Username = '';
212
+
213
+ /**
214
+ * Sets SMTP password.
215
+ * @var string
216
+ */
217
+ public $Password = '';
218
+
219
+ /**
220
+ * Sets the SMTP server timeout in seconds.
221
+ * This function will not work with the win32 version.
222
+ * @var int
223
+ */
224
+ public $Timeout = 10;
225
+
226
+ /**
227
+ * Sets SMTP class debugging on or off.
228
+ * @var bool
229
+ */
230
+ public $SMTPDebug = false;
231
+
232
+ /**
233
+ * Prevents the SMTP connection from being closed after each mail
234
+ * sending. If this is set to true then to close the connection
235
+ * requires an explicit call to SmtpClose().
236
+ * @var bool
237
+ */
238
+ public $SMTPKeepAlive = false;
239
+
240
+ /**
241
+ * Provides the ability to have the TO field process individual
242
+ * emails, instead of sending to entire TO addresses
243
+ * @var bool
244
+ */
245
+ public $SingleTo = false;
246
+
247
+ /**
248
+ * If SingleTo is true, this provides the array to hold the email addresses
249
+ * @var bool
250
+ */
251
+ public $SingleToArray = array();
252
+
253
+ /**
254
+ * Provides the ability to change the line ending
255
+ * @var string
256
+ */
257
+ public $LE = "\n";
258
+
259
+ /**
260
+ * Used with DKIM DNS Resource Record
261
+ * @var string
262
+ */
263
+ public $DKIM_selector = 'phpmailer';
264
+
265
+ /**
266
+ * Used with DKIM DNS Resource Record
267
+ * optional, in format of email address 'you@yourdomain.com'
268
+ * @var string
269
+ */
270
+ public $DKIM_identity = '';
271
+
272
+ /**
273
+ * Used with DKIM DNS Resource Record
274
+ * optional, in format of email address 'you@yourdomain.com'
275
+ * @var string
276
+ */
277
+ public $DKIM_domain = '';
278
+
279
+ /**
280
+ * Used with DKIM DNS Resource Record
281
+ * optional, in format of email address 'you@yourdomain.com'
282
+ * @var string
283
+ */
284
+ public $DKIM_private = '';
285
+
286
+ /**
287
+ * Callback Action function name
288
+ * the function that handles the result of the send email action. Parameters:
289
+ * bool $result result of the send action
290
+ * string $to email address of the recipient
291
+ * string $cc cc email addresses
292
+ * string $bcc bcc email addresses
293
+ * string $subject the subject
294
+ * string $body the email body
295
+ * @var string
296
+ */
297
+ public $action_function = ''; //'callbackAction';
298
+
299
+ /**
300
+ * Sets the PHPMailer Version number
301
+ * @var string
302
+ */
303
+ public $Version = '5.1';
304
+
305
+ /////////////////////////////////////////////////
306
+ // PROPERTIES, PRIVATE AND PROTECTED
307
+ /////////////////////////////////////////////////
308
+
309
+ private $smtp = NULL;
310
+ private $to = array();
311
+ private $cc = array();
312
+ private $bcc = array();
313
+ private $ReplyTo = array();
314
+ private $all_recipients = array();
315
+ private $attachment = array();
316
+ private $CustomHeader = array();
317
+ private $message_type = '';
318
+ private $boundary = array();
319
+ protected $language = array();
320
+ private $error_count = 0;
321
+ private $sign_cert_file = "";
322
+ private $sign_key_file = "";
323
+ private $sign_key_pass = "";
324
+ private $exceptions = false;
325
+
326
+ /////////////////////////////////////////////////
327
+ // CONSTANTS
328
+ /////////////////////////////////////////////////
329
+
330
+ const STOP_MESSAGE = 0; // message only, continue processing
331
+ const STOP_CONTINUE = 1; // message?, likely ok to continue processing
332
+ const STOP_CRITICAL = 2; // message, plus full stop, critical error reached
333
+
334
+ /////////////////////////////////////////////////
335
+ // METHODS, VARIABLES
336
+ /////////////////////////////////////////////////
337
+
338
+ /**
339
+ * Constructor
340
+ * @param boolean $exceptions Should we throw external exceptions?
341
+ */
342
+ public function __construct($exceptions = false) {
343
+ $this->exceptions = ($exceptions == true);
344
+ }
345
+
346
+ /**
347
+ * Sets message type to HTML.
348
+ * @param bool $ishtml
349
+ * @return void
350
+ */
351
+ public function IsHTML($ishtml = true) {
352
+ if ($ishtml) {
353
+ $this->ContentType = 'text/html';
354
+ } else {
355
+ $this->ContentType = 'text/plain';
356
+ }
357
+ }
358
+
359
+ /**
360
+ * Sets Mailer to send message using SMTP.
361
+ * @return void
362
+ */
363
+ public function IsSMTP() {
364
+ $this->Mailer = 'smtp';
365
+ }
366
+
367
+ /**
368
+ * Sets Mailer to send message using PHP mail() function.
369
+ * @return void
370
+ */
371
+ public function IsMail() {
372
+ $this->Mailer = 'mail';
373
+ }
374
+
375
+ /**
376
+ * Sets Mailer to send message using the $Sendmail program.
377
+ * @return void
378
+ */
379
+ public function IsSendmail() {
380
+ if (!stristr(ini_get('sendmail_path'), 'sendmail')) {
381
+ $this->Sendmail = '/var/qmail/bin/sendmail';
382
+ }
383
+ $this->Mailer = 'sendmail';
384
+ }
385
+
386
+ /**
387
+ * Sets Mailer to send message using the qmail MTA.
388
+ * @return void
389
+ */
390
+ public function IsQmail() {
391
+ if (stristr(ini_get('sendmail_path'), 'qmail')) {
392
+ $this->Sendmail = '/var/qmail/bin/sendmail';
393
+ }
394
+ $this->Mailer = 'sendmail';
395
+ }
396
+
397
+ /////////////////////////////////////////////////
398
+ // METHODS, RECIPIENTS
399
+ /////////////////////////////////////////////////
400
+
401
+ /**
402
+ * Adds a "To" address.
403
+ * @param string $address
404
+ * @param string $name
405
+ * @return boolean true on success, false if address already used
406
+ */
407
+ public function AddAddress($address, $name = '') {
408
+ return $this->AddAnAddress('to', $address, $name);
409
+ }
410
+
411
+ /**
412
+ * Adds a "Cc" address.
413
+ * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
414
+ * @param string $address
415
+ * @param string $name
416
+ * @return boolean true on success, false if address already used
417
+ */
418
+ public function AddCC($address, $name = '') {
419
+ return $this->AddAnAddress('cc', $address, $name);
420
+ }
421
+
422
+ /**
423
+ * Adds a "Bcc" address.
424
+ * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
425
+ * @param string $address
426
+ * @param string $name
427
+ * @return boolean true on success, false if address already used
428
+ */
429
+ public function AddBCC($address, $name = '') {
430
+ return $this->AddAnAddress('bcc', $address, $name);
431
+ }
432
+
433
+ /**
434
+ * Adds a "Reply-to" address.
435
+ * @param string $address
436
+ * @param string $name
437
+ * @return boolean
438
+ */
439
+ public function AddReplyTo($address, $name = '') {
440
+ return $this->AddAnAddress('ReplyTo', $address, $name);
441
+ }
442
+
443
+ /**
444
+ * Adds an address to one of the recipient arrays
445
+ * Addresses that have been added already return false, but do not throw exceptions
446
+ * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo'
447
+ * @param string $address The email address to send to
448
+ * @param string $name
449
+ * @return boolean true on success, false if address already used or invalid in some way
450
+ * @access private
451
+ */
452
+ private function AddAnAddress($kind, $address, $name = '') {
453
+ if (!preg_match('/^(to|cc|bcc|ReplyTo)$/', $kind)) {
454
+ echo 'Invalid recipient array: ' . kind;
455
+ return false;
456
+ }
457
+ $address = trim($address);
458
+ $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
459
+ if (!self::ValidateAddress($address)) {
460
+ $this->SetError($this->Lang('invalid_address').': '. $address);
461
+ if ($this->exceptions) {
462
+ throw new phpmailerException($this->Lang('invalid_address').': '.$address);
463
+ }
464
+ echo $this->Lang('invalid_address').': '.$address;
465
+ return false;
466
+ }
467
+ if ($kind != 'ReplyTo') {
468
+ if (!isset($this->all_recipients[strtolower($address)])) {
469
+ array_push($this->$kind, array($address, $name));
470
+ $this->all_recipients[strtolower($address)] = true;
471
+ return true;
472
+ }
473
+ } else {
474
+ if (!array_key_exists(strtolower($address), $this->ReplyTo)) {
475
+ $this->ReplyTo[strtolower($address)] = array($address, $name);
476
+ return true;
477
+ }
478
+ }
479
+ return false;
480
+ }
481
+
482
+ /**
483
+ * Set the From and FromName properties
484
+ * @param string $address
485
+ * @param string $name
486
+ * @return boolean
487
+ */
488
+ public function SetFrom($address, $name = '',$auto=1) {
489
+ $address = trim($address);
490
+ $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
491
+ if (!self::ValidateAddress($address)) {
492
+ $this->SetError($this->Lang('invalid_address').': '. $address);
493
+ if ($this->exceptions) {
494
+ throw new phpmailerException($this->Lang('invalid_address').': '.$address);
495
+ }
496
+ echo $this->Lang('invalid_address').': '.$address;
497
+ return false;
498
+ }
499
+ $this->From = $address;
500
+ $this->FromName = $name;
501
+ if ($auto) {
502
+ if (empty($this->ReplyTo)) {
503
+ $this->AddAnAddress('ReplyTo', $address, $name);
504
+ }
505
+ if (empty($this->Sender)) {
506
+ $this->Sender = $address;
507
+ }
508
+ }
509
+ return true;
510
+ }
511
+
512
+ /**
513
+ * Check that a string looks roughly like an email address should
514
+ * Static so it can be used without instantiation
515
+ * Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator
516
+ * Conforms approximately to RFC2822
517
+ * @link http://www.hexillion.com/samples/#Regex Original pattern found here
518
+ * @param string $address The email address to check
519
+ * @return boolean
520
+ * @static
521
+ * @access public
522
+ */
523
+ public static function ValidateAddress($address) {
524
+ if (function_exists('filter_var')) { //Introduced in PHP 5.2
525
+ if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) {
526
+ return false;
527
+ } else {
528
+ return true;
529
+ }
530
+ } else {
531
+ return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $address);
532
+ }
533
+ }
534
+
535
+ /////////////////////////////////////////////////
536
+ // METHODS, MAIL SENDING
537
+ /////////////////////////////////////////////////
538
+
539
+ /**
540
+ * Creates message and assigns Mailer. If the message is
541
+ * not sent successfully then it returns false. Use the ErrorInfo
542
+ * variable to view description of the error.
543
+ * @return bool
544
+ */
545
+ public function Send() {
546
+ try {
547
+ if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) {
548
+ throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL);
549
+ }
550
+
551
+ // Set whether the message is multipart/alternative
552
+ if(!empty($this->AltBody)) {
553
+ $this->ContentType = 'multipart/alternative';
554
+ }
555
+
556
+ $this->error_count = 0; // reset errors
557
+ $this->SetMessageType();
558
+ $header = $this->CreateHeader();
559
+ $body = $this->CreateBody();
560
+
561
+ if (empty($this->Body)) {
562
+ throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL);
563
+ }
564
+
565
+ // digitally sign with DKIM if enabled
566
+ if ($this->DKIM_domain && $this->DKIM_private) {
567
+ $header_dkim = $this->DKIM_Add($header,$this->Subject,$body);
568
+ $header = str_replace("\r\n","\n",$header_dkim) . $header;
569
+ }
570
+
571
+ // Choose the mailer and send through it
572
+ switch($this->Mailer) {
573
+ case 'sendmail':
574
+ return $this->SendmailSend($header, $body);
575
+ case 'smtp':
576
+ return $this->SmtpSend($header, $body);
577
+ default:
578
+ return $this->MailSend($header, $body);
579
+ }
580
+
581
+ } catch (phpmailerException $e) {
582
+ $this->SetError($e->getMessage());
583
+ if ($this->exceptions) {
584
+ throw $e;
585
+ }
586
+ echo $e->getMessage()."\n";
587
+ return false;
588
+ }
589
+ }
590
+
591
+ /**
592
+ * Sends mail using the $Sendmail program.
593
+ * @param string $header The message headers
594
+ * @param string $body The message body
595
+ * @access protected
596
+ * @return bool
597
+ */
598
+ protected function SendmailSend($header, $body) {
599
+ if ($this->Sender != '') {
600
+ $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
601
+ } else {
602
+ $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));
603
+ }
604
+ if ($this->SingleTo === true) {
605
+ foreach ($this->SingleToArray as $key => $val) {
606
+ if(!@$mail = popen($sendmail, 'w')) {
607
+ throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
608
+ }
609
+ fputs($mail, "To: " . $val . "\n");
610
+ fputs($mail, $header);
611
+ fputs($mail, $body);
612
+ $result = pclose($mail);
613
+ // implement call back function if it exists
614
+ $isSent = ($result == 0) ? 1 : 0;
615
+ $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body);
616
+ if($result != 0) {
617
+ throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
618
+ }
619
+ }
620
+ } else {
621
+ if(!@$mail = popen($sendmail, 'w')) {
622
+ throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
623
+ }
624
+ fputs($mail, $header);
625
+ fputs($mail, $body);
626
+ $result = pclose($mail);
627
+ // implement call back function if it exists
628
+ $isSent = ($result == 0) ? 1 : 0;
629
+ $this->doCallback($isSent,$this->to,$this->cc,$this->bcc,$this->Subject,$body);
630
+ if($result != 0) {
631
+ throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
632
+ }
633
+ }
634
+ return true;
635
+ }
636
+
637
+ /**
638
+ * Sends mail using the PHP mail() function.
639
+ * @param string $header The message headers
640
+ * @param string $body The message body
641
+ * @access protected
642
+ * @return bool
643
+ */
644
+ protected function MailSend($header, $body) {
645
+ $toArr = array();
646
+ foreach($this->to as $t) {
647
+ $toArr[] = $this->AddrFormat($t);
648
+ }
649
+ $to = implode(', ', $toArr);
650
+
651
+ $params = sprintf("-oi -f %s", $this->Sender);
652
+ if ($this->Sender != '' && strlen(ini_get('safe_mode'))< 1) {
653
+ $old_from = ini_get('sendmail_from');
654
+ ini_set('sendmail_from', $this->Sender);
655
+ if ($this->SingleTo === true && count($toArr) > 1) {
656
+ foreach ($toArr as $key => $val) {
657
+ $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
658
+ // implement call back function if it exists
659
+ $isSent = ($rt == 1) ? 1 : 0;
660
+ $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body);
661
+ }
662
+ } else {
663
+ $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
664
+ // implement call back function if it exists
665
+ $isSent = ($rt == 1) ? 1 : 0;
666
+ $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body);
667
+ }
668
+ } else {
669
+ if ($this->SingleTo === true && count($toArr) > 1) {
670
+ foreach ($toArr as $key => $val) {
671
+ $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
672
+ // implement call back function if it exists
673
+ $isSent = ($rt == 1) ? 1 : 0;
674
+ $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body);
675
+ }
676
+ } else {
677
+ $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);
678
+ // implement call back function if it exists
679
+ $isSent = ($rt == 1) ? 1 : 0;
680
+ $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body);
681
+ }
682
+ }
683
+ if (isset($old_from)) {
684
+ ini_set('sendmail_from', $old_from);
685
+ }
686
+ if(!$rt) {
687
+ throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL);
688
+ }
689
+ return true;
690
+ }
691
+
692
+ /**
693
+ * Sends mail via SMTP using PhpSMTP
694
+ * Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
695
+ * @param string $header The message headers
696
+ * @param string $body The message body
697
+ * @uses SMTP
698
+ * @access protected
699
+ * @return bool
700
+ */
701
+ protected function SmtpSend($header, $body) {
702
+ require_once $this->PluginDir . 'class.smtp.php';
703
+ $bad_rcpt = array();
704
+
705
+ if(!$this->SmtpConnect()) {
706
+ throw new phpmailerException($this->Lang('smtp_connect_failed'), self::STOP_CRITICAL);
707
+ }
708
+ $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
709
+ if(!$this->smtp->Mail($smtp_from)) {
710
+ throw new phpmailerException($this->Lang('from_failed') . $smtp_from, self::STOP_CRITICAL);
711
+ }
712
+
713
+ // Attempt to send attach all recipients
714
+ foreach($this->to as $to) {
715
+ if (!$this->smtp->Recipient($to[0])) {
716
+ $bad_rcpt[] = $to[0];
717
+ // implement call back function if it exists
718
+ $isSent = 0;
719
+ $this->doCallback($isSent,$to[0],'','',$this->Subject,$body);
720
+ } else {
721
+ // implement call back function if it exists
722
+ $isSent = 1;
723
+ $this->doCallback($isSent,$to[0],'','',$this->Subject,$body);
724
+ }
725
+ }
726
+ foreach($this->cc as $cc) {
727
+ if (!$this->smtp->Recipient($cc[0])) {
728
+ $bad_rcpt[] = $cc[0];
729
+ // implement call back function if it exists
730
+ $isSent = 0;
731
+ $this->doCallback($isSent,'',$cc[0],'',$this->Subject,$body);
732
+ } else {
733
+ // implement call back function if it exists
734
+ $isSent = 1;
735
+ $this->doCallback($isSent,'',$cc[0],'',$this->Subject,$body);
736
+ }
737
+ }
738
+ foreach($this->bcc as $bcc) {
739
+ if (!$this->smtp->Recipient($bcc[0])) {
740
+ $bad_rcpt[] = $bcc[0];
741
+ // implement call back function if it exists
742
+ $isSent = 0;
743
+ $this->doCallback($isSent,'','',$bcc[0],$this->Subject,$body);
744
+ } else {
745
+ // implement call back function if it exists
746
+ $isSent = 1;
747
+ $this->doCallback($isSent,'','',$bcc[0],$this->Subject,$body);
748
+ }
749
+ }
750
+
751
+
752
+ if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses
753
+ $badaddresses = implode(', ', $bad_rcpt);
754
+ throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses);
755
+ }
756
+ if(!$this->smtp->Data($header . $body)) {
757
+ throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL);
758
+ }
759
+ if($this->SMTPKeepAlive == true) {
760
+ $this->smtp->Reset();
761
+ }
762
+ return true;
763
+ }
764
+
765
+ /**
766
+ * Initiates a connection to an SMTP server.
767
+ * Returns false if the operation failed.
768
+ * @uses SMTP
769
+ * @access public
770
+ * @return bool
771
+ */
772
+ public function SmtpConnect() {
773
+ if(is_null($this->smtp)) {
774
+ $this->smtp = new SMTP();
775
+ }
776
+
777
+ $this->smtp->do_debug = $this->SMTPDebug;
778
+ $hosts = explode(';', $this->Host);
779
+ $index = 0;
780
+ $connection = $this->smtp->Connected();
781
+
782
+ // Retry while there is no connection
783
+ try {
784
+ while($index < count($hosts) && !$connection) {
785
+ $hostinfo = array();
786
+ if (preg_match('/^(.+):([0-9]+)$/', $hosts[$index], $hostinfo)) {
787
+ $host = $hostinfo[1];
788
+ $port = $hostinfo[2];
789
+ } else {
790
+ $host = $hosts[$index];
791
+ $port = $this->Port;
792
+ }
793
+
794
+ $tls = ($this->SMTPSecure == 'tls');
795
+ $ssl = ($this->SMTPSecure == 'ssl');
796
+
797
+ if ($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) {
798
+
799
+ $hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname());
800
+ $this->smtp->Hello($hello);
801
+
802
+ if ($tls) {
803
+ if (!$this->smtp->StartTLS()) {
804
+ throw new phpmailerException($this->Lang('tls'));
805
+ }
806
+
807
+ //We must resend HELO after tls negotiation
808
+ $this->smtp->Hello($hello);
809
+ }
810
+
811
+ $connection = true;
812
+ if ($this->SMTPAuth) {
813
+ if (!$this->smtp->Authenticate($this->Username, $this->Password)) {
814
+ throw new phpmailerException($this->Lang('authenticate'));
815
+ }
816
+ }
817
+ }
818
+ $index++;
819
+ if (!$connection) {
820
+ throw new phpmailerException($this->Lang('connect_host'));
821
+ }
822
+ }
823
+ } catch (phpmailerException $e) {
824
+ $this->smtp->Reset();
825
+ throw $e;
826
+ }
827
+ return true;
828
+ }
829
+
830
+ /**
831
+ * Closes the active SMTP session if one exists.
832
+ * @return void
833
+ */
834
+ public function SmtpClose() {
835
+ if(!is_null($this->smtp)) {
836
+ if($this->smtp->Connected()) {
837
+ $this->smtp->Quit();
838
+ $this->smtp->Close();
839
+ }
840
+ }
841
+ }
842
+
843
+ /**
844
+ * Sets the language for all class error messages.
845
+ * Returns false if it cannot load the language file. The default language is English.
846
+ * @param string $langcode ISO 639-1 2-character language code (e.g. Portuguese: "br")
847
+ * @param string $lang_path Path to the language file directory
848
+ * @access public
849
+ */
850
+ function SetLanguage($langcode = 'en', $lang_path = 'language/') {
851
+ //Define full set of translatable strings
852
+ $PHPMAILER_LANG = array(
853
+ 'provide_address' => 'You must provide at least one recipient email address.',
854
+ 'mailer_not_supported' => ' mailer is not supported.',
855
+ 'execute' => 'Could not execute: ',
856
+ 'instantiate' => 'Could not instantiate mail function.',
857
+ 'authenticate' => 'SMTP Error: Could not authenticate.',
858
+ 'from_failed' => 'The following From address failed: ',
859
+ 'recipients_failed' => 'SMTP Error: The following recipients failed: ',
860
+ 'data_not_accepted' => 'SMTP Error: Data not accepted.',
861
+ 'connect_host' => 'SMTP Error: Could not connect to SMTP host.',
862
+ 'file_access' => 'Could not access file: ',
863
+ 'file_open' => 'File Error: Could not open file: ',
864
+ 'encoding' => 'Unknown encoding: ',
865
+ 'signing' => 'Signing Error: ',
866
+ 'smtp_error' => 'SMTP server error: ',
867
+ 'empty_message' => 'Message body empty',
868
+ 'invalid_address' => 'Invalid address',
869
+ 'variable_set' => 'Cannot set or reset variable: '
870
+ );
871
+ //Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"!
872
+ $l = true;
873
+ if ($langcode != 'en') { //There is no English translation file
874
+ $l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php';
875
+ }
876
+ $this->language = $PHPMAILER_LANG;
877
+ return ($l == true); //Returns false if language not found
878
+ }
879
+
880
+ /**
881
+ * Return the current array of language strings
882
+ * @return array
883
+ */
884
+ public function GetTranslations() {
885
+ return $this->language;
886
+ }
887
+
888
+ /////////////////////////////////////////////////
889
+ // METHODS, MESSAGE CREATION
890
+ /////////////////////////////////////////////////
891
+
892
+ /**
893
+ * Creates recipient headers.
894
+ * @access public
895
+ * @return string
896
+ */
897
+ public function AddrAppend($type, $addr) {
898
+ $addr_str = $type . ': ';
899
+ $addresses = array();
900
+ foreach ($addr as $a) {
901
+ $addresses[] = $this->AddrFormat($a);
902
+ }
903
+ $addr_str .= implode(', ', $addresses);
904
+ $addr_str .= $this->LE;
905
+
906
+ return $addr_str;
907
+ }
908
+
909
+ /**
910
+ * Formats an address correctly.
911
+ * @access public
912
+ * @return string
913
+ */
914
+ public function AddrFormat($addr) {
915
+ if (empty($addr[1])) {
916
+ return $this->SecureHeader($addr[0]);
917
+ } else {
918
+ return $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">";
919
+ }
920
+ }
921
+
922
+ /**
923
+ * Wraps message for use with mailers that do not
924
+ * automatically perform wrapping and for quoted-printable.
925
+ * Original written by philippe.
926
+ * @param string $message The message to wrap
927
+ * @param integer $length The line length to wrap to
928
+ * @param boolean $qp_mode Whether to run in Quoted-Printable mode
929
+ * @access public
930
+ * @return string
931
+ */
932
+ public function WrapText($message, $length, $qp_mode = false) {
933
+ $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE;
934
+ // If utf-8 encoding is used, we will need to make sure we don't
935
+ // split multibyte characters when we wrap
936
+ $is_utf8 = (strtolower($this->CharSet) == "utf-8");
937
+
938
+ $message = $this->FixEOL($message);
939
+ if (substr($message, -1) == $this->LE) {
940
+ $message = substr($message, 0, -1);
941
+ }
942
+
943
+ $line = explode($this->LE, $message);
944
+ $message = '';
945
+ for ($i=0 ;$i < count($line); $i++) {
946
+ $line_part = explode(' ', $line[$i]);
947
+ $buf = '';
948
+ for ($e = 0; $e<count($line_part); $e++) {
949
+ $word = $line_part[$e];
950
+ if ($qp_mode and (strlen($word) > $length)) {
951
+ $space_left = $length - strlen($buf) - 1;
952
+ if ($e != 0) {
953
+ if ($space_left > 20) {
954
+ $len = $space_left;
955
+ if ($is_utf8) {
956
+ $len = $this->UTF8CharBoundary($word, $len);
957
+ } elseif (substr($word, $len - 1, 1) == "=") {
958
+ $len--;
959
+ } elseif (substr($word, $len - 2, 1) == "=") {
960
+ $len -= 2;
961
+ }
962
+ $part = substr($word, 0, $len);
963
+ $word = substr($word, $len);
964
+ $buf .= ' ' . $part;
965
+ $message .= $buf . sprintf("=%s", $this->LE);
966
+ } else {
967
+ $message .= $buf . $soft_break;
968
+ }
969
+ $buf = '';
970
+ }
971
+ while (strlen($word) > 0) {
972
+ $len = $length;
973
+ if ($is_utf8) {
974
+ $len = $this->UTF8CharBoundary($word, $len);
975
+ } elseif (substr($word, $len - 1, 1) == "=") {
976
+ $len--;
977
+ } elseif (substr($word, $len - 2, 1) == "=") {
978
+ $len -= 2;
979
+ }
980
+ $part = substr($word, 0, $len);
981
+ $word = substr($word, $len);
982
+
983
+ if (strlen($word) > 0) {
984
+ $message .= $part . sprintf("=%s", $this->LE);
985
+ } else {
986
+ $buf = $part;
987
+ }
988
+ }
989
+ } else {
990
+ $buf_o = $buf;
991
+ $buf .= ($e == 0) ? $word : (' ' . $word);
992
+
993
+ if (strlen($buf) > $length and $buf_o != '') {
994
+ $message .= $buf_o . $soft_break;
995
+ $buf = $word;
996
+ }
997
+ }
998
+ }
999
+ $message .= $buf . $this->LE;
1000
+ }
1001
+
1002
+ return $message;
1003
+ }
1004
+
1005
+ /**
1006
+ * Finds last character boundary prior to maxLength in a utf-8
1007
+ * quoted (printable) encoded string.
1008
+ * Original written by Colin Brown.
1009
+ * @access public
1010
+ * @param string $encodedText utf-8 QP text
1011
+ * @param int $maxLength find last character boundary prior to this length
1012
+ * @return int
1013
+ */
1014
+ public function UTF8CharBoundary($encodedText, $maxLength) {
1015
+ $foundSplitPos = false;
1016
+ $lookBack = 3;
1017
+ while (!$foundSplitPos) {
1018
+ $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);
1019
+ $encodedCharPos = strpos($lastChunk, "=");
1020
+ if ($encodedCharPos !== false) {
1021
+ // Found start of encoded character byte within $lookBack block.
1022
+ // Check the encoded byte value (the 2 chars after the '=')
1023
+ $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2);
1024
+ $dec = hexdec($hex);
1025
+ if ($dec < 128) { // Single byte character.
1026
+ // If the encoded char was found at pos 0, it will fit
1027
+ // otherwise reduce maxLength to start of the encoded char
1028
+ $maxLength = ($encodedCharPos == 0) ? $maxLength :
1029
+ $maxLength - ($lookBack - $encodedCharPos);
1030
+ $foundSplitPos = true;
1031
+ } elseif ($dec >= 192) { // First byte of a multi byte character
1032
+ // Reduce maxLength to split at start of character
1033
+ $maxLength = $maxLength - ($lookBack - $encodedCharPos);
1034
+ $foundSplitPos = true;
1035
+ } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back
1036
+ $lookBack += 3;
1037
+ }
1038
+ } else {
1039
+ // No encoded character found
1040
+ $foundSplitPos = true;
1041
+ }
1042
+ }
1043
+ return $maxLength;
1044
+ }
1045
+
1046
+
1047
+ /**
1048
+ * Set the body wrapping.
1049
+ * @access public
1050
+ * @return void
1051
+ */
1052
+ public function SetWordWrap() {
1053
+ if($this->WordWrap < 1) {
1054
+ return;
1055
+ }
1056
+
1057
+ switch($this->message_type) {
1058
+ case 'alt':
1059
+ case 'alt_attachments':
1060
+ $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap);
1061
+ break;
1062
+ default:
1063
+ $this->Body = $this->WrapText($this->Body, $this->WordWrap);
1064
+ break;
1065
+ }
1066
+ }
1067
+
1068
+ /**
1069
+ * Assembles message header.
1070
+ * @access public
1071
+ * @return string The assembled header
1072
+ */
1073
+ public function CreateHeader() {
1074
+ $result = '';
1075
+
1076
+ // Set the boundaries
1077
+ $uniq_id = md5(uniqid(time()));
1078
+ $this->boundary[1] = 'b1_' . $uniq_id;
1079
+ $this->boundary[2] = 'b2_' . $uniq_id;
1080
+
1081
+ $result .= $this->HeaderLine('Date', self::RFCDate());
1082
+ if($this->Sender == '') {
1083
+ $result .= $this->HeaderLine('Return-Path', trim($this->From));
1084
+ } else {
1085
+ $result .= $this->HeaderLine('Return-Path', trim($this->Sender));
1086
+ }
1087
+
1088
+ // To be created automatically by mail()
1089
+ if($this->Mailer != 'mail') {
1090
+ if ($this->SingleTo === true) {
1091
+ foreach($this->to as $t) {
1092
+ $this->SingleToArray[] = $this->AddrFormat($t);
1093
+ }
1094
+ } else {
1095
+ if(count($this->to) > 0) {
1096
+ $result .= $this->AddrAppend('To', $this->to);
1097
+ } elseif (count($this->cc) == 0) {
1098
+ $result .= $this->HeaderLine('To', 'undisclosed-recipients:;');
1099
+ }
1100
+ }
1101
+ }
1102
+
1103
+ $from = array();
1104
+ $from[0][0] = trim($this->From);
1105
+ $from[0][1] = $this->FromName;
1106
+ $result .= $this->AddrAppend('From', $from);
1107
+
1108
+ // sendmail and mail() extract Cc from the header before sending
1109
+ if(count($this->cc) > 0) {
1110
+ $result .= $this->AddrAppend('Cc', $this->cc);
1111
+ }
1112
+
1113
+ // sendmail and mail() extract Bcc from the header before sending
1114
+ if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) {
1115
+ $result .= $this->AddrAppend('Bcc', $this->bcc);
1116
+ }
1117
+
1118
+ if(count($this->ReplyTo) > 0) {
1119
+ $result .= $this->AddrAppend('Reply-to', $this->ReplyTo);
1120
+ }
1121
+
1122
+ // mail() sets the subject itself
1123
+ if($this->Mailer != 'mail') {
1124
+ $result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject)));
1125
+ }
1126
+
1127
+ if($this->MessageID != '') {
1128
+ $result .= $this->HeaderLine('Message-ID',$this->MessageID);
1129
+ } else {
1130
+ $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE);
1131
+ }
1132
+ $result .= $this->HeaderLine('X-Priority', $this->Priority);
1133
+ $result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (phpmailer.sourceforge.net)');
1134
+
1135
+ if($this->ConfirmReadingTo != '') {
1136
+ $result .= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>');
1137
+ }
1138
+
1139
+ // Add custom headers
1140
+ for($index = 0; $index < count($this->CustomHeader); $index++) {
1141
+ $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1])));
1142
+ }
1143
+ if (!$this->sign_key_file) {
1144
+ $result .= $this->HeaderLine('MIME-Version', '1.0');
1145
+ $result .= $this->GetMailMIME();
1146
+ }
1147
+
1148
+ return $result;
1149
+ }
1150
+
1151
+ /**
1152
+ * Returns the message MIME.
1153
+ * @access public
1154
+ * @return string
1155
+ */
1156
+ public function GetMailMIME() {
1157
+ $result = '';
1158
+ switch($this->message_type) {
1159
+ case 'plain':
1160
+ $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding);
1161
+ $result .= sprintf("Content-Type: %s; charset=\"%s\"", $this->ContentType, $this->CharSet);
1162
+ break;
1163
+ case 'attachments':
1164
+ case 'alt_attachments':
1165
+ if($this->InlineImageExists()){
1166
+ $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 'multipart/related', $this->LE, $this->LE, $this->boundary[1], $this->LE);
1167
+ } else {
1168
+ $result .= $this->HeaderLine('Content-Type', 'multipart/mixed;');
1169
+ $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
1170
+ }
1171
+ break;
1172
+ case 'alt':
1173
+ $result .= $this->HeaderLine('Content-Type', 'multipart/alternative;');
1174
+ $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
1175
+ break;
1176
+ }
1177
+
1178
+ if($this->Mailer != 'mail') {
1179
+ $result .= $this->LE.$this->LE;
1180
+ }
1181
+
1182
+ return $result;
1183
+ }
1184
+
1185
+ /**
1186
+ * Assembles the message body. Returns an empty string on failure.
1187
+ * @access public
1188
+ * @return string The assembled message body
1189
+ */
1190
+ public function CreateBody() {
1191
+ $body = '';
1192
+
1193
+ if ($this->sign_key_file) {
1194
+ $body .= $this->GetMailMIME();
1195
+ }
1196
+
1197
+ $this->SetWordWrap();
1198
+
1199
+ switch($this->message_type) {
1200
+ case 'alt':
1201
+ $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', '');
1202
+ $body .= $this->EncodeString($this->AltBody, $this->Encoding);
1203
+ $body .= $this->LE.$this->LE;
1204
+ $body .= $this->GetBoundary($this->boundary[1], '', 'text/html', '');
1205
+ $body .= $this->EncodeString($this->Body, $this->Encoding);
1206
+ $body .= $this->LE.$this->LE;
1207
+ $body .= $this->EndBoundary($this->boundary[1]);
1208
+ break;
1209
+ case 'plain':
1210
+ $body .= $this->EncodeString($this->Body, $this->Encoding);
1211
+ break;
1212
+ case 'attachments':
1213
+ $body .= $this->GetBoundary($this->boundary[1], '', '', '');
1214
+ $body .= $this->EncodeString($this->Body, $this->Encoding);
1215
+ $body .= $this->LE;
1216
+ $body .= $this->AttachAll();
1217
+ break;
1218
+ case 'alt_attachments':
1219
+ $body .= sprintf("--%s%s", $this->boundary[1], $this->LE);
1220
+ $body .= sprintf("Content-Type: %s;%s" . "\tboundary=\"%s\"%s", 'multipart/alternative', $this->LE, $this->boundary[2], $this->LE.$this->LE);
1221
+ $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '') . $this->LE; // Create text body
1222
+ $body .= $this->EncodeString($this->AltBody, $this->Encoding);
1223
+ $body .= $this->LE.$this->LE;
1224
+ $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', '') . $this->LE; // Create the HTML body
1225
+ $body .= $this->EncodeString($this->Body, $this->Encoding);
1226
+ $body .= $this->LE.$this->LE;
1227
+ $body .= $this->EndBoundary($this->boundary[2]);
1228
+ $body .= $this->AttachAll();
1229
+ break;
1230
+ }
1231
+
1232
+ if ($this->IsError()) {
1233
+ $body = '';
1234
+ } elseif ($this->sign_key_file) {
1235
+ try {
1236
+ $file = tempnam('', 'mail');
1237
+ file_put_contents($file, $body); //TODO check this worked
1238
+ $signed = tempnam("", "signed");
1239
+ if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) {
1240
+ @unlink($file);
1241
+ @unlink($signed);
1242
+ $body = file_get_contents($signed);
1243
+ } else {
1244
+ @unlink($file);
1245
+ @unlink($signed);
1246
+ throw new phpmailerException($this->Lang("signing").openssl_error_string());
1247
+ }
1248
+ } catch (phpmailerException $e) {
1249
+ $body = '';
1250
+ if ($this->exceptions) {
1251
+ throw $e;
1252
+ }
1253
+ }
1254
+ }
1255
+
1256
+ return $body;
1257
+ }
1258
+
1259
+ /**
1260
+ * Returns the start of a message boundary.
1261
+ * @access private
1262
+ */
1263
+ private function GetBoundary($boundary, $charSet, $contentType, $encoding) {
1264
+ $result = '';
1265
+ if($charSet == '') {
1266
+ $charSet = $this->CharSet;
1267
+ }
1268
+ if($contentType == '') {
1269
+ $contentType = $this->ContentType;
1270
+ }
1271
+ if($encoding == '') {
1272
+ $encoding = $this->Encoding;
1273
+ }
1274
+ $result .= $this->TextLine('--' . $boundary);
1275
+ $result .= sprintf("Content-Type: %s; charset = \"%s\"", $contentType, $charSet);
1276
+ $result .= $this->LE;
1277
+ $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding);
1278
+ $result .= $this->LE;
1279
+
1280
+ return $result;
1281
+ }
1282
+
1283
+ /**
1284
+ * Returns the end of a message boundary.
1285
+ * @access private
1286
+ */
1287
+ private function EndBoundary($boundary) {
1288
+ return $this->LE . '--' . $boundary . '--' . $this->LE;
1289
+ }
1290
+
1291
+ /**
1292
+ * Sets the message type.
1293
+ * @access private
1294
+ * @return void
1295
+ */
1296
+ private function SetMessageType() {
1297
+ if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) {
1298
+ $this->message_type = 'plain';
1299
+ } else {
1300
+ if(count($this->attachment) > 0) {
1301
+ $this->message_type = 'attachments';
1302
+ }
1303
+ if(strlen($this->AltBody) > 0 && count($this->attachment) < 1) {
1304
+ $this->message_type = 'alt';
1305
+ }
1306
+ if(strlen($this->AltBody) > 0 && count($this->attachment) > 0) {
1307
+ $this->message_type = 'alt_attachments';
1308
+ }
1309
+ }
1310
+ }
1311
+
1312
+ /**
1313
+ * Returns a formatted header line.
1314
+ * @access public
1315
+ * @return string
1316
+ */
1317
+ public function HeaderLine($name, $value) {
1318
+ return $name . ': ' . $value . $this->LE;
1319
+ }
1320
+
1321
+ /**
1322
+ * Returns a formatted mail line.
1323
+ * @access public
1324
+ * @return string
1325
+ */
1326
+ public function TextLine($value) {
1327
+ return $value . $this->LE;
1328
+ }
1329
+
1330
+ /////////////////////////////////////////////////
1331
+ // CLASS METHODS, ATTACHMENTS
1332
+ /////////////////////////////////////////////////
1333
+
1334
+ /**
1335
+ * Adds an attachment from a path on the filesystem.
1336
+ * Returns false if the file could not be found
1337
+ * or accessed.
1338
+ * @param string $path Path to the attachment.
1339
+ * @param string $name Overrides the attachment name.
1340
+ * @param string $encoding File encoding (see $Encoding).
1341
+ * @param string $type File extension (MIME) type.
1342
+ * @return bool
1343
+ */
1344
+ public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
1345
+ try {
1346
+ if ( !@is_file($path) ) {
1347
+ throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE);
1348
+ }
1349
+ $filename = basename($path);
1350
+ if ( $name == '' ) {
1351
+ $name = $filename;
1352
+ }
1353
+
1354
+ $this->attachment[] = array(
1355
+ 0 => $path,
1356
+ 1 => $filename,
1357
+ 2 => $name,
1358
+ 3 => $encoding,
1359
+ 4 => $type,
1360
+ 5 => false, // isStringAttachment
1361
+ 6 => 'attachment',
1362
+ 7 => 0
1363
+ );
1364
+
1365
+ } catch (phpmailerException $e) {
1366
+ $this->SetError($e->getMessage());
1367
+ if ($this->exceptions) {
1368
+ throw $e;
1369
+ }
1370
+ echo $e->getMessage()."\n";
1371
+ if ( $e->getCode() == self::STOP_CRITICAL ) {
1372
+ return false;
1373
+ }
1374
+ }
1375
+ return true;
1376
+ }
1377
+
1378
+ /**
1379
+ * Return the current array of attachments
1380
+ * @return array
1381
+ */
1382
+ public function GetAttachments() {
1383
+ return $this->attachment;
1384
+ }
1385
+
1386
+ /**
1387
+ * Attaches all fs, string, and binary attachments to the message.
1388
+ * Returns an empty string on failure.
1389
+ * @access private
1390
+ * @return string
1391
+ */
1392
+ private function AttachAll() {
1393
+ // Return text of body
1394
+ $mime = array();
1395
+ $cidUniq = array();
1396
+ $incl = array();
1397
+
1398
+ // Add all attachments
1399
+ foreach ($this->attachment as $attachment) {
1400
+ // Check for string attachment
1401
+ $bString = $attachment[5];
1402
+ if ($bString) {
1403
+ $string = $attachment[0];
1404
+ } else {
1405
+ $path = $attachment[0];
1406
+ }
1407
+
1408
+ if (in_array($attachment[0], $incl)) { continue; }
1409
+ $filename = $attachment[1];
1410
+ $name = $attachment[2];
1411
+ $encoding = $attachment[3];
1412
+ $type = $attachment[4];
1413
+ $disposition = $attachment[6];
1414
+ $cid = $attachment[7];
1415
+ $incl[] = $attachment[0];
1416
+ if ( $disposition == 'inline' && isset($cidUniq[$cid]) ) { continue; }
1417
+ $cidUniq[$cid] = true;
1418
+
1419
+ $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE);
1420
+ $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE);
1421
+ $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE);
1422
+
1423
+ if($disposition == 'inline') {
1424
+ $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE);
1425
+ }
1426
+
1427
+ $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE);
1428
+
1429
+ // Encode as string attachment
1430
+ if($bString) {
1431
+ $mime[] = $this->EncodeString($string, $encoding);
1432
+ if($this->IsError()) {
1433
+ return '';
1434
+ }
1435
+ $mime[] = $this->LE.$this->LE;
1436
+ } else {
1437
+ $mime[] = $this->EncodeFile($path, $encoding);
1438
+ if($this->IsError()) {
1439
+ return '';
1440
+ }
1441
+ $mime[] = $this->LE.$this->LE;
1442
+ }
1443
+ }
1444
+
1445
+ $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE);
1446
+
1447
+ return join('', $mime);
1448
+ }
1449
+
1450
+ /**
1451
+ * Encodes attachment in requested format.
1452
+ * Returns an empty string on failure.
1453
+ * @param string $path The full path to the file
1454
+ * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
1455
+ * @see EncodeFile()
1456
+ * @access private
1457
+ * @return string
1458
+ */
1459
+ private function EncodeFile($path, $encoding = 'base64') {
1460
+ try {
1461
+ if (!is_readable($path)) {
1462
+ throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE);
1463
+ }
1464
+ if (function_exists('get_magic_quotes')) {
1465
+ function get_magic_quotes() {
1466
+ return false;
1467
+ }
1468
+ }
1469
+ if (PHP_VERSION < 6) {
1470
+ $magic_quotes = get_magic_quotes_runtime();
1471
+ set_magic_quotes_runtime(0);
1472
+ }
1473
+ $file_buffer = file_get_contents($path);
1474
+ $file_buffer = $this->EncodeString($file_buffer, $encoding);
1475
+ if (PHP_VERSION < 6) { set_magic_quotes_runtime($magic_quotes); }
1476
+ return $file_buffer;
1477
+ } catch (Exception $e) {
1478
+ $this->SetError($e->getMessage());
1479
+ return '';
1480
+ }
1481
+ }
1482
+
1483
+ /**
1484
+ * Encodes string to requested format.
1485
+ * Returns an empty string on failure.
1486
+ * @param string $str The text to encode
1487
+ * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
1488
+ * @access public
1489
+ * @return string
1490
+ */
1491
+ public function EncodeString ($str, $encoding = 'base64') {
1492
+ $encoded = '';
1493
+ switch(strtolower($encoding)) {
1494
+ case 'base64':
1495
+ $encoded = chunk_split(base64_encode($str), 76, $this->LE);
1496
+ break;
1497
+ case '7bit':
1498
+ case '8bit':
1499
+ $encoded = $this->FixEOL($str);
1500
+ //Make sure it ends with a line break
1501
+ if (substr($encoded, -(strlen($this->LE))) != $this->LE)
1502
+ $encoded .= $this->LE;
1503
+ break;
1504
+ case 'binary':
1505
+ $encoded = $str;
1506
+ break;
1507
+ case 'quoted-printable':
1508
+ $encoded = $this->EncodeQP($str);
1509
+ break;
1510
+ default:
1511
+ $this->SetError($this->Lang('encoding') . $encoding);
1512
+ break;
1513
+ }
1514
+ return $encoded;
1515
+ }
1516
+
1517
+ /**
1518
+ * Encode a header string to best (shortest) of Q, B, quoted or none.
1519
+ * @access public
1520
+ * @return string
1521
+ */
1522
+ public function EncodeHeader($str, $position = 'text') {
1523
+ $x = 0;
1524
+
1525
+ switch (strtolower($position)) {
1526
+ case 'phrase':
1527
+ if (!preg_match('/[\200-\377]/', $str)) {
1528
+ // Can't use addslashes as we don't know what value has magic_quotes_sybase
1529
+ $encoded = addcslashes($str, "\0..\37\177\\\"");
1530
+ if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) {
1531
+ return ($encoded);
1532
+ } else {
1533
+ return ("\"$encoded\"");
1534
+ }
1535
+ }
1536
+ $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches);
1537
+ break;
1538
+ case 'comment':
1539
+ $x = preg_match_all('/[()"]/', $str, $matches);
1540
+ // Fall-through
1541
+ case 'text':
1542
+ default:
1543
+ $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);
1544
+ break;
1545
+ }
1546
+
1547
+ if ($x == 0) {
1548
+ return ($str);
1549
+ }
1550
+
1551
+ $maxlen = 75 - 7 - strlen($this->CharSet);
1552
+ // Try to select the encoding which should produce the shortest output
1553
+ if (strlen($str)/3 < $x) {
1554
+ $encoding = 'B';
1555
+ if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) {
1556
+ // Use a custom function which correctly encodes and wraps long
1557
+ // multibyte strings without breaking lines within a character
1558
+ $encoded = $this->Base64EncodeWrapMB($str);
1559
+ } else {
1560
+ $encoded = base64_encode($str);
1561
+ $maxlen -= $maxlen % 4;
1562
+ $encoded = trim(chunk_split($encoded, $maxlen, "\n"));
1563
+ }
1564
+ } else {
1565
+ $encoding = 'Q';
1566
+ $encoded = $this->EncodeQ($str, $position);
1567
+ $encoded = $this->WrapText($encoded, $maxlen, true);
1568
+ $encoded = str_replace('='.$this->LE, "\n", trim($encoded));
1569
+ }
1570
+
1571
+ $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded);
1572
+ $encoded = trim(str_replace("\n", $this->LE, $encoded));
1573
+
1574
+ return $encoded;
1575
+ }
1576
+
1577
+ /**
1578
+ * Checks if a string contains multibyte characters.
1579
+ * @access public
1580
+ * @param string $str multi-byte text to wrap encode
1581
+ * @return bool
1582
+ */
1583
+ public function HasMultiBytes($str) {
1584
+ if (function_exists('mb_strlen')) {
1585
+ return (strlen($str) > mb_strlen($str, $this->CharSet));
1586
+ } else { // Assume no multibytes (we can't handle without mbstring functions anyway)
1587
+ return false;
1588
+ }
1589
+ }
1590
+
1591
+ /**
1592
+ * Correctly encodes and wraps long multibyte strings for mail headers
1593
+ * without breaking lines within a character.
1594
+ * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php
1595
+ * @access public
1596
+ * @param string $str multi-byte text to wrap encode
1597
+ * @return string
1598
+ */
1599
+ public function Base64EncodeWrapMB($str) {
1600
+ $start = "=?".$this->CharSet."?B?";
1601
+ $end = "?=";
1602
+ $encoded = "";
1603
+
1604
+ $mb_length = mb_strlen($str, $this->CharSet);
1605
+ // Each line must have length <= 75, including $start and $end
1606
+ $length = 75 - strlen($start) - strlen($end);
1607
+ // Average multi-byte ratio
1608
+ $ratio = $mb_length / strlen($str);
1609
+ // Base64 has a 4:3 ratio
1610
+ $offset = $avgLength = floor($length * $ratio * .75);
1611
+
1612
+ for ($i = 0; $i < $mb_length; $i += $offset) {
1613
+ $lookBack = 0;
1614
+
1615
+ do {
1616
+ $offset = $avgLength - $lookBack;
1617
+ $chunk = mb_substr($str, $i, $offset, $this->CharSet);
1618
+ $chunk = base64_encode($chunk);
1619
+ $lookBack++;
1620
+ }
1621
+ while (strlen($chunk) > $length);
1622
+
1623
+ $encoded .= $chunk . $this->LE;
1624
+ }
1625
+
1626
+ // Chomp the last linefeed
1627
+ $encoded = substr($encoded, 0, -strlen($this->LE));
1628
+ return $encoded;
1629
+ }
1630
+
1631
+ /**
1632
+ * Encode string to quoted-printable.
1633
+ * Only uses standard PHP, slow, but will always work
1634
+ * @access public
1635
+ * @param string $string the text to encode
1636
+ * @param integer $line_max Number of chars allowed on a line before wrapping
1637
+ * @return string
1638
+ */
1639
+ public function EncodeQPphp( $input = '', $line_max = 76, $space_conv = false) {
1640
+ $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
1641
+ $lines = preg_split('/(?:\r\n|\r|\n)/', $input);
1642
+ $eol = "\r\n";
1643
+ $escape = '=';
1644
+ $output = '';
1645
+ while( list(, $line) = each($lines) ) {
1646
+ $linlen = strlen($line);
1647
+ $newline = '';
1648
+ for($i = 0; $i < $linlen; $i++) {
1649
+ $c = substr( $line, $i, 1 );
1650
+ $dec = ord( $c );
1651
+ if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E
1652
+ $c = '=2E';
1653
+ }
1654
+ if ( $dec == 32 ) {
1655
+ if ( $i == ( $linlen - 1 ) ) { // convert space at eol only
1656
+ $c = '=20';
1657
+ } else if ( $space_conv ) {
1658
+ $c = '=20';
1659
+ }
1660
+ } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required
1661
+ $h2 = floor($dec/16);
1662
+ $h1 = floor($dec%16);
1663
+ $c = $escape.$hex[$h2].$hex[$h1];
1664
+ }
1665
+ if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
1666
+ $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
1667
+ $newline = '';
1668
+ // check if newline first character will be point or not
1669
+ if ( $dec == 46 ) {
1670
+ $c = '=2E';
1671
+ }
1672
+ }
1673
+ $newline .= $c;
1674
+ } // end of for
1675
+ $output .= $newline.$eol;
1676
+ } // end of while
1677
+ return $output;
1678
+ }
1679
+
1680
+ /**
1681
+ * Encode string to RFC2045 (6.7) quoted-printable format
1682
+ * Uses a PHP5 stream filter to do the encoding about 64x faster than the old version
1683
+ * Also results in same content as you started with after decoding
1684
+ * @see EncodeQPphp()
1685
+ * @access public
1686
+ * @param string $string the text to encode
1687
+ * @param integer $line_max Number of chars allowed on a line before wrapping
1688
+ * @param boolean $space_conv Dummy param for compatibility with existing EncodeQP function
1689
+ * @return string
1690
+ * @author Marcus Bointon
1691
+ */
1692
+ public function EncodeQP($string, $line_max = 76, $space_conv = false) {
1693
+ if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3)
1694
+ return quoted_printable_encode($string);
1695
+ }
1696
+ $filters = stream_get_filters();
1697
+ if (!in_array('convert.*', $filters)) { //Got convert stream filter?
1698
+ return $this->EncodeQPphp($string, $line_max, $space_conv); //Fall back to old implementation
1699
+ }
1700
+ $fp = fopen('php://temp/', 'r+');
1701
+ $string = preg_replace('/\r\n?/', $this->LE, $string); //Normalise line breaks
1702
+ $params = array('line-length' => $line_max, 'line-break-chars' => $this->LE);
1703
+ $s = stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params);
1704
+ fputs($fp, $string);
1705
+ rewind($fp);
1706
+ $out = stream_get_contents($fp);
1707
+ stream_filter_remove($s);
1708
+ $out = preg_replace('/^\./m', '=2E', $out); //Encode . if it is first char on a line, workaround for bug in Exchange
1709
+ fclose($fp);
1710
+ return $out;
1711
+ }
1712
+
1713
+ /**
1714
+ * Encode string to q encoding.
1715
+ * @link http://tools.ietf.org/html/rfc2047
1716
+ * @param string $str the text to encode
1717
+ * @param string $position Where the text is going to be used, see the RFC for what that means
1718
+ * @access public
1719
+ * @return string
1720
+ */
1721
+ public function EncodeQ ($str, $position = 'text') {
1722
+ // There should not be any EOL in the string
1723
+ $encoded = preg_replace('/[\r\n]*/', '', $str);
1724
+
1725
+ switch (strtolower($position)) {
1726
+ case 'phrase':
1727
+ $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
1728
+ break;
1729
+ case 'comment':
1730
+ $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
1731
+ case 'text':
1732
+ default:
1733
+ // Replace every high ascii, control =, ? and _ characters
1734
+ //TODO using /e (equivalent to eval()) is probably not a good idea
1735
+ $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e',
1736
+ "'='.sprintf('%02X', ord('\\1'))", $encoded);
1737
+ break;
1738
+ }
1739
+
1740
+ // Replace every spaces to _ (more readable than =20)
1741
+ $encoded = str_replace(' ', '_', $encoded);
1742
+
1743
+ return $encoded;
1744
+ }
1745
+
1746
+ /**
1747
+ * Adds a string or binary attachment (non-filesystem) to the list.
1748
+ * This method can be used to attach ascii or binary data,
1749
+ * such as a BLOB record from a database.
1750
+ * @param string $string String attachment data.
1751
+ * @param string $filename Name of the attachment.
1752
+ * @param string $encoding File encoding (see $Encoding).
1753
+ * @param string $type File extension (MIME) type.
1754
+ * @return void
1755
+ */
1756
+ public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') {
1757
+ // Append to $attachment array
1758
+ $this->attachment[] = array(
1759
+ 0 => $string,
1760
+ 1 => $filename,
1761
+ 2 => basename($filename),
1762
+ 3 => $encoding,
1763
+ 4 => $type,
1764
+ 5 => true, // isStringAttachment
1765
+ 6 => 'attachment',
1766
+ 7 => 0
1767
+ );
1768
+ }
1769
+
1770
+ /**
1771
+ * Adds an embedded attachment. This can include images, sounds, and
1772
+ * just about any other document. Make sure to set the $type to an
1773
+ * image type. For JPEG images use "image/jpeg" and for GIF images
1774
+ * use "image/gif".
1775
+ * @param string $path Path to the attachment.
1776
+ * @param string $cid Content ID of the attachment. Use this to identify
1777
+ * the Id for accessing the image in an HTML form.
1778
+ * @param string $name Overrides the attachment name.
1779
+ * @param string $encoding File encoding (see $Encoding).
1780
+ * @param string $type File extension (MIME) type.
1781
+ * @return bool
1782
+ */
1783
+ public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
1784
+
1785
+ if ( !@is_file($path) ) {
1786
+ $this->SetError($this->Lang('file_access') . $path);
1787
+ return false;
1788
+ }
1789
+
1790
+ $filename = basename($path);
1791
+ if ( $name == '' ) {
1792
+ $name = $filename;
1793
+ }
1794
+
1795
+ // Append to $attachment array
1796
+ $this->attachment[] = array(
1797
+ 0 => $path,
1798
+ 1 => $filename,
1799
+ 2 => $name,
1800
+ 3 => $encoding,
1801
+ 4 => $type,
1802
+ 5 => false, // isStringAttachment
1803
+ 6 => 'inline',
1804
+ 7 => $cid
1805
+ );
1806
+
1807
+ return true;
1808
+ }
1809
+
1810
+ /**
1811
+ * Returns true if an inline attachment is present.
1812
+ * @access public
1813
+ * @return bool
1814
+ */
1815
+ public function InlineImageExists() {
1816
+ foreach($this->attachment as $attachment) {
1817
+ if ($attachment[6] == 'inline') {
1818
+ return true;
1819
+ }
1820
+ }
1821
+ return false;
1822
+ }
1823
+
1824
+ /////////////////////////////////////////////////
1825
+ // CLASS METHODS, MESSAGE RESET
1826
+ /////////////////////////////////////////////////
1827
+
1828
+ /**
1829
+ * Clears all recipients assigned in the TO array. Returns void.
1830
+ * @return void
1831
+ */
1832
+ public function ClearAddresses() {
1833
+ foreach($this->to as $to) {
1834
+ unset($this->all_recipients[strtolower($to[0])]);
1835
+ }
1836
+ $this->to = array();
1837
+ }
1838
+
1839
+ /**
1840
+ * Clears all recipients assigned in the CC array. Returns void.
1841
+ * @return void
1842
+ */
1843
+ public function ClearCCs() {
1844
+ foreach($this->cc as $cc) {
1845
+ unset($this->all_recipients[strtolower($cc[0])]);
1846
+ }
1847
+ $this->cc = array();
1848
+ }
1849
+
1850
+ /**
1851
+ * Clears all recipients assigned in the BCC array. Returns void.
1852
+ * @return void
1853
+ */
1854
+ public function ClearBCCs() {
1855
+ foreach($this->bcc as $bcc) {
1856
+ unset($this->all_recipients[strtolower($bcc[0])]);
1857
+ }
1858
+ $this->bcc = array();
1859
+ }
1860
+
1861
+ /**
1862
+ * Clears all recipients assigned in the ReplyTo array. Returns void.
1863
+ * @return void
1864
+ */
1865
+ public function ClearReplyTos() {
1866
+ $this->ReplyTo = array();
1867
+ }
1868
+
1869
+ /**
1870
+ * Clears all recipients assigned in the TO, CC and BCC
1871
+ * array. Returns void.
1872
+ * @return void
1873
+ */
1874
+ public function ClearAllRecipients() {
1875
+ $this->to = array();
1876
+ $this->cc = array();
1877
+ $this->bcc = array();
1878
+ $this->all_recipients = array();
1879
+ }
1880
+
1881
+ /**
1882
+ * Clears all previously set filesystem, string, and binary
1883
+ * attachments. Returns void.
1884
+ * @return void
1885
+ */
1886
+ public function ClearAttachments() {
1887
+ $this->attachment = array();
1888
+ }
1889
+
1890
+ /**
1891
+ * Clears all custom headers. Returns void.
1892
+ * @return void
1893
+ */
1894
+ public function ClearCustomHeaders() {
1895
+ $this->CustomHeader = array();
1896
+ }
1897
+
1898
+ /////////////////////////////////////////////////
1899
+ // CLASS METHODS, MISCELLANEOUS
1900
+ /////////////////////////////////////////////////
1901
+
1902
+ /**
1903
+ * Adds the error message to the error container.
1904
+ * @access protected
1905
+ * @return void
1906
+ */
1907
+ protected function SetError($msg) {
1908
+ $this->error_count++;
1909
+ if ($this->Mailer == 'smtp' and !is_null($this->smtp)) {
1910
+ $lasterror = $this->smtp->getError();
1911
+ if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) {
1912
+ $msg .= '<p>' . $this->Lang('smtp_error') . $lasterror['smtp_msg'] . "</p>\n";
1913
+ }
1914
+ }
1915
+ $this->ErrorInfo = $msg;
1916
+ }
1917
+
1918
+ /**
1919
+ * Returns the proper RFC 822 formatted date.
1920
+ * @access public
1921
+ * @return string
1922
+ * @static
1923
+ */
1924
+ public static function RFCDate() {
1925
+ $tz = date('Z');
1926
+ $tzs = ($tz < 0) ? '-' : '+';
1927
+ $tz = abs($tz);
1928
+ $tz = (int)($tz/3600)*100 + ($tz%3600)/60;
1929
+ $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);
1930
+
1931
+ return $result;
1932
+ }
1933
+
1934
+ /**
1935
+ * Returns the server hostname or 'localhost.localdomain' if unknown.
1936
+ * @access private
1937
+ * @return string
1938
+ */
1939
+ private function ServerHostname() {
1940
+ if (!empty($this->Hostname)) {
1941
+ $result = $this->Hostname;
1942
+ } elseif (isset($_SERVER['SERVER_NAME'])) {
1943
+ $result = $_SERVER['SERVER_NAME'];
1944
+ } else {
1945
+ $result = 'localhost.localdomain';
1946
+ }
1947
+
1948
+ return $result;
1949
+ }
1950
+
1951
+ /**
1952
+ * Returns a message in the appropriate language.
1953
+ * @access private
1954
+ * @return string
1955
+ */
1956
+ private function Lang($key) {
1957
+ if(count($this->language) < 1) {
1958
+ $this->SetLanguage('en'); // set the default language
1959
+ }
1960
+
1961
+ if(isset($this->language[$key])) {
1962
+ return $this->language[$key];
1963
+ } else {
1964
+ return 'Language string failed to load: ' . $key;
1965
+ }
1966
+ }
1967
+
1968
+ /**
1969
+ * Returns true if an error occurred.
1970
+ * @access public
1971
+ * @return bool
1972
+ */
1973
+ public function IsError() {
1974
+ return ($this->error_count > 0);
1975
+ }
1976
+
1977
+ /**
1978
+ * Changes every end of line from CR or LF to CRLF.
1979
+ * @access private
1980
+ * @return string
1981
+ */
1982
+ private function FixEOL($str) {
1983
+ $str = str_replace("\r\n", "\n", $str);
1984
+ $str = str_replace("\r", "\n", $str);
1985
+ $str = str_replace("\n", $this->LE, $str);
1986
+ return $str;
1987
+ }
1988
+
1989
+ /**
1990
+ * Adds a custom header.
1991
+ * @access public
1992
+ * @return void
1993
+ */
1994
+ public function AddCustomHeader($custom_header) {
1995
+ $this->CustomHeader[] = explode(':', $custom_header, 2);
1996
+ }
1997
+
1998
+ /**
1999
+ * Evaluates the message and returns modifications for inline images and backgrounds
2000
+ * @access public
2001
+ * @return $message
2002
+ */
2003
+ public function MsgHTML($message, $basedir = '') {
2004
+ preg_match_all("/(src|background)=\"(.*)\"/Ui", $message, $images);
2005
+ if(isset($images[2])) {
2006
+ foreach($images[2] as $i => $url) {
2007
+ // do not change urls for absolute images (thanks to corvuscorax)
2008
+ if (!preg_match('#^[A-z]+://#',$url)) {
2009
+ $filename = basename($url);
2010
+ $directory = dirname($url);
2011
+ ($directory == '.')?$directory='':'';
2012
+ $cid = 'cid:' . md5($filename);
2013
+ $ext = pathinfo($filename, PATHINFO_EXTENSION);
2014
+ $mimeType = self::_mime_types($ext);
2015
+ if ( strlen($basedir) > 1 && substr($basedir,-1) != '/') { $basedir .= '/'; }
2016
+ if ( strlen($directory) > 1 && substr($directory,-1) != '/') { $directory .= '/'; }
2017
+ if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($filename), $filename, 'base64',$mimeType) ) {
2018
+ $message = preg_replace("/".$images[1][$i]."=\"".preg_quote($url, '/')."\"/Ui", $images[1][$i]."=\"".$cid."\"", $message);
2019
+ }
2020
+ }
2021
+ }
2022
+ }
2023
+ $this->IsHTML(true);
2024
+ $this->Body = $message;
2025
+ $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s','',$message)));
2026
+ if (!empty($textMsg) && empty($this->AltBody)) {
2027
+ $this->AltBody = html_entity_decode($textMsg);
2028
+ }
2029
+ if (empty($this->AltBody)) {
2030
+ $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n";
2031
+ }
2032
+ }
2033
+
2034
+ /**
2035
+ * Gets the MIME type of the embedded or inline image
2036
+ * @param string File extension
2037
+ * @access public
2038
+ * @return string MIME type of ext
2039
+ * @static
2040
+ */
2041
+ public static function _mime_types($ext = '') {
2042
+ $mimes = array(
2043
+ 'hqx' => 'application/mac-binhex40',
2044
+ 'cpt' => 'application/mac-compactpro',
2045
+ 'doc' => 'application/msword',
2046
+ 'bin' => 'application/macbinary',
2047
+ 'dms' => 'application/octet-stream',
2048
+ 'lha' => 'application/octet-stream',
2049
+ 'lzh' => 'application/octet-stream',
2050
+ 'exe' => 'application/octet-stream',
2051
+ 'class' => 'application/octet-stream',
2052
+ 'psd' => 'application/octet-stream',
2053
+ 'so' => 'application/octet-stream',
2054
+ 'sea' => 'application/octet-stream',
2055
+ 'dll' => 'application/octet-stream',
2056
+ 'oda' => 'application/oda',
2057
+ 'pdf' => 'application/pdf',
2058
+ 'ai' => 'application/postscript',
2059
+ 'eps' => 'application/postscript',
2060
+ 'ps' => 'application/postscript',
2061
+ 'smi' => 'application/smil',
2062
+ 'smil' => 'application/smil',
2063
+ 'mif' => 'application/vnd.mif',
2064
+ 'xls' => 'application/vnd.ms-excel',
2065
+ 'ppt' => 'application/vnd.ms-powerpoint',
2066
+ 'wbxml' => 'application/vnd.wap.wbxml',
2067
+ 'wmlc' => 'application/vnd.wap.wmlc',
2068
+ 'dcr' => 'application/x-director',
2069
+ 'dir' => 'application/x-director',
2070
+ 'dxr' => 'application/x-director',
2071
+ 'dvi' => 'application/x-dvi',
2072
+ 'gtar' => 'application/x-gtar',
2073
+ 'php' => 'application/x-httpd-php',
2074
+ 'php4' => 'application/x-httpd-php',
2075
+ 'php3' => 'application/x-httpd-php',
2076
+ 'phtml' => 'application/x-httpd-php',
2077
+ 'phps' => 'application/x-httpd-php-source',
2078
+ 'js' => 'application/x-javascript',
2079
+ 'swf' => 'application/x-shockwave-flash',
2080
+ 'sit' => 'application/x-stuffit',
2081
+ 'tar' => 'application/x-tar',
2082
+ 'tgz' => 'application/x-tar',
2083
+ 'xhtml' => 'application/xhtml+xml',
2084
+ 'xht' => 'application/xhtml+xml',
2085
+ 'zip' => 'application/zip',
2086
+ 'mid' => 'audio/midi',
2087
+ 'midi' => 'audio/midi',
2088
+ 'mpga' => 'audio/mpeg',
2089
+ 'mp2' => 'audio/mpeg',
2090
+ 'mp3' => 'audio/mpeg',
2091
+ 'aif' => 'audio/x-aiff',
2092
+ 'aiff' => 'audio/x-aiff',
2093
+ 'aifc' => 'audio/x-aiff',
2094
+ 'ram' => 'audio/x-pn-realaudio',
2095
+ 'rm' => 'audio/x-pn-realaudio',
2096
+ 'rpm' => 'audio/x-pn-realaudio-plugin',
2097
+ 'ra' => 'audio/x-realaudio',
2098
+ 'rv' => 'video/vnd.rn-realvideo',
2099
+ 'wav' => 'audio/x-wav',
2100
+ 'bmp' => 'image/bmp',
2101
+ 'gif' => 'image/gif',
2102
+ 'jpeg' => 'image/jpeg',
2103
+ 'jpg' => 'image/jpeg',
2104
+ 'jpe' => 'image/jpeg',
2105
+ 'png' => 'image/png',
2106
+ 'tiff' => 'image/tiff',
2107
+ 'tif' => 'image/tiff',
2108
+ 'css' => 'text/css',
2109
+ 'html' => 'text/html',
2110
+ 'htm' => 'text/html',
2111
+ 'shtml' => 'text/html',
2112
+ 'txt' => 'text/plain',
2113
+ 'text' => 'text/plain',
2114
+ 'log' => 'text/plain',
2115
+ 'rtx' => 'text/richtext',
2116
+ 'rtf' => 'text/rtf',
2117
+ 'xml' => 'text/xml',
2118
+ 'xsl' => 'text/xml',
2119
+ 'mpeg' => 'video/mpeg',
2120
+ 'mpg' => 'video/mpeg',
2121
+ 'mpe' => 'video/mpeg',
2122
+ 'qt' => 'video/quicktime',
2123
+ 'mov' => 'video/quicktime',
2124
+ 'avi' => 'video/x-msvideo',
2125
+ 'movie' => 'video/x-sgi-movie',
2126
+ 'doc' => 'application/msword',
2127
+ 'word' => 'application/msword',
2128
+ 'xl' => 'application/excel',
2129
+ 'eml' => 'message/rfc822'
2130
+ );
2131
+ return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];
2132
+ }
2133
+
2134
+ /**
2135
+ * Set (or reset) Class Objects (variables)
2136
+ *
2137
+ * Usage Example:
2138
+ * $page->set('X-Priority', '3');
2139
+ *
2140
+ * @access public
2141
+ * @param string $name Parameter Name
2142
+ * @param mixed $value Parameter Value
2143
+ * NOTE: will not work with arrays, there are no arrays to set/reset
2144
+ * @todo Should this not be using __set() magic function?
2145
+ */
2146
+ public function set($name, $value = '') {
2147
+ try {
2148
+ if (isset($this->$name) ) {
2149
+ $this->$name = $value;
2150
+ } else {
2151
+ throw new phpmailerException($this->Lang('variable_set') . $name, self::STOP_CRITICAL);
2152
+ }
2153
+ } catch (Exception $e) {
2154
+ $this->SetError($e->getMessage());
2155
+ if ($e->getCode() == self::STOP_CRITICAL) {
2156
+ return false;
2157
+ }
2158
+ }
2159
+ return true;
2160
+ }
2161
+
2162
+ /**
2163
+ * Strips newlines to prevent header injection.
2164
+ * @access public
2165
+ * @param string $str String
2166
+ * @return string
2167
+ */
2168
+ public function SecureHeader($str) {
2169
+ $str = str_replace("\r", '', $str);
2170
+ $str = str_replace("\n", '', $str);
2171
+ return trim($str);
2172
+ }
2173
+
2174
+ /**
2175
+ * Set the private key file and password to sign the message.
2176
+ *
2177
+ * @access public
2178
+ * @param string $key_filename Parameter File Name
2179
+ * @param string $key_pass Password for private key
2180
+ */
2181
+ public function Sign($cert_filename, $key_filename, $key_pass) {
2182
+ $this->sign_cert_file = $cert_filename;
2183
+ $this->sign_key_file = $key_filename;
2184
+ $this->sign_key_pass = $key_pass;
2185
+ }
2186
+
2187
+ /**
2188
+ * Set the private key file and password to sign the message.
2189
+ *
2190
+ * @access public
2191
+ * @param string $key_filename Parameter File Name
2192
+ * @param string $key_pass Password for private key
2193
+ */
2194
+ public function DKIM_QP($txt) {
2195
+ $tmp="";
2196
+ $line="";
2197
+ for ($i=0;$i<strlen($txt);$i++) {
2198
+ $ord=ord($txt[$i]);
2199
+ if ( ((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E)) ) {
2200
+ $line.=$txt[$i];
2201
+ } else {
2202
+ $line.="=".sprintf("%02X",$ord);
2203
+ }
2204
+ }
2205
+ return $line;
2206
+ }
2207
+
2208
+ /**
2209
+ * Generate DKIM signature
2210
+ *
2211
+ * @access public
2212
+ * @param string $s Header
2213
+ */
2214
+ public function DKIM_Sign($s) {
2215
+ $privKeyStr = file_get_contents($this->DKIM_private);
2216
+ if ($this->DKIM_passphrase!='') {
2217
+ $privKey = openssl_pkey_get_private($privKeyStr,$this->DKIM_passphrase);
2218
+ } else {
2219
+ $privKey = $privKeyStr;
2220
+ }
2221
+ if (openssl_sign($s, $signature, $privKey)) {
2222
+ return base64_encode($signature);
2223
+ }
2224
+ }
2225
+
2226
+ /**
2227
+ * Generate DKIM Canonicalization Header
2228
+ *
2229
+ * @access public
2230
+ * @param string $s Header
2231
+ */
2232
+ public function DKIM_HeaderC($s) {
2233
+ $s=preg_replace("/\r\n\s+/"," ",$s);
2234
+ $lines=explode("\r\n",$s);
2235
+ foreach ($lines as $key=>$line) {
2236
+ list($heading,$value)=explode(":",$line,2);
2237
+ $heading=strtolower($heading);
2238
+ $value=preg_replace("/\s+/"," ",$value) ; // Compress useless spaces
2239
+ $lines[$key]=$heading.":".trim($value) ; // Don't forget to remove WSP around the value
2240
+ }
2241
+ $s=implode("\r\n",$lines);
2242
+ return $s;
2243
+ }
2244
+
2245
+ /**
2246
+ * Generate DKIM Canonicalization Body
2247
+ *
2248
+ * @access public
2249
+ * @param string $body Message Body
2250
+ */
2251
+ public function DKIM_BodyC($body) {
2252
+ if ($body == '') return "\r\n";
2253
+ // stabilize line endings
2254
+ $body=str_replace("\r\n","\n",$body);
2255
+ $body=str_replace("\n","\r\n",$body);
2256
+ // END stabilize line endings
2257
+ while (substr($body,strlen($body)-4,4) == "\r\n\r\n") {
2258
+ $body=substr($body,0,strlen($body)-2);
2259
+ }
2260
+ return $body;
2261
+ }
2262
+
2263
+ /**
2264
+ * Create the DKIM header, body, as new header
2265
+ *
2266
+ * @access public
2267
+ * @param string $headers_line Header lines
2268
+ * @param string $subject Subject
2269
+ * @param string $body Body
2270
+ */
2271
+ public function DKIM_Add($headers_line,$subject,$body) {
2272
+ $DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms
2273
+ $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
2274
+ $DKIMquery = 'dns/txt'; // Query method
2275
+ $DKIMtime = time() ; // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone)
2276
+ $subject_header = "Subject: $subject";
2277
+ $headers = explode("\r\n",$headers_line);
2278
+ foreach($headers as $header) {
2279
+ if (strpos($header,'From:') === 0) {
2280
+ $from_header=$header;
2281
+ } elseif (strpos($header,'To:') === 0) {
2282
+ $to_header=$header;
2283
+ }
2284
+ }
2285
+ $from = str_replace('|','=7C',$this->DKIM_QP($from_header));
2286
+ $to = str_replace('|','=7C',$this->DKIM_QP($to_header));
2287
+ $subject = str_replace('|','=7C',$this->DKIM_QP($subject_header)) ; // Copied header fields (dkim-quoted-printable
2288
+ $body = $this->DKIM_BodyC($body);
2289
+ $DKIMlen = strlen($body) ; // Length of body
2290
+ $DKIMb64 = base64_encode(pack("H*", sha1($body))) ; // Base64 of packed binary SHA-1 hash of body
2291
+ $ident = ($this->DKIM_identity == '')? '' : " i=" . $this->DKIM_identity . ";";
2292
+ $dkimhdrs = "DKIM-Signature: v=1; a=" . $DKIMsignatureType . "; q=" . $DKIMquery . "; l=" . $DKIMlen . "; s=" . $this->DKIM_selector . ";\r\n".
2293
+ "\tt=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\r\n".
2294
+ "\th=From:To:Subject;\r\n".
2295
+ "\td=" . $this->DKIM_domain . ";" . $ident . "\r\n".
2296
+ "\tz=$from\r\n".
2297
+ "\t|$to\r\n".
2298
+ "\t|$subject;\r\n".
2299
+ "\tbh=" . $DKIMb64 . ";\r\n".
2300
+ "\tb=";
2301
+ $toSign = $this->DKIM_HeaderC($from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs);
2302
+ $signed = $this->DKIM_Sign($toSign);
2303
+ return "X-PHPMAILER-DKIM: phpmailer.worxware.com\r\n".$dkimhdrs.$signed."\r\n";
2304
+ }
2305
+
2306
+ protected function doCallback($isSent,$to,$cc,$bcc,$subject,$body) {
2307
+ if (!empty($this->action_function) && function_exists($this->action_function)) {
2308
+ $params = array($isSent,$to,$cc,$bcc,$subject,$body);
2309
+ call_user_func_array($this->action_function,$params);
2310
+ }
2311
+ }
2312
+ }
2313
+
2314
+ class phpmailerException extends Exception {
2315
+ public function errorMessage() {
2316
+ $errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
2317
+ return $errorMsg;
2318
+ }
2319
+ }
2320
+ ?>
modules/phpmailer/class.pop3.php ADDED
@@ -0,0 +1,407 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*~ class.pop3.php
3
+ .---------------------------------------------------------------------------.
4
+ | Software: PHPMailer - PHP email class |
5
+ | Version: 5.1 |
6
+ | Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
7
+ | Info: http://phpmailer.sourceforge.net |
8
+ | Support: http://sourceforge.net/projects/phpmailer/ |
9
+ | ------------------------------------------------------------------------- |
10
+ | Admin: Andy Prevost (project admininistrator) |
11
+ | Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
12
+ | : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |
13
+ | Founder: Brent R. Matzelle (original founder) |
14
+ | Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. |
15
+ | Copyright (c) 2001-2003, Brent R. Matzelle |
16
+ | ------------------------------------------------------------------------- |
17
+ | License: Distributed under the Lesser General Public License (LGPL) |
18
+ | http://www.gnu.org/copyleft/lesser.html |
19
+ | This program is distributed in the hope that it will be useful - WITHOUT |
20
+ | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
21
+ | FITNESS FOR A PARTICULAR PURPOSE. |
22
+ | ------------------------------------------------------------------------- |
23
+ | We offer a number of paid services (www.codeworxtech.com): |
24
+ | - Web Hosting on highly optimized fast and secure servers |
25
+ | - Technology Consulting |
26
+ | - Oursourcing (highly qualified programmers and graphic designers) |
27
+ '---------------------------------------------------------------------------'
28
+ */
29
+
30
+ /**
31
+ * PHPMailer - PHP POP Before SMTP Authentication Class
32
+ * NOTE: Designed for use with PHP version 5 and up
33
+ * @package PHPMailer
34
+ * @author Andy Prevost
35
+ * @author Marcus Bointon
36
+ * @copyright 2004 - 2009 Andy Prevost
37
+ * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
38
+ * @version $Id: class.pop3.php 444 2009-05-05 11:22:26Z coolbru $
39
+ */
40
+
41
+ /**
42
+ * POP Before SMTP Authentication Class
43
+ * Version 5.0.0
44
+ *
45
+ * Author: Richard Davey (rich@corephp.co.uk)
46
+ * Modifications: Andy Prevost
47
+ * License: LGPL, see PHPMailer License
48
+ *
49
+ * Specifically for PHPMailer to allow POP before SMTP authentication.
50
+ * Does not yet work with APOP - if you have an APOP account, contact Richard Davey
51
+ * and we can test changes to this script.
52
+ *
53
+ * This class is based on the structure of the SMTP class originally authored by Chris Ryan
54
+ *
55
+ * This class is rfc 1939 compliant and implements all the commands
56
+ * required for POP3 connection, authentication and disconnection.
57
+ *
58
+ * @package PHPMailer
59
+ * @author Richard Davey
60
+ */
61
+
62
+ class POP3 {
63
+ /**
64
+ * Default POP3 port
65
+ * @var int
66
+ */
67
+ public $POP3_PORT = 110;
68
+
69
+ /**
70
+ * Default Timeout
71
+ * @var int
72
+ */
73
+ public $POP3_TIMEOUT = 30;
74
+
75
+ /**
76
+ * POP3 Carriage Return + Line Feed
77
+ * @var string
78
+ */
79
+ public $CRLF = "\r\n";
80
+
81
+ /**
82
+ * Displaying Debug warnings? (0 = now, 1+ = yes)
83
+ * @var int
84
+ */
85
+ public $do_debug = 2;
86
+
87
+ /**
88
+ * POP3 Mail Server
89
+ * @var string
90
+ */
91
+ public $host;
92
+
93
+ /**
94
+ * POP3 Port
95
+ * @var int
96
+ */
97
+ public $port;
98
+
99
+ /**
100
+ * POP3 Timeout Value
101
+ * @var int
102
+ */
103
+ public $tval;
104
+
105
+ /**
106
+ * POP3 Username
107
+ * @var string
108
+ */
109
+ public $username;
110
+
111
+ /**
112
+ * POP3 Password
113
+ * @var string
114
+ */
115
+ public $password;
116
+
117
+ /////////////////////////////////////////////////
118
+ // PROPERTIES, PRIVATE AND PROTECTED
119
+ /////////////////////////////////////////////////
120
+
121
+ private $pop_conn;
122
+ private $connected;
123
+ private $error; // Error log array
124
+
125
+ /**
126
+ * Constructor, sets the initial values
127
+ * @access public
128
+ * @return POP3
129
+ */
130
+ public function __construct() {
131
+ $this->pop_conn = 0;
132
+ $this->connected = false;
133
+ $this->error = null;
134
+ }
135
+
136
+ /**
137
+ * Combination of public events - connect, login, disconnect
138
+ * @access public
139
+ * @param string $host
140
+ * @param integer $port
141
+ * @param integer $tval
142
+ * @param string $username
143
+ * @param string $password
144
+ */
145
+ public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
146
+ $this->host = $host;
147
+
148
+ // If no port value is passed, retrieve it
149
+ if ($port == false) {
150
+ $this->port = $this->POP3_PORT;
151
+ } else {
152
+ $this->port = $port;
153
+ }
154
+
155
+ // If no port value is passed, retrieve it
156
+ if ($tval == false) {
157
+ $this->tval = $this->POP3_TIMEOUT;
158
+ } else {
159
+ $this->tval = $tval;
160
+ }
161
+
162
+ $this->do_debug = $debug_level;
163
+ $this->username = $username;
164
+ $this->password = $password;
165
+
166
+ // Refresh the error log
167
+ $this->error = null;
168
+
169
+ // Connect
170
+ $result = $this->Connect($this->host, $this->port, $this->tval);
171
+
172
+ if ($result) {
173
+ $login_result = $this->Login($this->username, $this->password);
174
+
175
+ if ($login_result) {
176
+ $this->Disconnect();
177
+
178
+ return true;
179
+ }
180
+
181
+ }
182
+
183
+ // We need to disconnect regardless if the login succeeded
184
+ $this->Disconnect();
185
+
186
+ return false;
187
+ }
188
+
189
+ /**
190
+ * Connect to the POP3 server
191
+ * @access public
192
+ * @param string $host
193
+ * @param integer $port
194
+ * @param integer $tval
195
+ * @return boolean
196
+ */
197
+ public function Connect ($host, $port = false, $tval = 30) {
198
+ // Are we already connected?
199
+ if ($this->connected) {
200
+ return true;
201
+ }
202
+
203
+ /*
204
+ On Windows this will raise a PHP Warning error if the hostname doesn't exist.
205
+ Rather than supress it with @fsockopen, let's capture it cleanly instead
206
+ */
207
+
208
+ set_error_handler(array(&$this, 'catchWarning'));
209
+
210
+ // Connect to the POP3 server
211
+ $this->pop_conn = fsockopen($host, // POP3 Host
212
+ $port, // Port #
213
+ $errno, // Error Number
214
+ $errstr, // Error Message
215
+ $tval); // Timeout (seconds)
216
+
217
+ // Restore the error handler
218
+ restore_error_handler();
219
+
220
+ // Does the Error Log now contain anything?
221
+ if ($this->error && $this->do_debug >= 1) {
222
+ $this->displayErrors();
223
+ }
224
+
225
+ // Did we connect?
226
+ if ($this->pop_conn == false) {
227
+ // It would appear not...
228
+ $this->error = array(
229
+ 'error' => "Failed to connect to server $host on port $port",
230
+ 'errno' => $errno,
231
+ 'errstr' => $errstr
232
+ );
233
+
234
+ if ($this->do_debug >= 1) {
235
+ $this->displayErrors();
236
+ }
237
+
238
+ return false;
239
+ }
240
+
241
+ // Increase the stream time-out
242
+
243
+ // Check for PHP 4.3.0 or later
244
+ if (version_compare(phpversion(), '5.0.0', 'ge')) {
245
+ stream_set_timeout($this->pop_conn, $tval, 0);
246
+ } else {
247
+ // Does not work on Windows
248
+ if (substr(PHP_OS, 0, 3) !== 'WIN') {
249
+ socket_set_timeout($this->pop_conn, $tval, 0);
250
+ }
251
+ }
252
+
253
+ // Get the POP3 server response
254
+ $pop3_response = $this->getResponse();
255
+
256
+ // Check for the +OK
257
+ if ($this->checkResponse($pop3_response)) {
258
+ // The connection is established and the POP3 server is talking
259
+ $this->connected = true;
260
+ return true;
261
+ }
262
+
263
+ }
264
+
265
+ /**
266
+ * Login to the POP3 server (does not support APOP yet)
267
+ * @access public
268
+ * @param string $username
269
+ * @param string $password
270
+ * @return boolean
271
+ */
272
+ public function Login ($username = '', $password = '') {
273
+ if ($this->connected == false) {
274
+ $this->error = 'Not connected to POP3 server';
275
+
276
+ if ($this->do_debug >= 1) {
277
+ $this->displayErrors();
278
+ }
279
+ }
280
+
281
+ if (empty($username)) {
282
+ $username = $this->username;
283
+ }
284
+
285
+ if (empty($password)) {
286
+ $password = $this->password;
287
+ }
288
+
289
+ $pop_username = "USER $username" . $this->CRLF;
290
+ $pop_password = "PASS $password" . $this->CRLF;
291
+
292
+ // Send the Username
293
+ $this->sendString($pop_username);
294
+ $pop3_response = $this->getResponse();
295
+
296
+ if ($this->checkResponse($pop3_response)) {
297
+ // Send the Password
298
+ $this->sendString($pop_password);
299
+ $pop3_response = $this->getResponse();
300
+
301
+ if ($this->checkResponse($pop3_response)) {
302
+ return true;
303
+ } else {
304
+ return false;
305
+ }
306
+ } else {
307
+ return false;
308
+ }
309
+ }
310
+
311
+ /**
312
+ * Disconnect from the POP3 server
313
+ * @access public
314
+ */
315
+ public function Disconnect () {
316
+ $this->sendString('QUIT');
317
+
318
+ fclose($this->pop_conn);
319
+ }
320
+
321
+ /////////////////////////////////////////////////
322
+ // Private Methods
323
+ /////////////////////////////////////////////////
324
+
325
+ /**
326
+ * Get the socket response back.
327
+ * $size is the maximum number of bytes to retrieve
328
+ * @access private
329
+ * @param integer $size
330
+ * @return string
331
+ */
332
+ private function getResponse ($size = 128) {
333
+ $pop3_response = fgets($this->pop_conn, $size);
334
+
335
+ return $pop3_response;
336
+ }
337
+
338
+ /**
339
+ * Send a string down the open socket connection to the POP3 server
340
+ * @access private
341
+ * @param string $string
342
+ * @return integer
343
+ */
344
+ private function sendString ($string) {
345
+ $bytes_sent = fwrite($this->pop_conn, $string, strlen($string));
346
+
347
+ return $bytes_sent;
348
+ }
349
+
350
+ /**
351
+ * Checks the POP3 server response for +OK or -ERR
352
+ * @access private
353
+ * @param string $string
354
+ * @return boolean
355
+ */
356
+ private function checkResponse ($string) {
357
+ if (substr($string, 0, 3) !== '+OK') {
358
+ $this->error = array(
359
+ 'error' => "Server reported an error: $string",
360
+ 'errno' => 0,
361
+ 'errstr' => ''
362
+ );
363
+
364
+ if ($this->do_debug >= 1) {
365
+ $this->displayErrors();
366
+ }
367
+
368
+ return false;
369
+ } else {
370
+ return true;
371
+ }
372
+
373
+ }
374
+
375
+ /**
376
+ * If debug is enabled, display the error message array
377
+ * @access private
378
+ */
379
+ private function displayErrors () {
380
+ echo '<pre>';
381
+
382
+ foreach ($this->error as $single_error) {
383
+ print_r($single_error);
384
+ }
385
+
386
+ echo '</pre>';
387
+ }
388
+
389
+ /**
390
+ * Takes over from PHP for the socket warning handler
391
+ * @access private
392
+ * @param integer $errno
393
+ * @param string $errstr
394
+ * @param string $errfile
395
+ * @param integer $errline
396
+ */
397
+ private function catchWarning ($errno, $errstr, $errfile, $errline) {
398
+ $this->error[] = array(
399
+ 'error' => "Connecting to the POP3 server raised a PHP warning: ",
400
+ 'errno' => $errno,
401
+ 'errstr' => $errstr
402
+ );
403
+ }
404
+
405
+ // End of class
406
+ }
407
+ ?>
modules/phpmailer/class.smtp.php ADDED
@@ -0,0 +1,814 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*~ class.smtp.php
3
+ .---------------------------------------------------------------------------.
4
+ | Software: PHPMailer - PHP email class |
5
+ | Version: 5.1 |
6
+ | Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
7
+ | Info: http://phpmailer.sourceforge.net |
8
+ | Support: http://sourceforge.net/projects/phpmailer/ |
9
+ | ------------------------------------------------------------------------- |
10
+ | Admin: Andy Prevost (project admininistrator) |
11
+ | Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
12
+ | : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |
13
+ | Founder: Brent R. Matzelle (original founder) |
14
+ | Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. |
15
+ | Copyright (c) 2001-2003, Brent R. Matzelle |
16
+ | ------------------------------------------------------------------------- |
17
+ | License: Distributed under the Lesser General Public License (LGPL) |
18
+ | http://www.gnu.org/copyleft/lesser.html |
19
+ | This program is distributed in the hope that it will be useful - WITHOUT |
20
+ | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
21
+ | FITNESS FOR A PARTICULAR PURPOSE. |
22
+ | ------------------------------------------------------------------------- |
23
+ | We offer a number of paid services (www.codeworxtech.com): |
24
+ | - Web Hosting on highly optimized fast and secure servers |
25
+ | - Technology Consulting |
26
+ | - Oursourcing (highly qualified programmers and graphic designers) |
27
+ '---------------------------------------------------------------------------'
28
+ */
29
+
30
+ /**
31
+ * PHPMailer - PHP SMTP email transport class
32
+ * NOTE: Designed for use with PHP version 5 and up
33
+ * @package PHPMailer
34
+ * @author Andy Prevost
35
+ * @author Marcus Bointon
36
+ * @copyright 2004 - 2008 Andy Prevost
37
+ * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
38
+ * @version $Id: class.smtp.php 444 2009-05-05 11:22:26Z coolbru $
39
+ */
40
+
41
+ /**
42
+ * SMTP is rfc 821 compliant and implements all the rfc 821 SMTP
43
+ * commands except TURN which will always return a not implemented
44
+ * error. SMTP also provides some utility methods for sending mail
45
+ * to an SMTP server.
46
+ * original author: Chris Ryan
47
+ */
48
+
49
+ class SMTP {
50
+ /**
51
+ * SMTP server port
52
+ * @var int
53
+ */
54
+ public $SMTP_PORT = 25;
55
+
56
+ /**
57
+ * SMTP reply line ending
58
+ * @var string
59
+ */
60
+ public $CRLF = "\r\n";
61
+
62
+ /**
63
+ * Sets whether debugging is turned on
64
+ * @var bool
65
+ */
66
+ public $do_debug; // the level of debug to perform
67
+
68
+ /**
69
+ * Sets VERP use on/off (default is off)
70
+ * @var bool
71
+ */
72
+ public $do_verp = false;
73
+
74
+ /////////////////////////////////////////////////
75
+ // PROPERTIES, PRIVATE AND PROTECTED
76
+ /////////////////////////////////////////////////
77
+
78
+ private $smtp_conn; // the socket to the server
79
+ private $error; // error if any on the last call
80
+ private $helo_rply; // the reply the server sent to us for HELO
81
+
82
+ /**
83
+ * Initialize the class so that the data is in a known state.
84
+ * @access public
85
+ * @return void
86
+ */
87
+ public function __construct() {
88
+ $this->smtp_conn = 0;
89
+ $this->error = null;
90
+ $this->helo_rply = null;
91
+
92
+ $this->do_debug = 0;
93
+ }
94
+
95
+ /////////////////////////////////////////////////
96
+ // CONNECTION FUNCTIONS
97
+ /////////////////////////////////////////////////
98
+
99
+ /**
100
+ * Connect to the server specified on the port specified.
101
+ * If the port is not specified use the default SMTP_PORT.
102
+ * If tval is specified then a connection will try and be
103
+ * established with the server for that number of seconds.
104
+ * If tval is not specified the default is 30 seconds to
105
+ * try on the connection.
106
+ *
107
+ * SMTP CODE SUCCESS: 220
108
+ * SMTP CODE FAILURE: 421
109
+ * @access public
110
+ * @return bool
111
+ */
112
+ public function Connect($host, $port = 0, $tval = 30) {
113
+ // set the error val to null so there is no confusion
114
+ $this->error = null;
115
+
116
+ // make sure we are __not__ connected
117
+ if($this->connected()) {
118
+ // already connected, generate error
119
+ $this->error = array("error" => "Already connected to a server");
120
+ return false;
121
+ }
122
+
123
+ if(empty($port)) {
124
+ $port = $this->SMTP_PORT;
125
+ }
126
+
127
+ // connect to the smtp server
128
+ $this->smtp_conn = @fsockopen($host, // the host of the server
129
+ $port, // the port to use
130
+ $errno, // error number if any
131
+ $errstr, // error message if any
132
+ $tval); // give up after ? secs
133
+ // verify we connected properly
134
+ if(empty($this->smtp_conn)) {
135
+ $this->error = array("error" => "Failed to connect to server",
136
+ "errno" => $errno,
137
+ "errstr" => $errstr);
138
+ if($this->do_debug >= 1) {
139
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": $errstr ($errno)" . $this->CRLF . '<br />';
140
+ }
141
+ return false;
142
+ }
143
+
144
+ // SMTP server can take longer to respond, give longer timeout for first read
145
+ // Windows does not have support for this timeout function
146
+ if(substr(PHP_OS, 0, 3) != "WIN")
147
+ socket_set_timeout($this->smtp_conn, $tval, 0);
148
+
149
+ // get any announcement
150
+ $announce = $this->get_lines();
151
+
152
+ if($this->do_debug >= 2) {
153
+ echo "SMTP -> FROM SERVER:" . $announce . $this->CRLF . '<br />';
154
+ }
155
+
156
+ return true;
157
+ }
158
+
159
+ /**
160
+ * Initiate a TLS communication with the server.
161
+ *
162
+ * SMTP CODE 220 Ready to start TLS
163
+ * SMTP CODE 501 Syntax error (no parameters allowed)
164
+ * SMTP CODE 454 TLS not available due to temporary reason
165
+ * @access public
166
+ * @return bool success
167
+ */
168
+ public function StartTLS() {
169
+ $this->error = null; # to avoid confusion
170
+
171
+ if(!$this->connected()) {
172
+ $this->error = array("error" => "Called StartTLS() without being connected");
173
+ return false;
174
+ }
175
+
176
+ fputs($this->smtp_conn,"STARTTLS" . $this->CRLF);
177
+
178
+ $rply = $this->get_lines();
179
+ $code = substr($rply,0,3);
180
+
181
+ if($this->do_debug >= 2) {
182
+ echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
183
+ }
184
+
185
+ if($code != 220) {
186
+ $this->error =
187
+ array("error" => "STARTTLS not accepted from server",
188
+ "smtp_code" => $code,
189
+ "smtp_msg" => substr($rply,4));
190
+ if($this->do_debug >= 1) {
191
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
192
+ }
193
+ return false;
194
+ }
195
+
196
+ // Begin encrypted connection
197
+ if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
198
+ return false;
199
+ }
200
+
201
+ return true;
202
+ }
203
+
204
+ /**
205
+ * Performs SMTP authentication. Must be run after running the
206
+ * Hello() method. Returns true if successfully authenticated.
207
+ * @access public
208
+ * @return bool
209
+ */
210
+ public function Authenticate($username, $password) {
211
+ // Start authentication
212
+ fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
213
+
214
+ $rply = $this->get_lines();
215
+ $code = substr($rply,0,3);
216
+
217
+ if($code != 334) {
218
+ $this->error =
219
+ array("error" => "AUTH not accepted from server",
220
+ "smtp_code" => $code,
221
+ "smtp_msg" => substr($rply,4));
222
+ if($this->do_debug >= 1) {
223
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
224
+ }
225
+ return false;
226
+ }
227
+
228
+ // Send encoded username
229
+ fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);
230
+
231
+ $rply = $this->get_lines();
232
+ $code = substr($rply,0,3);
233
+
234
+ if($code != 334) {
235
+ $this->error =
236
+ array("error" => "Username not accepted from server",
237
+ "smtp_code" => $code,
238
+ "smtp_msg" => substr($rply,4));
239
+ if($this->do_debug >= 1) {
240
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
241
+ }
242
+ return false;
243
+ }
244
+
245
+ // Send encoded password
246
+ fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
247
+
248
+ $rply = $this->get_lines();
249
+ $code = substr($rply,0,3);
250
+
251
+ if($code != 235) {
252
+ $this->error =
253
+ array("error" => "Password not accepted from server",
254
+ "smtp_code" => $code,
255
+ "smtp_msg" => substr($rply,4));
256
+ if($this->do_debug >= 1) {
257
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
258
+ }
259
+ return false;
260
+ }
261
+
262
+ return true;
263
+ }
264
+
265
+ /**
266
+ * Returns true if connected to a server otherwise false
267
+ * @access public
268
+ * @return bool
269
+ */
270
+ public function Connected() {
271
+ if(!empty($this->smtp_conn)) {
272
+ $sock_status = socket_get_status($this->smtp_conn);
273
+ if($sock_status["eof"]) {
274
+ // the socket is valid but we are not connected
275
+ if($this->do_debug >= 1) {
276
+ echo "SMTP -> NOTICE:" . $this->CRLF . "EOF caught while checking if connected";
277
+ }
278
+ $this->Close();
279
+ return false;
280
+ }
281
+ return true; // everything looks good
282
+ }
283
+ return false;
284
+ }
285
+
286
+ /**
287
+ * Closes the socket and cleans up the state of the class.
288
+ * It is not considered good to use this function without
289
+ * first trying to use QUIT.
290
+ * @access public
291
+ * @return void
292
+ */
293
+ public function Close() {
294
+ $this->error = null; // so there is no confusion
295
+ $this->helo_rply = null;
296
+ if(!empty($this->smtp_conn)) {
297
+ // close the connection and cleanup
298
+ fclose($this->smtp_conn);
299
+ $this->smtp_conn = 0;
300
+ }
301
+ }
302
+
303
+ /////////////////////////////////////////////////
304
+ // SMTP COMMANDS
305
+ /////////////////////////////////////////////////
306
+
307
+ /**
308
+ * Issues a data command and sends the msg_data to the server
309
+ * finializing the mail transaction. $msg_data is the message
310
+ * that is to be send with the headers. Each header needs to be
311
+ * on a single line followed by a <CRLF> with the message headers
312
+ * and the message body being seperated by and additional <CRLF>.
313
+ *
314
+ * Implements rfc 821: DATA <CRLF>
315
+ *
316
+ * SMTP CODE INTERMEDIATE: 354
317
+ * [data]
318
+ * <CRLF>.<CRLF>
319
+ * SMTP CODE SUCCESS: 250
320
+ * SMTP CODE FAILURE: 552,554,451,452
321
+ * SMTP CODE FAILURE: 451,554
322
+ * SMTP CODE ERROR : 500,501,503,421
323
+ * @access public
324
+ * @return bool
325
+ */
326
+ public function Data($msg_data) {
327
+ $this->error = null; // so no confusion is caused
328
+
329
+ if(!$this->connected()) {
330
+ $this->error = array(
331
+ "error" => "Called Data() without being connected");
332
+ return false;
333
+ }
334
+
335
+ fputs($this->smtp_conn,"DATA" . $this->CRLF);
336
+
337
+ $rply = $this->get_lines();
338
+ $code = substr($rply,0,3);
339
+
340
+ if($this->do_debug >= 2) {
341
+ echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
342
+ }
343
+
344
+ if($code != 354) {
345
+ $this->error =
346
+ array("error" => "DATA command not accepted from server",
347
+ "smtp_code" => $code,
348
+ "smtp_msg" => substr($rply,4));
349
+ if($this->do_debug >= 1) {
350
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
351
+ }
352
+ return false;
353
+ }
354
+
355
+ /* the server is ready to accept data!
356
+ * according to rfc 821 we should not send more than 1000
357
+ * including the CRLF
358
+ * characters on a single line so we will break the data up
359
+ * into lines by \r and/or \n then if needed we will break
360
+ * each of those into smaller lines to fit within the limit.
361
+ * in addition we will be looking for lines that start with
362
+ * a period '.' and append and additional period '.' to that
363
+ * line. NOTE: this does not count towards limit.
364
+ */
365
+
366
+ // normalize the line breaks so we know the explode works
367
+ $msg_data = str_replace("\r\n","\n",$msg_data);
368
+ $msg_data = str_replace("\r","\n",$msg_data);
369
+ $lines = explode("\n",$msg_data);
370
+
371
+ /* we need to find a good way to determine is headers are
372
+ * in the msg_data or if it is a straight msg body
373
+ * currently I am assuming rfc 822 definitions of msg headers
374
+ * and if the first field of the first line (':' sperated)
375
+ * does not contain a space then it _should_ be a header
376
+ * and we can process all lines before a blank "" line as
377
+ * headers.
378
+ */
379
+
380
+ $field = substr($lines[0],0,strpos($lines[0],":"));
381
+ $in_headers = false;
382
+ if(!empty($field) && !strstr($field," ")) {
383
+ $in_headers = true;
384
+ }
385
+
386
+ $max_line_length = 998; // used below; set here for ease in change
387
+
388
+ while(list(,$line) = @each($lines)) {
389
+ $lines_out = null;
390
+ if($line == "" && $in_headers) {
391
+ $in_headers = false;
392
+ }
393
+ // ok we need to break this line up into several smaller lines
394
+ while(strlen($line) > $max_line_length) {
395
+ $pos = strrpos(substr($line,0,$max_line_length)," ");
396
+
397
+ // Patch to fix DOS attack
398
+ if(!$pos) {
399
+ $pos = $max_line_length - 1;
400
+ $lines_out[] = substr($line,0,$pos);
401
+ $line = substr($line,$pos);
402
+ } else {
403
+ $lines_out[] = substr($line,0,$pos);
404
+ $line = substr($line,$pos + 1);
405
+ }
406
+
407
+ /* if processing headers add a LWSP-char to the front of new line
408
+ * rfc 822 on long msg headers
409
+ */
410
+ if($in_headers) {
411
+ $line = "\t" . $line;
412
+ }
413
+ }
414
+ $lines_out[] = $line;
415
+
416
+ // send the lines to the server
417
+ while(list(,$line_out) = @each($lines_out)) {
418
+ if(strlen($line_out) > 0)
419
+ {
420
+ if(substr($line_out, 0, 1) == ".") {
421
+ $line_out = "." . $line_out;
422
+ }
423
+ }
424
+ fputs($this->smtp_conn,$line_out . $this->CRLF);
425
+ }
426
+ }
427
+
428
+ // message data has been sent
429
+ fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
430
+
431
+ $rply = $this->get_lines();
432
+ $code = substr($rply,0,3);
433
+
434
+ if($this->do_debug >= 2) {
435
+ echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
436
+ }
437
+
438
+ if($code != 250) {
439
+ $this->error =
440
+ array("error" => "DATA not accepted from server",
441
+ "smtp_code" => $code,
442
+ "smtp_msg" => substr($rply,4));
443
+ if($this->do_debug >= 1) {
444
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
445
+ }
446
+ return false;
447
+ }
448
+ return true;
449
+ }
450
+
451
+ /**
452
+ * Sends the HELO command to the smtp server.
453
+ * This makes sure that we and the server are in
454
+ * the same known state.
455
+ *
456
+ * Implements from rfc 821: HELO <SP> <domain> <CRLF>
457
+ *
458
+ * SMTP CODE SUCCESS: 250
459
+ * SMTP CODE ERROR : 500, 501, 504, 421
460
+ * @access public
461
+ * @return bool
462
+ */
463
+ public function Hello($host = '') {
464
+ $this->error = null; // so no confusion is caused
465
+
466
+ if(!$this->connected()) {
467
+ $this->error = array(
468
+ "error" => "Called Hello() without being connected");
469
+ return false;
470
+ }
471
+
472
+ // if hostname for HELO was not specified send default
473
+ if(empty($host)) {
474
+ // determine appropriate default to send to server
475
+ $host = "localhost";
476
+ }
477
+
478
+ // Send extended hello first (RFC 2821)
479
+ if(!$this->SendHello("EHLO", $host)) {
480
+ if(!$this->SendHello("HELO", $host)) {
481
+ return false;
482
+ }
483
+ }
484
+
485
+ return true;
486
+ }
487
+
488
+ /**
489
+ * Sends a HELO/EHLO command.
490
+ * @access private
491
+ * @return bool
492
+ */
493
+ private function SendHello($hello, $host) {
494
+ fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);
495
+
496
+ $rply = $this->get_lines();
497
+ $code = substr($rply,0,3);
498
+
499
+ if($this->do_debug >= 2) {
500
+ echo "SMTP -> FROM SERVER: " . $rply . $this->CRLF . '<br />';
501
+ }
502
+
503
+ if($code != 250) {
504
+ $this->error =
505
+ array("error" => $hello . " not accepted from server",
506
+ "smtp_code" => $code,
507
+ "smtp_msg" => substr($rply,4));
508
+ if($this->do_debug >= 1) {
509
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
510
+ }
511
+ return false;
512
+ }
513
+
514
+ $this->helo_rply = $rply;
515
+
516
+ return true;
517
+ }
518
+
519
+ /**
520
+ * Starts a mail transaction from the email address specified in
521
+ * $from. Returns true if successful or false otherwise. If True
522
+ * the mail transaction is started and then one or more Recipient
523
+ * commands may be called followed by a Data command.
524
+ *
525
+ * Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
526
+ *
527
+ * SMTP CODE SUCCESS: 250
528
+ * SMTP CODE SUCCESS: 552,451,452
529
+ * SMTP CODE SUCCESS: 500,501,421
530
+ * @access public
531
+ * @return bool
532
+ */
533
+ public function Mail($from) {
534
+ $this->error = null; // so no confusion is caused
535
+
536
+ if(!$this->connected()) {
537
+ $this->error = array(
538
+ "error" => "Called Mail() without being connected");
539
+ return false;
540
+ }
541
+
542
+ $useVerp = ($this->do_verp ? "XVERP" : "");
543
+ fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF);
544
+
545
+ $rply = $this->get_lines();
546
+ $code = substr($rply,0,3);
547
+
548
+ if($this->do_debug >= 2) {
549
+ echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
550
+ }
551
+
552
+ if($code != 250) {
553
+ $this->error =
554
+ array("error" => "MAIL not accepted from server",
555
+ "smtp_code" => $code,
556
+ "smtp_msg" => substr($rply,4));
557
+ if($this->do_debug >= 1) {
558
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
559
+ }
560
+ return false;
561
+ }
562
+ return true;
563
+ }
564
+
565
+ /**
566
+ * Sends the quit command to the server and then closes the socket
567
+ * if there is no error or the $close_on_error argument is true.
568
+ *
569
+ * Implements from rfc 821: QUIT <CRLF>
570
+ *
571
+ * SMTP CODE SUCCESS: 221
572
+ * SMTP CODE ERROR : 500
573
+ * @access public
574
+ * @return bool
575
+ */
576
+ public function Quit($close_on_error = true) {
577
+ $this->error = null; // so there is no confusion
578
+
579
+ if(!$this->connected()) {
580
+ $this->error = array(
581
+ "error" => "Called Quit() without being connected");
582
+ return false;
583
+ }
584
+
585
+ // send the quit command to the server
586
+ fputs($this->smtp_conn,"quit" . $this->CRLF);
587
+
588
+ // get any good-bye messages
589
+ $byemsg = $this->get_lines();
590
+
591
+ if($this->do_debug >= 2) {
592
+ echo "SMTP -> FROM SERVER:" . $byemsg . $this->CRLF . '<br />';
593
+ }
594
+
595
+ $rval = true;
596
+ $e = null;
597
+
598
+ $code = substr($byemsg,0,3);
599
+ if($code != 221) {
600
+ // use e as a tmp var cause Close will overwrite $this->error
601
+ $e = array("error" => "SMTP server rejected quit command",
602
+ "smtp_code" => $code,
603
+ "smtp_rply" => substr($byemsg,4));
604
+ $rval = false;
605
+ if($this->do_debug >= 1) {
606
+ echo "SMTP -> ERROR: " . $e["error"] . ": " . $byemsg . $this->CRLF . '<br />';
607
+ }
608
+ }
609
+
610
+ if(empty($e) || $close_on_error) {
611
+ $this->Close();
612
+ }
613
+
614
+ return $rval;
615
+ }
616
+
617
+ /**
618
+ * Sends the command RCPT to the SMTP server with the TO: argument of $to.
619
+ * Returns true if the recipient was accepted false if it was rejected.
620
+ *
621
+ * Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
622
+ *
623
+ * SMTP CODE SUCCESS: 250,251
624
+ * SMTP CODE FAILURE: 550,551,552,553,450,451,452
625
+ * SMTP CODE ERROR : 500,501,503,421
626
+ * @access public
627
+ * @return bool
628
+ */
629
+ public function Recipient($to) {
630
+ $this->error = null; // so no confusion is caused
631
+
632
+ if(!$this->connected()) {
633
+ $this->error = array(
634
+ "error" => "Called Recipient() without being connected");
635
+ return false;
636
+ }
637
+
638
+ fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF);
639
+
640
+ $rply = $this->get_lines();
641
+ $code = substr($rply,0,3);
642
+
643
+ if($this->do_debug >= 2) {
644
+ echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
645
+ }
646
+
647
+ if($code != 250 && $code != 251) {
648
+ $this->error =
649
+ array("error" => "RCPT not accepted from server",
650
+ "smtp_code" => $code,
651
+ "smtp_msg" => substr($rply,4));
652
+ if($this->do_debug >= 1) {
653
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
654
+ }
655
+ return false;
656
+ }
657
+ return true;
658
+ }
659
+
660
+ /**
661
+ * Sends the RSET command to abort and transaction that is
662
+ * currently in progress. Returns true if successful false
663
+ * otherwise.
664
+ *
665
+ * Implements rfc 821: RSET <CRLF>
666
+ *
667
+ * SMTP CODE SUCCESS: 250
668
+ * SMTP CODE ERROR : 500,501,504,421
669
+ * @access public
670
+ * @return bool
671
+ */
672
+ public function Reset() {
673
+ $this->error = null; // so no confusion is caused
674
+
675
+ if(!$this->connected()) {
676
+ $this->error = array(
677
+ "error" => "Called Reset() without being connected");
678
+ return false;
679
+ }
680
+
681
+ fputs($this->smtp_conn,"RSET" . $this->CRLF);
682
+
683
+ $rply = $this->get_lines();
684
+ $code = substr($rply,0,3);
685
+
686
+ if($this->do_debug >= 2) {
687
+ echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
688
+ }
689
+
690
+ if($code != 250) {
691
+ $this->error =
692
+ array("error" => "RSET failed",
693
+ "smtp_code" => $code,
694
+ "smtp_msg" => substr($rply,4));
695
+ if($this->do_debug >= 1) {
696
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
697
+ }
698
+ return false;
699
+ }
700
+
701
+ return true;
702
+ }
703
+
704
+ /**
705
+ * Starts a mail transaction from the email address specified in
706
+ * $from. Returns true if successful or false otherwise. If True
707
+ * the mail transaction is started and then one or more Recipient
708
+ * commands may be called followed by a Data command. This command
709
+ * will send the message to the users terminal if they are logged
710
+ * in and send them an email.
711
+ *
712
+ * Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
713
+ *
714
+ * SMTP CODE SUCCESS: 250
715
+ * SMTP CODE SUCCESS: 552,451,452
716
+ * SMTP CODE SUCCESS: 500,501,502,421
717
+ * @access public
718
+ * @return bool
719
+ */
720
+ public function SendAndMail($from) {
721
+ $this->error = null; // so no confusion is caused
722
+
723
+ if(!$this->connected()) {
724
+ $this->error = array(
725
+ "error" => "Called SendAndMail() without being connected");
726
+ return false;
727
+ }
728
+
729
+ fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);
730
+
731
+ $rply = $this->get_lines();
732
+ $code = substr($rply,0,3);
733
+
734
+ if($this->do_debug >= 2) {
735
+ echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
736
+ }
737
+
738
+ if($code != 250) {
739
+ $this->error =
740
+ array("error" => "SAML not accepted from server",
741
+ "smtp_code" => $code,
742
+ "smtp_msg" => substr($rply,4));
743
+ if($this->do_debug >= 1) {
744
+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
745
+ }
746
+ return false;
747
+ }
748
+ return true;
749
+ }
750
+
751
+ /**
752
+ * This is an optional command for SMTP that this class does not
753
+ * support. This method is here to make the RFC821 Definition
754
+ * complete for this class and __may__ be implimented in the future
755
+ *
756
+ * Implements from rfc 821: TURN <CRLF>
757
+ *
758
+ * SMTP CODE SUCCESS: 250
759
+ * SMTP CODE FAILURE: 502
760
+ * SMTP CODE ERROR : 500, 503
761
+ * @access public
762
+ * @return bool
763
+ */
764
+ public function Turn() {
765
+ $this->error = array("error" => "This method, TURN, of the SMTP ".
766
+ "is not implemented");
767
+ if($this->do_debug >= 1) {
768
+ echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF . '<br />';
769
+ }
770
+ return false;
771
+ }
772
+
773
+ /**
774
+ * Get the current error
775
+ * @access public
776
+ * @return array
777
+ */
778
+ public function getError() {
779
+ return $this->error;
780
+ }
781
+
782
+ /////////////////////////////////////////////////
783
+ // INTERNAL FUNCTIONS
784
+ /////////////////////////////////////////////////
785
+
786
+ /**
787
+ * Read in as many lines as possible
788
+ * either before eof or socket timeout occurs on the operation.
789
+ * With SMTP we can tell if we have more lines to read if the
790
+ * 4th character is '-' symbol. If it is a space then we don't
791
+ * need to read anything else.
792
+ * @access private
793
+ * @return string
794
+ */
795
+ private function get_lines() {
796
+ $data = "";
797
+ while($str = @fgets($this->smtp_conn,515)) {
798
+ if($this->do_debug >= 4) {
799
+ echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />';
800
+ echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />';
801
+ }
802
+ $data .= $str;
803
+ if($this->do_debug >= 4) {
804
+ echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '<br />';
805
+ }
806
+ // if 4th character is a space, we are done reading, break the loop
807
+ if(substr($str,3,1) == " ") { break; }
808
+ }
809
+ return $data;
810
+ }
811
+
812
+ }
813
+
814
+ ?>
custom-contact-forms-usage-popover.php → modules/usage_popover/custom-contact-forms-usage-popover.php RENAMED
File without changes
custom-contact-forms-widget.php → modules/widget/custom-contact-forms-widget.php RENAMED
File without changes
readme.txt ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Custom Contact Forms ===
2
+ Contributors: Taylor Lovett
3
+ Donate link: http://www.taylorlovett.com
4
+ Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
5
+ Requires at least: 2.8.1
6
+ Tested up to: 3.0.1
7
+ Stable tag: 4.0.0.b9
8
+
9
+ Gauranteed to be the most customizable and intuitive contact form plugin for Wordpress.
10
+
11
+ == Description ==
12
+
13
+ Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, captchas, tooltip popovers, unlimited fields/forms/form styles, use a custom thank you page or built-in popover with a custom success message set for each form.
14
+
15
+ Special Features:
16
+ ------------------
17
+ Custom Contact Forms 4.0 will revolutionize the idea of a Wordpress plugin.
18
+
19
+ * __NEW__ - All form submissions saved and displayed in admin panel as well as emailed to you
20
+ * __NEW__ - Import and export forms/fields/styles/etc. with ease!
21
+ * __NEW__ - This plugin can now be translated in to different languages.
22
+ * __NEW__ - Error messages can be customized for each field
23
+ * Choose between XHTML or HTML. All code is clean and valid!
24
+ * Create __unlimited__ forms
25
+ * Create __unlimited__ fields
26
+ * Required Fields
27
+ * Custom Contact Forms now uses PHPMailer and thus supports STMP and SSL
28
+ * Create text fields, textareas, checkboxs, and dropdown fields!
29
+ * Custom HTML Forms Feature - if you are a web developer you can write your own form html and __use this plugin simply to process your form requests__. Comes with a few useful features.
30
+ * __Displays forms in theme files__ as well as pages and posts.
31
+ * Set a different destination email address for each form
32
+ * Customize every aspect of fields and forms: titles, labels, maxlength, initial value, form action, form method, form style, and much more
33
+ * Create checkboxes, textareas, text fields, etc.
34
+ * __Captcha__ and __"Are You Human?"__ spam blockers included and easily attached to any form
35
+ * Create __custom styles in the style manager__ to change the appearance of your forms: borders, font sizes, colors, padding, margins, background, and more
36
+ * You can create unlimited styles to use on as many forms as you want without any knowledge of css or html.
37
+ * Show a stylish JQuery form thank you message or use a custom thank you page.
38
+ * Custom error pages for when forms are filled out incorrectly
39
+ * Option to have forms remember field values for when users hit the back button after an error
40
+ * Easily report bugs and suggest new features
41
+ * Script in constant development - new version released every week
42
+ * Easily process your forms with 3rd party sites like Infusionsoft or Aweber
43
+ * Set a __custom thank you page__ for each form or use the built in thank you page popover with a custom thank you message
44
+ * No javascript required
45
+ * Detailed guide for using the plugin as well as default content to help you understand how to use Custom COntact Forms
46
+ * Stylish field tooltips powered by jquery
47
+ * Manage options for your dropdowns and radio fields in an easy to use manager
48
+ * Popover forms with Jquery (Coming soon!)
49
+ * Free unlimited support
50
+ * AJAX enabled admin panel
51
+ * Assign different CSS classes to each field.
52
+ * Ability to disable JQuery if it is conflicting with other plugins.
53
+
54
+ Restrictions/Requirements:
55
+ -------------------------
56
+ * Works with Wordpress 2.8.1+, WPMU, and BuddyPress (Wordpress 3.0+ is highly recommended)
57
+ * PHP 5
58
+ * PHP register_globals and safe_mode should be set to "Off" (this is done in your php.ini file)
59
+
60
+ == Installation ==
61
+ 1. Upload to /wp-content/plugins
62
+ 2. Activate the plugin from your Wordpress Admin Panel
63
+ 3. Configure the plugin, create fields, and create forms in the Settings page called Custom Contact Forms
64
+ 4. Display those forms in posts and pages by inserting the code: __[customcontact form=FORMID]__
65
+ 5. In the instruction section of the plugin. Press the button to insert the default content. The default content contains a very generic form that will help you understand the many ways you can use Custom Contact Forms.
66
+
67
+ == Configuring and Using the Plugin ==
68
+ 1. Create as many forms as you want.
69
+ 2. Create fields and attach those fields to the forms of your choice. Attach the fields in the order that you want them to show up in the form. If you mess up you can detach and reattach them.
70
+ 3. Display those forms in posts and pages by inserting the code: __[customcontact form=FORMID]__. Replace __FORMID__ with the id listed to the left of the form slug next to the form of your choice above. You can also __display forms in theme files__; the code for this is provided within each forms admin section.
71
+ 4. Prevent spam by attaching the fixed field, captcha or ishuman. Captcha requires users to type in a number shown on an image. Ishuman requires users to check a box to prove they aren't a spam bot.
72
+ 5. Add a form to your sidebar, by dragging the Custom Contact Form reusable widget in to your sidebar.
73
+ 6. Configure the General Settings appropriately; this is important if you want to receive your web form messages!
74
+ 7. Create form styles to change your forms appearances. The image below explains how each style field can change the look of your forms.
75
+ 8. (advanced) If you are confident in your HTML and CSS skills, you can use the Custom HTML Forms feature as a framework and write your forms from scratch. This allows you to use this plugin simply to process your form requests. The Custom HTML Forms feature will process and email any form variables sent to it regardless of whether they are created in the fields manager.
76
+
77
+ Custom Contact Forms is an extremely intuitive plugin allowing you to create any type of contact form you can image. CCF is very user friendly but with possibilities comes complexity. __It is recommend that you click the button in the instructions section of the plugin to add default fields, field options, and forms.__ The default content will help you get a feel for the amazing things you can accomplish with this plugin. __It is also recommended you click the "Show Plugin Usage Popover"__ in the instruction area of the admin page to read in detail about all parts of the plugin.
78
+
79
+ == Support ==
80
+ For questions, feature requests, and support concerning the Custom Contact Forms plugin, please email me at:
81
+ admin@taylorlovett.com
82
+
83
+ I respond to emails same-day!
84
+
85
+ == Frequently Asked Questions ==
86
+
87
+ = I'm not receiving any emails =
88
+ * Check that the "Email Form Submissions" option is set to yes in General Settings.
89
+ * Try filling out a form with the "Use Wordpress Mail Function" option set to "No".
90
+ * Make sure the "Default From" email you are using within General Settings actually exists on your server.
91
+ * Try deactivating other plugins to make sure there are no conflicts
92
+
93
+ = When I activate Custom Contact Forms, the Javascript for another plugin does not work. =
94
+ * Disable the "Frontend JQuery" option in General Settings. Custom Contact Forms will still work without JQuery but won't be as pretty.
95
+
96
+ == Upgrade Notice ==
97
+ We are planning to add popover forms and file attachments soon.
98
+
99
+ == Screenshots ==
100
+ Visit http://www.taylorlovett.com/wordpress-plugins for screenshots. Right now all the screenshots are from Version 1, thus are quite out-dated. Install the plugin to see what it looks like. You won't regret it. I promise!
101
+
102
+ == Changelog ==
103
+
104
+ = 4.0.0 =
105
+ * custom-contact-forms.php - Saved form submissions manager, form background color added to style manager, import/export feature
106
+ * custom-contact-forms-user-data.php - Saved form submission
107
+ * custom-contact-forms-db.php - DB methods reorganized for efficiency
108
+ * custom-contact-forms-static.php - Methods added/removed for efficiency
109
+ * custom-contact-forms-admin.php - Admin code seperated in to a different file
110
+ * custom-contact-forms-popover.php - Popover code seperated in to a different file
111
+ * custom-contact-forms-export.php - Functions for importing and exporting
112
+ * css/custom-contact-forms-admin.css - AJAX abilities added
113
+ * css/custom-contact-forms-standard.css - Classes renamed
114
+ * js/custom-contact-forms-admin.js - AJAX abilities added to admin panel
115
+ * download.php - Allows export file to be downloaded
116
+ * lang/custom-contact-forms.po - Allows for translation to different languages
117
+ * lang/custom-contact-forms.mo - Allows for translation to different languages
118
+
119
+ = 3.5.5 =
120
+ * custom-contact-forms.php - Plugin usage popover reworded
121
+ * css/custom-contact-forms-admin.css - Admin panel display problem fixed
122
+
123
+ = 3.5.4 =
124
+ * custom-contact-forms.php - custom thank you redirect fix
125
+ * custom-contact-forms-db.php - Style insert bug fixed, Unexpected header output bug fixed
126
+
127
+ = 3.5.3 =
128
+ * custom-contact-forms.php - Style popover height option added to style manager. Form title heading not shown if left blank.
129
+ * custom-contact-forms-db.php - New success popover height column added to styles table
130
+
131
+ = 3.5.2 =
132
+ * custom-contact-forms.php - Plugin Usage popover added, insert default content button
133
+ * custom-contact-forms-db.php - Insert default content function
134
+
135
+ = 3.5.1 =
136
+ * custom-contact-forms.php - Style options added, color picker added, success popover styling bugs fixed
137
+ * custom-contact-forms-db.php - Style format changed, new style fields added to tables
138
+ * Lots of javascript files
139
+ * Lots of images for the colorpicker
140
+
141
+ = 3.5.0 =
142
+ * custom-contact-forms.php - Radio and dropdowns added via the field option manager
143
+ * custom-contact-forms-mailer.php - Email body changed
144
+ * custom-contact-forms-db.php - Field option methods added
145
+ * custom-contact-forms.css - Form styles reorganized, file removed
146
+ * css/custom-contact-forms.css - Form styles reorganized
147
+ * css/custom-contact-forms-standards.css - Form styles reorganized
148
+ * css/custom-contact-forms-admin.css - Form styles reorganized
149
+
150
+ = 3.1.0 =
151
+ * custom-contact-forms.php - Success message title, disable jquery, choose between xhmtl and html, and more
152
+ * custom-contact-forms-db.php - Success message title added
153
+ * custom-contact-forms.css - Form styles rewritten
154
+
155
+ = 3.0.2 =
156
+ * custom-contact-forms.php - Bugs fixed
157
+
158
+ = 3.0.1 =
159
+ * custom-contact-forms.php - Php tags added to theme form display code
160
+
161
+ = 3.0.0 =
162
+ * custom-contact-forms.php - Required fields, admin panel changed, style manager bugs fixed, custom html feature added, much more
163
+ * custom-contact-forms-db.php - New functions added and old ones fixed
164
+ * custom-contact-forms.css - New styles added and old ones modified
165
+
166
+ = 2.2.5 =
167
+ * custom-contact-forms.php - Fixed field insert bug fixed
168
+
169
+ = 2.2.4 =
170
+ * custom-contact-forms.php - Textarea field instruction bug fixed
171
+
172
+ = 2.2.3 =
173
+ * custom-contact-forms.php - Remember fields bug fixed, init rearranged, field instructions
174
+ * custom-contact-forms.css
175
+ * custom-contact-forms-db.php
176
+
177
+ = 2.2.0 =
178
+ * custom-contact-forms.php - Plugin nav, hide plugin author link, bug reporting, suggest a feature
179
+ * custom-contact-forms.css - New styles added and style bugs fixed
180
+
181
+ = 2.1.0 =
182
+ * custom-contact-forms.php - New fixed field added, plugin news, bug fixes
183
+ * custom-contact-forms.css - New styles added and style bugs fixed
184
+ * custom-contact-forms-db.php - New fixed field added
185
+
186
+ = 2.0.3 =
187
+ * custom-contact-forms.php - custom style checkbox display:block error fixed
188
+ * custom-contact-forms.css - li's converted to p's
189
+
190
+ = 2.0.2 =
191
+ * custom-contact-forms.php - Form li's changed to p's
192
+ * images/ - folder readded to correct captcha error
193
+
194
+ = 2.0.1 =
195
+ * custom-contact-forms.php - Duplicate form slug bug fixed, default style values added, stripslahses on form messages
196
+ * custom-contact-forms-db.php - default style values added
197
+
198
+ = 2.0.0 =
199
+ * custom-contact-forms.php - Style manager added
200
+ * custom-contact-forms.css - style manager styles added
201
+ * custom-contact-forms-db.php - Style manager db functions added
202
+
203
+ = 1.2.1 =
204
+ * custom-contact-forms.php - Upgrade options changed
205
+ * custom-contact-forms-css.php - CSS bug corrected
206
+
207
+ = 1.2.0 =
208
+ * custom-contact-forms.php - Option to update to Custom Contact Forms Pro
209
+
210
+ = 1.1.3 =
211
+ * custom-contact-forms.php - Captcha label bug fixed
212
+ * custom-contact-forms-db.php - Default captcha label changed
213
+
214
+ = 1.1.2 =
215
+ * custom-contact-forms-db.php - create_tables function edited to work for Wordpress MU due to error in wp-admin/includes/upgrade.php
216
+
217
+ = 1.1.1 =
218
+ * custom-contact-forms.css - Label styles changed
219
+ * custom-contact-forms.php - Admin option added to remember field values
220
+
221
+ = 1.1.0 =
222
+ * custom-contact-forms-db.php - Table upgrade functions added
223
+ * custom-contact-forms.php - New functions for error handling and captcha
224
+ * custom-contact-forms.css - Forms restyled
225
+ * custom-contact-forms-images.php - Image handling class added
226
+ * image.php, images/ - Image for captcha displaying
227
+
228
+ = 1.0.1 =
229
+ * custom-contact-forms.css - Form style changes
230
+
231
+ = 1.0.0 =
232
+ * Plugin Release