PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/polo-family.com/wp-content/plugins/wwcAliAff/modules/server_status/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : //home/trave494/polo-family.com/wp-content/plugins/wwcAliAff/modules/server_status/init.php |
<?php /* * Define class wwcAliAffServerStatus * Make sure you skip down to the end of this file, as there are a few * lines of code that are very important. */ !defined('ABSPATH') and exit; if (class_exists('wwcAliAffServerStatus') != true) { class wwcAliAffServerStatus { /* * Some required plugin information */ const VERSION = '1.0'; /* * Store some helpers config */ public $the_plugin = null; private $module_folder = ''; private $module = ''; static protected $_instance; /* * Required __construct() function that initalizes the AA-Team Framework */ public function __construct() { global $wwcAliAff; $this->the_plugin = $wwcAliAff; $this->module_folder = $this->the_plugin->cfg['paths']['plugin_dir_url'] . 'modules/server_status/'; $this->module = $this->the_plugin->cfg['modules']['server_status']; if (is_admin()) { add_action('admin_menu', array( &$this, 'adminMenu' )); } // load the ajax helper require_once( $this->the_plugin->cfg['paths']['plugin_dir_path'] . 'modules/server_status/ajax.php' ); new wwcAliAffServerStatusAjax( $this->the_plugin ); } /** * Singleton pattern * * @return wwcAliAffServerStatus Singleton instance */ static public function getInstance() { if (!self::$_instance) { self::$_instance = new self; } return self::$_instance; } /** * Hooks */ static public function adminMenu() { self::getInstance() ->_registerAdminPages(); } /** * Register plug-in module admin pages and menus */ protected function _registerAdminPages() { add_submenu_page( $this->the_plugin->alias, $this->the_plugin->alias . " " . __('Check System status', $this->the_plugin->localizationName), __('System Status', $this->the_plugin->localizationName), 'manage_options', $this->the_plugin->alias . "_server_status", array($this, 'display_index_page') ); return $this; } public function display_index_page() { $this->printBaseInterface(); } /* * printBaseInterface, method * -------------------------- * * this will add the base DOM code for you options interface */ private function printBaseInterface() { global $wpdb; $wwcaliaff_settings = @unserialize( get_option( 'wwcAliAff_settings' ) ); $plugin_data = get_plugin_data( $this->the_plugin->cfg['paths']['plugin_dir_path'] . 'plugin.php' ); ?> <link rel='stylesheet' href='<?php echo $this->module_folder;?>app.css' type='text/css' media='all' /> <script type="text/javascript" src="<?php echo $this->module_folder;?>app.class.js" ></script> <div id="wwcAliAff-wrapper" class="fluid wrapper-wwcAliAff"> <?php // show the top menu wwcAliAffAdminMenu::getInstance()->make_active('info|server_status')->show_menu(); ?> <!-- Main loading box --> <div id="wwcAliAff-main-loading"> <div id="wwcAliAff-loading-overlay"></div> <div id="wwcAliAff-loading-box"> <div class="wwcAliAff-loading-text"><?php _e('Loading', $this->the_plugin->localizationName);?></div> <div class="wwcAliAff-meter wwcAliAff-animate" style="width:86%; margin: 34px 0px 0px 7%;"><span style="width:100%"></span></div> </div> </div> <!-- Content --> <div id="wwcAliAff-content"> <h1 class="wwcAliAff-section-headline"> <?php if( isset($this->module['server_status']['in_dashboard']['icon']) ){ echo '<img src="' . ( $this->module_folder . $this->module['server_status']['in_dashboard']['icon'] ) . '" class="wwcAliAff-headline-icon">'; } ?> <?php echo $this->module['server_status']['menu']['title'];?> <span class="wwcAliAff-section-info"><?php echo $this->module['server_status']['description'];?></span> <?php $has_help = isset($this->module['server_status']['help']) ? true : false; if( $has_help === true ){ $help_type = isset($this->module['server_status']['help']['type']) && $this->module['server_status']['help']['type'] ? 'remote' : 'local'; if( $help_type == 'remote' ){ echo '<a href="#load_docs" class="wwcAliAff-show-docs" data-helptype="' . ( $help_type ) . '" data-url="' . ( $this->module['server_status']['help']['url'] ) . '">HELP</a>'; } } echo '<a href="#load_docs" class="wwcAliAff-show-feedback" data-helptype="' . ( 'remote' ) . '" data-url="' . ( $this->the_plugin->feedback_url ) . '" data-operation="feedback">Feedback</a>'; ?> </h1> <!-- Container --> <div class="wwcAliAff-container clearfix"> <!-- Main Content Wrapper --> <div id="wwcAliAff-content-wrap" class="clearfix" style="padding-top: 5px;"> <!-- Content Area --> <div id="wwcAliAff-content-area"> <div class="wwcAliAff-grid_4"> <div class="wwcAliAff-panel"> <div class="wwcAliAff-panel-content"> <table class="wwcAliAff-table" cellspacing="0"> <thead> <tr> <th colspan="2"><?php _e( 'Alibaba Settings', $this->the_plugin->localizationName ); ?></th> </tr> </thead> <tbody> <tr> <td width="190"><?php _e( 'App Key',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo $wwcaliaff_settings['AppKey'];?></td> </tr> <tr> <td width="190"><?php _e( 'Tracking ID',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo $wwcaliaff_settings['TrackingID'];?></td> </tr> <tr> <td width="190"><?php _e( 'Digital Signature',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo $wwcaliaff_settings['DigitalSignature'];?></td> </tr> </tbody> <thead> <tr> <th colspan="2"><?php _e( 'wwcAliAff import settings', $this->the_plugin->localizationName ); ?></th> </tr> </thead> <tbody> <?php /*<tr> <td width="190"><?php _e( 'Request Type',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo $wwcaliaff_settings['protocol'];?></td> </tr> <tr> <td width="190"><?php _e( 'Alibaba API location',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo $wwcaliaff_settings['country'];?></td> </tr>*/ ?> <tr> <td width="190"><?php _e( 'Download Item Attribute',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo $wwcaliaff_settings['item_attribute'];?></td> </tr> <?php /*<tr> <td width="190"><?php _e( 'Variation',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo $wwcaliaff_settings['product_variation'];?></td> </tr>*/ ?> <tr> <td width="190"><?php _e( 'Number of images',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo $wwcaliaff_settings['number_of_images'];?></td> </tr> </tbody> <thead> <tr> <th colspan="2"><?php _e( 'Syncronize Capabilities Testing:', $this->the_plugin->localizationName ); ?></th> </tr> </thead> <tbody> <tr> <td style="vertical-align: middle;">Import test:</td> <td> <div class="wwcAliAff-import-products-test"> <div class="wwcAliAff-test-timeline"> <div class="wwcAliAff-one_step" id="stepid-step1"> <div class="wwcAliAff-step-status wwcAliAff-loading-inprogress"></div> <span class="wwcAliAff-step-name">Step 1</span> </div> <div class="wwcAliAff-one_step" id="stepid-step2"> <div class="wwcAliAff-step-status"></div> <span class="wwcAliAff-step-name">Step 2</span> </div> <div class="wwcAliAff-one_step" id="stepid-step3"> <div class="wwcAliAff-step-status"></div> <span class="wwcAliAff-step-name">Step 3</span> </div> <div style="clear:both;"></div> </div> <table class="wwcAliAff-table wwcAliAff-logs" cellspacing="0"> <tr id="logbox-step1"> <td width="50">Step 1:</td> <td> <div class="wwcAliAff-log-title"> Get product from Alibaba.<?php echo $wwcaliaff_settings['country'];?> <a href="#" class="wwcAliAff-button gray">View details +</a> </div> <textarea class="wwcAliAff-log-details"></textarea> </td> </tr> <tr id="logbox-step2"> <td width="50">Step 2:</td> <td> <div class="wwcAliAff-log-title"> Import the product into woocomerce <a href="#" class="wwcAliAff-button gray">View details +</a> </div> <textarea class="wwcAliAff-log-details"></textarea> </td> </tr> <tr id="logbox-step3"> <td width="50">Step 3:</td> <td> <div class="wwcAliAff-log-title"> Download images (<?php echo $wwcaliaff_settings['number_of_images'];?>) for products <a href="#" class="wwcAliAff-button gray">View details +</a> </div> <textarea class="wwcAliAff-log-details"></textarea> </td> </tr> </table> <div class="wwcAliAff-begin-test-container"> <a href="#begin-test" class="wwcAliAff-button blue wwcAliAffStressTest">Begin the test</a> <input id="wwcAliAff-test-Alibaba_SKU" value="32601102376" type="text" /> <label>Test with productId code</label> </div> </div> </td> </tr> </tbody> <thead> <tr> <th colspan="2"><?php _e( 'Environment', $this->the_plugin->localizationName ); ?></th> </tr> </thead> <tbody> <tr> <td width="190"><?php _e( 'Home URL',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo home_url(); ?></td> </tr> <tr> <td><?php _e( 'wwcAliAff Version',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo $plugin_data['Version'];?></td> </tr> <tr> <td><?php _e( 'WP Version',$this->the_plugin->localizationName ); ?>:</td> <td><?php if ( is_multisite() ) echo 'WPMU'; else echo 'WP'; ?> <?php bloginfo('version'); ?></td> </tr> <tr> <td><?php _e( 'Web Server Info',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td> </tr> <tr> <td><?php _e( 'PHP Version',$this->the_plugin->localizationName ); ?>:</td> <td><?php if ( function_exists( 'phpversion' ) ) echo esc_html( phpversion() ); ?></td> </tr> <tr> <td><?php _e( 'MySQL Version',$this->the_plugin->localizationName ); ?>:</td> <td><?php if ( function_exists( 'mysql_get_server_info' ) ) echo esc_html( mysql_get_server_info() ); ?></td> </tr> <tr> <td><?php _e( 'WP Memory Limit',$this->the_plugin->localizationName ); ?>:</td> <td><div class="wwcAliAff-loading-ajax-details" data-action="check_memory_limit"></div></td> </tr> <tr> <td><?php _e( 'WP Debug Mode',$this->the_plugin->localizationName ); ?>:</td> <td><?php if ( defined('WP_DEBUG') && WP_DEBUG ) echo __( 'Yes', $this->the_plugin->localizationName ); else echo __( 'No', $this->the_plugin->localizationName ); ?></td> </tr> <tr> <td><?php _e( 'WP Max Upload Size',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo size_format( wp_max_upload_size() ); ?></td> </tr> <tr> <td><?php _e('PHP Post Max Size',$this->the_plugin->localizationName ); ?>:</td> <td><?php if ( function_exists( 'ini_get' ) ) echo size_format( woocommerce_let_to_num( ini_get('post_max_size') ) ); ?></td> </tr> <tr> <td><?php _e('PHP Time Limit',$this->the_plugin->localizationName ); ?>:</td> <td><?php if ( function_exists( 'ini_get' ) ) echo ini_get('max_execution_time'); ?></td> </tr> <tr> <td><?php _e('WP Remote GET',$this->the_plugin->localizationName ); ?>:</td> <td><div class="wwcAliAff-loading-ajax-details" data-action="remote_get"></div></td> </tr> <tr> <td><?php _e('SOAP Client',$this->the_plugin->localizationName ); ?>:</td> <td><div class="wwcAliAff-loading-ajax-details" data-action="check_soap"></div></td> </tr> <tr> <td><?php _e('SimpleXML library',$this->the_plugin->localizationName ); ?>:</td> <td><div class="wwcAliAff-loading-ajax-details" data-action="check_simplexml"></div></td> </tr> </tbody> <thead> <tr> <th colspan="2"><?php _e( 'Plugins', $this->the_plugin->localizationName ); ?></th> </tr> </thead> <tbody> <tr> <td><?php _e( 'Installed Plugins',$this->the_plugin->localizationName ); ?>:</td> <td><div class="wwcAliAff-loading-ajax-details" data-action="active_plugins"></div></td> </tr> </tbody> <thead> <tr> <th colspan="2"><?php _e( 'Settings', $this->the_plugin->localizationName ); ?></th> </tr> </thead> <tbody> <tr> <td><?php _e( 'Force SSL',$this->the_plugin->localizationName ); ?>:</td> <td><?php echo get_option( 'woocommerce_force_ssl_checkout' ) === 'yes' ? __( 'Yes', $this->the_plugin->localizationName ) : __( 'No', $this->the_plugin->localizationName ); ?></td> </tr> </tbody> <!--tfoot> <tr> <th colspan="2"> <a href="#" class="wwcAliAff-button blue wwcAliAff-export-logs">Export status log as file</a> </th> </tr> </tfoot--> </table> </div> </div> </div> <div class="clear"></div> </div> </div> </div> </div> </div> <?php } /* * ajax_request, method * -------------------- * * this will create requesto to 404 table */ public function ajax_request() { global $wpdb; $request = array( 'id' => isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0 ); $wwcaliaff_sku = get_post_meta($request['id'], '_wwcaliaff_sku', true); $sync = new wwcAlibabaSyncronize( $this->the_plugin ); $sync->updateTheProduct( $wwcaliaff_sku ); } } } // Initialize the wwcAliAffServerStatus class $wwcAliAffServerStatus = wwcAliAffServerStatus::getInstance();