Sindbad~EG File Manager

Current Path : /home/sarayaglobal/saraya.me/modules/mod_widgetkit/elements/
Upload File :
Current File : /home/sarayaglobal/saraya.me/modules/mod_widgetkit/elements/widget.php

<?php

defined('_JEXEC') or die;

class JFormFieldWidget extends JFormField
{
    protected $type = 'Widget';

    function getInput()
    {
        if (!$app = @include(JPATH_ADMINISTRATOR . '/components/com_widgetkit/widgetkit-app.php')) {
            return;
        }

        $app->trigger('init.admin', array($app));

        $value = htmlspecialchars($this->value, ENT_QUOTES, 'UTF-8');

        // Check if front end editing.
        if (!$app['admin'] && $app['config']->get('theme.support') !== true) {
            return sprintf('<a href="administrator/index.php?option=com_modules&task=module.edit&id=%d" class="btn btn-small">Edit in Backend.</a>', intval($_GET['id']));
        }

        return <<<EOT
    <button type="button" class="btn btn-small widgetkit-widget">
        <span>{$app['translator']->trans('Select Widget')}</span>
    </button>
    <input type="hidden" name="$this->name" value="$value">
EOT;
    }
}

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