Sindbad~EG File Manager

Current Path : /home/sarayaglobal/.trash/modules/mod_zoocomment/fields/
Upload File :
Current File : /home/sarayaglobal/.trash/modules/mod_zoocomment/fields/template.php

<?php
/**
 * @package   ZOO Comment
 * @author    YOOtheme http://www.yootheme.com
 * @copyright Copyright (C) YOOtheme GmbH
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */

defined('JPATH_BASE') or die;

jimport('joomla.form.formfield');

// load config
require_once(JPATH_ADMINISTRATOR.'/components/com_zoo/config.php');

class JFormFieldTemplate extends JFormField {

	protected $type = 'Template';

	public function getInput() {

		$app = App::getInstance('zoo');

		// create select
		$path    = dirname(dirname(__FILE__)).'/tmpl';
		$options = array();

		if (is_dir($path)) {
			foreach (JFolder::files($path, '^([-_A-Za-z0-9]+)\.php$') as $tmpl) {
				$tmpl = basename($tmpl, '.php');
				$options[] = $app->html->_('select.option', $tmpl, ucwords($tmpl));
			}
		}

		return $app->html->_('select.genericlist', $options, "{$this->formControl}[{$this->group}][{$this->fieldname}]", '', 'value', 'text', $this->value);
	}

}

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