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.0.8.9
- * @ Author : DeZender
- * @ Release on : 10.05.2019
- * @ Official site : http://DeZender.Net
- *
- */
- function adsw_autoload($className)
- {
- $className = ltrim($className, '\\');
- $fileName = '';
- if ($lastNsPos = strrpos($className, '\\')) {
- $namespace = substr($className, 0, $lastNsPos);
- $className = substr($className, $lastNsPos + 1);
- $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
- }
- $fileName .= $className . '.php';
- $file = ADSW_PATH . 'includes/' . $fileName;
- if (file_exists($file)) {
- require $file;
- }
- }
- function adsw_init_db()
- {
- global $wpdb;
- $wpdb->adsw_ali_meta = $wpdb->prefix . 'adsw_ali_meta';
- $wpdb->adsw_activities = $wpdb->prefix . 'adsw_activities';
- $wpdb->adsw_search_analytics = $wpdb->prefix . 'adsw_search_analytics';
- }
- function adsw_check_version()
- {
- $foo = adsw_updparam();
- $plugin_slug = $foo['plugin_slug'];
- $plugin = $plugin_slug . '/' . $plugin_slug . '.php';
- $data = get_transient('adsw_plugin_info');
- if (false === $data) {
- $checked_data = new stdClass();
- $checked_data->response = [];
- $checked_data->checked = [$plugin => ADSW_VERSION];
- $data = adsw_check_plugin_update($checked_data, true);
- $now = strtotime('now');
- if (false === $upd = get_transient('update_plugins')) {
- $upd = new stdClass();
- $upd->last_checked = $now;
- $upd->checked[$plugin] = ADSW_VERSION;
- if (is_object($data->response[$plugin])) {
- $upd->response[$plugin] = $data->response[$plugin];
- unset($upd->no_update[$plugin]);
- set_transient('update_plugins', $upd, 86400);
- }
- }
- else if (is_object($data->response[$plugin])) {
- $upd = new stdClass();
- $upd->last_checked = $now;
- $upd->checked = [$plugin => ADSW_VERSION];
- $upd->response = [$plugin => $data->response[$plugin]];
- $upd->translations = [];
- $upd->no_update = [];
- set_transient('update_plugins', $upd, 86400);
- }
- set_transient('adsw_plugin_info', $data, 86400);
- return $data;
- }
- return $data;
- }
- function adsw_notice_update_plugin()
- {
- $foo = adsw_updparam();
- $plugin_slug = $foo['plugin_slug'];
- $plugin = $plugin_slug . '/' . $plugin_slug . '.php';
- if (false === $data = get_transient('adsw_plugin_info')) {
- $data = adsw_check_version();
- }
- $obj = $data->response[$plugin];
- if (is_object($obj) && version_compare($obj->version, ADSW_VERSION, '>')) {
- printf('<div class="notice notice-warning"><p>%s %s. <a href="%s">%s</a></p></div>', __('You use the outdated version of AliDropship Woo plugin. The latest version is', 'adsw'), $obj->version, wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $plugin), 'upgrade-plugin_' . $plugin), __('Update Now', 'adsw'));
- }
- }
- function adsw_prepare_attr($attr)
- {
- if (!$attr || (count($attr) <= 0)) {
- return false;
- }
- $foo = [];
- foreach ($attr as $item) {
- $foo[] = ['name' => sanitize_text_field($item->attr_name), 'value' => sanitize_text_field($item->attr_value)];
- }
- return $foo;
- }
- function adsw_prepare_var_slug($str)
- {
- return substr(md5($str), 0, 22);
- }
- function adsw_get_HtmlElement($html, $startOfElement, $endOfElement)
- {
- $startingPosition = strpos($html, $startOfElement);
- $endPosition = strpos($html, $endOfElement, $startingPosition);
- $foundElement = substr($html, $startingPosition, $endPosition);
- ...............................................................
- ..................................
- .................
Advertisement
Add Comment
Please, Sign In to add comment