Simple Membership - Version 3.2.6

Version Description

  • Added Hungarian language translation file. The translation was submitted by Laura Szitar.
  • Improved the members menu navigation menu so the tabs are always visible (even when you go to the add or edit members screen).
  • Added 2 new action hooks (They are triggered when subscription is cancelled and when a recurring payment is received).
  • Improved the membership levels navigation menu tabs.
  • The "Edit Member" interface now shows the member ID of the currently editing member.
Download this release

Release Info

Developer mra13
Plugin Icon 128x128 Simple Membership
Version 3.2.6
Comparing to
See all releases

Code changes from version 3.2.5 to 3.2.6

Files changed (65) hide show
  1. classes/admin-includes/class.swpm-payment-buttons-list-table.php +3 -1
  2. classes/admin-includes/class.swpm-payments-admin-menu.php +90 -0
  3. classes/admin-includes/class.swpm-payments-list-table.php +3 -1
  4. classes/admin-includes/swpm-payments-list-table.php +0 -153
  5. classes/class.bAccessControl.php +0 -109
  6. classes/class.bAdminRegistration.php +0 -92
  7. classes/class.bAjax.php +0 -36
  8. classes/class.bAuth.php +0 -291
  9. classes/class.bAuthPermissionCollection.php +0 -9
  10. classes/class.bCategoryList.php +0 -115
  11. classes/class.bCronJob.php +0 -60
  12. classes/class.bForm.php +0 -308
  13. classes/class.bFrontForm.php +0 -7
  14. classes/class.bFrontRegistration.php +0 -206
  15. classes/class.bInstallation.php +0 -243
  16. classes/class.bLevelForm.php +0 -126
  17. classes/class.bLog.php +0 -77
  18. classes/class.bMemberUtils.php +0 -35
  19. classes/class.bMembers.php +0 -198
  20. classes/class.bMembershipLevel.php +0 -70
  21. classes/class.bMembershipLevelCustom.php +0 -93
  22. classes/class.bMembershipLevelUtils.php +0 -10
  23. classes/class.bMembershipLevels.php +0 -156
  24. classes/class.bMessages.php +0 -23
  25. classes/class.bPermission.php +0 -60
  26. classes/class.bPermissionCollection.php +0 -49
  27. classes/class.bProtection.php +0 -66
  28. classes/class.bProtectionBase.php +0 -296
  29. classes/class.bRegistration.php +0 -42
  30. classes/class.bSession.php +0 -0
  31. classes/class.bSettings.php +0 -395
  32. classes/class.bTransactions.php +0 -55
  33. classes/class.bTransfer.php +0 -65
  34. classes/class.bUtils.php +0 -385
  35. classes/class.miscUtils.php +0 -167
  36. classes/class.simple-wp-membership.php +25 -72
  37. classes/class.swpm-front-registration.php +17 -11
  38. classes/class.swpm-members.php +76 -1
  39. classes/class.swpm-membership-level.php +1 -1
  40. classes/class.swpm-membership-levels.php +97 -4
  41. classes/class.swpm-settings.php +89 -8
  42. classes/common/class-swpm-list-table.php +0 -1138
  43. ipn/swpm_handle_subsc_ipn.php +7 -0
  44. languages/swpm-da_DA.mo +0 -0
  45. languages/swpm-da_DA.po +0 -934
  46. languages/swpm-hu_HU.mo +0 -0
  47. languages/swpm-hu_HU.po +1871 -0
  48. readme.txt +9 -2
  49. simple-wp-membership.php +2 -2
  50. views/admin_add_level.php +1 -1
  51. views/admin_addon_settings.php +8 -14
  52. views/admin_category_list.php +22 -20
  53. views/admin_edit.php +5 -1
  54. views/admin_edit_level.php +7 -2
  55. views/admin_members.php +0 -6
  56. views/admin_members_menu.php +0 -12
  57. views/admin_membership_level_menu.php +0 -5
  58. views/admin_membership_levels.php +0 -25
  59. views/admin_membership_manage.php +15 -15
  60. views/admin_payment_settings.php +0 -47
  61. views/admin_payments_page.php +0 -54
  62. views/admin_settings.php +8 -11
  63. views/admin_tools_settings.php +52 -54
  64. views/payments/admin_payment_settings.php +35 -40
  65. views/payments/admin_payments_page.php +0 -46
classes/admin-includes/class.swpm-payment-buttons-list-table.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
 
3
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/common/class.swpm-list-table.php');
 
 
4
 
5
  class SwpmPaymentButtonsListTable extends WP_List_Table {
6
 
1
  <?php
2
 
3
+ if (!class_exists('WP_List_Table')){
4
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
5
+ }
6
 
7
  class SwpmPaymentButtonsListTable extends WP_List_Table {
8
 
classes/admin-includes/class.swpm-payments-admin-menu.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SwpmPaymentsAdminMenu {
4
+
5
+ function __construct() {
6
+
7
+ }
8
+
9
+ function handle_main_payments_admin_menu() {
10
+
11
+ do_action('swpm_payments_menu_start');
12
+
13
+ $output = '';
14
+ $tab = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : '';
15
+ $selected = $tab;
16
+ ?>
17
+
18
+
19
+ <div class="wrap swpm-admin-menu-wrap"><!-- start wrap -->
20
+
21
+ <h1><?php echo SwpmUtils::_('Simple Membership::Payments') ?></h1><!-- page title -->
22
+
23
+ <!-- start nav menu tabs -->
24
+ <h2 class="nav-tab-wrapper">
25
+ <a class="nav-tab <?php echo ($tab == '') ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_payments"><?php SwpmUtils::e('Transactions'); ?></a>
26
+ <a class="nav-tab <?php echo ($tab == 'payment_buttons') ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_payments&tab=payment_buttons"><?php SwpmUtils::e('Manage Payment Buttons'); ?></a>
27
+ <a class="nav-tab <?php echo ($tab == 'create_new_button') ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_payments&tab=create_new_button"><?php SwpmUtils::e('Create New Button'); ?></a>
28
+ <?php
29
+ if ($tab == 'edit_button') {//Only show the "edit button" tab when a button is being edited.
30
+ echo '<a class="nav-tab nav-tab-active" href="#">Edit Button</a>';
31
+ }
32
+
33
+ //Trigger hooks that allows an extension to add extra nav tabs in the payments menu.
34
+ do_action ('swpm_payments_menu_nav_tabs', $selected);
35
+
36
+ $menu_tabs = apply_filters('swpm_payments_menu_additional_menu_tabs_array', array());
37
+ foreach ($menu_tabs as $menu_action => $title){
38
+ ?>
39
+ <a class="nav-tab <?php echo ($selected == $menu_action) ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_payments&tab=<?php echo $menu_action; ?>" ><?php SwpmUtils::e($title); ?></a>
40
+ <?php
41
+ }
42
+
43
+ ?>
44
+ </h2>
45
+ <!-- end nav menu tabs -->
46
+
47
+ <?php
48
+
49
+ do_action('swpm_payments_menu_after_nav_tabs');
50
+
51
+ //Allows an addon to completely override the body section of the payments admin menu for a given action.
52
+ $output = apply_filters('swpm_payments_menu_body_override', '', $tab);
53
+ if (!empty($output)) {
54
+ //An addon has overriden the body of this page for the given tab/action. So no need to do anything in core.
55
+ echo $output;
56
+ echo '</div>';//<!-- end of wrap -->
57
+ return;
58
+ }
59
+
60
+ echo '<div id="poststuff"><div id="post-body">';
61
+
62
+ //TODO - move most of the following includes to functions of this class instead.
63
+
64
+ //Switch case for the various different tabs handled by the core plugin.
65
+ switch ($tab) {
66
+ case 'payment_buttons':
67
+ include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_payment_buttons.php');
68
+ break;
69
+ case 'create_new_button':
70
+ include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_create_payment_buttons.php');
71
+ break;
72
+ case 'edit_button':
73
+ include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_edit_payment_buttons.php');
74
+ break;
75
+ case 'all_txns':
76
+ include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_all_payment_transactions.php');
77
+ break;
78
+ default:
79
+ include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_all_payment_transactions.php');
80
+ break;
81
+ }
82
+
83
+ echo '</div></div>'; //<!-- end of post-body -->
84
+
85
+ echo '</div>'; //<!-- end of .wrap -->
86
+ }
87
+
88
+ }
89
+
90
+
classes/admin-includes/class.swpm-payments-list-table.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
 
3
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/common/class.swpm-list-table.php');
 
 
4
 
5
  class SWPMPaymentsListTable extends WP_List_Table {
6
 
1
  <?php
2
 
3
+ if (!class_exists('WP_List_Table')){
4
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
5
+ }
6
 
7
  class SWPMPaymentsListTable extends WP_List_Table {
8
 
classes/admin-includes/swpm-payments-list-table.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
-
3
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/common/class-swpm-list-table.php');
4
-
5
- class SWPM_Payments_List_Table extends SWPM_List_Table {
6
-
7
- function __construct() {
8
- global $status, $page;
9
-
10
- //Set parent defaults
11
- parent::__construct(array(
12
- 'singular' => 'transaction', //singular name of the listed records
13
- 'plural' => 'transactions', //plural name of the listed records
14
- 'ajax' => false //does this table support ajax?
15
- ));
16
- }
17
-
18
- function column_default($item, $column_name) {
19
- //Just print the data for that column
20
- return $item[$column_name];
21
- }
22
-
23
- function column_id($item) {
24
-
25
- //Build row actions
26
- $actions = array(
27
- /* 'edit' => sprintf('<a href="admin.php?page=simple_wp_membership_payments&edit_txn=%s">Edit</a>', $item['id']),//TODO - Will be implemented in a future date */
28
- 'delete' => sprintf('<a href="admin.php?page=simple_wp_membership_payments&action=delete_txn&id=%s" onclick="return confirm(\'Are you sure you want to delete this record?\')">Delete</a>', $item['id']),
29
- );
30
-
31
- //Return the refid column contents
32
- return $item['id'] . $this->row_actions($actions);
33
- }
34
-
35
- function column_cb($item) {
36
- return sprintf(
37
- '<input type="checkbox" name="%1$s[]" value="%2$s" />',
38
- /* $1%s */ $this->_args['singular'], //Let's reuse singular label (affiliate)
39
- /* $2%s */ $item['id'] //The value of the checkbox should be the record's key/id
40
- );
41
- }
42
-
43
- function get_columns() {
44
- $columns = array(
45
- 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
46
- 'id' => 'Row ID',
47
- 'email' => 'Email Address',
48
- 'first_name' => 'First Name',
49
- 'last_name' => 'Last Name',
50
- 'txn_date' => 'Date',
51
- 'txn_id' => 'Transaction ID',
52
- 'payment_amount' => 'Amount',
53
- 'membership_level' => 'Membership Level'
54
- );
55
- return $columns;
56
- }
57
-
58
- function get_sortable_columns() {
59
- $sortable_columns = array(
60
- 'id' => array('id', false), //true means its already sorted
61
- 'membership_level' => array('membership_level', false),
62
- );
63
- return $sortable_columns;
64
- }
65
-
66
- function get_bulk_actions() {
67
- $actions = array(
68
- 'delete' => 'Delete'
69
- );
70
- return $actions;
71
- }
72
-
73
- function process_bulk_action() {
74
- //Detect when a bulk action is being triggered... //print_r($_GET);
75
- if ('delete' === $this->current_action()) {
76
- $records_to_delete = $_GET['transaction'];
77
- if (empty($records_to_delete)) {
78
- echo '<div id="message" class="updated fade"><p>Error! You need to select multiple records to perform a bulk action!</p></div>';
79
- return;
80
- }
81
- foreach ($records_to_delete as $record_id) {
82
- global $wpdb;
83
- $payments_table_name = $wpdb->prefix . "swpm_payments_tbl";
84
- $updatedb = "DELETE FROM $payments_table_name WHERE id='$record_id'";
85
- $results = $wpdb->query($updatedb);
86
- }
87
- echo '<div id="message" class="updated fade"><p>Selected records deleted successfully!</p></div>';
88
- }
89
- }
90
-
91
- function delete_record($record_id) {
92
- global $wpdb;
93
- $payments_table_name = $wpdb->prefix . "swpm_payments_tbl";
94
- $delete_command = "DELETE FROM " . $payments_table_name . " WHERE id = '$record_id'";
95
- $result = $wpdb->query($delete_command);
96
- }
97
-
98
- function prepare_items() {
99
-
100
- // Lets decide how many records per page to show
101
- $per_page = 50;
102
-
103
- $columns = $this->get_columns();
104
- $hidden = array();
105
- $sortable = $this->get_sortable_columns();
106
-
107
- $this->_column_headers = array($columns, $hidden, $sortable);
108
-
109
- $this->process_bulk_action();
110
-
111
- // This checks for sorting input and sorts the data.
112
- $orderby_column = isset($_GET['orderby']) ? $_GET['orderby'] : '';
113
- $sort_order = isset($_GET['order']) ? $_GET['order'] : '';
114
- if (empty($orderby_column)) {
115
- $orderby_column = "id";
116
- $sort_order = "DESC";
117
- }
118
- global $wpdb;
119
- $payments_table_name = $wpdb->prefix . "swpm_payments_tbl";
120
-
121
- //pagination requirement
122
- $current_page = $this->get_pagenum();
123
-
124
- if (isset($_POST['swpm_txn_search'])) {//Only load the searched records
125
- $search_term = trim(strip_tags($_POST['swpm_txn_search']));
126
- $prepare_query = $wpdb->prepare("SELECT * FROM " . $payments_table_name . " WHERE `email` LIKE '%%%s%%' OR `txn_id` LIKE '%%%s%%' OR `first_name` LIKE '%%%s%%' OR `last_name` LIKE '%%%s%%'", $search_term, $search_term, $search_term, $search_term);
127
- $data = $wpdb->get_results($prepare_query, ARRAY_A);
128
- $total_items = count($data);
129
- } else {//Load all data in an optimized way (so it is only loading data for the current page)
130
- $query = "SELECT COUNT(*) FROM $payments_table_name";
131
- $total_items = $wpdb->get_var($query);
132
-
133
- //pagination requirement
134
- $query = "SELECT * FROM $payments_table_name ORDER BY $orderby_column $sort_order";
135
-
136
- $offset = ($current_page - 1) * $per_page;
137
- $query.=' LIMIT ' . (int) $offset . ',' . (int) $per_page;
138
-
139
- $data = $wpdb->get_results($query, ARRAY_A);
140
- }
141
-
142
- // Now we add our *sorted* data to the items property, where it can be used by the rest of the class.
143
- $this->items = $data;
144
-
145
- //pagination requirement
146
- $this->set_pagination_args(array(
147
- 'total_items' => $total_items, //WE have to calculate the total number of items
148
- 'per_page' => $per_page, //WE have to determine how many items to show on a page
149
- 'total_pages' => ceil($total_items / $per_page) //WE have to calculate the total number of pages
150
- ));
151
- }
152
-
153
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bAccessControl.php DELETED
@@ -1,109 +0,0 @@
1
- <?php
2
- class BAccessControl {
3
- private $lastError;
4
- private $moretags;
5
- private static $_this;
6
- private function __construct(){
7
- $this->lastError = '';
8
- $this->moretags = array();
9
- }
10
- public static function get_instance(){
11
- self::$_this = empty(self::$_this)? new BAccessControl():self::$_this;
12
- return self::$_this;
13
- }
14
-
15
- public function can_i_read_post($id){
16
- $this->lastError = '';
17
- global $post;
18
- $auth = BAuth::get_instance();
19
- $protect_everything = BSettings::get_instance()->get_value('protect-everything');
20
- if(!empty($protect_everything)){
21
- $error_msg = BUtils::_( 'You need to login to view this content. ' ) . BSettings::get_instance()->get_login_link();
22
- $this->lastError = apply_filters('swpm_not_logged_in_post_msg', $error_msg);
23
- return false;
24
- }
25
- $protected = BProtection::get_instance();
26
- if (!$protected->is_protected($id)){ return true;}
27
- if(!$auth->is_logged_in()){
28
- $error_msg = BUtils::_( 'You need to login to view this content. ' ) . BSettings::get_instance()->get_login_link();
29
- $this->lastError = apply_filters('swpm_not_logged_in_post_msg', $error_msg);
30
- return false;
31
- }
32
-
33
- if ($auth->is_expired_account()){
34
- $error_msg = '<div class="swpm-account-expired-msg swpm-yellow-box">'.BUtils::_('Your account has expired. Please renew your account to gain access to this content.').'</div>';
35
- $this->lastError = apply_filters('swpm_account_expired_msg', $error_msg);
36
- return false;
37
- }
38
- $protect_older_posts = apply_filters('swpm_should_protect_older_post', false, $id);
39
- if ($protect_older_posts){
40
- $this->lastError = apply_filters ('swpm_restricted_post_msg_older_post',
41
- BUtils::_('This content can only be viewed by members who joined on or before ' . date(get_option( 'date_format' ), strtotime($post->post_date)))) ;
42
- return false;
43
- }
44
- $perms = BPermission::get_instance($auth->get('membership_level'));
45
- if($perms->is_permitted($id)) {return true;}
46
- $this->lastError = apply_filters ('swpm_restricted_post_msg', '<div class="swpm-no-access-msg">'.BUtils::_('This content is not permitted for your membership level.').'</div>') ;
47
- return false;
48
- }
49
- public function can_i_read_comment($id){
50
- $this->lastError = '';
51
- $protected = BProtection::get_instance();
52
- if (!$protected->is_protected_comment($id)){ return true;}
53
- $auth = BAuth::get_instance();
54
- if(!$auth->is_logged_in()){
55
- $this->lastError = apply_filters('swpm_not_logged_in_comment_msg', BUtils::_("You need to login to view this content. ")
56
- . BSettings::get_instance()->get_login_link());
57
- return false;
58
- }
59
- if ($auth->is_expired_account()){
60
- $error_msg = '<div class="swpm-account-expired-msg swpm-yellow-box">'.BUtils::_('Your account has expired. Please renew your account to gain access to this content.').'</div>';
61
- $this->lastError = apply_filters('swpm_account_expired_msg', $error_msg);
62
- return false;
63
- }
64
- $perms = BPermission::get_instance($auth->get('membership_level'));
65
- if($perms->is_permitted_comment($id)) {return true; }
66
- $this->lastError = apply_filters ('swpm_restricted_comment_msg', '<div class="swpm-no-access-msg">'.BUtils::_("This content is not permitted for your membership level.").'</div>' );
67
- return false;
68
- }
69
- public function why(){
70
- return $this->lastError;
71
- }
72
- public function filter_post($id,$content){
73
- if(in_array($id, $this->moretags)) {return $content; }
74
- if($this->can_i_read_post($id)) {return $content; }
75
- $moretag = BSettings::get_instance()->get_value('enable-moretag');
76
- if (empty($moretag)){
77
- return $this->lastError;
78
- }
79
- $post = get_post($id);
80
- $post_segments = explode( '<!--more-->', $post->post_content);
81
-
82
- if (count($post_segments) >= 2){
83
- if (BAuth::get_instance()->is_logged_in()){
84
- $error_msg = '<div class="swpm-margin-top-10">' . BUtils::_(" The rest of the content is not permitted for your membership level.") . '</div>';
85
- $this->lastError = apply_filters ('swpm_restricted_more_tag_msg', $error_msg);
86
- }
87
- else {
88
- $error_msg = '<div class="swpm-margin-top-10">' . BUtils::_("You need to login to view the rest of the content. ") . BSettings::get_instance()->get_login_link() . '</div>';
89
- $this->lastError = apply_filters('swpm_not_logged_in_more_tag_msg', $error_msg);
90
- }
91
-
92
- return do_shortcode($post_segments[0]) . $this->lastError;
93
- }
94
-
95
- return $this->lastError;
96
- }
97
- public function filter_comment($id,$content){
98
- if($this->can_i_read_comment($id)) { return $content; }
99
- return $this->lastError;
100
- }
101
- public function filter_post_with_moretag($id, $more_link, $more_link_text){
102
- $this->moretags[] = $id;
103
- if($this->can_i_read_post($id)) {
104
- return $more_link;
105
- }
106
- $msg = BUtils::_("You need to login to view the rest of the content. ") . BSettings::get_instance()->get_login_link();
107
- return apply_filters('swpm_not_logged_in_more_tag_msg', $msg);
108
- }
109
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bAdminRegistration.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Description of BAdminRegistration
5
- *
6
- */
7
- class BAdminRegistration extends BRegistration {
8
- public static function get_instance(){
9
- self::$_intance = empty(self::$_intance)? new BAdminRegistration():self::$_intance;
10
- return self::$_intance;
11
- }
12
- public function show_form() {
13
-
14
- }
15
-
16
- public function register() {
17
- global $wpdb;
18
- $member = BTransfer::$default_fields;
19
- $form = new BForm($member);
20
- if ($form->is_valid()) {
21
- $member_info = $form->get_sanitized();
22
- $account_status = BSettings::get_instance()->get_value('default-account-status', 'active');
23
- $member_info['account_state'] = $account_status;
24
- $plain_password = $member_info['plain_password'];
25
- unset($member_info['plain_password']);
26
- $wpdb->insert($wpdb->prefix . "swpm_members_tbl", $member_info);
27
- /* * ******************** register to wordpress ********** */
28
- $query = $wpdb->prepare("SELECT role FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id = %d", $member_info['membership_level']) ;
29
- $wp_user_info = array();
30
- $wp_user_info['user_nicename'] = implode('-', explode(' ', $member_info['user_name']));
31
- $wp_user_info['display_name'] = $member_info['user_name'];
32
- $wp_user_info['user_email'] = $member_info['email'];
33
- $wp_user_info['nickname'] = $member_info['user_name'];
34
- if (isset($member_info['first_name'])){$wp_user_info['first_name'] = $member_info['first_name']; }
35
- if (isset($member_info['last_name'])){$wp_user_info['last_name'] = $member_info['last_name'];}
36
- $wp_user_info['user_login'] = $member_info['user_name'];
37
- $wp_user_info['password'] = $plain_password;
38
- $wp_user_info['role'] = $wpdb->get_var($query);
39
- $wp_user_info['user_registered'] = date('Y-m-d H:i:s');
40
- BUtils::create_wp_user($wp_user_info);
41
- /* * ******************** register to wordpress ********** */
42
- $send_notification = BSettings::get_instance()->get_value('enable-notification-after-manual-user-add');
43
- $member_info['plain_password'] = $plain_password;
44
- $this->member_info = $member_info;
45
- if (!empty($send_notification)){
46
- $this->send_reg_email();
47
- }
48
- $message = array('succeeded' => true, 'message' => BUtils::_('Registration Successful.'));
49
- BTransfer::get_instance()->set('status', $message);
50
- wp_redirect('admin.php?page=simple_wp_membership');
51
- return;
52
- }
53
- $message = array('succeeded' => false, 'message' => BUtils::_('Please correct the following:'), 'extra' => $form->get_errors());
54
- BTransfer::get_instance()->set('status', $message);
55
- }
56
- public function edit($id){
57
- global $wpdb;
58
- $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "swpm_members_tbl WHERE member_id = %d", $id);
59
- $member = $wpdb->get_row($query, ARRAY_A);
60
- $email_address = $member['email'];
61
- $user_name = $member['user_name'];
62
- unset($member['member_id']);
63
- unset($member['user_name']);
64
- $form = new BForm($member);
65
- if ($form->is_valid()) {
66
- $member = $form->get_sanitized();
67
- BUtils::update_wp_user($user_name, $member);
68
- unset($member['plain_password']);
69
- $wpdb->update($wpdb->prefix . "swpm_members_tbl", $member, array('member_id' => $id));
70
- $message = array('succeeded' => true, 'message' => 'Updated Successfully.');
71
- do_action('swpm_admin_edit_custom_fields', $member + array('member_id'=>$id));
72
- BTransfer::get_instance()->set('status', $message);
73
- $send_notification = filter_input(INPUT_POST, 'account_status_change');
74
- if (!empty($send_notification)){
75
- $settings = BSettings::get_instance();
76
- $from_address = $settings->get_value('email-from');
77
- $headers = 'From: ' . $from_address . "\r\n";
78
- $subject = filter_input(INPUT_POST,'notificationmailhead');
79
- $body = filter_input(INPUT_POST, 'notificationmailbody');
80
- $settings->set_value('account-change-email-body', $body)->set_value('account-change-email-subject', $subject)->save();
81
- $member['login_link'] = $settings->get_value('login-page-url');
82
- $values = array_values($member);
83
- $keys = array_map('swpm_enclose_var', array_keys($member));
84
- $body = str_replace($keys, $values, $body);
85
- wp_mail($email_address, $subject, $body, $headers);
86
- }
87
- wp_redirect('admin.php?page=simple_wp_membership');
88
- }
89
- $message = array('succeeded' => false, 'message' => BUtils::_('Please correct the following:'), 'extra' => $form->get_errors());
90
- BTransfer::get_instance()->set('status', $message);
91
- }
92
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bAjax.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
- /**
3
- * Description of BAjax
4
- *
5
- * @author nur
6
- */
7
- class BAjax {
8
- public static function validate_email_ajax() {
9
- global $wpdb;
10
- $field_value = filter_input(INPUT_GET, 'fieldValue');
11
- $field_id = filter_input(INPUT_GET, 'fieldId');
12
- $member_id = filter_input(INPUT_GET, 'member_id');
13
- if (!is_email($field_value)){
14
- echo '[ "' . $field_id . '",false, "'.BUtils::_('Invalid Email Address').'" ]' ;
15
- exit;
16
- }
17
- $table = $wpdb->prefix . "swpm_members_tbl";
18
- $query = $wpdb->prepare("SELECT member_id FROM $table WHERE email = %s", $field_value);
19
- $db_id = $wpdb->get_var($query) ;
20
- $exists = ($db_id > 0) && $db_id != $member_id;
21
- echo '[ "' . $field_id . (($exists) ? '",false, "&chi;&nbsp;'.BUtils::_('Aready taken').'"]' : '",true, "&radic;&nbsp;Available"]');
22
- exit;
23
- }
24
-
25
- public static function validate_user_name_ajax() {
26
- global $wpdb;
27
- $field_value = filter_input(INPUT_GET, 'fieldValue');
28
- $field_id = filter_input(INPUT_GET, 'fieldId');
29
- $table = $wpdb->prefix . "swpm_members_tbl";
30
- $query = $wpdb->prepare("SELECT COUNT(*) FROM $table WHERE user_name = %s", $field_value);
31
- $exists = $wpdb->get_var($query) > 0;
32
- echo '[ "' . $field_id . (($exists) ? '",false,"&chi;&nbsp;'. BUtils::_('Aready taken'). '"]' :
33
- '",true,"&radic;&nbsp;'.BUtils::_('Available'). '"]');
34
- exit;
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bAuth.php DELETED
@@ -1,291 +0,0 @@
1
- <?php
2
-
3
- class BAuth {
4
-
5
- public $protected;
6
- public $permitted;
7
- private $isLoggedIn;
8
- private $lastStatusMsg;
9
- private static $_this;
10
- public $userData;
11
-
12
- private function __construct() {
13
- $this->isLoggedIn = false;
14
- $this->userData = null;
15
- $this->protected = BProtection::get_instance();
16
- }
17
- private function init(){
18
- $valid = $this->validate();
19
- //Blog::log_simple_debug("init:". ($valid? "valid": "invalid"), true);
20
- if (!$valid){
21
- $this->authenticate();
22
- }
23
- }
24
- public static function get_instance() {
25
- if (empty(self::$_this)){
26
- self::$_this = new BAuth();
27
- self::$_this->init();
28
- }
29
- return self::$_this;
30
- }
31
-
32
- private function authenticate($user = null, $pass = null) {
33
- global $wpdb;
34
- $swpm_password = empty($pass)?filter_input(INPUT_POST, 'swpm_password') : $pass;
35
- $swpm_user_name = empty($user)? apply_filters('swpm_user_name', filter_input(INPUT_POST, 'swpm_user_name')) : $user;
36
- //Blog::log_simple_debug("Authenticate:" . $swpm_user_name, true);
37
- if (!empty($swpm_user_name) && !empty($swpm_password)) {
38
- $user = sanitize_user($swpm_user_name);
39
- $pass = trim($swpm_password);
40
- $query = "SELECT * FROM " . $wpdb->prefix . "swpm_members_tbl WHERE user_name = %s";
41
- $userData = $wpdb->get_row($wpdb->prepare($query, $user));
42
- $this->userData = $userData;
43
- if (!$userData) {
44
- $this->isLoggedIn = false;
45
- $this->userData = null;
46
- $this->lastStatusMsg = BUtils::_("User Not Found.");
47
- return false;
48
- }
49
- $check = $this->check_password($pass, $userData->password);
50
- if (!$check) {
51
- $this->isLoggedIn = false;
52
- $this->userData = null;
53
- $this->lastStatusMsg = BUtils::_("Password Empty or Invalid.");
54
- return false;
55
- }
56
- if ($this->check_constraints()) {
57
- $rememberme = filter_input(INPUT_POST, 'rememberme');
58
- $remember = empty($rememberme) ? false : true;
59
- $this->set_cookie($remember);
60
- $this->isLoggedIn = true;
61
- $this->lastStatusMsg = "Logged In.";
62
- Blog::log_simple_debug("swpm_login action.", true);
63
- do_action('swpm_login', $user, $pass, $remember);
64
- return true;
65
- }
66
- }
67
- return false;
68
- }
69
-
70
- private function check_constraints() {
71
- if (empty($this->userData)){
72
- return false;
73
- }
74
- $enable_expired_login = BSettings::get_instance()->get_value('enable-expired-account-login', '');
75
-
76
- $can_login = true;
77
- if( $this->userData->account_state == 'inactive'){
78
- $this->lastStatusMsg = BUtils::_('Account is inactive.');
79
- $can_login = false;
80
- }
81
- else if( $this->userData->account_state == 'pending'){
82
- $this->lastStatusMsg = BUtils::_('Account is pending.');
83
- $can_login = false;
84
- }
85
- else if( ($this->userData->account_state == 'expired') && empty($enable_expired_login) ){
86
- $this->lastStatusMsg = BUtils::_('Account has expired.');
87
- $can_login = false;
88
- }
89
-
90
- if(!$can_login){
91
- $this->isLoggedIn = false;
92
- $this->userData = null;
93
- return false;
94
- }
95
-
96
- if (BUtils::is_subscription_expired($this->userData)){
97
- if ($this->userData->account_state == 'active'){
98
- global $wpdb;
99
- $wpdb->update(
100
- $wpdb->prefix . 'swpm_members_tbl',
101
- array( 'account_state' => 'expired'),
102
- array( 'member_id' => $this->userData->member_id ),
103
- array( '%s'),
104
- array( '%d' )
105
- );
106
- }
107
- if (empty($enable_expired_login)){
108
- $this->lastStatusMsg = BUtils::_('Account has expired.');
109
- $this->isLoggedIn = false;
110
- $this->userData = null;
111
- return false;
112
- }
113
- }
114
-
115
- $this->permitted = BPermission::get_instance($this->userData->membership_level);
116
- $this->lastStatusMsg = BUtils::_("You are logged in as:") . $this->userData->user_name;
117
- $this->isLoggedIn = true;
118
- return true;
119
- }
120
-
121
- private function check_password($password, $hash) {
122
- global $wp_hasher;
123
- if (empty($password)){
124
- return false;
125
- }
126
- if (empty($wp_hasher)) {
127
- require_once( ABSPATH . 'wp-includes/class-phpass.php');
128
- $wp_hasher = new PasswordHash(8, TRUE);
129
- }
130
- return $wp_hasher->CheckPassword($password, $hash);
131
- }
132
- public function match_password($password){
133
- if (!$this->is_logged_in()) {return false;}
134
- return $this->check_password($password, $this->get('password'));
135
- }
136
- public function login($user, $pass, $remember = '', $secure = '') {
137
- Blog::log_simple_debug("login",true);
138
- if ($this->isLoggedIn){
139
- return;
140
- }
141
- if ($this->authenticate($user, $pass) && $this->validate()) {
142
- $this->set_cookie($remember, $secure);
143
- } else {
144
- $this->isLoggedIn = false;
145
- $this->userData = null;
146
- }
147
- return $this->lastStatusMsg;
148
- }
149
-
150
- public function logout() {
151
- if (!$this->isLoggedIn){
152
- return;
153
- }
154
- setcookie(SIMPLE_WP_MEMBERSHIP_AUTH, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN);
155
- setcookie(SIMPLE_WP_MEMBERSHIP_SEC_AUTH, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN);
156
- $this->userData = null;
157
- $this->isLoggedIn = false;
158
- $this->lastStatusMsg = BUtils::_("Logged Out Successfully.");
159
- do_action('swpm_logout');
160
- }
161
-
162
- private function set_cookie($remember = '', $secure = '') {
163
- if ($remember){
164
- $expiration = time() + 1209600; // 14 days
165
- $expire = $expiration + 43200; // 12 hours grace period
166
- }
167
- else{
168
- $expiration = time() + 172800; // 2 days.
169
- $expire = $expiration;//The minimum cookie expiration should be at least couple of days.
170
- }
171
-
172
- $expiration_timestamp = BUtils::get_expiration_timestamp($this->userData);
173
- $enable_expired_login = BSettings::get_instance()->get_value('enable-expired-account-login', '');
174
- // make sure cookie doesn't live beyond account expiration date.
175
- // but if expired account login is enabled then ignore if account is expired
176
- $expiration = empty($enable_expired_login)? min ($expiration,$expiration_timestamp) : $expiration;
177
- $pass_frag = substr($this->userData->password, 8, 4);
178
- $scheme = 'auth';
179
- if (!$secure){
180
- $secure = is_ssl();
181
- }
182
- $key = BAuth::b_hash($this->userData->user_name . $pass_frag . '|' . $expiration, $scheme);
183
- $hash = hash_hmac('md5', $this->userData->user_name . '|' . $expiration, $key);
184
- $auth_cookie = $this->userData->user_name . '|' . $expiration . '|' . $hash;
185
- $auth_cookie_name = $secure ? SIMPLE_WP_MEMBERSHIP_SEC_AUTH : SIMPLE_WP_MEMBERSHIP_AUTH;
186
- //setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
187
- setcookie($auth_cookie_name, $auth_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure, true);
188
- }
189
-
190
- private function validate() {
191
- $auth_cookie_name = is_ssl() ? SIMPLE_WP_MEMBERSHIP_SEC_AUTH : SIMPLE_WP_MEMBERSHIP_AUTH;
192
- if (!isset($_COOKIE[$auth_cookie_name]) || empty($_COOKIE[$auth_cookie_name])){
193
- return false;
194
- }
195
- $cookie_elements = explode('|', $_COOKIE[$auth_cookie_name]);
196
- if (count($cookie_elements) != 3){
197
- return false;
198
- }
199
- Blog::log_simple_debug("validate:" . $_COOKIE[$auth_cookie_name],true);
200
- list($username, $expiration, $hmac) = $cookie_elements;
201
- $expired = $expiration;
202
- // Allow a grace period for POST and AJAX requests
203
- if (defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD']){
204
- $expired += HOUR_IN_SECONDS;
205
- }
206
- // Quick check to see if an honest cookie has expired
207
- if ($expired < time()) {
208
- $this->lastStatusMsg = BUtils::_("Session Expired."); //do_action('auth_cookie_expired', $cookie_elements);
209
- return false;
210
- }
211
- Blog::log_simple_debug("validate:Session Expired",true);
212
- global $wpdb;
213
- $query = " SELECT * FROM " . $wpdb->prefix . "swpm_members_tbl WHERE user_name = %s";
214
- $user = $wpdb->get_row($wpdb->prepare($query, $username));
215
- if (empty($user)) {
216
- $this->lastStatusMsg = BUtils::_("Invalid User Name");
217
- return false;
218
- }
219
- Blog::log_simple_debug("validate:Invalid User Name:" . serialize($user),true);
220
- $pass_frag = substr($user->password, 8, 4);
221
- $key = BAuth::b_hash($username . $pass_frag . '|' . $expiration);
222
- $hash = hash_hmac('md5', $username . '|' . $expiration, $key);
223
- if ($hmac != $hash) {
224
- $this->lastStatusMsg = BUtils::_("Sorry! Something went wrong");
225
- return false;
226
- }
227
- Blog::log_simple_debug("validate:bad hash",true);
228
- if ($expiration < time()){
229
- $GLOBALS['login_grace_period'] = 1;
230
- }
231
- $this->userData = $user;
232
- return $this->check_constraints();
233
- }
234
-
235
- public static function b_hash($data, $scheme = 'auth') {
236
- $salt = wp_salt($scheme) . 'j4H!B3TA,J4nIn4.';
237
- return hash_hmac('md5', $data, $salt);
238
- }
239
-
240
- public function is_logged_in() {
241
- return $this->isLoggedIn;
242
- }
243
-
244
- public function get($key, $default = "") {
245
- if (isset($this->userData->$key)){
246
- return $this->userData->$key;
247
- }
248
- if (isset($this->permitted->$key)){
249
- return $this->permitted->$key;
250
- }
251
- if (!empty($this->permitted)){
252
- return $this->permitted->get($key, $default);
253
- }
254
- return $default;
255
- }
256
-
257
- public function get_message() {
258
- return $this->lastStatusMsg;
259
- }
260
- public function get_expire_date(){
261
- if ($this->isLoggedIn){
262
- return BUtils::get_expire_date(
263
- $this->get('subscription_starts'),
264
- $this->get('subscription_period'),
265
- $this->get('subscription_duration_type'));
266
- }
267
- return "";
268
- }
269
- public function delete(){
270
- if (!$this->is_logged_in()) {return ;}
271
- $user_name = $this->get('user_name');
272
- $user_id = $this->get('member_id');
273
- wp_clear_auth_cookie();
274
- $this->logout();
275
- BMembers::delete_swpm_user_by_id($user_id);
276
- BMembers::delete_wp_user($user_name);
277
- }
278
-
279
- public function reload_user_data(){
280
- if (!$this->is_logged_in()) {return ;}
281
- global $wpdb;
282
- $query = "SELECT * FROM " . $wpdb->prefix . "swpm_members_tbl WHERE member_id = %d";
283
- $this->userData = $wpdb->get_row($wpdb->prepare($query, $this->userData->member_id));
284
-
285
- }
286
- public function is_expired_account(){
287
- // should be called after logging in.
288
- if (!$this->is_logged_in()) {return null;}
289
- return $this->get('account_state') === 'expired';
290
- }
291
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bAuthPermissionCollection.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- /**
3
- * Description of BAuthPermissionCollection
4
- *
5
- * @author nur
6
- */
7
- class BAuthPermissionCollection extends BPermissionCollection{
8
- //put your code here
9
- }
 
 
 
 
 
 
 
 
 
classes/class.bCategoryList.php DELETED
@@ -1,115 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * BCategoryList
5
- *
6
- * @author nur
7
- */
8
- if (!class_exists('WP_List_Table')) {
9
- require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
10
- }
11
-
12
- class BCategoryList extends WP_List_Table {
13
-
14
- public $selected_level_id = 1;
15
- public $category;
16
-
17
- function __construct() {
18
- parent::__construct(array(
19
- 'singular' => BUtils::_('Membership Level'),
20
- 'plural' => BUtils::_('Membership Levels'),
21
- 'ajax' => false
22
- ));
23
- $this->category = array();
24
- $selected = filter_input(INPUT_POST, 'membership_level_id');
25
- $this->selected_level_id = empty($selected) ? 1 : $selected;
26
- $this->category = ($this->selected_level_id == 1) ?
27
- BProtection::get_instance() :
28
- BPermission::get_instance($this->selected_level_id);
29
- }
30
-
31
- function get_columns() {
32
- return array(
33
- 'cb' => '<input type="checkbox" />'
34
- , 'term_id' => BUtils::_('ID')
35
- , 'name' => BUtils::_('Name')
36
- , 'description' => BUtils::_('Description')
37
- , 'count' => BUtils::_('Count')
38
- );
39
- }
40
-
41
- function get_sortable_columns() {
42
- return array(
43
- 'name' => array('name', true)
44
- );
45
- }
46
-
47
- function column_default($item, $column_name) {
48
- return stripslashes($item->$column_name);
49
- }
50
-
51
- function column_term_id($item) {
52
- return $item->term_id;
53
- }
54
-
55
- function column_cb($item) {
56
- return sprintf(
57
- '<input type="hidden" name="ids_in_page[]" value="%s">
58
- <input type="checkbox" %s name="ids[]" value="%s" />', $item->term_id, $this->category->in_categories($item->term_id) ? "checked" : "", $item->term_id
59
- );
60
- }
61
-
62
- function prepare_items() {
63
- $submitted = filter_input(INPUT_POST, 'update_category_list');
64
- if (!empty($submitted)) {
65
- $args = array('ids' => array(
66
- 'filter' => FILTER_VALIDATE_INT,
67
- 'flags' => FILTER_REQUIRE_ARRAY,
68
- ));
69
- $filtered = filter_input_array(INPUT_POST, $args);
70
- $ids = $filtered['ids'];
71
- $args = array('ids_in_page' => array(
72
- 'filter' => FILTER_VALIDATE_INT,
73
- 'flags' => FILTER_REQUIRE_ARRAY,
74
- ));
75
- $filtered = filter_input_array(INPUT_POST, $args);
76
- $ids_in_page = $filtered['ids_in_page'];
77
- $this->category->remove($ids_in_page, 'category')->apply($ids, 'category')->save();
78
- $message = array('succeeded' => true, 'message' => BUtils::_('Updated! '));
79
- BTransfer::get_instance()->set('status', $message);
80
- }
81
- $all_categories = array();
82
- $all_cat_ids = get_categories(array('hide_empty' => '0'));
83
- $totalitems = count($all_cat_ids);
84
- $perpage = 100;
85
- $paged = !empty($_GET["paged"]) ? mysql_real_escape_string($_GET["paged"]) : '';
86
- if (empty($paged) || !is_numeric($paged) || $paged <= 0) {
87
- $paged = 1;
88
- }
89
- $totalpages = ceil($totalitems / $perpage);
90
- $offset = 0;
91
- if (!empty($paged) && !empty($perpage)) {
92
- $offset = ($paged - 1) * $perpage;
93
- }
94
- for ($i = $offset; $i < ((int) $offset + (int) $perpage) && !empty($all_cat_ids[$i]); $i++) {
95
- $all_categories[] = $all_cat_ids[$i];
96
- }
97
- $this->set_pagination_args(array(
98
- "total_items" => $totalitems,
99
- "total_pages" => $totalpages,
100
- "per_page" => $perpage,
101
- ));
102
-
103
- $columns = $this->get_columns();
104
- $hidden = array();
105
- $sortable = $this->get_sortable_columns();
106
-
107
- $this->_column_headers = array($columns, $hidden, $sortable);
108
- $this->items = $all_categories;
109
- }
110
-
111
- function no_items() {
112
- BUtils::e('No category found.');
113
- }
114
-
115
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bCronJob.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
- /**
3
- * Description of BCronJob
4
- *
5
- * @author nur
6
- */
7
- class BCronJob {
8
- public function __construct() {
9
- add_action('swpm_account_status_event', array(&$this, 'update_account_status'));
10
- add_action('swpm_delete_pending_account_event',array(&$this, 'delete_pending_account'));
11
- }
12
-
13
- public function update_account_status(){
14
- global $wpdb;
15
- for($counter = 0;; $counter += 100){
16
- $query = $wpdb->prepare("SELECT member_id, membership_level, subscription_starts, account_state
17
- FROM {$wpdb->prefix}swpm_members_tbl LIMIT %d, 100", $counter);
18
- $results = $wpdb->get_results($query);
19
- if (empty($results)) {break;}
20
- $expired = array();
21
- foreach($results as $result){
22
- $timestamp = BUtils::get_expiration_timestamp($result);
23
- if ($timestamp < time() && $result->account_state == 'active'){
24
- $expired[] = $result->member_id;
25
- }
26
- }
27
- if (count($expired)>0){
28
- $query = "UPDATE {$wpdb->prefix}swpm_members_tbl
29
- SET account_state='expired' WHERE member_id IN (" . implode(',', $expired) . ")";
30
- $wpdb->query($query);
31
- }
32
- }
33
- }
34
-
35
- public function delete_pending_account(){
36
- global $wpdb;
37
- $interval = BSettings::get_instance()->get_value('delete-pending-account');
38
- if (empty($interval)) {return;}
39
- for($counter = 0;; $counter += 100){
40
- $query = $wpdb->prepare("SELECT member_id
41
- FROM
42
- {$wpdb->prefix}swpm_members_tbl
43
- WHERE account_state='pending'
44
- AND subscription_starts < DATE_SUB(NOW(), INTERVAL %d MONTH) LIMIT %d, 100",
45
- $interval, $counter);
46
- $results = $wpdb->get_results($query);
47
- if (empty($results)) {break;}
48
- $to_delete = array();
49
- foreach($results as $result){
50
- $to_delete[] = $result->member_id;
51
- }
52
- if (count($to_delete)>0){
53
- Blog::log_simple_debug("Auto deleting pending account.", true);
54
- $query = "DELETE FROM {$wpdb->prefix}swpm_members_tbl
55
- WHERE member_id IN (" . implode(',', $to_delete) . ")";
56
- $wpdb->query($query);
57
- }
58
- }
59
- }
60
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bForm.php DELETED
@@ -1,308 +0,0 @@
1
- <?php
2
-
3
- class BForm {
4
-
5
- protected $fields;
6
- protected $op;
7
- protected $errors;
8
- protected $sanitized;
9
-
10
- public function __construct($fields) {
11
- $this->fields = $fields;
12
- $this->sanitized = array();
13
- $this->validate_wp_user_email();
14
- if ($this->is_valid()){
15
- foreach ($fields as $key => $value){
16
- $this->$key();
17
- }
18
- }
19
- }
20
- protected function validate_wp_user_email(){
21
- $user_name = filter_input(INPUT_POST, 'user_name',FILTER_SANITIZE_STRING);
22
- $email = filter_input(INPUT_POST, 'email', FILTER_UNSAFE_RAW);
23
- if (empty($user_name)) {return;}
24
- $user = get_user_by('login', $user_name);
25
- if ($user && ($user->email != $email)){
26
- $this->errors['wp_email'] = BUtils::_('Wordpress account exists with given user name. But given email doesn\'t match.');
27
- return;
28
- }
29
- $user = get_user_by('email', $email);
30
- if($user && ($user_name != $user->login)){
31
- $this->errors['wp_user'] = BUtils::_('Wordpress account exists with given email. But given user name doesn\'t match.');
32
-
33
- }
34
- }
35
- protected function user_name() {
36
- global $wpdb;
37
- if (!empty($this->fields['user_name'])){return;}
38
- $user_name = filter_input(INPUT_POST, 'user_name',FILTER_SANITIZE_STRING);
39
- if (empty($user_name)) {
40
- $this->errors['user_name'] = BUtils::_('User name is required');
41
- return;
42
- }
43
- if (preg_match("/^[a-zA-Z0-9!@#$%&*+\/=?^_`{|}~\.-]+$/", $user_name) === 0) {
44
- $this->errors['user_name'] = BUtils::_('User name contains invalid character');
45
- return;
46
- }
47
- $saned = sanitize_text_field($user_name);
48
- $query = "SELECT count(member_id) FROM {$wpdb->prefix}swpm_members_tbl WHERE user_name= %s";
49
- $result = $wpdb->get_var($wpdb->prepare($query, strip_tags($saned)));
50
- if ($result > 0) {
51
- if ($saned != $this->fields['user_name']) {
52
- $this->errors['user_name'] = BUtils::_('User name already exists.');
53
- return;
54
- }
55
- }
56
- $this->sanitized['user_name'] = $saned;
57
- }
58
-
59
- protected function first_name() {
60
- $first_name = filter_input(INPUT_POST, 'first_name', FILTER_SANITIZE_STRING);
61
- if (empty($first_name)) {return;}
62
- $this->sanitized['first_name'] = sanitize_text_field($first_name);
63
- }
64
-
65
- protected function last_name() {
66
- $last_name = filter_input(INPUT_POST, 'last_name', FILTER_SANITIZE_STRING);
67
- if (empty($last_name)) {return;}
68
- $this->sanitized['last_name'] = sanitize_text_field($last_name);
69
- }
70
-
71
- protected function password() {
72
- $password = filter_input(INPUT_POST, 'password',FILTER_UNSAFE_RAW);
73
- $password_re = filter_input(INPUT_POST, 'password_re',FILTER_UNSAFE_RAW);
74
- if (empty($this->fields['password']) && empty($password)) {
75
- $this->errors['password'] = BUtils::_('Password is required');
76
- return;
77
- }
78
- if (!empty($password)) {
79
- $saned = sanitize_text_field($password);
80
- $saned_re = sanitize_text_field($password_re);
81
- if ($saned != $saned_re){
82
- $this->errors['password'] = BUtils::_('Password mismatch');
83
- }
84
- $this->sanitized['plain_password'] = $password;
85
- $this->sanitized['password'] = BUtils::encrypt_password(trim($password)); //should use $saned??;
86
- }
87
- }
88
-
89
- protected function email() {
90
- global $wpdb;
91
- $email = filter_input(INPUT_POST, 'email', FILTER_UNSAFE_RAW);
92
- if (empty($email)) {
93
- $this->errors['email'] = BUtils::_('Email is required');
94
- return;
95
- }
96
- if (!is_email($email)) {
97
- $this->errors['email'] = BUtils::_('Email is invalid');
98
- return;
99
- }
100
- $saned = sanitize_email($email);
101
- $query = "SELECT count(member_id) FROM {$wpdb->prefix}swpm_members_tbl WHERE email= %s";
102
- $member_id = filter_input(INPUT_GET, 'member_id', FILTER_SANITIZE_NUMBER_INT);
103
- if (!empty($member_id)) {
104
- $query .= ' AND member_id !=%d';
105
- $result = $wpdb->get_var($wpdb->prepare($query, strip_tags($saned), $member_id));
106
- }
107
- else{
108
- $result = $wpdb->get_var($wpdb->prepare($query, strip_tags($saned)));
109
- }
110
-
111
- if ($result > 0) {
112
- if ($saned != $this->fields['email']) {
113
- $this->errors['email'] = BUtils::_('Email is already used.');
114
- return;
115
- }
116
- }
117
- $this->sanitized['email'] = $saned;
118
- }
119
-
120
- protected function phone() {
121
- $phone = filter_input(INPUT_POST, 'phone', FILTER_UNSAFE_RAW);
122
- if (empty($phone)) {return;}
123
- $saned = wp_kses($phone, array());
124
- $this->sanitized['phone'] = $saned;
125
- return;
126
- //Not doing phone number validation
127
-
128
- // $saned = wp_kses($phone, array());
129
- // $this->sanitized['phone'] = $saned;
130
- // if (strlen($saned) > 9 && preg_match('/^((\+)?[1-9]{1,2})?([-\s\.])?((\(\d{1,4}\))|\d{1,4})(([-\s\.])?[0-9]{1,12}){1,2}$/', $saned)){
131
- // $this->sanitized['phone'] = $saned;
132
- // }
133
- // else{
134
- // $this->errors['phone'] = BUtils::_('Phone number is invalid');
135
- // }
136
- }
137
-
138
- protected function address_street() {
139
- $address_street = filter_input(INPUT_POST, 'address_street', FILTER_SANITIZE_STRING);
140
- if (empty($address_street)) { return;}
141
- $this->sanitized['address_street'] = wp_kses($address_street, array());
142
- }
143
-
144
- protected function address_city() {
145
- $address_city = filter_input(INPUT_POST, 'address_city', FILTER_SANITIZE_STRING);
146
- if (empty($address_city)){ return; }
147
- $this->sanitized['address_city'] = wp_kses($address_city, array());
148
- }
149
-
150
- protected function address_state() {
151
- $address_state = filter_input(INPUT_POST, 'address_state', FILTER_SANITIZE_STRING);
152
- if (empty($address_state)) {return;}
153
- $this->sanitized['address_state'] = wp_kses($address_state, array());
154
- }
155
-
156
- protected function address_zipcode() {
157
- $address_zipcode = filter_input(INPUT_POST, 'address_zipcode', FILTER_UNSAFE_RAW);
158
- if (empty($address_zipcode)){ return;}
159
- $this->sanitized['address_zipcode'] = wp_kses($address_zipcode, array());
160
- }
161
-
162
- protected function country() {
163
- $country = filter_input(INPUT_POST, 'country', FILTER_SANITIZE_STRING);
164
- if (empty($country)){ return;}
165
- $this->sanitized['country'] = wp_kses($country, array());
166
- }
167
-
168
- protected function company_name() {
169
- $company_name = filter_input(INPUT_POST, 'company_name', FILTER_SANITIZE_STRING);
170
- $this->sanitized['company_name'] = $company_name;
171
- }
172
-
173
- protected function member_since() {
174
- $member_since = filter_input(INPUT_POST, 'member_since', FILTER_UNSAFE_RAW);
175
- if (empty($member_since)) {return;}
176
- if (preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $member_since)){
177
- $this->sanitized['member_since'] = sanitize_text_field($member_since);
178
- return;
179
- }
180
- $this->errors['member_since'] = BUtils::_('Member since field is invalid');
181
-
182
- }
183
-
184
- protected function subscription_starts() {
185
- $subscription_starts = filter_input(INPUT_POST, 'subscription_starts', FILTER_SANITIZE_STRING);
186
- if(empty($subscription_starts)) {return ;}
187
- if (preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $subscription_starts)){
188
- $this->sanitized['subscription_starts'] = sanitize_text_field($subscription_starts);
189
- return;
190
- }
191
- $this->errors['subscription_starts'] = BUtils::_('Access starts field is invalid');
192
- }
193
-
194
- protected function gender() {
195
- $gender = filter_input(INPUT_POST, 'gender', FILTER_SANITIZE_STRING);
196
- if(empty($gender)) {return;}
197
- if (in_array($gender, array('male', 'female', 'not specified'))){
198
- $this->sanitized['gender'] = $gender;
199
- }
200
- else{
201
- $this->errors['gender'] = BUtils::_('Gender field is invalid');
202
- }
203
- }
204
-
205
- protected function account_state() {
206
- $account_state = filter_input(INPUT_POST, 'account_state', FILTER_SANITIZE_STRING);
207
- if(empty($account_state)) {return;}
208
- if (in_array($account_state, array('active', 'pending', 'inactive', 'expired'))){
209
- $this->sanitized['account_state'] = $account_state;
210
- }
211
- else{
212
- $this->errors['account_state'] = BUtils::_('Account state field is invalid');
213
- }
214
- }
215
-
216
- protected function membership_level() {
217
- $membership_level = filter_input(INPUT_POST, 'membership_level', FILTER_SANITIZE_NUMBER_INT);
218
- if ($membership_level == 1){
219
- $this->errors['membership_level'] = BUtils::_('Invalid membership level');
220
- return;
221
- }
222
-
223
- if (empty($membership_level)) {return;}
224
- $this->sanitized['membership_level'] = $membership_level;
225
- }
226
-
227
- protected function password_re() {
228
-
229
- }
230
-
231
- protected function last_accessed() {
232
-
233
- }
234
-
235
- protected function last_accessed_from_ip() {
236
-
237
- }
238
-
239
- protected function referrer() {
240
-
241
- }
242
-
243
- protected function extra_info() {
244
-
245
- }
246
-
247
- protected function reg_code() {
248
-
249
- }
250
-
251
- protected function txn_id() {
252
-
253
- }
254
-
255
- protected function subscr_id() {
256
- $subscr_id = filter_input(INPUT_POST, 'subscr_id', FILTER_SANITIZE_STRING);
257
- $this->sanitized['subscr_id'] = $subscr_id;
258
- }
259
-
260
- protected function flags() {
261
-
262
- }
263
-
264
- protected function more_membership_levels() {
265
-
266
- }
267
-
268
- protected function initial_membership_level() {
269
-
270
- }
271
-
272
- protected function home_page() {
273
-
274
- }
275
-
276
- protected function notes() {
277
-
278
- }
279
-
280
- protected function profile_image() {
281
-
282
- }
283
-
284
- protected function expiry_1st() {
285
-
286
- }
287
-
288
- protected function expiry_2nd() {
289
-
290
- }
291
-
292
- protected function member_id() {
293
-
294
- }
295
-
296
- public function is_valid() {
297
- return count($this->errors) < 1;
298
- }
299
-
300
- public function get_sanitized() {
301
- return $this->sanitized;
302
- }
303
-
304
- public function get_errors() {
305
- return $this->errors;
306
- }
307
-
308
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bFrontForm.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- class BFrontForm extends BForm{
4
- public function membership_level(){
5
-
6
- }
7
- }
 
 
 
 
 
 
 
classes/class.bFrontRegistration.php DELETED
@@ -1,206 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Description of BFrontRegistration
5
- *
6
- * @author nur
7
- */
8
- class BFrontRegistration extends BRegistration {
9
- public static function get_instance(){
10
- self::$_intance = empty(self::$_intance)? new BFrontRegistration():self::$_intance;
11
- return self::$_intance;
12
- }
13
- public function regigstration_ui($level){
14
- $settings_configs = BSettings::get_instance();
15
- $joinuspage_url = $settings_configs->get_value('join-us-page-url');
16
- $membership_level = '';
17
- $member_id = filter_input(INPUT_GET, 'member_id', FILTER_SANITIZE_NUMBER_INT);
18
- $code = filter_input(INPUT_GET, 'code', FILTER_SANITIZE_STRING);
19
-
20
- global $wpdb;
21
- if (BUtils::is_paid_registration()){
22
- $member = $member = BUtils::get_paid_member_info();
23
- if (empty($member)){
24
- BUtils::e('Error! Invalid Request. Could not find a match for the given security code and the user ID.');
25
- }
26
- $membership_level = $member->membership_level;
27
- }
28
- else if (!empty($level)) {
29
- $member = BTransfer::$default_fields;
30
- $membership_level = absint($level);
31
- }
32
- if (empty($membership_level)) {
33
- $joinuspage_link = '<a href="' . $joinuspage_url . '">Join us</a>';
34
- BUtils::e('Free membership is disabled on this site. Please make a payment from the ' . $joinuspage_link . ' page to pay for a premium membership.');
35
- return;
36
- }
37
- $form = apply_filters('swpm_registration_form_override', '', $membership_level);
38
- if (!empty($form)) {return $form;}
39
-
40
- $mebership_info = BPermission::get_instance($membership_level);
41
- $membership_level = $mebership_info->get('id');
42
- if (empty($membership_level)) {
43
- return "Membership Level Not Found.";
44
- }
45
- $level_identifier = md5($membership_level);
46
- $membership_level_alias = $mebership_info->get('alias');
47
- $swpm_registration_submit = filter_input(INPUT_POST, 'swpm_registration_submit');
48
- if (!empty($swpm_registration_submit)){
49
- $member = $_POST;
50
- }
51
- ob_start();
52
- extract((array)$member, EXTR_SKIP);
53
- include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/add.php');
54
- return ob_get_clean();
55
- }
56
- public function register() {
57
- if($this->create_swpm_user()&&$this->create_wp_user()&&$this->send_reg_email()){
58
- do_action('swpm_front_end_registration_complete');
59
-
60
- $login_page_url = BSettings::get_instance()->get_value('login-page-url');
61
- $after_rego_msg = '<p>'. BUtils::_('Registration Successful. '). BUtils::_('Please').' <a href="' . $login_page_url . '">'.BUtils::_('Login').'</a></p>';
62
- $message = array('succeeded' => true, 'message' => $after_rego_msg);
63
- BTransfer::get_instance()->set('status', $message);
64
- return;
65
- }
66
- }
67
- private function create_swpm_user(){
68
- global $wpdb;
69
- $member = BTransfer::$default_fields;
70
- $form = new BFrontForm($member);
71
- if (!$form->is_valid()) {
72
- $message = array('succeeded' => false, 'message' => BUtils::_('Please correct the following'),
73
- 'extra' => $form->get_errors());
74
- BTransfer::get_instance()->set('status', $message);
75
- return false;
76
- }
77
-
78
-
79
- $member_info = $form->get_sanitized();
80
- $free_level = BUtils::get_free_level();
81
- $account_status = BSettings::get_instance()->get_value('default-account-status', 'active');
82
- $member_info['last_accessed_from_ip'] = BTransfer::get_real_ip_addr();
83
- $member_info['member_since'] = date("Y-m-d");
84
- $member_info['subscription_starts'] = date("Y-m-d");
85
- $member_info['account_state'] = $account_status;
86
- $plain_password = $member_info['plain_password'];
87
- unset($member_info['plain_password']);
88
-
89
- if (BUtils::is_paid_registration()){
90
- $member_info['reg_code'] = '';
91
- $member_id = filter_input(INPUT_GET, 'member_id', FILTER_SANITIZE_NUMBER_INT);
92
- $code = filter_input(INPUT_GET, 'code', FILTER_SANITIZE_STRING);
93
- $wpdb->update($wpdb->prefix . "swpm_members_tbl", $member_info,
94
- array('member_id' => $member_id,'reg_code'=>$code));
95
-
96
- $query = $wpdb->prepare('SELECT membership_level FROM ' . $wpdb->prefix . 'swpm_members_tbl WHERE member_id=%d', $member_id);
97
- $member_info['membership_level'] = $wpdb->get_var( $query );
98
- $last_insert_id = $member_id;
99
- }
100
- else if (!empty($free_level)){
101
- $member_info['membership_level'] = $free_level;
102
- $wpdb->insert($wpdb->prefix . "swpm_members_tbl", $member_info);
103
- $last_insert_id = $wpdb->insert_id;
104
- }
105
- else{
106
- $message = array('succeeded' => false, 'message' => BUtils::_('Membership Level Couldn\'t be found.'));
107
- BTransfer::get_instance()->set('status', $message);
108
- return false;
109
- }
110
- $member_info['plain_password'] = $plain_password;
111
- $this->member_info = $member_info;
112
- return true;
113
- }
114
- private function create_wp_user(){
115
- global $wpdb;
116
- $member_info = $this->member_info;
117
- $query = $wpdb->prepare("SELECT role FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id = %d", $member_info['membership_level']) ;
118
- $wp_user_info = array();
119
- $wp_user_info['user_nicename'] = implode('-', explode(' ', $member_info['user_name']));
120
- $wp_user_info['display_name'] = $member_info['user_name'];
121
- $wp_user_info['user_email'] = $member_info['email'];
122
- $wp_user_info['nickname'] = $member_info['user_name'];
123
- $wp_user_info['first_name'] = $member_info['first_name'];
124
- $wp_user_info['last_name'] = $member_info['last_name'];
125
- $wp_user_info['user_login'] = $member_info['user_name'];
126
- $wp_user_info['password'] = $member_info['plain_password'];
127
- $wp_user_info['role'] = $wpdb->get_var($query);
128
- $wp_user_info['user_registered'] = date('Y-m-d H:i:s');
129
- BUtils::create_wp_user($wp_user_info);
130
- return true;
131
- }
132
- public function edit() {
133
- global $wpdb;
134
- $auth = BAuth::get_instance();
135
- if (!$auth->is_logged_in()) {
136
- return;
137
- }
138
- $user_data = (array) $auth->userData;
139
- unset($user_data['permitted']);
140
- $form = new BForm($user_data);
141
- if ($form->is_valid()) {
142
- global $wpdb;
143
- $member_info = $form->get_sanitized();
144
- // update corresponding wp user.
145
- BUtils::update_wp_user($auth->get('user_name'),$member_info);
146
- if (isset($member_info['plain_password'])) {
147
- unset($member_info['plain_password']);
148
- }
149
-
150
- $wpdb->update(
151
- $wpdb->prefix . "swpm_members_tbl", $member_info, array('member_id' => $auth->get('member_id')));
152
- $auth->reload_user_data();
153
- $message = array('succeeded' => true, 'message' => 'Profile Updated.');
154
- BTransfer::get_instance()->set('status', $message);
155
- } else {
156
- $message = array('succeeded' => false, 'message' => BUtils::_('Please correct the following'),
157
- 'extra' => $form->get_errors());
158
- BTransfer::get_instance()->set('status', $message);
159
- return;
160
- }
161
- }
162
-
163
- public function reset_password($email) {
164
- $email = sanitize_email($email);
165
- if (!is_email($email)) {
166
- $message = '<div class="swpm-reset-pw-error">' . BUtils::_("Email address not valid.") . '</div>';
167
- $message = array('succeeded' => false, 'message' => $message);
168
- BTransfer::get_instance()->set('status', $message);
169
- return;
170
- }
171
- global $wpdb;
172
- $query = 'SELECT member_id,user_name,first_name, last_name FROM ' .
173
- $wpdb->prefix . 'swpm_members_tbl ' .
174
- ' WHERE email = %s';
175
- $user = $wpdb->get_row($wpdb->prepare($query, $email));
176
- if (empty($user)) {
177
- $message = '<div class="swpm-reset-pw-error">' . BUtils::_("No user not found with that email address.") .'</div>';
178
- $message .= '<div class="swpm-reset-pw-error-email">' . BUtils::_("Email Address: ") . $email .'</div>';
179
- $message = array('succeeded' => false, 'message' => $message);
180
- BTransfer::get_instance()->set('status', $message);
181
- return;
182
- }
183
- $settings = BSettings::get_instance();
184
- $password = wp_generate_password();
185
-
186
- $password_hash = BUtils::encrypt_password(trim($password)); //should use $saned??;
187
- $wpdb->update($wpdb->prefix . "swpm_members_tbl", array('password' => $password_hash), array('member_id' => $user->member_id));
188
-
189
- // update wp user pass.
190
- BUtils::update_wp_user($user->user_name, array('plain_password'=>$password));
191
-
192
- $body = $settings->get_value('reset-mail-body');
193
- $subject = $settings->get_value('reset-mail-subject');
194
- $search = array('{user_name}', '{first_name}', '{last_name}', '{password}');
195
- $replace = array($user->user_name, $user->first_name, $user->last_name, $password);
196
- $body = str_replace($search, $replace, $body);
197
- $from = $settings->get_value('email-from');
198
- $headers = "From: " . $from . "\r\n";
199
- wp_mail($email, $subject, $body, $headers);
200
- $message = '<div class="swpm-reset-pw-success">' . BUtils::_("New password has been sent to your email address.") .'</div>';
201
- $message .= '<div class="swpm-reset-pw-success-email">' . BUtils::_("Email Address: ") . $email .'</div>';
202
-
203
- $message = array('succeeded' => false, 'message' => $message);
204
- BTransfer::get_instance()->set('status', $message);
205
- }
206
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bInstallation.php DELETED
@@ -1,243 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Description of BInstallation
5
- *
6
- * @author nur
7
- */
8
- class BInstallation {
9
-
10
- /*
11
- * This function is capable of handing both single site or multi-site install and upgrade all in one.
12
- */
13
- static function run_safe_installer()
14
- {
15
- global $wpdb;
16
-
17
- //Do this if multi-site setup
18
- if (function_exists('is_multisite') && is_multisite())
19
- {
20
- // check if it is a network activation - if so, run the activation function for each blog id
21
- if (isset($_GET['networkwide']) && ($_GET['networkwide'] == 1))
22
- {
23
- $old_blog = $wpdb->blogid;
24
- // Get all blog ids
25
- $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
26
- foreach ($blogids as $blog_id) {
27
- switch_to_blog($blog_id);
28
- BInstallation::installer();
29
- BInstallation::initdb();
30
- }
31
- switch_to_blog($old_blog);
32
- return;
33
- }
34
- }
35
-
36
- //Do this if single site standard install
37
- BInstallation::installer();
38
- BInstallation::initdb();
39
- }
40
-
41
- public static function installer() {
42
- global $wpdb;
43
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
44
-
45
- $charset_collate = '';
46
- if (!empty($wpdb->charset)){
47
- $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
48
- }else{
49
- $charset_collate = "DEFAULT CHARSET=utf8";
50
- }
51
- if (!empty($wpdb->collate)){
52
- $charset_collate .= " COLLATE $wpdb->collate";
53
- }
54
-
55
- $sql = "CREATE TABLE " . $wpdb->prefix . "swpm_members_tbl (
56
- member_id int(12) NOT NULL PRIMARY KEY AUTO_INCREMENT,
57
- user_name varchar(32) NOT NULL,
58
- first_name varchar(32) DEFAULT '',
59
- last_name varchar(32) DEFAULT '',
60
- password varchar(64) NOT NULL,
61
- member_since date NOT NULL DEFAULT '0000-00-00',
62
- membership_level smallint(6) NOT NULL,
63
- more_membership_levels VARCHAR(100) DEFAULT NULL,
64
- account_state enum('active','inactive','expired','pending','unsubscribed') DEFAULT 'pending',
65
- last_accessed datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
66
- last_accessed_from_ip varchar(64) NOT NULL,
67
- email varchar(64) DEFAULT NULL,
68
- phone varchar(64) DEFAULT NULL,
69
- address_street varchar(255) DEFAULT NULL,
70
- address_city varchar(255) DEFAULT NULL,
71
- address_state varchar(255) DEFAULT NULL,
72
- address_zipcode varchar(255) DEFAULT NULL,
73
- home_page varchar(255) DEFAULT NULL,
74
- country varchar(255) DEFAULT NULL,
75
- gender enum('male','female','not specified') DEFAULT 'not specified',
76
- referrer varchar(255) DEFAULT NULL,
77
- extra_info text,
78
- reg_code varchar(255) DEFAULT NULL,
79
- subscription_starts date DEFAULT NULL,
80
- initial_membership_level smallint(6) DEFAULT NULL,
81
- txn_id varchar(64) DEFAULT '',
82
- subscr_id varchar(32) DEFAULT '',
83
- company_name varchar(100) DEFAULT '',
84
- notes text DEFAULT NULL,
85
- flags int(11) DEFAULT '0',
86
- profile_image varchar(255) DEFAULT ''
87
- )" . $charset_collate . ";";
88
- dbDelta($sql);
89
-
90
- $sql = "CREATE TABLE " . $wpdb->prefix . "swpm_membership_tbl (
91
- id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
92
- alias varchar(127) NOT NULL,
93
- role varchar(255) NOT NULL DEFAULT 'subscriber',
94
- permissions tinyint(4) NOT NULL DEFAULT '0',
95
- subscription_period varchar(11) NOT NULL DEFAULT '-1',
96
- subscription_duration_type tinyint NOT NULL default 0,
97
- subscription_unit VARCHAR(20) NULL,
98
- loginredirect_page text NULL,
99
- category_list longtext,
100
- page_list longtext,
101
- post_list longtext,
102
- comment_list longtext,
103
- attachment_list longtext,
104
- custom_post_list longtext,
105
- disable_bookmark_list longtext,
106
- options longtext,
107
- protect_older_posts tinyint(1) NOT NULL DEFAULT '0',
108
- campaign_name varchar(60) NOT NULL DEFAULT ''
109
- )" . $charset_collate . " AUTO_INCREMENT=1 ;";
110
- dbDelta($sql);
111
- $sql = "SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id = 1";
112
- $results = $wpdb->get_row($sql);
113
- if (is_null($results)) {
114
- $sql = "INSERT INTO " . $wpdb->prefix . "swpm_membership_tbl (
115
- id ,
116
- alias ,
117
- role ,
118
- permissions ,
119
- subscription_period ,
120
- subscription_unit,
121
- loginredirect_page,
122
- category_list ,
123
- page_list ,
124
- post_list ,
125
- comment_list,
126
- disable_bookmark_list,
127
- options,
128
- campaign_name
129
- )VALUES (1 , 'Content Protection', 'administrator', '15', '0',NULL,NULL, NULL , NULL , NULL , NULL,NULL,NULL,'');";
130
- $wpdb->query($sql);
131
- }
132
- $sql = "UPDATE " . $wpdb->prefix . "swpm_membership_tbl SET subscription_duration_type = 1 WHERE subscription_unit='days' AND subscription_duration_type = 0";
133
- $wpdb->query($sql);
134
-
135
- $sql = "UPDATE " . $wpdb->prefix . "swpm_membership_tbl SET subscription_duration_type = 2 WHERE subscription_unit='weeks' AND subscription_duration_type = 0";
136
- $wpdb->query($sql);
137
-
138
- $sql = "UPDATE " . $wpdb->prefix . "swpm_membership_tbl SET subscription_duration_type = 3 WHERE subscription_unit='months' AND subscription_duration_type = 0";
139
- $wpdb->query($sql);
140
-
141
- $sql = "UPDATE " . $wpdb->prefix . "swpm_membership_tbl SET subscription_duration_type = 4 WHERE subscription_unit='years' AND subscription_duration_type = 0";
142
- $wpdb->query($sql);
143
- $sql = "CREATE TABLE " . $wpdb->prefix . "swpm_membership_meta_tbl (
144
- id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
145
- level_id int(11) NOT NULL,
146
- meta_key varchar(255) NOT NULL,
147
- meta_label varchar(255) NULL,
148
- meta_value text,
149
- meta_type varchar(255) NOT NULL DEFAULT 'text',
150
- meta_default text,
151
- meta_context varchar(255) NOT NULL DEFAULT 'default',
152
- KEY level_id (level_id),
153
- UNIQUE KEY meta_key_id (level_id,meta_key)
154
- )" . $charset_collate . " AUTO_INCREMENT=1 ;";
155
- dbDelta($sql);
156
-
157
- $sql = "CREATE TABLE " . $wpdb->prefix . "swpm_payments_tbl (
158
- id int(12) NOT NULL PRIMARY KEY AUTO_INCREMENT,
159
- email varchar(64) DEFAULT NULL,
160
- first_name varchar(32) DEFAULT '',
161
- last_name varchar(32) DEFAULT '',
162
- member_id varchar(16) DEFAULT '',
163
- membership_level varchar(16) DEFAULT '',
164
- txn_date date NOT NULL default '0000-00-00',
165
- txn_id varchar(128) NOT NULL default '',
166
- subscr_id varchar(128) NOT NULL default '',
167
- reference varchar(128) NOT NULL default '',
168
- payment_amount varchar(32) NOT NULL default '',
169
- gateway varchar(16) DEFAULT '',
170
- status varchar(16) DEFAULT '',
171
- ip_address varchar(64) default ''
172
- )" . $charset_collate . ";";
173
- dbDelta($sql);
174
-
175
- //Save the current DB version
176
- update_option("swpm_db_version", SIMPLE_WP_MEMBERSHIP_DB_VER);
177
- }
178
-
179
- public static function initdb() {
180
- $settings = BSettings::get_instance();
181
-
182
- $installed_version = $settings->get_value('swpm-active-version');
183
-
184
- //Set other default settings values
185
- $reg_prompt_email_subject = "Complete your registration";
186
- $reg_prompt_email_body = "Dear {first_name} {last_name}" .
187
- "\n\nThank you for joining us!" .
188
- "\n\nPlease complete your registration by visiting the following link:" .
189
- "\n\n{reg_link}" .
190
- "\n\nThank You";
191
- $reg_email_subject = "Your registration is complete";
192
- $reg_email_body = "Dear {first_name} {last_name}\n\n" .
193
- "Your registration is now complete!\n\n" .
194
- "Registration details:\n" .
195
- "Username: {user_name}\n" .
196
- "Password: {password}\n\n" .
197
- "Please login to the member area at the following URL:\n\n" .
198
- "{login_link}\n\n" .
199
- "Thank You";
200
-
201
- $upgrade_email_subject = "Subject for email sent after account upgrade";
202
- $upgrade_email_body = "Dear {first_name} {last_name}" .
203
- "\n\nYour Account Has Been Upgraded." .
204
- "\n\nThank You";
205
- $reset_email_subject = get_bloginfo('name') . ": New Password";
206
- $reset_email_body = "Dear {first_name} {last_name}" .
207
- "\n\nHere is your new password" .
208
- "\n\nUser name: {user_name}" .
209
- "\n\nPassword: {password}" .
210
- "\n\nThank You";
211
-
212
- $status_change_email_subject = "Account Updated!";
213
- $status_change_email_body = "Dear {first_name} {last_name}," .
214
- "\n\n Your account status has been updated!" .
215
- " Please login to the member area at the following URL:" .
216
- "\n\n {login_link}" .
217
- "\n\nThank You";
218
-
219
- if (empty($installed_version)) {
220
- //Do fresh install tasks
221
-
222
- /* * * Create the mandatory pages (if they are not there) ** */
223
- miscUtils::create_mandatory_wp_pages();
224
- /* * * End of page creation ** */
225
- $settings->set_value('reg-complete-mail-subject', stripslashes($reg_email_subject))
226
- ->set_value('reg-complete-mail-body', stripslashes($reg_email_body))
227
- ->set_value('reg-prompt-complete-mail-subject', stripslashes($reg_prompt_email_subject))
228
- ->set_value('reg-prompt-complete-mail-body', stripslashes($reg_prompt_email_body))
229
- ->set_value('upgrade-complete-mail-subject', stripslashes($upgrade_email_subject))
230
- ->set_value('upgrade-complete-mail-body', stripslashes($upgrade_email_body))
231
- ->set_value('reset-mail-subject', stripslashes($reset_email_subject))
232
- ->set_value('reset-mail-body', stripslashes($reset_email_body))
233
- ->set_value('account-change-email-subject', stripslashes($status_change_email_subject))
234
- ->set_value('account-change-email-body', stripslashes($status_change_email_body))
235
- ->set_value('email-from', trim(get_option('admin_email')));
236
- }
237
- if (version_compare($installed_version, SIMPLE_WP_MEMBERSHIP_VER) == -1) {
238
- //Do upgrade tasks
239
- }
240
-
241
- $settings->set_value('swpm-active-version', SIMPLE_WP_MEMBERSHIP_VER)->save(); //save everything.
242
- }
243
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bLevelForm.php DELETED
@@ -1,126 +0,0 @@
1
- <?php
2
-
3
- class BLevelForm {
4
-
5
- protected $fields;
6
- protected $op;
7
- protected $errors;
8
- protected $sanitized;
9
-
10
- public function __construct($fields) {
11
- $this->fields = $fields;
12
- $this->sanitized = array();
13
- foreach ($fields as $key => $value)
14
- $this->$key();
15
- }
16
-
17
- protected function id() {
18
-
19
- }
20
-
21
- protected function alias() {
22
- $alias = filter_input(INPUT_POST, 'alias');
23
- $this->sanitized['alias'] = sanitize_text_field($alias);
24
- }
25
-
26
- protected function role() {
27
- $role = filter_input(INPUT_POST, 'role');
28
- $this->sanitized['role'] = sanitize_text_field($role);
29
- }
30
-
31
- protected function permissions() {
32
- $this->sanitized['permissions'] = 63;
33
- }
34
-
35
- protected function subscription_period() {
36
- $subscript_duration_type = filter_input(INPUT_POST, 'subscription_duration_type');
37
-
38
- if ($subscript_duration_type == BMembershipLevel::NO_EXPIRY) {
39
- $this->sanitized['subscription_period'] = "";
40
- return;
41
- }
42
-
43
- $subscription_period = filter_input(INPUT_POST, 'subscription_period_'. $subscript_duration_type);
44
- if (($subscript_duration_type == BMembershipLevel::FIXED_DATE)){
45
- $dateinfo = date_parse($subscription_period);
46
- if ($dateinfo['warning_count']|| $dateinfo['error_count']){
47
- $this->errors['subscription_period'] = BUtils::_("Date format is not valid.");
48
- return;
49
- }
50
- $this->sanitized['subscription_period'] = sanitize_text_field($subscription_period);
51
- return;
52
- }
53
-
54
- if (!is_numeric($subscription_period)) {
55
- $this->errors['subscription_period'] = BUtils::_("Access duration must be > 0.");
56
- return;
57
- }
58
- $this->sanitized['subscription_period'] = sanitize_text_field($subscription_period);
59
- }
60
-
61
- protected function subscription_duration_type(){
62
- $subscription_duration_type = filter_input(INPUT_POST, 'subscription_duration_type');
63
- $this->sanitized['subscription_duration_type'] = $subscription_duration_type;
64
- return;
65
- }
66
- protected function subscription_unit(){
67
-
68
- }
69
- protected function loginredirect_page() {
70
-
71
- }
72
-
73
- protected function category_list() {
74
-
75
- }
76
-
77
- protected function page_list() {
78
-
79
- }
80
-
81
- protected function post_list() {
82
-
83
- }
84
-
85
- protected function comment_list() {
86
-
87
- }
88
-
89
- protected function attachment_list() {
90
-
91
- }
92
-
93
- protected function custom_post_list() {
94
-
95
- }
96
-
97
- protected function disable_bookmark_list() {
98
-
99
- }
100
-
101
- protected function options() {
102
-
103
- }
104
-
105
- protected function campaign_name() {
106
-
107
- }
108
-
109
- protected function protect_older_posts() {
110
- $checked = filter_input(INPUT_POST, 'protect_older_posts');
111
- $this->sanitized['protect_older_posts'] = empty($checked) ? 0 : 1;
112
- }
113
-
114
- public function is_valid() {
115
- return count($this->errors) < 1;
116
- }
117
-
118
- public function get_sanitized() {
119
- return $this->sanitized;
120
- }
121
-
122
- public function get_errors() {
123
- return $this->errors;
124
- }
125
-
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bLog.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
-
3
- class BLog {
4
- private $error;
5
- private $warn;
6
- private $notice;
7
- private static $intance;
8
- private function __construct() {
9
- $this->error = array();
10
- $this->warn = array();
11
- $this->notice = array();
12
- }
13
- public static function get_logger($context = ''){
14
- $context = empty($context)? 'default': $context;
15
- if (!isset(self::$intance[$context])){
16
- self::$intance[$context] = new BLog();
17
- }
18
- return self::$intance[$context];
19
- }
20
- public function error($msg){
21
- $this->error[] = $msg;
22
- }
23
- public function warn($msg){
24
- $this->warn[] = $msg;
25
- }
26
- public function debug($msg){
27
- $this->notice[] = $msg;
28
- }
29
- public function get($to_screen = false){
30
- $msg = '';
31
- foreach ($this->error as $error ){
32
- $msg .= 'ERROR: ' . $error . ($to_screen?"<br/>":"\n");
33
- }
34
- foreach($this->warn as $warn){
35
- $msg .= 'WARN: ' . $warn . ($to_screen?"<br/>":"\n");
36
- }
37
- foreach ($this->notice as $notice){
38
- $msg = 'NOTICE: ' . $notice . ($to_screen?"<br/>":"\n");
39
- }
40
- return $msg;
41
- }
42
- public static function writeall($path = ''){
43
- if (empty($path)) {$path = SIMPLE_WP_MEMBERSHIP_PATH . 'log.txt';}
44
- $fp = fopen($path, 'a');
45
- $date = date("Y-m-d H:i:s");
46
- fwrite($fp, strtoupper($date) . ":\n");
47
- fwrite($fp, str_repeat('-=', (strlen($date)+1.0)/2.0) . "\n");
48
- foreach (self::$intance as $context=>$intance){
49
- fwrite($fp, strtoupper($context) . ":\n");
50
- fwrite($fp, str_repeat('=', strlen($context)+1) . "\n");
51
- fwrite($fp, $intance->get());
52
- }
53
- fclose($fp);
54
- }
55
-
56
- public static function log_simple_debug($message, $success, $end = false) {
57
- $settings = BSettings::get_instance();
58
- $debug_enabled = $settings->get_value('enable-debug');
59
- if (empty($debug_enabled)) {//Debug is not enabled
60
- return;
61
- }
62
-
63
- //Lets write to the log file
64
- $debug_log_file_name = SIMPLE_WP_MEMBERSHIP_PATH . 'log.txt';
65
-
66
- // Timestamp
67
- $text = '[' . date('m/d/Y g:i A') . '] - ' . (($success) ? 'SUCCESS :' : 'FAILURE :') . $message . "\n";
68
- if ($end) {
69
- $text .= "\n------------------------------------------------------------------\n\n";
70
- }
71
- // Write to log
72
- $fp = fopen($debug_log_file_name, 'a');
73
- fwrite($fp, $text);
74
- fclose($fp); // close file
75
- }
76
-
77
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bMemberUtils.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * BMemberUtils
5
- *
6
- * @author nur
7
- */
8
- class BMemberUtils {
9
-
10
- public static function is_member_logged_in() {
11
- $auth = BAuth::get_instance();
12
- if ($auth->is_logged_in()) {
13
- return true;
14
- } else {
15
- return false;
16
- }
17
- }
18
-
19
- public static function get_logged_in_members_id() {
20
- $auth = BAuth::get_instance();
21
- if (!$auth->is_logged_in()) {
22
- return bUtils::_("User is not logged in.");
23
- }
24
- return $auth->get('member_id');
25
- }
26
-
27
- public static function get_logged_in_members_level() {
28
- $auth = BAuth::get_instance();
29
- if (!$auth->is_logged_in()) {
30
- return bUtils::_("User is not logged in.");
31
- }
32
- return $auth->get('membership_level');
33
- }
34
-
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bMembers.php DELETED
@@ -1,198 +0,0 @@
1
- <?php
2
-
3
- class BMembers extends WP_List_Table {
4
-
5
- function __construct() {
6
- parent::__construct(array(
7
- 'singular' => BUtils::_('Member'),
8
- 'plural' => BUtils::_('Members'),
9
- 'ajax' => false
10
- ));
11
- }
12
-
13
- function get_columns() {
14
- return array(
15
- 'cb' => '<input type="checkbox" />'
16
- , 'member_id' => BUtils::_('ID')
17
- , 'user_name' => BUtils::_('User Name')
18
- , 'first_name' => BUtils::_('First Name')
19
- , 'last_name' => BUtils::_('Last Name')
20
- , 'email' => BUtils::_('Email')
21
- , 'alias' => BUtils::_('Membership Level')
22
- , 'subscription_starts' => BUtils::_('Access Starts')
23
- , 'account_state' => BUtils::_('Account State')
24
- );
25
- }
26
-
27
- function get_sortable_columns() {
28
- return array(
29
- 'member_id' => array('member_id', true),
30
- 'user_name' => array('user_name', true)
31
- );
32
- }
33
-
34
- function get_bulk_actions() {
35
- $actions = array(
36
- 'bulk_delete' => BUtils::_('Delete')
37
- );
38
- return $actions;
39
- }
40
-
41
- function column_default($item, $column_name) {
42
- return $item[$column_name];
43
- }
44
-
45
- function column_member_id($item) {
46
- $actions = array(
47
- 'edit' => sprintf('<a href="admin.php?page=%s&member_action=edit&member_id=%s">Edit</a>', $_REQUEST['page'], $item['member_id']),
48
- 'delete' => sprintf('<a href="?page=%s&member_action=delete&member_id=%s"
49
- onclick="return confirm(\'Are you sure you want to delete this entry?\')">Delete</a>', $_REQUEST['page'], $item['member_id']),
50
- );
51
- return $item['member_id'] . $this->row_actions($actions);
52
- }
53
-
54
- function column_cb($item) {
55
- return sprintf(
56
- '<input type="checkbox" name="members[]" value="%s" />', $item['member_id']
57
- );
58
- }
59
-
60
- function prepare_items() {
61
- global $wpdb;
62
- $query = "SELECT * FROM " . $wpdb->prefix . "swpm_members_tbl";
63
- $query .= " LEFT JOIN " . $wpdb->prefix . "swpm_membership_tbl";
64
- $query .= " ON ( membership_level = id ) ";
65
- $s = filter_input(INPUT_POST, 's');
66
- if (!empty($s)){
67
- $query .= " WHERE user_name LIKE '%" . strip_tags($s) . "%' "
68
- . " OR first_name LIKE '%" . strip_tags($s) . "%' "
69
- . " OR last_name LIKE '%" . strip_tags($s) . "%' ";
70
- }
71
- $orderby = filter_input(INPUT_GET, 'orderby');
72
- $orderby = empty($orderby) ? 'user_name' : $orderby ;
73
- $order = filter_input(INPUT_GET, 'order');
74
- $order = empty($order) ? 'DESC' : $order;
75
-
76
- $sortable_columns = $this->get_sortable_columns();
77
- $orderby = BUtils::sanitize_value_by_array($orderby, $sortable_columns);
78
- $order = BUtils::sanitize_value_by_array($order, array('DESC' => '1', 'ASC' => '1'));
79
-
80
- $query.=' ORDER BY ' . $orderby . ' ' . $order;
81
- $totalitems = $wpdb->query($query); //return the total number of affected rows
82
- $perpage = 20;
83
- $paged = filter_input(INPUT_GET, 'paged');
84
- if (empty($paged) || !is_numeric($paged) || $paged <= 0) {
85
- $paged = 1;
86
- }
87
- $totalpages = ceil($totalitems / $perpage);
88
- if (!empty($paged) && !empty($perpage)) {
89
- $offset = ($paged - 1) * $perpage;
90
- $query.=' LIMIT ' . (int) $offset . ',' . (int) $perpage;
91
- }
92
- $this->set_pagination_args(array(
93
- "total_items" => $totalitems,
94
- "total_pages" => $totalpages,
95
- "per_page" => $perpage,
96
- ));
97
-
98
- $columns = $this->get_columns();
99
- $hidden = array();
100
- $sortable = $this->get_sortable_columns();
101
-
102
- $this->_column_headers = array($columns, $hidden, $sortable);
103
- $this->items = $wpdb->get_results($query, ARRAY_A);
104
- }
105
-
106
- function no_items() {
107
- _e('No Member found.');
108
- }
109
-
110
- function process_form_request() {
111
- if (isset($_REQUEST['member_id']))
112
- return $this->edit(absint($_REQUEST['member_id']));
113
- return $this->add();
114
- }
115
-
116
- function add() {
117
- $form = apply_filters('swpm_admin_registration_form_override', '');
118
- if (!empty($form)) {echo $form;return;}
119
- global $wpdb;
120
- $member = BTransfer::$default_fields;
121
- $member['member_since'] = date('Y-m-d');
122
- $member['subscription_starts'] = date('Y-m-d');
123
- if (isset($_POST['createswpmuser'])) {
124
- $member = $_POST;
125
- }
126
- extract($member, EXTR_SKIP);
127
- $query = "SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id !=1 ";
128
- $levels = $wpdb->get_results($query, ARRAY_A);
129
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_add.php');
130
- return false;
131
- }
132
-
133
- function edit($id) {
134
- global $wpdb;
135
- $id = absint($id);
136
- $query = "SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE member_id = $id";
137
- $member = $wpdb->get_row($query, ARRAY_A);
138
- if (isset($_POST["editswpmuser"])) {
139
- $_POST['user_name'] = $member['user_name'];
140
- $_POST['email'] = $member['email'];
141
- $member = $_POST;
142
- }
143
- extract($member, EXTR_SKIP);
144
- $query = "SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id !=1 ";
145
- $levels = $wpdb->get_results($query, ARRAY_A);
146
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_edit.php');
147
- return false;
148
- }
149
-
150
- function delete() {
151
- global $wpdb;
152
- if (isset($_REQUEST['members'])) {
153
- $members = $_REQUEST['members'];
154
- if (!empty($members)) {
155
- $members = array_map('absint', $members);
156
- foreach ($members as $swpm_id) {
157
- $user_name = BUtils::get_user_by_id(absint($swpm_id));
158
- BMembers::delete_wp_user($user_name);
159
- }
160
- $query = "DELETE FROM " . $wpdb->prefix . "swpm_members_tbl WHERE member_id IN (" . implode(',', $members) . ")";
161
- $wpdb->query($query);
162
- }
163
- }
164
- else if (isset($_REQUEST['member_id'])) {
165
- $id = absint($_REQUEST['member_id']);
166
- BMembers::delete_user_by_id($id);
167
- }
168
- }
169
- public static function delete_user_by_id($id){
170
- $user_name = BUtils::get_user_by_id($id);
171
- BMembers::delete_wp_user($user_name);
172
- BMembers::delete_swpm_user_by_id($id);
173
- }
174
-
175
- public static function delete_swpm_user_by_id($id){
176
- global $wpdb;
177
- $query = "DELETE FROM " . $wpdb->prefix . "swpm_members_tbl WHERE member_id = $id";
178
- $wpdb->query($query);
179
- }
180
- function show() {
181
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_members.php');
182
- }
183
-
184
- public static function delete_wp_user($user_name) {
185
- $wp_user_id = username_exists($user_name);
186
- $ud = get_userdata($wp_user_id);
187
- if (!empty($ud) && (isset($ud->wp_capabilities['administrator']) || $ud->wp_user_level == 10)) {
188
- BTransfer::get_instance()->set('status', 'For consistency, we do not allow deleting any associated wordpress account with administrator role.<br/>'
189
- . 'Please delete from <a href="users.php">Users</a> menu.');
190
- return;
191
- }
192
- if ($wp_user_id) {
193
- include_once(ABSPATH . 'wp-admin/includes/user.php');
194
- wp_delete_user($wp_user_id, 1); //assigns all related to this user to admin.
195
- }
196
- }
197
-
198
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bMembershipLevel.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Description of BMembershipLevel
5
- *
6
- * @author nur
7
- */
8
- class BMembershipLevel {
9
- const NO_EXPIRY = 0;
10
- const DAYS = 1;
11
- const WEEKS = 2;
12
- const MONTHS = 3;
13
- const YEARS = 4;
14
- const FIXED_DATE = 5;
15
-
16
- private static $_instance = null;
17
-
18
- private function __construct() {
19
- ;
20
- }
21
-
22
- public static function get_instance() {
23
- self::$_instance = empty(self::$_instance) ? new BMembershipLevel() : self::$_instance;
24
- return self::$_instance;
25
- }
26
-
27
- public function create() {
28
- global $wpdb;
29
- $level = BTransfer::$default_level_fields;
30
- $form = new BLevelForm($level);
31
- if ($form->is_valid()) {
32
- $level_info = $form->get_sanitized();
33
- $wpdb->insert($wpdb->prefix . "swpm_membership_tbl", $level_info);
34
- $id = $wpdb->insert_id;
35
- $custom = apply_filters('swpm_admin_add_membership_level', array());
36
- $this->save_custom_fields($id, $custom);
37
- $message = array('succeeded' => true, 'message' => BUtils::_('Membership Level Creation Successful.'));
38
- BTransfer::get_instance()->set('status', $message);
39
- wp_redirect('admin.php?page=simple_wp_membership_levels');
40
- return;
41
- }
42
- $message = array('succeeded' => false, 'message' => BUtils::_('Please correct the following:'), 'extra' => $form->get_errors());
43
- BTransfer::get_instance()->set('status', $message);
44
- }
45
-
46
- public function edit($id) {
47
- global $wpdb;
48
- $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id = %d", $id);
49
- $level = $wpdb->get_row($query, ARRAY_A);
50
- $form = new BLevelForm($level);
51
- if ($form->is_valid()) {
52
- $wpdb->update($wpdb->prefix . "swpm_membership_tbl", $form->get_sanitized(), array('id' => $id));
53
- //@todo meta table and collect all relevant info and pass as argument
54
- $custom = apply_filters('swpm_admin_edit_membership_level', array(), $id);
55
- $this->save_custom_fields($id, $custom);
56
- $message = array('succeeded' => true, 'message' => BUtils::_('Updated Successfully.'));
57
- BTransfer::get_instance()->set('status', $message);
58
- wp_redirect('admin.php?page=simple_wp_membership_levels');
59
- return;
60
- }
61
- $message = array('succeeded' => false, 'message' => BUtils::_('Please correct the following:'), 'extra' => $form->get_errors());
62
- BTransfer::get_instance()->set('status', $message);
63
- }
64
- private function save_custom_fields($level_id, $data){
65
- $custom_obj = BMembershipLevelCustom::get_instance_by_id($level_id);
66
- foreach ($data as $item){
67
- $custom_obj->set($item);
68
- }
69
- }
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bMembershipLevelCustom.php DELETED
@@ -1,93 +0,0 @@
1
- <?php
2
- /**
3
- * Description of BMembershipLevelCustom
4
- *
5
- * @author nur
6
- */
7
- class BMembershipLevelCustom {
8
- private static $instances = array();
9
- private $level_id;
10
- private $fields;
11
- private function __construct() {
12
- $this->fields = array();
13
- }
14
- public static function get_instance_by_id($level_id){
15
- if (!isset(self::$instances[$level_id])){
16
- self::$instances[$level_id] = new BMembershipLevelCustom();
17
- self::$instances[$level_id]->level_id = $level_id;
18
- self::$instances[$level_id]->load_by_id($level_id);
19
- }
20
- return self::$instances[$level_id];
21
- }
22
- public function load_by_id($level_id){
23
- global $wpdb;
24
- $query = 'SELECT * FROM ' . $wpdb->prefix . 'swpm_membership_meta_tbl WHERE level_id=%d';
25
- $results = $wpdb->get_results($wpdb->prepare($query, $level_id), ARRAY_A);
26
- foreach($results as $result){
27
- $this->fields[$result['meta_key']] = $result;
28
- }
29
- }
30
- public function set($item){
31
- $meta_key = preg_replace('|[^A-Z0-9_]|i', '', $item['meta_key']);
32
- $new = array(
33
- 'meta_key'=>$meta_key,
34
- 'level_id'=>$this->level_id,
35
- 'meta_label'=> isset($item['meta_label'])?$item['meta_label']:'',
36
- 'meta_value'=>$item['meta_value'],
37
- 'meta_type'=> isset($item['meta_type'])?$item['meta_type']:'text',
38
- 'meta_default'=> isset($item['meta_default'])?$item['meta_default']:'',
39
- 'meta_context'=> $item['meta_context'],
40
- );
41
- if (isset($this->fields[$meta_key])){
42
- $new['id'] = $this->fields[$meta_key]['id'];
43
- $this->fields[$meta_key] = $new;
44
- }
45
- else{
46
- $this->fields[$meta_key] = $new;
47
- }
48
- $this->save($this->fields[$meta_key]);
49
- return $this;
50
- }
51
- public function get($meta_key, $default=''){
52
- $meta_key = preg_replace('|[^A-Z0-9_]|i', '', $meta_key);
53
- if (isset($this->fields[$meta_key])){
54
- return maybe_unserialize($this->fields[$meta_key]['meta_value']);
55
-
56
- }
57
- return $default;
58
- }
59
- public function get_by_context($context){
60
- $result = array();
61
- foreach ($this->fields as $key=>$field){
62
- if ($field['meta_context'] == $context){
63
- $result[$key] = $field;
64
- }
65
- }
66
- return $result;
67
- }
68
- private function save($field){
69
- global $wpdb;
70
- if (!isset($field['meta_key'])){retern;} // cannot continue without key field.
71
- $meta_key = preg_replace('|[^A-Z0-9_]|i', '', $field['meta_key']);
72
- $query = $wpdb->prepare(
73
- 'REPLACE INTO ' . $wpdb->prefix. 'swpm_membership_meta_tbl
74
- (level_id, meta_key, meta_label, meta_value, meta_type, meta_default, meta_context)
75
- VALUES(%d, %s, %s, %s, %s, %s, %s); ',
76
- $this->level_id,
77
- $meta_key,
78
- isset($field['meta_label'])? sanitize_text_field($field['meta_label']): '',
79
- isset($field['meta_value'])? sanitize_text_field($field['meta_value']): '',
80
- 'text', // at the moment we have only one type
81
- '',
82
- isset($field['meta_context'])? sanitize_text_field($field['meta_context']): 'default'
83
- );
84
-
85
- $wpdb->query($query);
86
- }
87
- public static function get_value_by_key($level_id, $key, $default= ''){
88
- return BMembershipLevelCustom::get_instance_by_id($level_id)->get($key, $default);
89
- }
90
- public static function get_value_by_context($level_id, $context){
91
- return BMembershipLevelCustom::get_instance_by_id($level_id)->get_by_context($context);
92
- }
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bMembershipLevelUtils.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * BMembershipLevelUtils
5
- *
6
- * @author nur
7
- */
8
- class BMembershipLevelUtils {
9
-
10
- }
 
 
 
 
 
 
 
 
 
 
classes/class.bMembershipLevels.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- if( ! class_exists( 'WP_List_Table' ) )
3
- require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
4
-
5
- class BMembershipLevels extends WP_List_Table{
6
- function __construct(){
7
- parent::__construct(array(
8
- 'singular'=>BUtils::_('Membership Level'),
9
- 'plural' => BUtils::_('Membership Levels'),
10
- 'ajax' => false
11
- ));
12
- }
13
- function get_columns(){
14
- return array(
15
- 'cb' => '<input type="checkbox" />'
16
- ,'id'=>BUtils::_('ID')
17
- ,'alias'=>BUtils::_('Membership Level')
18
- ,'role'=>BUtils::_('Role')
19
- ,'valid_for'=>BUtils::_('Access Valid For/Until')
20
- );
21
- }
22
- function get_sortable_columns(){
23
- return array(
24
- 'id' => array('id',true),
25
- 'alias' => array('alias',true)
26
- );
27
- }
28
- function get_bulk_actions() {
29
- $actions = array(
30
- 'bulk_delete' => BUtils::_('Delete')
31
- );
32
- return $actions;
33
- }
34
- function column_default($item, $column_name){
35
- if($column_name == 'valid_for'){
36
- if($item['subscription_duration_type'] == BMembershipLevel::NO_EXPIRY) {return 'No Expiry';}
37
- if($item['subscription_duration_type'] == BMembershipLevel::FIXED_DATE) {return date(get_option('date_format'), strtotime($item['subscription_period']));}
38
- if($item['subscription_duration_type'] == BMembershipLevel::DAYS) {return $item['subscription_period'] ." Day(s)";}
39
- if($item['subscription_duration_type'] == BMembershipLevel::WEEKS) {return $item['subscription_period'] ." Week(s)";}
40
- if($item['subscription_duration_type'] == BMembershipLevel::MONTHS) {return $item['subscription_period'] ." Month(s)";}
41
- if($item['subscription_duration_type'] == BMembershipLevel::YEARS) {return $item['subscription_period'] ." Year(s)";}
42
- }
43
- if($column_name == 'role') {return ucfirst($item['role']);}
44
- return stripslashes($item[$column_name]);
45
- }
46
- function column_id($item){
47
- $actions = array(
48
- 'edit' => sprintf('<a href="admin.php?page=%s&level_action=edit&id=%s">Edit</a>',
49
- $_REQUEST['page'],$item['id']),
50
- 'delete' => sprintf('<a href="?page=%s&level_action=delete&id=%s"
51
- onclick="return confirm(\'Are you sure you want to delete this entry?\')">Delete</a>',
52
- $_REQUEST['page'],$item['id']),
53
- );
54
- return $item['id'] . $this->row_actions($actions);
55
- }
56
- function column_cb($item) {
57
- return sprintf(
58
- '<input type="checkbox" name="ids[]" value="%s" />', $item['id']
59
- );
60
- }
61
- function prepare_items() {
62
- global $wpdb;
63
- $query = "SELECT * FROM " .$wpdb->prefix . "swpm_membership_tbl WHERE id !=1 ";
64
- if(isset($_POST['s'])) $query .= " AND alias LIKE '%" . strip_tags($_POST['s']). "%' ";
65
- $orderby = !empty($_GET["orderby"]) ? mysql_real_escape_string($_GET["orderby"]) : 'id';
66
- $order = !empty($_GET["order"]) ? mysql_real_escape_string($_GET["order"]) : 'DESC';
67
-
68
- $sortable_columns = $this->get_sortable_columns();
69
- $orderby = BUtils::sanitize_value_by_array($orderby, $sortable_columns);
70
- $order = BUtils::sanitize_value_by_array($order, array('DESC' => '1', 'ASC' => '1'));
71
-
72
- if(!empty($orderby) && !empty($order)){ $query.=' ORDER BY '.$orderby.' '.$order; }
73
-
74
- $totalitems = $wpdb->query($query); //return the total number of affected rows
75
- $perpage = 20;
76
- $paged = !empty($_GET["paged"]) ? mysql_real_escape_string($_GET["paged"]) : '';
77
- if(empty($paged) || !is_numeric($paged) || $paged<=0 ){ $paged=1; }
78
- $totalpages = ceil($totalitems/$perpage);
79
- if(!empty($paged) && !empty($perpage)){
80
- $offset=($paged-1)*$perpage;
81
- $query.=' LIMIT '.(int)$offset.','.(int)$perpage;
82
- }
83
- $this->set_pagination_args( array(
84
- "total_items" => $totalitems,
85
- "total_pages" => $totalpages,
86
- "per_page" => $perpage,
87
- ) );
88
-
89
- $columns = $this->get_columns();
90
- $hidden = array();
91
- $sortable = $this->get_sortable_columns();
92
-
93
- $this->_column_headers = array($columns, $hidden, $sortable);
94
- $this->items = $wpdb->get_results($query, ARRAY_A);
95
- }
96
- function no_items() {
97
- BUtils::e( 'No membership levels found.' );
98
- }
99
- function process_form_request(){
100
- if(isset($_REQUEST['id'])){
101
- return $this->edit($_REQUEST['id']);
102
- }
103
- return $this->add();
104
-
105
- }
106
- function add(){
107
- global $wpdb;
108
- $member = BTransfer::$default_fields;
109
- if(isset($_POST['createswpmlevel'])){
110
- $member = $_POST;
111
- }
112
- extract($member, EXTR_SKIP);
113
- include_once(SIMPLE_WP_MEMBERSHIP_PATH.'views/admin_add_level.php');
114
- return false;
115
- }
116
- function edit($id){
117
- global $wpdb;
118
- $query = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}swpm_membership_tbl WHERE id = %d", absint($id));
119
- $membership = $wpdb->get_row($query, ARRAY_A);
120
- extract($membership, EXTR_SKIP);
121
- include_once(SIMPLE_WP_MEMBERSHIP_PATH.'views/admin_edit_level.php');
122
- return false;
123
- }
124
- function delete(){
125
- global $wpdb;
126
- if (isset($_REQUEST['ids'])){
127
- $members = $_REQUEST['ids'];
128
- if(!empty($members)){
129
- $members = array_map('absint', $members);
130
- $members = implode(',', $members);
131
- $query = "DELETE FROM " .$wpdb->prefix . "swpm_membership_tbl WHERE id IN (" . $members . ")";
132
- $wpdb->query($query);
133
- }
134
- }
135
- else if(isset($_REQUEST['id'])){
136
- $id = absint($_REQUEST['id']);
137
- $query = $wpdb->prepare("DELETE FROM " .$wpdb->prefix . "swpm_membership_tbl WHERE id = %d", $id);
138
- $wpdb->query($query);
139
- }
140
- }
141
- function show(){
142
- $selected = 1;
143
- include_once(SIMPLE_WP_MEMBERSHIP_PATH.'views/admin_membership_levels.php');
144
- }
145
- function manage(){
146
- $selected = 2;
147
- include_once(SIMPLE_WP_MEMBERSHIP_PATH.'views/admin_membership_manage.php');
148
- }
149
- function manage_categroy(){
150
- $selected = 3;
151
- include_once('class.bCategoryList.php');
152
- $category_list = new BCategoryList();
153
- include_once(SIMPLE_WP_MEMBERSHIP_PATH.'views/admin_category_list.php');
154
- }
155
- }
156
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bMessages.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
- /**
3
- *
4
- *
5
- * @author nur
6
- */
7
- class BMessages {
8
- private $messages;
9
- public function __construct() {
10
- $this->messages = array();
11
- }
12
- public function get($key){
13
- if(isset($this->messages[$key])){
14
- $m = $this->messages[$key];
15
- $this->messages[$key] ='';
16
- return $m;
17
- }
18
- return '';
19
- }
20
- public function set($key, $value){
21
- $this->messages[$key] = $value;
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bPermission.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
- include_once('class.bProtectionBase.php');
3
- class BPermission extends bProtectionBase{
4
- private static $_this = array();
5
- private function __construct($level_id) {
6
- $this->init($level_id);
7
- }
8
-
9
- public static function get_instance($level_id) {
10
- if ($level_id ==1 || $level_id == md5(1)){
11
- wp_die('Invalid Membership level!');
12
- }
13
- $key = is_numeric($level_id)? md5($level_id): $level_id;
14
- if (!isset(self::$_this[$key])){
15
- self::$_this[$key] = new BPermission($level_id);
16
- }
17
-
18
- return self::$_this[$key];
19
- }
20
-
21
- public function is_permitted($id) {
22
- return $this->post_in_parent_categories($id) || $this->post_in_categories($id) || $this->in_posts($id) || $this->in_pages($id) || $this->in_attachments($id) || $this->in_custom_posts($id);
23
- }
24
-
25
- public function is_permitted_attachment($id) {
26
- return (($this->bitmap & 16) === 16) && $this->in_attachments($id);
27
- }
28
-
29
- public function is_permitted_custom_post($id) {
30
- return (($this->bitmap & 32) === 32) && $this->in_custom_posts($id);
31
- }
32
-
33
- public function is_permitted_category($id) {
34
- return (($this->bitmap & 1) === 1) && $this->in_categories($id);
35
- }
36
-
37
- public function is_post_in_permitted_category($post_id) {
38
- return (($this->bitmap & 1) === 1) && $this->post_in_categories($post_id);
39
- }
40
-
41
- public function is_permitted_post($id) {
42
- return (($this->bitmap & 4) === 4) && $this->in_posts($id);
43
- }
44
-
45
- public function is_permitted_page($id) {
46
- return (($this->bitmap & 8) === 8) && $this->in_pages($id);
47
- }
48
-
49
- public function is_permitted_comment($id) {
50
- return (($this->bitmap & 2) === 2) && $this->in_comments($id);
51
- }
52
-
53
- public function is_post_in_permitted_parent_category($post_id) {
54
- return (($this->bitmap & 1) === 1) && $this->post_in_parent_categories($post_id);
55
- }
56
-
57
- public function is_permitted_parent_category($id) {
58
- return (($this->bitmap & 1) === 1) && $this->in_parent_categories($id);
59
- }
60
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bPermissionCollection.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * To change this license header, choose License Headers in Project Properties.
5
- * To change this template file, choose Tools | Templates
6
- * and open the template in the editor.
7
- */
8
-
9
- /**
10
- * Description of bPermissionCollection
11
- *
12
- * @author nur
13
- */
14
- class BPermissionCollection {
15
- protected $permissions;
16
- protected static $instance;
17
-
18
- protected function __construct() {
19
- $this->permissions = array();
20
- }
21
-
22
- public static function get_instance(){
23
- self::$_this = empty(self::$_this)? new BPermissionCollection():self::$_this;
24
- return self::$_this;
25
- }
26
-
27
- public function load($level_ids = array()){
28
- if (empty($level_ids)){
29
- global $wpdb;
30
- $level_ids = $wpdb->get_col("SELECT id FROM {$wpdb->prefix}swpm_membership_tbl WHERE id != 1");
31
- }
32
-
33
- foreach($level_ids as $id){
34
- $this->permissions[] = BPermission::get_instance($id);
35
- }
36
- }
37
-
38
- public function get_permitted_levels($post_id){
39
- $levels = array();
40
-
41
- foreach($this->permissions as $permission){
42
- if ($permission->is_permitted($post_id)){
43
- $levels[$permission->get($id)] = $permission->get('alias');
44
- }
45
- }
46
-
47
- return $levels;
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bProtection.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
- include_once('class.bProtectionBase.php');
3
-
4
- class BProtection extends BProtectionBase{
5
- private static $_this;
6
-
7
- private function __construct() {
8
- $this->msg = "";
9
- $this->init(1);
10
- }
11
-
12
- public static function get_instance() {
13
- self::$_this = empty(self::$_this) ? (new BProtection()) : self::$_this;
14
- return self::$_this;
15
- }
16
-
17
- public function is_protected($id) {
18
- if ($this->post_in_parent_categories($id) || $this->post_in_categories($id)) {
19
- $this->msg = '<p style="background: #FFF6D5; border: 1px solid #D1B655; color: #3F2502; margin: 10px 0px 10px 0px; padding: 5px 5px 5px 10px;">
20
- The category or parent category of this post is protected. You can change the category protection settings from the <a href="admin.php?page=eMember_membership_level_menu&level_action=2" target="_blank">manage content protection</a> menu.
21
- </p>';
22
- return true;
23
- }
24
- return $this->in_posts($id) || $this->in_pages($id) || $this->in_attachments($id) || $this->in_custom_posts($id);
25
- }
26
-
27
- public function get_last_message() {
28
- return $this->msg;
29
- }
30
-
31
- public function is_protected_post($id) {
32
- return /* (($this->bitmap&4) != 4) && */ $this->in_posts($id);
33
- }
34
-
35
- public function is_protected_page($id) {
36
- return /* (($this->bitmap&4) != 4) && */ $this->in_pages($id);
37
- }
38
-
39
- public function is_protected_attachment($id) {
40
- return /* (($this->bitmap&16)!=16) && */ $this->in_attachments($id);
41
- }
42
-
43
- public function is_protected_custom_post($id) {
44
- return /* (($this->bitmap&32)!=32) && */ $this->in_custom_posts($id);
45
- }
46
-
47
- public function is_protected_comment($id) {
48
- return /* (($this->bitmap&2)!=2) && */ $this->in_comments($id);
49
- }
50
-
51
- public function is_post_in_protected_category($post_id) {
52
- return /* (($this->bitmap&1)!=1) && */ $this->post_in_categories($post_id);
53
- }
54
-
55
- public function is_post_in_protected_parent_category($post_id) {
56
- return /* (($this->bitmap&1)!=1) && */ $this->post_in_parent_categories($post_id);
57
- }
58
-
59
- public function is_protected_category($id) {
60
- return /* (($this->bitmap&1)!=1) && */ $this->in_categories($id);
61
- }
62
-
63
- public function is_protected_parent_category($id) {
64
- return /* (($this->bitmap&1)!=1) && */ $this->in_parent_categories($id);
65
- }
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bProtectionBase.php DELETED
@@ -1,296 +0,0 @@
1
- <?php
2
-
3
- abstract class BProtectionBase {
4
-
5
- protected $bitmap;
6
- protected $posts;
7
- protected $pages;
8
- protected $comments;
9
- protected $categories;
10
- protected $attachments;
11
- protected $custom_posts;
12
- protected $details;
13
- protected $options;
14
-
15
- private function __construct() {
16
-
17
- }
18
-
19
- protected function init($level_id) {
20
- global $wpdb;
21
- $this->owning_level_id = $level_id;
22
- $query = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}swpm_membership_tbl WHERE "
23
- . (is_numeric($level_id) ? 'id = %d' : 'md5(id) = %s' ), $level_id);
24
- $result = $wpdb->get_row($query);
25
-
26
- $this->bitmap = isset($result->permissions) ? $result->permissions : 0;
27
- $this->posts = isset($result->post_list) ? (array) unserialize($result->post_list) : array();
28
- $this->pages = isset($result->page_list) ? (array) unserialize($result->page_list) : array();
29
- $this->comments = isset($result->comment_list) ? (array) unserialize($result->comment_list) : array();
30
- $this->categories = isset($result->category_list) ? (array) unserialize($result->category_list) : array();
31
- $this->attachments = isset($result->attachment_list) ? (array) unserialize($result->attachment_list) : array();
32
- $this->custom_posts = isset($result->custom_post_list) ? (array) unserialize($result->custom_post_list) : array();
33
- $this->options = isset($result->options) ? (array) unserialize($result->options) : array();
34
- $this->disable_bookmark = isset($result->disable_bookmark_list) ? (array) unserialize($result->disable_bookmark_list) : array();
35
- $this->details = (array) $result;
36
- }
37
-
38
- public function apply($ids, $type) {
39
- $post_types = get_post_types(array('public' => true, '_builtin' => false));
40
- if (in_array($type, $post_types)) {
41
- $type = 'custom_post';
42
- }
43
- return $this->update_perms($ids, true, $type);
44
- }
45
-
46
- public function remove($ids, $type) {
47
- $post_types = get_post_types(array('public' => true, '_builtin' => false));
48
- if (in_array($type, $post_types)) {
49
- $type = 'custom_post';
50
- }
51
- return $this->update_perms($ids, false, $type);
52
- }
53
-
54
- public function get_options() {
55
- return $this->options;
56
- }
57
-
58
- public function get_posts() {
59
- return $this->posts;
60
- }
61
-
62
- public function get_pages() {
63
- return $this->pages;
64
- }
65
-
66
- public function get_comments() {
67
- return $this->comments;
68
- }
69
-
70
- public function get_categories() {
71
- return $this->categories;
72
- }
73
-
74
- public function get_attachments() {
75
- return $this->attachments;
76
- }
77
-
78
- public function get_custom_posts() {
79
- return $this->custom_posts;
80
- }
81
-
82
- public function is_bookmark_disabled($id) {
83
- $posts = isset($this->disable_bookmark['posts']) ?
84
- (array) $this->disable_bookmark['posts'] : array();
85
- $pages = isset($this->disable_bookmark['pages']) ?
86
- (array) $this->disable_bookmark['pages'] : array();
87
- return in_array($id, $pages) || in_array($id, $posts);
88
- }
89
-
90
- public function in_posts($id) {
91
- return (/* ($this->bitmap&4)===4) && */in_array($id, (array) $this->posts));
92
- }
93
-
94
- public function in_pages($id) {
95
- return (/* ($this->bitmap&8)===8) && */ in_array($id, (array) $this->pages));
96
- }
97
-
98
- public function in_attachments($id) {
99
- return (/* ($this->bitmap&16)===16) && */in_array($id, (array) $this->attachments));
100
- }
101
-
102
- public function in_custom_posts($id) {
103
- return (/* ($this->bitmap&32)===32) && */ in_array($id, (array) $this->custom_posts));
104
- }
105
-
106
- public function in_comments($id) {
107
- return (/* ($this->bitmap&2)===2) && */ in_array($id, (array) $this->comments));
108
- }
109
-
110
- public function in_categories($id) {
111
- if (empty($this->categories))
112
- return false;
113
- return (/* ($this->bitmap&1)===1) && */ in_array($id, (array) $this->categories));
114
- }
115
-
116
- public function post_in_categories($post_id) {
117
- if (empty($this->categories))
118
- return false;
119
- return (/* ($this->bitmap&1)===1) && */ in_category((array) $this->categories, $post_id));
120
- }
121
-
122
- public function in_parent_categories($id) {
123
- if (empty($this->categories))
124
- return false;
125
- $parents = explode(',', get_category_parents($id, false, ','));
126
- $parents = array_unique($parents);
127
- foreach ($parents as $parent) {
128
- if (empty($parent))
129
- continue;
130
- if (/* (($this->bitmap&1)===1) && */(in_array($parent, (array) $this->categories)))
131
- return true;
132
- }
133
- return false;
134
- }
135
-
136
- public function post_in_parent_categories($post_id) {
137
- if (empty($this->categories))
138
- return false;
139
- $cats = get_the_category($post_id);
140
- $parents = array();
141
- foreach ($cats as $key => $cat) {
142
- $parents = array_merge($parents, explode(',', get_category_parents($cat->cat_ID, false, ',')));
143
- }
144
- $parents = array_unique($parents);
145
- foreach ($parents as $parent) {
146
- if (empty($parent))
147
- continue;
148
- if (/* (($this->bitmap&1)===1) && */(in_array(get_cat_ID($parent), (array) $this->categories)))
149
- return true;
150
- }
151
- return false;
152
- }
153
-
154
- public function add_posts($ids) {
155
- return $this->update_perms($ids, true, 'post');
156
- }
157
-
158
- public function add_pages($ids) {
159
- return $this->update_perms($ids, true, 'page');
160
- }
161
-
162
- public function add_attachments($ids) {
163
- return $this->update_perms($ids, true, 'attachment');
164
- }
165
-
166
- public function add_comments($ids) {
167
- return $this->update_perms($ids, true, 'comment');
168
- }
169
-
170
- public function add_categories($ids) {
171
- return $this->update_perms($ids, true, 'category');
172
- }
173
-
174
- public function add_custom_posts($ids) {
175
- return $this->update_perms($ids, true, 'custom_post');
176
- }
177
-
178
- public function remove_posts($ids) {
179
- return $this->update_perms($ids, false, 'post');
180
- }
181
-
182
- public function remove_pages($ids) {
183
- return $this->update_perms($ids, false, 'page');
184
- }
185
-
186
- public function remove_attachments($ids) {
187
- return $this->update_perms($ids, false, 'attachment');
188
- }
189
-
190
- public function remove_comments($ids) {
191
- return $this->update_perms($ids, false, 'comment');
192
- }
193
-
194
- public function remove_categories($ids) {
195
- return $this->update_perms($ids, false, 'category');
196
- }
197
-
198
- public function remove_custom_posts($ids) {
199
- return $this->update_perms($ids, false, 'custom_post');
200
- }
201
-
202
- private function update_perms($ids, $set, $type) {
203
- $list = null;
204
- $index = '';
205
- if (empty($ids)) {
206
- return $this;
207
- }
208
- $ids = (array) $ids;
209
- switch ($type) {
210
- case 'page':
211
- $list = $this->pages;
212
- $index = 'page_list';
213
- break;
214
- case 'post':
215
- $list = $this->posts;
216
- $index = 'post_list';
217
- break;
218
- case 'attachment':
219
- $list = $this->attachments;
220
- $index = 'attachment_list';
221
- break;
222
- case 'comment':
223
- $list = $this->comments;
224
- $index = 'comment_list';
225
- break;
226
- case 'category':
227
- $list = $this->categories;
228
- $index = 'category_list';
229
- break;
230
- case 'custom_post':
231
- $list = $this->custom_posts;
232
- $index = 'custom_post_list';
233
- break;
234
- default:
235
- break;
236
- }
237
-
238
- if (!empty($index)) {
239
- if ($set) {
240
- $list = array_merge($list, $ids);
241
- $list = array_unique($list);
242
- } else {
243
- $list = array_diff($list, $ids);
244
- }
245
- switch ($type) {
246
- case 'page':
247
- $this->pages = $list;
248
- break;
249
- case 'post':
250
- $this->posts = $list;
251
- break;
252
- case 'attachment':
253
- $this->attachments = $list;
254
- break;
255
- case 'comment':
256
- $this->comments = $list;
257
- break;
258
- case 'category':
259
- $this->categories = $list;
260
- break;
261
- case 'custom_post':
262
- $this->custom_posts = $list;
263
- break;
264
- default:
265
- break;
266
- }
267
- $this->details[$index] = $list;
268
- }
269
- return $this;
270
- }
271
-
272
- public function save() {
273
- global $wpdb;
274
- $data = array();
275
-
276
- $list_type = array('page_list', 'post_list', 'attachment_list',
277
- 'custom_post_list', 'comment_list', 'category_list');
278
- foreach ($this->details as $key => $value) {
279
- if ($key == 'id')
280
- continue;
281
- if (is_serialized($value) || !in_array($key, $list_type))
282
- $data[$key] = $value;
283
- else
284
- $data[$key] = serialize($value);
285
- }
286
- $wpdb->update($wpdb->prefix . "swpm_membership_tbl", $data, array('id' => $this->owning_level_id));
287
- }
288
-
289
- public function get($key, $default = '') {
290
- if (isset($this->details[$key])) {
291
- return $this->details[$key];
292
- }
293
- return $default;
294
- }
295
-
296
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bRegistration.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Description of BRegistration
5
- *
6
- * @author nur
7
- */
8
- abstract class BRegistration {
9
- protected $member_info = array();
10
- protected static $_intance = null;
11
- //public abstract static function get_instance();
12
- protected function send_reg_email(){
13
- global $wpdb;
14
- if (empty($this->member_info)) {return false;}
15
- $member_info = $this->member_info;
16
- $settings = BSettings::get_instance();
17
- $subject = $settings->get_value('reg-complete-mail-subject');
18
- $body = $settings->get_value('reg-complete-mail-body');
19
- $from_address = $settings->get_value('email-from');
20
- $login_link = $settings->get_value('login-page-url');
21
- $headers = 'From: ' . $from_address . "\r\n";
22
- $member_info['membership_level_name'] = BPermission::get_instance($member_info['membership_level'])->get('alias');
23
- $member_info['password'] = $member_info['plain_password'];
24
- $member_info['login_link'] = $login_link;
25
- $values = array_values($member_info);
26
- $keys = array_map('swpm_enclose_var', array_keys($member_info));
27
- $body = str_replace($keys, $values, $body);
28
- $email = sanitize_email(filter_input(INPUT_POST, 'email', FILTER_UNSAFE_RAW));
29
- wp_mail(trim($email), $subject, $body, $headers);
30
- if ($settings->get_value('enable-admin-notification-after-reg')) {
31
- $subject = "Notification of New Member Registration";
32
- $body = "A new member has registered. The following email was sent to the member." .
33
- "\n\n-------Member Email----------\n" . $body .
34
- "\n\n------End------\n";
35
- wp_mail($from_address, $subject, $body, $headers);
36
- }
37
- return true;
38
- }
39
- }
40
- function swpm_enclose_var($n){
41
- return '{'.$n .'}';
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bSession.php DELETED
File without changes
classes/class.bSettings.php DELETED
@@ -1,395 +0,0 @@
1
- <?php
2
-
3
- class BSettings {
4
-
5
- private static $_this;
6
- private $settings;
7
- public $current_tab;
8
- private $tabs;
9
- private function __construct() {
10
- $this->settings = (array) get_option('swpm-settings');
11
- }
12
- public function init_config_hooks(){
13
- $page = filter_input(INPUT_GET, 'page');
14
- // if($page == 'simple_wp_membership_settings'){
15
- if(is_admin()){ // for frontend just load settings but dont try to render settings page.
16
- $tab = filter_input(INPUT_GET, 'tab');
17
- $tab = empty($tab)?filter_input(INPUT_POST, 'tab'):$tab;
18
- $this->current_tab = empty($tab) ? 1 : $tab;
19
- $this->tabs = array(1=> 'General Settings', 2=> 'Payment Settings',
20
- 3=> 'Email Settings', 4=> 'Tools', 5=>'Advanced Settings', 6=> 'Addons Settings');
21
- add_action('swpm-draw-tab', array(&$this, 'draw_tabs'));
22
- $method = 'tab_' . $this->current_tab;
23
- if (method_exists($this, $method)){
24
- $this->$method();
25
- }
26
- }
27
- }
28
- private function tab_1() {
29
-
30
- register_setting('swpm-settings-tab-1', 'swpm-settings', array(&$this, 'sanitize_tab_1'));
31
-
32
- //This settings section has no heading
33
- add_settings_section('swpm-general-post-submission-check', '',
34
- array(&$this, 'swpm_general_post_submit_check_callback'), 'simple_wp_membership_settings');
35
-
36
- add_settings_section('swpm-documentation', BUtils::_('Plugin Documentation'),
37
- array(&$this, 'swpm_documentation_callback'), 'simple_wp_membership_settings');
38
- add_settings_section('general-settings', BUtils::_('General Settings'),
39
- array(&$this, 'general_settings_callback'), 'simple_wp_membership_settings');
40
- add_settings_field('enable-free-membership', BUtils::_('Enable Free Membership'),
41
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings',
42
- array('item' => 'enable-free-membership',
43
- 'message'=> BUtils::_('Enable/disable registration for free membership level. When you enable this option, make sure to specify a free membership level ID in the field below.')));
44
- add_settings_field('free-membership-id', BUtils::_('Free Membership Level ID'),
45
- array(&$this, 'textfield_small_callback'), 'simple_wp_membership_settings', 'general-settings',
46
- array('item' => 'free-membership-id',
47
- 'message'=> BUtils::_('Assign free membership level ID')));
48
- add_settings_field('enable-moretag', BUtils::_('Enable More Tag Protection'),
49
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings',
50
- array('item' => 'enable-moretag',
51
- 'message'=> BUtils::_('Enables or disables "more" tag protection in the posts and pages. Anything after the More tag is protected. Anything before the more tag is teaser content.')));
52
- add_settings_field('hide-adminbar', BUtils::_('Hide Adminbar'),
53
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings',
54
- array('item' => 'hide-adminbar',
55
- 'message'=>BUtils::_('WordPress shows an admin toolbar to the logged in users of the site. Check this box if you want to hide that admin toolbar in the fronend of your site.')));
56
-
57
- add_settings_field('default-account-status', BUtils::_('Default Account Status'),
58
- array(&$this, 'selectbox_callback'), 'simple_wp_membership_settings', 'general-settings',
59
- array('item' => 'default-account-status',
60
- 'options'=> BUtils::get_account_state_options(),
61
- 'default'=>'active',
62
- 'message'=>BUtils::_('Select the default account status for newly registered users. If you want to manually approve the members then you can set the status to "Pending".')));
63
- add_settings_field('allow-account-deletion', BUtils::_('Allow Account Deletion'),
64
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings',
65
- array('item' => 'allow-account-deletion',
66
- 'options'=> BUtils::get_account_state_options(),
67
- 'message'=>BUtils::_('Allow users to delete their accounts.')));
68
- add_settings_field('delete-pending-account', BUtils::_('Auto Delete Pending Account'),
69
- array(&$this, 'selectbox_callback'), 'simple_wp_membership_settings', 'general-settings',
70
- array('item' => 'delete-pending-account',
71
- 'options'=> array(0 => 'Do not delete', 1=>'Older than 1 month', 2=> 'Older than 2 months'),
72
- 'default'=>'0',
73
- 'message'=>BUtils::_('Select how long you want to keep "pending" account.')));
74
- /*add_settings_field('protect-everything', BUtils::_('Protect Everything'),
75
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings',
76
- array('item' => 'protect-everything',
77
- 'message'=>BUtils::_('Check this box if you want to protect all posts/pages by default.')));*/
78
-
79
- add_settings_section('pages-settings', BUtils::_('Pages Settings'),
80
- array(&$this, 'pages_settings_callback'), 'simple_wp_membership_settings');
81
- add_settings_field('login-page-url', BUtils::_('Login Page URL'),
82
- array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings',
83
- array('item' => 'login-page-url',
84
- 'message'=>''));
85
- add_settings_field('registration-page-url', BUtils::_('Registration Page URL'),
86
- array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings',
87
- array('item' => 'registration-page-url',
88
- 'message'=>''));
89
- add_settings_field('join-us-page-url', BUtils::_('Join Us Page URL'),
90
- array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings',
91
- array('item' => 'join-us-page-url',
92
- 'message'=>''));
93
- add_settings_field('profile-page-url', BUtils::_('Edit Profile Page URL'),
94
- array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings',
95
- array('item' => 'profile-page-url',
96
- 'message'=>''));
97
- add_settings_field('reset-page-url', BUtils::_('Password Reset Page URL'),
98
- array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings',
99
- array('item' => 'reset-page-url',
100
- 'message'=>''));
101
-
102
- add_settings_section('debug-settings', BUtils::_('Test & Debug Settings'),
103
- array(&$this, 'testndebug_settings_callback'), 'simple_wp_membership_settings');
104
-
105
- $debug_field_help_text = BUtils::_('Check this option to enable debug logging.');
106
- $debug_field_help_text .= '<br />- View debug log file by clicking <a href="'.SIMPLE_WP_MEMBERSHIP_URL.'/log.txt" target="_blank">here</a>.';
107
- $debug_field_help_text .= '<br />- Reset debug log file by clicking <a href="admin.php?page=simple_wp_membership_settings&swmp_reset_log=1" target="_blank">here</a>.';
108
- add_settings_field('enable-debug', 'Enable Debug',
109
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'debug-settings',
110
- array('item' => 'enable-debug',
111
- 'message'=> $debug_field_help_text));
112
- add_settings_field('enable-sandbox-testing', BUtils::_('Enable Sandbox Testing'),
113
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'debug-settings',
114
- array('item' => 'enable-sandbox-testing',
115
- 'message'=>BUtils::_('Enable this option if you want to do sandbox payment testing.')));
116
-
117
- }
118
-
119
- private function tab_2() {
120
- }
121
-
122
- private function tab_3() {
123
- register_setting('swpm-settings-tab-3', 'swpm-settings', array(&$this, 'sanitize_tab_3'));
124
-
125
- add_settings_section('email-misc-settings', BUtils::_('Email Misc. Settings'),
126
- array(&$this, 'email_misc_settings_callback'), 'simple_wp_membership_settings');
127
- add_settings_field('email-misc-from', BUtils::_('From Email Address'),
128
- array(&$this, 'textfield_callback'), 'simple_wp_membership_settings', 'email-misc-settings',
129
- array('item' => 'email-from',
130
- 'message'=>''));
131
-
132
- add_settings_section('reg-prompt-email-settings', BUtils::_('Email Settings (Prompt to Complete Registration )'),
133
- array(&$this, 'reg_prompt_email_settings_callback'), 'simple_wp_membership_settings');
134
- add_settings_field('reg-prompt-complete-mail-subject', BUtils::_('Email Subject'),
135
- array(&$this, 'textfield_callback'), 'simple_wp_membership_settings', 'reg-prompt-email-settings',
136
- array('item' => 'reg-prompt-complete-mail-subject',
137
- 'message'=>''));
138
- add_settings_field('reg-prompt-complete-mail-body', BUtils::_('Email Body'),
139
- array(&$this, 'textarea_callback'), 'simple_wp_membership_settings', 'reg-prompt-email-settings',
140
- array('item' => 'reg-prompt-complete-mail-body',
141
- 'message'=>''));
142
-
143
- add_settings_section('reg-email-settings', BUtils::_('Email Settings (Registration Complete)'),
144
- array(&$this, 'reg_email_settings_callback'), 'simple_wp_membership_settings');
145
- add_settings_field('reg-complete-mail-subject', BUtils::_('Email Subject'),
146
- array(&$this, 'textfield_callback'), 'simple_wp_membership_settings', 'reg-email-settings',
147
- array('item' => 'reg-complete-mail-subject',
148
- 'message'=>''));
149
- add_settings_field('reg-complete-mail-body', BUtils::_('Email Body'),
150
- array(&$this, 'textarea_callback'), 'simple_wp_membership_settings', 'reg-email-settings',
151
- array('item' => 'reg-complete-mail-body',
152
- 'message'=>''));
153
- add_settings_field('enable-admin-notification-after-reg', BUtils::_('Send Notification To Admin'),
154
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'reg-email-settings',
155
- array('item' => 'enable-admin-notification-after-reg',
156
- 'message'=>''));
157
- add_settings_field('enable-notification-after-manual-user-add', BUtils::_('Send Email to Member When Added via Admin Dashboard'),
158
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'reg-email-settings',
159
- array('item' => 'enable-notification-after-manual-user-add',
160
- 'message'=>''));
161
-
162
- add_settings_section('upgrade-email-settings', BUtils::_(' Email Settings (Account Upgrade Notification)'),
163
- array(&$this, 'upgrade_email_settings_callback'), 'simple_wp_membership_settings');
164
- add_settings_field('upgrade-complete-mail-subject', BUtils::_('Email Subject'),
165
- array(&$this, 'textfield_callback'), 'simple_wp_membership_settings', 'upgrade-email-settings',
166
- array('item' => 'upgrade-complete-mail-subject',
167
- 'message'=>''));
168
- add_settings_field('upgrade-complete-mail-body', BUtils::_('Email Body'),
169
- array(&$this, 'textarea_callback'), 'simple_wp_membership_settings', 'upgrade-email-settings',
170
- array('item' => 'upgrade-complete-mail-body',
171
- 'message'=>''));
172
- }
173
-
174
- private function tab_4(){
175
- }
176
-
177
- private function tab_5(){
178
- register_setting('swpm-settings-tab-5', 'swpm-settings', array(&$this, 'sanitize_tab_5'));
179
-
180
- add_settings_section('advanced-settings', BUtils::_('Advanced Settings'),
181
- array(&$this, 'advanced_settings_callback'), 'simple_wp_membership_settings');
182
-
183
- add_settings_field('enable-expired-account-login', BUtils::_('Enable Expired Account Login'),
184
- array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'advanced-settings',
185
- array('item' => 'enable-expired-account-login',
186
- 'message'=>BUtils::_("When enabled, expired members will be able to log into the system but won't be able to view any protected content. This allows them to easily renew their account by making another payment.")));
187
- }
188
-
189
- private function tab_6(){
190
- }
191
-
192
- public static function get_instance() {
193
- self::$_this = empty(self::$_this) ? new BSettings() : self::$_this;
194
- return self::$_this;
195
- }
196
- public function selectbox_callback($args){
197
- $item = $args['item'];
198
- $options = $args['options'];
199
- $default = $args['default'];
200
- $msg = isset($args['message'])?$args['message']: '';
201
- $selected = esc_attr($this->get_value($item), $default);
202
- echo "<select name='swpm-settings[" . $item . "]' >";
203
- foreach($options as $key => $value){
204
- $is_selected = ($key == $selected)? 'selected="selected"': '';
205
- echo '<option ' . $is_selected . ' value="'. esc_attr($key) . '">' . esc_attr($value) . '</option>';
206
- }
207
- echo '</select>';
208
- echo '<br/><i>'.$msg.'</i>';
209
- }
210
- public function checkbox_callback($args) {
211
- $item = $args['item'];
212
- $msg = isset($args['message'])?$args['message']: '';
213
- $is = esc_attr($this->get_value($item));
214
- echo "<input type='checkbox' $is name='swpm-settings[" . $item . "]' value=\"checked='checked'\" />";
215
- echo '<br/><i>'.$msg.'</i>';
216
- }
217
-
218
- public function textarea_callback($args) {
219
- $item = $args['item'];
220
- $msg = isset($args['message'])?$args['message']: '';
221
- $text = esc_attr($this->get_value($item));
222
- echo "<textarea name='swpm-settings[" . $item . "]' rows='6' cols='60' >" . $text . "</textarea>";
223
- echo '<br/><i>'.$msg.'</i>';
224
- }
225
-
226
- public function textfield_small_callback($args) {
227
- $item = $args['item'];
228
- $msg = isset($args['message'])?$args['message']: '';
229
- $text = esc_attr($this->get_value($item));
230
- echo "<input type='text' name='swpm-settings[" . $item . "]' size='5' value='" . $text . "' />";
231
- echo '<br/><i>'.$msg.'</i>';
232
- }
233
-
234
- public function textfield_callback($args) {
235
- $item = $args['item'];
236
- $msg = isset($args['message'])?$args['message']: '';
237
- $text = esc_attr($this->get_value($item));
238
- echo "<input type='text' name='swpm-settings[" . $item . "]' size='50' value='" . $text . "' />";
239
- echo '<br/><i>'.$msg.'</i>';
240
- }
241
-
242
- public function textfield_long_callback($args) {
243
- $item = $args['item'];
244
- $msg = isset($args['message'])?$args['message']: '';
245
- $text = esc_attr($this->get_value($item));
246
- echo "<input type='text' name='swpm-settings[" . $item . "]' size='100' value='" . $text . "' />";
247
- echo '<br/><i>'.$msg.'</i>';
248
- }
249
-
250
- public function swpm_documentation_callback() {
251
- ?>
252
- <div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
253
- <p>Visit the
254
- <a target="_blank" href="https://simple-membership-plugin.com/">Simple Membership Plugin Site</a>
255
- to read setup and configuration documentation. Please <a href="https://wordpress.org/support/view/plugin-reviews/simple-membership?filter=5" target="_blank">give us a rating</a> if you like the plugin.
256
- </p>
257
- </div>
258
- <?php
259
- }
260
-
261
- public function swpm_general_post_submit_check_callback(){
262
- //Log file reset handler
263
- if(isset($_REQUEST['swmp_reset_log'])){
264
- if(miscUtils::reset_swmp_log_files()){
265
- echo '<div id="message" class="updated fade"><p>Debug log files have been reset!</p></div>';
266
- }
267
- else{
268
- echo '<div id="message" class="updated fade"><p>Debug log files could not be reset!</p></div>';
269
- }
270
- }
271
-
272
- //Show settings updated message
273
- if(isset($_REQUEST['settings-updated'])){
274
- echo '<div id="message" class="updated fade"><p>' . BUtils::_('Settings updated!') . '</p></div>';
275
- }
276
- }
277
-
278
- public function general_settings_callback() {
279
- BUtils::e('General Plugin Settings.');
280
- }
281
-
282
- public function pages_settings_callback() {
283
- BUtils::e('Page Setup and URL Related settings.');
284
- }
285
- public function testndebug_settings_callback(){
286
- BUtils::e('Testing and Debug Related Settings.');
287
- }
288
- public function reg_email_settings_callback() {
289
- BUtils::e('This email will be sent to your users when they complete the registration and become a member.');
290
- }
291
- public function email_misc_settings_callback(){
292
- BUtils::e('Settings in this section apply to all emails.');
293
- }
294
- public function upgrade_email_settings_callback() {
295
- BUtils::e('This email will be sent to your users after account upgrade.');
296
- }
297
- public function reg_prompt_email_settings_callback() {
298
- BUtils::e('This email will be sent to prompt user to complete registration.');
299
- }
300
- public function advanced_settings_callback(){
301
- BUtils::e('This page allows you to configure some advanced features of the plugin.');
302
- }
303
-
304
- public function sanitize_tab_1($input) {
305
- if (empty($this->settings)){
306
- $this->settings = (array) get_option('swpm-settings');
307
- }
308
- $output = $this->settings;
309
- //general settings block
310
-
311
- $output['hide-adminbar'] = isset($input['hide-adminbar'])? esc_attr($input['hide-adminbar']) : "";
312
- $output['protect-everything'] = isset($input['protect-everything'])? esc_attr($input['protect-everything']) : "";
313
- $output['enable-free-membership'] = isset($input['enable-free-membership'])? esc_attr($input['enable-free-membership']) : "";
314
- $output['enable-moretag'] = isset($input['enable-moretag'])? esc_attr($input['enable-moretag']) : "";
315
- $output['enable-debug'] = isset($input['enable-debug'])? esc_attr($input['enable-debug']) : "";
316
- $output['enable-sandbox-testing'] = isset($input['enable-sandbox-testing'])? esc_attr($input['enable-sandbox-testing']) : "";
317
- $output['allow-account-deletion'] = isset($input['allow-account-deletion'])? esc_attr($input['allow-account-deletion']) : "";
318
-
319
- $output['free-membership-id'] = ($input['free-membership-id'] != 1) ? absint($input['free-membership-id']) : '';
320
- $output['login-page-url'] = esc_url($input['login-page-url']);
321
- $output['registration-page-url'] = esc_url($input['registration-page-url']);
322
- $output['profile-page-url'] = esc_url($input['profile-page-url']);
323
- $output['reset-page-url'] = esc_url($input['reset-page-url']);
324
- $output['join-us-page-url'] = esc_url($input['join-us-page-url']);
325
- $output['default-account-status'] = esc_attr($input['default-account-status']);
326
- return $output;
327
- }
328
-
329
- public function sanitize_tab_3($input) {
330
- if (empty($this->settings)){
331
- $this->settings = (array) get_option('swpm-settings');
332
- }
333
- $output = $this->settings;
334
- $output['reg-complete-mail-subject'] = sanitize_text_field($input['reg-complete-mail-subject']);
335
- $output['reg-complete-mail-body'] = wp_kses_data(force_balance_tags($input['reg-complete-mail-body']));
336
-
337
- $output['upgrade-complete-mail-subject'] = sanitize_text_field($input['upgrade-complete-mail-subject']);
338
- $output['upgrade-complete-mail-body'] = wp_kses_data(force_balance_tags($input['upgrade-complete-mail-body']));
339
-
340
- $output['reg-prompt-complete-mail-subject'] = sanitize_text_field($input['reg-prompt-complete-mail-subject']);
341
- $output['reg-prompt-complete-mail-body'] = wp_kses_data(force_balance_tags($input['reg-prompt-complete-mail-body']));
342
- $output['email-from'] = trim($input['email-from']);
343
- $output['enable-admin-notification-after-reg'] = isset($input['enable-admin-notification-after-reg'])? esc_attr($input['enable-admin-notification-after-reg']) : "";
344
- $output['enable-notification-after-manual-user-add'] = isset($input['enable-notification-after-manual-user-add'])? esc_attr($input['enable-notification-after-manual-user-add']) : "";
345
-
346
- return $output;
347
- }
348
-
349
- public function sanitize_tab_5($input){
350
- if (empty($this->settings)){
351
- $this->settings = (array) get_option('swpm-settings');
352
- }
353
- $output = $this->settings;
354
- $output['enable-expired-account-login'] = isset($input['enable-expired-account-login'])? esc_attr($input['enable-expired-account-login']) : "";
355
-
356
- return $output;
357
- }
358
- public function get_value($key, $default = "") {
359
- if (isset($this->settings[$key])){
360
- return $this->settings[$key];
361
- }
362
- return $default;
363
- }
364
-
365
- public function set_value($key, $value) {
366
- $this->settings[$key] = $value;
367
- return $this;
368
- }
369
-
370
- public function save() {
371
- update_option('swpm-settings', $this->settings);
372
- }
373
-
374
- public function draw_tabs() {
375
- $current = $this->current_tab;
376
- ?>
377
- <h3 class="nav-tab-wrapper">
378
- <?php foreach ($this->tabs as $id=>$label):?>
379
- <a class="nav-tab <?php echo ($current == $id) ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_settings&tab=<?php echo $id?>"><?php echo $label?></a>
380
- <?php endforeach;?>
381
- </h3>
382
- <?php
383
- }
384
-
385
- public function get_login_link() {
386
- $login = $this->get_value('login-page-url');
387
- $joinus = $this->get_value('join-us-page-url');
388
- if (empty ($login) || empty($joinus)){
389
- return '<span style="color:red;">Simple Membership is not configured correctly.'
390
- . 'Please contact <a href="mailto:' . get_option('admin_email'). '">Admin</a>';
391
- }
392
- return BUtils::_('Please'). ' <a class="swpm-login-link" href="' . $login . '">' . BUtils::_('Login') . '</a>. '. BUtils::_('Not a Member?').' <a href="' . $joinus . '">'.BUtils::_('Join Us').'</a>';
393
- }
394
-
395
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bTransactions.php DELETED
@@ -1,55 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * Provides some helpful functions to deal with the transactions
5
- */
6
-
7
- class BTransactions {
8
-
9
- static function save_txn_record($ipn_data, $items = array()) {
10
- global $wpdb;
11
-
12
- $current_date = date("Y-m-d");
13
- $custom_var = BTransactions::parse_custom_var($ipn_data['custom']);
14
-
15
- $txn_data = array();
16
- $txn_data['email'] = $ipn_data['payer_email'];
17
- $txn_data['first_name'] = $ipn_data['first_name'];
18
- $txn_data['last_name'] = $ipn_data['last_name'];
19
- $txn_data['last_name'] = $ipn_data['last_name'];
20
- $txn_data['ip_address'] = $ipn_data['ip'];
21
- $txn_data['member_id'] = $ipn_data['swpm_id'];
22
- $txn_data['membership_level'] = $custom_var['subsc_ref'];
23
-
24
- $txn_data['txn_date'] = $current_date;
25
- $txn_data['txn_id'] = $ipn_data['txn_id'];
26
- $txn_data['subscr_id'] = $ipn_data['subscr_id'];
27
- $txn_data['reference'] = $custom_var['reference'];
28
- $txn_data['payment_amount'] = $ipn_data['mc_gross'];
29
- $txn_data['gateway'] = $ipn_data['gateway'];
30
- $txn_data['status'] = $ipn_data['status'];
31
-
32
- $wpdb->insert($wpdb->prefix . "swpm_payments_tbl", $txn_data);
33
-
34
- }
35
-
36
- static function parse_custom_var($custom) {
37
- $delimiter = "&";
38
- $customvariables = array();
39
-
40
- $namevaluecombos = explode($delimiter, $custom);
41
- foreach ($namevaluecombos as $keyval_unparsed) {
42
- $equalsignposition = strpos($keyval_unparsed, '=');
43
- if ($equalsignposition === false) {
44
- $customvariables[$keyval_unparsed] = '';
45
- continue;
46
- }
47
- $key = substr($keyval_unparsed, 0, $equalsignposition);
48
- $value = substr($keyval_unparsed, $equalsignposition + 1);
49
- $customvariables[$key] = $value;
50
- }
51
-
52
- return $customvariables;
53
- }
54
-
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bTransfer.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
-
3
- class BTransfer {
4
-
5
- public static $default_fields = array(
6
- 'first_name' => '', 'last_name' => '',
7
- 'user_name' => '', 'email' => '',
8
- 'password' => '',
9
- 'phone' => '', 'account_state' => '',
10
- 'member_since' => '', 'subscription_starts' => '',
11
- 'address_street' => '', 'address_city' => '',
12
- 'address_state' => '', 'address_zipcode' => '',
13
- 'company_name' => '', 'country' => '',
14
- 'gender' => 'not specified',
15
- 'membership_level' => '2');
16
- public static $default_level_fields = array(
17
- 'alias' => '', 'role' => '',
18
- 'subscription_period' => '', 'subscription_duration_type' => BMembershipLevel::NO_EXPIRY);
19
- public static $admin_messages = array();
20
- private static $_this;
21
- private $message;
22
-
23
- private function __contruct() {
24
- $this->message = get_option('swpm-messages');
25
- }
26
-
27
- public static function get_instance() {
28
- self::$_this = empty(self::$_this) ? new BTransfer() : self::$_this;
29
- self::$_this->message = get_option('swpm-messages');
30
- return self::$_this;
31
- }
32
-
33
- public function get($key) {
34
- $sesion_key = $_COOKIE['swpm_session'];
35
- $m = '';
36
- if (isset($this->message[$sesion_key])){
37
- $m = $this->message[$sesion_key]->get($key);
38
- }
39
- update_option('swpm-messages', $this->message);
40
- return $m;
41
- }
42
-
43
- public function set($key, $value) {
44
- $sesion_key = $_COOKIE['swpm_session'];
45
- if (!isset($this->message[$sesion_key])){
46
- $this->message[$sesion_key] = new BMessages();
47
- }
48
- $this->message[$sesion_key]->set($key,$value);
49
- update_option('swpm-messages', $this->message);
50
- }
51
-
52
- public static function get_real_ip_addr() {
53
- if (!empty($_SERVER['HTTP_CLIENT_IP'])){
54
- $ip = $_SERVER['HTTP_CLIENT_IP'];
55
- }
56
- else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
57
- $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
58
- }
59
- else{
60
- $ip = $_SERVER['REMOTE_ADDR'];
61
- }
62
- return $ip;
63
- }
64
-
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.bUtils.php DELETED
@@ -1,385 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * BUtils
5
- *
6
- * @author nur
7
- */
8
- abstract class BUtils {
9
-
10
- public static function is_ajax() {
11
- return defined('DOING_AJAX') && DOING_AJAX;
12
- }
13
-
14
- public static function subscription_type_dropdown($selected) {
15
- return '<option ' . (($selected == BMembershipLevel::NO_EXPIRY) ? 'selected="selected"' : "") . ' value="' . BMembershipLevel::NO_EXPIRY . '">No Expiry</option>' .
16
- '<option ' . (($selected == BMembershipLevel::DAYS) ? 'selected="selected"' : "") . ' value="' . BMembershipLevel::DAYS . '">Day(s)</option>' .
17
- '<option ' . (($selected == BMembershipLevel::WEEKS) ? 'selected="selected"' : "") . ' value="' . BMembershipLevel::WEEKS . '">Week(s)</option>' .
18
- '<option ' . (($selected == BMembershipLevel::MONTHS) ? 'selected="selected"' : "") . ' value="' . BMembershipLevel::MONTHS . '">Month(s)</option>' .
19
- '<option ' . (($selected == BMembershipLevel::YEARS) ? 'selected="selected"' : "") . ' value="' . BMembershipLevel::YEARS . '">Year(s)</option>' .
20
- '<option ' . (($selected == BMembershipLevel::FIXED_DATE) ? 'selected="selected"' : "") . ' value="' . BMembershipLevel::FIXED_DATE . '">Fixed Date</option>';
21
- }
22
-
23
- // $subscript_period must be integer.
24
- public static function calculate_subscription_period_days($subcript_period, $subscription_duration_type) {
25
- if ($subscription_duration_type == BMembershipLevel::NO_EXPIRY) {
26
- return 'noexpire';
27
- }
28
- if (!is_numeric($subcript_period)) {
29
- throw new Exception(" subcript_period parameter must be integer in BUtils::calculate_subscription_period_days method");
30
- }
31
- switch (strtolower($subscription_duration_type)) {
32
- case BMembershipLevel::DAYS:
33
- break;
34
- case BMembershipLevel::WEEKS:
35
- $subcript_period = $subcript_period * 7;
36
- break;
37
- case BMembershipLevel::MONTHS:
38
- $subcript_period = $subcript_period * 30;
39
- break;
40
- case BMembershipLevel::YEARS:
41
- $subcript_period = $subcript_period * 365;
42
- break;
43
- }
44
- return $subcript_period;
45
- }
46
-
47
- public static function get_expiration_timestamp($user) {
48
- $permission = BPermission::get_instance($user->membership_level);
49
- if (BMembershipLevel::FIXED_DATE == $permission->get('subscription_duration_type')) {
50
- return strtotime($permission->get('subscription_period'));
51
- }
52
- $days = self::calculate_subscription_period_days(
53
- $permission->get('subscription_period'), $permission->get('subscription_duration_type'));
54
- if ($days == 'noexpire') {
55
- return PHP_INT_MAX; // which is equivalent to
56
- }
57
- return strtotime($user->subscription_starts . ' ' . $days . ' days');
58
- }
59
-
60
- public static function is_subscription_expired($user) {
61
- $expiration_timestamp = BUtils::get_expiration_timestamp($user);
62
- return $expiration_timestamp < time();
63
- }
64
-
65
- public static function gender_dropdown($selected = 'not specified') {
66
- return '<option ' . ((strtolower($selected) == 'male') ? 'selected="selected"' : "") . ' value="male">Male</option>' .
67
- '<option ' . ((strtolower($selected) == 'female') ? 'selected="selected"' : "") . ' value="female">Female</option>' .
68
- '<option ' . ((strtolower($selected) == 'not specified') ? 'selected="selected"' : "") . ' value="not specified">Not Specified</option>';
69
- }
70
-
71
- public static function get_account_state_options() {
72
- return array('active' => BUtils::_('Active'),
73
- 'inactive' => BUtils::_('Inactive'),
74
- 'pending' => BUtils::_('Pending'),
75
- 'expired' => BUtils::_('Expired'),);
76
- }
77
-
78
- public static function account_state_dropdown($selected = 'active') {
79
- $options = self::get_account_state_options();
80
- $html = '';
81
- foreach ($options as $key => $value) {
82
- $html .= '<option ' . ((strtolower($selected) == $key) ? 'selected="selected"' : "") . ' value="' . $key . '"> ' . $value . '</option>';
83
- }
84
- return $html;
85
- }
86
-
87
- public static function membership_level_dropdown($selected = 0) {
88
- $options = '';
89
- global $wpdb;
90
- $query = "SELECT alias, id FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id != 1";
91
- $levels = $wpdb->get_results($query);
92
- foreach ($levels as $level) {
93
- $options .= '<option ' . ($selected == $level->id ? 'selected="selected"' : '') . ' value="' . $level->id . '" >' . $level->alias . '</option>';
94
- }
95
- return $options;
96
- }
97
-
98
- public static function get_all_membership_level_ids() {
99
- global $wpdb;
100
- $query = "SELECT id FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id != 1";
101
- return $wpdb->get_col($query);
102
- }
103
-
104
- public static function get_user_by_id($swpm_id) {
105
- global $wpdb;
106
- $query = $wpdb->prepare("SELECT user_name FROM {$wpdb->prefix}swpm_members_tbl WHERE member_id = %d", $swpm_id);
107
- return $wpdb->get_var($query);
108
- }
109
-
110
- public static function get_user_by_user_name($swpm_user_name) {
111
- global $wpdb;
112
- $query = $wpdb->prepare("SELECT member_id FROM {$wpdb->prefix}swpm_members_tbl WHERE user_name = %s", $swpm_user_name);
113
- return $wpdb->get_var($query);
114
- }
115
-
116
- public static function get_registration_link($for = 'all', $send_email = false, $member_id = '') {
117
- $members = array();
118
- global $wpdb;
119
- switch ($for) {
120
- case 'one':
121
- if (empty($member_id)) {
122
- return array();
123
- }
124
- $query = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE member_id = %d", $member_id);
125
- $members = $wpdb->get_results($query);
126
- break;
127
- case 'all':
128
- $query = "SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE reg_code != '' ";
129
- $members = $wpdb->get_results($query);
130
- break;
131
- }
132
- $settings = BSettings::get_instance();
133
- $separator = '?';
134
- $url = $settings->get_value('registration-page-url');
135
- if (strpos($url, '?') !== false) {
136
- $separator = '&';
137
- }
138
- $subject = $settings->get_value('reg-complete-mail-subject');
139
- if (empty($subject)) {
140
- $subject = "Please complete your registration";
141
- }
142
- $body = $settings->get_value('reg-complete-mail-body');
143
- if (empty($body)) {
144
- $body = "Please use the following link to complete your registration. \n {reg_link}";
145
- }
146
- $from_address = $settings->get_value('email-from');
147
- $links = array();
148
- foreach ($members as $member) {
149
- $reg_url = $url . $separator . 'member_id=' . $member->member_id . '&code=' . $member->reg_code;
150
- if (!empty($send_email) && empty($member->user_name)) {
151
- $tags = array("{first_name}", "{last_name}", "{reg_link}");
152
- $vals = array($member->first_name, $member->last_name, $reg_url);
153
- $email_body = str_replace($tags, $vals, $body);
154
- $headers = 'From: ' . $from_address . "\r\n";
155
- wp_mail($member->email, $subject, $email_body, $headers);
156
- }
157
- $links[] = $reg_url;
158
- }
159
- return $links;
160
- }
161
-
162
- public static function update_wp_user_Role($wp_user_id, $role) {
163
- $preserve_role = 'yes';
164
- if ($preserve_role) {
165
- return;
166
- }
167
- if (self::is_multisite_install()) {//MS install
168
- return; //TODO - don't do this for MS install
169
- }
170
- $caps = get_user_meta($wp_user_id, 'wp_capabilities', true);
171
- if (in_array('administrator', array_keys((array) $caps))) {
172
- return;
173
- }
174
- do_action('set_user_role', $wp_user_id, $role); //Fire the action for other plugin(s)
175
- wp_update_user(array('ID' => $wp_user_id, 'role' => $role));
176
- $roles = new WP_Roles();
177
- $level = $roles->roles[$role]['capabilities'];
178
- if (isset($level['level_10']) && $level['level_10']) {
179
- update_user_meta($wp_user_id, 'wp_user_level', 10);
180
- return;
181
- }
182
- if (isset($level['level_9']) && $level['level_9']) {
183
- update_user_meta($wp_user_id, 'wp_user_level', 9);
184
- return;
185
- }
186
- if (isset($level['level_8']) && $level['level_8']) {
187
- update_user_meta($wp_user_id, 'wp_user_level', 8);
188
- return;
189
- }
190
- if (isset($level['level_7']) && $level['level_7']) {
191
- update_user_meta($wp_user_id, 'wp_user_level', 7);
192
- return;
193
- }
194
- if (isset($level['level_6']) && $level['level_6']) {
195
- update_user_meta($wp_user_id, 'wp_user_level', 6);
196
- return;
197
- }
198
- if (isset($level['level_5']) && $level['level_5']) {
199
- update_user_meta($wp_user_id, 'wp_user_level', 5);
200
- return;
201
- }
202
- if (isset($level['level_4']) && $level['level_4']) {
203
- update_user_meta($wp_user_id, 'wp_user_level', 4);
204
- return;
205
- }
206
- if (isset($level['level_3']) && $level['level_3']) {
207
- update_user_meta($wp_user_id, 'wp_user_level', 3);
208
- return;
209
- }
210
- if (isset($level['level_2']) && $level['level_2']) {
211
- update_user_meta($wp_user_id, 'wp_user_level', 2);
212
- return;
213
- }
214
- if (isset($level['level_1']) && $level['level_1']) {
215
- update_user_meta($wp_user_id, 'wp_user_level', 1);
216
- return;
217
- }
218
- if (isset($level['level_0']) && $level['level_0']) {
219
- update_user_meta($wp_user_id, 'wp_user_level', 0);
220
- return;
221
- }
222
- }
223
-
224
- public static function update_wp_user($wp_user_name, $swpm_data) {
225
- $wp_user_info = array();
226
- if (isset($swpm_data['email'])) {
227
- $wp_user_info['user_email'] = $swpm_data['email'];
228
- }
229
- if (isset($swpm_data['first_name'])) {
230
- $wp_user_info['first_name'] = $swpm_data['first_name'];
231
- }
232
- if (isset($swpm_data['last_name'])) {
233
- $wp_user_info['last_name'] = $swpm_data['last_name'];
234
- }
235
- if (isset($swpm_data['plain_password'])) {
236
- $wp_user_info['user_pass'] = $swpm_data['plain_password'];
237
- }
238
-
239
- $wp_user = get_user_by('login', $wp_user_name);
240
-
241
- if ($wp_user) {
242
- $wp_user_info['ID'] = $wp_user->ID;
243
- return wp_update_user($wp_user_info);
244
- }
245
- return false;
246
- }
247
-
248
- public static function create_wp_user($wp_user_data) {
249
- if (self::is_multisite_install()) {//MS install
250
- global $blog_id;
251
- if ($wp_user_id = email_exists($wp_user_data['user_email'])) {// if user exists then just add him to current blog.
252
- add_existing_user_to_blog(array('user_id' => $wp_user_id, 'role' => 'subscriber'));
253
- return $wp_user_id;
254
- }
255
- $wp_user_id = wpmu_create_user($wp_user_data['user_login'], $wp_user_data['password'], $wp_user_data['user_email']);
256
- $role = 'subscriber'; //TODO - add user as a subscriber first. The subsequent update user role function to update the role to the correct one
257
- add_user_to_blog($blog_id, $wp_user_id, $role);
258
- } else {//Single site install
259
- $wp_user_id = email_exists($wp_user_data['user_email']);
260
- if ($wp_user_id) {
261
- return $wp_user_id;
262
- }
263
- $wp_user_id = wp_create_user($wp_user_data['user_login'], $wp_user_data['password'], $wp_user_data['user_email']);
264
- }
265
- $wp_user_data['ID'] = $wp_user_id;
266
- wp_update_user($wp_user_data);
267
- $user_info = get_userdata($wp_user_id);
268
- $user_cap = (isset($user_info->wp_capabilities) && is_array($user_info->wp_capabilities)) ? array_keys($user_info->wp_capabilities) : array();
269
- if (!in_array('administrator', $user_cap)) {
270
- BUtils::update_wp_user_Role($wp_user_id, $wp_user_data['role']);
271
- }
272
- return $wp_user_id;
273
- }
274
-
275
- public static function is_multisite_install() {
276
- if (function_exists('is_multisite') && is_multisite()) {
277
- return true;
278
- } else {
279
- return false;
280
- }
281
- }
282
-
283
- public static function _($msg) {
284
- return __($msg, 'swpm');
285
- }
286
-
287
- public static function e($msg) {
288
- _e($msg, 'swpm');
289
- }
290
-
291
- public static function is_admin() {
292
- return current_user_can('manage_options');
293
- }
294
-
295
- public static function get_expire_date($start_date, $subscription_duration, $subscription_duration_type) {
296
- if ($subscription_duration_type == BMembershipLevel::FIXED_DATE) { //will expire after a fixed date.
297
- return date(get_option('date_format'), strtotime($subscription_duration));
298
- }
299
- $expires = self::calculate_subscription_period_days($subscription_duration, $subscription_duration_type);
300
- if ($expires == 'noexpire') {// its set to no expiry until cancelled
301
- return BUtils::_('Never');
302
- }
303
-
304
- return date(get_option('date_format'), strtotime($start_date . ' ' . $expires . ' days'));
305
- }
306
-
307
- public static function swpm_username_exists($user_name) {
308
- global $wpdb;
309
- $member_table = $wpdb->prefix . 'swpm_members_tbl';
310
- $query = $wpdb->prepare('SELECT member_id FROM ' . $member_table . ' WHERE user_name=%s', sanitize_user($user_name));
311
- return $wpdb->get_var($query);
312
- }
313
-
314
- public static function get_free_level() {
315
- $encrypted = filter_input(INPUT_POST, 'level_identifier');
316
- global $wpdb;
317
- if (!empty($encrypted)) {
318
- return BPermission::get_instance($encrypted)->get('id');
319
- }
320
-
321
- $is_free = BSettings::get_instance()->get_value('enable-free-membership');
322
- $free_level = absint(BSettings::get_instance()->get_value('free-membership-id'));
323
-
324
- return ($is_free) ? $free_level : null;
325
- }
326
-
327
- public static function is_paid_registration() {
328
- $member_id = filter_input(INPUT_GET, 'member_id', FILTER_SANITIZE_NUMBER_INT);
329
- $code = filter_input(INPUT_GET, 'code', FILTER_SANITIZE_STRING);
330
- return !empty($member_id) && !empty($code);
331
- }
332
-
333
- public static function get_paid_member_info() {
334
- $member_id = filter_input(INPUT_GET, 'member_id', FILTER_SANITIZE_NUMBER_INT);
335
- $code = filter_input(INPUT_GET, 'code', FILTER_SANITIZE_STRING);
336
- global $wpdb;
337
- if (!empty($member_id) && !empty($code)) {
338
- $query = 'SELECT * FROM ' . $wpdb->prefix . 'swpm_members_tbl WHERE member_id= %d AND reg_code=%s';
339
- $query = $wpdb->prepare($query, $member_id, $code);
340
- return $wpdb->get_row($query);
341
- }
342
- return null;
343
- }
344
-
345
- public static function account_delete_confirmation_ui($msg = "") {
346
- ob_start();
347
- include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/account_delete_warning.php');
348
- ob_get_flush();
349
- wp_die("", "", array('back_link' => true));
350
- }
351
-
352
- public static function delete_account_button() {
353
- $allow_account_deletion = BSettings::get_instance()->get_value('allow-account-deletion');
354
- if (empty($allow_account_deletion)) {
355
- return "";
356
- }
357
-
358
- return '<a href="/?delete_account=1"><div class="swpm-account-delete-button">' . BUtils::_("Delete Account") . '</div></a>';
359
- }
360
-
361
- public static function encrypt_password($plain_password) {
362
- include_once(ABSPATH . WPINC . '/class-phpass.php');
363
- $wp_hasher = new PasswordHash(8, TRUE);
364
- $password_hash = $wp_hasher->HashPassword(trim($plain_password));
365
- return $password_hash;
366
- }
367
-
368
- public static function get_restricted_image_url() {
369
- return SIMPLE_WP_MEMBERSHIP_URL . '/images/restricted-icon.png';
370
- }
371
-
372
- /*
373
- * Checks if the string exists in the array key value of the provided array. If it doesn't exist, it returns the first key element from the valid values.
374
- */
375
-
376
- public static function sanitize_value_by_array($val_to_check, $valid_values) {
377
- $keys = array_keys($valid_values);
378
- $keys = array_map('strtolower', $keys);
379
- if (in_array($val_to_check, $keys)) {
380
- return $val_to_check;
381
- }
382
- return reset($keys); //Return he first element from the valid values
383
- }
384
-
385
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.miscUtils.php DELETED
@@ -1,167 +0,0 @@
1
- <?php
2
-
3
- class miscUtils {
4
-
5
- public static function create_mandatory_wp_pages() {
6
- $settings = BSettings::get_instance();
7
-
8
- //Create join us page
9
- $swpm_join_page_content = '<p style="color:red;font-weight:bold;">This page and the content has been automatically generated for you to give you a basic idea of how a "Join Us" page should look like. You can customize this page however you like it by editing this page from your WordPress page editor.</p>';
10
- $swpm_join_page_content .= '<p style="font-weight:bold;">If you end up changing the URL of this page then make sure to update the URL value in the settings menu of the plugin.</p>';
11
- $swpm_join_page_content .= '<p style="border-top:1px solid #ccc;padding-top:10px;margin-top:10px;"></p>
12
- <strong>Free Membership</strong>
13
- <br />
14
- You get unlimited access to free membership content
15
- <br />
16
- <em><strong>Price: Free!</strong></em>
17
- <br /><br />Link the following image to go to the Registration Page if you want your visitors to be able to create a free membership account<br /><br />
18
- <img title="Join Now" src="' . SIMPLE_WP_MEMBERSHIP_URL . '/images/join-now-button-image.gif" alt="Join Now Button" width="277" height="82" />
19
- <p style="border-bottom:1px solid #ccc;padding-bottom:10px;margin-bottom:10px;"></p>';
20
- $swpm_join_page_content .= '<p><strong>You can register for a Free Membership or pay for one of the following membership options</strong></p>';
21
- $swpm_join_page_content .= '<p style="border-top:1px solid #ccc;padding-top:10px;margin-top:10px;"></p>
22
- [ ==> Insert Payment Button For Your Paid Membership Levels Here <== ]
23
- <p style="border-bottom:1px solid #ccc;padding-bottom:10px;margin-bottom:10px;"></p>';
24
-
25
- $swpm_join_page = array(
26
- 'post_title' => 'Join Us',
27
- 'post_name' => 'membership-join',
28
- 'post_content' => $swpm_join_page_content,
29
- 'post_parent' => 0,
30
- 'post_status' => 'publish',
31
- 'post_type' => 'page',
32
- 'comment_status' => 'closed',
33
- 'ping_status' => 'closed'
34
- );
35
-
36
- $join_page_obj = get_page_by_path('membership-join');
37
- if (!$join_page_obj) {
38
- $join_page_id = wp_insert_post($swpm_join_page);
39
- } else {
40
- $join_page_id = $join_page_obj->ID;
41
- if ($join_page_obj->post_status == 'trash') { //For cases where page may be in trash, bring it out of trash
42
- wp_update_post(array('ID' => $join_page_obj->ID, 'post_status' => 'publish'));
43
- }
44
- }
45
- $swpm_join_page_permalink = get_permalink($join_page_id);
46
- $settings->set_value('join-us-page-url', $swpm_join_page_permalink);
47
-
48
- //Create registration page
49
- $swpm_rego_page = array(
50
- 'post_title' => BUtils::_('Registration'),
51
- 'post_name' => 'membership-registration',
52
- 'post_content' => '[swpm_registration_form]',
53
- 'post_parent' => $join_page_id,
54
- 'post_status' => 'publish',
55
- 'post_type' => 'page',
56
- 'comment_status' => 'closed',
57
- 'ping_status' => 'closed'
58
- );
59
- $rego_page_obj = get_page_by_path('membership-registration');
60
- if (!$rego_page_obj) {
61
- $rego_page_id = wp_insert_post($swpm_rego_page);
62
- } else {
63
- $rego_page_id = $rego_page_obj->ID;
64
- if ($rego_page_obj->post_status == 'trash') { //For cases where page may be in trash, bring it out of trash
65
- wp_update_post(array('ID' => $rego_page_obj->ID, 'post_status' => 'publish'));
66
- }
67
- }
68
- $swpm_rego_page_permalink = get_permalink($rego_page_id);
69
- $settings->set_value('registration-page-url', $swpm_rego_page_permalink);
70
-
71
- //Create login page
72
- $swpm_login_page = array(
73
- 'post_title' => BUtils::_('Member Login'),
74
- 'post_name' => 'membership-login',
75
- 'post_content' => '[swpm_login_form]',
76
- 'post_parent' => 0,
77
- 'post_status' => 'publish',
78
- 'post_type' => 'page',
79
- 'comment_status' => 'closed',
80
- 'ping_status' => 'closed'
81
- );
82
- $login_page_obj = get_page_by_path('membership-login');
83
- if (!$login_page_obj) {
84
- $login_page_id = wp_insert_post($swpm_login_page);
85
- } else {
86
- $login_page_id = $login_page_obj->ID;
87
- if ($login_page_obj->post_status == 'trash') { //For cases where page may be in trash, bring it out of trash
88
- wp_update_post(array('ID' => $login_page_obj->ID, 'post_status' => 'publish'));
89
- }
90
- }
91
- $swpm_login_page_permalink = get_permalink($login_page_id);
92
- $settings->set_value('login-page-url', $swpm_login_page_permalink);
93
-
94
- //Create profile page
95
- $swpm_profile_page = array(
96
- 'post_title' => BUtils::_('Profile'),
97
- 'post_name' => 'membership-profile',
98
- 'post_content' => '[swpm_profile_form]',
99
- 'post_parent' => $login_page_id,
100
- 'post_status' => 'publish',
101
- 'post_type' => 'page',
102
- 'comment_status' => 'closed',
103
- 'ping_status' => 'closed'
104
- );
105
- $profile_page_obj = get_page_by_path('membership-profile');
106
- if (!$profile_page_obj) {
107
- $profile_page_id = wp_insert_post($swpm_profile_page);
108
- } else {
109
- $profile_page_id = $profile_page_obj->ID;
110
- if ($profile_page_obj->post_status == 'trash') { //For cases where page may be in trash, bring it out of trash
111
- wp_update_post(array('ID' => $profile_page_obj->ID, 'post_status' => 'publish'));
112
- }
113
- }
114
- $swpm_profile_page_permalink = get_permalink($profile_page_id);
115
- $settings->set_value('profile-page-url', $swpm_profile_page_permalink);
116
-
117
- //Create reset page
118
- $swpm_reset_page = array(
119
- 'post_title' => BUtils::_('Password Reset'),
120
- 'post_name' => 'password-reset',
121
- 'post_content' => '[swpm_reset_form]',
122
- 'post_parent' => $login_page_id,
123
- 'post_status' => 'publish',
124
- 'post_type' => 'page',
125
- 'comment_status' => 'closed',
126
- 'ping_status' => 'closed'
127
- );
128
- $reset_page_obj = get_page_by_path('password-reset');
129
- if (!$profile_page_obj) {
130
- $reset_page_id = wp_insert_post($swpm_reset_page);
131
- } else {
132
- $reset_page_id = $reset_page_obj->ID;
133
- if ($reset_page_obj->post_status == 'trash') { //For cases where page may be in trash, bring it out of trash
134
- wp_update_post(array('ID' => $reset_page_obj->ID, 'post_status' => 'publish'));
135
- }
136
- }
137
- $swpm_reset_page_permalink = get_permalink($reset_page_id);
138
- $settings->set_value('reset-page-url', $swpm_reset_page_permalink);
139
-
140
- $settings->save(); //Save all settings object changes
141
- }
142
-
143
- public static function reset_swmp_log_files() {
144
- $log_reset = true;
145
- $logfile_list = array(
146
- SIMPLE_WP_MEMBERSHIP_PATH.'/log.txt',
147
- );
148
-
149
- foreach ($logfile_list as $logfile) {
150
- if (empty($logfile)) {
151
- continue;
152
- }
153
-
154
- $text = '[' . date('m/d/Y g:i A') . '] - SUCCESS : Log file reset';
155
- $text .= "\n------------------------------------------------------------------\n\n";
156
- $fp = fopen($logfile, 'w');
157
- if ($fp != FALSE) {
158
- @fwrite($fp, $text);
159
- @fclose($fp);
160
- } else {
161
- $log_reset = false;
162
- }
163
- }
164
- return $log_reset;
165
- }
166
-
167
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.simple-wp-membership.php CHANGED
@@ -487,92 +487,45 @@ class SimpleWpMembership {
487
  public function menu() {
488
  $menu_parent_slug = 'simple_wp_membership';
489
 
490
- add_menu_page(__("WP Membership", 'swpm'), __("WP Membership", 'swpm'), 'manage_options', $menu_parent_slug, array(&$this, "admin_members"), 'dashicons-id');
491
- add_submenu_page($menu_parent_slug, __("Members", 'swpm'), __('Members', 'swpm'), 'manage_options', 'simple_wp_membership', array(&$this, "admin_members"));
492
- add_submenu_page($menu_parent_slug, __("Membership Levels", 'swpm'), __("Membership Levels", 'swpm'), 'manage_options', 'simple_wp_membership_levels', array(&$this, "admin_membership_levels"));
493
- add_submenu_page($menu_parent_slug, __("Settings", 'swpm'), __("Settings", 'swpm'), 'manage_options', 'simple_wp_membership_settings', array(&$this, "admin_settings"));
494
- add_submenu_page($menu_parent_slug, __("Payments", 'swpm'), __("Payments", 'swpm'), 'manage_options', 'simple_wp_membership_payments', array(&$this, "payments_menu"));
495
- add_submenu_page($menu_parent_slug, __("Add-ons", 'swpm'), __("Add-ons", 'swpm'), 'manage_options', 'simple_wp_membership_addons', array(&$this, "add_ons_menu"));
496
 
497
  do_action('swpm_after_main_admin_menu', $menu_parent_slug);
498
 
499
  $this->meta_box();
500
  }
501
 
502
- public function admin_membership_levels() {
503
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/class.swpm-membership-levels.php');
504
- $levels = new SwpmMembershipLevels();
505
- $level_action = filter_input(INPUT_GET, 'level_action');
506
- $action2 = filter_input(INPUT_GET, 'action2');
507
- $action = $level_action ? $level_action : ($action2 ? $action2 : "");
508
- switch ($action) {
509
- case 'add':
510
- case 'edit':
511
- $levels->process_form_request();
512
- break;
513
- case 'manage':
514
- $levels->manage();
515
- break;
516
- case 'category_list':
517
- $levels->manage_categroy();
518
- break;
519
- case 'delete':
520
- $levels->delete();
521
- default:
522
- $levels->show();
523
- break;
524
- }
525
- }
526
-
527
- public function admin_members() {
528
  include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/class.swpm-members.php');
529
  $members = new SwpmMembers();
530
- $action = filter_input(INPUT_GET, 'member_action');
531
- $action = empty($action) ? filter_input(INPUT_POST, 'action') : $action;
532
- $output = '';
533
- switch ($action) {
534
- case 'add':
535
- case 'edit':
536
- $members->process_form_request();
537
- break;
538
- default:
539
- $output = apply_filters('swpm_admin_member_menu_details_hook', '', $action);
540
- if (empty($output)) {
541
- $output = $members->show();
542
- }
543
- $selected = $action;
544
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_members.php');
545
- break;
546
- }
547
  }
548
 
549
- public function admin_settings() {
550
- $current_tab = SwpmSettings::get_instance()->current_tab;
551
- switch ($current_tab) {
552
- case 6:
553
- include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_addon_settings.php');
554
- break;
555
- case 4:
556
- $link_for = filter_input(INPUT_POST, 'swpm_link_for', FILTER_SANITIZE_STRING);
557
- $member_id = filter_input(INPUT_POST, 'member_id', FILTER_SANITIZE_NUMBER_INT);
558
- $send_email = filter_input(INPUT_POST, 'swpm_reminder_email', FILTER_SANITIZE_NUMBER_INT);
559
- $links = SwpmUtils::get_registration_link($link_for, $send_email, $member_id);
560
- include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_tools_settings.php');
561
- break;
562
- case 2:
563
- include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/payments/admin_payment_settings.php');
564
- break;
565
- default:
566
- include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_settings.php');
567
- break;
568
- }
569
  }
570
 
571
- public function payments_menu() {
572
- include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/payments/admin_payments_page.php');
 
 
573
  }
574
 
575
- public function add_ons_menu() {
576
  include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_add_ons_page.php');
577
  }
578
 
487
  public function menu() {
488
  $menu_parent_slug = 'simple_wp_membership';
489
 
490
+ add_menu_page(__("WP Membership", 'swpm'), __("WP Membership", 'swpm'), 'manage_options', $menu_parent_slug, array(&$this, "admin_members_menu"), 'dashicons-id');
491
+ add_submenu_page($menu_parent_slug, __("Members", 'swpm'), __('Members', 'swpm'), 'manage_options', 'simple_wp_membership', array(&$this, "admin_members_menu"));
492
+ add_submenu_page($menu_parent_slug, __("Membership Levels", 'swpm'), __("Membership Levels", 'swpm'), 'manage_options', 'simple_wp_membership_levels', array(&$this, "admin_membership_levels_menu"));
493
+ add_submenu_page($menu_parent_slug, __("Settings", 'swpm'), __("Settings", 'swpm'), 'manage_options', 'simple_wp_membership_settings', array(&$this, "admin_settings_menu"));
494
+ add_submenu_page($menu_parent_slug, __("Payments", 'swpm'), __("Payments", 'swpm'), 'manage_options', 'simple_wp_membership_payments', array(&$this, "admin_payments_menu"));
495
+ add_submenu_page($menu_parent_slug, __("Add-ons", 'swpm'), __("Add-ons", 'swpm'), 'manage_options', 'simple_wp_membership_addons', array(&$this, "admin_add_ons_menu"));
496
 
497
  do_action('swpm_after_main_admin_menu', $menu_parent_slug);
498
 
499
  $this->meta_box();
500
  }
501
 
502
+ /* Render the members menu in admin dashboard */
503
+ public function admin_members_menu() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/class.swpm-members.php');
505
  $members = new SwpmMembers();
506
+ $members->handle_main_members_admin_menu();
507
+ }
508
+
509
+ /* Render the membership levels menu in admin dashboard */
510
+ public function admin_membership_levels_menu() {
511
+ include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/class.swpm-membership-levels.php');
512
+ $levels = new SwpmMembershipLevels();
513
+ $levels->handle_main_membership_level_admin_menu();
 
 
 
 
 
 
 
 
 
514
  }
515
 
516
+ /* Render the settings menu in admin dashboard */
517
+ public function admin_settings_menu() {
518
+ $settings = SwpmSettings::get_instance();
519
+ $settings->handle_main_settings_admin_menu();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
520
  }
521
 
522
+ public function admin_payments_menu() {
523
+ include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/admin-includes/class.swpm-payments-admin-menu.php');
524
+ $payments_admin = new SwpmPaymentsAdminMenu();
525
+ $payments_admin->handle_main_payments_admin_menu();
526
  }
527
 
528
+ public function admin_add_ons_menu() {
529
  include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_add_ons_page.php');
530
  }
531
 
classes/class.swpm-front-registration.php CHANGED
@@ -13,11 +13,14 @@ class SwpmFrontRegistration extends SwpmRegistration {
13
  }
14
 
15
  public function regigstration_ui($level) {
16
- $form = apply_filters('swpm_registration_form_override', '', $level);
 
 
17
  if (!empty($form)) {
 
18
  return $form;
19
  }
20
-
21
  $settings_configs = SwpmSettings::get_instance();
22
  $joinuspage_url = $settings_configs->get_value('join-us-page-url');
23
  $membership_level = '';
@@ -31,25 +34,28 @@ class SwpmFrontRegistration extends SwpmRegistration {
31
  } else {
32
  $membership_level = $member->membership_level;
33
  }
34
- } else if (!empty($level)) {
 
35
  $member = SwpmTransfer::$default_fields;
36
  $membership_level = absint($level);
37
  }
 
 
38
  if (empty($membership_level)) {
39
  $joinuspage_link = '<a href="' . $joinuspage_url . '">Join us</a>';
40
- echo '<p>';
41
- SwpmUtils::e('Free membership is disabled on this site. Please make a payment from the ' . $joinuspage_link . ' page to pay for a premium membership.');
42
- echo '</p><p>';
43
- SwpmUtils::e('You will receive a unique link via email after the payment. You will be able to use that link to complete the premium membership registration.');
44
- echo '</p>';
45
- return;
46
  }
47
 
48
-
49
  $mebership_info = SwpmPermission::get_instance($membership_level);
50
  $membership_level = $mebership_info->get('id');
51
  if (empty($membership_level)) {
52
- return "Membership Level Not Found.";
53
  }
54
  $level_identifier = md5($membership_level);
55
  $membership_level_alias = $mebership_info->get('alias');
13
  }
14
 
15
  public function regigstration_ui($level) {
16
+
17
+ //Trigger the filter to override the registration form (the form builder addon uses this filter)
18
+ $form = apply_filters('swpm_registration_form_override', '', $level);//The $level value could be empty also so the code handling the filter need to check for it.
19
  if (!empty($form)) {
20
+ //An addon has overridden the registration form. So use that one.
21
  return $form;
22
  }
23
+
24
  $settings_configs = SwpmSettings::get_instance();
25
  $joinuspage_url = $settings_configs->get_value('join-us-page-url');
26
  $membership_level = '';
34
  } else {
35
  $membership_level = $member->membership_level;
36
  }
37
+ } else if (!empty($level)) {
38
+ //Membership level is specified in the shortcode (level specific registration form).
39
  $member = SwpmTransfer::$default_fields;
40
  $membership_level = absint($level);
41
  }
42
+
43
+ //Check if free membership registration is disalbed on the site
44
  if (empty($membership_level)) {
45
  $joinuspage_link = '<a href="' . $joinuspage_url . '">Join us</a>';
46
+ $free_rego_disabled_msg = '<p>';
47
+ $free_rego_disabled_msg .= SwpmUtils::_('Free membership is disabled on this site. Please make a payment from the ' . $joinuspage_link . ' page to pay for a premium membership.');
48
+ $free_rego_disabled_msg .= '</p><p>';
49
+ $free_rego_disabled_msg .= SwpmUtils::_('You will receive a unique link via email after the payment. You will be able to use that link to complete the premium membership registration.');
50
+ $free_rego_disabled_msg .= '</p>';
51
+ return $free_rego_disabled_msg;
52
  }
53
 
54
+ //Handle the registration form in core plugin
55
  $mebership_info = SwpmPermission::get_instance($membership_level);
56
  $membership_level = $mebership_info->get('id');
57
  if (empty($membership_level)) {
58
+ return "Error! Failed to retrieve membership level ID from the membership info object.";
59
  }
60
  $level_identifier = md5($membership_level);
61
  $membership_level_alias = $mebership_info->get('alias');
classes/class.swpm-members.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
 
3
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/common/class.swpm-list-table.php');
 
 
4
 
5
  class SwpmMembers extends WP_List_Table {
6
 
@@ -364,4 +366,77 @@ class SwpmMembers extends WP_List_Table {
364
  return false;
365
  }
366
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
367
  }
1
  <?php
2
 
3
+ if (!class_exists('WP_List_Table')){
4
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
5
+ }
6
 
7
  class SwpmMembers extends WP_List_Table {
8
 
366
  return false;
367
  }
368
 
369
+ function handle_main_members_admin_menu()
370
+ {
371
+ do_action( 'swpm_members_menu_start' );
372
+
373
+ $action = filter_input(INPUT_GET, 'member_action');
374
+ $action = empty($action) ? filter_input(INPUT_POST, 'action') : $action;
375
+ $selected = $action;
376
+
377
+ ?>
378
+ <div class="wrap swpm-admin-menu-wrap"><!-- start wrap -->
379
+
380
+ <h1><?php echo SwpmUtils::_('Simple WP Membership::Members') ?><!-- page title -->
381
+ <a href="admin.php?page=simple_wp_membership&member_action=add" class="add-new-h2"><?php echo SwpmUtils::_('Add New'); ?></a>
382
+ </h1>
383
+
384
+ <h2 class="nav-tab-wrapper swpm-members-nav-tab-wrapper"><!-- start nav menu tabs -->
385
+ <a class="nav-tab <?php echo ($selected == "") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership"><?php echo SwpmUtils::_('Members') ?></a>
386
+ <a class="nav-tab <?php echo ($selected == "add") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership&member_action=add"><?php echo SwpmUtils::_('Add Member') ?></a>
387
+ <?php
388
+ if ($selected == 'edit') {//Only show the "edit member" tab when a member profile is being edited from the admin side.
389
+ echo '<a class="nav-tab nav-tab-active" href="#">Edit Member</a>';
390
+ }
391
+
392
+ //Trigger hooks that allows an extension to add extra nav tabs in the members menu.
393
+ do_action ('swpm_members_menu_nav_tabs', $selected);
394
+
395
+ $menu_tabs = apply_filters('swpm_members_additional_menu_tabs_array', array());
396
+ foreach ($menu_tabs as $member_action => $title){
397
+ ?>
398
+ <a class="nav-tab <?php echo ($selected == $member_action) ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership&member_action=<?php echo $member_action; ?>" ><?php SwpmUtils::e($title); ?></a>
399
+ <?php
400
+ }
401
+
402
+ ?>
403
+ </h2><!-- end nav menu tabs -->
404
+ <?php
405
+
406
+ do_action( 'swpm_members_menu_after_nav_tabs' );
407
+
408
+ //Trigger hook so anyone listening for this particular action can handle the output.
409
+ do_action( 'swpm_members_menu_body_' . $action );
410
+
411
+ //Allows an addon to completely override the body section of the members admin menu for a given action.
412
+ $output = apply_filters('swpm_members_menu_body_override', '', $action);
413
+ if (!empty($output)) {
414
+ //An addon has overriden the body of this page for the given action. So no need to do anything in core.
415
+ echo $output;
416
+ echo '</div>';//<!-- end of wrap -->
417
+ return;
418
+ }
419
+
420
+ //Switch case for the various different actions handled by the core plugin.
421
+ switch ($action) {
422
+ case 'members_list':
423
+ //Show the members listing
424
+ echo $this->show();
425
+ break;
426
+ case 'add':
427
+ //Process member profile add
428
+ $this->process_form_request();
429
+ break;
430
+ case 'edit':
431
+ //Process member profile edit
432
+ $this->process_form_request();
433
+ break;
434
+ default:
435
+ //Show the members listing page by default.
436
+ echo $this->show();
437
+ break;
438
+ }
439
+
440
+ echo '</div>';//<!-- end of wrap -->
441
+ }
442
  }
classes/class.swpm-membership-level.php CHANGED
@@ -54,7 +54,7 @@ class SwpmMembershipLevel {
54
  //@todo meta table and collect all relevant info and pass as argument
55
  $custom = apply_filters('swpm_admin_edit_membership_level', array(), $id);
56
  $this->save_custom_fields($id, $custom);
57
- $message = array('succeeded' => true, 'message' => '<p>'. SwpmUtils::_('Updated Successfully.') . '</p>');
58
  SwpmTransfer::get_instance()->set('status', $message);
59
  wp_redirect('admin.php?page=simple_wp_membership_levels');
60
  exit(0);
54
  //@todo meta table and collect all relevant info and pass as argument
55
  $custom = apply_filters('swpm_admin_edit_membership_level', array(), $id);
56
  $this->save_custom_fields($id, $custom);
57
+ $message = array('succeeded' => true, 'message' => '<p>'. SwpmUtils::_('Membership Level Updated Successfully.') . '</p>');
58
  SwpmTransfer::get_instance()->set('status', $message);
59
  wp_redirect('admin.php?page=simple_wp_membership_levels');
60
  exit(0);
classes/class.swpm-membership-levels.php CHANGED
@@ -1,7 +1,8 @@
1
  <?php
2
 
3
- if (!class_exists('WP_List_Table'))
4
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
 
5
 
6
  class SwpmMembershipLevels extends WP_List_Table {
7
 
@@ -182,16 +183,34 @@ class SwpmMembershipLevels extends WP_List_Table {
182
  $id = absint($_REQUEST['id']);
183
  $query = $wpdb->prepare("DELETE FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id = %d", $id);
184
  $wpdb->query($query);
 
185
  }
186
  }
187
 
188
  function show() {
189
- $selected = "";
190
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_membership_levels.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  }
192
 
193
  function manage() {
194
- $selected = "manage";
195
  include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_membership_manage.php');
196
  }
197
 
@@ -202,4 +221,78 @@ class SwpmMembershipLevels extends WP_List_Table {
202
  include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_category_list.php');
203
  }
204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  }
1
  <?php
2
 
3
+ if (!class_exists('WP_List_Table')){
4
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
5
+ }
6
 
7
  class SwpmMembershipLevels extends WP_List_Table {
8
 
183
  $id = absint($_REQUEST['id']);
184
  $query = $wpdb->prepare("DELETE FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id = %d", $id);
185
  $wpdb->query($query);
186
+ echo '<div id="message" class="updated fade"><p>Selected record deleted successfully!</p></div>';
187
  }
188
  }
189
 
190
  function show() {
191
+ ?>
192
+ <div class="swpm-margin-top-10"></div>
193
+ <form method="post">
194
+ <p class="search-box">
195
+ <label class="screen-reader-text" for="search_id-search-input">
196
+ search:</label>
197
+ <input id="search_id-search-input" type="text" name="s" value="" />
198
+ <input id="search-submit" class="button" type="submit" name="" value="<?php echo SwpmUtils::_('Search')?>" />
199
+ </p>
200
+ </form>
201
+
202
+ <?php $this->prepare_items(); ?>
203
+ <form method="post">
204
+ <?php $this->display(); ?>
205
+ </form>
206
+
207
+ <p>
208
+ <a href="admin.php?page=simple_wp_membership_levels&level_action=add" class="button-primary"><?php SwpmUtils::e('Add New') ?></a>
209
+ </p>
210
+ <?php
211
  }
212
 
213
  function manage() {
 
214
  include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_membership_manage.php');
215
  }
216
 
221
  include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_category_list.php');
222
  }
223
 
224
+ function handle_main_membership_level_admin_menu(){
225
+
226
+ do_action( 'swpm_membership_level_menu_start' );
227
+
228
+ $level_action = filter_input(INPUT_GET, 'level_action');
229
+ $action = $level_action;
230
+ $selected= $action;
231
+
232
+ ?>
233
+ <div class="wrap swpm-admin-menu-wrap"><!-- start wrap -->
234
+
235
+ <!-- page title -->
236
+ <h1><?php echo SwpmUtils::_('Simple WP Membership::Membership Levels') ?></h1>
237
+
238
+ <!-- start nav menu tabs -->
239
+ <h2 class="nav-tab-wrapper">
240
+ <a class="nav-tab <?php echo ($selected == "") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_levels"><?php echo SwpmUtils::_('Membership Levels') ?></a>
241
+ <a class="nav-tab <?php echo ($selected == "add") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_levels&level_action=add"><?php echo SwpmUtils::_('Add Level') ?></a>
242
+ <a class="nav-tab <?php echo ($selected == "manage") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_levels&level_action=manage"><?php echo SwpmUtils::_('Manage Content Production') ?></a>
243
+ <a class="nav-tab <?php echo ($selected == "category_list") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_levels&level_action=category_list"><?php echo SwpmUtils::_('Category Protection') ?></a>
244
+ <?php
245
+
246
+ //Trigger hooks that allows an extension to add extra nav tabs in the membership levels menu.
247
+ do_action ('swpm_membership_levels_menu_nav_tabs', $selected);
248
+
249
+ $menu_tabs = apply_filters('swpm_membership_levels_additional_menu_tabs_array', array());
250
+ foreach ($menu_tabs as $level_action => $title){
251
+ ?>
252
+ <a class="nav-tab <?php echo ($selected == $member_action) ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_levels&level_action=<?php echo $level_action; ?>" ><?php SwpmUtils::e($title); ?></a>
253
+ <?php
254
+ }
255
+
256
+ ?>
257
+ </h2>
258
+ <!-- end nav menu tabs -->
259
+
260
+ <?php
261
+
262
+ do_action( 'swpm_membership_level_menu_after_nav_tabs' );
263
+
264
+ //Trigger hook so anyone listening for this particular action can handle the output.
265
+ do_action( 'swpm_membership_level_menu_body_' . $action );
266
+
267
+ //Allows an addon to completely override the body section of the membership level admin menu for a given action.
268
+ $output = apply_filters('swpm_membership_level_menu_body_override', '', $action);
269
+ if (!empty($output)) {
270
+ //An addon has overriden the body of this page for the given action. So no need to do anything in core.
271
+ echo $output;
272
+ echo '</div>';//<!-- end of wrap -->
273
+ return;
274
+ }
275
+
276
+ //Switch case for the various different actions handled by the core plugin.
277
+ switch ($action) {
278
+ case 'add':
279
+ case 'edit':
280
+ $this->process_form_request();
281
+ break;
282
+ case 'manage':
283
+ $this->manage();
284
+ break;
285
+ case 'category_list':
286
+ $this->manage_categroy();
287
+ break;
288
+ case 'delete':
289
+ $this->delete();
290
+ default:
291
+ $this->show();
292
+ break;
293
+ }
294
+
295
+ echo '</div>';//<!-- end of wrap -->
296
+ }
297
+
298
  }
classes/class.swpm-settings.php CHANGED
@@ -12,15 +12,30 @@ class SwpmSettings {
12
  }
13
 
14
  public function init_config_hooks() {
15
- $page = filter_input(INPUT_GET, 'page');
16
- // if($page == 'simple_wp_membership_settings'){
 
17
  if (is_admin()) { // for frontend just load settings but dont try to render settings page.
 
 
18
  $tab = filter_input(INPUT_GET, 'tab');
19
  $tab = empty($tab) ? filter_input(INPUT_POST, 'tab') : $tab;
20
  $this->current_tab = empty($tab) ? 1 : $tab;
21
- $this->tabs = array(1 => SwpmUtils::_('General Settings'), 2 => SwpmUtils::_('Payment Settings'),
22
- 3 => SwpmUtils::_('Email Settings'), 4 => SwpmUtils::_('Tools'), 5 => SwpmUtils::_('Advanced Settings'), 6 => SwpmUtils::_('Addons Settings'));
23
- add_action('swpm-draw-tab', array(&$this, 'draw_tabs'));
 
 
 
 
 
 
 
 
 
 
 
 
24
  $method = 'tab_' . $this->current_tab;
25
  if (method_exists($this, $method)) {
26
  $this->$method();
@@ -29,7 +44,8 @@ class SwpmSettings {
29
  }
30
 
31
  private function tab_1() {
32
-
 
33
  register_setting('swpm-settings-tab-1', 'swpm-settings', array(&$this, 'sanitize_tab_1'));
34
 
35
  //This settings section has no heading
@@ -87,10 +103,13 @@ class SwpmSettings {
87
  }
88
 
89
  private function tab_2() {
 
90
 
91
  }
92
 
93
  private function tab_3() {
 
 
94
  //Show settings updated message when it is updated
95
  if (isset($_REQUEST['settings-updated'])) {
96
  echo '<div id="message" class="updated fade"><p>' . SwpmUtils::_('Settings updated!') . '</p></div>';
@@ -136,10 +155,13 @@ class SwpmSettings {
136
  }
137
 
138
  private function tab_4() {
 
139
 
140
  }
141
 
142
  private function tab_5() {
 
 
143
  //Show settings updated message when it is updated
144
  if (isset($_REQUEST['settings-updated'])) {
145
  echo '<div id="message" class="updated fade"><p>' . SwpmUtils::_('Settings updated!') . '</p></div>';
@@ -166,6 +188,7 @@ class SwpmSettings {
166
  }
167
 
168
  private function tab_6() {
 
169
 
170
  }
171
 
@@ -383,10 +406,68 @@ class SwpmSettings {
383
  $current = $this->current_tab;
384
  ?>
385
  <h2 class="nav-tab-wrapper">
386
- <?php foreach ($this->tabs as $id => $label): ?>
387
  <a class="nav-tab <?php echo ($current == $id) ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_settings&tab=<?php echo $id ?>"><?php echo $label ?></a>
388
- <?php endforeach; ?>
389
  </h2>
390
  <?php
391
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
  }
12
  }
13
 
14
  public function init_config_hooks() {
15
+ //This function is called from "admin_init"
16
+ //It sets up the various tabs and the fields for the settings admin page.
17
+
18
  if (is_admin()) { // for frontend just load settings but dont try to render settings page.
19
+
20
+ //Read the value of tab query arg.
21
  $tab = filter_input(INPUT_GET, 'tab');
22
  $tab = empty($tab) ? filter_input(INPUT_POST, 'tab') : $tab;
23
  $this->current_tab = empty($tab) ? 1 : $tab;
24
+
25
+ //Setup the available settings tabs array.
26
+ $this->tabs = array(
27
+ 1 => SwpmUtils::_('General Settings'),
28
+ 2 => SwpmUtils::_('Payment Settings'),
29
+ 3 => SwpmUtils::_('Email Settings'),
30
+ 4 => SwpmUtils::_('Tools'),
31
+ 5 => SwpmUtils::_('Advanced Settings'),
32
+ 6 => SwpmUtils::_('Addons Settings')
33
+ );
34
+
35
+ //Register the draw tab action hook. It will be triggered using do_action("swpm-draw-settings-nav-tabs")
36
+ add_action('swpm-draw-settings-nav-tabs', array(&$this, 'draw_tabs'));
37
+
38
+ //Register the various settings fields for the current tab.
39
  $method = 'tab_' . $this->current_tab;
40
  if (method_exists($this, $method)) {
41
  $this->$method();
44
  }
45
 
46
  private function tab_1() {
47
+ //Register settings sections and fileds for the general settings tab.
48
+
49
  register_setting('swpm-settings-tab-1', 'swpm-settings', array(&$this, 'sanitize_tab_1'));
50
 
51
  //This settings section has no heading
103
  }
104
 
105
  private function tab_2() {
106
+ //Register settings sections and fileds for the payment settings tab.
107
 
108
  }
109
 
110
  private function tab_3() {
111
+ //Register settings sections and fileds for the email settings tab.
112
+
113
  //Show settings updated message when it is updated
114
  if (isset($_REQUEST['settings-updated'])) {
115
  echo '<div id="message" class="updated fade"><p>' . SwpmUtils::_('Settings updated!') . '</p></div>';
155
  }
156
 
157
  private function tab_4() {
158
+ //Register settings sections and fileds for the tools tab.
159
 
160
  }
161
 
162
  private function tab_5() {
163
+ //Register settings sections and fileds for the advanced settings tab.
164
+
165
  //Show settings updated message when it is updated
166
  if (isset($_REQUEST['settings-updated'])) {
167
  echo '<div id="message" class="updated fade"><p>' . SwpmUtils::_('Settings updated!') . '</p></div>';
188
  }
189
 
190
  private function tab_6() {
191
+ //Register settings sections and fileds for the addon settings tab.
192
 
193
  }
194
 
406
  $current = $this->current_tab;
407
  ?>
408
  <h2 class="nav-tab-wrapper">
409
+ <?php foreach ($this->tabs as $id => $label){ ?>
410
  <a class="nav-tab <?php echo ($current == $id) ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_settings&tab=<?php echo $id ?>"><?php echo $label ?></a>
411
+ <?php } ?>
412
  </h2>
413
  <?php
414
  }
415
+
416
+ public function handle_main_settings_admin_menu(){
417
+
418
+ do_action( 'swpm_settings_menu_start' );
419
+
420
+ ?>
421
+ <div class="wrap swpm-admin-menu-wrap"><!-- start wrap -->
422
+
423
+ <h1><?php echo SwpmUtils::_('Simple WP Membership::Settings') ?></h1><!-- page title -->
424
+
425
+ <!-- start nav menu tabs -->
426
+ <?php do_action("swpm-draw-settings-nav-tabs"); ?>
427
+ <!-- end nav menu tabs -->
428
+ <?php
429
+
430
+ do_action( 'swpm_settings_menu_after_nav_tabs' );
431
+
432
+ //Switch to handle the body of each of the various settings pages based on the currently selected tab
433
+ $current_tab = $this->current_tab;
434
+ switch ($current_tab) {
435
+ case 1:
436
+ //General settings
437
+ include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_settings.php');
438
+ break;
439
+ case 2:
440
+ //Payment settings
441
+ include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/payments/admin_payment_settings.php');
442
+ break;
443
+ case 3:
444
+ //Email settings
445
+ include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_settings.php');
446
+ break;
447
+ case 4:
448
+ //Tools
449
+ $link_for = filter_input(INPUT_POST, 'swpm_link_for', FILTER_SANITIZE_STRING);
450
+ $member_id = filter_input(INPUT_POST, 'member_id', FILTER_SANITIZE_NUMBER_INT);
451
+ $send_email = filter_input(INPUT_POST, 'swpm_reminder_email', FILTER_SANITIZE_NUMBER_INT);
452
+ $links = SwpmUtils::get_registration_link($link_for, $send_email, $member_id);
453
+ include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_tools_settings.php');
454
+ break;
455
+ case 5:
456
+ //Advanced settings
457
+ include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_settings.php');
458
+ break;
459
+ case 6:
460
+ //Addon settings
461
+ include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_addon_settings.php');
462
+ break;
463
+ default:
464
+ //The default fallback (general settings)
465
+ include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_settings.php');
466
+ break;
467
+ }
468
+
469
+ echo '</div>';//<!-- end of wrap -->
470
+
471
+ }
472
+
473
  }
classes/common/class-swpm-list-table.php DELETED
@@ -1,1138 +0,0 @@
1
- <?php
2
- /**
3
- * Base class for displaying a list of items in an ajaxified HTML table.
4
- * Use this class to display list table.
5
- * This will prevent list table from breaking when WordPress changes the implementation of core list table class in the future.
6
- */
7
-
8
- class SWPM_List_Table {
9
-
10
- /**
11
- * The current list of items
12
- *
13
- * @since 3.1.0
14
- * @var array
15
- * @access public
16
- */
17
- public $items;
18
-
19
- /**
20
- * Various information about the current table
21
- *
22
- * @since 3.1.0
23
- * @var array
24
- * @access protected
25
- */
26
- protected $_args;
27
-
28
- /**
29
- * Various information needed for displaying the pagination
30
- *
31
- * @since 3.1.0
32
- * @var array
33
- */
34
- protected $_pagination_args = array();
35
-
36
- /**
37
- * The current screen
38
- *
39
- * @since 3.1.0
40
- * @var object
41
- * @access protected
42
- */
43
- protected $screen;
44
-
45
- /**
46
- * Cached bulk actions
47
- *
48
- * @since 3.1.0
49
- * @var array
50
- * @access private
51
- */
52
- private $_actions;
53
-
54
- /**
55
- * Cached pagination output
56
- *
57
- * @since 3.1.0
58
- * @var string
59
- * @access private
60
- */
61
- private $_pagination;
62
-
63
- /**
64
- * The view switcher modes.
65
- *
66
- * @since 4.1.0
67
- * @var array
68
- * @access protected
69
- */
70
- protected $modes = array();
71
-
72
- /**
73
- * Stores the value returned by ->get_column_info()
74
- *
75
- * @var array
76
- */
77
- protected $_column_headers;
78
-
79
- protected $compat_fields = array( '_args', '_pagination_args', 'screen', '_actions', '_pagination' );
80
-
81
- protected $compat_methods = array( 'set_pagination_args', 'get_views', 'get_bulk_actions', 'bulk_actions',
82
- 'row_actions', 'months_dropdown', 'view_switcher', 'comments_bubble', 'get_items_per_page', 'pagination',
83
- 'get_sortable_columns', 'get_column_info', 'get_table_classes', 'display_tablenav', 'extra_tablenav',
84
- 'single_row_columns' );
85
-
86
- /**
87
- * Constructor.
88
- *
89
- * The child class should call this constructor from its own constructor to override
90
- * the default $args.
91
- *
92
- * @since 3.1.0
93
- * @access public
94
- *
95
- * @param array|string $args {
96
- * Array or string of arguments.
97
- *
98
- * @type string $plural Plural value used for labels and the objects being listed.
99
- * This affects things such as CSS class-names and nonces used
100
- * in the list table, e.g. 'posts'. Default empty.
101
- * @type string $singular Singular label for an object being listed, e.g. 'post'.
102
- * Default empty
103
- * @type bool $ajax Whether the list table supports AJAX. This includes loading
104
- * and sorting data, for example. If true, the class will call
105
- * the {@see _js_vars()} method in the footer to provide variables
106
- * to any scripts handling AJAX events. Default false.
107
- * @type string $screen String containing the hook name used to determine the current
108
- * screen. If left null, the current screen will be automatically set.
109
- * Default null.
110
- * }
111
- */
112
- public function __construct( $args = array() ) {
113
- $args = wp_parse_args( $args, array(
114
- 'plural' => '',
115
- 'singular' => '',
116
- 'ajax' => false,
117
- 'screen' => null,
118
- ) );
119
-
120
- $this->screen = convert_to_screen( $args['screen'] );
121
-
122
- add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
123
-
124
- if ( !$args['plural'] )
125
- $args['plural'] = $this->screen->base;
126
-
127
- $args['plural'] = sanitize_key( $args['plural'] );
128
- $args['singular'] = sanitize_key( $args['singular'] );
129
-
130
- $this->_args = $args;
131
-
132
- if ( $args['ajax'] ) {
133
- // wp_enqueue_script( 'list-table' );
134
- add_action( 'admin_footer', array( $this, '_js_vars' ) );
135
- }
136
-
137
- if ( empty( $this->modes ) ) {
138
- $this->modes = array(
139
- 'list' => __( 'List View' ),
140
- 'excerpt' => __( 'Excerpt View' )
141
- );
142
- }
143
- }
144
-
145
- /**
146
- * Make private properties readable for backwards compatibility.
147
- *
148
- * @since 4.0.0
149
- * @access public
150
- *
151
- * @param string $name Property to get.
152
- * @return mixed Property.
153
- */
154
- public function __get( $name ) {
155
- if ( in_array( $name, $this->compat_fields ) ) {
156
- return $this->$name;
157
- }
158
- }
159
-
160
- /**
161
- * Make private properties settable for backwards compatibility.
162
- *
163
- * @since 4.0.0
164
- * @access public
165
- *
166
- * @param string $name Property to check if set.
167
- * @param mixed $value Property value.
168
- * @return mixed Newly-set property.
169
- */
170
- public function __set( $name, $value ) {
171
- if ( in_array( $name, $this->compat_fields ) ) {
172
- return $this->$name = $value;
173
- }
174
- }
175
-
176
- /**
177
- * Make private properties checkable for backwards compatibility.
178
- *
179
- * @since 4.0.0
180
- * @access public
181
- *
182
- * @param string $name Property to check if set.
183
- * @return bool Whether the property is set.
184
- */
185
- public function __isset( $name ) {
186
- if ( in_array( $name, $this->compat_fields ) ) {
187
- return isset( $this->$name );
188
- }
189
- }
190
-
191
- /**
192
- * Make private properties un-settable for backwards compatibility.
193
- *
194
- * @since 4.0.0
195
- * @access public
196
- *
197
- * @param string $name Property to unset.
198
- */
199
- public function __unset( $name ) {
200
- if ( in_array( $name, $this->compat_fields ) ) {
201
- unset( $this->$name );
202
- }
203
- }
204
-
205
- /**
206
- * Make private/protected methods readable for backwards compatibility.
207
- *
208
- * @since 4.0.0
209
- * @access public
210
- *
211
- * @param callable $name Method to call.
212
- * @param array $arguments Arguments to pass when calling.
213
- * @return mixed|bool Return value of the callback, false otherwise.
214
- */
215
- public function __call( $name, $arguments ) {
216
- if ( in_array( $name, $this->compat_methods ) ) {
217
- return call_user_func_array( array( $this, $name ), $arguments );
218
- }
219
- return false;
220
- }
221
-
222
- /**
223
- * Checks the current user's permissions
224
- *
225
- * @since 3.1.0
226
- * @access public
227
- * @abstract
228
- */
229
- public function ajax_user_can() {
230
- die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' );
231
- }
232
-
233
- /**
234
- * Prepares the list of items for displaying.
235
- * @uses WP_List_Table::set_pagination_args()
236
- *
237
- * @since 3.1.0
238
- * @access public
239
- * @abstract
240
- */
241
- public function prepare_items() {
242
- die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' );
243
- }
244
-
245
- /**
246
- * An internal method that sets all the necessary pagination arguments
247
- *
248
- * @param array $args An associative array with information about the pagination
249
- * @access protected
250
- */
251
- protected function set_pagination_args( $args ) {
252
- $args = wp_parse_args( $args, array(
253
- 'total_items' => 0,
254
- 'total_pages' => 0,
255
- 'per_page' => 0,
256
- ) );
257
-
258
- if ( !$args['total_pages'] && $args['per_page'] > 0 )
259
- $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
260
-
261
- // Redirect if page number is invalid and headers are not already sent.
262
- if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
263
- wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
264
- exit;
265
- }
266
-
267
- $this->_pagination_args = $args;
268
- }
269
-
270
- /**
271
- * Access the pagination args.
272
- *
273
- * @since 3.1.0
274
- * @access public
275
- *
276
- * @param string $key Pagination argument to retrieve. Common values include 'total_items',
277
- * 'total_pages', 'per_page', or 'infinite_scroll'.
278
- * @return int Number of items that correspond to the given pagination argument.
279
- */
280
- public function get_pagination_arg( $key ) {
281
- if ( 'page' == $key )
282
- return $this->get_pagenum();
283
-
284
- if ( isset( $this->_pagination_args[$key] ) )
285
- return $this->_pagination_args[$key];
286
- }
287
-
288
- /**
289
- * Whether the table has items to display or not
290
- *
291
- * @since 3.1.0
292
- * @access public
293
- *
294
- * @return bool
295
- */
296
- public function has_items() {
297
- return !empty( $this->items );
298
- }
299
-
300
- /**
301
- * Message to be displayed when there are no items
302
- *
303
- * @since 3.1.0
304
- * @access public
305
- */
306
- public function no_items() {
307
- _e( 'No items found.' );
308
- }
309
-
310
- /**
311
- * Display the search box.
312
- *
313
- * @since 3.1.0
314
- * @access public
315
- *
316
- * @param string $text The search button text
317
- * @param string $input_id The search input id
318
- */
319
- public function search_box( $text, $input_id ) {
320
- if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
321
- return;
322
-
323
- $input_id = $input_id . '-search-input';
324
-
325
- if ( ! empty( $_REQUEST['orderby'] ) )
326
- echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
327
- if ( ! empty( $_REQUEST['order'] ) )
328
- echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
329
- if ( ! empty( $_REQUEST['post_mime_type'] ) )
330
- echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '" />';
331
- if ( ! empty( $_REQUEST['detached'] ) )
332
- echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
333
- ?>
334
- <p class="search-box">
335
- <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
336
- <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
337
- <?php submit_button( $text, 'button', '', false, array('id' => 'search-submit') ); ?>
338
- </p>
339
- <?php
340
- }
341
-
342
- /**
343
- * Get an associative array ( id => link ) with the list
344
- * of views available on this table.
345
- *
346
- * @since 3.1.0
347
- * @access protected
348
- *
349
- * @return array
350
- */
351
- protected function get_views() {
352
- return array();
353
- }
354
-
355
- /**
356
- * Display the list of views available on this table.
357
- *
358
- * @since 3.1.0
359
- * @access public
360
- */
361
- public function views() {
362
- $views = $this->get_views();
363
- /**
364
- * Filter the list of available list table views.
365
- *
366
- * The dynamic portion of the hook name, `$this->screen->id`, refers
367
- * to the ID of the current screen, usually a string.
368
- *
369
- * @since 3.5.0
370
- *
371
- * @param array $views An array of available list table views.
372
- */
373
- $views = apply_filters( "views_{$this->screen->id}", $views );
374
-
375
- if ( empty( $views ) )
376
- return;
377
-
378
- echo "<ul class='subsubsub'>\n";
379
- foreach ( $views as $class => $view ) {
380
- $views[ $class ] = "\t<li class='$class'>$view";
381
- }
382
- echo implode( " |</li>\n", $views ) . "</li>\n";
383
- echo "</ul>";
384
- }
385
-
386
- /**
387
- * Get an associative array ( option_name => option_title ) with the list
388
- * of bulk actions available on this table.
389
- *
390
- * @since 3.1.0
391
- * @access protected
392
- *
393
- * @return array
394
- */
395
- protected function get_bulk_actions() {
396
- return array();
397
- }
398
-
399
- /**
400
- * Display the bulk actions dropdown.
401
- *
402
- * @since 3.1.0
403
- * @access protected
404
- *
405
- * @param string $which The location of the bulk actions: 'top' or 'bottom'.
406
- * This is designated as optional for backwards-compatibility.
407
- */
408
- protected function bulk_actions( $which = '' ) {
409
- if ( is_null( $this->_actions ) ) {
410
- $no_new_actions = $this->_actions = $this->get_bulk_actions();
411
- /**
412
- * Filter the list table Bulk Actions drop-down.
413
- *
414
- * The dynamic portion of the hook name, `$this->screen->id`, refers
415
- * to the ID of the current screen, usually a string.
416
- *
417
- * This filter can currently only be used to remove bulk actions.
418
- *
419
- * @since 3.5.0
420
- *
421
- * @param array $actions An array of the available bulk actions.
422
- */
423
- $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
424
- $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
425
- $two = '';
426
- } else {
427
- $two = '2';
428
- }
429
-
430
- if ( empty( $this->_actions ) )
431
- return;
432
-
433
- echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
434
- echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
435
- echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
436
-
437
- foreach ( $this->_actions as $name => $title ) {
438
- $class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
439
-
440
- echo "\t<option value='$name'$class>$title</option>\n";
441
- }
442
-
443
- echo "</select>\n";
444
-
445
- submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );
446
- echo "\n";
447
- }
448
-
449
- /**
450
- * Get the current action selected from the bulk actions dropdown.
451
- *
452
- * @since 3.1.0
453
- * @access public
454
- *
455
- * @return string|bool The action name or False if no action was selected
456
- */
457
- public function current_action() {
458
- if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) )
459
- return false;
460
-
461
- if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
462
- return $_REQUEST['action'];
463
-
464
- if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
465
- return $_REQUEST['action2'];
466
-
467
- return false;
468
- }
469
-
470
- /**
471
- * Generate row actions div
472
- *
473
- * @since 3.1.0
474
- * @access protected
475
- *
476
- * @param array $actions The list of actions
477
- * @param bool $always_visible Whether the actions should be always visible
478
- * @return string
479
- */
480
- protected function row_actions( $actions, $always_visible = false ) {
481
- $action_count = count( $actions );
482
- $i = 0;
483
-
484
- if ( !$action_count )
485
- return '';
486
-
487
- $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
488
- foreach ( $actions as $action => $link ) {
489
- ++$i;
490
- ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
491
- $out .= "<span class='$action'>$link$sep</span>";
492
- }
493
- $out .= '</div>';
494
-
495
- return $out;
496
- }
497
-
498
- /**
499
- * Display a monthly dropdown for filtering items
500
- *
501
- * @since 3.1.0
502
- * @access protected
503
- *
504
- * @param string $post_type
505
- */
506
- protected function months_dropdown( $post_type ) {
507
- global $wpdb, $wp_locale;
508
-
509
- /**
510
- * Filter whether to remove the 'Months' drop-down from the post list table.
511
- *
512
- * @since 4.2.0
513
- *
514
- * @param bool $disable Whether to disable the drop-down. Default false.
515
- * @param string $post_type The post type.
516
- */
517
- if ( apply_filters( 'disable_months_dropdown', false, $post_type ) ) {
518
- return;
519
- }
520
-
521
- $months = $wpdb->get_results( $wpdb->prepare( "
522
- SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
523
- FROM $wpdb->posts
524
- WHERE post_type = %s
525
- ORDER BY post_date DESC
526
- ", $post_type ) );
527
-
528
- /**
529
- * Filter the 'Months' drop-down results.
530
- *
531
- * @since 3.7.0
532
- *
533
- * @param object $months The months drop-down query results.
534
- * @param string $post_type The post type.
535
- */
536
- $months = apply_filters( 'months_dropdown_results', $months, $post_type );
537
-
538
- $month_count = count( $months );
539
-
540
- if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
541
- return;
542
-
543
- $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
544
- ?>
545
- <label for="filter-by-date" class="screen-reader-text"><?php _e( 'Filter by date' ); ?></label>
546
- <select name="m" id="filter-by-date">
547
- <option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
548
- <?php
549
- foreach ( $months as $arc_row ) {
550
- if ( 0 == $arc_row->year )
551
- continue;
552
-
553
- $month = zeroise( $arc_row->month, 2 );
554
- $year = $arc_row->year;
555
-
556
- printf( "<option %s value='%s'>%s</option>\n",
557
- selected( $m, $year . $month, false ),
558
- esc_attr( $arc_row->year . $month ),
559
- /* translators: 1: month name, 2: 4-digit year */
560
- sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
561
- );
562
- }
563
- ?>
564
- </select>
565
- <?php
566
- }
567
-
568
- /**
569
- * Display a view switcher
570
- *
571
- * @since 3.1.0
572
- * @access protected
573
- *
574
- * @param string $current_mode
575
- */
576
- protected function view_switcher( $current_mode ) {
577
- ?>
578
- <input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />
579
- <div class="view-switch">
580
- <?php
581
- foreach ( $this->modes as $mode => $title ) {
582
- $classes = array( 'view-' . $mode );
583
- if ( $current_mode == $mode )
584
- $classes[] = 'current';
585
- printf(
586
- "<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
587
- esc_url( add_query_arg( 'mode', $mode ) ),
588
- implode( ' ', $classes ),
589
- $title
590
- );
591
- }
592
- ?>
593
- </div>
594
- <?php
595
- }
596
-
597
- /**
598
- * Display a comment count bubble
599
- *
600
- * @since 3.1.0
601
- * @access protected
602
- *
603
- * @param int $post_id The post ID.
604
- * @param int $pending_comments Number of pending comments.
605
- */
606
- protected function comments_bubble( $post_id, $pending_comments ) {
607
- $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) );
608
-
609
- if ( $pending_comments )
610
- echo '<strong>';
611
-
612
- echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . "</span></a>";
613
-
614
- if ( $pending_comments )
615
- echo '</strong>';
616
- }
617
-
618
- /**
619
- * Get the current page number
620
- *
621
- * @since 3.1.0
622
- * @access public
623
- *
624
- * @return int
625
- */
626
- public function get_pagenum() {
627
- $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
628
-
629
- if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
630
- $pagenum = $this->_pagination_args['total_pages'];
631
-
632
- return max( 1, $pagenum );
633
- }
634
-
635
- /**
636
- * Get number of items to display on a single page
637
- *
638
- * @since 3.1.0
639
- * @access protected
640
- *
641
- * @param string $option
642
- * @param int $default
643
- * @return int
644
- */
645
- protected function get_items_per_page( $option, $default = 20 ) {
646
- $per_page = (int) get_user_option( $option );
647
- if ( empty( $per_page ) || $per_page < 1 )
648
- $per_page = $default;
649
-
650
- /**
651
- * Filter the number of items to be displayed on each page of the list table.
652
- *
653
- * The dynamic hook name, $option, refers to the `per_page` option depending
654
- * on the type of list table in use. Possible values include: 'edit_comments_per_page',
655
- * 'sites_network_per_page', 'site_themes_network_per_page', 'themes_network_per_page',
656
- * 'users_network_per_page', 'edit_post_per_page', 'edit_page_per_page',
657
- * 'edit_{$post_type}_per_page', etc.
658
- *
659
- * @since 2.9.0
660
- *
661
- * @param int $per_page Number of items to be displayed. Default 20.
662
- */
663
- return (int) apply_filters( $option, $per_page );
664
- }
665
-
666
- /**
667
- * Display the pagination.
668
- *
669
- * @since 3.1.0
670
- * @access protected
671
- *
672
- * @param string $which
673
- */
674
- protected function pagination( $which ) {
675
- if ( empty( $this->_pagination_args ) ) {
676
- return;
677
- }
678
-
679
- $total_items = $this->_pagination_args['total_items'];
680
- $total_pages = $this->_pagination_args['total_pages'];
681
- $infinite_scroll = false;
682
- if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {
683
- $infinite_scroll = $this->_pagination_args['infinite_scroll'];
684
- }
685
-
686
- $output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
687
-
688
- $current = $this->get_pagenum();
689
-
690
- $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
691
-
692
- $current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
693
-
694
- $page_links = array();
695
-
696
- $disable_first = $disable_last = '';
697
- if ( $current == 1 ) {
698
- $disable_first = ' disabled';
699
- }
700
- if ( $current == $total_pages ) {
701
- $disable_last = ' disabled';
702
- }
703
- $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
704
- 'first-page' . $disable_first,
705
- esc_attr__( 'Go to the first page' ),
706
- esc_url( remove_query_arg( 'paged', $current_url ) ),
707
- '&laquo;'
708
- );
709
-
710
- $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
711
- 'prev-page' . $disable_first,
712
- esc_attr__( 'Go to the previous page' ),
713
- esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
714
- '&lsaquo;'
715
- );
716
-
717
- if ( 'bottom' == $which ) {
718
- $html_current_page = $current;
719
- } else {
720
- $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' title='%s' type='text' name='paged' value='%s' size='%d' />",
721
- '<label for="current-page-selector" class="screen-reader-text">' . __( 'Select Page' ) . '</label>',
722
- esc_attr__( 'Current page' ),
723
- $current,
724
- strlen( $total_pages )
725
- );
726
- }
727
- $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
728
- $page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';
729
-
730
- $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
731
- 'next-page' . $disable_last,
732
- esc_attr__( 'Go to the next page' ),
733
- esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
734
- '&rsaquo;'
735
- );
736
-
737
- $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
738
- 'last-page' . $disable_last,
739
- esc_attr__( 'Go to the last page' ),
740
- esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
741
- '&raquo;'
742
- );
743
-
744
- $pagination_links_class = 'pagination-links';
745
- if ( ! empty( $infinite_scroll ) ) {
746
- $pagination_links_class = ' hide-if-js';
747
- }
748
- $output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
749
-
750
- if ( $total_pages ) {
751
- $page_class = $total_pages < 2 ? ' one-page' : '';
752
- } else {
753
- $page_class = ' no-pages';
754
- }
755
- $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
756
-
757
- echo $this->_pagination;
758
- }
759
-
760
- /**
761
- * Get a list of columns. The format is:
762
- * 'internal-name' => 'Title'
763
- *
764
- * @since 3.1.0
765
- * @access public
766
- * @abstract
767
- *
768
- * @return array
769
- */
770
- public function get_columns() {
771
- die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' );
772
- }
773
-
774
- /**
775
- * Get a list of sortable columns. The format is:
776
- * 'internal-name' => 'orderby'
777
- * or
778
- * 'internal-name' => array( 'orderby', true )
779
- *
780
- * The second format will make the initial sorting order be descending
781
- *
782
- * @since 3.1.0
783
- * @access protected
784
- *
785
- * @return array
786
- */
787
- protected function get_sortable_columns() {
788
- return array();
789
- }
790
-
791
- /**
792
- * Get a list of all, hidden and sortable columns, with filter applied
793
- *
794
- * @since 3.1.0
795
- * @access protected
796
- *
797
- * @return array
798
- */
799
- protected function get_column_info() {
800
- if ( isset( $this->_column_headers ) )
801
- return $this->_column_headers;
802
-
803
- $columns = get_column_headers( $this->screen );
804
- $hidden = get_hidden_columns( $this->screen );
805
-
806
- $sortable_columns = $this->get_sortable_columns();
807
- /**
808
- * Filter the list table sortable columns for a specific screen.
809
- *
810
- * The dynamic portion of the hook name, `$this->screen->id`, refers
811
- * to the ID of the current screen, usually a string.
812
- *
813
- * @since 3.5.0
814
- *
815
- * @param array $sortable_columns An array of sortable columns.
816
- */
817
- $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns );
818
-
819
- $sortable = array();
820
- foreach ( $_sortable as $id => $data ) {
821
- if ( empty( $data ) )
822
- continue;
823
-
824
- $data = (array) $data;
825
- if ( !isset( $data[1] ) )
826
- $data[1] = false;
827
-
828
- $sortable[$id] = $data;
829
- }
830
-
831
- $this->_column_headers = array( $columns, $hidden, $sortable );
832
-
833
- return $this->_column_headers;
834
- }
835
-
836
- /**
837
- * Return number of visible columns
838
- *
839
- * @since 3.1.0
840
- * @access public
841
- *
842
- * @return int
843
- */
844
- public function get_column_count() {
845
- list ( $columns, $hidden ) = $this->get_column_info();
846
- $hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
847
- return count( $columns ) - count( $hidden );
848
- }
849
-
850
- /**
851
- * Print column headers, accounting for hidden and sortable columns.
852
- *
853
- * @since 3.1.0
854
- * @access public
855
- *
856
- * @param bool $with_id Whether to set the id attribute or not
857
- */
858
- public function print_column_headers( $with_id = true ) {
859
- list( $columns, $hidden, $sortable ) = $this->get_column_info();
860
-
861
- $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
862
- $current_url = remove_query_arg( 'paged', $current_url );
863
-
864
- if ( isset( $_GET['orderby'] ) )
865
- $current_orderby = $_GET['orderby'];
866
- else
867
- $current_orderby = '';
868
-
869
- if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] )
870
- $current_order = 'desc';
871
- else
872
- $current_order = 'asc';
873
-
874
- if ( ! empty( $columns['cb'] ) ) {
875
- static $cb_counter = 1;
876
- $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>'
877
- . '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
878
- $cb_counter++;
879
- }
880
-
881
- foreach ( $columns as $column_key => $column_display_name ) {
882
- $class = array( 'manage-column', "column-$column_key" );
883
-
884
- $style = '';
885
- if ( in_array( $column_key, $hidden ) )
886
- $style = 'display:none;';
887
-
888
- $style = ' style="' . $style . '"';
889
-
890
- if ( 'cb' == $column_key )
891
- $class[] = 'check-column';
892
- elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) )
893
- $class[] = 'num';
894
-
895
- if ( isset( $sortable[$column_key] ) ) {
896
- list( $orderby, $desc_first ) = $sortable[$column_key];
897
-
898
- if ( $current_orderby == $orderby ) {
899
- $order = 'asc' == $current_order ? 'desc' : 'asc';
900
- $class[] = 'sorted';
901
- $class[] = $current_order;
902
- } else {
903
- $order = $desc_first ? 'desc' : 'asc';
904
- $class[] = 'sortable';
905
- $class[] = $desc_first ? 'asc' : 'desc';
906
- }
907
-
908
- $column_display_name = '<a href="' . esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ) . '"><span>' . $column_display_name . '</span><span class="sorting-indicator"></span></a>';
909
- }
910
-
911
- $id = $with_id ? "id='$column_key'" : '';
912
-
913
- if ( !empty( $class ) )
914
- $class = "class='" . join( ' ', $class ) . "'";
915
-
916
- echo "<th scope='col' $id $class $style>$column_display_name</th>";
917
- }
918
- }
919
-
920
- /**
921
- * Display the table
922
- *
923
- * @since 3.1.0
924
- * @access public
925
- */
926
- public function display() {
927
- $singular = $this->_args['singular'];
928
-
929
- $this->display_tablenav( 'top' );
930
-
931
- ?>
932
- <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
933
- <thead>
934
- <tr>
935
- <?php $this->print_column_headers(); ?>
936
- </tr>
937
- </thead>
938
-
939
- <tbody id="the-list"<?php
940
- if ( $singular ) {
941
- echo " data-wp-lists='list:$singular'";
942
- } ?>>
943
- <?php $this->display_rows_or_placeholder(); ?>
944
- </tbody>
945
-
946
- <tfoot>
947
- <tr>
948
- <?php $this->print_column_headers( false ); ?>
949
- </tr>
950
- </tfoot>
951
-
952
- </table>
953
- <?php
954
- $this->display_tablenav( 'bottom' );
955
- }
956
-
957
- /**
958
- * Get a list of CSS classes for the list table table tag.
959
- *
960
- * @since 3.1.0
961
- * @access protected
962
- *
963
- * @return array List of CSS classes for the table tag.
964
- */
965
- protected function get_table_classes() {
966
- return array( 'widefat', 'fixed', 'striped', $this->_args['plural'] );
967
- }
968
-
969
- /**
970
- * Generate the table navigation above or below the table
971
- *
972
- * @since 3.1.0
973
- * @access protected
974
- * @param string $which
975
- */
976
- protected function display_tablenav( $which ) {
977
- if ( 'top' == $which )
978
- wp_nonce_field( 'bulk-' . $this->_args['plural'] );
979
- ?>
980
- <div class="tablenav <?php echo esc_attr( $which ); ?>">
981
-
982
- <div class="alignleft actions bulkactions">
983
- <?php $this->bulk_actions( $which ); ?>
984
- </div>
985
- <?php
986
- $this->extra_tablenav( $which );
987
- $this->pagination( $which );
988
- ?>
989
-
990
- <br class="clear" />
991
- </div>
992
- <?php
993
- }
994
-
995
- /**
996
- * Extra controls to be displayed between bulk actions and pagination
997
- *
998
- * @since 3.1.0
999
- * @access protected
1000
- *
1001
- * @param string $which
1002
- */
1003
- protected function extra_tablenav( $which ) {}
1004
-
1005
- /**
1006
- * Generate the tbody element for the list table.
1007
- *
1008
- * @since 3.1.0
1009
- * @access public
1010
- */
1011
- public function display_rows_or_placeholder() {
1012
- if ( $this->has_items() ) {
1013
- $this->display_rows();
1014
- } else {
1015
- echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
1016
- $this->no_items();
1017
- echo '</td></tr>';
1018
- }
1019
- }
1020
-
1021
- /**
1022
- * Generate the table rows
1023
- *
1024
- * @since 3.1.0
1025
- * @access public
1026
- */
1027
- public function display_rows() {
1028
- foreach ( $this->items as $item )
1029
- $this->single_row( $item );
1030
- }
1031
-
1032
- /**
1033
- * Generates content for a single row of the table
1034
- *
1035
- * @since 3.1.0
1036
- * @access public
1037
- *
1038
- * @param object $item The current item
1039
- */
1040
- public function single_row( $item ) {
1041
- echo '<tr>';
1042
- $this->single_row_columns( $item );
1043
- echo '</tr>';
1044
- }
1045
-
1046
- protected function column_default( $item, $column_name ) {}
1047
-
1048
- protected function column_cb( $item ) {}
1049
-
1050
- /**
1051
- * Generates the columns for a single row of the table
1052
- *
1053
- * @since 3.1.0
1054
- * @access protected
1055
- *
1056
- * @param object $item The current item
1057
- */
1058
- protected function single_row_columns( $item ) {
1059
- list( $columns, $hidden ) = $this->get_column_info();
1060
-
1061
- foreach ( $columns as $column_name => $column_display_name ) {
1062
- $class = "class='$column_name column-$column_name'";
1063
-
1064
- $style = '';
1065
- if ( in_array( $column_name, $hidden ) )
1066
- $style = ' style="display:none;"';
1067
-
1068
- $attributes = "$class$style";
1069
-
1070
- if ( 'cb' == $column_name ) {
1071
- echo '<th scope="row" class="check-column">';
1072
- echo $this->column_cb( $item );
1073
- echo '</th>';
1074
- }
1075
- elseif ( method_exists( $this, 'column_' . $column_name ) ) {
1076
- echo "<td $attributes>";
1077
- echo call_user_func( array( $this, 'column_' . $column_name ), $item );
1078
- echo "</td>";
1079
- }
1080
- else {
1081
- echo "<td $attributes>";
1082
- echo $this->column_default( $item, $column_name );
1083
- echo "</td>";
1084
- }
1085
- }
1086
- }
1087
-
1088
- /**
1089
- * Handle an incoming ajax request (called from admin-ajax.php)
1090
- *
1091
- * @since 3.1.0
1092
- * @access public
1093
- */
1094
- public function ajax_response() {
1095
- $this->prepare_items();
1096
-
1097
- ob_start();
1098
- if ( ! empty( $_REQUEST['no_placeholder'] ) ) {
1099
- $this->display_rows();
1100
- } else {
1101
- $this->display_rows_or_placeholder();
1102
- }
1103
-
1104
- $rows = ob_get_clean();
1105
-
1106
- $response = array( 'rows' => $rows );
1107
-
1108
- if ( isset( $this->_pagination_args['total_items'] ) ) {
1109
- $response['total_items_i18n'] = sprintf(
1110
- _n( '1 item', '%s items', $this->_pagination_args['total_items'] ),
1111
- number_format_i18n( $this->_pagination_args['total_items'] )
1112
- );
1113
- }
1114
- if ( isset( $this->_pagination_args['total_pages'] ) ) {
1115
- $response['total_pages'] = $this->_pagination_args['total_pages'];
1116
- $response['total_pages_i18n'] = number_format_i18n( $this->_pagination_args['total_pages'] );
1117
- }
1118
-
1119
- die( wp_json_encode( $response ) );
1120
- }
1121
-
1122
- /**
1123
- * Send required variables to JavaScript land
1124
- *
1125
- * @access public
1126
- */
1127
- public function _js_vars() {
1128
- $args = array(
1129
- 'class' => get_class( $this ),
1130
- 'screen' => array(
1131
- 'id' => $this->screen->id,
1132
- 'base' => $this->screen->base,
1133
- )
1134
- );
1135
-
1136
- printf( "<script type='text/javascript'>list_args = %s;</script>\n", wp_json_encode( $args ) );
1137
- }
1138
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ipn/swpm_handle_subsc_ipn.php CHANGED
@@ -162,6 +162,10 @@ function swpm_handle_subsc_cancel_stand_alone($ipn_data, $refund = false) {
162
  $updatedb = $wpdb->prepare("UPDATE $members_table_name SET account_state=%s WHERE member_id=%s", $account_state, $member_id);
163
  $resultset = $wpdb->query($updatedb);
164
  swpm_debug_log_subsc("Subscription cancellation received! Member account deactivated. Member ID: " . $member_id, true);
 
 
 
 
165
  } else {
166
  swpm_debug_log_subsc("No member found for the given subscriber ID: " . $subscr_id, false);
167
  return;
@@ -184,6 +188,9 @@ function swpm_update_member_subscription_start_date_if_applicable($ipn_data) {
184
  $current_primary_level = $query_db->membership_level;
185
  swpm_debug_log_subsc("Found a record in the member table. The Member ID of the account to check is: " . $swpm_id . " Membership Level: " . $current_primary_level, true);
186
 
 
 
 
187
  $subscription_starts = (date("Y-m-d"));
188
 
189
  $updatedb = $wpdb->prepare("UPDATE $members_table_name SET account_state=%s,subscription_starts=%s WHERE member_id=%d", $account_state, $subscription_starts, $swpm_id);
162
  $updatedb = $wpdb->prepare("UPDATE $members_table_name SET account_state=%s WHERE member_id=%s", $account_state, $member_id);
163
  $resultset = $wpdb->query($updatedb);
164
  swpm_debug_log_subsc("Subscription cancellation received! Member account deactivated. Member ID: " . $member_id, true);
165
+
166
+ $ipn_data['member_id'] = $member_id;
167
+ do_action('swpm_subscription_payment_cancelled', $ipn_data);//Hook for recurring payment received
168
+
169
  } else {
170
  swpm_debug_log_subsc("No member found for the given subscriber ID: " . $subscr_id, false);
171
  return;
188
  $current_primary_level = $query_db->membership_level;
189
  swpm_debug_log_subsc("Found a record in the member table. The Member ID of the account to check is: " . $swpm_id . " Membership Level: " . $current_primary_level, true);
190
 
191
+ $ipn_data['member_id'] = $swpm_id;
192
+ do_action('swpm_recurring_payment_received', $ipn_data);//Hook for recurring payment received
193
+
194
  $subscription_starts = (date("Y-m-d"));
195
 
196
  $updatedb = $wpdb->prepare("UPDATE $members_table_name SET account_state=%s,subscription_starts=%s WHERE member_id=%d", $account_state, $subscription_starts, $swpm_id);
languages/swpm-da_DA.mo DELETED
Binary file
languages/swpm-da_DA.po DELETED
@@ -1,934 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Simple Membership\n"
4
- "POT-Creation-Date: 2015-01-27 14:50+1000\n"
5
- "PO-Revision-Date: 2015-02-07 20:18+0100\n"
6
- "Last-Translator: \n"
7
- "Language-Team: \n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "X-Generator: Poedit 1.7.4\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
- "Language: da_DK\n"
16
- "X-Poedit-SearchPath-0: .\n"
17
-
18
- #: simple-membership/classes/class.bAccessControl.php:21
19
- #: simple-membership/classes/class.bAccessControl.php:28
20
- #: simple-membership/classes/class.bAccessControl.php:48
21
- msgid "You need to login to view this content. "
22
- msgstr "Du skal logge ind for at se dette indhold."
23
-
24
- #: simple-membership/classes/class.bAccessControl.php:35
25
- #: simple-membership/classes/class.bAccessControl.php:39
26
- #: simple-membership/classes/class.bAccessControl.php:54
27
- msgid "You are not allowed to view this content"
28
- msgstr "Du har ikke tilladelse til at se dette indhold."
29
-
30
- #: simple-membership/classes/class.bAccessControl.php:72
31
- msgid "You do no have permission to view rest of the content"
32
- msgstr "Du har ikke tilladelse til at se resten af indholdet."
33
-
34
- #: simple-membership/classes/class.bAccessControl.php:76
35
- #: simple-membership/classes/class.bAccessControl.php:94
36
- msgid "You need to login to view the rest of the content. "
37
- msgstr "Du skal logge ind for at se resten af indholdet."
38
-
39
- #: simple-membership/classes/class.bAdminRegistration.php:49
40
- msgid "Registration Successful."
41
- msgstr "Du er nu registreret."
42
-
43
- #: simple-membership/classes/class.bAdminRegistration.php:54
44
- #: simple-membership/classes/class.bAdminRegistration.php:89
45
- #: simple-membership/classes/class.bMembershipLevel.php:42
46
- #: simple-membership/classes/class.bMembershipLevel.php:60
47
- msgid "Please correct the following:"
48
- msgstr "Korriger venligst følgende:"
49
-
50
- #: simple-membership/classes/class.bAjax.php:17
51
- #: simple-membership/classes/class.bAjax.php:28
52
- msgid "Aready taken"
53
- msgstr "Anvendes allerede af en anden."
54
-
55
- #: simple-membership/classes/class.bAjax.php:29
56
- msgid "Available"
57
- msgstr "Ledig"
58
-
59
- #: simple-membership/classes/class.bAuth.php:46
60
- #: simple-membership/classes/class.bFrontRegistration.php:173
61
- msgid "User Not Found."
62
- msgstr "Bruger ikke fundet."
63
-
64
- #: simple-membership/classes/class.bAuth.php:53
65
- msgid "Password Empty or Invalid."
66
- msgstr "Kodeord er tomt eller ugyldigt."
67
-
68
- #: simple-membership/classes/class.bAuth.php:76
69
- msgid "Account is inactive."
70
- msgstr "Kontoen er inaktiv."
71
-
72
- #: simple-membership/classes/class.bAuth.php:93
73
- msgid "Account has expired."
74
- msgstr "Kontoen er udløbet."
75
-
76
- #: simple-membership/classes/class.bAuth.php:100
77
- msgid "You are logged in as:"
78
- msgstr "Du er logget ind som:"
79
-
80
- #: simple-membership/classes/class.bAuth.php:139
81
- msgid "Logged Out Successfully."
82
- msgstr "Du er nu logget ud."
83
-
84
- #: simple-membership/classes/class.bAuth.php:186
85
- msgid "Session Expired."
86
- msgstr "Session udløbet."
87
-
88
- #: simple-membership/classes/class.bAuth.php:194
89
- msgid "Invalid User Name"
90
- msgstr "Ugyldigt brugernavn"
91
-
92
- #: simple-membership/classes/class.bAuth.php:202
93
- msgid "Sorry! Something went wrong"
94
- msgstr "Beklager. Noget gik galt."
95
-
96
- #: simple-membership/classes/class.bCategoryList.php:15
97
- #: simple-membership/classes/class.bMembers.php:21
98
- #: simple-membership/classes/class.bMembershipLevels.php:8
99
- #: simple-membership/classes/class.bMembershipLevels.php:17
100
- #: simple-membership/views/add.php:30
101
- #: simple-membership/views/admin_member_form_common_part.php:2
102
- #: simple-membership/views/edit.php:52
103
- msgid "Membership Level"
104
- msgstr "Medlemskatergori"
105
-
106
- #: simple-membership/classes/class.bCategoryList.php:16
107
- #: simple-membership/classes/class.bMembershipLevels.php:9
108
- #: simple-membership/classes/class.simple-wp-membership.php:464
109
- msgid "Membership Levels"
110
- msgstr "Medlemskategorier"
111
-
112
- #: simple-membership/classes/class.bCategoryList.php:29
113
- #: simple-membership/classes/class.bMembers.php:16
114
- #: simple-membership/classes/class.bMembershipLevels.php:16
115
- msgid "ID"
116
- msgstr "ID"
117
-
118
- #: simple-membership/classes/class.bCategoryList.php:30
119
- msgid "Name"
120
- msgstr "Navn"
121
-
122
- #: simple-membership/classes/class.bCategoryList.php:31
123
- msgid "Description"
124
- msgstr "Beskrivelse"
125
-
126
- #: simple-membership/classes/class.bCategoryList.php:32
127
- msgid "Count"
128
- msgstr "Antal"
129
-
130
- #: simple-membership/classes/class.bCategoryList.php:63
131
- msgid "Updated! "
132
- msgstr "Opdateret."
133
-
134
- #: simple-membership/classes/class.bForm.php:26
135
- msgid ""
136
- "Wordpress account exists with given user name. But given email doesn't match."
137
- msgstr "Wordpress kontoen er oprettet, men email adressen matcher ikke."
138
-
139
- #: simple-membership/classes/class.bForm.php:31
140
- msgid ""
141
- "Wordpress account exists with given email. But given user name doesn't match."
142
- msgstr "Email adressen matcher en Wordpress konto, men ikke denne."
143
-
144
- #: simple-membership/classes/class.bForm.php:40
145
- msgid "User name is required"
146
- msgstr "Brugernavn er påkrævet"
147
-
148
- #: simple-membership/classes/class.bForm.php:44
149
- msgid "User name contains invalid character"
150
- msgstr "Brugernavn indeholder ugyldige karakterer."
151
-
152
- #: simple-membership/classes/class.bForm.php:52
153
- msgid "User name already exists."
154
- msgstr "Brugernavnet eksisterer allerede."
155
-
156
- #: simple-membership/classes/class.bForm.php:75
157
- msgid "Password is required"
158
- msgstr "Kodeord er påkrævet."
159
-
160
- #: simple-membership/classes/class.bForm.php:82
161
- msgid "Password mismatch"
162
- msgstr "Kodeordene matcher ikke."
163
-
164
- #: simple-membership/classes/class.bForm.php:98
165
- msgid "Email is required"
166
- msgstr "Email er påkrævet."
167
-
168
- #: simple-membership/classes/class.bForm.php:102
169
- msgid "Email is invalid"
170
- msgstr "Ugyldig email."
171
-
172
- #: simple-membership/classes/class.bForm.php:118
173
- msgid "Email is already used."
174
- msgstr "Email er allerede i brug."
175
-
176
- #: simple-membership/classes/class.bForm.php:184
177
- msgid "Member since field is invalid"
178
- msgstr "Medlem siden feltet er ugyldigt."
179
-
180
- #: simple-membership/classes/class.bForm.php:195
181
- msgid "Access starts field is invalid"
182
- msgstr "Adgangsfeltet er ugyldigt."
183
-
184
- #: simple-membership/classes/class.bForm.php:205
185
- msgid "Gender field is invalid"
186
- msgstr "Kønsfeltet er ugyldigt."
187
-
188
- #: simple-membership/classes/class.bForm.php:216
189
- msgid "Account state field is invalid"
190
- msgstr "Kontostatus feltet er ugyldigt."
191
-
192
- #: simple-membership/classes/class.bForm.php:223
193
- msgid "Invalid membership level"
194
- msgstr "Ugyldigt medlemskategori."
195
-
196
- #: simple-membership/classes/class.bFrontRegistration.php:61
197
- msgid "Registration Successful. "
198
- msgstr "Registrering fuldendt."
199
-
200
- #: simple-membership/classes/class.bFrontRegistration.php:61
201
- #: simple-membership/classes/class.bSettings.php:367
202
- msgid "Please"
203
- msgstr "Venligst"
204
-
205
- #: simple-membership/classes/class.bFrontRegistration.php:61
206
- #: simple-membership/classes/class.bSettings.php:367
207
- #: simple-membership/views/login.php:21
208
- msgid "Login"
209
- msgstr "Login"
210
-
211
- #: simple-membership/classes/class.bFrontRegistration.php:72
212
- #: simple-membership/classes/class.bFrontRegistration.php:152
213
- msgid "Please correct the following"
214
- msgstr "Ret venligst følgende:"
215
-
216
- #: simple-membership/classes/class.bFrontRegistration.php:106
217
- msgid "Membership Level Couldn't be found."
218
- msgstr "Medlemskategorien findes ikke."
219
-
220
- #: simple-membership/classes/class.bFrontRegistration.php:162
221
- msgid "Email Address Not Valid."
222
- msgstr "Email adressen er ugyldig."
223
-
224
- #: simple-membership/classes/class.bFrontRegistration.php:193
225
- msgid "New password has been sent to your email address."
226
- msgstr "Et nyt kodeord er blevet sendt til din email adresse."
227
-
228
- #: simple-membership/classes/class.bLevelForm.php:47
229
- msgid "Date format is not valid."
230
- msgstr "Datoformatet er ugyldigt."
231
-
232
- #: simple-membership/classes/class.bLevelForm.php:54
233
- msgid "Access duration must be > 0."
234
- msgstr "Tidsbegrænsningen skal være større end 0."
235
-
236
- #: simple-membership/classes/class.bMembers.php:7
237
- msgid "Member"
238
- msgstr "Medlem"
239
-
240
- #: simple-membership/classes/class.bMembers.php:8
241
- #: simple-membership/classes/class.simple-wp-membership.php:462
242
- msgid "Members"
243
- msgstr "Medlemmer"
244
-
245
- #: simple-membership/classes/class.bMembers.php:17
246
- #: simple-membership/views/add.php:6 simple-membership/views/edit.php:4
247
- msgid "User Name"
248
- msgstr "Brugernavn"
249
-
250
- #: simple-membership/classes/class.bMembers.php:18
251
- #: simple-membership/views/add.php:22
252
- #: simple-membership/views/admin_member_form_common_part.php:15
253
- #: simple-membership/views/edit.php:20
254
- msgid "First Name"
255
- msgstr "Fornavn"
256
-
257
- #: simple-membership/classes/class.bMembers.php:19
258
- #: simple-membership/views/add.php:26
259
- #: simple-membership/views/admin_member_form_common_part.php:19
260
- #: simple-membership/views/edit.php:24
261
- msgid "Last Name"
262
- msgstr "Efternavn"
263
-
264
- #: simple-membership/classes/class.bMembers.php:20
265
- #: simple-membership/views/add.php:10 simple-membership/views/edit.php:8
266
- msgid "Email"
267
- msgstr "Email"
268
-
269
- #: simple-membership/classes/class.bMembers.php:22
270
- #: simple-membership/views/admin_member_form_common_part.php:11
271
- msgid "Access Starts"
272
- msgstr "Adgang starter"
273
-
274
- #: simple-membership/classes/class.bMembers.php:23
275
- msgid "Account State"
276
- msgstr "Konto status"
277
-
278
- #: simple-membership/classes/class.bMembers.php:35
279
- #: simple-membership/classes/class.bMembershipLevels.php:29
280
- msgid "Delete"
281
- msgstr "Slet"
282
-
283
- #: simple-membership/classes/class.bMembers.php:101
284
- msgid "No Member found."
285
- msgstr "Ingen medlemmer fundet."
286
-
287
- #: simple-membership/classes/class.bMembershipLevel.php:37
288
- msgid "Membership Level Creation Successful."
289
- msgstr "Oprettelsen af medlem er fuldendt."
290
-
291
- #: simple-membership/classes/class.bMembershipLevel.php:56
292
- msgid "Updated Successfully."
293
- msgstr "Opdatering er fuldendt."
294
-
295
- #: simple-membership/classes/class.bMembershipLevels.php:18
296
- msgid "Role"
297
- msgstr "Rolle"
298
-
299
- #: simple-membership/classes/class.bMembershipLevels.php:19
300
- msgid "Access Valid For/Until"
301
- msgstr "Adgang gyldig i / indtil"
302
-
303
- #: simple-membership/classes/class.bSettings.php:30
304
- msgid "Plugin Documentation"
305
- msgstr "Plugin dokumentation"
306
-
307
- #: simple-membership/classes/class.bSettings.php:32
308
- msgid "General Settings"
309
- msgstr "Generel opsætning"
310
-
311
- #: simple-membership/classes/class.bSettings.php:34
312
- msgid "Enable Free Membership"
313
- msgstr "Tillad gratis medlemskab."
314
-
315
- #: simple-membership/classes/class.bSettings.php:37
316
- msgid "Enable/disable registration for free membership level"
317
- msgstr "Tillad / stop registrering af gratismedlemskaber."
318
-
319
- #: simple-membership/classes/class.bSettings.php:38
320
- msgid "Free Membership Level ID"
321
- msgstr "Gratis medlemskab niveau"
322
-
323
- #: simple-membership/classes/class.bSettings.php:41
324
- msgid "Assign free membership level ID"
325
- msgstr "Tildel gratis medlemskab niveau"
326
-
327
- #: simple-membership/classes/class.bSettings.php:42
328
- msgid "Enable More Tag Protection"
329
- msgstr "Tillad beskyttelse af flere tags."
330
-
331
- #: simple-membership/classes/class.bSettings.php:45
332
- msgid ""
333
- "Enables or disables \"more\" tag protection in the posts and pages. Anything "
334
- "after the More tag is protected. Anything before the more tag is teaser "
335
- "content."
336
- msgstr ""
337
- "Tillad eller stop \"more\" tag beskyttelse in indlæg og sider. Alt efter "
338
- "'mere' tag vil være beskyttet. Alt før 'mere' tag kan ses."
339
-
340
- #: simple-membership/classes/class.bSettings.php:46
341
- msgid "Hide Adminbar"
342
- msgstr "Skjul administrationsværktøjslinie"
343
-
344
- #: simple-membership/classes/class.bSettings.php:49
345
- msgid ""
346
- "WordPress shows an admin toolbar to the logged in users of the site. Check "
347
- "this box if you want to hide that admin toolbar in the fronend of your site."
348
- msgstr ""
349
- "WordPress viser en administrationsværktøjslinie til brugere der er logget på "
350
- "på denne side. Marker hvis du ønsker at skjule administrationsværktøjslinien."
351
-
352
- #: simple-membership/classes/class.bSettings.php:51
353
- msgid "Default Account Status"
354
- msgstr "Normalt konto status"
355
-
356
- #: simple-membership/classes/class.bSettings.php:56
357
- msgid ""
358
- "Select the default account status for newly registered users. If you want to "
359
- "manually approve the members then you can set the status to \"Pending\"."
360
- msgstr ""
361
- "Vælg den normale konto status for nyregistrerede brugere. Hvis du ønsker at "
362
- "godkende medlemmerne manuelt, kan du sætte status som \"Afventer\"."
363
-
364
- #: simple-membership/classes/class.bSettings.php:62
365
- msgid "Pages Settings"
366
- msgstr "Sideopsætning"
367
-
368
- #: simple-membership/classes/class.bSettings.php:64
369
- msgid "Login Page URL"
370
- msgstr "Login side URL"
371
-
372
- #: simple-membership/classes/class.bSettings.php:68
373
- msgid "Registration Page URL"
374
- msgstr "Registreringsside URL"
375
-
376
- #: simple-membership/classes/class.bSettings.php:72
377
- msgid "Join Us Page URL"
378
- msgstr "Bliv medlem side URL"
379
-
380
- #: simple-membership/classes/class.bSettings.php:76
381
- msgid "Edit Profile Page URL"
382
- msgstr "Skift profilside URL"
383
-
384
- #: simple-membership/classes/class.bSettings.php:80
385
- msgid "Password Reset Page URL"
386
- msgstr "Kodeord reset side URL"
387
-
388
- #: simple-membership/classes/class.bSettings.php:85
389
- msgid "Test & Debug Settings"
390
- msgstr "Test & fejlrettelser indstillinger"
391
-
392
- #: simple-membership/classes/class.bSettings.php:91
393
- msgid "Enable Sandbox Testing"
394
- msgstr "Tillad sandbox test"
395
-
396
- #: simple-membership/classes/class.bSettings.php:94
397
- msgid "Enable this option if you want to do sandbox payment testing."
398
- msgstr "Tillad denne hvis du vil teste i sandbox."
399
-
400
- #: simple-membership/classes/class.bSettings.php:104
401
- msgid "Email Misc. Settings"
402
- msgstr "Diverse email indstillinger"
403
-
404
- #: simple-membership/classes/class.bSettings.php:106
405
- msgid "From Email Address"
406
- msgstr "Afsender email adresse"
407
-
408
- #: simple-membership/classes/class.bSettings.php:111
409
- msgid "Email Settings (Prompt to Complete Registration )"
410
- msgstr "Email indstillinger (spørg for at færdiggøre registrering)"
411
-
412
- #: simple-membership/classes/class.bSettings.php:113
413
- #: simple-membership/classes/class.bSettings.php:124
414
- #: simple-membership/classes/class.bSettings.php:143
415
- msgid "Email Subject"
416
- msgstr "Email emne"
417
-
418
- #: simple-membership/classes/class.bSettings.php:117
419
- #: simple-membership/classes/class.bSettings.php:128
420
- #: simple-membership/classes/class.bSettings.php:147
421
- msgid "Email Body"
422
- msgstr "Email tekst"
423
-
424
- #: simple-membership/classes/class.bSettings.php:122
425
- msgid "Email Settings (Registration Complete)"
426
- msgstr "Email indstillinger (fuldendt registrering)"
427
-
428
- #: simple-membership/classes/class.bSettings.php:132
429
- msgid "Send Notification To Admin"
430
- msgstr "Send besked til administrator"
431
-
432
- #: simple-membership/classes/class.bSettings.php:136
433
- msgid "Send Email to Member When Added via Admin Dashboard"
434
- msgstr "Send email til medlem som tilføjes via administrationskontrolpanelet."
435
-
436
- #: simple-membership/classes/class.bSettings.php:141
437
- msgid " Email Settings (Account Upgrade Notification)"
438
- msgstr "Email indstillinger (besked om kontoopgradering)"
439
-
440
- #: simple-membership/classes/class.bSettings.php:367
441
- msgid "Not a Member?"
442
- msgstr "Ikke medlem?"
443
-
444
- #: simple-membership/classes/class.bSettings.php:367
445
- #: simple-membership/views/login.php:27
446
- msgid "Join Us"
447
- msgstr "Meld dig ind"
448
-
449
- #: simple-membership/classes/class.bUtils.php:63
450
- msgid "Active"
451
- msgstr "Aktiv"
452
-
453
- #: simple-membership/classes/class.bUtils.php:64
454
- msgid "Inactive"
455
- msgstr "Inaktiv"
456
-
457
- #: simple-membership/classes/class.bUtils.php:65
458
- msgid "Pending"
459
- msgstr "Afventer"
460
-
461
- #: simple-membership/classes/class.bUtils.php:66
462
- msgid "Expired"
463
- msgstr "Udløbet"
464
-
465
- #: simple-membership/classes/class.bUtils.php:251
466
- msgid "Never"
467
- msgstr "Aldrig"
468
-
469
- #: simple-membership/classes/class.miscUtils.php:51
470
- msgid "Registration"
471
- msgstr "Registrering"
472
-
473
- #: simple-membership/classes/class.miscUtils.php:74
474
- msgid "Member Login"
475
- msgstr "Medlemslogin"
476
-
477
- #: simple-membership/classes/class.miscUtils.php:97
478
- msgid "Profile"
479
- msgstr "Profil"
480
-
481
- #: simple-membership/classes/class.miscUtils.php:120
482
- msgid "Password Reset"
483
- msgstr "Kodeord reset"
484
-
485
- #: simple-membership/classes/class.simple-wp-membership.php:184
486
- msgid "You are not logged in."
487
- msgstr "Du er ikke logget ind."
488
-
489
- #: simple-membership/classes/class.simple-wp-membership.php:215
490
- msgid "Simple WP Membership Protection"
491
- msgstr "Simple WP Membership beskyttelse"
492
-
493
- #: simple-membership/classes/class.simple-wp-membership.php:228
494
- msgid "Simple Membership Protection options"
495
- msgstr "Simple Membership Protection valgmuligheder"
496
-
497
- #: simple-membership/classes/class.simple-wp-membership.php:244
498
- msgid "Do you want to protect this content?"
499
- msgstr "Vil du beskytte dette indhold?"
500
-
501
- #: simple-membership/classes/class.simple-wp-membership.php:249
502
- msgid "Select the membership level that can access this content:"
503
- msgstr "Vælg medlemskategori der kan tilgå dette indhold:"
504
-
505
- #: simple-membership/classes/class.simple-wp-membership.php:459
506
- msgid "WP Membership"
507
- msgstr "WP medlemskab"
508
-
509
- #: simple-membership/classes/class.simple-wp-membership.php:466
510
- msgid "Settings"
511
- msgstr "Indstillinger"
512
-
513
- #: simple-membership/classes/class.simple-wp-membership.php:468
514
- msgid "Add-ons"
515
- msgstr "Plugin"
516
-
517
- #: simple-membership/views/add.php:14 simple-membership/views/admin_add.php:19
518
- #: simple-membership/views/admin_edit.php:17
519
- #: simple-membership/views/edit.php:12 simple-membership/views/login.php:11
520
- msgid "Password"
521
- msgstr "Kodeord"
522
-
523
- #: simple-membership/views/add.php:18 simple-membership/views/edit.php:16
524
- msgid "Repeat Password"
525
- msgstr "Gentag kodeord"
526
-
527
- #: simple-membership/views/add.php:37
528
- msgid "Register"
529
- msgstr "Registrer"
530
-
531
- #: simple-membership/views/admin_add.php:6
532
- msgid "Add Member"
533
- msgstr "Tilmeld medlem"
534
-
535
- #: simple-membership/views/admin_add.php:7
536
- msgid "Create a brand new user and add it to this site."
537
- msgstr "Tilmeld helt ny bruger til denne hjemmeside."
538
-
539
- #: simple-membership/views/admin_add.php:11
540
- msgid "User name"
541
- msgstr "Brugernavn"
542
-
543
- #: simple-membership/views/admin_add.php:11
544
- #: simple-membership/views/admin_add.php:15
545
- #: simple-membership/views/admin_add_level.php:11
546
- #: simple-membership/views/admin_add_level.php:15
547
- #: simple-membership/views/admin_add_level.php:19
548
- #: simple-membership/views/admin_edit.php:9
549
- #: simple-membership/views/admin_edit.php:13
550
- #: simple-membership/views/admin_edit_level.php:10
551
- #: simple-membership/views/admin_edit_level.php:14
552
- #: simple-membership/views/admin_edit_level.php:18
553
- msgid "(required)"
554
- msgstr "(påkrævet)"
555
-
556
- #: simple-membership/views/admin_add.php:15
557
- #: simple-membership/views/admin_edit.php:13
558
- msgid "E-mail"
559
- msgstr "Email"
560
-
561
- #: simple-membership/views/admin_add.php:19
562
- msgid "(twice, required)"
563
- msgstr "(to gange, påkrævet)"
564
-
565
- #: simple-membership/views/admin_add.php:24
566
- #: simple-membership/views/admin_edit.php:21
567
- msgid "Strength indicator"
568
- msgstr "Styrkeindikator"
569
-
570
- #: simple-membership/views/admin_add.php:25
571
- #: simple-membership/views/admin_edit.php:22
572
- msgid ""
573
- "Hint: The password should be at least seven characters long. To make it "
574
- "stronger, use upper and lower case letters, numbers and symbols like ! \" ? "
575
- "$ % ^ &amp; )."
576
- msgstr ""
577
- "Råd: Kodeordet skal være mindst syv karakterer langt. For at gøre det "
578
- "stærkere, brug store og små bogstaver, tal og symboler som ! \" ? $ % ^ "
579
- "&amp; )."
580
-
581
- #: simple-membership/views/admin_add.php:29
582
- #: simple-membership/views/admin_edit.php:26
583
- #: simple-membership/views/loggedin.php:7
584
- msgid "Account Status"
585
- msgstr "Kontostatus"
586
-
587
- #: simple-membership/views/admin_add.php:36
588
- msgid "Add New Member "
589
- msgstr "Tilmeld nyt medlem"
590
-
591
- #: simple-membership/views/admin_addon_settings.php:2
592
- #: simple-membership/views/admin_payment_settings.php:2
593
- #: simple-membership/views/admin_settings.php:2
594
- #: simple-membership/views/admin_tools_settings.php:2
595
- msgid "Simple WP Membership::Settings"
596
- msgstr "Simple WP Membership indstillinger"
597
-
598
- #: simple-membership/views/admin_addon_settings.php:7
599
- msgid ""
600
- "Some of the simple membership plugin's addon settings and options will be "
601
- "displayed here (if you have them)"
602
- msgstr ""
603
- "Nogle af de Simple Membership plugin indstillinger vil blive vist her (hvis "
604
- "du har dem)."
605
-
606
- #: simple-membership/views/admin_add_level.php:6
607
- msgid "Create new membership level."
608
- msgstr "Opret ny medlemskategori."
609
-
610
- #: simple-membership/views/admin_add_level.php:11
611
- #: simple-membership/views/admin_edit_level.php:10
612
- msgid "Membership Level Name"
613
- msgstr "Medlemskategori navn"
614
-
615
- #: simple-membership/views/admin_add_level.php:15
616
- #: simple-membership/views/admin_edit_level.php:14
617
- msgid "Default WordPress Role"
618
- msgstr "Standard WordPress rolle"
619
-
620
- #: simple-membership/views/admin_add_level.php:19
621
- #: simple-membership/views/admin_edit_level.php:18
622
- msgid "Access Duration"
623
- msgstr "Adgangsvarighed"
624
-
625
- #: simple-membership/views/admin_add_level.php:22
626
- msgid "No Expiry (Access for this level will not expire until cancelled"
627
- msgstr ""
628
- "Intet udløb (adgang til denne medlemskategori vil ikke udløbe med mindre den "
629
- "slettes)."
630
-
631
- #: simple-membership/views/admin_add_level.php:23
632
- #: simple-membership/views/admin_add_level.php:25
633
- #: simple-membership/views/admin_add_level.php:27
634
- #: simple-membership/views/admin_add_level.php:29
635
- #: simple-membership/views/admin_edit_level.php:22
636
- #: simple-membership/views/admin_edit_level.php:25
637
- #: simple-membership/views/admin_edit_level.php:28
638
- #: simple-membership/views/admin_edit_level.php:31
639
- msgid "Expire After"
640
- msgstr "Udløber efter"
641
-
642
- #: simple-membership/views/admin_add_level.php:24
643
- #: simple-membership/views/admin_edit_level.php:23
644
- msgid "Days (Access expires after given number of days)"
645
- msgstr "Dage (adgang udløber efter et givent antal dage)"
646
-
647
- #: simple-membership/views/admin_add_level.php:26
648
- msgid "Weeks (Access expires after given number of weeks"
649
- msgstr "Uger (adgang udløber efter et givent antal uger)"
650
-
651
- #: simple-membership/views/admin_add_level.php:28
652
- #: simple-membership/views/admin_edit_level.php:29
653
- msgid "Months (Access expires after given number of months)"
654
- msgstr "Måneder (adgang udløber efter et givent antal måneder)"
655
-
656
- #: simple-membership/views/admin_add_level.php:30
657
- #: simple-membership/views/admin_edit_level.php:32
658
- msgid "Years (Access expires after given number of years)"
659
- msgstr "År (adgang udløber efter et givent antal år)"
660
-
661
- #: simple-membership/views/admin_add_level.php:31
662
- #: simple-membership/views/admin_edit_level.php:34
663
- msgid "Fixed Date Expiry"
664
- msgstr "Fast udløbsdato"
665
-
666
- #: simple-membership/views/admin_add_level.php:32
667
- #: simple-membership/views/admin_edit_level.php:35
668
- msgid "(Access expires on a fixed date)"
669
- msgstr "(Adgang udløber på en bestemt dato)"
670
-
671
- #: simple-membership/views/admin_add_level.php:36
672
- msgid "Access to older posts."
673
- msgstr "Adgang til ældre indlæg."
674
-
675
- #: simple-membership/views/admin_add_level.php:39
676
- msgid "Only allow access to posts published after the user's join date."
677
- msgstr "Tillad kun adgang til indlæg udgivet efter brugerens indmeldelsesdato."
678
-
679
- #: simple-membership/views/admin_add_level.php:45
680
- msgid "Add New Membership Level "
681
- msgstr "Opret ny medlemskategori."
682
-
683
- #: simple-membership/views/admin_add_ons_page.php:6
684
- msgid "Simple WP Membership::Add-ons"
685
- msgstr "Simple WP Membership :: Plugin"
686
-
687
- #: simple-membership/views/admin_category_list.php:2
688
- msgid "Simple WP Membership::Categories"
689
- msgstr "Simple WP Membership :: Kategorier"
690
-
691
- #: simple-membership/views/admin_category_list.php:7
692
- msgid ""
693
- "First of all, globally protect the category on your site by selecting "
694
- "\"General Protection\" from the drop-down box below and then select the "
695
- "categories that should be protected from non-logged in users."
696
- msgstr ""
697
- "Vælg ført global beskyttelse af kategorien på din internetside ved at vælge "
698
- "\"General Protection\" fra dropdown boksen nedenfor, og vælg så de "
699
- "kategorier som skal beskyttes mod brugere, der ikke er logget ind."
700
-
701
- #: simple-membership/views/admin_category_list.php:10
702
- msgid ""
703
- "Next, select an existing membership level from the drop-down box below and "
704
- "then select the categories you want to grant access to (for that particular "
705
- "membership level)."
706
- msgstr ""
707
- "Vælg derefter en eksistererende medlemskategori fra dropdown boksen "
708
- "herunder, og vælg så de kategorier du ønsker at give medlemskategorien "
709
- "adgang til."
710
-
711
- #: simple-membership/views/admin_edit.php:5
712
- msgid "Edit Member"
713
- msgstr "Ret medlem"
714
-
715
- #: simple-membership/views/admin_edit.php:6
716
- msgid "Edit existing member details."
717
- msgstr "Ret eksisterende medlemsindstillinger."
718
-
719
- #: simple-membership/views/admin_edit.php:9
720
- #: simple-membership/views/login.php:5
721
- msgid "Username"
722
- msgstr "Brugernavn"
723
-
724
- #: simple-membership/views/admin_edit.php:17
725
- msgid "(twice, leave empty to retain old password)"
726
- msgstr "(to gange, efterlad tomt for at bevare nuværende kodeord)"
727
-
728
- #: simple-membership/views/admin_edit.php:33
729
- msgid "Notify User"
730
- msgstr "Send besked til bruger"
731
-
732
- #: simple-membership/views/admin_edit.php:40
733
- msgid "Edit User "
734
- msgstr "Ret bruger"
735
-
736
- #: simple-membership/views/admin_edit_level.php:5
737
- msgid "Edit membership level"
738
- msgstr "Ret medlemskategori"
739
-
740
- #: simple-membership/views/admin_edit_level.php:6
741
- msgid "Edit membership level."
742
- msgstr "Ret medlemskategori."
743
-
744
- #: simple-membership/views/admin_edit_level.php:21
745
- msgid "No Expiry (Access for this level will not expire until cancelled)"
746
- msgstr ""
747
- "Intet udløb (adgang til denne kategori udløber ikke med mindre kategorien "
748
- "slettes)."
749
-
750
- #: simple-membership/views/admin_edit_level.php:26
751
- msgid "Weeks (Access expires after given number of weeks)"
752
- msgstr "Uger (adgang udløber efter et givent antal uger)"
753
-
754
- #: simple-membership/views/admin_edit_level.php:40
755
- msgid "Protect Older Posts (optional)"
756
- msgstr "Beskyt ældre indlæg (valgfrit)"
757
-
758
- #: simple-membership/views/admin_edit_level.php:43
759
- msgid ""
760
- "Only allow access to protected posts published after the members's join date."
761
- msgstr ""
762
- "Beskyt kun adgang til beskyttede indlæg udgivet efter medlemmets "
763
- "indmeldelsesdato."
764
-
765
- #: simple-membership/views/admin_edit_level.php:51
766
- msgid "Edit Membership Level "
767
- msgstr "Ret medlemskategori"
768
-
769
- #: simple-membership/views/admin_members.php:2
770
- msgid "Simple WP Membership::Members"
771
- msgstr "Simple WP Membership :: Medlemmer"
772
-
773
- #: simple-membership/views/admin_members.php:3
774
- #: simple-membership/views/admin_members.php:19
775
- #: simple-membership/views/admin_membership_levels.php:20
776
- msgid "Add New"
777
- msgstr "Opret ny"
778
-
779
- #: simple-membership/views/admin_members.php:9
780
- #: simple-membership/views/admin_membership_levels.php:10
781
- msgid "search"
782
- msgstr "søg"
783
-
784
- #: simple-membership/views/admin_membership_levels.php:2
785
- msgid "Simple WP Membership::Membership Levels"
786
- msgstr "Simple WP Membership :: Medlemskategori"
787
-
788
- #: simple-membership/views/admin_membership_level_menu.php:2
789
- msgid "Membership level"
790
- msgstr "Medlemskategori"
791
-
792
- #: simple-membership/views/admin_membership_level_menu.php:3
793
- msgid "Manage Content Production"
794
- msgstr "Håndter indholdsproduktion"
795
-
796
- #: simple-membership/views/admin_membership_level_menu.php:4
797
- msgid "Category Protection"
798
- msgstr "Kategoribeskyttelse"
799
-
800
- #: simple-membership/views/admin_membership_manage.php:17
801
- msgid "Example Content Protection Settings"
802
- msgstr "Eksempel på indstillinger af indholdsbeskyttelse"
803
-
804
- #: simple-membership/views/admin_member_form_common_part.php:23
805
- msgid "Gender"
806
- msgstr "Køn"
807
-
808
- #: simple-membership/views/admin_member_form_common_part.php:30
809
- #: simple-membership/views/edit.php:28
810
- msgid "Phone"
811
- msgstr "Telefon"
812
-
813
- #: simple-membership/views/admin_member_form_common_part.php:34
814
- #: simple-membership/views/edit.php:32
815
- msgid "Street"
816
- msgstr "Gade"
817
-
818
- #: simple-membership/views/admin_member_form_common_part.php:38
819
- #: simple-membership/views/edit.php:36
820
- msgid "City"
821
- msgstr "By"
822
-
823
- #: simple-membership/views/admin_member_form_common_part.php:42
824
- #: simple-membership/views/edit.php:40
825
- msgid "State"
826
- msgstr "Stat"
827
-
828
- #: simple-membership/views/admin_member_form_common_part.php:46
829
- #: simple-membership/views/edit.php:44
830
- msgid "Zipcode"
831
- msgstr "Postnummer"
832
-
833
- #: simple-membership/views/admin_member_form_common_part.php:50
834
- #: simple-membership/views/edit.php:48
835
- msgid "Country"
836
- msgstr "Land"
837
-
838
- #: simple-membership/views/admin_member_form_common_part.php:54
839
- msgid "Company"
840
- msgstr "Virksomhed"
841
-
842
- #: simple-membership/views/admin_member_form_common_part.php:58
843
- msgid "Member Since"
844
- msgstr "Medlem siden"
845
-
846
- #: simple-membership/views/admin_payment_settings.php:33
847
- msgid "PayPal Integration Settings"
848
- msgstr "PayPal integrationsindstillinger"
849
-
850
- #: simple-membership/views/admin_payment_settings.php:36
851
- msgid "Generate the \"Advanced Variables\" Code for your PayPal button"
852
- msgstr "Generer \"avancerede muligheder\" kode til din PayPal knap"
853
-
854
- #: simple-membership/views/admin_payment_settings.php:39
855
- msgid "Enter the Membership Level ID"
856
- msgstr "Indtast medlemskategori ID"
857
-
858
- #: simple-membership/views/admin_payment_settings.php:41
859
- msgid "Generate Code"
860
- msgstr "Generer kode"
861
-
862
- #: simple-membership/views/admin_tools_settings.php:9
863
- msgid "Generate a Registration Completion link"
864
- msgstr "Generer et registrering komplet link"
865
-
866
- #: simple-membership/views/admin_tools_settings.php:12
867
- msgid ""
868
- "You can manually generate a registration completion link here and give it to "
869
- "your customer if they have missed the email that was automatically sent out "
870
- "to them after the payment."
871
- msgstr ""
872
- "Du kan generere et registrering komplet link manuelt her og give det til dit "
873
- "medlem, hvis medlemmet ikke har emailen, som blev sendt automatisk "
874
- "umiddelbart efter betaling."
875
-
876
- #: simple-membership/views/admin_tools_settings.php:17
877
- msgid "Generate Registration Completion Link"
878
- msgstr "Generer registrering komplet link"
879
-
880
- #: simple-membership/views/admin_tools_settings.php:20
881
- msgid "OR"
882
- msgstr "ELLER"
883
-
884
- #: simple-membership/views/admin_tools_settings.php:21
885
- msgid "For All Pending Registrations"
886
- msgstr "For alle afventende registreringer"
887
-
888
- #: simple-membership/views/admin_tools_settings.php:24
889
- msgid "Registration Completion Links Will Appear Below:"
890
- msgstr "Registrering komplet links vil fremgå herunder:"
891
-
892
- #: simple-membership/views/admin_tools_settings.php:31
893
- msgid "Send Registration Reminder Email too"
894
- msgstr "Send også email med registreringspåmindelse"
895
-
896
- #: simple-membership/views/admin_tools_settings.php:34
897
- msgid "Submit"
898
- msgstr "Send"
899
-
900
- #: simple-membership/views/edit.php:58
901
- msgid "Update"
902
- msgstr "Opdater"
903
-
904
- #: simple-membership/views/forgot_password.php:5
905
- msgid "Email Address"
906
- msgstr "Email adresse"
907
-
908
- #: simple-membership/views/forgot_password.php:12
909
- msgid "Reset Password"
910
- msgstr "Opdater kodeord"
911
-
912
- #: simple-membership/views/loggedin.php:3
913
- msgid "Logged in as"
914
- msgstr "Logged ind som"
915
-
916
- #: simple-membership/views/loggedin.php:11
917
- msgid "Membership"
918
- msgstr "Medlemskab"
919
-
920
- #: simple-membership/views/loggedin.php:15
921
- msgid "Account Expiry"
922
- msgstr "Kontoudløb"
923
-
924
- #: simple-membership/views/loggedin.php:19
925
- msgid "Logout"
926
- msgstr "Log ud"
927
-
928
- #: simple-membership/views/login.php:18
929
- msgid "Remember Me"
930
- msgstr "Påmind mig"
931
-
932
- #: simple-membership/views/login.php:24
933
- msgid "Forgot Password"
934
- msgstr "Glemt kodeord"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/swpm-hu_HU.mo ADDED
Binary file
languages/swpm-hu_HU.po ADDED
@@ -0,0 +1,1871 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Simple WordPress Membership\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: Tue May 03 2016 12:35:48 GMT+0200 (Mitteleuropäische "
6
+ "Sommerzeit)\n"
7
+ "PO-Revision-Date: Tue May 10 2016 10:06:55 GMT+0200 (Mitteleuropäische "
8
+ "Sommerzeit)\n"
9
+ "Last-Translator: boltberendezo <hello@boltberendezo.hu>\n"
10
+ "Language-Team: \n"
11
+ "Language: Hungarian\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-Basepath: .\n"
18
+ "X-Poedit-SearchPath-0: ../../plugins/simple-membership\n"
19
+ "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
20
+ "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
21
+ "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
22
+ "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
23
+ "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
24
+ "X-Loco-Target-Locale: hu_HU\n"
25
+ "X-Generator: Loco - https://localise.biz/"
26
+
27
+ #: ../../plugins/simple-membership/views/admin_category_list.php:7
28
+ msgid ""
29
+ "First of all, globally protect the category on your site by selecting "
30
+ "\"General Protection\" from the drop-down box below and then select the "
31
+ "categories that should be protected from non-logged in users."
32
+ msgstr ""
33
+ "Először is általánosan védd le a kategóriát az oldaladon kiválasztva az "
34
+ "\"Általános Védelem\" pontot a drop-down menüből majd válaszd ki a "
35
+ "kategóriákat, amiket amiket a nem bejelentkezett felhasználók elől meg "
36
+ "szeretnél védeni"
37
+
38
+ #: ../../plugins/simple-membership/views/admin_category_list.php:10
39
+ msgid ""
40
+ "Next, select an existing membership level from the drop-down box below and "
41
+ "then select the categories you want to grant access to (for that particular "
42
+ "membership level)."
43
+ msgstr ""
44
+ "Következő, válassz ki egy már létező felhasználói szintet a drop-down "
45
+ "menüből és válaszd ki a kategóriát amelyhez hozzáférést szeretnél "
46
+ "biztosítani a megadott felhasználók számára."
47
+
48
+ #: ../../plugins/simple-membership/views/admin_tools_settings.php:12
49
+ msgid ""
50
+ "You can manually generate a registration completion link here and give it to "
51
+ "your customer if they have missed the email that was automatically sent out "
52
+ "to them after the payment."
53
+ msgstr ""
54
+ "Itt manuálisan is létrehozhatsz regisztráció befejezési linkeket és "
55
+ "elküldheted a vásárlóidnak, ha esetleg nem kapták volna meg az automatikus "
56
+ "emailt, amit a fizetés után küldtél nekik."
57
+
58
+ #: ../../plugins/simple-membership/views/admin_addon_settings.php:8
59
+ msgid ""
60
+ "Some of the simple membership plugin's addon settings and options will be "
61
+ "displayed here (if you have them)"
62
+ msgstr ""
63
+ "Néhány, a simple membership addon beállítások közül (amennyiben rendelkezel "
64
+ "ilyenekkel) itt jelenik meg"
65
+
66
+ #: ../../plugins/simple-membership/views/admin_add_level.php:6
67
+ msgid "Create new membership level."
68
+ msgstr "Új felhasználói szint létrehozása"
69
+
70
+ #: ../../plugins/simple-membership/views/admin_add_level.php:22
71
+ msgid "No Expiry (Access for this level will not expire until cancelled"
72
+ msgstr ""
73
+ "Nincs lejárat ( A hozzáférés, ehhez a szinthez, nem jár le, míg vissza nem "
74
+ "vonod)"
75
+
76
+ #: ../../plugins/simple-membership/views/admin_add_level.php:26
77
+ msgid "Weeks (Access expires after given number of weeks"
78
+ msgstr "Hetek (A hozzáférés a megadott hetek száma után lejár)"
79
+
80
+ #: ../../plugins/simple-membership/views/admin_add_level.php:38
81
+ msgid "Add New Membership Level "
82
+ msgstr "Új felhasználói szint megadása"
83
+
84
+ #: ../../plugins/simple-membership/views/payments/admin_payment_buttons.php:7
85
+ msgid "All the membership buttons that you created in the plugin are displayed here."
86
+ msgstr ""
87
+ "Minden felhasználói fiók gomb, amit létrehoztál a bővítményben itt jelenik "
88
+ "meg."
89
+
90
+ #: ../../plugins/simple-membership/views/payments/admin_edit_payment_buttons.php:12
91
+ msgid "You can edit a payment button using this interface."
92
+ msgstr "Szerkesztheted a fizetési gombot ezt at interfacet használva"
93
+
94
+ #: ../../plugins/simple-membership/views/payments/admin_create_payment_buttons.
95
+ #: php:13
96
+ msgid "You can create new payment button for your memberships using this interface."
97
+ msgstr ""
98
+ "Új fizetési gombot hozhatsz létre a felhasználóid számára, ezt az interfacet "
99
+ "használva."
100
+
101
+ #. Name of the plugin
102
+ msgid "Simple WordPress Membership"
103
+ msgstr "Simple WordPress Tagság"
104
+
105
+ #. URI of the plugin
106
+ msgid "https://simple-membership-plugin.com"
107
+ msgstr "https://simple-membership-plugin.com"
108
+
109
+ #. Author of the plugin
110
+ msgid "smp7, wp.insider"
111
+ msgstr "smp7, wp.insider"
112
+
113
+ #. Description of the plugin
114
+ msgid ""
115
+ "A flexible, well-supported, and easy-to-use WordPress membership plugin for "
116
+ "offering free and premium content from your WordPress site."
117
+ msgstr ""
118
+ "Egy flexibilis, jól támogatott és könnyen használtható WordPress tagsági "
119
+ "bővítmény ingyenes és fizetős tartalmakért a WordPress oldaladon."
120
+
121
+ #: ../../plugins/simple-membership/classes/class.swpm-membership-levels.php:10 ..
122
+ #: ../plugins/simple-membership/classes/class.swpm-membership-levels.php:20 ../..
123
+ #: plugins/simple-membership/classes/class.bMembershipLevels.php:8 ../..
124
+ #: plugins/simple-membership/classes/class.bMembershipLevels.php:17 ../..
125
+ #: plugins/simple-membership/classes/class.bMembers.php:21 ../../plugins/simple-
126
+ #: membership/classes/class.swpm-members.php:23 ../../plugins/simple-
127
+ #: membership/classes/class.bCategoryList.php:19 ../../plugins/simple-
128
+ #: membership/classes/class.swpm-category-list.php:19 ../../plugins/simple-
129
+ #: membership/classes/admin-includes/class.swpm-payments-list-table.php:83 ../..
130
+ #: plugins/simple-membership/views/admin_member_form_common_part.php:2 ../..
131
+ #: plugins/simple-membership/views/edit.php:53 ../../plugins/simple-
132
+ #: membership/views/add.php:30 ../../plugins/simple-
133
+ #: membership/views/payments/payment-gateway/admin_paypal_buy_now_button.php:36 ..
134
+ #: ../plugins/simple-membership/views/payments/payment-
135
+ #: gateway/admin_paypal_buy_now_button.php:218 ../../plugins/simple-
136
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
137
+ #: 37 ../../plugins/simple-membership/views/payments/payment-
138
+ #: gateway/admin_paypal_subscription_button.php:309
139
+ msgid "Membership Level"
140
+ msgstr "Tagsági színt"
141
+
142
+ #: ../../plugins/simple-membership/classes/class.swpm-membership-levels.php:11 ..
143
+ #: ../plugins/simple-membership/classes/class.bMembershipLevels.php:9 ../..
144
+ #: plugins/simple-membership/classes/class.simple-wp-membership.php:492 ../..
145
+ #: plugins/simple-membership/classes/class.simple-wp-membership.php:492 ../..
146
+ #: plugins/simple-membership/classes/class.bCategoryList.php:20 ../..
147
+ #: plugins/simple-membership/classes/class.swpm-category-list.php:20
148
+ msgid "Membership Levels"
149
+ msgstr "Tagsági szintek"
150
+
151
+ #: ../../plugins/simple-membership/classes/class.swpm-membership-levels.php:19 ..
152
+ #: ../plugins/simple-membership/classes/class.bMembershipLevels.php:16 ../..
153
+ #: plugins/simple-membership/classes/class.bMembers.php:16 ../../plugins/simple-
154
+ #: membership/classes/class.swpm-members.php:18 ../../plugins/simple-
155
+ #: membership/classes/class.bCategoryList.php:34
156
+ msgid "ID"
157
+ msgstr "ID"
158
+
159
+ #: ../../plugins/simple-membership/classes/class.swpm-membership-levels.php:21 ..
160
+ #: ../plugins/simple-membership/classes/class.bMembershipLevels.php:18
161
+ msgid "Role"
162
+ msgstr "Szerep"
163
+
164
+ #: ../../plugins/simple-membership/classes/class.swpm-membership-levels.php:22 ..
165
+ #: ../plugins/simple-membership/classes/class.bMembershipLevels.php:19
166
+ msgid "Access Valid For/Until"
167
+ msgstr "Jogosultság érvényes -ig"
168
+
169
+ #: ../../plugins/simple-membership/classes/class.swpm-membership-levels.php:35 ..
170
+ #: ../plugins/simple-membership/classes/class.bMembershipLevels.php:30 ../..
171
+ #: plugins/simple-membership/classes/class.bMembers.php:36 ../../plugins/simple-
172
+ #: membership/classes/class.swpm-members.php:41 ../../plugins/simple-
173
+ #: membership/classes/admin-includes/class.swpm-payment-buttons-list-table.php:87
174
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payments-
175
+ #: list-table.php:100
176
+ msgid "Delete"
177
+ msgstr "Törlés"
178
+
179
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:36 ../..
180
+ #: plugins/simple-membership/classes/class.swpm-settings.php:38
181
+ msgid "Plugin Documentation"
182
+ msgstr "Bővítmény leírása"
183
+
184
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:38 ../..
185
+ #: plugins/simple-membership/classes/class.swpm-settings.php:21 ../..
186
+ #: plugins/simple-membership/classes/class.swpm-settings.php:39
187
+ msgid "General Settings"
188
+ msgstr "Àltalános beállítások"
189
+
190
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:40 ../..
191
+ #: plugins/simple-membership/classes/class.swpm-settings.php:40
192
+ msgid "Enable Free Membership"
193
+ msgstr "Ingyenes tagság engedélyezése"
194
+
195
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:43 ../..
196
+ #: plugins/simple-membership/classes/class.swpm-settings.php:41
197
+ msgid ""
198
+ "Enable/disable registration for free membership level. When you enable this "
199
+ "option, make sure to specify a free membership level ID in the field below."
200
+ msgstr ""
201
+ "Engedélyezi/tiltja az ingyenes regisztrációt. Ha engedélyezed ezt az opciót, "
202
+ "bizonyosodj meg róla, hogy megadod az ingyenes tagsági szint ID kódját is az "
203
+ "alábbi sorban. "
204
+
205
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:44 ../..
206
+ #: plugins/simple-membership/classes/class.swpm-settings.php:42
207
+ msgid "Free Membership Level ID"
208
+ msgstr "Ingyenes tagsági szint ID kódja"
209
+
210
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:47 ../..
211
+ #: plugins/simple-membership/classes/class.swpm-settings.php:43
212
+ msgid "Assign free membership level ID"
213
+ msgstr "Rendeld hozzá az ingyenes tagsági szint ID kóját"
214
+
215
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:48 ../..
216
+ #: plugins/simple-membership/classes/class.swpm-settings.php:44
217
+ msgid "Enable More Tag Protection"
218
+ msgstr "More tag védelem engedélyezése"
219
+
220
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:51 ../..
221
+ #: plugins/simple-membership/classes/class.swpm-settings.php:45
222
+ msgid ""
223
+ "Enables or disables \"more\" tag protection in the posts and pages. Anything "
224
+ "after the More tag is protected. Anything before the more tag is teaser "
225
+ "content."
226
+ msgstr ""
227
+ "Engedélyezi vagy tiltja a \"more\" tag védelmet a bejegyzésekben és az "
228
+ "oldalakon. Minden am ia mora tag után áll, védelem alá kerül. Minden ami a "
229
+ "more tag előtt van, teaserként (ingyenes tartalom) funkcionál"
230
+
231
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:52 ../..
232
+ #: plugins/simple-membership/classes/class.swpm-settings.php:46
233
+ msgid "Hide Adminbar"
234
+ msgstr "Admin sáv elrejtése"
235
+
236
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:55
237
+ msgid ""
238
+ "WordPress shows an admin toolbar to the logged in users of the site. Check "
239
+ "this box if you want to hide that admin toolbar in the fronend of your site."
240
+ msgstr ""
241
+ "WordPress mutatja az admin felület a bejelentkező felhasználók számára. "
242
+ "Pipáld ki a négyzetet, ha el szeretnéd rejteni az admin felületet az "
243
+ "oldaladon."
244
+
245
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:57 ../..
246
+ #: plugins/simple-membership/classes/class.swpm-settings.php:51
247
+ msgid "Default Account Status"
248
+ msgstr "Alapértelmezett felhasználói státusz"
249
+
250
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:62 ../..
251
+ #: plugins/simple-membership/classes/class.swpm-settings.php:54
252
+ msgid ""
253
+ "Select the default account status for newly registered users. If you want to "
254
+ "manually approve the members then you can set the status to \"Pending\"."
255
+ msgstr ""
256
+ "Válaszd ki az alapértelmezett felhasználói státuszt az ú jregisztrálók "
257
+ "számára. Ha manuálisan szeretnéd elfogadni a felhasználókat, akkor állítsd a "
258
+ "státuszt \"függőben\"-re. "
259
+
260
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:63 ../..
261
+ #: plugins/simple-membership/classes/class.swpm-settings.php:158
262
+ msgid "Allow Account Deletion"
263
+ msgstr "Felhasználói fiók törlésének engedélyezése"
264
+
265
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:67 ../..
266
+ #: plugins/simple-membership/classes/class.swpm-settings.php:160
267
+ msgid "Allow users to delete their accounts."
268
+ msgstr "A felhasználó maga is törölheti fiókját."
269
+
270
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:68 ../..
271
+ #: plugins/simple-membership/classes/class.swpm-settings.php:161
272
+ msgid "Auto Delete Pending Account"
273
+ msgstr "Függőben lévő fiókok automatikus törlése"
274
+
275
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:73 ../..
276
+ #: plugins/simple-membership/classes/class.swpm-settings.php:164
277
+ msgid "Select how long you want to keep \"pending\" account."
278
+ msgstr "Válaszd ki, hogy mennyi ideig akarod megtartani, a függőben lévő fiókokat"
279
+
280
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:79 ../..
281
+ #: plugins/simple-membership/classes/class.swpm-settings.php:66
282
+ msgid "Pages Settings"
283
+ msgstr "Oldalak beállításai"
284
+
285
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:81 ../..
286
+ #: plugins/simple-membership/classes/class.swpm-settings.php:67
287
+ msgid "Login Page URL"
288
+ msgstr "Bejelentkező oldal url-je"
289
+
290
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:85 ../..
291
+ #: plugins/simple-membership/classes/class.swpm-settings.php:69
292
+ msgid "Registration Page URL"
293
+ msgstr "Regisztrációs oldal url-je"
294
+
295
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:89 ../..
296
+ #: plugins/simple-membership/classes/class.swpm-settings.php:71
297
+ msgid "Join Us Page URL"
298
+ msgstr "Csatlakozz hozzánk odlal url-je"
299
+
300
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:93 ../..
301
+ #: plugins/simple-membership/classes/class.swpm-settings.php:73
302
+ msgid "Edit Profile Page URL"
303
+ msgstr "Profilom oldal url-je"
304
+
305
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:97 ../..
306
+ #: plugins/simple-membership/classes/class.swpm-settings.php:75
307
+ msgid "Password Reset Page URL"
308
+ msgstr "ÙJ jelszó igénylés url-je"
309
+
310
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:102 ../..
311
+ #: plugins/simple-membership/classes/class.swpm-settings.php:78
312
+ msgid "Test & Debug Settings"
313
+ msgstr "Test és debug beállítások"
314
+
315
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:105 ../..
316
+ #: plugins/simple-membership/classes/class.swpm-settings.php:80
317
+ msgid "Check this option to enable debug logging."
318
+ msgstr "Jelöld be ezt a négyzetet, ha szeretnéd engedélyezni a debug bejelentkezést"
319
+
320
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:112 ../..
321
+ #: plugins/simple-membership/classes/class.swpm-settings.php:85
322
+ msgid "Enable Sandbox Testing"
323
+ msgstr "Sandbox test engedélyezése"
324
+
325
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:115 ../..
326
+ #: plugins/simple-membership/classes/class.swpm-settings.php:86
327
+ msgid "Enable this option if you want to do sandbox payment testing."
328
+ msgstr "Jelöld be a négyzetet, ha szeretnéd engedélyezni a sandbox fizetés tesztjét."
329
+
330
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:125 ../..
331
+ #: plugins/simple-membership/classes/class.swpm-settings.php:101
332
+ msgid "Email Misc. Settings"
333
+ msgstr "Különböző email beállítások"
334
+
335
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:127 ../..
336
+ #: plugins/simple-membership/classes/class.swpm-settings.php:102
337
+ msgid "From Email Address"
338
+ msgstr "Email -től beállítások"
339
+
340
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:132 ../..
341
+ #: plugins/simple-membership/classes/class.swpm-settings.php:105
342
+ msgid "Email Settings (Prompt to Complete Registration )"
343
+ msgstr "Email beállítások (Regisztráció után azonnali email)"
344
+
345
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:134 ../..
346
+ #: plugins/simple-membership/classes/class.bSettings.php:145 ../..
347
+ #: plugins/simple-membership/classes/class.bSettings.php:164 ../..
348
+ #: plugins/simple-membership/classes/class.swpm-settings.php:106 ../..
349
+ #: plugins/simple-membership/classes/class.swpm-settings.php:112 ../..
350
+ #: plugins/simple-membership/classes/class.swpm-settings.php:124 ../..
351
+ #: plugins/simple-membership/classes/class.swpm-settings.php:129 ../..
352
+ #: plugins/simple-membership/classes/class.swpm-settings.php:133
353
+ msgid "Email Subject"
354
+ msgstr "Email tárgya"
355
+
356
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:138 ../..
357
+ #: plugins/simple-membership/classes/class.bSettings.php:149 ../..
358
+ #: plugins/simple-membership/classes/class.bSettings.php:168 ../..
359
+ #: plugins/simple-membership/classes/class.swpm-settings.php:108 ../..
360
+ #: plugins/simple-membership/classes/class.swpm-settings.php:114 ../..
361
+ #: plugins/simple-membership/classes/class.swpm-settings.php:125 ../..
362
+ #: plugins/simple-membership/classes/class.swpm-settings.php:130 ../..
363
+ #: plugins/simple-membership/classes/class.swpm-settings.php:134
364
+ msgid "Email Body"
365
+ msgstr "Email szövege"
366
+
367
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:143 ../..
368
+ #: plugins/simple-membership/classes/class.swpm-settings.php:111
369
+ msgid "Email Settings (Registration Complete)"
370
+ msgstr "Email beállítások (Kész regisztráció)"
371
+
372
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:153
373
+ msgid "Send Notification To Admin"
374
+ msgstr "Küldjön értesítést az adminnak."
375
+
376
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:157 ../..
377
+ #: plugins/simple-membership/classes/class.swpm-settings.php:120
378
+ msgid "Send Email to Member When Added via Admin Dashboard"
379
+ msgstr ""
380
+ "Küldjön értesítést a felhasználónak, ha az admin felületen elfogadásra "
381
+ "került a regisztrációja"
382
+
383
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:162 ../..
384
+ #: plugins/simple-membership/classes/class.swpm-settings.php:128
385
+ msgid " Email Settings (Account Upgrade Notification)"
386
+ msgstr "Email beállítások (Èrtesítés a felhasználói szint aktualizálásáról)"
387
+
388
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:180 ../..
389
+ #: plugins/simple-membership/classes/class.swpm-settings.php:22 ../..
390
+ #: plugins/simple-membership/classes/class.swpm-settings.php:150
391
+ msgid "Advanced Settings"
392
+ msgstr "Haladó beállítások"
393
+
394
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:183 ../..
395
+ #: plugins/simple-membership/classes/class.swpm-settings.php:152
396
+ msgid "Enable Expired Account Login"
397
+ msgstr "Lejárt felhasználói fiókba való belépés negedélyezése"
398
+
399
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:186 ../..
400
+ #: plugins/simple-membership/classes/class.swpm-settings.php:153
401
+ msgid ""
402
+ "When enabled, expired members will be able to log into the system but won't "
403
+ "be able to view any protected content. This allows them to easily renew "
404
+ "their account by making another payment."
405
+ msgstr ""
406
+ "Ha engedélyezed, lejárt fiókú felhasználók is beléphetnek a rendszerbe, de "
407
+ "nem látják majd a védett tartalmakat. Ezzel megkönnyítheted számukra fiókjuk "
408
+ "megújítását és egy újabb fizetés kezdeményezését."
409
+
410
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:274 ../..
411
+ #: plugins/simple-membership/classes/class.swpm-settings.php:96 ../..
412
+ #: plugins/simple-membership/classes/class.swpm-settings.php:145 ../..
413
+ #: plugins/simple-membership/classes/class.swpm-settings.php:255
414
+ msgid "Settings updated!"
415
+ msgstr "Beállítások frissítve!"
416
+
417
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:392 ../..
418
+ #: plugins/simple-membership/classes/class.swpm-front-registration.php:80 ../..
419
+ #: plugins/simple-membership/classes/class.swpm-utils-misc.php:213 ../..
420
+ #: plugins/simple-membership/classes/class.swpm-utils-misc.php:222 ../..
421
+ #: plugins/simple-membership/classes/class.bFrontRegistration.php:61
422
+ msgid "Please"
423
+ msgstr "Kérlek"
424
+
425
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:392 ../..
426
+ #: plugins/simple-membership/classes/class.swpm-front-registration.php:80 ../..
427
+ #: plugins/simple-membership/classes/class.swpm-utils-misc.php:213 ../..
428
+ #: plugins/simple-membership/classes/class.bFrontRegistration.php:61 ../..
429
+ #: plugins/simple-membership/views/login.php:27
430
+ msgid "Login"
431
+ msgstr "Bejelentkezés"
432
+
433
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:392 ../..
434
+ #: plugins/simple-membership/classes/class.swpm-utils-misc.php:213
435
+ msgid "Not a Member?"
436
+ msgstr "Nem vagy még felhasználó?"
437
+
438
+ #: ../../plugins/simple-membership/classes/class.bSettings.php:392 ../..
439
+ #: plugins/simple-membership/classes/class.swpm-utils-misc.php:213 ../..
440
+ #: plugins/simple-membership/views/login.php:33
441
+ msgid "Join Us"
442
+ msgstr "Csatlakozz hozzánk!"
443
+
444
+ #: ../../plugins/simple-membership/classes/class.bMembershipLevel.php:37 ../..
445
+ #: plugins/simple-membership/classes/class.swpm-membership-level.php:38
446
+ msgid "Membership Level Creation Successful."
447
+ msgstr "Felhasználó fiók létrehozása sikerült"
448
+
449
+ #: ../../plugins/simple-membership/classes/class.bMembershipLevel.php:42 ../..
450
+ #: plugins/simple-membership/classes/class.bMembershipLevel.php:61 ../..
451
+ #: plugins/simple-membership/classes/class.bAdminRegistration.php:53 ../..
452
+ #: plugins/simple-membership/classes/class.bAdminRegistration.php:89 ../..
453
+ #: plugins/simple-membership/classes/class.swpm-admin-registration.php:59 ../..
454
+ #: plugins/simple-membership/classes/class.swpm-admin-registration.php:81 ../..
455
+ #: plugins/simple-membership/classes/class.swpm-admin-registration.php:105 ../..
456
+ #: plugins/simple-membership/classes/class.swpm-membership-level.php:43 ../..
457
+ #: plugins/simple-membership/classes/class.swpm-membership-level.php:62
458
+ msgid "Please correct the following:"
459
+ msgstr "Kérlek, javítsd a következőket:"
460
+
461
+ #: ../../plugins/simple-membership/classes/class.bMembershipLevel.php:56 ../..
462
+ #: plugins/simple-membership/classes/class.swpm-membership-level.php:57
463
+ msgid "Updated Successfully."
464
+ msgstr "Frissítés sikeres."
465
+
466
+ #: ../../plugins/simple-membership/classes/class.bUtils.php:72 ../..
467
+ #: plugins/simple-membership/classes/class.swpm-utils.php:67
468
+ msgid "Active"
469
+ msgstr "Aktív"
470
+
471
+ #: ../../plugins/simple-membership/classes/class.bUtils.php:73 ../..
472
+ #: plugins/simple-membership/classes/class.swpm-utils.php:68
473
+ msgid "Inactive"
474
+ msgstr "Inaktív"
475
+
476
+ #: ../../plugins/simple-membership/classes/class.bUtils.php:74 ../..
477
+ #: plugins/simple-membership/classes/class.swpm-utils.php:69
478
+ msgid "Pending"
479
+ msgstr "Függőben"
480
+
481
+ #: ../../plugins/simple-membership/classes/class.bUtils.php:75 ../..
482
+ #: plugins/simple-membership/classes/class.swpm-utils.php:70
483
+ msgid "Expired"
484
+ msgstr "Lejárt"
485
+
486
+ #: ../../plugins/simple-membership/classes/class.bUtils.php:301 ../..
487
+ #: plugins/simple-membership/classes/class.swpm-utils.php:299
488
+ msgid "Never"
489
+ msgstr "Soha"
490
+
491
+ #: ../../plugins/simple-membership/classes/class.bUtils.php:358 ../..
492
+ #: plugins/simple-membership/classes/class.swpm-utils.php:391
493
+ msgid "Delete Account"
494
+ msgstr "Felhasználói fiók törlése"
495
+
496
+ #: ../../plugins/simple-membership/classes/class.bForm.php:26
497
+ msgid "Wordpress account exists with given user name. But given email doesn't match."
498
+ msgstr ""
499
+ "Ilyen felhasználónévvel már létezik Wordpress fiók, de a megadott email nem "
500
+ "hozzá tartozik."
501
+
502
+ #: ../../plugins/simple-membership/classes/class.bForm.php:31
503
+ msgid "Wordpress account exists with given email. But given user name doesn't match."
504
+ msgstr ""
505
+ "Ilyen email címmel már létezik Wordpress fiók, de a megadott felhasználónév "
506
+ "nem hozzá tartozik."
507
+
508
+ #: ../../plugins/simple-membership/classes/class.bForm.php:40
509
+ msgid "User name is required"
510
+ msgstr "Felhasználónév megadása szükséges"
511
+
512
+ #: ../../plugins/simple-membership/classes/class.bForm.php:44
513
+ msgid "User name contains invalid character"
514
+ msgstr "A felhasználónév nem engedélyezett karaktert tartalmaz"
515
+
516
+ #: ../../plugins/simple-membership/classes/class.bForm.php:52
517
+ msgid "User name already exists."
518
+ msgstr "Ez a felhasználónév már létezik"
519
+
520
+ #: ../../plugins/simple-membership/classes/class.bForm.php:75 ../..
521
+ #: plugins/simple-membership/classes/class.swpm-form.php:78
522
+ msgid "Password is required"
523
+ msgstr "Jelszó megadása szükséges"
524
+
525
+ #: ../../plugins/simple-membership/classes/class.bForm.php:82 ../..
526
+ #: plugins/simple-membership/classes/class.swpm-form.php:85
527
+ msgid "Password mismatch"
528
+ msgstr "Jelszó nem egyezik"
529
+
530
+ #: ../../plugins/simple-membership/classes/class.bForm.php:93 ../..
531
+ #: plugins/simple-membership/classes/class.swpm-form.php:96
532
+ msgid "Email is required"
533
+ msgstr "Email cím megadása szükséges"
534
+
535
+ #: ../../plugins/simple-membership/classes/class.bForm.php:97 ../..
536
+ #: plugins/simple-membership/classes/class.swpm-form.php:100
537
+ msgid "Email is invalid"
538
+ msgstr "Email cim helytelen"
539
+
540
+ #: ../../plugins/simple-membership/classes/class.bForm.php:113 ../..
541
+ #: plugins/simple-membership/classes/class.swpm-form.php:116
542
+ msgid "Email is already used."
543
+ msgstr "Ezzel az email címmel már regisztráltak."
544
+
545
+ #: ../../plugins/simple-membership/classes/class.bForm.php:180 ../..
546
+ #: plugins/simple-membership/classes/class.swpm-form.php:173
547
+ msgid "Member since field is invalid"
548
+ msgstr "Tag -óta mező érvénytelen"
549
+
550
+ #: ../../plugins/simple-membership/classes/class.bForm.php:191 ../..
551
+ #: plugins/simple-membership/classes/class.swpm-form.php:184
552
+ msgid "Access starts field is invalid"
553
+ msgstr "Hozzáférés kezdete mező érvénytelen"
554
+
555
+ #: ../../plugins/simple-membership/classes/class.bForm.php:201 ../..
556
+ #: plugins/simple-membership/classes/class.swpm-form.php:194
557
+ msgid "Gender field is invalid"
558
+ msgstr "Nem mező érvénytelen"
559
+
560
+ #: ../../plugins/simple-membership/classes/class.bForm.php:212 ../..
561
+ #: plugins/simple-membership/classes/class.swpm-form.php:205
562
+ msgid "Account state field is invalid"
563
+ msgstr "Felhasználói szint mező érvénytelen"
564
+
565
+ #: ../../plugins/simple-membership/classes/class.bForm.php:219 ../..
566
+ #: plugins/simple-membership/classes/class.swpm-form.php:212
567
+ msgid "Invalid membership level"
568
+ msgstr "Nem létező felhasználói szint"
569
+
570
+ #: ../../plugins/simple-membership/classes/class.bAjax.php:14 ../..
571
+ #: plugins/simple-membership/classes/class.swpm-ajax.php:14
572
+ msgid "Invalid Email Address"
573
+ msgstr "Èrvénytelen email cím"
574
+
575
+ #: ../../plugins/simple-membership/classes/class.bAjax.php:21 ../..
576
+ #: plugins/simple-membership/classes/class.bAjax.php:32 ../../plugins/simple-
577
+ #: membership/classes/class.swpm-ajax.php:21 ../../plugins/simple-
578
+ #: membership/classes/class.swpm-ajax.php:36
579
+ msgid "Aready taken"
580
+ msgstr "Már foglalt"
581
+
582
+ #: ../../plugins/simple-membership/classes/class.bAjax.php:33 ../..
583
+ #: plugins/simple-membership/classes/class.swpm-ajax.php:37
584
+ msgid "Available"
585
+ msgstr "Még szabad"
586
+
587
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:21
588
+ msgid "Payment Settings"
589
+ msgstr "Fizetés beállításai"
590
+
591
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:22
592
+ msgid "Email Settings"
593
+ msgstr "Email beállítások"
594
+
595
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:22
596
+ msgid "Tools"
597
+ msgstr "Eszközök"
598
+
599
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:22
600
+ msgid "Addons Settings"
601
+ msgstr "Addon beállítások"
602
+
603
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:47
604
+ msgid ""
605
+ "WordPress shows an admin toolbar to the logged in users of the site. Check "
606
+ "this if you want to hide that admin toolbar in the frontend of your site."
607
+ msgstr ""
608
+ "Wordpress mutatja az admin eszköztárat a bejelntkezett felhasználók számára. "
609
+ "Jelöld be, ha szeretnéd elrejteni az admin eszköztárat az oldaladon"
610
+
611
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:48
612
+ msgid "Show Adminbar to Admin"
613
+ msgstr "Mutassa az admin sávot az adminoknak"
614
+
615
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:49
616
+ msgid ""
617
+ "Use this option if you want to show the admin toolbar to admin users only. "
618
+ "The admin toolbar will be hidden for all other users."
619
+ msgstr ""
620
+ "Ezt a beállítást válaszd, ha kizárólag az adminok számára szeretnéd "
621
+ "láthatóvá tenni az admin eszköztárat. Az admin eszköztár a többi felhasználó "
622
+ "számára rejtett lesz."
623
+
624
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:56
625
+ msgid "Members Must be Logged in to Comment"
626
+ msgstr "A felhasználóknak be kell jelentkezniük, hogy kommentelni tudjanak."
627
+
628
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:57
629
+ msgid ""
630
+ "Enable this option if you only want the members of the site to be able to "
631
+ "post a comment."
632
+ msgstr ""
633
+ "Engedélyezd ezt a beállítást, ha szeretnéd, hogy csak az oldal felhasználói "
634
+ "kommentelhessenek."
635
+
636
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:116
637
+ msgid "Send Notification to Admin"
638
+ msgstr "Küldjön értesítést az adminnak"
639
+
640
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:117
641
+ msgid ""
642
+ "Enable this option if you want the admin to receive a notification when a "
643
+ "member registers."
644
+ msgstr ""
645
+ "Engedélyezd ezt a lehetőséget, ha szeretnéd, hogy az admin értesítést kapjon "
646
+ "a felhasználói regisztrációkról"
647
+
648
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:118
649
+ msgid "Admin Email Address"
650
+ msgstr "Admin email címe"
651
+
652
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:119
653
+ msgid ""
654
+ "Enter the email address where you want the admin notification email to be "
655
+ "sent to."
656
+ msgstr "Add meg az email címet, ahova szeretnéd, hogy az admin értesítések érkezzenek"
657
+
658
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:123
659
+ msgid "Email Settings (Password Reset)"
660
+ msgstr "Email beállítások (új jelszó)"
661
+
662
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:132
663
+ msgid " Email Settings (Bulk Account Activate Notification)"
664
+ msgstr "Email beállítások (csoportos felhasználó aktiválás értesítő)"
665
+
666
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:155
667
+ msgid "Membership Renewal URL"
668
+ msgstr "Felhasználói fiók megújításának url-je"
669
+
670
+ #: ../../plugins/simple-membership/classes/class.swpm-settings.php:156
671
+ msgid ""
672
+ "You can create a renewal page for your site. Read <a href=\"https://simple-"
673
+ "membership-plugin.com/creating-membership-renewal-button/\" "
674
+ "target=\"_blank\">this documentation</a> to learn how to create a renewal page."
675
+ msgstr ""
676
+ "Létrehozhatsz megújító oldalt. Részletes leírást itt találsz hozzá: <a "
677
+ "href=\"https://simple-membership-plugin.com/creating-membership-renewal-"
678
+ "button/\" target=\"_blank\">this documentation</a>"
679
+
680
+ #: ../../plugins/simple-membership/classes/class.bAdminRegistration.php:48
681
+ msgid "Registration Successful."
682
+ msgstr "Regisztráció sikeres"
683
+
684
+ #: ../../plugins/simple-membership/classes/class.swpm-form.php:29
685
+ msgid "Wordpress account exists with given username. But given email doesn't match."
686
+ msgstr ""
687
+ "Ilyen felhasználónévvel már létezik Wordpress fiók, de a megadott email nem "
688
+ "hozzá tartozik."
689
+
690
+ #: ../../plugins/simple-membership/classes/class.swpm-form.php:34
691
+ msgid "Wordpress account exists with given email. But given username doesn't match."
692
+ msgstr ""
693
+ "Ilyen email címmel már létezik Wordpress fiók, de a megadott felhasználónév "
694
+ "nem hozzá tartozik."
695
+
696
+ #: ../../plugins/simple-membership/classes/class.swpm-form.php:43
697
+ msgid "Username is required"
698
+ msgstr "Felhasználónév megadása szükséges."
699
+
700
+ #: ../../plugins/simple-membership/classes/class.swpm-form.php:47
701
+ msgid "Username contains invalid character"
702
+ msgstr "Felhasználónév érvénytelen karaktert tartalmaz"
703
+
704
+ #: ../../plugins/simple-membership/classes/class.swpm-form.php:55
705
+ msgid "Username already exists."
706
+ msgstr "Felahsználónév már létezik"
707
+
708
+ #: ../../plugins/simple-membership/classes/class.swpm-init-time-tasks.php:110
709
+ msgid "Sorry, Nonce verification failed."
710
+ msgstr "Sajnáljuk, a hitelesítést nem sikerült."
711
+
712
+ #: ../../plugins/simple-membership/classes/class.swpm-init-time-tasks.php:117
713
+ msgid "Sorry, Password didn't match."
714
+ msgstr "Sajnáljuk, a jelszó nem egyezik."
715
+
716
+ #: ../../plugins/simple-membership/classes/class.swpm-utils-member.php:21 ../..
717
+ #: plugins/simple-membership/classes/class.swpm-utils-member.php:29 ../..
718
+ #: plugins/simple-membership/classes/class.swpm-utils-member.php:37 ../..
719
+ #: plugins/simple-membership/classes/class.swpm-utils-member.php:47 ../..
720
+ #: plugins/simple-membership/classes/class.bMemberUtils.php:22 ../..
721
+ #: plugins/simple-membership/classes/class.bMemberUtils.php:30
722
+ msgid "User is not logged in."
723
+ msgstr "Felahsználó nincs bejeletkezve"
724
+
725
+ #: ../../plugins/simple-membership/classes/class.swpm-comment-form-related.php:15
726
+ msgid "Please login to comment."
727
+ msgstr "Kérlek, lépj be hogy kommentelhess."
728
+
729
+ #: ../../plugins/simple-membership/classes/class.swpm-comment-form-related.php:40
730
+ msgid "Please Login to Comment."
731
+ msgstr "Kérlek, lépj be hogy kommentelhess."
732
+
733
+ #: ../../plugins/simple-membership/classes/class.swpm-comment-form-related.php:79
734
+ msgid "Comments not allowed by a non-member."
735
+ msgstr "A kommentelés csak felhasználók számára engedélyezett."
736
+
737
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:71
738
+ msgid "Security check: captcha validation failed."
739
+ msgstr "Biztonsági ellenőrzés: captcha hitelesítés nem sikerült"
740
+
741
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:80 ..
742
+ #: ../plugins/simple-membership/classes/class.bFrontRegistration.php:61
743
+ msgid "Registration Successful. "
744
+ msgstr "Regisztráció sikeres."
745
+
746
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:92 ..
747
+ #: ../plugins/simple-membership/classes/class.swpm-front-registration.php:179 ..
748
+ #: ../plugins/simple-membership/classes/class.bFrontRegistration.php:72 ../..
749
+ #: plugins/simple-membership/classes/class.bFrontRegistration.php:156
750
+ msgid "Please correct the following"
751
+ msgstr "Kérlek javítsd a következőket"
752
+
753
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:123 .
754
+ #: ./../plugins/simple-membership/classes/class.bFrontRegistration.php:106
755
+ msgid "Membership Level Couldn't be found."
756
+ msgstr "Felhasználói szint nem található"
757
+
758
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:162
759
+ msgid "Profile updated successfully."
760
+ msgstr "Profil frissítés sikeres"
761
+
762
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:170
763
+ msgid ""
764
+ "Profile updated successfully. You will need to re-login since you changed "
765
+ "your password."
766
+ msgstr ""
767
+ "Profil frissítés sikeres. Ùjra be kell jelentkezned, miután megváltoztattad "
768
+ "a jelszavad."
769
+
770
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:189 .
771
+ #: ./../plugins/simple-membership/classes/class.bFrontRegistration.php:166
772
+ msgid "Email address not valid."
773
+ msgstr "Email cím érvénytelen."
774
+
775
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:200
776
+ msgid "No user found with that email address."
777
+ msgstr "Nem található felhasználó ezzel az email címmel."
778
+
779
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:201 .
780
+ #: ./../plugins/simple-membership/classes/class.swpm-front-registration.php:227 ..
781
+ #: ../plugins/simple-membership/classes/class.bFrontRegistration.php:178 ../..
782
+ #: plugins/simple-membership/classes/class.bFrontRegistration.php:201
783
+ msgid "Email Address: "
784
+ msgstr "Email cím:"
785
+
786
+ #: ../../plugins/simple-membership/classes/class.swpm-front-registration.php:226 .
787
+ #: ./../plugins/simple-membership/classes/class.bFrontRegistration.php:200
788
+ msgid "New password has been sent to your email address."
789
+ msgstr "Az új jelszót elküldtük az email címedre"
790
+
791
+ #: ../../plugins/simple-membership/classes/class.swpm-admin-registration.php:54
792
+ msgid "Member record added successfully."
793
+ msgstr "Felhasználó mező sikeresen hozzáadva"
794
+
795
+ #: ../../plugins/simple-membership/classes/class.swpm-admin-registration.php:96
796
+ msgid "Your current password"
797
+ msgstr "Az jelenlegi jelszavad"
798
+
799
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:294
800
+ msgid "You are not logged in."
801
+ msgstr "Nem vagy bejelentkezve"
802
+
803
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:328
804
+ msgid "Simple WP Membership Protection"
805
+ msgstr "Simple WP Membership védelem"
806
+
807
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:340
808
+ msgid "Simple Membership Protection options"
809
+ msgstr "Simple WP Membership védelmi opciók"
810
+
811
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:356
812
+ msgid "Do you want to protect this content?"
813
+ msgstr "Szeretnéd ezt a tarlamat védetté tenni?"
814
+
815
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:361
816
+ msgid "Select the membership level that can access this content:"
817
+ msgstr "Válaszd ki a felhasználói szintet, akik számára elérhető lesz a tartalom:"
818
+
819
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:490 ../.
820
+ #: ./plugins/simple-membership/classes/class.simple-wp-membership.php:490
821
+ msgid "WP Membership"
822
+ msgstr "WP Membership"
823
+
824
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:491 ../.
825
+ #: ./plugins/simple-membership/classes/class.simple-wp-membership.php:491 ../..
826
+ #: plugins/simple-membership/classes/class.bMembers.php:8 ../../plugins/simple-
827
+ #: membership/classes/class.swpm-members.php:10 ../../plugins/simple-
828
+ #: membership/views/admin_members_menu.php:2
829
+ msgid "Members"
830
+ msgstr "Felhasználók"
831
+
832
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:493 ../.
833
+ #: ./plugins/simple-membership/classes/class.simple-wp-membership.php:493
834
+ msgid "Settings"
835
+ msgstr "Beállítások"
836
+
837
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:494 ../.
838
+ #: ./plugins/simple-membership/classes/class.simple-wp-membership.php:494
839
+ msgid "Payments"
840
+ msgstr "Fizetések"
841
+
842
+ #: ../../plugins/simple-membership/classes/class.simple-wp-membership.php:495 ../.
843
+ #: ./plugins/simple-membership/classes/class.simple-wp-membership.php:495
844
+ msgid "Add-ons"
845
+ msgstr "Add-ons"
846
+
847
+ #: ../../plugins/simple-membership/classes/class.swpm-access-control.php:47 ../..
848
+ #: plugins/simple-membership/classes/class.swpm-access-control.php:120 ../..
849
+ #: plugins/simple-membership/classes/class.bAccessControl.php:21 ../..
850
+ #: plugins/simple-membership/classes/class.bAccessControl.php:28 ../..
851
+ #: plugins/simple-membership/classes/class.bAccessControl.php:55
852
+ msgid "You need to login to view this content. "
853
+ msgstr "Be kell jelentkezned, hogy láthasd ezt a tartalmat."
854
+
855
+ #: ../../plugins/simple-membership/classes/class.swpm-access-control.php:56 ../..
856
+ #: plugins/simple-membership/classes/class.swpm-access-control.php:128 ../..
857
+ #: plugins/simple-membership/classes/class.swpm-access-control.php:209
858
+ msgid "Your account has expired. "
859
+ msgstr "Lejárt a felhasználói fiókod"
860
+
861
+ #: ../../plugins/simple-membership/classes/class.swpm-access-control.php:79 ../..
862
+ #: plugins/simple-membership/classes/class.swpm-access-control.php:148 ../..
863
+ #: plugins/simple-membership/classes/class.bAccessControl.php:46 ../..
864
+ #: plugins/simple-membership/classes/class.bAccessControl.php:66
865
+ msgid "This content is not permitted for your membership level."
866
+ msgstr "Ez a tartalom nem elérhető a Te falhasználói szinteden"
867
+
868
+ #: ../../plugins/simple-membership/classes/class.swpm-access-control.php:201 ../..
869
+ #: plugins/simple-membership/classes/class.bAccessControl.php:88 ../..
870
+ #: plugins/simple-membership/classes/class.bAccessControl.php:106
871
+ msgid "You need to login to view the rest of the content. "
872
+ msgstr "Be kell jelentkezned, hogy láthasd a tartalom többi részét is."
873
+
874
+ #: ../../plugins/simple-membership/classes/class.swpm-access-control.php:214 ../..
875
+ #: plugins/simple-membership/classes/class.bAccessControl.php:84
876
+ msgid " The rest of the content is not permitted for your membership level."
877
+ msgstr "A tartalom további része nem elérhető a Te falhasználói szinteden."
878
+
879
+ #: ../../plugins/simple-membership/classes/class.swpm-ajax.php:30
880
+ msgid "Name contains invalid character"
881
+ msgstr "A név érvénytelen karaktert tartalmaz."
882
+
883
+ #: ../../plugins/simple-membership/classes/class.bMembers.php:7 ../..
884
+ #: plugins/simple-membership/classes/class.swpm-members.php:9
885
+ msgid "Member"
886
+ msgstr "Felhasználó"
887
+
888
+ #: ../../plugins/simple-membership/classes/class.bMembers.php:17
889
+ msgid "User Name"
890
+ msgstr "Felhasználónév"
891
+
892
+ #: ../../plugins/simple-membership/classes/class.bMembers.php:18 ../..
893
+ #: plugins/simple-membership/classes/class.swpm-members.php:20 ../..
894
+ #: plugins/simple-membership/classes/admin-includes/class.swpm-payments-list-
895
+ #: table.php:76 ../../plugins/simple-
896
+ #: membership/views/admin_member_form_common_part.php:15 ../../plugins/simple-
897
+ #: membership/views/edit.php:21 ../../plugins/simple-membership/views/add.php:22
898
+ msgid "First Name"
899
+ msgstr "Keresztnév"
900
+
901
+ #: ../../plugins/simple-membership/classes/class.bMembers.php:19 ../..
902
+ #: plugins/simple-membership/classes/class.swpm-members.php:21 ../..
903
+ #: plugins/simple-membership/classes/admin-includes/class.swpm-payments-list-
904
+ #: table.php:77 ../../plugins/simple-
905
+ #: membership/views/admin_member_form_common_part.php:19 ../../plugins/simple-
906
+ #: membership/views/edit.php:25 ../../plugins/simple-membership/views/add.php:26
907
+ msgid "Last Name"
908
+ msgstr "Vezetéknév"
909
+
910
+ #: ../../plugins/simple-membership/classes/class.bMembers.php:20 ../..
911
+ #: plugins/simple-membership/classes/class.swpm-members.php:22 ../..
912
+ #: plugins/simple-membership/views/edit.php:9 ../../plugins/simple-
913
+ #: membership/views/add.php:10
914
+ msgid "Email"
915
+ msgstr "Email"
916
+
917
+ #: ../../plugins/simple-membership/classes/class.bMembers.php:22 ../..
918
+ #: plugins/simple-membership/classes/class.swpm-members.php:24 ../..
919
+ #: plugins/simple-membership/views/admin_member_form_common_part.php:11
920
+ msgid "Access Starts"
921
+ msgstr "Hozzáférés kezdete"
922
+
923
+ #: ../../plugins/simple-membership/classes/class.bMembers.php:23 ../..
924
+ #: plugins/simple-membership/classes/class.swpm-members.php:25
925
+ msgid "Account State"
926
+ msgstr "Fiók állapota"
927
+
928
+ #: ../../plugins/simple-membership/classes/class.bMembers.php:107
929
+ msgid "No Member found."
930
+ msgstr "Nem találtunk felhasználót"
931
+
932
+ #: ../../plugins/simple-membership/classes/class.swpm-members.php:19 ../..
933
+ #: plugins/simple-membership/views/admin_edit.php:9 ../../plugins/simple-
934
+ #: membership/views/edit.php:5 ../../plugins/simple-membership/views/admin_add.
935
+ #: php:10 ../../plugins/simple-membership/views/login.php:11 ../../plugins/simple-
936
+ #: membership/views/add.php:6
937
+ msgid "Username"
938
+ msgstr "Felhasználónév"
939
+
940
+ #: ../../plugins/simple-membership/classes/class.swpm-members.php:42
941
+ msgid "Set Status to Active"
942
+ msgstr "Státusz aktívra állítása"
943
+
944
+ #: ../../plugins/simple-membership/classes/class.swpm-members.php:43
945
+ msgid "Set Status to Active and Notify"
946
+ msgstr "Státusz aktívra állítása és értesítés"
947
+
948
+ #: ../../plugins/simple-membership/classes/class.swpm-members.php:44
949
+ msgid "Set Status to Inactive"
950
+ msgstr "Státusz inaktívra állítása"
951
+
952
+ #: ../../plugins/simple-membership/classes/class.swpm-members.php:45
953
+ msgid "Set Status to Pending"
954
+ msgstr "Státusz függőben"
955
+
956
+ #: ../../plugins/simple-membership/classes/class.swpm-members.php:46
957
+ msgid "Set Status to Expired"
958
+ msgstr "Státusz lejárt"
959
+
960
+ #: ../../plugins/simple-membership/classes/class.swpm-members.php:67
961
+ msgid "incomplete"
962
+ msgstr "befejezetlen"
963
+
964
+ #: ../../plugins/simple-membership/classes/class.swpm-members.php:182
965
+ msgid "No member found."
966
+ msgstr "Nem találtunk felhasználót"
967
+
968
+ #: ../../plugins/simple-membership/classes/class.bAccessControl.php:34 ../..
969
+ #: plugins/simple-membership/classes/class.bAccessControl.php:60
970
+ msgid ""
971
+ "Your account has expired. Please renew your account to gain access to this "
972
+ "content."
973
+ msgstr ""
974
+ "Lejárt a felhasználói fiókod. Kérlek, újítsd meg, hogy újra hozzáférhess "
975
+ "ehhez a tartalomhoz."
976
+
977
+ #: ../../plugins/simple-membership/classes/class.swpm-utils-misc.php:50 ../..
978
+ #: plugins/simple-membership/classes/class.miscUtils.php:50
979
+ msgid "Registration"
980
+ msgstr "Regisztráció"
981
+
982
+ #: ../../plugins/simple-membership/classes/class.swpm-utils-misc.php:73 ../..
983
+ #: plugins/simple-membership/classes/class.miscUtils.php:73
984
+ msgid "Member Login"
985
+ msgstr "Felhasználói bejelentkezés"
986
+
987
+ #: ../../plugins/simple-membership/classes/class.swpm-utils-misc.php:96 ../..
988
+ #: plugins/simple-membership/classes/class.miscUtils.php:96
989
+ msgid "Profile"
990
+ msgstr "Profil"
991
+
992
+ #: ../../plugins/simple-membership/classes/class.swpm-utils-misc.php:119 ../..
993
+ #: plugins/simple-membership/classes/class.miscUtils.php:119
994
+ msgid "Password Reset"
995
+ msgstr "Ùj jelszó kérése"
996
+
997
+ #: ../../plugins/simple-membership/classes/class.swpm-utils-misc.php:222
998
+ msgid "renew"
999
+ msgstr "megújít"
1000
+
1001
+ #: ../../plugins/simple-membership/classes/class.swpm-utils-misc.php:222
1002
+ msgid " your account to gain access to this content."
1003
+ msgstr "fiókodat, hogy hozzáférhess ehhez a tartalomhoz"
1004
+
1005
+ #: ../../plugins/simple-membership/classes/class.bFrontRegistration.php:177
1006
+ msgid "No user not found with that email address."
1007
+ msgstr "Ezzel az email címmel nem találtunk felhasználót"
1008
+
1009
+ #: ../../plugins/simple-membership/classes/class.bCategoryList.php:35
1010
+ msgid "Name"
1011
+ msgstr "Név"
1012
+
1013
+ #: ../../plugins/simple-membership/classes/class.bCategoryList.php:36 ../..
1014
+ #: plugins/simple-membership/classes/class.swpm-category-list.php:36
1015
+ msgid "Description"
1016
+ msgstr "Leírás"
1017
+
1018
+ #: ../../plugins/simple-membership/classes/class.bCategoryList.php:37 ../..
1019
+ #: plugins/simple-membership/classes/class.swpm-category-list.php:37
1020
+ msgid "Count"
1021
+ msgstr "Számláló"
1022
+
1023
+ #: ../../plugins/simple-membership/classes/class.bCategoryList.php:78
1024
+ msgid "Updated! "
1025
+ msgstr "Frissítve!"
1026
+
1027
+ #: ../../plugins/simple-membership/classes/class.bLevelForm.php:47 ../..
1028
+ #: plugins/simple-membership/classes/class.swpm-level-form.php:47
1029
+ msgid "Date format is not valid."
1030
+ msgstr "Dátum formátum nem megfelelő"
1031
+
1032
+ #: ../../plugins/simple-membership/classes/class.bLevelForm.php:55 ../..
1033
+ #: plugins/simple-membership/classes/class.swpm-level-form.php:55
1034
+ msgid "Access duration must be > 0."
1035
+ msgstr "A hozzáférés idejének nagyobbnak kell lennie 0-nál"
1036
+
1037
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:50 ../..
1038
+ #: plugins/simple-membership/classes/class.bAuth.php:46
1039
+ msgid "User Not Found."
1040
+ msgstr "Felhasználó nem található"
1041
+
1042
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:57 ../..
1043
+ #: plugins/simple-membership/classes/class.bAuth.php:53
1044
+ msgid "Password Empty or Invalid."
1045
+ msgstr "Jelszó üres vagy érvénytelen"
1046
+
1047
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:83 ../..
1048
+ #: plugins/simple-membership/classes/class.bAuth.php:78
1049
+ msgid "Account is inactive."
1050
+ msgstr "Felhasználói fiók inaktív"
1051
+
1052
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:86 ../..
1053
+ #: plugins/simple-membership/classes/class.swpm-auth.php:107 ../..
1054
+ #: plugins/simple-membership/classes/class.bAuth.php:86 ../../plugins/simple-
1055
+ #: membership/classes/class.bAuth.php:108
1056
+ msgid "Account has expired."
1057
+ msgstr "Felhasználói fiók lejárt"
1058
+
1059
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:89 ../..
1060
+ #: plugins/simple-membership/classes/class.bAuth.php:82
1061
+ msgid "Account is pending."
1062
+ msgstr "Felhasználói fiók függőben"
1063
+
1064
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:115 ../..
1065
+ #: plugins/simple-membership/classes/class.bAuth.php:116
1066
+ msgid "You are logged in as:"
1067
+ msgstr "Be vagy jelentkezve, mint:"
1068
+
1069
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:161 ../..
1070
+ #: plugins/simple-membership/classes/class.bAuth.php:158
1071
+ msgid "Logged Out Successfully."
1072
+ msgstr "Sikeres kijelentkezés"
1073
+
1074
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:213 ../..
1075
+ #: plugins/simple-membership/classes/class.bAuth.php:208
1076
+ msgid "Session Expired."
1077
+ msgstr "Szekció lejárt"
1078
+
1079
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:222
1080
+ msgid "Invalid Username"
1081
+ msgstr "Èrvénytelen felhasználónév."
1082
+
1083
+ #: ../../plugins/simple-membership/classes/class.swpm-auth.php:230
1084
+ msgid "Please login again."
1085
+ msgstr "Kérlek, jelentkezz be újra"
1086
+
1087
+ #: ../../plugins/simple-membership/classes/class.bAuth.php:216
1088
+ msgid "Invalid User Name"
1089
+ msgstr "Èrvénytelen felhasználónév"
1090
+
1091
+ #: ../../plugins/simple-membership/classes/class.bAuth.php:224
1092
+ msgid "Sorry! Something went wrong"
1093
+ msgstr "Sajnáljuk, valami elromlott."
1094
+
1095
+ #: ../../plugins/simple-membership/classes/class.swpm-category-list.php:33
1096
+ msgid "Category ID"
1097
+ msgstr "Kategória ID"
1098
+
1099
+ #: ../../plugins/simple-membership/classes/class.swpm-category-list.php:34
1100
+ msgid "Category Name"
1101
+ msgstr "Kategória neve"
1102
+
1103
+ #: ../../plugins/simple-membership/classes/class.swpm-category-list.php:35
1104
+ msgid "Category Type (Taxonomy)"
1105
+ msgstr "Kategória fajtája"
1106
+
1107
+ #: ../../plugins/simple-membership/classes/class.swpm-category-list.php:89
1108
+ msgid "Category protection updated!"
1109
+ msgstr "Kategória védelme frissítve"
1110
+
1111
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:139 ..
1112
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:137
1113
+ msgid "List View"
1114
+ msgstr "Lista nézet"
1115
+
1116
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:140 ..
1117
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:138
1118
+ msgid "Excerpt View"
1119
+ msgstr "Kibontott nézet"
1120
+
1121
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:307 ..
1122
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:305
1123
+ msgid "No items found."
1124
+ msgstr "Nem található iylen elem."
1125
+
1126
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:433 ..
1127
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:431
1128
+ msgid "Select bulk action"
1129
+ msgstr "Válaszd ki a csoportos műveletet"
1130
+
1131
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:435 ..
1132
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:433
1133
+ msgid "Bulk Actions"
1134
+ msgstr "Csoportos műveletek"
1135
+
1136
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:445 ..
1137
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:443
1138
+ msgid "Apply"
1139
+ msgstr "Jelentkezés"
1140
+
1141
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:545 ..
1142
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:543
1143
+ msgid "Filter by date"
1144
+ msgstr "Keresés dátum szerint"
1145
+
1146
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:547 ..
1147
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:545
1148
+ msgid "All dates"
1149
+ msgstr "Minden dátum"
1150
+
1151
+ #. translators: 1: month name, 2: 4-digit year
1152
+ #. translators: 1: month name, 2: 4-digit year
1153
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:560 ..
1154
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:555
1155
+ #, php-format
1156
+ msgid "%1$s %2$d"
1157
+ msgstr "%1$s %2$d"
1158
+
1159
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:607 ..
1160
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:599
1161
+ #, php-format
1162
+ msgid "%s pending"
1163
+ msgstr "%s függőben"
1164
+
1165
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:686 ..
1166
+ #: ../plugins/simple-membership/classes/common/class-swpm-list-table.php:1110 ..
1167
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:678 ../.
1168
+ #: ./plugins/simple-membership/classes/common/class.swpm-list-table.php:1086
1169
+ #, php-format
1170
+ msgid "1 item"
1171
+ msgid_plural "%s items"
1172
+ msgstr[0] "1 elem"
1173
+ msgstr[1] "%s elemek"
1174
+
1175
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:705 ..
1176
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:695
1177
+ msgid "Go to the first page"
1178
+ msgstr "Menj az első odlalra"
1179
+
1180
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:712 ..
1181
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:698
1182
+ msgid "Go to the previous page"
1183
+ msgstr "Menj az előző oldalra"
1184
+
1185
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:721 ..
1186
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:704
1187
+ msgid "Select Page"
1188
+ msgstr "Válaszd ki az oldalt"
1189
+
1190
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:722 ..
1191
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:704
1192
+ msgid "Current page"
1193
+ msgstr "Jelenlegi oldal"
1194
+
1195
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:728 ..
1196
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:708
1197
+ #, php-format
1198
+ msgctxt "paging"
1199
+ msgid "%1$s of %2$s"
1200
+ msgstr "%1$s of %2$s"
1201
+
1202
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:732 ..
1203
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:710
1204
+ msgid "Go to the next page"
1205
+ msgstr "Menj a következő oldalra"
1206
+
1207
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:739 ..
1208
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:713
1209
+ msgid "Go to the last page"
1210
+ msgstr "Menj az utolsó oldalra"
1211
+
1212
+ #: ../../plugins/simple-membership/classes/common/class-swpm-list-table.php:876 ..
1213
+ #: ../plugins/simple-membership/classes/common/class.swpm-list-table.php:848
1214
+ msgid "Select All"
1215
+ msgstr "Mind kiválasztása"
1216
+
1217
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payment-
1218
+ #: buttons-list-table.php:69
1219
+ msgid "Payment Button ID"
1220
+ msgstr "Fizetési gomb ID-ja"
1221
+
1222
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payment-
1223
+ #: buttons-list-table.php:70
1224
+ msgid "Payment Button Title"
1225
+ msgstr "Fizetési gomb felriata"
1226
+
1227
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payment-
1228
+ #: buttons-list-table.php:71
1229
+ msgid "Membership Level ID"
1230
+ msgstr "Felhasználói szint ID-je"
1231
+
1232
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payment-
1233
+ #: buttons-list-table.php:72
1234
+ msgid "Button Shortcode"
1235
+ msgstr "Gomb shortcode-ja"
1236
+
1237
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payment-
1238
+ #: buttons-list-table.php:113 ../../plugins/simple-
1239
+ #: membership/views/admin_payments_page.php:37 ../../plugins/simple-
1240
+ #: membership/views/admin_members_list.php:6 ../../plugins/simple-
1241
+ #: membership/views/payments/admin_all_payment_transactions.php:33
1242
+ msgid "The selected entry was deleted!"
1243
+ msgstr "A kiválasztott bejegyés törlésre került."
1244
+
1245
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payments-
1246
+ #: list-table.php:55
1247
+ msgid "View Profile"
1248
+ msgstr "Profil megtekintése."
1249
+
1250
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payments-
1251
+ #: list-table.php:74
1252
+ msgid "Row ID"
1253
+ msgstr "Sor ID-ja"
1254
+
1255
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payments-
1256
+ #: list-table.php:75 ../../plugins/simple-membership/views/forgot_password.php:5
1257
+ msgid "Email Address"
1258
+ msgstr "Email cím"
1259
+
1260
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payments-
1261
+ #: list-table.php:78
1262
+ msgid "Member Profile"
1263
+ msgstr "Felhasználó rpofilja"
1264
+
1265
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payments-
1266
+ #: list-table.php:79
1267
+ msgid "Date"
1268
+ msgstr "Dátum"
1269
+
1270
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payments-
1271
+ #: list-table.php:80
1272
+ msgid "Transaction ID"
1273
+ msgstr "Tranzakció ID-je"
1274
+
1275
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payments-
1276
+ #: list-table.php:81
1277
+ msgid "Subscriber ID"
1278
+ msgstr "Feliratkozó ID-je"
1279
+
1280
+ #: ../../plugins/simple-membership/classes/admin-includes/class.swpm-payments-
1281
+ #: list-table.php:82
1282
+ msgid "Amount"
1283
+ msgstr "Összeg"
1284
+
1285
+ #: ../../plugins/simple-membership/classes/shortcode-related/class.swpm-
1286
+ #: shortcodes-handler.php:47
1287
+ msgid "Your membership profile will be updated to reflect the payment."
1288
+ msgstr "A felhasználói fiókodat a fizetésnek megfelelően frissíteni fogjuk."
1289
+
1290
+ #: ../../plugins/simple-membership/classes/shortcode-related/class.swpm-
1291
+ #: shortcodes-handler.php:48
1292
+ msgid "Your profile username: "
1293
+ msgstr "A profilod felhasználóneve:"
1294
+
1295
+ #: ../../plugins/simple-membership/classes/shortcode-related/class.swpm-
1296
+ #: shortcodes-handler.php:60
1297
+ msgid "Click on the following link to complete the registration."
1298
+ msgstr "Kattints a következő linkre, hogy a regisztrációt befejezd."
1299
+
1300
+ #: ../../plugins/simple-membership/classes/shortcode-related/class.swpm-
1301
+ #: shortcodes-handler.php:61
1302
+ msgid "Click here to complete your paid registration"
1303
+ msgstr "Kattints ide, hogy a fizetős regisztrációt befejezd"
1304
+
1305
+ #: ../../plugins/simple-membership/classes/shortcode-related/class.swpm-
1306
+ #: shortcodes-handler.php:66
1307
+ msgid ""
1308
+ "If you have just made a membership payment then your payment is yet to be "
1309
+ "processed. Please check back in a few minutes. An email will be sent to you "
1310
+ "with the details shortly."
1311
+ msgstr ""
1312
+ "Ha felhasználói befizetést hajtottál végre, akkor a befizetést fel kell, "
1313
+ "hogy dolgozzuk. Kérlek, nézz vissza egy pár perc múlva. Hamarosan egy emailt "
1314
+ "kapsz tőlünk a pontos részletekkel."
1315
+
1316
+ #: ../../plugins/simple-membership/classes/shortcode-related/class.swpm-
1317
+ #: shortcodes-handler.php:80
1318
+ msgid "Expiry: "
1319
+ msgstr "Lejárat:"
1320
+
1321
+ #: ../../plugins/simple-membership/classes/shortcode-related/class.swpm-
1322
+ #: shortcodes-handler.php:82
1323
+ msgid "You are not logged-in as a member"
1324
+ msgstr "Felhasználóként vagy bejelentkezve"
1325
+
1326
+ #: ../../plugins/simple-membership/views/admin_payment_settings.php:2 ../..
1327
+ #: plugins/simple-membership/views/admin_settings.php:3 ../../plugins/simple-
1328
+ #: membership/views/admin_tools_settings.php:3 ../../plugins/simple-
1329
+ #: membership/views/admin_addon_settings.php:3 ../../plugins/simple-
1330
+ #: membership/views/payments/admin_payment_settings.php:3
1331
+ msgid "Simple WP Membership::Settings"
1332
+ msgstr "Simple WP Membership: beállítások"
1333
+
1334
+ #: ../../plugins/simple-membership/views/admin_payment_settings.php:33 ../..
1335
+ #: plugins/simple-membership/views/payments/admin_payment_settings.php:31
1336
+ msgid "PayPal Integration Settings"
1337
+ msgstr "PayPal integráció beállítások"
1338
+
1339
+ #: ../../plugins/simple-membership/views/admin_payment_settings.php:36 ../..
1340
+ #: plugins/simple-membership/views/payments/admin_payment_settings.php:34
1341
+ msgid "Generate the \"Advanced Variables\" Code for your PayPal button"
1342
+ msgstr "\"Haladó változók\" kód generálása a PayPal gomb számára"
1343
+
1344
+ #: ../../plugins/simple-membership/views/admin_payment_settings.php:39 ../..
1345
+ #: plugins/simple-membership/views/payments/admin_payment_settings.php:37
1346
+ msgid "Enter the Membership Level ID"
1347
+ msgstr "Add meg a felhasználó szint ID-ját"
1348
+
1349
+ #: ../../plugins/simple-membership/views/admin_payment_settings.php:41 ../..
1350
+ #: plugins/simple-membership/views/payments/admin_payment_settings.php:39
1351
+ msgid "Generate Code"
1352
+ msgstr "Kód generálása"
1353
+
1354
+ #: ../../plugins/simple-membership/views/admin_members.php:2
1355
+ msgid "Simple WP Membership::Members"
1356
+ msgstr "Simple WP Membership: Felhasználók"
1357
+
1358
+ #: ../../plugins/simple-membership/views/admin_members.php:3 ../../plugins/simple-
1359
+ #: membership/views/admin_members_list.php:40
1360
+ msgid "Add New"
1361
+ msgstr "Ùj hozzáadása"
1362
+
1363
+ #: ../../plugins/simple-membership/views/admin_edit.php:5
1364
+ msgid "Edit Member"
1365
+ msgstr "Felhasználó szerkesztése"
1366
+
1367
+ #: ../../plugins/simple-membership/views/admin_edit.php:6
1368
+ msgid "Edit existing member details."
1369
+ msgstr "Meglévő felhasználók adatainak szerkesztése"
1370
+
1371
+ #: ../../plugins/simple-membership/views/admin_edit.php:9 ../../plugins/simple-
1372
+ #: membership/views/admin_edit.php:30 ../../plugins/simple-
1373
+ #: membership/views/admin_edit_level.php:10 ../../plugins/simple-
1374
+ #: membership/views/admin_edit_level.php:14 ../../plugins/simple-
1375
+ #: membership/views/admin_edit_level.php:18 ../../plugins/simple-
1376
+ #: membership/views/admin_add.php:10 ../../plugins/simple-
1377
+ #: membership/views/admin_add.php:14 ../../plugins/simple-
1378
+ #: membership/views/admin_add_level.php:11 ../../plugins/simple-
1379
+ #: membership/views/admin_add_level.php:15 ../../plugins/simple-
1380
+ #: membership/views/admin_add_level.php:19
1381
+ msgid "(required)"
1382
+ msgstr "kötelező"
1383
+
1384
+ #: ../../plugins/simple-membership/views/admin_edit.php:30 ../../plugins/simple-
1385
+ #: membership/views/admin_add.php:14
1386
+ msgid "E-mail"
1387
+ msgstr "Email"
1388
+
1389
+ #: ../../plugins/simple-membership/views/admin_edit.php:34 ../../plugins/simple-
1390
+ #: membership/views/edit.php:13 ../../plugins/simple-membership/views/admin_add.
1391
+ #: php:18 ../../plugins/simple-membership/views/login.php:17 ../../plugins/simple-
1392
+ #: membership/views/add.php:14
1393
+ msgid "Password"
1394
+ msgstr "Jelszó"
1395
+
1396
+ #. translators: password input field
1397
+ #: ../../plugins/simple-membership/views/admin_edit.php:34
1398
+ msgid "(twice, leave empty to retain old password)"
1399
+ msgstr "(kétszer, hagyd üresen, ha a régi jelszavadat szeretnéd használni)"
1400
+
1401
+ #: ../../plugins/simple-membership/views/admin_edit.php:38 ../../plugins/simple-
1402
+ #: membership/views/admin_add.php:23
1403
+ msgid "Strength indicator"
1404
+ msgstr "Erősség jelző"
1405
+
1406
+ #: ../../plugins/simple-membership/views/admin_edit.php:39 ../../plugins/simple-
1407
+ #: membership/views/admin_add.php:24
1408
+ msgid ""
1409
+ "Hint: The password should be at least seven characters long. To make it "
1410
+ "stronger, use upper and lower case letters, numbers and symbols like ! \" ? $ "
1411
+ "% ^ &amp; )."
1412
+ msgstr ""
1413
+ "Tipp: A jelszónak minimum 7 karakter hosszúnak kell lennie. Hogy erősebbé "
1414
+ "tedd használj alsó és felső karaktereket, számokat, szimbólumokat is."
1415
+
1416
+ #: ../../plugins/simple-membership/views/admin_edit.php:43 ../../plugins/simple-
1417
+ #: membership/views/loggedin.php:10 ../../plugins/simple-
1418
+ #: membership/views/admin_add.php:28
1419
+ msgid "Account Status"
1420
+ msgstr "Felhasználói státusz"
1421
+
1422
+ #: ../../plugins/simple-membership/views/admin_edit.php:50
1423
+ msgid "Notify User"
1424
+ msgstr "Felhasználó értesítése"
1425
+
1426
+ #: ../../plugins/simple-membership/views/admin_edit.php:57
1427
+ msgid "Subscriber ID/Reference"
1428
+ msgstr "Feliratkozó ID-je"
1429
+
1430
+ #: ../../plugins/simple-membership/views/admin_edit.php:61
1431
+ msgid "Last Accessed From IP"
1432
+ msgstr "Utolsó hozzáférés az IP címről"
1433
+
1434
+ #: ../../plugins/simple-membership/views/admin_edit.php:69
1435
+ msgid "Edit User "
1436
+ msgstr "Felhasználó szerkesztése"
1437
+
1438
+ #: ../../plugins/simple-membership/views/admin_member_form_common_part.php:23
1439
+ msgid "Gender"
1440
+ msgstr "Nem"
1441
+
1442
+ #: ../../plugins/simple-membership/views/admin_member_form_common_part.php:30 ../.
1443
+ #: ./plugins/simple-membership/views/edit.php:29
1444
+ msgid "Phone"
1445
+ msgstr "Telefon"
1446
+
1447
+ #: ../../plugins/simple-membership/views/admin_member_form_common_part.php:34 ../.
1448
+ #: ./plugins/simple-membership/views/edit.php:33
1449
+ msgid "Street"
1450
+ msgstr "Utca"
1451
+
1452
+ #: ../../plugins/simple-membership/views/admin_member_form_common_part.php:38 ../.
1453
+ #: ./plugins/simple-membership/views/edit.php:37
1454
+ msgid "City"
1455
+ msgstr "Város"
1456
+
1457
+ #: ../../plugins/simple-membership/views/admin_member_form_common_part.php:42 ../.
1458
+ #: ./plugins/simple-membership/views/edit.php:41
1459
+ msgid "State"
1460
+ msgstr "Megye"
1461
+
1462
+ #: ../../plugins/simple-membership/views/admin_member_form_common_part.php:46 ../.
1463
+ #: ./plugins/simple-membership/views/edit.php:45
1464
+ msgid "Zipcode"
1465
+ msgstr "Irányítószám"
1466
+
1467
+ #: ../../plugins/simple-membership/views/admin_member_form_common_part.php:50 ../.
1468
+ #: ./plugins/simple-membership/views/edit.php:49
1469
+ msgid "Country"
1470
+ msgstr "Ország"
1471
+
1472
+ #: ../../plugins/simple-membership/views/admin_member_form_common_part.php:54
1473
+ msgid "Company"
1474
+ msgstr "Cég"
1475
+
1476
+ #: ../../plugins/simple-membership/views/admin_member_form_common_part.php:58
1477
+ msgid "Member Since"
1478
+ msgstr "Tag óta"
1479
+
1480
+ #: ../../plugins/simple-membership/views/loggedin.php:6
1481
+ msgid "Logged in as"
1482
+ msgstr "Bejelentkezve, mint"
1483
+
1484
+ #: ../../plugins/simple-membership/views/loggedin.php:14
1485
+ msgid "Membership"
1486
+ msgstr "Tagság"
1487
+
1488
+ #: ../../plugins/simple-membership/views/loggedin.php:18
1489
+ msgid "Account Expiry"
1490
+ msgstr "Felhasználói fiók lejárta"
1491
+
1492
+ #: ../../plugins/simple-membership/views/loggedin.php:22
1493
+ msgid "Logout"
1494
+ msgstr "Kijelentkezés"
1495
+
1496
+ #: ../../plugins/simple-membership/views/admin_payments_page.php:5 ../..
1497
+ #: plugins/simple-membership/views/payments/admin_payments_page.php:9
1498
+ msgid "Simple Membership::Payments"
1499
+ msgstr "Simple Membership: Fizetések"
1500
+
1501
+ #: ../../plugins/simple-membership/views/admin_payments_page.php:11 ../..
1502
+ #: plugins/simple-membership/views/payments/admin_all_payment_transactions.php:7
1503
+ msgid "All the payments/transactions of your members are recorded here."
1504
+ msgstr "Minden felhasználói befizetés itt kerül rögzítésre"
1505
+
1506
+ #: ../../plugins/simple-membership/views/admin_payments_page.php:18 ../..
1507
+ #: plugins/simple-membership/views/payments/admin_all_payment_transactions.php:14
1508
+ msgid "Search for a transaction by using email or name"
1509
+ msgstr "Keress tranzakciókat az email cím vagy név megadásával"
1510
+
1511
+ #: ../../plugins/simple-membership/views/admin_payments_page.php:22 ../..
1512
+ #: plugins/simple-membership/views/admin_members_list.php:27 ../..
1513
+ #: plugins/simple-membership/views/payments/admin_all_payment_transactions.php:18
1514
+ msgid "Search"
1515
+ msgstr "Keresés"
1516
+
1517
+ #: ../../plugins/simple-membership/views/admin_category_list.php:2
1518
+ msgid "Simple WP Membership::Categories"
1519
+ msgstr "Simple WP Membership: Kategóriák"
1520
+
1521
+ #: ../../plugins/simple-membership/views/admin_members_menu.php:3 ../..
1522
+ #: plugins/simple-membership/views/admin_add.php:5
1523
+ msgid "Add Member"
1524
+ msgstr "Ùj tag hozzáadása"
1525
+
1526
+ #: ../../plugins/simple-membership/views/admin_membership_levels.php:2
1527
+ msgid "Simple WP Membership::Membership Levels"
1528
+ msgstr "Simple WP Membership: Felhasználói szintek"
1529
+
1530
+ #: ../../plugins/simple-membership/views/admin_membership_levels.php:12
1531
+ msgid "search"
1532
+ msgstr "keresés"
1533
+
1534
+ #: ../../plugins/simple-membership/views/admin_tools_settings.php:9
1535
+ msgid "Generate a Registration Completion link"
1536
+ msgstr "Regisztráció befejezése link generálása"
1537
+
1538
+ #: ../../plugins/simple-membership/views/admin_tools_settings.php:17
1539
+ msgid "Generate Registration Completion Link"
1540
+ msgstr "Regisztráció befejezése link generálása"
1541
+
1542
+ #: ../../plugins/simple-membership/views/admin_tools_settings.php:20
1543
+ msgid "OR"
1544
+ msgstr "VAGY"
1545
+
1546
+ #: ../../plugins/simple-membership/views/admin_tools_settings.php:21
1547
+ msgid "For All Incomplete Registrations"
1548
+ msgstr "Minden befejezetlen regisztráció számára"
1549
+
1550
+ #: ../../plugins/simple-membership/views/admin_tools_settings.php:26
1551
+ msgid "Send Registration Reminder Email too"
1552
+ msgstr "Küldjön regisztráció emlékeztető emailt is"
1553
+
1554
+ #: ../../plugins/simple-membership/views/admin_tools_settings.php:32
1555
+ msgid "Submit"
1556
+ msgstr "Elküld"
1557
+
1558
+ #: ../../plugins/simple-membership/views/admin_tools_settings.php:41
1559
+ msgid ""
1560
+ "Link(s) generated successfully. The following link(s) can be used to "
1561
+ "complete the registration."
1562
+ msgstr ""
1563
+ "Linkek sikeresen generálva. A következő linkek használhatóak a regisztrációk "
1564
+ "befejezéséhez."
1565
+
1566
+ #: ../../plugins/simple-membership/views/admin_tools_settings.php:43
1567
+ msgid "Registration completion links will appear below"
1568
+ msgstr "Regisztráció befejezése link alul fog megjelenni"
1569
+
1570
+ #: ../../plugins/simple-membership/views/forgot_password.php:11
1571
+ msgid "Reset Password"
1572
+ msgstr "Ùj jelszó"
1573
+
1574
+ #: ../../plugins/simple-membership/views/edit.php:17 ../../plugins/simple-
1575
+ #: membership/views/add.php:18
1576
+ msgid "Repeat Password"
1577
+ msgstr "Jelszó megismétlése"
1578
+
1579
+ #: ../../plugins/simple-membership/views/edit.php:60
1580
+ msgid "Update"
1581
+ msgstr "Frissítés"
1582
+
1583
+ #: ../../plugins/simple-membership/views/admin_add_ons_page.php:7
1584
+ msgid "Simple WP Membership::Add-ons"
1585
+ msgstr "Simple WP Membership: Add-onok"
1586
+
1587
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:5
1588
+ msgid "Edit membership level"
1589
+ msgstr "Felhasználói szint szerkesztése"
1590
+
1591
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:6
1592
+ msgid "Edit membership level."
1593
+ msgstr "Felhasználói szint szerkesztése"
1594
+
1595
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:10 ../..
1596
+ #: plugins/simple-membership/views/admin_add_level.php:11
1597
+ msgid "Membership Level Name"
1598
+ msgstr "Felhasználói szint neve"
1599
+
1600
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:14 ../..
1601
+ #: plugins/simple-membership/views/admin_add_level.php:15
1602
+ msgid "Default WordPress Role"
1603
+ msgstr "Alapértelmezett Wordpress szerep"
1604
+
1605
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:18 ../..
1606
+ #: plugins/simple-membership/views/admin_add_level.php:19
1607
+ msgid "Access Duration"
1608
+ msgstr "Lejárat ideje"
1609
+
1610
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:21
1611
+ msgid "No Expiry (Access for this level will not expire until cancelled)"
1612
+ msgstr "Nincs lejárat (A felhasználói fiók hozzáférése nem fog lejárni)"
1613
+
1614
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:22 ../..
1615
+ #: plugins/simple-membership/views/admin_edit_level.php:25 ../../plugins/simple-
1616
+ #: membership/views/admin_edit_level.php:28 ../../plugins/simple-
1617
+ #: membership/views/admin_edit_level.php:31 ../../plugins/simple-
1618
+ #: membership/views/admin_add_level.php:23 ../../plugins/simple-
1619
+ #: membership/views/admin_add_level.php:25 ../../plugins/simple-
1620
+ #: membership/views/admin_add_level.php:27 ../../plugins/simple-
1621
+ #: membership/views/admin_add_level.php:29
1622
+ msgid "Expire After"
1623
+ msgstr "Lejár után"
1624
+
1625
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:23 ../..
1626
+ #: plugins/simple-membership/views/admin_add_level.php:24
1627
+ msgid "Days (Access expires after given number of days)"
1628
+ msgstr ""
1629
+ "Napok (A felhasználói fiók hozzáférése a megadott napok száma után fog "
1630
+ "lejárni)"
1631
+
1632
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:26
1633
+ msgid "Weeks (Access expires after given number of weeks)"
1634
+ msgstr ""
1635
+ "Hetek (A felhasználói fiók hozzáférése a megadott hetek száma után fog "
1636
+ "lejárni)"
1637
+
1638
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:29 ../..
1639
+ #: plugins/simple-membership/views/admin_add_level.php:28
1640
+ msgid "Months (Access expires after given number of months)"
1641
+ msgstr ""
1642
+ "Hónapok (A felhasználói fiók hozzáférése a megadott hónapok száma után fog "
1643
+ "lejárni)"
1644
+
1645
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:32 ../..
1646
+ #: plugins/simple-membership/views/admin_add_level.php:30
1647
+ msgid "Years (Access expires after given number of years)"
1648
+ msgstr "Èvek (A felhasználói fiók hozzáférése a megadott évek száma után fog lejárni)"
1649
+
1650
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:34 ../..
1651
+ #: plugins/simple-membership/views/admin_add_level.php:31
1652
+ msgid "Fixed Date Expiry"
1653
+ msgstr "Fix napos lejárat"
1654
+
1655
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:35 ../..
1656
+ #: plugins/simple-membership/views/admin_add_level.php:32
1657
+ msgid "(Access expires on a fixed date)"
1658
+ msgstr "(Hozzáférés egy fix napon lejár)"
1659
+
1660
+ #: ../../plugins/simple-membership/views/admin_edit_level.php:41
1661
+ msgid "Edit Membership Level "
1662
+ msgstr "Felhasználói szint szerkesztése"
1663
+
1664
+ #: ../../plugins/simple-membership/views/admin_add.php:6
1665
+ msgid "Create a brand new user and add it to this site."
1666
+ msgstr "Ùj felhasználó hozzáadása az oldalhoz."
1667
+
1668
+ #. translators: password input field
1669
+ #: ../../plugins/simple-membership/views/admin_add.php:18
1670
+ msgid "(twice, required)"
1671
+ msgstr "(kétszer, szükséges)"
1672
+
1673
+ #: ../../plugins/simple-membership/views/admin_add.php:38
1674
+ msgid "Add New Member "
1675
+ msgstr "Ùj felhasználó hozzáadása"
1676
+
1677
+ #: ../../plugins/simple-membership/views/admin_membership_manage.php:17
1678
+ msgid "Example Content Protection Settings"
1679
+ msgstr "Példa tartalmak védelmének beállítása"
1680
+
1681
+ #: ../../plugins/simple-membership/views/login.php:24
1682
+ msgid "Remember Me"
1683
+ msgstr "Emlékezz rám"
1684
+
1685
+ #: ../../plugins/simple-membership/views/login.php:30
1686
+ msgid "Forgot Password"
1687
+ msgstr "Elfelejtett jelszó"
1688
+
1689
+ #: ../../plugins/simple-membership/views/admin_membership_level_menu.php:2
1690
+ msgid "Membership level"
1691
+ msgstr "Felhasználói szint"
1692
+
1693
+ #: ../../plugins/simple-membership/views/admin_membership_level_menu.php:3
1694
+ msgid "Manage Content Production"
1695
+ msgstr "Tartalom létrehozásának menedzselése"
1696
+
1697
+ #: ../../plugins/simple-membership/views/admin_membership_level_menu.php:4
1698
+ msgid "Category Protection"
1699
+ msgstr "Kategória védelem"
1700
+
1701
+ #: ../../plugins/simple-membership/views/add.php:41
1702
+ msgid "Register"
1703
+ msgstr "Regisztráció"
1704
+
1705
+ #: ../../plugins/simple-membership/views/admin_addon_settings.php:13
1706
+ msgid "Save Changes"
1707
+ msgstr "Változások mentése"
1708
+
1709
+ #: ../../plugins/simple-membership/views/payments/admin_create_payment_buttons.
1710
+ #: php:22
1711
+ msgid "Select Payment Button Type"
1712
+ msgstr "Fizetési mód gomb választása"
1713
+
1714
+ #: ../../plugins/simple-membership/views/payments/admin_create_payment_buttons.
1715
+ #: php:34
1716
+ msgid "Next"
1717
+ msgstr "Következő"
1718
+
1719
+ #: ../../plugins/simple-membership/views/payments/payment-
1720
+ #: gateway/admin_paypal_buy_now_button.php:18 ../../plugins/simple-
1721
+ #: membership/views/payments/payment-gateway/admin_paypal_buy_now_button.php:193
1722
+ msgid "PayPal Buy Now Button Configuration"
1723
+ msgstr "PayPAl \"Vedd meg most\" gomb beállítása"
1724
+
1725
+ #: ../../plugins/simple-membership/views/payments/payment-
1726
+ #: gateway/admin_paypal_buy_now_button.php:28 ../../plugins/simple-
1727
+ #: membership/views/payments/payment-gateway/admin_paypal_buy_now_button.php:210 .
1728
+ #: ./../plugins/simple-membership/views/payments/payment-
1729
+ #: gateway/admin_paypal_subscription_button.php:29 ../../plugins/simple-
1730
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1731
+ #: 301
1732
+ msgid "Button Title"
1733
+ msgstr "Gomb felirata"
1734
+
1735
+ #: ../../plugins/simple-membership/views/payments/payment-
1736
+ #: gateway/admin_paypal_buy_now_button.php:46 ../../plugins/simple-
1737
+ #: membership/views/payments/payment-gateway/admin_paypal_buy_now_button.php:228
1738
+ msgid "Payment Amount"
1739
+ msgstr "Fizetési összeg"
1740
+
1741
+ #: ../../plugins/simple-membership/views/payments/payment-
1742
+ #: gateway/admin_paypal_buy_now_button.php:54 ../../plugins/simple-
1743
+ #: membership/views/payments/payment-gateway/admin_paypal_buy_now_button.php:236 .
1744
+ #: ./../plugins/simple-membership/views/payments/payment-
1745
+ #: gateway/admin_paypal_subscription_button.php:47 ../../plugins/simple-
1746
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1747
+ #: 319
1748
+ msgid "Payment Currency"
1749
+ msgstr "Fizetési valuta"
1750
+
1751
+ #: ../../plugins/simple-membership/views/payments/payment-
1752
+ #: gateway/admin_paypal_buy_now_button.php:93 ../../plugins/simple-
1753
+ #: membership/views/payments/payment-gateway/admin_paypal_buy_now_button.php:275 .
1754
+ #: ./../plugins/simple-membership/views/payments/payment-
1755
+ #: gateway/admin_paypal_subscription_button.php:173 ../../plugins/simple-
1756
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1757
+ #: 445
1758
+ msgid "Return URL"
1759
+ msgstr "Vissza url"
1760
+
1761
+ #: ../../plugins/simple-membership/views/payments/payment-
1762
+ #: gateway/admin_paypal_buy_now_button.php:101 ../../plugins/simple-
1763
+ #: membership/views/payments/payment-gateway/admin_paypal_buy_now_button.php:283 .
1764
+ #: ./../plugins/simple-membership/views/payments/payment-
1765
+ #: gateway/admin_paypal_subscription_button.php:86 ../../plugins/simple-
1766
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1767
+ #: 358
1768
+ msgid "PayPal Email"
1769
+ msgstr "PayPal email"
1770
+
1771
+ #: ../../plugins/simple-membership/views/payments/payment-
1772
+ #: gateway/admin_paypal_buy_now_button.php:109 ../../plugins/simple-
1773
+ #: membership/views/payments/payment-gateway/admin_paypal_buy_now_button.php:291 .
1774
+ #: ./../plugins/simple-membership/views/payments/payment-
1775
+ #: gateway/admin_paypal_subscription_button.php:181 ../../plugins/simple-
1776
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1777
+ #: 453
1778
+ msgid "Button Image URL"
1779
+ msgstr "Gomb képének url-je"
1780
+
1781
+ #: ../../plugins/simple-membership/views/payments/payment-
1782
+ #: gateway/admin_paypal_buy_now_button.php:119 ../../plugins/simple-
1783
+ #: membership/views/payments/payment-gateway/admin_paypal_buy_now_button.php:301 .
1784
+ #: ./../plugins/simple-membership/views/payments/payment-
1785
+ #: gateway/admin_paypal_subscription_button.php:193 ../../plugins/simple-
1786
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1787
+ #: 465
1788
+ msgid "Save Payment Data"
1789
+ msgstr "Fizetési adatok mentése"
1790
+
1791
+ #: ../../plugins/simple-membership/views/payments/payment-
1792
+ #: gateway/admin_paypal_buy_now_button.php:202 ../../plugins/simple-
1793
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1794
+ #: 293
1795
+ msgid "Button ID"
1796
+ msgstr "Gomb ID-je"
1797
+
1798
+ #: ../../plugins/simple-membership/views/payments/payment-
1799
+ #: gateway/admin_paypal_subscription_button.php:20 ../../plugins/simple-
1800
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1801
+ #: 287
1802
+ msgid "PayPal Subscription Button Configuration"
1803
+ msgstr "PayPal előfizetői gomb beállítása"
1804
+
1805
+ #: ../../plugins/simple-membership/views/payments/payment-
1806
+ #: gateway/admin_paypal_subscription_button.php:94 ../../plugins/simple-
1807
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1808
+ #: 366
1809
+ msgid "Billing Amount Each Cycle"
1810
+ msgstr "Számlázási összeg periódusonként"
1811
+
1812
+ #: ../../plugins/simple-membership/views/payments/payment-
1813
+ #: gateway/admin_paypal_subscription_button.php:102 ../../plugins/simple-
1814
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1815
+ #: 374
1816
+ msgid "Billing Cycle"
1817
+ msgstr "Számlázási periódus"
1818
+
1819
+ #: ../../plugins/simple-membership/views/payments/payment-
1820
+ #: gateway/admin_paypal_subscription_button.php:115 ../../plugins/simple-
1821
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1822
+ #: 387
1823
+ msgid "Billing Cycle Count"
1824
+ msgstr "Számlázási periódus számolása"
1825
+
1826
+ #: ../../plugins/simple-membership/views/payments/payment-
1827
+ #: gateway/admin_paypal_subscription_button.php:123 ../../plugins/simple-
1828
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1829
+ #: 395
1830
+ msgid "Re-attempt on Failure"
1831
+ msgstr "Hiba esetén próbáld úrja"
1832
+
1833
+ #: ../../plugins/simple-membership/views/payments/payment-
1834
+ #: gateway/admin_paypal_subscription_button.php:136 ../../plugins/simple-
1835
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1836
+ #: 408
1837
+ msgid "Trial Billing Details (Leave empty if you are not offering a trial period)"
1838
+ msgstr "Próba számlázó részletek (hagyd szabadon, ha nem kínálsz próba időszakot)"
1839
+
1840
+ #: ../../plugins/simple-membership/views/payments/payment-
1841
+ #: gateway/admin_paypal_subscription_button.php:142 ../../plugins/simple-
1842
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1843
+ #: 414
1844
+ msgid "Trial Billing Amount"
1845
+ msgstr "Próba számlázó összeg"
1846
+
1847
+ #: ../../plugins/simple-membership/views/payments/payment-
1848
+ #: gateway/admin_paypal_subscription_button.php:150 ../../plugins/simple-
1849
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1850
+ #: 422
1851
+ msgid "Trial Billing Period"
1852
+ msgstr "Próba számlázó időszak"
1853
+
1854
+ #: ../../plugins/simple-membership/views/payments/payment-
1855
+ #: gateway/admin_paypal_subscription_button.php:167 ../../plugins/simple-
1856
+ #: membership/views/payments/payment-gateway/admin_paypal_subscription_button.php:
1857
+ #: 439
1858
+ msgid "Optional Details"
1859
+ msgstr "Opcionális beállítások"
1860
+
1861
+ #: ../../plugins/simple-membership/views/payments/payment-
1862
+ #: gateway/paypal_button_shortcode_view.php:85 ../../plugins/simple-
1863
+ #: membership/views/payments/payment-gateway/paypal_button_shortcode_view.php:87
1864
+ msgid "Buy Now"
1865
+ msgstr "Megvásárolom"
1866
+
1867
+ #: ../../plugins/simple-membership/views/payments/payment-
1868
+ #: gateway/paypal_button_shortcode_view.php:213 ../../plugins/simple-
1869
+ #: membership/views/payments/payment-gateway/paypal_button_shortcode_view.php:215
1870
+ msgid "Subscribe Now"
1871
+ msgstr "Feliratkozom"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://simple-membership-plugin.com/
4
  Tags: member, members, members only, membership, memberships, register, WordPress membership plugin, content, content protection, paypal, restrict, restrict access, Restrict content, admin, access control, subscription, teaser, protection, profile, login, login page, bbpress,
5
  Requires at least: 3.3
6
  Tested up to: 4.5
7
- Stable tag: 3.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -102,6 +102,7 @@ The following language translations are already available:
102
  * Indonesian
103
  * Hebrew
104
  * Catalan
 
105
 
106
  You can translate the plugin using the language [translation documentation](https://simple-membership-plugin.com/translate-simple-membership-plugin/).
107
 
@@ -122,6 +123,12 @@ Please visit the memberhsip plugin page to view screenshots:
122
  https://simple-membership-plugin.com/
123
 
124
  == Changelog ==
 
 
 
 
 
 
125
 
126
  = 3.2.5 =
127
  - Added a new feature to enable redirection to the last page after login (where they clicked the login link).
@@ -541,7 +548,7 @@ http://wordpress.org/plugins/simple-membership-after-login-redirection/
541
  - First commit to WordPress repository.
542
 
543
  == Upgrade Notice ==
544
- If you are using the form builder adddon, then that addon will need to be upgraded to v1.1 also.
545
 
546
  == Arbitrary section ==
547
  None
4
  Tags: member, members, members only, membership, memberships, register, WordPress membership plugin, content, content protection, paypal, restrict, restrict access, Restrict content, admin, access control, subscription, teaser, protection, profile, login, login page, bbpress,
5
  Requires at least: 3.3
6
  Tested up to: 4.5
7
+ Stable tag: 3.2.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
102
  * Indonesian
103
  * Hebrew
104
  * Catalan
105
+ * Hungarian
106
 
107
  You can translate the plugin using the language [translation documentation](https://simple-membership-plugin.com/translate-simple-membership-plugin/).
108
 
123
  https://simple-membership-plugin.com/
124
 
125
  == Changelog ==
126
+ = 3.2.6 =
127
+ - Added Hungarian language translation file. The translation was submitted by Laura Szitar.
128
+ - Improved the members menu navigation menu so the tabs are always visible (even when you go to the add or edit members screen).
129
+ - Added 2 new action hooks (They are triggered when subscription is cancelled and when a recurring payment is received).
130
+ - Improved the membership levels navigation menu tabs.
131
+ - The "Edit Member" interface now shows the member ID of the currently editing member.
132
 
133
  = 3.2.5 =
134
  - Added a new feature to enable redirection to the last page after login (where they clicked the login link).
548
  - First commit to WordPress repository.
549
 
550
  == Upgrade Notice ==
551
+ If you are using the form builder addon, then that addon will need to be upgraded to v1.1 also.
552
 
553
  == Arbitrary section ==
554
  None
simple-wp-membership.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Simple WordPress Membership
4
- Version: 3.2.5
5
  Plugin URI: https://simple-membership-plugin.com/
6
  Author: smp7, wp.insider
7
  Author URI: https://simple-membership-plugin.com/
@@ -17,7 +17,7 @@ include_once('classes/class.simple-wp-membership.php');
17
  include_once('classes/class.swpm-cronjob.php');
18
  include_once('swpm-compat.php');
19
 
20
- define('SIMPLE_WP_MEMBERSHIP_VER', '3.2.4');
21
  define('SIMPLE_WP_MEMBERSHIP_DB_VER', '1.2');
22
  define('SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL', home_url());
23
  define('SIMPLE_WP_MEMBERSHIP_PATH', dirname(__FILE__) . '/');
1
  <?php
2
  /*
3
  Plugin Name: Simple WordPress Membership
4
+ Version: 3.2.6
5
  Plugin URI: https://simple-membership-plugin.com/
6
  Author: smp7, wp.insider
7
  Author URI: https://simple-membership-plugin.com/
17
  include_once('classes/class.swpm-cronjob.php');
18
  include_once('swpm-compat.php');
19
 
20
+ define('SIMPLE_WP_MEMBERSHIP_VER', '3.2.6');
21
  define('SIMPLE_WP_MEMBERSHIP_DB_VER', '1.2');
22
  define('SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL', home_url());
23
  define('SIMPLE_WP_MEMBERSHIP_PATH', dirname(__FILE__) . '/');
views/admin_add_level.php CHANGED
@@ -1,6 +1,6 @@
1
  <div class="wrap" id="swpm-level-page">
2
 
3
- <form action="" method="post" name="swpm-create-level" id="swpm-create-level" class="validate"<?php do_action('level_new_form_tag');?>>
4
  <input name="action" type="hidden" value="createlevel" />
5
  <h3>Add Membership Level</h3>
6
  <p><?php echo SwpmUtils::_('Create new membership level.'); ?></p>
1
  <div class="wrap" id="swpm-level-page">
2
 
3
+ <form action="" method="post" name="swpm-create-level" id="swpm-create-level" class="validate">
4
  <input name="action" type="hidden" value="createlevel" />
5
  <h3>Add Membership Level</h3>
6
  <p><?php echo SwpmUtils::_('Create new membership level.'); ?></p>
views/admin_addon_settings.php CHANGED
@@ -1,15 +1,9 @@
1
- <div class="wrap">
2
 
3
- <h1><?php echo SwpmUtils::_('Simple WP Membership::Settings') ?></h1>
4
-
5
- <?php do_action("swpm-draw-tab"); ?>
6
-
7
- <p>
8
- <?php echo SwpmUtils::_("Some of the simple membership plugin's addon settings and options will be displayed here (if you have them)") ?>
9
- </p>
10
- <form action="" method="POST">
11
- <input type="hidden" name="tab" value="<?php echo $current_tab; ?>" />
12
- <?php do_action('swpm_addon_settings_section'); ?>
13
- <?php submit_button(SwpmUtils::_('Save Changes'), 'primary', 'swpm-addon-settings'); ?>
14
- </form>
15
- </div><!-- end of wrap -->
 
1
 
2
+ <p>
3
+ <?php echo SwpmUtils::_("Some of the simple membership plugin's addon settings and options will be displayed here (if you have them)") ?>
4
+ </p>
5
+ <form action="" method="POST">
6
+ <input type="hidden" name="tab" value="<?php echo $current_tab; ?>" />
7
+ <?php do_action('swpm_addon_settings_section'); ?>
8
+ <?php submit_button(SwpmUtils::_('Save Changes'), 'primary', 'swpm-addon-settings'); ?>
9
+ </form>
 
 
 
 
 
views/admin_category_list.php CHANGED
@@ -1,31 +1,33 @@
1
- <div class="wrap">
2
- <h1><?php echo SwpmUtils::_('Simple WP Membership::Categories') ?></h1>
3
- <?php include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_membership_level_menu.php'); ?>
4
 
5
- <div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
 
6
  <p>
7
- <?php echo SwpmUtils::_('First of all, globally protect the category on your site by selecting "General Protection" from the drop-down box below and then select the categories that should be protected from non-logged in users.'); ?>
8
  </p>
9
  <p>
10
- <?php echo SwpmUtils::_('Next, select an existing membership level from the drop-down box below and then select the categories you want to grant access to (for that particular membership level).'); ?>
11
  </p>
12
- </div>
13
- <form id="category_list_form" method="post">
14
- <p class="swpm-select-box-left">
15
- <label for="membership_level_id"><?php SwpmUtils::e('Membership Level:'); ?></label>
16
- <select id="membership_level_id" name="membership_level_id">
17
- <option <?php echo $category_list->selected_level_id==1? "selected": "" ?> value="1">General Protection</option>
18
- <?php echo SwpmUtils::membership_level_dropdown($category_list->selected_level_id); ?>
19
- </select>
20
- </p>
21
- <p class="swpm-select-box-left"><input type="submit" class="button-primary" name="update_category_list" value="<?php SwpmUtils::e('Update'); ?>"></p>
 
 
 
 
22
  <?php $category_list->prepare_items(); ?>
23
  <?php $category_list->display(); ?>
24
- </form>
25
- </div><!-- end of .wrap -->
26
  <script type="text/javascript">
27
- jQuery(document).ready(function($){
28
- $('#membership_level_id').change(function(){
29
  $('#category_list_form').submit();
30
  });
31
  });
 
 
 
1
 
2
+
3
+ <div class="swpm-yellow-box">
4
  <p>
5
+ <?php echo SwpmUtils::_('First of all, globally protect the category on your site by selecting "General Protection" from the drop-down box below and then select the categories that should be protected from non-logged in users.'); ?>
6
  </p>
7
  <p>
8
+ <?php echo SwpmUtils::_('Next, select an existing membership level from the drop-down box below and then select the categories you want to grant access to (for that particular membership level).'); ?>
9
  </p>
10
+ <p>
11
+ Read the <a href="https://simple-membership-plugin.com/use-category-protection-membership-site/" target="_blank">category protection documentation</a> to learn more.
12
+ </p>
13
+ </div>
14
+
15
+ <form id="category_list_form" method="post">
16
+ <p class="swpm-select-box-left">
17
+ <label for="membership_level_id"><?php SwpmUtils::e('Membership Level:'); ?></label>
18
+ <select id="membership_level_id" name="membership_level_id">
19
+ <option <?php echo $category_list->selected_level_id == 1 ? "selected" : "" ?> value="1">General Protection</option>
20
+ <?php echo SwpmUtils::membership_level_dropdown($category_list->selected_level_id); ?>
21
+ </select>
22
+ </p>
23
+ <p class="swpm-select-box-left"><input type="submit" class="button-primary" name="update_category_list" value="<?php SwpmUtils::e('Update'); ?>"></p>
24
  <?php $category_list->prepare_items(); ?>
25
  <?php $category_list->display(); ?>
26
+ </form>
27
+
28
  <script type="text/javascript">
29
+ jQuery(document).ready(function($) {
30
+ $('#membership_level_id').change(function() {
31
  $('#category_list_form').submit();
32
  });
33
  });
views/admin_edit.php CHANGED
@@ -3,7 +3,11 @@
3
  <input name="action" type="hidden" value="edituser" />
4
  <?php wp_nonce_field( 'edit-swpmuser', '_wpnonce_edit-swpmuser' ) ?>
5
  <h3><?php echo SwpmUtils::_('Edit Member') ?></h3>
6
- <p><?php echo SwpmUtils::_('Edit existing member details.'); ?></p>
 
 
 
 
7
  <table class="form-table">
8
  <tr class="form-field form-required">
9
  <th scope="row"><label for="user_name"><?php echo SwpmUtils::_('Username'); ?> <span class="description"><?php echo SwpmUtils::_('(required)'); ?></span></label></th>
3
  <input name="action" type="hidden" value="edituser" />
4
  <?php wp_nonce_field( 'edit-swpmuser', '_wpnonce_edit-swpmuser' ) ?>
5
  <h3><?php echo SwpmUtils::_('Edit Member') ?></h3>
6
+ <p>
7
+ <?php echo SwpmUtils::_('Edit existing member details.'); ?>
8
+ <?php echo SwpmUtils::_(' You are currenty editing member with member ID: '); ?>
9
+ <?php echo esc_attr($member_id); ?>
10
+ </p>
11
  <table class="form-table">
12
  <tr class="form-field form-required">
13
  <th scope="row"><label for="user_name"><?php echo SwpmUtils::_('Username'); ?> <span class="description"><?php echo SwpmUtils::_('(required)'); ?></span></label></th>
views/admin_edit_level.php CHANGED
@@ -2,8 +2,13 @@
2
  <form action="" method="post" name="swpm-edit-level" id="swpm-edit-level" class="validate"<?php do_action('level_edit_form_tag');?>>
3
  <input name="action" type="hidden" value="editlevel" />
4
  <?php wp_nonce_field( 'edit-swpmlevel', '_wpnonce_edit-swpmlevel' ) ?>
5
- <h3><?php echo SwpmUtils::_('Edit membership level'); ?></h3>
6
- <p><?php echo SwpmUtils::_('Edit membership level.'); ?></p>
 
 
 
 
 
7
  <table class="form-table">
8
  <tbody>
9
  <tr>
2
  <form action="" method="post" name="swpm-edit-level" id="swpm-edit-level" class="validate"<?php do_action('level_edit_form_tag');?>>
3
  <input name="action" type="hidden" value="editlevel" />
4
  <?php wp_nonce_field( 'edit-swpmlevel', '_wpnonce_edit-swpmlevel' ) ?>
5
+ <h2><?php echo SwpmUtils::_('Edit membership level'); ?></h2>
6
+ <p>
7
+ <?php
8
+ echo SwpmUtils::_('You can edit details of a selected membership level from this interface. ');
9
+ echo SwpmUtils::_('You are currently editing: '). stripslashes($alias);
10
+ ?>
11
+ </p>
12
  <table class="form-table">
13
  <tbody>
14
  <tr>
views/admin_members.php DELETED
@@ -1,6 +0,0 @@
1
- <div class="wrap">
2
- <h1><?php echo SwpmUtils::_('Simple WP Membership::Members') ?>
3
- <a href="admin.php?page=simple_wp_membership&member_action=add" class="add-new-h2"><?php echo SwpmUtils::_('Add New'); ?></a></h1>
4
- <?php include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_members_menu.php'); ?>
5
- <?php echo $output ?>
6
- </div><!-- end of wrap -->
 
 
 
 
 
 
views/admin_members_menu.php DELETED
@@ -1,12 +0,0 @@
1
- <h2 class="nav-tab-wrapper">
2
- <a class="nav-tab <?php echo ($selected == "") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership"><?php echo SwpmUtils::_('Members') ?></a>
3
- <a class="nav-tab <?php echo ($selected == "add") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership&member_action=add"><?php echo SwpmUtils::_('Add Member') ?></a>
4
- <?php
5
- $menu = apply_filters('swpm_admin_members_menu_hook', array());
6
- foreach ($menu as $member_action => $title):
7
- ?>
8
- <a class="nav-tab <?php echo ($selected == $member_action) ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership&member_action=<?php echo $member_action; ?>" ><?php SwpmUtils::e($title) ?></a>
9
- <?php
10
- endforeach;
11
- ?>
12
- </h2>
 
 
 
 
 
 
 
 
 
 
 
 
views/admin_membership_level_menu.php DELETED
@@ -1,5 +0,0 @@
1
- <h2 class="nav-tab-wrapper">
2
- <a class="nav-tab <?php echo ($selected == "") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_levels"><?php echo SwpmUtils::_('Membership level') ?></a>
3
- <a class="nav-tab <?php echo ($selected == "manage") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_levels&level_action=manage"><?php echo SwpmUtils::_('Manage Content Production') ?></a>
4
- <a class="nav-tab <?php echo ($selected == "category_list") ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_levels&level_action=category_list"><?php echo SwpmUtils::_('Category Protection') ?></a>
5
- </h2>
 
 
 
 
 
views/admin_membership_levels.php DELETED
@@ -1,25 +0,0 @@
1
- <div class="wrap">
2
- <h1><?php echo SwpmUtils::_('Simple WP Membership::Membership Levels') ?>
3
- <a href="admin.php?page=simple_wp_membership_levels&level_action=add" class="add-new-h2"><?php SwpmUtils::e('Add New', 'Level'); ?></a></h1>
4
-
5
- <?php include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_membership_level_menu.php'); ?>
6
-
7
- <form method="post">
8
- <p class="search-box">
9
- <label class="screen-reader-text" for="search_id-search-input">
10
- search:</label>
11
- <input id="search_id-search-input" type="text" name="s" value="" />
12
- <input id="search-submit" class="button" type="submit" name="" value="<?php echo SwpmUtils::_('search')?>" />
13
- <input type="hidden" name="page" value="simple_wp_membership" />
14
- </p>
15
- </form>
16
- <?php $this->prepare_items(); ?>
17
- <form method="post">
18
- <?php $this->display(); ?>
19
- </form>
20
-
21
- <p>
22
- <a href="admin.php?page=simple_wp_membership_levels&level_action=add" class="button-primary"><?php SwpmUtils::e('Add New') ?></a>
23
- </p>
24
-
25
- </div><!-- end of .wrap -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/admin_membership_manage.php CHANGED
@@ -1,22 +1,22 @@
1
- <div class="wrap">
2
- <h1>Simple WP Membership::Manage Protection</h1>
3
- <?php include_once(SIMPLE_WP_MEMBERSHIP_PATH.'views/admin_membership_level_menu.php');?>
4
 
5
  <div id="poststuff"><div id="post-body">
6
- <h1>How to Apply Content Protection</h1>
 
 
 
 
7
 
8
- <p>Take the following steps to apply protection your content so only members can have access to it.</p>
9
 
10
- 1. Edit the Post or Page that you want to protect in WordPress editor.
11
- <br />2. Scroll down to the section titled 'Simple WP Membership Protection'.
12
- <br />3. Select 'Yes, Protect this content' option.
13
- <br />4. Check the membership levels that should have access to that page's content.
14
- <br />5. Hit the Update/Save Button to save the changes.
15
 
16
- <br /><br />
17
- <h3><?php echo SwpmUtils::_('Example Content Protection Settings')?></h3>
18
 
19
- <img src="<?php echo SIMPLE_WP_MEMBERSHIP_URL.'/images/simple-membership-content-protection-usage.png'; ?>" alt="Content protection example usage">
20
 
21
- </div></div>
22
- </div> <!-- end of wrap -->
 
 
 
1
 
2
  <div id="poststuff"><div id="post-body">
3
+
4
+ <div class="swpm-yellow-box">
5
+ Read the <a href="https://simple-membership-plugin.com/apply-content-protection/" target="_blank">content protection documentation</a> to learn more.
6
+ </div>
7
+ <h1>How to Apply Content Protection</h1>
8
 
9
+ <p>Take the following steps to apply protection to your content so only members can have access to it.</p>
10
 
11
+ 1. Edit the Post or Page that you want to protect in WordPress editor.
12
+ <br />2. Scroll down to the section titled 'Simple WP Membership Protection'.
13
+ <br />3. Select 'Yes, Protect this content' option.
14
+ <br />4. Check the membership levels that should have access to that page's content.
15
+ <br />5. Hit the Update/Save Button to save the changes.
16
 
17
+ <br /><br />
18
+ <h3><?php echo SwpmUtils::_('Example Content Protection Settings') ?></h3>
19
 
20
+ <img src="<?php echo SIMPLE_WP_MEMBERSHIP_URL . '/images/simple-membership-content-protection-usage.png'; ?>" alt="Content protection example usage">
21
 
22
+ </div></div><!-- end of poststuff and post-body -->
 
views/admin_payment_settings.php DELETED
@@ -1,47 +0,0 @@
1
- <?php screen_icon( 'options-general' );?>
2
- <h1><?php echo SwpmUtils::_('Simple WP Membership::Settings')?></h1>
3
- <div class="wrap">
4
-
5
- <?php do_action("swpm-draw-tab"); ?>
6
-
7
- <div id="poststuff"><div id="post-body">
8
-
9
- <?php
10
- global $wpdb;
11
-
12
- if(isset($_POST['swpm_generate_adv_code']))
13
- {
14
- $paypal_ipn_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL.'/?swpm_process_ipn=1';
15
- $mem_level = trim($_POST['swpm_paypal_adv_member_level']);
16
- $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id !=1 AND id =%d", $mem_level);
17
- $membership_level_resultset = $wpdb->get_row($query);
18
- if($membership_level_resultset){
19
- $pp_av_code = 'notify_url='.$paypal_ipn_url.'<br /> '.'custom=subsc_ref='.$mem_level;
20
- echo '<div id="message" class="updated fade"><p>';
21
- echo '<strong>Paste the code below in the "Add advanced variables" field of your PayPal button for membership level '.$mem_level.'</strong>';
22
- echo '<br /><br /><code>'.$pp_av_code.'</code>';
23
- echo '</p></div>';
24
- }
25
- else{
26
- echo '<div id="message" class="updated fade"><p><strong>';
27
- SwpmUtils::e( 'Error! The membership level ID ('.$mem_level.') you specified is incorrect. Please check this value again.');
28
- echo '</strong></p></div>';
29
- }
30
- }
31
- ?>
32
- <div class="postbox">
33
- <h3><label for="title"><?php echo SwpmUtils::_('PayPal Integration Settings')?></label></h3>
34
- <div class="inside">
35
-
36
- <p><strong><?php echo SwpmUtils::_('Generate the "Advanced Variables" Code for your PayPal button')?></strong></p>
37
-
38
- <form action="" method="post">
39
- <?php echo SwpmUtils::_('Enter the Membership Level ID')?>
40
- <input type="text" value="" size="4" name="swpm_paypal_adv_member_level">
41
- <input type="submit" value="<?php echo SwpmUtils::_('Generate Code')?>" class="button-primary" name="swpm_generate_adv_code">
42
- </form>
43
-
44
- </div></div>
45
-
46
- </div></div><!-- end of poststuff and post-body -->
47
- </div><!-- end of wrap -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/admin_payments_page.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
- $output = '';
3
- ?>
4
-
5
- <h1><?php echo SwpmUtils::_('Simple Membership::Payments') ?></h1>
6
- <div class="wrap">
7
- <div id="poststuff"><div id="post-body">
8
-
9
- <div style="background: #DDDDDD;border: 1px solid #CCCCCC;color: #383838;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
10
- <p>
11
- <?php echo SwpmUtils::_('All the payments/transactions of your members are recorded here.'); ?>
12
- </p>
13
- </div>
14
-
15
- <div class="postbox">
16
- <h3><label for="title">Search Transaction</label></h3>
17
- <div class="inside">
18
- <?php echo SwpmUtils::_('Search for a transaction by using email or name'); ?>
19
- <br /><br />
20
- <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
21
- <input name="swpm_txn_search" type="text" size="40" value="<?php echo isset($_POST['swpm_txn_search']) ? $_POST['swpm_txn_search'] : ''; ?>"/>
22
- <input type="submit" name="swpm_txn_search_btn" class="button" value="<?php echo SwpmUtils::_('Search'); ?>" />
23
- </form>
24
- </div></div>
25
-
26
- <?php
27
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . 'classes/admin-includes/class.swpm-payments-list-table.php');
28
- //Create an instance of our package class...
29
- $payments_list_table = new SWPMPaymentsListTable();
30
-
31
- //Check if an action was performed
32
- if (isset($_REQUEST['action'])) { //Do list table form row action tasks
33
- if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete_txn') { //Delete link was clicked for a row in list table
34
- $record_id = strip_tags($_REQUEST['id']);
35
- $payments_list_table->delete_record($record_id);
36
- $success_msg = '<div id="message" class="updated"><p><strong>';
37
- $success_msg .= SwpmUtils::_('The selected entry was deleted!');
38
- $success_msg .= '</strong></p></div>';
39
- echo $success_msg;
40
- }
41
- }
42
-
43
- //Fetch, prepare, sort, and filter our data...
44
- $payments_list_table->prepare_items();
45
- ?>
46
- <form id="tables-filter" method="get" onSubmit="return confirm('Are you sure you want to perform this bulk operation on the selected entries?');">
47
- <!-- For plugins, we also need to ensure that the form posts back to our current page -->
48
- <input type="hidden" name="page" value="<?php echo $_REQUEST['page']; ?>" />
49
- <!-- Now we can render the completed list table -->
50
- <?php $payments_list_table->display(); ?>
51
- </form>
52
-
53
- </div></div><!-- end of poststuff and post-body -->
54
- </div><!-- end of .wrap -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/admin_settings.php CHANGED
@@ -1,12 +1,9 @@
1
- <div class="wrap">
2
-
3
- <h1><?php echo SwpmUtils::_('Simple WP Membership::Settings') ?></h1>
4
 
5
- <?php do_action("swpm-draw-tab"); ?>
6
- <form action="options.php" method="POST">
7
- <input type="hidden" name="tab" value="<?php echo $current_tab; ?>" />
8
- <?php settings_fields('swpm-settings-tab-' . $current_tab); ?>
9
- <?php do_settings_sections('simple_wp_membership_settings'); ?>
10
- <?php submit_button(); ?>
11
- </form>
12
- </div>
 
 
 
1
 
2
+ <!-- This file outputs the settings form fields for a lot of the settings pages -->
3
+ <form action="options.php" method="POST">
4
+ <input type="hidden" name="tab" value="<?php echo $current_tab; ?>" />
5
+ <?php settings_fields('swpm-settings-tab-' . $current_tab); ?>
6
+ <?php do_settings_sections('simple_wp_membership_settings'); ?>
7
+ <?php submit_button(); ?>
8
+ </form>
9
+
views/admin_tools_settings.php CHANGED
@@ -1,59 +1,57 @@
1
- <div class="wrap">
2
 
3
- <h1><?php echo SwpmUtils::_('Simple WP Membership::Settings') ?></h1>
 
4
 
5
- <?php do_action("swpm-draw-tab"); ?>
 
 
6
 
7
- <div id="poststuff"><div id="post-body">
8
- <div class="postbox">
9
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('Generate a Registration Completion link') ?></label></h3>
10
- <div class="inside">
11
 
12
- <p><strong><?php echo SwpmUtils::_('You can manually generate a registration completion link here and give it to your customer if they have missed the email that was automatically sent out to them after the payment.') ?></strong></p>
13
-
14
- <form action="" method="post">
15
- <table>
16
- <tr>
17
  <?php echo SwpmUtils::_('Generate Registration Completion Link') ?>
18
- <br /><input type="radio" value="one" name="swpm_link_for" /><?php SwpmUtils::e('For a Particular Member ID'); ?>
19
- <input type="text" name="member_id" size="5" value="" />
20
- <br /><strong><?php echo SwpmUtils::_('OR') ?></strong>
21
- <br /><input type="radio" checked="checked" value="all" name="swpm_link_for" /> <?php echo SwpmUtils::_('For All Incomplete Registrations') ?>
22
- </tr>
23
- <tr>
24
- <td>
25
- <div class="swpm-margin-top-10"></div>
26
- <?php echo SwpmUtils::_('Send Registration Reminder Email too') ?> <input type="checkbox" value="checked" name="swpm_reminder_email">
27
- </td>
28
- </tr>
29
- <tr>
30
- <td>
31
- <div class="swpm-margin-top-10"></div>
32
- <input type="submit" name="submit" class="button-primary" value="<?php echo SwpmUtils::_('Submit') ?>" />
33
- </td>
34
- </tr>
35
-
36
- <tr>
37
- <td>
38
- <div class="swpm-margin-top-10"></div>
39
- <?php
40
- if(!empty($links)){
41
- echo '<div class="swpm-green-box">'. SwpmUtils::_('Link(s) generated successfully. The following link(s) can be used to complete the registration.') .'</div>';
42
- }else{
43
- echo '<div class="swpm-grey-box">'. SwpmUtils::_('Registration completion links will appear below').'</div>';
44
- }
45
- ?>
46
- <div class="swpm-margin-top-10"></div>
47
- <?php foreach ($links as $key => $link){ ?>
48
- <input type="text" size="120" readonly="readonly" name="link[<?php echo $key ?>]" value="<?php echo $link; ?>"/><br/>
49
- <?php } ?>
50
- </td>
51
- </tr>
52
-
53
- </table>
54
- </form>
55
-
56
- </div></div>
57
-
58
- </div></div><!-- end of poststuff and post-body -->
59
- </div><!-- end of wrap -->
 
 
1
 
2
+ <div id="poststuff">
3
+ <div id="post-body">
4
 
5
+ <div class="postbox">
6
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('Generate a Registration Completion link') ?></label></h3>
7
+ <div class="inside">
8
 
9
+ <p><strong><?php echo SwpmUtils::_('You can manually generate a registration completion link here and give it to your customer if they have missed the email that was automatically sent out to them after the payment.') ?></strong></p>
 
 
 
10
 
11
+ <form action="" method="post">
12
+ <table>
13
+ <tr>
 
 
14
  <?php echo SwpmUtils::_('Generate Registration Completion Link') ?>
15
+ <br /><input type="radio" value="one" name="swpm_link_for" /><?php SwpmUtils::e('For a Particular Member ID'); ?>
16
+ <input type="text" name="member_id" size="5" value="" />
17
+ <br /><strong><?php echo SwpmUtils::_('OR') ?></strong>
18
+ <br /><input type="radio" checked="checked" value="all" name="swpm_link_for" /> <?php echo SwpmUtils::_('For All Incomplete Registrations') ?>
19
+ </tr>
20
+ <tr>
21
+ <td>
22
+ <div class="swpm-margin-top-10"></div>
23
+ <?php echo SwpmUtils::_('Send Registration Reminder Email Too') ?> <input type="checkbox" value="checked" name="swpm_reminder_email">
24
+ </td>
25
+ </tr>
26
+ <tr>
27
+ <td>
28
+ <div class="swpm-margin-top-10"></div>
29
+ <input type="submit" name="submit" class="button-primary" value="<?php echo SwpmUtils::_('Submit') ?>" />
30
+ </td>
31
+ </tr>
32
+
33
+ <tr>
34
+ <td>
35
+ <div class="swpm-margin-top-10"></div>
36
+ <?php
37
+ if (!empty($links)) {
38
+ echo '<div class="swpm-green-box">' . SwpmUtils::_('Link(s) generated successfully. The following link(s) can be used to complete the registration.') . '</div>';
39
+ } else {
40
+ echo '<div class="swpm-grey-box">' . SwpmUtils::_('Registration completion links will appear below') . '</div>';
41
+ }
42
+ ?>
43
+ <div class="swpm-margin-top-10"></div>
44
+ <?php foreach ($links as $key => $link) { ?>
45
+ <input type="text" size="120" readonly="readonly" name="link[<?php echo $key ?>]" value="<?php echo $link; ?>"/><br/>
46
+ <?php } ?>
47
+ </td>
48
+ </tr>
49
+
50
+ </table>
51
+ </form>
52
+
53
+ </div></div>
54
+
55
+ </div><!-- end of post-body -->
56
+ </div><!-- end of poststuff -->
57
+
views/payments/admin_payment_settings.php CHANGED
@@ -1,45 +1,40 @@
1
- <div class="wrap">
2
-
3
- <h1><?php echo SwpmUtils::_('Simple WP Membership::Settings') ?></h1>
4
-
5
- <?php do_action("swpm-draw-tab"); ?>
6
-
7
- <div id="poststuff"><div id="post-body">
8
-
9
- <?php
10
- global $wpdb;
11
-
12
- if (isset($_POST['swpm_generate_adv_code'])) {
13
- $paypal_ipn_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_ipn=1';
14
- $mem_level = trim($_POST['swpm_paypal_adv_member_level']);
15
- $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id !=1 AND id =%d", $mem_level);
16
- $membership_level_resultset = $wpdb->get_row($query);
17
- if ($membership_level_resultset) {
18
- $pp_av_code = 'notify_url=' . $paypal_ipn_url . '<br /> ' . 'custom=subsc_ref=' . $mem_level;
19
- echo '<div id="message" class="updated fade"><p>';
20
- echo '<strong>Paste the code below in the "Add advanced variables" field of your PayPal button for membership level ' . $mem_level . '</strong>';
21
- echo '<br /><br /><code>' . $pp_av_code . '</code>';
22
- echo '</p></div>';
23
- } else {
24
- echo '<div id="message" class="updated fade"><p><strong>';
25
- SwpmUtils::e('Error! The membership level ID (' . $mem_level . ') you specified is incorrect. Please check this value again.');
26
- echo '</strong></p></div>';
27
- }
28
  }
29
- ?>
30
- <div class="postbox">
31
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('PayPal Integration Settings') ?></label></h3>
32
- <div class="inside">
 
 
 
33
 
34
- <p><strong><?php echo SwpmUtils::_('Generate the "Advanced Variables" Code for your PayPal button') ?></strong></p>
 
 
 
 
35
 
36
- <form action="" method="post">
37
- <?php echo SwpmUtils::_('Enter the Membership Level ID') ?>
38
- <input type="text" value="" size="4" name="swpm_paypal_adv_member_level">
39
- <input type="submit" value="<?php echo SwpmUtils::_('Generate Code') ?>" class="button-primary" name="swpm_generate_adv_code">
40
- </form>
41
 
42
- </div></div>
43
 
44
- </div></div><!-- end of poststuff and post-body -->
45
- </div><!-- end of wrap -->
1
+
2
+ <div id="poststuff"><div id="post-body">
3
+
4
+ <?php
5
+ global $wpdb;
6
+
7
+ if (isset($_POST['swpm_generate_adv_code'])) {
8
+ $paypal_ipn_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_ipn=1';
9
+ $mem_level = trim($_POST['swpm_paypal_adv_member_level']);
10
+ $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id !=1 AND id =%d", $mem_level);
11
+ $membership_level_resultset = $wpdb->get_row($query);
12
+ if ($membership_level_resultset) {
13
+ $pp_av_code = 'notify_url=' . $paypal_ipn_url . '<br /> ' . 'custom=subsc_ref=' . $mem_level;
14
+ echo '<div id="message" class="updated fade"><p>';
15
+ echo '<strong>Paste the code below in the "Add advanced variables" field of your PayPal button for membership level ' . $mem_level . '</strong>';
16
+ echo '<br /><br /><code>' . $pp_av_code . '</code>';
17
+ echo '</p></div>';
18
+ } else {
19
+ echo '<div id="message" class="updated fade"><p><strong>';
20
+ SwpmUtils::e('Error! The membership level ID (' . $mem_level . ') you specified is incorrect. Please check this value again.');
21
+ echo '</strong></p></div>';
 
 
 
 
 
 
22
  }
23
+ }
24
+ ?>
25
+ <div class="postbox">
26
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('PayPal Integration Settings') ?></label></h3>
27
+ <div class="inside">
28
+
29
+ <p><strong><?php echo SwpmUtils::_('Generate the "Advanced Variables" Code for your PayPal button') ?></strong></p>
30
 
31
+ <form action="" method="post">
32
+ <?php echo SwpmUtils::_('Enter the Membership Level ID') ?>
33
+ <input type="text" value="" size="4" name="swpm_paypal_adv_member_level">
34
+ <input type="submit" value="<?php echo SwpmUtils::_('Generate Code') ?>" class="button-primary" name="swpm_generate_adv_code">
35
+ </form>
36
 
37
+ </div></div>
 
 
 
 
38
 
39
+ </div></div><!-- end of poststuff and post-body -->
40
 
 
 
views/payments/admin_payments_page.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- $output = '';
3
-
4
- $tab = isset($_GET['tab']) ? $_GET['tab'] : '';
5
- ?>
6
-
7
- <div class="wrap">
8
-
9
- <h1><?php echo SwpmUtils::_('Simple Membership::Payments') ?></h1>
10
-
11
- <h2 class="nav-tab-wrapper">
12
- <a class="nav-tab <?php echo ($tab == '') ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_payments"><?php SwpmUtils::e('Transactions'); ?></a>
13
- <a class="nav-tab <?php echo ($tab == 'payment_buttons') ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_payments&tab=payment_buttons"><?php SwpmUtils::e('Manage Payment Buttons'); ?></a>
14
- <a class="nav-tab <?php echo ($tab == 'create_new_button') ? 'nav-tab-active' : ''; ?>" href="admin.php?page=simple_wp_membership_payments&tab=create_new_button"><?php SwpmUtils::e('Create New Button'); ?></a>
15
-
16
- <?php
17
- if ($tab == 'edit_button') {//Only show the "edit button" tab when a button is being edited.
18
- echo '<a class="nav-tab nav-tab-active" href="#">Edit Button</a>';
19
- }
20
- ?>
21
- </h2>
22
-
23
- <div id="poststuff"><div id="post-body">
24
-
25
- <?php
26
- switch ($tab) {
27
- case 'payment_buttons':
28
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_payment_buttons.php');
29
- break;
30
- case 'create_new_button':
31
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_create_payment_buttons.php');
32
- break;
33
- case 'edit_button':
34
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_edit_payment_buttons.php');
35
- break;
36
- case 'all_txns':
37
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_all_payment_transactions.php');
38
- break;
39
- default:
40
- include_once(SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_all_payment_transactions.php');
41
- break;
42
- }
43
- ?>
44
-
45
- </div></div><!-- end of poststuff and post-body -->
46
- </div><!-- end of .wrap -->