diff --git a/admin/slm-add-licenses.php b/admin/slm-add-licenses.php index 5db2bcb..4dedd5c 100755 --- a/admin/slm-add-licenses.php +++ b/admin/slm-add-licenses.php @@ -176,7 +176,13 @@ function slm_add_licenses_menu() - + + '; + } + ?> + Epikly



License key was activated successfully !

'.$message.'

Regards,

'.get_bloginfo( 'name' ).'
'.get_bloginfo( 'admin_email' ).'

'; + return $template; + + } + static function count_licenses($status){ global $wpdb; $license_table = SLM_TBL_LICENSE_KEYS; $get_lic_status = $wpdb->get_var("SELECT COUNT(*) FROM $license_table WHERE lic_status = '" . $status . "'"); return $get_lic_status; } + static function slm_get_icon_url($size, $filename){ + return SLM_ASSETS_URL . 'icons/' . $size . '/' .$filename; + } static function count_logrequest() { @@ -386,8 +436,6 @@ static function create_email_log($lic_key, $sent_to, $status, $sent, $date_sent) SLM_Helper_Class::write_log('email log created for '. $lic_key); } - - static function slm_wp_dashboards_stats($amount){ global $wpdb; $slm_log_table = SLM_TBL_LICENSE_KEYS; @@ -403,6 +451,25 @@ static function slm_wp_dashboards_stats($amount){ } } + static function slm_get_licinfo ($api_action, $license_key){ + $api_url = get_site_url() . '/?secret_key=' . SLM_Helper_Class::slm_get_option('lic_verification_secret') . '&slm_action='.$api_action.'&license_key='.$license_key; + $curl = curl_init(); + curl_setopt_array($curl, array( + CURLOPT_URL => $api_url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => "", + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => "GET", + )); + $response = curl_exec($curl); + curl_close($curl); + $json = json_decode($response); + return $json; + } + static function get_subscriber_licenses(){ global $wpdb; $email = $_GET['email']; @@ -430,15 +497,7 @@ static function get_lic_activity($license_key){ $slm_log_table = SLM_TBL_LIC_LOG; echo ' -
- - - - - - - - +
Request IDInfo
'; $activity = $wpdb->get_results( "SELECT * FROM " . $slm_log_table . " WHERE license_key='" . $license_key."';"); foreach ($activity as $log) { @@ -455,10 +514,4 @@ static function get_lic_activity($license_key){
ID Request
'; } - - - - - -} - +} \ No newline at end of file diff --git a/languages/es_ES.mo b/languages/es_ES.mo new file mode 100644 index 0000000..d1b73ce Binary files /dev/null and b/languages/es_ES.mo differ diff --git a/languages/es_ES.po b/languages/es_ES.po new file mode 100644 index 0000000..6a9fc7c --- /dev/null +++ b/languages/es_ES.po @@ -0,0 +1,631 @@ +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: Software License Manager\n" +"POT-Creation-Date: 2020-04-21 17:15-0400\n" +"PO-Revision-Date: 2020-04-21 17:15-0400\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-Flags-xgettext: --add-comments=translators:\n" +"X-Poedit-WPHeader: software-license-manager.php\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" +"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"Last-Translator: \n" +"Language: es_ES\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.min.js\n" +"X-Poedit-SearchPathExcluded-1: node_modules\n" + +#: admin/includes/cronjobs/slm-tasks.php:10 +msgid "Every day" +msgstr "Cada día" + +#: admin/includes/plugin-update-checker/Puc/v4p6/Plugin/Ui.php:54 +msgid "View details" +msgstr "Ver detalles" + +#: admin/includes/plugin-update-checker/Puc/v4p6/Plugin/Ui.php:77 +#, php-format +msgid "More information about %s" +msgstr "Más información sobre %s" + +#: admin/includes/plugin-update-checker/Puc/v4p6/Plugin/Ui.php:128 +msgid "Check for updates" +msgstr "Buscar actualizaciones" + +#: admin/includes/plugin-update-checker/Puc/v4p6/Plugin/Ui.php:213 +#, php-format +msgctxt "the plugin title" +msgid "The %s plugin is up to date." +msgstr "El plugin %s está actualizado." + +#: admin/includes/plugin-update-checker/Puc/v4p6/Plugin/Ui.php:215 +#, php-format +msgctxt "the plugin title" +msgid "A new version of the %s plugin is available." +msgstr "Una nueva versión del %s plugin está disponible." + +#: admin/includes/plugin-update-checker/Puc/v4p6/Plugin/Ui.php:217 +#, php-format +msgctxt "the plugin title" +msgid "Could not determine if updates are available for %s." +msgstr "No se pudo determinar si hay actualizaciones disponibles para %s." + +#: admin/includes/plugin-update-checker/Puc/v4p6/Plugin/Ui.php:223 +#, php-format +msgid "Unknown update checker status \"%s\"" +msgstr "Estado de actualización desconocido \"%s\"" + +#: admin/includes/plugin-update-checker/Puc/v4p6/Vcs/PluginUpdateChecker.php:98 +msgid "There is no changelog available." +msgstr "No hay changelog disponible." + +#: admin/includes/wpestores/slm-wpestores.php:70 +msgid "Item Name: " +msgstr "Nombre del artículo" + +#: admin/includes/wpestores/slm-wpestores.php:70 +msgid "License Key: " +msgstr "Clave de licencia" + +#: admin/slm-add-licenses.php:151 +msgid "Record could not be inserted into the database!" +msgstr "¡No se pudo insertar un registro en la base de datos!" + +#: admin/slm-add-licenses.php:159 +msgid "Update of the license key table failed!" +msgstr "¡Error al actualizar la tabla de claves de licencia!" + +#. Plugin Name of the plugin/theme +#: admin/slm-add-licenses.php:192 +msgid "Software License Manager" +msgstr "Administrador de licencias de software" + +#: admin/slm-add-licenses.php:195 +msgid "You can add a new license or edit an existing one from this interface." +msgstr "" +"Puede agregar una nueva licencia o editar una existente desde esta interfaz." + +#: admin/slm-add-licenses.php:241 admin/slm-add-licenses.php:302 +msgid "License key and status" +msgstr "Clave de licencia y estado" + +#: admin/slm-add-licenses.php:245 +msgid "User information" +msgstr "Información de usuario" + +#: admin/slm-add-licenses.php:251 +msgid "Devices & Domains" +msgstr "Dispositivos y Dominios" + +#: admin/slm-add-licenses.php:256 +msgid "Transaction" +msgstr "Transacción" + +#: admin/slm-add-licenses.php:260 +msgid "Product" +msgstr "Producto" + +#: admin/slm-add-licenses.php:266 +msgid "Activity log " +msgstr "Registro de actividad" + +#: admin/slm-add-licenses.php:273 +msgid "Export " +msgstr "Esportar " + +#: admin/slm-add-licenses.php:304 +msgid "License Key" +msgstr "Clave de licencia" + +#: admin/slm-add-licenses.php:306 +msgid "The unique license key." +msgstr "La clave de licencia única." + +#: admin/slm-add-licenses.php:311 +msgid "License Status" +msgstr "Estado de la licencia" + +#: admin/slm-add-licenses.php:337 +msgid "Subscription" +msgstr "Suscripción" + +#: admin/slm-add-licenses.php:340 +msgid "Life-time" +msgstr "Vida útil" + +#: admin/slm-add-licenses.php:343 woocommerce/includes/slm-meta-boxes.php:124 +msgid "type of license: subscription base or lifetime" +msgstr "tipo de licencia: base de suscripción o duración" + +#: admin/slm-add-licenses.php:353 +msgid "User Information" +msgstr "Información del usuario" + +#: admin/slm-add-licenses.php:356 +msgid "First Name" +msgstr "Primer Nombre" + +#: admin/slm-add-licenses.php:358 +msgid "License user's first name" +msgstr "Nombre del usuario de la licencia" + +#: admin/slm-add-licenses.php:362 +msgid " Last Name" +msgstr " Apellido" + +#: admin/slm-add-licenses.php:364 +msgid "License user's last name" +msgstr "Apellido del usuario de la licencia" + +#: admin/slm-add-licenses.php:371 +msgid "Subscriber ID" +msgstr "Suscriptor ID" + +#: admin/slm-add-licenses.php:373 +msgid "" +"The Subscriber ID (if any). Can be useful if you are using the license key " +"with a recurring payment plan." +msgstr "" +"El ID del suscriptor (si existe). Puede ser útil si está utilizando la clave " +"de licencia con un plan de pago recurrente." + +#: admin/slm-add-licenses.php:378 +msgid "Email Address" +msgstr "Correo electrónico" + +#: admin/slm-add-licenses.php:402 +msgid "Allowed Activations" +msgstr "Activaciones permitidas" + +#: admin/slm-add-licenses.php:405 admin/slm-lic-settings.php:146 +msgid "Maximum Allowed Domains" +msgstr "Máximo de dominios permitidos" + +#: admin/slm-add-licenses.php:407 +msgid "Number of domains/installs in which this license can be used" +msgstr "" +"Número de dominios/instalaciones en los que se puede utilizar esta licencia" + +#: admin/slm-admin-functions.php:41 +msgid "Send Deactivation Message for a License" +msgstr "Enviar mensaje de desactivación para una licencia" + +#: admin/slm-admin-functions.php:43 +msgid "Enter the URL where the license deactivation message will be sent to" +msgstr "" +"Introduzca la URL a la que se enviará el mensaje de desactivación de la " +"licencia" + +#: admin/slm-dashboard-widgets.php:29 admin/slm-dashboard-widgets.php:32 +msgid "SLM" +msgstr "Slm" + +#: admin/slm-dashboard-widgets.php:41 +msgid "Overview" +msgstr "Resumen" + +#: admin/slm-dashboard-widgets.php:51 +msgid "Add new license" +msgstr "Añadir nueva licencia" + +#: admin/slm-dashboard-widgets.php:61 includes/slm-plugin-core.php:50 +msgid "Settings" +msgstr "Parámetros" + +#: admin/slm-lic-settings.php:88 +msgid "General Settings" +msgstr "Configuración general" + +#: admin/slm-lic-settings.php:92 +msgid "Integrations" +msgstr "Integraciones" + +#: admin/slm-lic-settings.php:96 +msgid "Debugging settings" +msgstr "Parámetros" + +#: admin/slm-lic-settings.php:100 +msgid "Emails" +msgstr "Emails" + +#: admin/slm-lic-settings.php:127 +msgid "Secret Key for License Creation" +msgstr "Clave secreta para la creación de licencias" + +#: admin/slm-lic-settings.php:130 +msgid "" +"This secret key will be used to authenticate any license creation request. " +"You can change it with something random." +msgstr "" +"Esta clave secreta se utilizará para autenticar cualquier solicitud de " +"creación de licencia. Puedes cambiarlo con algo aleatorio." + +#: admin/slm-lic-settings.php:134 +msgid "Secret Key for License Verification Requests" +msgstr "Clave secreta para las solicitudes de verificación de licencias" + +#: admin/slm-lic-settings.php:136 +msgid "" +"This secret key will be used to authenticate any license verification " +"request from customer's site. Important! Do not change this value once your " +"customers start to use your product(s)!" +msgstr "" +"Esta clave secreta se usará para autenticar cualquier solicitud de " +"verificación de licencia desde el sitio del cliente. ¡Importante! ¡No cambie " +"este valor una vez que sus clientes comiencen a usar su(s) producto(s)!" + +#: admin/slm-lic-settings.php:140 +msgid "License Key Prefix" +msgstr "Prefijo de clave de licencia" + +#: admin/slm-lic-settings.php:142 +msgid "" +"You can optionaly specify a prefix for the license keys. This prefix will be " +"added to the uniquely generated license keys." +msgstr "" +"Opcionalmente, puede especificar un prefijo para las claves de licencia. " +"Este prefijo se agregará a las claves de licencia generadas de forma única." + +#: admin/slm-lic-settings.php:148 +msgid "" +"Maximum number of domains/installs which each license is valid for (default " +"value)." +msgstr "" +"Número máximo de dominios/instalaciones para los que cada licencia es válida " +"(valor predeterminado)." + +#: admin/slm-lic-settings.php:152 +msgid "Maximum Allowed Devices" +msgstr "Máximo de dispositivos permitidos" + +#: admin/slm-lic-settings.php:154 +msgid "" +"Maximum number of devices which each license is valid for (default value)." +msgstr "" +"Número máximo de dispositivos para los que cada licencia es válida (valor " +"predeterminado)." + +#: admin/slm-lic-settings.php:158 +msgid "Auto Expire License Keys" +msgstr "Claves de licencia de expiración automática" + +#: admin/slm-lic-settings.php:160 +msgid "Enable auto expiration " +msgstr "Habilitar la expiración automática" + +#: admin/slm-lic-settings.php:161 +#, fuzzy +msgid "" +" When enabled, it will automatically set the status of a license key to " +"\"Expired\" when the expiry date value of the key is reached. It doesn't " +"remotely deactivate a key. It simply changes the status of the key in your " +"database to expired." +msgstr "" +"Cuando está habilitado, establecerá automáticamente el estado de una clave " +"de licencia en \"Expirado\" cuando se alcance el valor de fecha de caducidad " +"de la clave. No desactiva de forma remota una clave. Simplemente cambia el " +"estado de la clave en la base de datos a caducado." + +#: admin/slm-lic-settings.php:165 +msgid "General settings" +msgstr "Los ajustes generales" + +#: admin/slm-lic-settings.php:168 admin/slm-lic-settings.php:175 +msgid "Disable stats in licenses overview page." +msgstr "" +"Deshabilite las estadísticas en la página de información general de " +"licencias." + +#: admin/slm-lic-settings.php:186 +msgid "Woocommerce Support" +msgstr "Soporte técnico de Woocommerce" + +#: admin/slm-lic-settings.php:189 +msgid "" +"A fully customizable, open source eCommerce platform built for WordPress." +msgstr "" +"Una plataforma de comercio electrónico totalmente personalizable y de código " +"abierto creada para WordPress." + +#: admin/slm-lic-settings.php:195 +msgid "" +"Disable woocommerce download page. Proccess downloads though license order " +"info page." +msgstr "" +"Deshabilite la página de descarga de woocommerce. Proccess descarga a través " +"de la página de información del pedido de licencia." + +#: admin/slm-lic-settings.php:198 +msgid "Download Manager Support" +msgstr "Descargar soporte de Manager" + +#: admin/slm-lic-settings.php:201 +msgid "" +"Download Manager Plugin – Adds a simple download manager to your WordPress " +"blog." +msgstr "" +"Descargar Manager Plugin – Agrega un simple gestor de descargas a tu blog de " +"WordPress." + +#: admin/slm-lic-settings.php:205 +msgid "WP eStores Support" +msgstr "Soporte de WP eStores" + +#: admin/slm-lic-settings.php:208 +msgid "" +"WordPress eStore Plugin – Complete Solution to Sell Digital Products from " +"Your WordPress Blog Securely" +msgstr "" +"WordPress eStore Plugin – Solución completa para vender productos digitales " +"de su blog de WordPress de forma segura" + +#: admin/slm-lic-settings.php:220 +msgid "Enable Debug Logging" +msgstr "Habilitar el registro de depuración" + +#: admin/slm-lic-settings.php:223 +msgid "" +"If checked, debug output will be written to log files (keep it disabled " +"unless you are troubleshooting)." +msgstr "" +"Si está marcada, la salida de depuración se escribirá en los archivos de " +"registro (manténgala deshabilitada a menos que esté solucionando problemas)." + +#: admin/slm-lic-settings.php:234 +msgid "Expiration reminder" +msgstr "Recordatorio de expiración" + +#: admin/slm-lic-settings.php:244 +msgid "Update Options" +msgstr "Opciones de actualización" + +#: admin/slm-list-licenses-class.php:27 +msgid "No licenses avaliable." +msgstr "No hay licencias disponibles." + +#: admin/slm-list-licenses-class.php:43 +msgid "All" +msgstr "Todos" + +#: admin/slm-list-licenses-class.php:50 +msgid "active" +msgstr "activo" + +#: admin/slm-list-licenses-class.php:57 +msgid "pending" +msgstr "pendiente" + +#: admin/slm-list-licenses-class.php:64 +msgid "expired" +msgstr "caducado" + +#: admin/slm-list-licenses-class.php:71 +msgid "blocked" +msgstr "bloqueado" + +#: admin/slm-list-licenses-class.php:210 admin/slm-list-licenses-class.php:227 +#: admin/slm-list-licenses-class.php:244 admin/slm-list-licenses-class.php:261 +msgid "Error - Please select some records using the checkboxes" +msgstr "" +"Error - Seleccione algunos registros usando las casillas de verificación" + +#: admin/slm-manage-licenses.php:15 +msgid "You do not have permission to manage this license." +msgstr "No tiene permiso para administrar esta licencia." + +#: admin/slm-manage-licenses.php:36 +msgid "Overview - Manage licenses" +msgstr "Descripción general - Administrar licencias" + +#: admin/slm-manage-licenses.php:38 +msgid "Add New" +msgstr "Añadir nueva" + +#: admin/slm-manage-licenses.php:65 admin/slm-subscribers.php:219 +msgid "Search" +msgstr "Buscar" + +#: admin/slm-subscribers.php:178 +msgid "Overview - Manage Subscribers" +msgstr "Visión general - Administrar suscriptores" + +#: admin/slm-subscribers.php:180 +msgid "View all" +msgstr "Ver todos los" + +#: admin/slm-subscribers.php:189 +msgid "ID" +msgstr "Id" + +#: admin/slm-subscribers.php:190 woocommerce/includes/purchase.php:415 +msgid "License key" +msgstr "Clave de licencia" + +#: admin/slm-subscribers.php:191 +msgid "Status" +msgstr "Estado" + +#: admin/slm-subscribers.php:208 +msgid "Overview - All Subscribers" +msgstr "Visión general - Todos los suscriptores" + +#: admin/slm_about_menu.php:21 +msgid "Credits and authors" +msgstr "Créditos y autores" + +#: includes/slm-plugin-core.php:51 +msgid "GitHub" +msgstr "GitHub" + +#: public/slm-add-menu-frontend.php:56 public/slm-add-menu-frontend.php:69 +msgid "My Licenses" +msgstr "Mis licencias" + +#: woocommerce/includes/purchase.php:95 +msgid "License could not be created: Invalid sites allowed number." +msgstr "No se pudo crear la licencia: número permitido de sitios no válidos." + +#: woocommerce/includes/purchase.php:220 +msgid "License Key(s) generated" +msgstr "Clave(s) de licencia generada(s)" + +#: woocommerce/includes/purchase.php:237 +msgid "License Key(s) could not be created." +msgstr "No se han podido crear claves de licencia." + +#: woocommerce/includes/purchase.php:357 +msgid "Order confirmation email sent to: * @link https://github.com/michelve/software-license-manager */ - -class SLM_Woo_Account -{ +class SLM_Woo_Account{ public static $endpoint = 'my-licenses'; - public function __construct() - { + public function __construct(){ // Actions used to insert a new endpoint in the WordPress. add_action('init', array($this, 'add_endpoints')); add_filter('query_vars', array($this, 'add_query_vars'), 0); - // Change the My Accout page title. add_filter('the_title', array($this, 'endpoint_title')); - // Insering your new tab/page into the My Account page. add_filter('woocommerce_account_menu_items', array($this, 'slm_woo_menu_list')); add_action('woocommerce_account_' . self::$endpoint . '_endpoint', array($this, 'endpoint_content')); } - public function getActiveUser($action) - { + public function getActiveUser($action){ $info = ''; $current_user = wp_get_current_user(); if ($action == 'email') { @@ -36,13 +29,11 @@ public function getActiveUser($action) return $info; } - public function add_endpoints() - { + public function add_endpoints(){ add_rewrite_endpoint(self::$endpoint, EP_ROOT | EP_PAGES); } - public function add_query_vars($vars) - { + public function add_query_vars($vars){ $vars[] = self::$endpoint; return $vars; } @@ -59,27 +50,22 @@ public function endpoint_title($title) return $title; } - public function slm_woo_menu_list($items) - { + public function slm_woo_menu_list($items){ // Remove the logout menu item. $logout = $items['customer-logout']; unset($items['customer-logout']); - // Insert your custom endpoint. $items[self::$endpoint] = __('My Licenses', 'softwarelicensemanager'); - // Insert back the logout item. $items['customer-logout'] = $logout; return $items; } - public function endpoint_content() - { + public function endpoint_content(){ global $wpdb; $class_ = 0; $class_id_ = 0; $get_user_info = $get_user_email = ''; - // get user billing email $wc_billing_email = get_user_meta(get_current_user_id(), 'billing_email', true); @@ -87,9 +73,7 @@ public function endpoint_content() if ($wc_billing_email == '') { $wc_billing_email = get_userdata(get_current_user_id())->user_email; } - $result = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "lic_key_tbl WHERE email='" . $wc_billing_email . "' ORDER BY `email` DESC LIMIT 0,1000"); - ?>
@@ -106,7 +90,6 @@ public function endpoint_content() @@ -126,7 +109,6 @@ public function endpoint_content()
get_results("SELECT * FROM " . $wpdb->prefix . "lic_key_tbl WHERE `license_key` = '" . $license_info->license_key . "' ORDER BY `id` LIMIT 0,1000;", ARRAY_A); $detailed_domain_info = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "lic_reg_domain_tbl WHERE `lic_key` = '" . $license_info->license_key . "' ORDER BY `lic_key_id` LIMIT 0,1000;", ARRAY_A); @@ -140,7 +122,6 @@ public function endpoint_content()
@@ -170,7 +149,6 @@ public function endpoint_content()
-
@@ -180,7 +158,6 @@ public function endpoint_content() $slm_woo_order_id = $license_info->purchase_id_; $slm_woo_product_id = $license_info->product_ref; $woo_download_db = 'woocommerce_downloadable_product_permissions'; - $get_woo_downloads = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . $woo_download_db . " WHERE `product_id` = '" . $slm_woo_product_id . "' ORDER BY `product_id` LIMIT 0,1000;", ARRAY_A); if ($license_info->lic_status == 'active' || $license_info->lic_status == 'pending') { @@ -213,21 +190,17 @@ public function endpoint_content()
' . "\r\n"; - //wp_mail( $billing_address, 'License details', $message, $headers ); // The text for the note $note = __("Order confirmation email sent to: " . $billing_address . "" );