HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/tokld.top/wp-content/plugins/migiksv/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 );
		}
	}
}