HEX
Server: Apache
System: Linux c119.dattaweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: c1190199 (57165)
PHP: 7.4.33
Disabled: mail, system, shell, exec, system_exec, shell_exec, mysql_pconnect, passthru, popen, proc_open, proc_close, proc_nice, proc_terminate, proc_get_status, escapeshellarg, escapeshellcmd, eval, dl, imap_mail, libvirt_connect, gnupg_init, unsetenv, apache_setenv, pcntl_exec, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_get_handler, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_getpriority, pcntl_setpriority, pcntl_async_signals, opcache_get_status, opcache_reset, opcache_get_configuration
Upload Files
File: /home/c1190199/public_html/wp-content/plugins/lxwqhol/includes/class-protect-uploads-activator.php
<?php
/**
 * Fired during plugin activation
 *
 * @link       https://example.com
 * @since      0.5.2
 *
 * @package    Protect_Uploads
 * @subpackage Protect_Uploads/includes
 */

/**
 * Fired during plugin activation.
 *
 * This class defines all code necessary to run during the plugin's activation.
 *
 * @since      0.5.2
 * @package    Protect_Uploads
 * @subpackage Protect_Uploads/includes
 * @author     Your Name <email@example.com>
 */
class Alti_ProtectUploads_Activator {

	/**
	 * Create necessary database tables and initialize plugin.
	 *
	 * @since    0.5.2
	 */
	public function run() {
		global $wpdb;
		$charset_collate = $wpdb->get_charset_collate();

		// Table for storing passwords.
		$table_passwords = $wpdb->prefix . 'protect_uploads_passwords';
		$sql_passwords = "CREATE TABLE IF NOT EXISTS $table_passwords (
			id bigint(20) NOT NULL AUTO_INCREMENT,
			attachment_id bigint(20) NOT NULL,
			password_hash varchar(255) NOT NULL,
			password_label varchar(100) NOT NULL,
			created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
			created_by bigint(20) NOT NULL,
			PRIMARY KEY  (id),
			KEY attachment_id (attachment_id)
		) $charset_collate;";

		// Table for access logs.
		$table_logs = $wpdb->prefix . 'protect_uploads_access_logs';
		$sql_logs = "CREATE TABLE IF NOT EXISTS $table_logs (
			id bigint(20) NOT NULL AUTO_INCREMENT,
			attachment_id bigint(20) NOT NULL,
			password_id bigint(20) NOT NULL,
			access_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
			ip_address varchar(45) NOT NULL,
			user_agent varchar(255) NOT NULL,
			access_type varchar(20) NOT NULL,
			PRIMARY KEY  (id),
			KEY attachment_id (attachment_id),
			KEY password_id (password_id)
		) $charset_collate;";

		require_once ABSPATH . 'wp-admin/includes/upgrade.php';
		dbDelta( $sql_passwords );
		dbDelta( $sql_logs );

		// Add default options.
		$default_settings = array(
			'enable_watermark' => false,
			'watermark_text' => get_bloginfo( 'name' ),
			'watermark_position' => 'bottom-right',
			'watermark_opacity' => 50,
			'enable_right_click_protection' => false,
			'enable_password_protection' => false,
		);

		if ( false === get_option( 'protect_uploads_settings' ) ) {
			add_option( 'protect_uploads_settings', $default_settings );
		}
	}
}