$30 GRAYBYTE WORDPRESS FILE MANAGER $30

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bqrcodec/contact.groupg.com.sg/wp-content/plugins/wp-all-export-pro/classes/

HOME
Current File : /home/bqrcodec/contact.groupg.com.sg/wp-content/plugins/wp-all-export-pro/classes//handler.php
<?php

class PMXE_Handler extends PMXE_Session
{
	/** cookie name */
	private $_cookie;

	/** session due to expire timestamp */
	private $_session_expiring;

	/** session expiration timestamp */
	private $_session_expiration;

	/** Bool based on whether a cookie exists **/
	private $_has_cookie = false;

	/**
	 * Constructor for the session class.
	 *
	 * @access public
	 * @return void
	 */
	public function __construct()
	{

		$this->set_session_expiration();

		$this->_import_id = $this->generate_import_id();

		$this->_data = $this->get_session_data();

	}

	/**
	 * Return true if the current user has an active session, i.e. a cookie to retrieve values
	 * @return boolean
	 */
	public function has_session()
	{
		return isset( $_COOKIE[ $this->_cookie ] ) || $this->_has_cookie || is_user_logged_in();
	}

	/**
	 * set_session_expiration function.
	 *
	 * @access public
	 * @return void
	 */
	public function set_session_expiration()
	{
		$this->_session_expiring    = time() + intval( apply_filters( 'wpallexport_session_expiring', 60 * 60 * 47 ) ); // 47 Hours
		$this->_session_expiration  = time() + intval( apply_filters( 'wpallexport_session_expiration', 60 * 60 * 48 ) ); // 48 Hours
	}

	public function generate_import_id()
	{
		$input = new PMXE_Input();
		$import_id = $input->get('id', 'new');

		return $import_id;
	}

	/**
	 * get_session_data function.
	 *
	 * @access public
	 * @return array
	 */
	public function get_session_data()
	{
		global $wpdb;

		$session = $wpdb->get_row( $wpdb->prepare("SELECT option_name, option_value FROM $wpdb->options WHERE option_name = %s", '_wpallexport_session_' . $this->_import_id . '_'), ARRAY_A );

		if( !empty($session) ) {
			if ( is_serialized( $session['option_value'] ) ) {
				$data = unserialize( trim( $session['option_value'] ) );
			} else {
				$data = maybe_unserialize( base64_decode( $session['option_value'] ) );
			}
		}else{
			$data = [];
		}

		return $data;
	}

	/**
	 * get_session_data function.
	 *
	 * @access public
	 * @return array
	 */
	public function get_clear_session_data()
	{
		$this->_data = $this->get_session_data();
		$clear_data = array();
		foreach ($this->_data as $key => $value) {
			$ckey = sanitize_key( $key );
			$clear_data[ $ckey ] = maybe_unserialize( $value );
		}

		return $clear_data;
	}

	/**
	 * save_data function.
	 *
	 * @access public
	 * @return void
	 */
	public function save_data()
	{
		// Dirty if something changed - prevents saving nothing new
		if ( $this->_dirty && $this->has_session() )
		{
			$session_option        = '_wpallexport_session_' . $this->_import_id . '_';
			$session_expiry_option = '_wpallexport_session_expires_' . $this->_import_id . '_';

			global $wpdb;

			$session = $wpdb->get_row( $wpdb->prepare("SELECT option_name, option_value FROM $wpdb->options WHERE option_name = %s", $session_option), ARRAY_A );

			if ( empty($session) )
			{
				$wpdb->query($wpdb->prepare("INSERT INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, 'no')", $session_option, base64_encode(serialize($this->_data))));
				$wpdb->query($wpdb->prepare("INSERT INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, 'no')", $session_expiry_option, $this->_session_expiration));
				// add_option( $session_option, $this->_data, '', 'no' );
				// add_option( $session_expiry_option, $this->_session_expiration, '', 'no' );
			} else {
				// update_option( $session_option, $this->_data );
				$wpdb->query($wpdb->prepare("UPDATE `$wpdb->options` SET `option_value` = %s WHERE `option_name` = %s", base64_encode(serialize($this->_data)), $session_option));
			}
		}
	}

	public function clean_session( $import_id = 'new' )
	{
		global $wpdb;

		$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->options WHERE option_name = %s", '_wpallexport_session_' . $import_id . '_') );
		$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->options WHERE option_name = %s", '_wpallexport_session_expires_' . $import_id . '_') );
	}
}

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0755
PHPExcel
--
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0755
CdataStrategy.php
0.107 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
CdataStrategyAlways.php
0.2 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
CdataStrategyFactory.php
0.589 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
CdataStrategyIllegalCharacters.php
0.579 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
CdataStrategyIllegalCharactersHtmlEntities.php
0.264 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
CdataStrategyNever.php
0.2 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
PHPExcel.php
30.794 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
XMLWriter.php
15.842 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
chunk.php
7.89 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
config.php
2.367 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
download.php
1.479 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
handler.php
3.922 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
helper.php
4.426 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
input.php
2.358 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
installer.php
1.035 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
session.php
1.956 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
updater.php
22.839 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
wpallimport.php
23.992 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644
zip.php
2.513 KB
9 Mar 2026 9.59 PM
bqrcodec / bqrcodec
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF