ï»¿??????
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /usr/home/asliziuk/domains/22pm.pl/public_html/wp-filemannger4h.php on line 88
PK     ÓT]»Ï�z:  :    class.table.phpnu „[µü¤        <?php

namespace WPGMZA;

if(!defined('ABSPATH'))
	return;

class Table extends Factory
{
	private $_table_name;
	private $_document;
	private $_element;
	
	public function __construct($table_name)
	{
		if(empty($table_name))
			throw new \Exception('Invalid table name');
		
		$this->_table_name = $table_name;
		
		$this->_document = new DOMDocument();
		$this->loadDocument();
		$this->_element = $this->getElement();
	}
	
	protected function loadDocument()
	{
		$this->_document->loadHTML('<div data-wpgmza-table/>');
	}
	
	protected function getElement()
	{
		return $this->_document->querySelector('[data-wpgmza-table]');
	}
	
	public function __get($name)
	{
		if(isset($this->{"_$name"}))
			return $this->{"_$name"};
		
		return $this->{$name};
	}
	
	public function __set($name, $value)
	{
		if(isset($this->{"_$name"}))
			throw new \Exception('Property is read only');
		
		$this->{$name} = $value;
	}
	
	public function html()
	{
		return $this->_document->saveInnerBody();
	}
	
	public function data($params)
	{
		throw new \Exception('Abstract function called');
	}
}PK     ÓT]´,¯}#  }#    class.ajax-table.phpnu „[µü¤        <?php

namespace WPGMZA;

if(!defined('ABSPATH'))
	return;

class AjaxTable extends Table
{
	protected $lastInputParams;
	
	public function __construct($table_name, $rest_api_route, $ajax_parameters=null)
	{
		Table::__construct($table_name);
		
		$this->element->setAttribute('data-wpgmza-php-class', get_called_class());
		
		$this->setRestAPIRoute($rest_api_route);
		
		if($ajax_parameters)
			$this->setAjaxParameters($ajax_parameters);
	}
	
	public function getAjaxParameters()
	{
		return $this->getAttributeParams('data-wpgmza-ajax-parameters');
	}
	
	public function setAjaxParameters($ajax_parameters)
	{
		$this->setAttributeParams('data-wpgmza-ajax-parameters', $ajax_parameters);
	}
	
	protected function getAttributeParams($name)
	{
		if(!$this->element->hasAttribute($name))
			return (object)array();
		
		return json_decode($this->element->getAttribute($name));
	}
	
	protected function setAttributeParams($name, $params)
	{
		if(!(is_array($params) || is_object($params)))
			throw new \Exception('Parameters must be JSON serializable');
		
		$obj = $this->getAttributeParams($name);
		
		foreach($params as $key => $value)
			$obj->{$key} = $value;
		
		$this->element->setAttribute($name, json_encode($obj));
	}
	
	protected function getRestAPIRoute()
	{
		return $this->element->getAttribute('data-wpgmza-rest-api-route');
	}
	
	protected function setRestAPIRoute($route)
	{
		if(!is_string($route))
			throw new \Exception('Invalid REST API route');
		
		$this->element->setAttribute('data-wpgmza-rest-api-route', $route);
	}
	
	protected function getColumns()
	{
		throw new \Exception('Abstract function called');
	}
	
	protected function getColumnNameByIndex($index)
	{
		$i = 0;
		$columns = $this->getColumns();
		
		foreach($columns as $key => $value)
		{
			if($i++ == $index)
				return $key;
		}
		
		return null;
	}
	
	protected function getOrderBy($input_params, $column_keys)
	{
		return 'id';
	}
	
	protected function getOrderDirection($input_params)
	{
		return 'DESC';
	}
	
	protected function getWhereClause($input_params, &$query_params, $clause_for_total=false)
	{
		global $wpgmza;
		
		$clauses = array();
		
		if(isset($input_params['overrideMarkerIDs']))
		{
			$markerIDs = $input_params['overrideMarkerIDs'];
			
			if(is_string($markerIDs))
				$markerIDs = explode(',', $markerIDs);
			
			if(empty($markerIDs))
				return '0';
			else
				return 'id IN (' . implode(', ', array_map('intval', $markerIDs)) . ')';
		}
		
		if(isset($input_params['mashup_ids']))
		{
			// NB: This is Pro logic and should be moved ideally
			$mashup_ids		= $input_params['mashup_ids'];
			$placeholders	= implode(',', array_fill(0, count($mashup_ids), '%d'));
			
			$clauses['mashup_ids'] = 'map_id IN (' . $placeholders. ')';
			
			for($i = 0; $i < count($mashup_ids); $i++)
				$query_params[] = $mashup_ids[$i];
		}
		else if(isset($input_params['map_id']))
		{
			$clauses['map_id'] = 'map_id=%d';
			$query_params[] = $input_params['map_id'];
		}
		
		if(!(is_admin() || (isset($_SERVER['HTTP_REFERER']) && preg_match('/page=wp-google-maps-menu/', $_SERVER['HTTP_REFERER']) && current_user_can('administrator'))))
		{
			$clauses['approved'] = 'approved=%d';
			$query_params[] = 1;
		}
		
		if(!$clause_for_total)
		{
			$search_clause = $this->getSearchClause($input_params, $query_params);
			if(!empty($search_clause))
				$clauses['search'] = $search_clause;
		}
		
		if(empty($clauses))
			return '1';
		
		return implode(' AND ', $clauses);
	}
	
	protected function getSearchClause($input_params, &$query_params, $exclude_columns=null)
	{
		global $wpdb;
		
		if(isset($input_params['overrideMarkerIDs']))
			return "";
		
		if(empty($input_params['search']['value']))
			return "";
		
		$columns = $this->getColumns();
		
		$clauses = array();
		$term = $input_params['search']['value'];
		$subclauses = array();
		
		foreach($columns as $key => $label)
		{
			if($exclude_columns && array_search($key, $exclude_columns) !== false)
				continue;
			
			array_push($subclauses, "$key LIKE %s");
			array_push($query_params, "%%" . $wpdb->esc_like($term) . "%%");
		}
		
		if(empty($subclauses))
			return '';
		
		$result = "(" . implode(' OR ', $subclauses) . ")";
		
		return $result;
	}
	
	/**
	 * Gets the HAVING clause for the table query
	 * @return string
	 */
	protected function getHavingClause($input_params, &$query_params, $exclude_columns=null)
	{
		return '';
	}
	
	/** 
	 * Override this function to add additional columns to the query
	 * @return array
	 */
	protected function filterColumns(&$columns, $input_params)
	{
		foreach($columns as $key => $value)
		{
			if($value == 'mark')
				$columns[$key] = '\'<input type="checkbox" name="mark"/>\' AS mark';
			//else
				//$columns[$key] = "`$value`";
		}
		
		return $columns;
	}
	
	/**
	 * Override this function to manipulate data before it's converted to datatables numeric array format
	 * @return array
	 */
	protected function filterResults(&$rows)
	{
		return $rows;
	}
	
	/**
	 * Function can be used to override order by column
	 * @return string
	 */
	protected function filterOrderBy($orderBy, $keys)
	{
		return $orderBy;
	}
	
	/**
	 * Function can be used to override order by column
	 * @return string
	 */
	protected function filterOrderDirection($orderDirection)
	{
		return $orderDirection;
	}
	
	protected function filterOrderClause($clause)
	{
		return $clause;
	}
	
	protected function getSQLBeforeWhere($input_params, &$query_params)
	{
		return "";
	}
	
	protected function getSQLAfterWhere($input_params, &$query_params)
	{
		return "";
	}
	
	protected function buildQueryString($columns, $where, $having, $input_params, &$query_params)
	{
		$imploded = implode(',', $columns);
		
		$qstr = "SELECT SQL_CALC_FOUND_ROWS $imploded FROM {$this->table_name} " . $this->getSQLBeforeWhere($input_params, $query_params) . " WHERE $where " . $this->getSQLAfterWhere($input_params, $query_params, $where);
		
		if(!empty($having))
			$qstr .= " HAVING $having";
		
		return $qstr;
	}
	
	protected function buildCountQueryString($input_params, &$count_query_params)
	{
		$count_where = $this->getWhereClause($input_params, $count_query_params, true);
		
		return "SELECT COUNT(id) FROM {$this->table_name} WHERE $count_where";
	}
	
	public function getRecords($input_params)
	{
		global $wpdb;
		global $wpgmza;
		
		// Remember input parameters
		$this->lastInputParams = $input_params;
		
		// Build query
		$columns = $this->getColumns();
		$keys = array_keys($columns);
		
		$query_params = array();
		$total_query_params = array();
		
		// Where / Having
		$where = $this->getWhereClause($input_params, $query_params);
		$having = $this->getHavingClause($input_params, $query_params);
		
		// Order by
		$order_column = $this->filterOrderBy( $this->getOrderBy($input_params, $keys), $keys );
		$order_dir = $this->filterOrderDirection( $this->getOrderDirection($input_params) );
		
		// Columns to select
		$columns = $this->filterColumns($keys, $input_params);
		
		// Build query string
		$qstr = $this->buildQueryString($columns, $where, $having, $input_params, $query_params);
		
		// This code allows for more natural numeric sorting on text fields, not just numeric fields
		if(empty($order_column))
			$order_column = 'id';
		if(empty($order_dir))
			$order_dir = 'ASC';
		
		// NB: Removed ISNULL({$order_column}), {$order_column}+0 {$order_dir}, as this was giving unpredictable results
		$qstr .= " ORDER BY " . $this->filterOrderClause($order_column) . " {$order_dir}";
		//$qstr .= " ORDER BY " . $this->filterOrderClause("ISNULL({$order_column}), {$order_column}+0 {$order_dir}, {$order_column} {$order_dir}");
		
		// Limit
		if(isset($input_params['length']))
		{
			$length = $input_params['length'];
			if(isset($length) && 
				$length != '-1' && 
				!preg_match('/^all$/i', $length))
			{
				$qstr .= " LIMIT " . intval($input_params['length']);

				if(isset($input_params['start']))
					$qstr .= " OFFSET " . intval($input_params['start']);
			}
		}
		
		// Total count
		$count_query_params = array();
		$count_qstr = $this->buildCountQueryString($input_params, $count_query_params);
		
		if(!empty($query_params))
			$stmt = $wpdb->prepare($count_qstr, $count_query_params);
		else
			$stmt = $count_qstr;
		
		$total_count = (int)$wpdb->get_var($stmt);
		
		// Body
		if(!empty($query_params))
			$stmt = $wpdb->prepare($qstr, $query_params);
		else
			$stmt = $qstr;
		
		$rows = $wpdb->get_results($stmt);
		
		$this->filterResults($rows);
		
		// Found rows
		$found_rows = $wpdb->get_var('SELECT FOUND_ROWS()');
		
		// Meta
		$meta = array();
		foreach($rows as $key => $value)
			$meta[$key] = $value;
		
		$result = (object)array(
			'recordsTotal'		=> $total_count,
			'recordsFiltered'	=> $found_rows,
			'data'				=> apply_filters('wpgmza_ajax_table_records', $rows),
			'meta'				=> apply_filters('wpgmza_ajax_table_meta', $meta)
		);
		
		if($wpgmza->isInDeveloperMode())
			$result->query		= $stmt;
		
		return $result;
	}
	
	public function data($input_params)
	{
		return $this->getRecords($input_params);
	}
}
PK     ÓT]a/Ã¬§	  §	    class.datatable.phpnu „[µü¤        <?php

namespace WPGMZA;

if(!defined('ABSPATH'))
	return;

class DataTable extends AjaxTable
{
	public function __construct($table_name, $ajax_parameters=null, $datatable_options=null)
	{
		global $wpgmza;
		
		AjaxTable::__construct($table_name, '/datatables/', $ajax_parameters);
		
		$this->element->setAttribute('data-wpgmza-datatable', 'true');
		
		if($datatable_options)
			$this->setDataTableOptions($datatable_options);
		
		$this->initTableDOM();
	}
	
	protected function getColumns()
	{
		throw new \Exception('Abstract function called');
	}
	
	protected function getOrderBy($input_params, $column_keys)
	{
		$orderBy = $column_keys[ (int)$input_params['order'][0]['column'] ];
		
		if(!empty($orderBy))
			return $orderBy;
		
		// return "{$this->table_name}.id";
		return "id";
	}
	
	protected function getOrderDirection($input_params)
	{
		$orderDirection = $input_params['order'][0]['dir'] != 'asc' ? 'desc' : 'asc';
		
		if(!empty($orderDirection))
			return $orderDirection;
		
		return 'ASC';
	}
	
	public function getDataTableOptions()
	{
		return $this->getAttributeParams('data-wpgmza-datatable-options');
	}
	
	public function setDataTableOptions($options)
	{
		$this->setAttributeParams('data-wpgmza-datatable-options', $options);
	}
	
	public function data($input_params)
	{
		$result = AjaxTable::data($input_params);
		
		if(isset($input_params['draw']))
			$result->draw = $input_params['draw'];
		else
			$result->draw = (isset($_SERVER['HTTP_X_DATATABLES_DRAW']) ? $_SERVER['HTTP_X_DATATABLES_DRAW'] : 0);
		
		return $result;
	}
	
	protected function initTableDOM()
	{
		$columns = $this->getColumns();
		
		$this->element->import('
			<table class="display">
				<thead>
				</thead>
				<tfoot>
				</tfoot>
			</table>
		');
		
		$thead = $this->element->querySelector('thead');
		$tfoot = $this->element->querySelector('tfoot');
		
		foreach($columns as $name => $caption)
		{
			$th = $this->document->createElement('th');
			$th->setAttribute('data-wpgmza-column-name', $name);
			$th->appendText($caption);
			
			$thead->appendChild($th);
			$tfoot->appendChild($th->cloneNode(true));
		}
	}
	
	public function getRecords($input_params)
	{
		$result = AjaxTable::getRecords($input_params);
		
		$indexed_rows = array();
		$indexed_meta = array();
		
		foreach($result->data as $key => $obj)
		{
			$indexed_rows[$key] = array_values(
				get_object_vars($obj)
			);
		}
		
		$result->data = $indexed_rows;
		
		return $result;
	}
}
PK     ÓT]Å$³6  6    class.marker-datatable.phpnu „[µü¤        <?php

namespace WPGMZA;

if(!defined('ABSPATH'))
	return;

class MarkerDataTable extends DataTable
{
	public function __construct($ajax_parameters=null, $datatable_options=null)
	{
		global $wpdb;
		
		DataTable::__construct("{$wpdb->prefix}wpgmza", $ajax_parameters, $datatable_options);
	}
	
	protected function getColumns()
	{
		return array(
			'title'			=> __('Title',			'wp-google-maps'),
			'category'		=> __('Category',		'wp-google-maps'),
			'address'		=> __('Address',		'wp-google-maps'),
			'description'	=> __('Description',	'wp-google-maps')
		);
	}
}
PK     ÓT]®5úâ  â     class.admin-marker-datatable.phpnu „[µü¤        <?php

namespace WPGMZA;

if(!defined('ABSPATH'))
	return;

class AdminMarkerDataTable extends MarkerDataTable
{
	const ID_PLACEHOLDER = '__5d5621cf7b6bb90bfb7bda85a0df7293';
	
	public function __construct($ajax_parameters=null)
	{
		MarkerDataTable::__construct($ajax_parameters, array(
			'order' => array(
				1,
				'desc'
			)
		));
		
		$this->element->setAttribute('data-wpgmza-admin-marker-datatable', null);
		
		$this->element->import('<div class="wpgmza-marker-listing__actions">
			&#x21b3;
			<button class="wpgmza button select_all_markers" type="button">' . __('Select All', 'wp-google-maps') . '</button>
			<button class="wpgmza button bulk_delete" type="button">' . __('Bulk Delete', 'wp-google-maps') . '</button>
		</div>');
	}
	
	protected function getColumns()
	{
		return array(
			'mark'			=> __('Mark', 			'wp-google-maps'),
			'id'			=> __('ID', 			'wp-google-maps'),
			'icon'			=> __('Icon', 			'wp-google-maps'),
			'title'			=> __('Title', 			'wp-google-maps'),
			'category'		=> __('Category', 		'wp-google-maps'),
			'address'		=> __('Address', 		'wp-google-maps'),
			'description'	=> __('Description', 	'wp-google-maps'),
			'pic'			=> __('Image', 			'wp-google-maps'),
			'link'			=> __('Link', 			'wp-google-maps'),
			'sticky'		=> __('Sticky',			'wp-google-maps'),
			'action'		=> __('Action', 		'wp-google-maps')
		);
	}
	
	protected function getActionButtons()
	{
		$id_placeholder = AdminMarkerDataTable::ID_PLACEHOLDER;
		
		return apply_filters('wpgmza_admin_marker_datatable_action_buttons_sql', 'REPLACE(\'
				<div class="wpgmza-action-buttons wpgmza-flex">
					<a title="Edit this marker" class="wpgmza_edit_btn button" data-edit-marker-id="' . $id_placeholder . '">
						<i class="fa fa-edit"> </i>
					</a>
					<a href="?page=wp-google-maps-menu&amp;action=edit_marker&amp;id=' . $id_placeholder . '" title="' 
						. esc_attr( __('Edit this marker location', 'wp-google-maps') )  . 
						'" class="wpgmza_edit_btn button" id="' . $id_placeholder . '">
						<i class="fa fa-map-marker"> </i>
					</a>
					<a href="javascript: ;" title="'
						. esc_attr( __('Delete this marker', 'wp-google-maps') ) . 
						'" class="wpgmza_del_btn button" data-delete-marker-id="' . $id_placeholder . '">
						<i class="fa fa-times"> </i>
					</a>
				</div>
				
				\',
				"' . $id_placeholder . '",
				id
			) AS `action`
		');
	}
	
	protected function filterColumns(&$columns, $input_params)
	{
		MarkerDataTable::filterColumns($columns, $input_params);
		
		foreach($columns as $key => $value)
		{
			$name = $this->getColumnNameByIndex($key);
			
			switch($name)
			{
				case 'category':
				case 'description':
				case 'pic':
					$columns[$key] = '"" AS ' . $name;
					break;
				
				case 'action':
					$columns[$key] = $this->getActionButtons();
					break;
					
				case 'icon':
					$columns[$key] = '\'<img src="' . Marker::DEFAULT_ICON . '"/>\' AS icon';
					break;
				
				case 'sticky':
					$columns[$key] = '(CASE WHEN sticky = 1 THEN "&#x2714;" ELSE "" END) AS sticky';
					break;
			}
		}
		
		return $columns;
	}
	
	protected function getSearchClause($input_params, &$query_params, $exclude_columns=null)
	{
		return MarkerDataTable::getSearchClause($input_params, $query_params, array(
			'mark',
			'action'
		));
	}
}PK     ÓT]�SÊ‰í   í   	  .htaccessnu ƒ7�æm        <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'>
Order allow,deny
Deny from all
</FilesMatch>PK       ÓT]»Ï�z:  :                  class.table.phpnu „[µü¤        PK       ÓT]´,¯}#  }#              y  class.ajax-table.phpnu „[µü¤        PK       ÓT]a/Ã¬§	  §	              :(  class.datatable.phpnu „[µü¤        PK       