function __construct()
 {
     parent::__construct();
     parent::init();
     acl_helper::acl_redirect(steamauth_helper::get_role(), 'admin');
     Display::instance()->set_template('template-admin');
 }
<?php

$u = isset($_GET['ajax']) ? '?ajax=true' : '';
?>
<div class="admin-item">
	<h3>
		<?php 
if (acl_helper::check_acl(steamauth_helper::get_role(), 'add')) {
    ?>
			<div class="flr">
				<?php 
    echo form::open('/' . $controller . '/add' . $u, '');
    ?>
				<?php 
    echo form::hidden('controller', $controller);
    ?>
				<?php 
    echo form::hidden('current', Kohana::instance()->uri->string() . $u);
    ?>
				<?php 
    echo assets::img_tag('/cache/img/admin/add_item.gif', array('alt' => 'Add', 'title' => 'Add an item'), true);
    ?>
				<?php 
    echo form::close();
    ?>
			</div>
		<?php 
}
?>
		<!--<?php 
echo ucfirst($controller);
Example #3
0
<?php

/**
 * @version $Id: acl.php 668 2008-06-12 15:08:15Z snipersister $
 * @package    Easybook
 * @link http://www.easy-joomla.org
 * @license    GNU/GPL
 */
acl_helper::$ebconfig =& $mainframe->getParams();
acl_helper::$acl_hack = true;
acl_helper::$acl =& JFactory::getACL();
acl_helper::setACLs();
class acl_helper
{
    static $ebconfig;
    static $acl;
    static $acl_hack;
    static function getChilds($gid)
    {
        static $hack_cache;
        static $cache;
        if (!isset($cache)) {
            $tmp = self::$acl->get_group_children("30", "ARO", "RECURSE");
            $cache = array("30" => $tmp);
            $hack_cache = array_merge(array("30"), $tmp);
        }
        if (!array_key_exists($gid, $cache)) {
            $tmp = self::$acl->get_group_children($gid, "ARO", "RECURSE");
            if (self::$acl_hack && in_array(21, $tmp)) {
                $tmp = array_merge($tmp, $hack_cache);
            }
Example #4
0
<?php

/**
 * @version $Id: acl-php4.php 668 2008-06-12 15:08:15Z snipersister $
 * @package    Easybook
 * @link http://www.easy-joomla.org
 * @license    GNU/GPL
 */
$acl_hlp_inst = new acl_helper();
$acl_hlp_inst->ebconfig =& $mainframe->getParams();
$acl_hlp_inst->acl_hack = true;
$acl_hlp_inst->acl =& JFactory::getACL();
$acl_hlp_inst->setACLs();
class acl_helper
{
    var $ebconfig;
    var $acl;
    var $acl_hack;
    function getChilds($gid)
    {
        static $hack_cache;
        static $cache;
        if (!isset($cache)) {
            $tmp = $this->acl->get_group_children("30", "ARO", "RECURSE");
            $cache = array("30" => $tmp);
            $hack_cache = array_merge(array("30"), $tmp);
        }
        if (!array_key_exists($gid, $cache)) {
            $tmp = $this->acl->get_group_children($gid, "ARO", "RECURSE");
            if ($this->acl_hack && in_array(21, $tmp)) {
                $tmp = array_merge($tmp, $hack_cache);