Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.0
- * @ Author : DeZender
- * @ Release on : 15.05.2020
- * @ Official site : http://DeZender.Net
- *
- */
- function ums_urls_form()
- {
- global $wp;
- $status_check = get_option('status_check');
- $option_arr = get_option('my_options');
- $login_path = $option_arr['login_path'];
- $register_path = $option_arr['register_path'];
- $current_url = home_url($wp->request);
- $frm = substr($current_url, strrpos($current_url, '/user') + 1);
- $frm_login = substr($current_url, strrpos($current_url, '/' . $login_path) + 1);
- $frm_register = substr($current_url, strrpos($current_url, '/' . $register_path) + 1);
- $frm_lost = substr($current_url, strrpos($current_url, '/user/lostpassword') + 1);
- $frm_reset = substr($current_url, strrpos($current_url, '/user/resetpassword') + 1);
- if ($frm == 'user/check_login') {
- UMS_page_check_login();
- }
- else if ($frm == 'user/check_number') {
- UMS_checknumber_form();
- }
- else if ($frm == 'user/forget') {
- if (!$status_check['disable_loastpassword_form']) {
- UMS_checkforget_form();
- }
- }
- else if ($frm_reset == 'user/resetpassword') {
- if (!$status_check['disable_loastpassword_form']) {
- UMS_add_password_reset();
- }
- }
- else if ($frm == 'user/logout') {
- UMS_logout_form();
- }
- else if ($frm_login == $login_path) {
- UMS_login_form();
- }
- else if ($frm_register == $register_path) {
- if (get_option('users_can_register', true) == 1) {
- UMS_register_form();
- }
- else {
- wp_redirect(home_url('/'));
- }
- }
- else if ($frm_lost == 'user/lostpassword') {
- if (!$status_check['disable_loastpassword_form']) {
- UMS_lostpassword_form();
- }
- }
- if (@$status_check['restriction_view_full_site']) {
- add_action('wp', 'ums_only_show_all_site_user_login');
- }
- }
- function ums_register_url_check()
- {
- ums_urls_form();
- }
- function ums_wc_template($template, $template_name, $template_path)
- {
- $template_directory = trailingslashit(UMS_TP_FRONT) . 'panel/woocommerce/';
- $path = $template_directory . $template_name;
- return file_exists($path) ? $path : $template;
- }
- function UMS_check_Licensing_guard()
- {
- require_once 'ums-cpt.php';
- if (UMS_Guard_SDK::is_activated() !== true) {
- if (is_admin()) {
- $black_list = ['lavin_user_plugin_manager', 'UMS_send_sms_user', 'UMS_wallet_user', 'UMS_show_product', 'UMS_page_user_panel', 'UMS_show_notification', 'UMS_reports_user', 'UMS_options'];
- if (isset($_GET['page']) && in_array($_GET['page'], $black_list)) {
- if (isset($_GET['page']) && ($_GET['page'] == 'ums_guard_register')) {
- return NULL;
- }
- wp_die('لطفا کلید لایسنس <strong>افزونه سیستم مدیریت کاربران</strong> را وارد نمایید.');
- }
- }
- }
- if (!class_exists('UMS_Guard_SDK')) {
- if (is_admin()) {
- $black_list = ['lavin_user_plugin_manager', 'UMS_send_sms_user', 'UMS_wallet_user', 'UMS_show_product', 'UMS_page_user_panel', 'UMS_show_notification', 'UMS_reports_user', 'UMS_options'];
- if (isset($_GET['page']) && in_array($_GET['page'], $black_list)) {
- if (isset($_GET['page']) && ($_GET['page'] == 'ums_guard_register')) {
- return NULL;
- }
- wp_die('لطفا کلید لایسنس <strong>افزونه سیستم مدیریت کاربران</strong> را وارد نمایید.');
- }
- }
- }
- }
- function ums_change_footer_admin()
- {
- if (isset($_GET['page']) && ($_GET['page'] == 'ums_options')) {
- echo '<span style="font-weight: 300;font-style: normal" id="footer-thankyou">اگر شما <b>افزونه سیستم مدیریت کاربران</b> را دوست دارید لطفا ما را با <b>5 ستاره</b> خوشحال کنید<span>';
- }
- else {
- echo '<span id="footer-thankyou">سپاسگزاریم از اینکه سایت خود را با <a href="https://wordpress.org/">وردپرس</a> ساخته‌اید.</span>';
- }
- }
- function UMS_add_Plugin_Style()
- {
- if (ums_check_active_woocommerce()) {
- if (is_account_page()) {
- include_once ABSPATH . 'wp-admin/includes/plugin.php';
- if (is_plugin_active('dashboard-style-ums/dashboard-style.php')) {
- $template = get_option('UMS_options_theme_panel');
- switch ($template) {
- case 'dashboard-1':
- wp_enqueue_style('dashboard', get_stylesheet_uri());
- wp_enqueue_style('dashboard-ums', DSU_Assets . 'css/theme-1/black-dashboard.min.css', [], '1.1', 'all');
- break;
- case 'dashboard-2':
- wp_enqueue_style('dashboard', get_stylesheet_uri());
- wp_enqueue_style('dashboard-ums', UMS_ASSETES . '/css/dashboard.css', [], '1.1', 'all');
- break;
- case 'dashboard-3':
- wp_enqueue_style('dashboard', get_stylesheet_uri());
- wp_enqueue_style('dashboard-ums', DSU_Assets . 'css/theme-2/black-dashboard.css', [], '1.1', 'all');
- break;
- case 'dashboard-4':
- wp_enqueue_style('dashboard', get_stylesheet_uri());
- wp_enqueue_style('dashboard-ums', DSU_Assets . 'css/theme-3/argon-dashboard.css', [], '1.1', 'all');
- break;
- case 'dashboard-5':
- wp_enqueue_style('dashboard', get_stylesheet_uri());
- wp_enqueue_style('dashboard-ums', DSU_Assets . 'css/theme-4/dashboard-theme-five.css', [], '1.1', 'all');
- break;
- case 'dashboard-6':
- wp_enqueue_style('dashboard', get_stylesheet_uri());
- wp_enqueue_style('dashboard-ums', DSU_Assets . 'css/theme-5/dashboard-six.css', [], '1.1', 'all');
- break;
- default:
- wp_enqueue_style('dashboard', get_stylesheet_uri());
- wp_enqueue_style('dashboard-ums', UMS_ASSETES . '/css/dashboard.css', [], '1.1', 'all');
- }
- }
- else {
- wp_enqueue_style('dashboard', get_stylesheet_uri());
- wp_enqueue_style('dashboard-ums', UMS_ASSETES . '/css/dashboard.css', [], '1.1', 'all');
- }
- }
- }
- }
- function UMS_default_field_register_form()
- {
- $field_data = [
- 'ums_reg_user_name' => ['type' => 'text', 'meta_key' => 'user_name', 'label' => 'نام کاربری', 'dec' => 'نام کاربری خود را وارد کنید', 'required' => 'yes', 'active' => 'yes', 'profile' => 'no', 'register' => 'yes'],
- 'ums_reg_full_name' => ['type' => 'text', 'meta_key' => 'user_full_name', 'label' => 'نام و نام خانوادگی', 'dec' => 'نام و نام خانوادگی خود را وارد کنید', 'required' => 'yes', 'active' => 'yes', 'profile' => 'yes', 'register' => 'yes'],
- 'ums_reg_email' => ['type' => 'email', 'meta_key' => 'user_email', 'label' => 'ایمیل', 'dec' => 'ایمیل خود را وارد کنید', 'required' => 'no', 'active' => 'no', 'profile' => 'yes', 'register' => 'yes'],
- 'ums_reg_mobile_number' => ['type' => 'text', 'meta_key' => 'mobile_user', 'label' => 'موبایل', 'dec' => 'موبایل خود را وارد کنید', 'required' => 'yes', 'active' => 'yes', 'profile' => 'yes', 'register' => 'yes'],
- 'ums_reg_password' => ['type' => 'password', 'meta_key' => 'user_password', 'label' => 'پسورد', 'dec' => 'پسورد خود را وارد کنید', 'required' => 'yes', 'active' => 'yes', 'profile' => 'yes', 'register' => 'yes']
- ];
- update_option('ums_register_form_field', $field_data);
- update_option('ums_register_form_field_run', '1');
- }
- function ums_synchronization_plugin_digits($user_id)
- {
- include_once ABSPATH . 'wp-admin/includes/plugin.php';
- if (is_plugin_active('digits/digit.php')) {
- $mobile_user = get_user_meta($user_id, 'mobile_user', true);
- $digits_phone = get_user_meta($user_id, 'digits_phone_no', true);
- if (!$mobile_user) {
- update_user_meta($user_id, 'mobile_user', '0' . $digits_phone, true);
- update_user_meta($user_id, 'activation_key_user', '1');
- }
- }
- }
- function ums_save_mobile_plugin_digits($user_id)
- {
- include_once ABSPATH . 'wp-admin/includes/plugin.php';
- if (is_plugin_active('digits/digit.php')) {
- $mobile_user = get_user_meta($user_id, 'mobile_user', true);
- if (isset($_COOKIE['digits_countrycode'])) {
- $digt_countrycode = '+' . $_COOKIE['digits_countrycode'];
- }
- if ($mobile_user) {
- $phone = substr($mobile_user, 1);
- update_user_meta($user_id, 'digits_countrycode', $digt_countrycode);
- update_user_meta($user_id, 'digits_phone_no', $phone);
- ......................................................................
- ..........................................
- ..................
Add Comment
Please, Sign In to add comment