X7ROOT File Manager
Current Path:
/home/katmhsmi/public_html/wp-content/plugins/xagio/inc
home
/
katmhsmi
/
public_html
/
wp-content
/
plugins
/
xagio
/
inc
/
📁
..
📄
.htaccess
(420 B)
📄
wp_helpers.php
(6.54 KB)
📄
wp_init.php
(37.12 KB)
📄
wp_licencator.php
(11.49 KB)
📄
wp_model.php
(6.47 KB)
📄
wp_post.php
(721 B)
Editing: wp_helpers.php
<?php // Slightly better zip archive if (class_exists('ZipArchive')) { if (!class_exists('ZipArchiveX')) { class ZipArchiveX extends ZipArchive { public function pack($files = [], $rootDirectory = '') { if (is_string($files)) $files = [$files]; if (is_bool($files)) $files = []; foreach ($files as $file) { $trimmedName = str_replace($rootDirectory, '', $file); if (is_dir($file)) { $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($file), RecursiveIteratorIterator::SELF_FIRST); foreach ($files as $f) { $trimmedName = str_replace($rootDirectory, '', $f); if (substr($trimmedName, -1) == '.') { continue; } if (is_dir($f) === true) { $this->addEmptyDir($trimmedName); } else if (is_file($f) === true) { // Check if zip $fileInfo = pathinfo($f); if (!in_array(@$fileInfo['extension'], ['zip', 'rar', '7z', 'tar.gz', 'tar', 'gz'])) { $this->addFile($f, $trimmedName); } } } } else { // Add current file to archive $this->addFile($file, $trimmedName); } } } } } } // Function that makes our zip utility skip zip files (aka our backups) function xag_preZipAdd($p_event, &$p_header) { $info = pathinfo($p_header['stored_filename']); // ----- zip files are skipped if (isset($info['extension'])) { if (in_array($info['extension'], ['zip', 'rar', '7z', 'tar.gz', 'tar', 'gz'])) { return 0; } else { return 1; } } else { return 1; } } if (!function_exists('xag_REQUEST')) { function xag_GET($key = '', $sanitize = false) { return xag_INPUT($_REQUEST, $key, $sanitize); } } if (!function_exists('xag_GET')) { function xag_GET($key = '', $sanitize = false) { return xag_INPUT($_GET, $key, $sanitize); } } if (!function_exists('xag_POST')) { function xag_POST($key = '', $sanitize = false) { return xag_INPUT($_POST, $key, $sanitize); } } define('XAG_SANITIZE_INT', 1); define('XAG_SANITIZE_EMAIL', 2); define('XAG_SANITIZE_STRING', 3); if (!function_exists('xag_INPUT')) { function xag_INPUT($array = [], $key = '', $sanitize = false) { if (isset($array[$key])) { if ($sanitize != false) { switch ($sanitize) { case XAG_SANITIZE_INT: return abs($array[$key]); case XAG_SANITIZE_EMAIL: return sanitize_email($array[$key]); case XAG_SANITIZE_STRING: return addslashes($array[$key]); } } return $array[$key]; } else { return NULL; } } } if (!function_exists('xag_domain')) { function xag_domain() { $domain = null; if (isset($_SERVER['SERVER_NAME'])) { $domain = $_SERVER['SERVER_NAME']; } else { $domain = parse_url(get_site_url()); $domain = $domain['host']; } return preg_replace('/^www\./', '', $domain); } } if (!function_exists('xag_removeSlashes')) { function xag_removeSlashes($string) { $string = implode("", explode("\\", $string)); return stripslashes(trim($string)); } } if (!function_exists('xag_stripAllSlashes')) { function xag_stripAllSlashes($value) { $value = is_array($value) ? array_map('xag_stripAllSlashes', $value) : xag_removeSlashes($value); return $value; } } if (!function_exists('xag_stripUnwantedCharTag')) { function xag_stripUnwantedCharTag($string = null) { $string = str_replace('"', '', trim($string)); return wp_strip_all_tags($string); } } if (!function_exists('string_contains')) { function string_contains($what, $where) { if (strpos($where, $what) !== FALSE) { return TRUE; } else { return FALSE; } } } if (!function_exists('xag_ajax')) { function xag_ajax() { return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest'; } } if (!function_exists('has_post_parent')) { function has_post_parent($post = null) { $wp_post = get_post($post); return !empty($wp_post->post_parent) ? get_post($wp_post->post_parent) : null; } } if (!function_exists('xag_contains')) { function xag_contains($what, $where) { if (strpos($where, $what) !== false) { return true; } return false; } } if (!function_exists('xag_spintax')) { function xag_spintax($text) { // Check if magic page spintax stuff if (xag_contains('{spintax_', $text)) { preg_match_all('/\{spintax_(((?>[^\{\}]+)|(?R))*)\}/ix', $text, $matches); foreach ($matches[1] as $i => $match) { $label = $match; $spintaxes = get_option('_magic_page_spintax_expressions'); foreach ($spintaxes as $spintax) { if ($spintax['label'] == $label) { $options = array_values($spintax['options']); $text = str_replace($matches[0][$i], $options[array_rand($options)], $text); break; } } } } return preg_replace_callback( '/\{(((?>[^\{\}]+)|(?R))*)\}/x', 'xag_spintax_replace', do_shortcode($text) ); } function xag_spintax_replace($text) { $text = xag_spintax($text[1]); $parts = explode('|', $text); return $parts[array_rand($parts)]; } } if (!function_exists('xag_filesize')) { function xag_filesize($path, $decimals = 2) { $s = filesize($path); $sz = 'BKMGTP'; $factor = floor((strlen($s) - 1) / 3); return sprintf("%.{$decimals}f", $s / pow(1024, $factor)) . @$sz[$factor]; } }
Upload File
Create Folder