WordPress Email Marketing Plugin – WP Email Capture - Version 2.2.1

Version Description

Download this release

Release Info

Developer rhyswynne
Plugin Icon 128x128 WordPress Email Marketing Plugin – WP Email Capture
Version 2.2.1
Comparing to
See all releases

Code changes from version 2.1.1 to 2.2.1

inc/checks.php ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+
5
+ Validate an email address.
6
+
7
+ Provide email address (raw input)
8
+
9
+ Returns true if the email address has the email
10
+
11
+ address format and the domain exists.
12
+
13
+ */
14
+
15
+ if(!function_exists('checkdnsrr'))
16
+ {
17
+ function checkdnsrr($hostName, $recType = '')
18
+ {
19
+ if(!empty($hostName)) {
20
+ if( $recType == '' ) $recType = "MX";
21
+ exec("nslookup -type=$recType $hostName", $result);
22
+ // check each line to find the one that starts with the host
23
+ // name. If it exists then the function succeeded.
24
+ foreach ($result as $line) {
25
+ if(stripos("^$hostName",$line)) {
26
+ return true;
27
+ }
28
+ }
29
+ // otherwise there was no mail handler for the domain
30
+ return false;
31
+ }
32
+ return false;
33
+ }
34
+ }
35
+
36
+ function addLastCharacter($url)
37
+ {
38
+ $last = $url[strlen($url)-1];
39
+ if ($last != "/")
40
+ {
41
+ $url = $url . "/";
42
+ }
43
+ return $url;
44
+ }
45
+
46
+
47
+ /* function validEmail($email)
48
+
49
+ {
50
+
51
+ $isValid = true;
52
+
53
+ $atIndex = strrpos($email, "@");
54
+
55
+ if (is_bool($atIndex) && !$atIndex)
56
+
57
+ {
58
+
59
+ $isValid = false;
60
+
61
+ }
62
+
63
+ else
64
+
65
+ {
66
+
67
+ $domain = substr($email, $atIndex+1);
68
+
69
+ $local = substr($email, 0, $atIndex);
70
+
71
+ $localLen = strlen($local);
72
+
73
+ $domainLen = strlen($domain);
74
+
75
+ if ($localLen < 1 || $localLen > 64)
76
+
77
+ {
78
+
79
+ // local part length exceeded
80
+
81
+ $isValid = false;
82
+
83
+ }
84
+
85
+ else if ($domainLen < 1 || $domainLen > 255)
86
+
87
+ {
88
+
89
+ // domain part length exceeded
90
+
91
+ $isValid = false;
92
+
93
+ }
94
+
95
+ else if ($local[0] == '.' || $local[$localLen-1] == '.')
96
+
97
+ {
98
+
99
+ // local part starts or ends with '.'
100
+
101
+ $isValid = false;
102
+
103
+ }
104
+
105
+ else if (preg_match('/\\.\\./', $local))
106
+
107
+ {
108
+
109
+ // local part has two consecutive dots
110
+
111
+ $isValid = false;
112
+
113
+ }
114
+
115
+ else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain))
116
+
117
+ {
118
+
119
+ // character not valid in domain part
120
+
121
+ $isValid = false;
122
+
123
+ }
124
+
125
+ else if (preg_match('/\\.\\./', $domain))
126
+
127
+ {
128
+
129
+ // domain part has two consecutive dots
130
+
131
+ $isValid = false;
132
+
133
+ }
134
+
135
+ else if
136
+
137
+ (!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',
138
+
139
+ str_replace("\\\\","",$local)))
140
+
141
+ {
142
+
143
+ // character not valid in local part unless
144
+
145
+ // local part is quoted
146
+
147
+ if (!preg_match('/^"(\\\\"|[^"])+"$/',
148
+
149
+ str_replace("\\\\","",$local)))
150
+
151
+ {
152
+
153
+ $isValid = false;
154
+
155
+ }
156
+
157
+ }
158
+
159
+ if ($isValid && !(checkdnsrr($domain,"MX") ||
160
+
161
+ checkdnsrr($domain,"A")))
162
+
163
+ {
164
+
165
+ // domain not found in DNS
166
+
167
+ $isValid = false;
168
+
169
+ }
170
+
171
+ }
172
+
173
+ return $isValid;
174
+
175
+ }
176
+ */
177
+
178
+
179
+ ?>
inc/core.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/functions.php');
4
+
5
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/install.php');
6
+
7
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/pagedresults.php');
8
+
9
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/tabledata.php');
10
+
11
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/options.php');
12
+
13
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/exportcsv.php');
14
+
15
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/tempdata.php');
16
+
17
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/display.php');
18
+
19
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/process.php');
20
+
21
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/widget.php');
22
+
23
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/security.php');
24
+
25
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/dashboard.php');
26
+
27
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/checks.php');
28
+
29
+ ?>
inc/dashboard.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+ function wp_email_capture_dashboard_widget() {
6
+
7
+
8
+ // Display whatever it is you want to show
9
+ wp_email_capture_writetable(3, "<strong>Last Three Members To Join</strong><br/><br/>");
10
+
11
+ $tempemails = wp_email_capture_count_temp();
12
+
13
+ echo '<br/><br/><a name="list"></a><strong>'.__('Export','WPEC').'</strong>';
14
+ echo '<form name="wp_email_capture_export" action="'. esc_url($_SERVER['REQUEST_URI']) . '#list" method="post">';
15
+ echo '<label>'.__('Use the button below to export your list as a CSV to use in software such as','WPEC').' <a href="http://www.gospelrhys.co.uk/go/aweber.php" title="Email Marketing">Aweber</a>.</label>';
16
+ echo '<input type="hidden" name="wp_email_capture_export" />';
17
+ echo '<div class="submit"><input type="submit" value="Export List" /></div>';
18
+ echo "</form><br/><br/>";
19
+
20
+ $tempemails = wp_email_capture_count_temp();
21
+
22
+ echo "<a name='truncate'></a><strong>".__('Temporary e-mails','WPEC')."</strong>\n";
23
+ echo '<form name="wp_email_capture_truncate" action="'. esc_url($_SERVER['REQUEST_URI']) . '#truncate" method="post">';
24
+ echo '<label>'.__('There are','WPEC').' '. $tempemails . ' '.__('e-mail addresses that have been unconfirmed. Delete them to save space below.','WPEC').'</label>';
25
+
26
+ echo '<input type="hidden" name="wp_email_capture_truncate"/>';
27
+ echo '<div class="submit"><input type="submit" value="Delete Unconfirmed e-mail Addresses" /></div>';
28
+ echo "</form>";
29
+
30
+
31
+
32
+ }
33
+
34
+
35
+
36
+ function wp_email_capture_add_dashboard_widgets() {
37
+
38
+ if (current_user_can('administrator')){
39
+
40
+ wp_add_dashboard_widget('wp_email_capture_dashboard_widget', __('WP Email Capture - At A Glance','WPEC'), 'wp_email_capture_dashboard_widget');
41
+ }
42
+ }
43
+
44
+
45
+
46
+
47
+
48
+ ?>
inc/display.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+ function wp_email_capture_form($error = 0)
6
+
7
+ {
8
+
9
+ $url = get_option('home');
10
+ $url = addLastCharacter($url);
11
+
12
+ ?> <div id="wp_email_capture"><form name="wp_email_capture" method="post" action="<?php echo $url; ?>">
13
+
14
+ <?php if (isset($_GET['wp_email_capture_error'])) {
15
+
16
+ $error = sanitize($_GET['wp_email_capture_error']);
17
+
18
+ echo "<div style='width:80%;background-color: #FFCCCC; margin: 5px;font-weight'>Error: ". $error ."</div>";
19
+
20
+ } ?>
21
+
22
+ <label class="wp-email-capture-name"><?php _e('Name:','WPEC'); ?></label> <input name="wp-email-capture-name" type="text" class="wp-email-capture-name" /><br/>
23
+
24
+ <label class="wp-email-capture-email"><?php _e('Email:','WPEC'); ?></label> <input name="wp-email-capture-email" type="text" class="wp-email-capture-email" /><br/>
25
+
26
+ <input type="hidden" name="wp_capture_action" value="1" />
27
+
28
+ <input name="Submit" type="submit" value="Submit" class="wp-email-capture-submit" />
29
+
30
+ </form>
31
+
32
+ </div>
33
+
34
+ <?php if (get_option("wp_email_capture_link") == 1) {
35
+
36
+ echo "<p style='font-size:10px;'>".__('Powered by','WPEC')." <a href='http://wpemailcapture.com/' target='_blank'>WP Email Capture</a></p>\n";
37
+
38
+ }
39
+
40
+ }
41
+
42
+
43
+
44
+ function wp_email_capture_form_page($error = 0)
45
+
46
+ {
47
+
48
+ $url = get_option('home');
49
+ $url = addLastCharacter($url);
50
+
51
+ $display .= "<div id='wp_email_capture_2'><form name='wp_email_capture_display' method='post' action='" . $url ."'>\n";
52
+
53
+ if (isset($_GET['wp_email_capture_error'])) {
54
+
55
+ $error = sanitize($_GET['wp_email_capture_error']);
56
+
57
+ $display .= "<div style='width:80%;background-color: #FFCCCC; margin: 5px;font-weight'>Error: ". $error ."</div>\n";
58
+
59
+ }
60
+
61
+ $display .= "<label class='wp-email-capture-name'>Name:</label> <input name='wp-email-capture-name' type='text' class='wp-email-capture-name' /><br/>\n";
62
+
63
+ $display .= "<label class='wp-email-capture-email'>Email:</label> <input name='wp-email-capture-email' type='text' class='wp-email-capture-email' /><br/>\n";
64
+
65
+ $display .= "<input type='hidden' name='wp_capture_action' value='1' />\n";
66
+
67
+ $display .= "<input name='Submit' type='submit' value='Submit' class='wp-email-capture-submit' /></form></div>\n";
68
+
69
+ if (get_option("wp_email_capture_link") == 1) {
70
+
71
+ $display .= "<p style='font-size:10px;'>".__('Powered by','WPEC')." <a href='http://wpemailcapture.com/' target='_blank'>WP Email Capture</a></p>\n";
72
+ }
73
+
74
+
75
+
76
+ return $display;
77
+
78
+ }
79
+
80
+
81
+
82
+ /* function wp_email_capture_display_form_in_post($content)
83
+ {
84
+
85
+ $get_form = wp_email_capture_form_page();
86
+
87
+ $content = str_replace("[wp_email_capture_form]", $get_form, $content);
88
+
89
+ return $content;
90
+ } */
91
+
92
+
93
+
94
+
95
+
96
+ ?>
inc/exportcsv.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ function wp_email_capture_export()
5
+ {
6
+ global $wpdb;
7
+
8
+ $csv_output .= "Name,Email";
9
+ $csv_output .= "\n";
10
+
11
+
12
+ $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
13
+ $sql = "SELECT name, email FROM " . $table_name;
14
+ $results = $wpdb->get_results($wpdb->prepare($sql));
15
+ foreach ($results as $result) {
16
+ $csv_output .= $result->name ."," . $result->email ."\n";
17
+ }
18
+
19
+ $filename = $file."_".date("Y-m-d_H-i",time());
20
+ header("Content-type: application/vnd.ms-excel");
21
+ header("Content-disposition: csv" . date("Y-m-d") . ".csv");
22
+ header( "Content-disposition: filename=".$filename.".csv");
23
+ print $csv_output;
24
+ exit;
25
+ }
26
+
27
+ ?>
inc/functions.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function sanitize($string)
4
+
5
+ {
6
+
7
+ $string = mysql_real_escape_string($string);
8
+
9
+ $string = htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
10
+
11
+ return $string;
12
+
13
+ }
14
+
15
+
16
+
17
+ function checkIfPresent($email){
18
+
19
+ global $wpdb;
20
+
21
+ $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
22
+
23
+ $sql = 'SELECT COUNT(*)
24
+
25
+ FROM '. $table_name . ' WHERE email = "'. $email .'"';
26
+
27
+ $prep = $wpdb->prepare($sql);
28
+
29
+ $result = $wpdb->get_var($prep);
30
+
31
+ if($result > 0)
32
+
33
+ {
34
+
35
+ return true;
36
+
37
+ }else{
38
+
39
+ return false;
40
+
41
+ }
42
+
43
+ }
44
+
45
+
46
+
47
+ ?>
inc/install.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wp_email_capture_install() {
4
+ global $wpdb;
5
+ global $wp_email_capture_db_version;
6
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
7
+ $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
8
+ if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
9
+
10
+ $sql = "CREATE TABLE " . $table_name . " (
11
+ id INT( 255 ) NOT NULL AUTO_INCREMENT ,
12
+ name TINYTEXT NOT NULL ,
13
+ email TEXT NOT NULL ,
14
+ PRIMARY KEY (id)
15
+ );";
16
+ dbDelta($sql);
17
+ }
18
+ $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
19
+ if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
20
+
21
+ $sql = "CREATE TABLE " . $table_name . " (
22
+ id INT( 255 ) NOT NULL AUTO_INCREMENT ,
23
+ name TINYTEXT NOT NULL ,
24
+ email TEXT NOT NULL ,
25
+
26
+ confirm_code TEXT NOT NULL,
27
+ PRIMARY KEY (id)
28
+ );";
29
+
30
+ dbDelta($sql);
31
+
32
+
33
+ }
34
+ add_option('wp_email_capture_link', 1);
35
+ add_option("wp_email_capture_db_version", $wp_email_capture_db_version);
36
+ }
37
+
38
+ ?>
inc/options.php ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wp_email_capture_menus() {
4
+
5
+ add_options_page(__('WP Email Capture Options','WPEC'), 'WP Email Capture', 8, 'wpemailcaptureoptions', 'wp_email_capture_options');
6
+
7
+ }
8
+
9
+
10
+
11
+ function wp_email_capture_options() {
12
+
13
+ echo '<div class="wrap">';
14
+
15
+ echo '<h2>'.__('WP Email Capture Options','WPEC').'</h2>';
16
+
17
+ ?>
18
+
19
+ <h3><?php _e('Recommendations','WPEC'); ?></h3>
20
+
21
+ <p><?php _e('We recommend','WPEC'); ?> <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> <?php _e('to run your email campaigns. We have tested this plugin with it.','WPEC'); ?>
22
+
23
+ </p>
24
+
25
+ <table width="75%" border="0">
26
+
27
+ <tr>
28
+
29
+ <td><div style="text-align:center;">
30
+
31
+ <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">
32
+
33
+ <img src="http://www.aweber.com/banners/email_marketing_easy/726x90.gif" alt="AWeber - Email Marketing Made Easy" style="border:none;" /></a>
34
+
35
+ </div></td>
36
+
37
+ </tr>
38
+
39
+ </table>
40
+ <p>
41
+
42
+ <?php
43
+
44
+
45
+
46
+ echo '<h3>'.__('Options','WPEC').'</h3>';
47
+
48
+ ?>
49
+
50
+
51
+
52
+ </p>
53
+
54
+ <form method="post" action="options.php">
55
+
56
+ <?php wp_nonce_field('update-options'); ?>
57
+
58
+ <?php settings_fields( 'wp-email-capture-group' ); ?>
59
+
60
+ <table class="form-table">
61
+
62
+ <tbody>
63
+
64
+ <tr valign="top">
65
+
66
+ <th scope="row" style="width:400px"><?php _e('Page to redirect to on sign up (full web address ie: http://www.domain.com/this-page/)','WPEC'); ?></th>
67
+
68
+ <td><input type="text" name="wp_email_capture_signup" class="regular-text code" value="<?php echo get_option('wp_email_capture_signup'); ?>" /></td>
69
+
70
+ </tr>
71
+
72
+ <tr valign="top">
73
+
74
+ <th scope="row" style="width:400px"><label><?php _e('Page to redirect to on confirmation of email address (full web address ie: http://www.domain.com/this-other-page/)','WPEC'); ?></label></th>
75
+
76
+ <td><input type="text" name="wp_email_capture_redirection" class="regular-text code" value="<?php echo get_option('wp_email_capture_redirection'); ?>" /></td>
77
+
78
+ </tr>
79
+
80
+ <tr valign="top">
81
+
82
+ <th scope="row" style="width:400px"><label><?php _e('From Which Email Address','WPEC'); ?></label></th>
83
+
84
+ <td><input type="text" name="wp_email_capture_from" class="regular-text code" value="<?php echo get_option('wp_email_capture_from'); ?>" /></td>
85
+
86
+ </tr>
87
+
88
+ <tr valign="top">
89
+
90
+ <th scope="row" style="width:400px"><label><?php _e('From Which Name','WPEC'); ?></label></th>
91
+
92
+ <td><input type="text" name="wp_email_capture_from_name" class="regular-text code" value="<?php echo get_option('wp_email_capture_from_name'); ?>" /></td>
93
+
94
+ </tr>
95
+
96
+ <tr valign="top">
97
+
98
+ <th scope="row" style="width:400px"><?php _e('Subject of Email','WPEC'); ?></th>
99
+
100
+ <td><input type="text" name="wp_email_capture_subject" class="regular-text code" value="<?php echo get_option('wp_email_capture_subject'); ?>" /></td>
101
+
102
+ </tr>
103
+
104
+ <tr valign="top">
105
+
106
+ <th scope="row" style="width:400px"><label><?php _e('Body of Email','WPEC'); ?><br>
107
+ <?php _e('(use %NAME% to use the form\'s &quot;Name&quot; field in their welcome email)','WPEC'); ?></label></th>
108
+
109
+ <td><textarea name="wp_email_capture_body" style="width: 25em;"><?php echo get_option('wp_email_capture_body'); ?></textarea></td>
110
+
111
+ </tr>
112
+
113
+ <tr valign="top">
114
+
115
+ <th scope="row" style="width:400px"><label><?php _e('Link to us (optional, but appreciated)','WPEC'); ?></label></th>
116
+
117
+ <td><input type="checkbox" name="wp_email_capture_link" value="1"
118
+
119
+ <?php
120
+
121
+ if (get_option('wp_email_capture_link') == 1) { echo "checked"; } ?>
122
+
123
+ /></td>
124
+
125
+ </tr>
126
+
127
+ </tbody>
128
+
129
+ </table>
130
+
131
+
132
+
133
+ <input type="hidden" name="action" value="update" />
134
+
135
+ <input type="hidden" name="page_options" value="wp_email_capture_redirection,wp_email_capture_from,wp_email_capture_subject,wp_email_capture_signup,wp_email_capture_body,wp_email_capture_from_name,wp_email_capture_link" />
136
+
137
+ <p class="submit">
138
+
139
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes','WPEC') ?>" />
140
+
141
+ </p>
142
+
143
+ </form>
144
+
145
+
146
+
147
+ <?php
148
+
149
+ wp_email_capture_writetable();
150
+
151
+ echo '<a name="list"></a><h3>'.__('Export','WPEC').'</h3>';
152
+
153
+ echo '<form name="wp_email_capture_export" action="'. esc_url($_SERVER['REQUEST_URI']) . '#list" method="post">';
154
+
155
+ echo '<label>'.__('Use the button below to export your list as a CSV to use in software such as <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="http://wpemailcapture.com/recommends/mailchimp">Mailchimp</a>','WPEC').'</label>';
156
+
157
+ echo '<input type="hidden" name="wp_email_capture_export" />';
158
+
159
+ echo '<div class="submit"><input type="submit" value="Export List" /></div>';
160
+
161
+ echo "</form>";
162
+
163
+ $tempemails = wp_email_capture_count_temp();
164
+
165
+ echo "<a name='truncate'></a><h3>".__('Temporary e-mails','WPEC')."</h3>\n";
166
+
167
+ echo '<form name="wp_email_capture_truncate" action="'. esc_url($_SERVER['REQUEST_URI']) . '#truncate" method="post">';
168
+
169
+ echo '<label>'.__('There are','WPEC').' '. $tempemails . ' '.__('e-mail addresses that have been unconfirmed. Delete them to save space below.','WPEC').'</label>';
170
+
171
+ echo '<input type="hidden" name="wp_email_capture_truncate"/>';
172
+
173
+ echo '<div class="submit"><input type="submit" value="Delete Unconfirmed e-mail Addresses" /></div>';
174
+
175
+ echo "</form>";
176
+
177
+ echo "<a name='emptyallemails'></a><h3>".__('Delete Current List','WPEC')."</h3>\n";
178
+
179
+ echo '<form name="wp_email_capture_delete" action="'. esc_url($_SERVER['REQUEST_URI']) . '#delete" method="post">';
180
+
181
+ echo '<label>'.__('Want to delete the entire list? Click the link below. <strong>WARNING: </strong> this will delete all confirmed emails, so make sure you have a backup.','WPEC').'</label>';
182
+
183
+ echo '<input type="hidden" name="wp_email_capture_delete"/>';
184
+
185
+ echo '<div class="submit"><input type="submit" value="Delete Confirmed e-mail Addresses" /></div>';
186
+
187
+ echo "</form>";
188
+
189
+ echo '</div>';
190
+ ?>
191
+ <h3><?php _e('Donations','WPEC'); ?></h3>
192
+
193
+ <p><?php _e('If you like this plugin, please consider a small donation to help with future versions &amp; plugins. Donators are thanked on each specific plugin page!','WPEC'); ?></p>
194
+
195
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
196
+ <input type="hidden" name="cmd" value="_s-xclick">
197
+ <input type="hidden" name="hosted_button_id" value="8590914">
198
+ <input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
199
+ <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
200
+ </form>
201
+
202
+
203
+
204
+ <?php }
205
+
206
+
207
+
208
+ function wp_email_capture_options_process() { // whitelist options
209
+
210
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_signup' );
211
+
212
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_redirection' );
213
+
214
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_from' );
215
+
216
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_subject' );
217
+
218
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_body' );
219
+
220
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_link');
221
+
222
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_from_name' );
223
+
224
+ if(isset($_REQUEST['wp_email_capture_export'])) {
225
+
226
+ wp_email_capture_export();
227
+
228
+ }
229
+
230
+
231
+ if(isset($_REQUEST['wp_email_capture_deleteid'])) {
232
+ $wpemaildeleteid = $_POST['wp_email_capture_deleteid'];
233
+ wp_email_capture_deleteid($wpemaildeleteid);
234
+ }
235
+
236
+
237
+ if(isset($_REQUEST['wp_email_capture_truncate'])) {
238
+
239
+
240
+
241
+ wp_email_capture_truncate();
242
+
243
+ }
244
+
245
+ if(isset($_REQUEST['wp_email_capture_delete'])) {
246
+
247
+
248
+
249
+ wp_email_capture_delete();
250
+
251
+ }
252
+
253
+ }
254
+
255
+ ?>
inc/pagedresults.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+ class MySQLPagedResultSet
6
+
7
+ {
8
+
9
+
10
+
11
+ var $results;
12
+
13
+ var $pageSize;
14
+
15
+ var $page;
16
+
17
+ var $row;
18
+
19
+
20
+
21
+ function MySQLPagedResultSet($query,$pageSize)
22
+
23
+ {
24
+
25
+
26
+
27
+ $resultpage = $_GET['resultpage'];
28
+
29
+
30
+
31
+ $this->results = mysql_query($query);
32
+
33
+ $this->pageSize = $pageSize;
34
+
35
+ if ((int)$resultpage <= 0) $resultpage = 1;
36
+
37
+ if ($resultpage > $this->getNumPages())
38
+
39
+ $resultpage = $this->getNumPages();
40
+
41
+ $this->setPageNum($resultpage);
42
+
43
+ }
44
+
45
+
46
+
47
+ function getNumPages()
48
+
49
+ {
50
+
51
+ if (!$this->results) return FALSE;
52
+
53
+
54
+
55
+ return ceil(mysql_num_rows($this->results) /
56
+
57
+ (float)$this->pageSize);
58
+
59
+ }
60
+
61
+
62
+
63
+ function setPageNum($pageNum)
64
+
65
+ {
66
+
67
+ if ($pageNum > $this->getNumPages() or
68
+
69
+ $pageNum <= 0) return FALSE;
70
+
71
+
72
+
73
+ $this->page = $pageNum;
74
+
75
+ $this->row = 0;
76
+
77
+ mysql_data_seek($this->results,($pageNum-1) * $this->pageSize);
78
+
79
+ }
80
+
81
+
82
+
83
+ function getPageNum()
84
+
85
+ {
86
+
87
+ return $this->page;
88
+
89
+ }
90
+
91
+
92
+
93
+ function isLastPage()
94
+
95
+ {
96
+
97
+ return ($this->page >= $this->getNumPages());
98
+
99
+ }
100
+
101
+
102
+
103
+ function isFirstPage()
104
+
105
+ {
106
+
107
+ return ($this->page <= 1);
108
+
109
+ }
110
+
111
+
112
+
113
+ function fetchArray()
114
+
115
+ {
116
+
117
+ if (!$this->results) return FALSE;
118
+
119
+ if ($this->row >= $this->pageSize) return FALSE;
120
+
121
+ $this->row++;
122
+
123
+ return mysql_fetch_array($this->results);
124
+
125
+ }
126
+
127
+
128
+
129
+ function getPageNav($queryvars = '')
130
+
131
+ {
132
+
133
+ $nav = '';
134
+
135
+ if (!$this->isFirstPage())
136
+
137
+ {
138
+
139
+ $nav .= "<a href=\"?resultpage=".
140
+
141
+ ($this->getPageNum()-1).'&'.$queryvars.'">'.__('Prev','WPEC').'</a> ';
142
+
143
+ }
144
+
145
+ if ($this->getNumPages() > 1)
146
+
147
+ for ($i=1; $i<=$this->getNumPages(); $i++)
148
+
149
+ {
150
+
151
+ if ($i==$this->page)
152
+
153
+ $nav .= "$i ";
154
+
155
+ else
156
+
157
+ $nav .= "<a href=\"?resultpage={$i}&".
158
+
159
+ $queryvars."\">{$i}</a> ";
160
+
161
+ }
162
+
163
+ if (!$this->isLastPage())
164
+
165
+ {
166
+
167
+ $nav .= "<a href=\"?resultpage=".
168
+
169
+ ($this->getPageNum()+1).'&'.$queryvars.'">'.__('Next','WPEC').'</a> ';
170
+
171
+ }
172
+
173
+
174
+
175
+ return $nav;
176
+
177
+ }
178
+
179
+ }
180
+
181
+
182
+
183
+ ?>
inc/process.php ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+ function wp_email_capture_process()
6
+
7
+ {
8
+
9
+ if(isset($_REQUEST['wp_capture_action'])) {
10
+ wp_email_capture_signup();
11
+ }
12
+
13
+ if(isset($_GET['wp_email_confirm']) || isset($_REQUEST['wp_email_confirm'])) {
14
+ wp_capture_email_confirm();
15
+ }
16
+
17
+ }
18
+
19
+
20
+
21
+ function wp_email_capture_double_check_everything($name, $email)
22
+
23
+ {
24
+
25
+ if (wp_email_injection_chars($name) || wp_email_injection_chars($email) || wp_email_injection_chars($name) || wp_email_injection_chars($email))
26
+
27
+ {
28
+
29
+ return FALSE;
30
+
31
+ } else {
32
+
33
+ return TRUE;
34
+ }
35
+
36
+ }
37
+
38
+
39
+
40
+ function wp_email_capture_signup()
41
+
42
+ {
43
+
44
+ global $wpdb;
45
+
46
+
47
+
48
+ // Random confirmation code
49
+
50
+ $confirm_code=md5(uniqid(rand()));
51
+
52
+ $name = $_REQUEST['wp-email-capture-name'];
53
+
54
+ $email = $_REQUEST['wp-email-capture-email'];
55
+
56
+
57
+ if (!is_email($email))
58
+
59
+ {
60
+
61
+ $url = $_SERVER['PHP_SELF'] . "?wp_email_capture_error=Not%20a%20valid%20email";
62
+
63
+ wp_redirect($url);
64
+
65
+ die();
66
+
67
+ }
68
+
69
+
70
+
71
+ if (wp_email_capture_double_check_everything($name, $email))
72
+
73
+ {
74
+
75
+ // values sent from form
76
+
77
+ $name = sanitize($name);
78
+
79
+ $email= sanitize($email);
80
+
81
+ $name = wp_email_injection_test($name);
82
+
83
+ $email = wp_email_injection_test($email);
84
+
85
+ $name = wp_email_stripslashes($name);
86
+
87
+ $email = wp_email_stripslashes($email);
88
+
89
+ $referrer = sanitize($_SERVER['HTTP_REFERER']);
90
+
91
+ $ip = sanitize($_SERVER['REMOTE_ADDR']);
92
+
93
+ $date = date("Y-m-d H-i");
94
+
95
+
96
+ $sqlcheck = checkIfPresent($email);
97
+
98
+
99
+
100
+ if ($sqlcheck){
101
+
102
+
103
+
104
+ $url = $_SERVER['PHP_SELF'] . "?wp_email_capture_error=User%20already%20present";
105
+
106
+ wp_redirect($url);
107
+
108
+ die();
109
+
110
+ }
111
+
112
+
113
+
114
+ // Insert data into database
115
+
116
+ $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
117
+
118
+
119
+ $result=$wpdb->insert($table_name, array('confirm_code' => $confirm_code, 'name' => $name,'email' => $email), array('%s','%s', '%s'));
120
+ //$sql="INSERT INTO ".$table_name."(confirm_code, name, email)VALUES('$confirm_code', '$name', '$email')";
121
+
122
+ //$result=$wpdb->query($wpdb->prepare($sql));
123
+
124
+
125
+
126
+ // if suceesfully inserted data into database, send confirmation link to email
127
+
128
+ if($result){
129
+
130
+
131
+
132
+ // ---------------- SEND MAIL FORM ----------------
133
+
134
+
135
+
136
+ // send e-mail to ...
137
+
138
+ $to=$email;
139
+
140
+ $siteurl = get_option('home');
141
+ $siteurl = addLastCharacter($siteurl);
142
+
143
+ // Your subject
144
+
145
+ $subject=get_option('wp_email_capture_subject');
146
+
147
+ // From
148
+ $header = "MIME-Version: 1.0\n" . "From: " . get_option('wp_email_capture_from_name') . " <" . get_option('wp_email_capture_from') . ">\n";
149
+ $header .= "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
150
+ // Your message
151
+
152
+ $message.= get_option('wp_email_capture_body') . "\n\n";
153
+
154
+ $message.= $siteurl ."?wp_email_confirm=1&wp_email_capture_passkey=$confirm_code";
155
+ $message .= "\n\n----\n";
156
+ $message .= __("This is an automated message that is generated because somebody with the IP address of",'WPEC')." " . $ip ." ".__('(possibly you) on','WPEC')." ". $date ." ".__('filled out the form on the following page','WPEC')." " . $referrer . "\n";
157
+ $message .= __("If you are sure this isn't you, please ignore this message, you will not be sent another message.",'WPEC');
158
+ $message = str_replace("%NAME%", $name, $message);
159
+
160
+ // send email
161
+
162
+ $sentmail = wp_mail($to,$subject,$message,$header);
163
+
164
+ }
165
+
166
+ }
167
+
168
+
169
+
170
+ // if not found
171
+
172
+ else {
173
+
174
+ echo __("Not found your email in our database",'WPEC');
175
+
176
+ }
177
+
178
+
179
+
180
+ // if your email succesfully sent
181
+
182
+ if($sentmail){
183
+
184
+ $halfreg = get_option('wp_email_capture_signup');
185
+
186
+ wp_redirect($halfreg);
187
+
188
+ die();
189
+
190
+ }
191
+
192
+ else {
193
+
194
+ $url = $_SERVER['PHP_SELF'] . "?wp_email_capture_error=Email%20unable%20to%20be%20sent";
195
+
196
+ wp_redirect($url);
197
+
198
+ die();
199
+
200
+ //echo "<meta http-equiv='refresh' content='0;". $url . "?wp_email_capture_error=Email%20unable%20to%20be%sent'>";
201
+
202
+ }
203
+
204
+ }
205
+
206
+
207
+
208
+
209
+
210
+ function wp_capture_email_confirm()
211
+
212
+ {
213
+
214
+ global $wpdb;
215
+
216
+ // Passkey that got from link
217
+
218
+ $passkey=sanitize($_GET['wp_email_capture_passkey']);
219
+
220
+ $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
221
+
222
+ $sql1="SELECT id FROM $table_name WHERE confirm_code ='$passkey'";
223
+
224
+ $result=$wpdb->get_var($wpdb->prepare($sql1));
225
+
226
+ if ($result != '')
227
+
228
+ {
229
+
230
+ $table_name2 = $wpdb->prefix . "wp_email_capture_registered_members";
231
+
232
+ $sql2="SELECT * FROM $table_name WHERE confirm_code ='$passkey'";
233
+
234
+ $rowresults = $wpdb->get_results($wpdb->prepare($sql2));
235
+
236
+ foreach ($rowresults as $rowresult) {
237
+
238
+ $name = $rowresult->name;
239
+
240
+ $email = $rowresult->email;
241
+
242
+ $result3 = $wpdb->insert($table_name2, array( 'name' => $name, 'email' => $email),array('%s','%s'));
243
+
244
+ //$sql3="INSERT INTO $table_name2(name, email)VALUES('$name', '$email')";
245
+ //$result3=$wpdb->query($wpdb->prepare($sql3));
246
+
247
+ }
248
+
249
+ }
250
+
251
+ else {
252
+
253
+ $url = $url . "?wp_email_capture_error=Wrong%20confirmation%20code";
254
+
255
+ wp_redirect($url);
256
+
257
+ }
258
+
259
+ // if successfully moved data from table"temp_members_db" to table "registered_members" displays message "Your account has been activated" and don't forget to delete confirmation code from table "temp_members_db"
260
+
261
+
262
+
263
+ if($result3){
264
+
265
+ $sql4="DELETE FROM $table_name WHERE confirm_code = '$passkey'";
266
+
267
+ $result4=$wpdb->query($wpdb->prepare($sql4));
268
+
269
+ $fullreg = get_option('wp_email_capture_redirection');
270
+
271
+ wp_redirect($fullreg);
272
+
273
+
274
+
275
+ echo "<meta http-equiv='refresh' content='0;". $fullreg ."'>";
276
+ die();
277
+
278
+ }
279
+
280
+
281
+
282
+
283
+
284
+ }
285
+
286
+
287
+
288
+
289
+
290
+ ?>
inc/security.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+ /* Check for injection characters */
6
+
7
+ function wp_email_injection_chars($s) {
8
+
9
+ return (stripos("\r", $s) || stripos("\n", $s) || stripos("%0a", $s) || stripos("%0d", $s)) ? TRUE : FALSE;
10
+
11
+ }
12
+
13
+
14
+
15
+
16
+
17
+ /* Make output safe for the browser */
18
+
19
+ function wp_email_capture_bsafe($input) {
20
+
21
+ return htmlspecialchars(stripslashes($input));
22
+
23
+ }
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+ function wp_email_stripslashes($s) {
34
+
35
+ if (defined('TEMPLATEPATH') || (get_magic_quotes_gpc())) {
36
+
37
+ return stripslashes($s);
38
+
39
+ } else {
40
+
41
+ return $s;
42
+
43
+ }
44
+
45
+ }
46
+
47
+
48
+
49
+
50
+
51
+ function wp_email_injection_test($str) {
52
+
53
+ $tests = array("/bcc\:/i", "/Content\-Type\:/i", "/Mime\-Version\:/i", "/cc\:/i", "/from\:/i", "/to\:/i", "/Content\-Transfer\-Encoding\:/i");
54
+
55
+ return preg_replace($tests, "", $str);
56
+
57
+ }
58
+
59
+
60
+
61
+ ?>
inc/tabledata.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+ function wp_email_capture_writetable($limit = 0, $header = '')
6
+
7
+ {
8
+
9
+ global $wpdb;
10
+
11
+ $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
12
+
13
+ $sql = "SELECT id, name, email FROM " . $table_name;
14
+
15
+ if ($limit != 0) {
16
+
17
+ $sql .= " ORDER BY id DESC LIMIT 3";
18
+
19
+ }
20
+
21
+ $results = $wpdb->get_results($wpdb->prepare($sql));
22
+
23
+
24
+
25
+ if ($header == '') {
26
+
27
+ $header = "<h3>".__('Members','WPEC')."</h3>";
28
+
29
+ }
30
+
31
+ echo $header;
32
+
33
+ ?>
34
+
35
+ <table border="0">
36
+
37
+ <tr><td><strong><?php _e('Name','WPEC'); ?></strong></td><td colspan="2"><strong><?php _e('Email','WPEC'); ?></strong></td></tr>
38
+
39
+ <?php foreach ($results as $result) {
40
+ if ($limit == 0) {
41
+ $delid = wp_email_capture_formdelete($result->id, $result->email);
42
+ }
43
+ echo "<tr><td style='width: 300px;'>" . $result->name ."</td><td style='width: 300px;'>" . $result->email ."</td><td style='width: 300px;'>
44
+ ". $delid ."</td>
45
+
46
+ </tr>";
47
+
48
+ }
49
+
50
+ ?>
51
+
52
+ </table>
53
+
54
+ <?php
55
+
56
+ }
57
+
58
+
59
+ function wp_email_capture_formdelete($id, $email)
60
+ {
61
+ return "<form action='" . esc_url($_SERVER['REQUEST_URI']) . "#list' method='post'>
62
+ <input type='hidden' name='wp_email_capture_deleteid' value='". $id."' />
63
+ <input type='submit' value='Delete ". $email ."' style='width: 300px;' />
64
+ </form>";
65
+ }
66
+
67
+ function wp_email_capture_deleteid($id)
68
+ {
69
+ global $wpdb;
70
+
71
+ $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
72
+
73
+ $sql = "DELETE FROM " . $table_name . " WHERE id = '" . $id ."'";
74
+
75
+ $result = $wpdb->query($wpdb->prepare($sql));
76
+
77
+ }
78
+ ?>
inc/tempdata.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wp_email_capture_truncate()
4
+
5
+ {
6
+
7
+ global $wpdb;
8
+
9
+ $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
10
+
11
+ $sql = "TRUNCATE " . $table_name;
12
+
13
+ $result = $wpdb->query($wpdb->prepare($sql));
14
+
15
+ }
16
+
17
+ function wp_email_capture_delete()
18
+
19
+ {
20
+
21
+ global $wpdb;
22
+
23
+ $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
24
+
25
+ $sql = "TRUNCATE " . $table_name;
26
+
27
+ $result = $wpdb->query($wpdb->prepare($sql));
28
+
29
+ }
30
+
31
+
32
+ function wp_email_capture_count_temp()
33
+
34
+ {
35
+
36
+ global $wpdb;
37
+
38
+ $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
39
+
40
+ $sql = 'SELECT COUNT(*)
41
+
42
+ FROM '. $table_name;
43
+
44
+ $prep = $wpdb->prepare($sql);
45
+
46
+ $result = $wpdb->get_var($prep);
47
+
48
+ return $result;
49
+
50
+ }
51
+
52
+ ?>
inc/widget.php ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wp_email_capture_widget_init() {
4
+
5
+
6
+
7
+ // Check to see required Widget API functions are defined...
8
+
9
+ if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )
10
+
11
+ return; // ...and if not, exit gracefully from the script.
12
+
13
+
14
+
15
+ // This function prints the sidebar widget--the cool stuff!
16
+
17
+ function wp_email_capture_widget($args) {
18
+
19
+
20
+
21
+ // $args is an array of strings which help your widget
22
+
23
+ // conform to the active theme: before_widget, before_title,
24
+
25
+ // after_widget, and after_title are the array keys.
26
+
27
+ extract($args);
28
+
29
+
30
+
31
+ // Collect our widget's options, or define their defaults.
32
+
33
+ $options = get_option('wp_email_capture_widget');
34
+
35
+ $title = empty($options['title']) ? __('Subscribe!','WPEC') : $options['title'];
36
+
37
+ $text = empty($options['text']) ? __('Subscribe to my blog for updates','WPEC') : $options['text'];
38
+
39
+
40
+
41
+ // It's important to use the $before_widget, $before_title,
42
+
43
+ // $after_title and $after_widget variables in your output.
44
+
45
+ echo $before_widget;
46
+
47
+ echo $before_title . $title . $after_title;
48
+
49
+ echo $text;
50
+
51
+ wp_email_capture_form();
52
+
53
+ echo $after_widget;
54
+
55
+ }
56
+
57
+
58
+
59
+ // This is the function that outputs the form to let users edit
60
+
61
+ // the widget's title and so on. It's an optional feature, but
62
+
63
+ // we'll use it because we can!
64
+
65
+ function wp_email_capture_widget_control() {
66
+
67
+
68
+
69
+ // Collect our widget's options.
70
+
71
+ $options = get_option('wp_email_capture_widget');
72
+
73
+ $newoptions = get_option('wp_email_capture_widget');
74
+
75
+ // This is for handing the control form submission.
76
+
77
+ if ( $_POST['wp-email-capture-submit'] ) {
78
+
79
+ // Clean up control form submission options
80
+
81
+ $newoptions['title'] = strip_tags(stripslashes($_POST['wp-email-capture-title']));
82
+
83
+ $newoptions['text'] = strip_tags(stripslashes($_POST['wp-email-capture-text']));
84
+
85
+ }
86
+
87
+
88
+
89
+ // If original widget options do not match control form
90
+
91
+ // submission options, update them.
92
+
93
+ if ( $options != $newoptions ) {
94
+
95
+ $options = $newoptions;
96
+
97
+ update_option('wp_email_capture_widget', $options);
98
+
99
+ }
100
+
101
+
102
+
103
+ // Format options as valid HTML. Hey, why not.
104
+
105
+ $title = htmlspecialchars($options['title'], ENT_QUOTES);
106
+
107
+ $text = htmlspecialchars($options['text'], ENT_QUOTES);
108
+
109
+
110
+
111
+ // The HTML below is the control form for editing options.
112
+
113
+ ?>
114
+
115
+ <div>
116
+
117
+ <label for="wp-email-capture-title" style="line-height:35px;display:block;"><?php _e('Widget title:','WPEC'); ?> <input type="text" id="wp-email-capture-title" name="wp-email-capture-title" value="<?php echo $title; ?>" /></label>
118
+
119
+ <label for="wp-email-capture-text" style="line-height:35px;display:block;"><?php _e('Widget text:','WPEC'); ?> <input type="text" id="wp-email-capture-text" name="wp-email-capture-text" value="<?php echo $text; ?>" /></label>
120
+
121
+ <input type="hidden" name="wp-email-capture-submit" id="wp-email-capture-submit" value="1" />
122
+
123
+ </div>
124
+
125
+ <?php
126
+
127
+ // end of widget_mywidget_control()
128
+
129
+ }
130
+
131
+
132
+
133
+ // This registers the widget. About time.
134
+
135
+ wp_register_sidebar_widget('wpemailcapture',__('WP Email Capture','WPEC'), 'wp_email_capture_widget');
136
+
137
+
138
+
139
+ // This registers the (optional!) widget control form.
140
+
141
+ wp_register_widget_control('wpemailcapture',__('WP Email Capture','WPEC'), 'wp_email_capture_widget_control');
142
+
143
+ }
144
+
145
+
146
+
147
+ // Delays plugin execution until Dynamic Sidebar has loaded first.
148
+
149
+ add_action('plugins_loaded', 'wp_email_capture_widget_init');
150
+
151
+
152
+
153
+ ?>
languages/WPEC-de_DE.mo ADDED
Binary file
languages/WPEC-de_DE.po ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WPEC\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-10-21 11:45+0100\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Stephan Gerlach <stephan@computersniffer.com>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-Language: French\n"
13
+ "X-Poedit-Country: FRANCE\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Poedit-Basepath: .\n"
16
+ "X-Poedit-KeywordsList: __;_e\n"
17
+ "X-Poedit-SearchPath-0: ..\n"
18
+
19
+ #: ../inc/dashboard.php:13
20
+ #: ../inc/options.php:151
21
+ msgid "Export"
22
+ msgstr "Exporter"
23
+
24
+ #: ../inc/dashboard.php:17
25
+ msgid "Use the button below to export your list as a CSV to use in software such as"
26
+ msgstr "Utiliser le bouton ci-dessous pour exporter votre liste au format CSV pour l'utiliser dans un logiciel tel que"
27
+
28
+ #: ../inc/dashboard.php:27
29
+ #: ../inc/options.php:165
30
+ msgid "Temporary e-mails"
31
+ msgstr "Emails temporaires"
32
+
33
+ #: ../inc/dashboard.php:31
34
+ #: ../inc/options.php:169
35
+ msgid "There are"
36
+ msgstr "Il y a"
37
+
38
+ #: ../inc/dashboard.php:31
39
+ #: ../inc/options.php:169
40
+ msgid "e-mail addresses that have been unconfirmed. Delete them to save space below."
41
+ msgstr "adresses emails qui ne sont pas confirmées. Supprimer les pour sauvegarder de l'espace."
42
+
43
+ #: ../inc/dashboard.php:47
44
+ msgid "WP Email Capture - At A Glance"
45
+ msgstr "WP Email Capture - En un clin d'oeil"
46
+
47
+ #: ../inc/display.php:22
48
+ msgid "Name:"
49
+ msgstr "Nom:"
50
+
51
+ #: ../inc/display.php:24
52
+ msgid "Email:"
53
+ msgstr "Email:"
54
+
55
+ #: ../inc/display.php:36
56
+ #: ../inc/display.php:71
57
+ msgid "Powered by"
58
+ msgstr "Propulsé par"
59
+
60
+ #: ../inc/options.php:5
61
+ #: ../inc/options.php:15
62
+ msgid "WP Email Capture Options"
63
+ msgstr "Options WP Email Capture"
64
+
65
+ #: ../inc/options.php:19
66
+ msgid "Recommendations"
67
+ msgstr "Recommandations"
68
+
69
+ #: ../inc/options.php:21
70
+ msgid "We recommend"
71
+ msgstr "Nous recommandons"
72
+
73
+ #: ../inc/options.php:21
74
+ msgid "to run your email campaigns. We have tested this plugin with it."
75
+ msgstr "pour effectuer vos campagnes marketing. Nous avons testés ce plugin avec ce service."
76
+
77
+ #: ../inc/options.php:46
78
+ msgid "Options"
79
+ msgstr "Options"
80
+
81
+ #: ../inc/options.php:66
82
+ msgid "Page to redirect to on sign up (full web address ie: http://www.domain.com/this-page/)"
83
+ msgstr "Page de redirection suite à l'enregistrement (adresse compète ie: http://www.domain.com/this-page/)"
84
+
85
+ #: ../inc/options.php:74
86
+ msgid "Page to redirect to on confirmation of email address (full web address ie: http://www.domain.com/this-other-page/)"
87
+ msgstr "Page de redirection pour la confirmation de l'adresse email (adresse complète ie : http://www.domain.com/this-page/)"
88
+
89
+ #: ../inc/options.php:82
90
+ msgid "From Which Email Address"
91
+ msgstr "Email source du message"
92
+
93
+ #: ../inc/options.php:90
94
+ msgid "From Which Name"
95
+ msgstr "Nom source du message"
96
+
97
+ #: ../inc/options.php:98
98
+ msgid "Subject of Email"
99
+ msgstr "Sujet du message"
100
+
101
+ #: ../inc/options.php:106
102
+ msgid "Body of Email"
103
+ msgstr "Contenu du message"
104
+
105
+ #: ../inc/options.php:107
106
+ msgid "(use %NAME% to use the form's &quot;Name&quot; field in their welcome email)"
107
+ msgstr "(utiliser %NAME% pour inclure le nom dans le message de bievenue)"
108
+
109
+ #: ../inc/options.php:115
110
+ msgid "Link to us (optional, but appreciated)"
111
+ msgstr "Faire un lien vers nous (optionnel mais très apprécié)"
112
+
113
+ #: ../inc/options.php:139
114
+ msgid "Save Changes"
115
+ msgstr "Sauvegarder les changements"
116
+
117
+ #: ../inc/options.php:155
118
+ msgid "Use the button below to export your list as a CSV to use in software such as <a href=\"http://www.gospelrhys.co.uk/go/aweber.php\" title=\"Email Marketing\">Aweber</a> or <a href=\"http://www.gospelrhys.co.uk/go/mailchimp.php\">Mailchimp</a>"
119
+ msgstr "Utiliser le bouton ci-dessous pour exporter votre liste au format CSV dans un logiciel tel que <a href=\"http://www.gospelrhys.co.uk/go/aweber.php\" title=\"Email Marketing\">Aweber</a> ou <a href=\"http://www.gospelrhys.co.uk/go/mailchimp.php\">Mailchimp</a>"
120
+
121
+ #: ../inc/options.php:177
122
+ msgid "Delete Current List"
123
+ msgstr "Aktuelle Liste löschen"
124
+
125
+ #: ../inc/options.php:181
126
+ msgid "Want to delete the entire list? Click the link below. <strong>WARNING: </strong> this will delete all confirmed emails, so make sure you have a backup."
127
+ msgstr "Gesamte Liste löschen? Klicken Sie auf den link unten. ACHTUNG: dies wird alle bestätigten e-mails löschen. Bitte zur Sicherheit eine Kopie machen."
128
+
129
+ #: ../inc/options.php:191
130
+ msgid "Donations"
131
+ msgstr "Spenden"
132
+
133
+ #: ../inc/options.php:193
134
+ msgid "If you like this plugin, please consider a small donation to help with future versions &amp; plugins. Donators are thanked on each specific plugin page!"
135
+ msgstr "Wenn Sie dieses plugin gut finden, erwägen Sie bitte eine kleine Spende zur Unterstützung der zukünftigen Versionen & Plugins. Wir bedanken uns bei jedem Spender auf der jeweiligen Plugin Seite!"
136
+
137
+ #: ../inc/pagedresults.php:141
138
+ msgid "Prev"
139
+ msgstr "Zurück"
140
+
141
+ #: ../inc/pagedresults.php:169
142
+ msgid "Next"
143
+ msgstr "Weiter"
144
+
145
+ #: ../inc/process.php:158
146
+ msgid "This is an automated message that is generated because somebody with the IP address of"
147
+ msgstr "Dies ist eine automatische Nachricht, weil jemand mit der IP-Adresse"
148
+
149
+ #: ../inc/process.php:158
150
+ msgid "(possibly you) on"
151
+ msgstr "(vielleicht sie)"
152
+
153
+ #: ../inc/process.php:158
154
+ msgid "filled out the form on the following page"
155
+ msgstr "das Formular auf der folgenden seite ausgefüllt hat"
156
+
157
+ #: ../inc/process.php:159
158
+ msgid "If you are sure this isn't you, please ignore this message, you will not be sent another message."
159
+ msgstr "Wenn Sie sich sicher sind dass dies nicht waren, bitte ignorieren Sie diese Meldung. Sie werden keine weiteren Meldungen empfangen."
160
+
161
+ #: ../inc/process.php:176
162
+ msgid "Not found your email in our database"
163
+ msgstr "Ihre e-mail konnte nicht unserer Datenbank gefunden werden"
164
+
165
+ #: ../inc/tabledata.php:27
166
+ msgid "Members"
167
+ msgstr "Mittglieder"
168
+
169
+ #: ../inc/tabledata.php:37
170
+ msgid "Name"
171
+ msgstr "Name"
172
+
173
+ #: ../inc/tabledata.php:37
174
+ msgid "Email"
175
+ msgstr "Email"
176
+
177
+ #: ../inc/widget.php:35
178
+ msgid "Subscribe!"
179
+ msgstr "Abonnieren!"
180
+
181
+ #: ../inc/widget.php:37
182
+ msgid "Subscribe to my blog for updates"
183
+ msgstr "Abonnieren Sie meinen Blog"
184
+
185
+ #: ../inc/widget.php:117
186
+ msgid "Widget title:"
187
+ msgstr "Widget Überschrift:"
188
+
189
+ #: ../inc/widget.php:119
190
+ msgid "Widget text:"
191
+ msgstr "Widget Text:"
192
+
193
+ #: ../inc/widget.php:135
194
+ #: ../inc/widget.php:141
195
+ msgid "WP Email Capture"
196
+ msgstr "WP Email Capture"
197
+
languages/WPEC-fr_FR.mo ADDED
Binary file
languages/WPEC-fr_FR.po ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WPEC\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-10-21 11:45+0100\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-Language: French\n"
13
+ "X-Poedit-Country: FRANCE\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Poedit-Basepath: .\n"
16
+ "X-Poedit-KeywordsList: __;_e\n"
17
+ "X-Poedit-SearchPath-0: ..\n"
18
+
19
+ #: ../inc/dashboard.php:13
20
+ #: ../inc/options.php:151
21
+ msgid "Export"
22
+ msgstr "Exporter"
23
+
24
+ #: ../inc/dashboard.php:17
25
+ msgid "Use the button below to export your list as a CSV to use in software such as"
26
+ msgstr "Utiliser le bouton ci-dessous pour exporter votre liste au format CSV pour l'utiliser dans un logiciel tel que"
27
+
28
+ #: ../inc/dashboard.php:27
29
+ #: ../inc/options.php:165
30
+ msgid "Temporary e-mails"
31
+ msgstr "Emails temporaires"
32
+
33
+ #: ../inc/dashboard.php:31
34
+ #: ../inc/options.php:169
35
+ msgid "There are"
36
+ msgstr "Il y a"
37
+
38
+ #: ../inc/dashboard.php:31
39
+ #: ../inc/options.php:169
40
+ msgid "e-mail addresses that have been unconfirmed. Delete them to save space below."
41
+ msgstr "adresses emails qui ne sont pas confirmées. Supprimer les pour sauvegarder de l'espace."
42
+
43
+ #: ../inc/dashboard.php:47
44
+ msgid "WP Email Capture - At A Glance"
45
+ msgstr "WP Email Capture - En un clin d'oeil"
46
+
47
+ #: ../inc/display.php:22
48
+ msgid "Name:"
49
+ msgstr "Nom:"
50
+
51
+ #: ../inc/display.php:24
52
+ msgid "Email:"
53
+ msgstr "Email:"
54
+
55
+ #: ../inc/display.php:36
56
+ #: ../inc/display.php:71
57
+ msgid "Powered by"
58
+ msgstr "Propulsé par"
59
+
60
+ #: ../inc/options.php:5
61
+ #: ../inc/options.php:15
62
+ msgid "WP Email Capture Options"
63
+ msgstr "Options WP Email Capture"
64
+
65
+ #: ../inc/options.php:19
66
+ msgid "Recommendations"
67
+ msgstr "Recommandations"
68
+
69
+ #: ../inc/options.php:21
70
+ msgid "We recommend"
71
+ msgstr "Nous recommandons"
72
+
73
+ #: ../inc/options.php:21
74
+ msgid "to run your email campaigns. We have tested this plugin with it."
75
+ msgstr "pour effectuer vos campagnes marketing. Nous avons testés ce plugin avec ce service."
76
+
77
+ #: ../inc/options.php:46
78
+ msgid "Options"
79
+ msgstr "Options"
80
+
81
+ #: ../inc/options.php:66
82
+ msgid "Page to redirect to on sign up (full web address ie: http://www.domain.com/this-page/)"
83
+ msgstr "Page de redirection suite à l'enregistrement (adresse compète ie: http://www.domain.com/this-page/)"
84
+
85
+ #: ../inc/options.php:74
86
+ msgid "Page to redirect to on confirmation of email address (full web address ie: http://www.domain.com/this-other-page/)"
87
+ msgstr "Page de redirection pour la confirmation de l'adresse email (adresse complète ie : http://www.domain.com/this-page/)"
88
+
89
+ #: ../inc/options.php:82
90
+ msgid "From Which Email Address"
91
+ msgstr "Email source du message"
92
+
93
+ #: ../inc/options.php:90
94
+ msgid "From Which Name"
95
+ msgstr "Nom source du message"
96
+
97
+ #: ../inc/options.php:98
98
+ msgid "Subject of Email"
99
+ msgstr "Sujet du message"
100
+
101
+ #: ../inc/options.php:106
102
+ msgid "Body of Email"
103
+ msgstr "Contenu du message"
104
+
105
+ #: ../inc/options.php:107
106
+ msgid "(use %NAME% to use the form's &quot;Name&quot; field in their welcome email)"
107
+ msgstr "(utiliser %NAME% pour inclure le nom dans le message de bievenue)"
108
+
109
+ #: ../inc/options.php:115
110
+ msgid "Link to us (optional, but appreciated)"
111
+ msgstr "Faire un lien vers nous (optionnel mais très apprécié)"
112
+
113
+ #: ../inc/options.php:139
114
+ msgid "Save Changes"
115
+ msgstr "Sauvegarder les changements"
116
+
117
+ #: ../inc/options.php:155
118
+ msgid "Use the button below to export your list as a CSV to use in software such as <a href=\"http://www.gospelrhys.co.uk/go/aweber.php\" title=\"Email Marketing\">Aweber</a> or <a href=\"http://www.gospelrhys.co.uk/go/mailchimp.php\">Mailchimp</a>"
119
+ msgstr "Utiliser le bouton ci-dessous pour exporter votre liste au format CSV dans un logiciel tel que <a href=\"http://www.gospelrhys.co.uk/go/aweber.php\" title=\"Email Marketing\">Aweber</a> ou <a href=\"http://www.gospelrhys.co.uk/go/mailchimp.php\">Mailchimp</a>"
120
+
121
+ #: ../inc/options.php:177
122
+ msgid "Delete Current List"
123
+ msgstr "Supprimer la liste"
124
+
125
+ #: ../inc/options.php:181
126
+ msgid "Want to delete the entire list? Click the link below. <strong>WARNING: </strong> this will delete all confirmed emails, so make sure you have a backup."
127
+ msgstr "Vous souhaitez supprimer la liste complète? Cliquez sur le lien ci-dessous. <strong>Attention: </strong> ceci supprimera tous les emails confirmés, donc assurez vous d'avoir une copie de sauvegarde."
128
+
129
+ #: ../inc/options.php:191
130
+ msgid "Donations"
131
+ msgstr "Dons"
132
+
133
+ #: ../inc/options.php:193
134
+ msgid "If you like this plugin, please consider a small donation to help with future versions &amp; plugins. Donators are thanked on each specific plugin page!"
135
+ msgstr "Si vous aimez cette extension, n'hésitez pas à faire un don afin d'aider au développement des futures versions. Les donateurs sont remerciés sur chaque page de l'extension."
136
+
137
+ #: ../inc/pagedresults.php:141
138
+ msgid "Prev"
139
+ msgstr "Précédent"
140
+
141
+ #: ../inc/pagedresults.php:169
142
+ msgid "Next"
143
+ msgstr "Suivant"
144
+
145
+ #: ../inc/process.php:158
146
+ msgid "This is an automated message that is generated because somebody with the IP address of"
147
+ msgstr "Ceci est un message automatique qui est généré parce que quelqu'un avec l'adresse IP"
148
+
149
+ #: ../inc/process.php:158
150
+ msgid "(possibly you) on"
151
+ msgstr "(peut être vous) le"
152
+
153
+ #: ../inc/process.php:158
154
+ msgid "filled out the form on the following page"
155
+ msgstr "a remplit un formulaire sur la page suivante"
156
+
157
+ #: ../inc/process.php:159
158
+ msgid "If you are sure this isn't you, please ignore this message, you will not be sent another message."
159
+ msgstr "Si vous êtes certain que ce n'est pas vous, veuillez ignorer ce message, aucun autre message ne vous sera adressé."
160
+
161
+ #: ../inc/process.php:176
162
+ msgid "Not found your email in our database"
163
+ msgstr "Votre email n'a pas été trouvé dans la base"
164
+
165
+ #: ../inc/tabledata.php:27
166
+ msgid "Members"
167
+ msgstr "Membres"
168
+
169
+ #: ../inc/tabledata.php:37
170
+ msgid "Name"
171
+ msgstr "Nom"
172
+
173
+ #: ../inc/tabledata.php:37
174
+ msgid "Email"
175
+ msgstr "Email"
176
+
177
+ #: ../inc/widget.php:35
178
+ msgid "Subscribe!"
179
+ msgstr "Abonnez vous!"
180
+
181
+ #: ../inc/widget.php:37
182
+ msgid "Subscribe to my blog for updates"
183
+ msgstr "Abonnez vous à mon blog pour recevoir les mises à jour"
184
+
185
+ #: ../inc/widget.php:117
186
+ msgid "Widget title:"
187
+ msgstr "Titre du widget:"
188
+
189
+ #: ../inc/widget.php:119
190
+ msgid "Widget text:"
191
+ msgstr "Texte du widget:"
192
+
193
+ #: ../inc/widget.php:135
194
+ #: ../inc/widget.php:141
195
+ msgid "WP Email Capture"
196
+ msgstr "WP Email Capture"
197
+
languages/WPEC-pt_BR.mo ADDED
Binary file
languages/WPEC-pt_BR.po ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WPEC\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-04-02 09:57-0300\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: nicholas <nicholas@jmbn.com.br>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-Language: French\n"
13
+ "X-Poedit-Country: FRANCE\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Poedit-Basepath: .\n"
16
+ "X-Poedit-KeywordsList: __;_e\n"
17
+ "X-Poedit-SearchPath-0: ..\n"
18
+
19
+ #: ../inc/_display.php:22
20
+ msgid "Name:"
21
+ msgstr "Nome:"
22
+
23
+ #: ../inc/_display.php:24
24
+ msgid "Email:"
25
+ msgstr "E-mail:"
26
+
27
+ #: ../inc/_display.php:36
28
+ #: ../inc/_display.php:71
29
+ #: ../inc/display.php:34
30
+ #: ../inc/display.php:69
31
+ msgid "Powered by"
32
+ msgstr "Desenvolvido por"
33
+
34
+ #: ../inc/dashboard.php:13
35
+ #: ../inc/options.php:151
36
+ msgid "Export"
37
+ msgstr "Exportar"
38
+
39
+ #: ../inc/dashboard.php:15
40
+ msgid "Use the button below to export your list as a CSV to use in software such as"
41
+ msgstr "Use o botão abaixo para exportar a lista como um arquivo CSV para usar em programas como "
42
+
43
+ #: ../inc/dashboard.php:22
44
+ #: ../inc/options.php:165
45
+ msgid "Temporary e-mails"
46
+ msgstr "Emails temporários"
47
+
48
+ #: ../inc/dashboard.php:24
49
+ #: ../inc/options.php:169
50
+ msgid "There are"
51
+ msgstr "Existem"
52
+
53
+ #: ../inc/dashboard.php:24
54
+ #: ../inc/options.php:169
55
+ msgid "e-mail addresses that have been unconfirmed. Delete them to save space below."
56
+ msgstr "endereços de e-mail que não foram confirmados. Exclua-os para economizar espaço."
57
+
58
+ #: ../inc/dashboard.php:40
59
+ msgid "WP Email Capture - At A Glance"
60
+ msgstr "WP Email Capture - À primeira vista"
61
+
62
+ #: ../inc/options.php:5
63
+ #: ../inc/options.php:15
64
+ msgid "WP Email Capture Options"
65
+ msgstr "Opções - WP Email Capture"
66
+
67
+ #: ../inc/options.php:19
68
+ msgid "Recommendations"
69
+ msgstr "Recomendações"
70
+
71
+ #: ../inc/options.php:21
72
+ msgid "We recommend"
73
+ msgstr "Recomendamos"
74
+
75
+ #: ../inc/options.php:21
76
+ msgid "to run your email campaigns. We have tested this plugin with it."
77
+ msgstr "para executar suas campanhas de e-mail. Nós testamos este plugin juntamente com o WP E-mail Capture."
78
+
79
+ #: ../inc/options.php:46
80
+ msgid "Options"
81
+ msgstr "Opções"
82
+
83
+ #: ../inc/options.php:66
84
+ msgid "Page to redirect to on sign up (full web address ie: http://www.domain.com/this-page/)"
85
+ msgstr "Página para redirecionar após o cadastro</br>Usar endereço completo: http://www.dominio.com/pagina-cadastro"
86
+
87
+ #: ../inc/options.php:74
88
+ msgid "Page to redirect to on confirmation of email address (full web address ie: http://www.domain.com/this-other-page/)"
89
+ msgstr "Página para redirecionar após a confirmação do endereço de email.</br>Usar endereço completo: http://www.dominio.com/pagina-confirma"
90
+
91
+ #: ../inc/options.php:82
92
+ msgid "From Which Email Address"
93
+ msgstr "Endereço de email do remetente"
94
+
95
+ #: ../inc/options.php:90
96
+ msgid "From Which Name"
97
+ msgstr "Nome de exibição no e-mail de confirmação"
98
+
99
+ #: ../inc/options.php:98
100
+ msgid "Subject of Email"
101
+ msgstr "Assunto da mensagem"
102
+
103
+ #: ../inc/options.php:106
104
+ msgid "Body of Email"
105
+ msgstr "<b>Conteúdo da mensagem</b>"
106
+
107
+ #: ../inc/options.php:107
108
+ msgid "(use %NAME% to use the form's &quot;Name&quot; field in their welcome email)"
109
+ msgstr "Use %NAME% para incluir o nome inserido no formulário de cadastro, na mensagem de boas vindas."
110
+
111
+ #: ../inc/options.php:115
112
+ msgid "Link to us (optional, but appreciated)"
113
+ msgstr "Link do desenvolvedor (opcional, mas apreciado)"
114
+
115
+ #: ../inc/options.php:139
116
+ msgid "Save Changes"
117
+ msgstr "Salvar mudanças"
118
+
119
+ #: ../inc/options.php:155
120
+ msgid "Use the button below to export your list as a CSV to use in software such as <a href=\"http://wpemailcapture.com/recommends/aweber\" title=\"Email Marketing\">Aweber</a> or <a href=\"http://wpemailcapture.com/recommends/mailchimp\">Mailchimp</a>"
121
+ msgstr "Use o botão abaixo para exportar a lista como um arquivo CSV para usar em programas como <a href=\"http://wpemailcapture.com/recommends/aweber\" title=\"Email Marketing\">Aweber</ a> ou <a href=\"http://wpemailcapture.com/recommends/mailchimp\">MailChimp</ a>"
122
+
123
+ #: ../inc/options.php:177
124
+ msgid "Delete Current List"
125
+ msgstr "Deletar a lista atual"
126
+
127
+ #: ../inc/options.php:181
128
+ msgid "Want to delete the entire list? Click the link below. <strong>WARNING: </strong> this will delete all confirmed emails, so make sure you have a backup."
129
+ msgstr "Quer apagar toda a lista? Clique no link abaixo. </br><strong> AVISO: </strong> isso vai apagar todos os e-mails confirmados, por isso verifique se você tem um backup."
130
+
131
+ #: ../inc/options.php:191
132
+ msgid "Donations"
133
+ msgstr "Doações"
134
+
135
+ #: ../inc/options.php:193
136
+ msgid "If you like this plugin, please consider a small donation to help with future versions &amp; plugins. Donators are thanked on each specific plugin page!"
137
+ msgstr "Se você gostou deste plugin, por favor considere fazer uma pequena doação para ajudar com futuras versões e plugins.</br> Doadores são agradecidos em cada página do plugin!"
138
+
139
+ #: ../inc/pagedresults.php:141
140
+ msgid "Prev"
141
+ msgstr "Anterior"
142
+
143
+ #: ../inc/pagedresults.php:169
144
+ msgid "Next"
145
+ msgstr "Próxima"
146
+
147
+ #: ../inc/process.php:158
148
+ msgid "This is an automated message that is generated because somebody with the IP address of"
149
+ msgstr "Esta é uma mensagem automática que é gerado porque alguém com o endereço IP de"
150
+
151
+ #: ../inc/process.php:158
152
+ msgid "(possibly you) on"
153
+ msgstr "(possivelmente você) em"
154
+
155
+ #: ../inc/process.php:158
156
+ msgid "filled out the form on the following page"
157
+ msgstr "preencheu o formulário na seguinte página "
158
+
159
+ #: ../inc/process.php:159
160
+ msgid "If you are sure this isn't you, please ignore this message, you will not be sent another message."
161
+ msgstr "Se tiver a certeza que não é você, por favor, ignore esta mensagem. Não será enviada outra mensagem."
162
+
163
+ #: ../inc/process.php:176
164
+ msgid "Not found your email in our database"
165
+ msgstr "Seu e-mail não foi encontrado em nosso banco de dados"
166
+
167
+ #: ../inc/tabledata.php:27
168
+ msgid "Members"
169
+ msgstr "Membros"
170
+
171
+ #: ../inc/tabledata.php:37
172
+ msgid "Name"
173
+ msgstr "Nome"
174
+
175
+ #: ../inc/tabledata.php:37
176
+ msgid "Email"
177
+ msgstr "E-mail"
178
+
179
+ #: ../inc/widget.php:35
180
+ msgid "Subscribe!"
181
+ msgstr "Inscrever-se!"
182
+
183
+ #: ../inc/widget.php:37
184
+ msgid "Subscribe to my blog for updates"
185
+ msgstr "Assine o meu blog para receber notícias sobre atualizações"
186
+
187
+ #: ../inc/widget.php:117
188
+ msgid "Widget title:"
189
+ msgstr "Título do widget:"
190
+
191
+ #: ../inc/widget.php:119
192
+ msgid "Widget text:"
193
+ msgstr "Texto do widget:"
194
+
195
+ #: ../inc/widget.php:135
196
+ #: ../inc/widget.php:141
197
+ msgid "WP Email Capture"
198
+ msgstr "WP Email Capture"
199
+
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Tags: email, marketing, capture, form, affiliates, mailing lists, email marketing, widget ready
3
  Requires at least: 3.0
4
  Tested up to: 3.3.1
5
- Version: 2.1.1
6
- Stable tag: 2.1.1
7
  Contributors: rhyswynne
8
  Donate link: http://www.wpemailcapture.com/donations/
9
 
@@ -34,6 +34,8 @@ Translation Credits:-
34
  Translations have been done by the following parties. Thank you!
35
 
36
  * French: Olivier - http://www.ticket-system.net/
 
 
37
 
38
  == Installation ==
39
  Upload the plugin (unzipped) into `/wp-content/plugins/`.
@@ -99,9 +101,9 @@ To style your form, you need to add to your CSS file the following ID declaratio
99
  }`
100
 
101
  == Screenshots ==
102
- 1. It's appearance within the template
103
- 2. The form within a post
104
- 3. The Dashboard Widget
105
 
106
  == Frequently Asked Questions ==
107
 
@@ -123,9 +125,11 @@ Please report any bugs, support and suggestions to the [WP Email Capture Support
123
  == Donate ==
124
  To donate to this plugin, please visit the [WP Email Capture Donations Page](http://www.wpemailcapture.com/donations/)
125
 
126
-
127
-
128
  == Change Log ==
 
 
 
 
129
  = 2.1.1 (03/02/12) =
130
  * Actually fixed the display bug talked about in 2.1
131
  * Edited the Dashboard widget so that it's only displayed to user admins.
2
  Tags: email, marketing, capture, form, affiliates, mailing lists, email marketing, widget ready
3
  Requires at least: 3.0
4
  Tested up to: 3.3.1
5
+ Version: 2.2.1
6
+ Stable tag: 2.2.1
7
  Contributors: rhyswynne
8
  Donate link: http://www.wpemailcapture.com/donations/
9
 
34
  Translations have been done by the following parties. Thank you!
35
 
36
  * French: Olivier - http://www.ticket-system.net/
37
+ * German: Stephan - http://www.computersniffer.com/
38
+ * Brazilian Portugese: Nick Lima (@nick_linux) - http://cotidianolinux.com.br
39
 
40
  == Installation ==
41
  Upload the plugin (unzipped) into `/wp-content/plugins/`.
101
  }`
102
 
103
  == Screenshots ==
104
+ 1. The Dashboard Widget
105
+ 2. The Options Page
106
+ 3. It's appearance within the template
107
 
108
  == Frequently Asked Questions ==
109
 
125
  == Donate ==
126
  To donate to this plugin, please visit the [WP Email Capture Donations Page](http://www.wpemailcapture.com/donations/)
127
 
 
 
128
  == Change Log ==
129
+ = 2.2 (17/4/12) =
130
+ * The [Jemjabella](http://www.jemjabella.co.uk) update, after the individual who supplied most of the bug fixes, cheers!
131
+ * Added language support for Brazilian Portugese & German.
132
+
133
  = 2.1.1 (03/02/12) =
134
  * Actually fixed the display bug talked about in 2.1
135
  * Edited the Dashboard widget so that it's only displayed to user admins.
screenshots/screenshot-1.png ADDED
Binary file
screenshots/screenshot-2.png ADDED
Binary file
screenshots/screenshot-3.png ADDED
Binary file
wp-email-capture.php CHANGED
@@ -8,7 +8,7 @@ Plugin URI: http://www.wpemailcapture.com
8
 
9
  Description: Captures email addresses for insertion into software such as <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="http://wpemailcapture.com/recommends/mailchimp/">Mailchimp</a>
10
 
11
- Version: 2.1.1
12
 
13
  Author: Rhys Wynne
14
 
@@ -49,7 +49,7 @@ if ( is_admin() ){ // admin actions
49
 
50
  add_action('init','wp_email_capture_process');
51
 
52
- add_filter ( 'the_content', 'wp_email_capture_display_form_in_post');
53
 
54
  }
55
 
@@ -57,7 +57,7 @@ if ( is_admin() ){ // admin actions
57
 
58
  register_activation_hook(__FILE__,'wp_email_capture_install');
59
 
60
-
61
 
62
 
63
 
8
 
9
  Description: Captures email addresses for insertion into software such as <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="http://wpemailcapture.com/recommends/mailchimp/">Mailchimp</a>
10
 
11
+ Version: 2.2.1
12
 
13
  Author: Rhys Wynne
14
 
49
 
50
  add_action('init','wp_email_capture_process');
51
 
52
+ //add_filter( 'the_content', 'wp_email_capture_display_form_in_post');
53
 
54
  }
55
 
57
 
58
  register_activation_hook(__FILE__,'wp_email_capture_install');
59
 
60
+ add_shortcode( 'wp_email_capture_form', 'wp_email_capture_form_page');
61
 
62
 
63