예제 #1
0
</td>
            <td class="border-bottom border-right" width="100px"></td>
            <td class="border-bottom border-right"><?php 
echo _t("Group");
?>
</td>
            <td class="border-bottom"><?php 
echo _t("Installed");
?>
</td>
        </tr>
    </thead>
    <?php 
foreach ($addons as $addon) {
    $app = new Addon($addon);
    if ($app->checkInstall()) {
        $db = new DB("addons");
        $db->join("left", "{PREFIX}groups", "addon_group", "group_id");
        $db->select("addon_name = '" . $db->escape($addon) . "'");
        if ($db->numRows()) {
            $db->nextRecord();
            $group = $db->group_name;
            $installed = get_date($db->addon_added);
        } else {
            $group = "";
            $installed = "";
        }
        ?>
            <tr>
                <td class="border-bottom"><?php 
        echo $addon;
예제 #2
0
 * 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");
}
try {
    if (!$this->addon) {
        throw new Exception("missing data");
    }
    $addon = new Addon($this->addon);
    if (!$addon->checkInstall()) {
        throw new Exception("addons is not installable");
    }
    if (isset($_POST['save'])) {
        try {
            if ($_POST['secure_input'] != $_SESSION['secure_token']) {
                throw new Exception("Wrong secured token");
            }
            $addon->Install();
            $db = new DB("addons");
            $db->setColPrefix("addon_");
            $db->installed = true;
            $db->group = $_POST['group'];
            $db->update("addon_name = '" . $db->escape($this->addon) . "'");
            header("location: " . page("admin", "addons"), true);
        } catch (Exception $e) {