PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
plugins
/
vxcash
/
admin
<?php /** * Class Vxcash_Debug_Admin */ class Vxcash_Debug_Admin { /** * @var string */ private $plugin_name; /** * @var string */ private $version; /** * @var Vxcash_Loader */ private $loader; /** * @var string */ private $parent_plugin_name; /** * @var Vxcash_Config */ private $config; /** * @var array */ private $settings = array(); /** * Vxcash_Visitx_Host_Admin constructor. * * @param $parentPluginName * @param $version * @param Vxcash_Loader $loader * @param Vxcash_Config $config * */ public function __construct( $parentPluginName, $version, Vxcash_Loader $loader, Vxcash_Config $config ) { $this->parent_plugin_name = $parentPluginName; $this->plugin_name = $parentPluginName . 'debug'; $this->version = $version; $this->loader = $loader; $this->config = $config; $this->defineAdminHooks(); } private function defineAdminHooks() { $this->loader->add_action('admin_menu', $this, 'add_sub_menu_page'); $this->loader->add_action('wp_ajax_send_page_info', $this, 'ajax_send_page_info'); } /** * */ public function add_sub_menu_page() { add_submenu_page($this->parent_plugin_name, 'Debug Info', 'Debug Info', 'manage_options', $this->plugin_name, array($this, 'display_vxhost_debug_page')); } public function ajax_send_page_info() { if (!current_user_can('manage_options')) { die(); } $this->buildSettings(); $subject = sprintf('VXCash Wordpress Plugin Settings von Webmaster %s', $this->config->getWmid()); $body = ''; /** * @var string $heading * @var array $settings */ foreach ($this->settings as $heading => $settings) { $body .= "\n" . ucfirst($heading) . "\n\n"; foreach ($settings as $name => $data) { $body .= $name . ': ' . $data['value']; if (isset($data['errors']) && $data['errors'] !== '') { $body .= ' FEHLER: ' . $data['errors']; } $body .= "\n"; } } mail('support@vxcash.net', $subject, $body); echo 'ok'; wp_die(); } /** * */ public function display_vxhost_debug_page() { wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_style('jquery-ui-demo', plugin_dir_url(__FILE__) . 'css/jquery-ui-demo.css'); wp_enqueue_script('vxcash-debug', plugin_dir_url(__FILE__) . 'js/vxcash-debug.js', array('jquery', 'vxcash-admin'), $this->version, false); if ('classic' === get_user_option('admin_color')) { wp_enqueue_style('jquery-ui-css', plugin_dir_url(__FILE__) . 'css/jquery-ui-classic.css'); } else { wp_enqueue_style('jquery-ui-css', plugin_dir_url(__FILE__) . 'css/jquery-ui-fresh.css'); } $this->buildSettings(); include_once __DIR__ . '/partials/vxcash-debug-display.php'; } /** * Build the settings array */ private function buildSettings() { global $wpdb; $wpTheme = wp_get_theme(); $iniSettings = ini_get_all(null, false); $extensions = get_loaded_extensions(); $uploadDirs = wp_get_upload_dir(); $plugins = get_plugins(); array_walk( $plugins, function (&$item, $key) { $item['value'] = sprintf('%s (%s)', $item['Name'], $item['Version']); $item['valid'] = true; $item['active'] = is_plugin_active($key) ? 'Aktiv' : 'Deaktiviert'; } ); $this->settings = array( 'vxcash' => array( 'WMID' => array('value' => $this->config->getWmid(), 'valid' => true), 'Visit-X Key' => array('value' => $this->config->getVisitxApiKey(), 'valid' => true), 'Visit-X Kampagne' => array('value' => $this->config->getVxCampaignId(), 'valid' => true), 'Visit-X Whitelabel Lösung' => array('value' => $this->config->getVxDirectLink(), 'valid' => true), 'BeiAnrufSex Key' => array('value' => $this->config->getBasApiKey(), 'valid' => true), 'BeiAnrufSex Kampagne' => array('value' => $this->config->getBasCampaignId(), 'valid' => true), 'VXCash Reseller Kampagne' => array('value' => $this->config->getResellerCampaignId(), 'valid' => true), 'Autoimport Visit-X Max' => array('value' => $this->config->getVxMaxNum(), 'valid' => true), ), 'wordpress' => array( 'Home URL' => array('value' => get_home_url(), 'valid' => true), 'Site URL' => array('value' => get_site_url(), 'valid' => true), 'Document Root' => array('value' => $_SERVER['DOCUMENT_ROOT'], 'valid' => true), 'Theme' => array( 'value' => sprintf('%s (%s)', $wpTheme->get('Name'), $wpTheme->get('Version')), 'valid' => true, ), 'Stylesheet Ordner' => array('value' => $wpTheme->get_stylesheet_directory(), 'valid' => true), 'Upload Ordner' => array('value' => $uploadDirs['basedir'], 'valid' => !$uploadDirs['error']), ), 'server' => array( 'Server' => array('value' => $_SERVER['SERVER_SOFTWARE'], 'valid' => true), 'PHP Version' => array( 'value' => PHP_VERSION, 'valid' => version_compare( PHP_VERSION, '5.6.0' ) >= 0, 'error' => version_compare( PHP_VERSION, '5.6.0' ) < 0 ? 'Das VXCash Theme und Plugin erwartet mindestens PHP Version 5.6.0. Wir raten Ihnen dringend zu einem Update.' : '', ), 'PHP Memory Limit' => array('value' => $iniSettings['memory_limit'], 'valid' => true), 'PHP Time Limit' => array( 'value' => $iniSettings['max_execution_time'], 'valid' => $iniSettings['max_execution_time'] >= 30, ), 'PHP Max Input Vars' => array('value' => $iniSettings['max_input_vars'], 'valid' => true), 'MySQL Version' => array( 'value' => $wpdb->db_version(), 'valid' => version_compare( $wpdb->db_version(), '5.6.0' ) >= 0, 'error' => version_compare( $wpdb->db_version(), '5.6.0' ) < 0 ? 'Das VXCash Theme und Plugin erwartet mindestens eine MySQL Version 5.6. Wir raten Ihnen dringend zu einem Update.' : '', ), 'Max Upload Size' => array('value' => $iniSettings['upload_max_filesize'], 'valid' => true), 'CURL Extension' => array( 'value' => in_array( 'curl', $extensions, true ) ? 'Vorhanden' : 'Nicht vorhanden', 'valid' => in_array( 'curl', $extensions, true ), 'error' => in_array( 'curl', $extensions, true ) ? '' : 'Das VXCash Plugin benötigt unbedingt die CURL extension um Bilder von Visit-X zu beziehen.', ), ), 'plugins' => $plugins, ); } }
[-] index.php
[edit]
[+]
js
[-] class-vxcash-debug-admin.php
[edit]
[-] class-vxcash-visitx-video-admin.php
[edit]
[-] class-vxcash-auto-import-dataprovider.php
[edit]
[-] class-vxcash-config.php
[edit]
[+]
partials
[-] class-vxcash-admin.php
[edit]
[-] class-vxcash-host-category-handler.php
[edit]
[-] class-vxcash-notifier.php
[edit]
[+]
..
[+]
css
[-] class-vxcash-visitx-host-admin.php
[edit]
[-] class-vxcash-visitx-graphql-client.php
[edit]
[-] class-vxcash-pornme-video-admin.php
[edit]
[-] class-vxcash-vx-dataprovider.php
[edit]