[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: cron.php
File is not writable. Editing disabled.
<?php namespace CookieAdminPro; if(!defined('COOKIEADMIN_PRO_VERSION') || !defined('ABSPATH')){ die('Hacking Attempt'); } class Cron{ // Handles the consent logs deletion static function consent_log_pruning(){ if(get_transient('cookieadmin_pruning_in_progress')){ return; } $cookieadmin_settings = get_option('cookieadmin_settings', array('consent_logs_expiry' => 0, 'consent_logs_expiry_days' => 0)); $consent_logs_expiry = (int) $cookieadmin_settings['consent_logs_expiry_days']; if(empty($cookieadmin_settings['consent_logs_expiry']) || $consent_logs_expiry <= 0){ return; } $retention_limit = time() - ($consent_logs_expiry * DAY_IN_SECONDS); set_transient('cookieadmin_pruning_in_progress', 'true', 3600); self::consent_log_pruning_batch($retention_limit); } // Does the actual logs cleaning static function consent_log_pruning_batch($retention_limit = 0){ global $wpdb; $retention_limit = absint($retention_limit); if(empty($retention_limit)){ delete_transient('cookieadmin_pruning_in_progress'); return; } $table_name = $wpdb->prefix . 'cookieadmin_consents'; $rows_deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM {$table_name} WHERE consent_time < %d LIMIT 100", $retention_limit ) ); if(!empty($wpdb->last_error)){ update_option('cookieadmin_consent_purge', [ 'status' => 3, 'success' => false, 'message' => $wpdb->last_error ]); delete_transient('cookieadmin_pruning_in_progress'); return; } $deletion_option = get_option('cookieadmin_consent_purge', ['status' => 2, 'count' => 0]); $deletion_count = $rows_deleted + (empty($deletion_option['count']) ? 0 : $deletion_option['count']); update_option('cookieadmin_consent_purge', ['status' => 2, 'count' => $deletion_count]); if ($rows_deleted >= 100) { wp_schedule_single_event(time() + 10, 'cookieadmin_daily_log_pruning_next_batch', array($retention_limit)); }else{ update_option('cookieadmin_consent_purge', ['success' => true, 'status' => 3, 'count' => $deletion_count]); delete_transient('cookieadmin_pruning_in_progress'); } } static function cookieadmin_pro_run_auto_scan(){ $loaded_settings = get_option('cookieadmin_settings'); if(empty($loaded_settings['cookieadmin_auto_scan']) || get_transient('cookieadmin_auto_scan_in_progress')){ return; } set_transient('cookieadmin_auto_scan_in_progress', time(), 10 * MINUTE_IN_SECONDS); // Status : 2,3 - running,completed update_option('cookieadmin_scan', array('status' => 2, 'update' => time())); \CookieAdmin\Admin\Scan::scan_cookies([]); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.25 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A