Sindbad~EG File Manager

Current Path : /home/sarayaglobal/sarayamystair.in/administrator/components/com_jamegafilter/
Upload File :
Current File : /home/sarayaglobal/sarayamystair.in/administrator/components/com_jamegafilter/base.php

<?php
/**
 * ------------------------------------------------------------------------
 * JA Megafilter Component
 * ------------------------------------------------------------------------
 * Copyright (C) 2004-2016 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites: http://www.joomlart.com - http://www.joomlancers.com
 * This file may not be redistributed in whole or significant part.
 * ------------------------------------------------------------------------
 */
//No direct to access this file.
defined('_JEXEC') or die('Restricted access');

class BaseFilterHelper {
	const ALL = '-1';
	const NONE = '0';
	const INCLUDE_ROOT = '1';

	function __construct($params = array()){
		if (!empty($params)) {
			$this->params = $this->buildFilterParams($params['filterfields']);
		}
	}

	function buildFilterParams($data) {
		$params = array();
		foreach ($data as $value) {
			if (!is_array($value)) continue;

			foreach ($value as $v) {
				$params[] = $v;
			}
		}

		return $params;
	}
	
	public function checkPublished($field) {
		foreach ($this->params AS $param) {
			if (isset($param['field']) && $field == $param['field']) {
				if ($param['published'] || $param['sort']) {
					return 1;
				}
			}
		}
		return 0;
	}
	
	public function checkDisplayOnFO($field) {
		foreach ($this->params AS $param) {
			if (isset($param['field']) && $field == $param['field']) {
				if ($param['showoff']) {
					return 1;
				}
			}
		}
		return 0;
	}
	
	public function getFieldConfig($field) {
		foreach ($this->params AS $param) {
			if (isset($param['field']) && $field == $param['field']) {
				return $param;
			}
		}
	}

}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists