Exemplo n.º 1
0
        } else {
            $group = "";
            $installed = "";
        }
        ?>
            <tr>
                <td class="border-bottom"><?php 
        echo $addon;
        ?>
</td>
                <td class="border-bottom border-right" align="right">
                    <?php 
        if ($app->isInstalled()) {
            ?>
                        <?php 
            if ($app->hasAdmin()) {
                ?>
                            <a href="<?php 
                echo page("admin", "addons", "admin", $addon);
                ?>
" class="rel" title="Admin"><img src="images/icons/admin_16.png" /></a>
                            <?php 
            }
            ?>
                        <a href="<?php 
            echo page("admin", "addons", "edit", $addon);
            ?>
" class="rel" title="Edit"><img src="images/icons/edit_16.png" /></a>
                        <a href="<?php 
            echo page("admin", "addons", "uninstall", "", "", "addon=" . $addon . "&confirm");
            ?>
Exemplo n.º 2
0
?>
">
                            <i class="icon"><img src="images/admin/members.png" width="16px"></i>&nbsp;Search users
                        </a>
                    </li>
                </ul>
            </li>
            <li class="item"><a href="#" class="menu" rel="admin_addons">Addons</a>
                <ul class="dropdown" id="admin_addons">
                    <li class="title"><a>Installed addons</a></li>
                    <?php 
$addons = makefilelist(PATH_APPLICATIONS, ".|..|index.html", true, "folders");
if (count($addons) > 0) {
    foreach ($addons as $addon) {
        $add = new Addon($addon);
        if ($add->isInstalled() && $add->hasAdmin()) {
            ?>
                                <li>
                                    <a href="<?php 
            echo page("admin", "addons", "admin", $addon);
            ?>
">
                                        <i class="icon"><img src="images/admin/addons.png" width="16px"></i>&nbsp;<?php 
            echo ucfirst($addon);
            ?>
                                    </a>
                                </li>
                                <?php 
        }
    }
} else {
Exemplo n.º 3
0
<?php

/**
 * Copyright 2012, openTracker. (http://opentracker.nu)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 * 
 * @link          http://opentracker.nu openTracker Project
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 * @author Wuild
 * @package openTracker
 */
if (!defined("INCLUDED")) {
    die("Access denied");
}
$app = new Addon($this->addon);
try {
    if (!$app->hasAdmin()) {
        throw new Exception("no admin found");
    }
    if (!file_exists(PATH_APPLICATIONS . $this->addon . "/admin/" . $this->file . ".php")) {
        throw new Exception("Admin file not found");
    }
    $tpl = new Template(PATH_APPLICATIONS . $this->addon . "/admin/");
    $tpl->build($this->file . ".php");
} catch (Exception $e) {
    echo error(_t($e->getMessage()));
}