e = get_extension($id); if ($this->e == null) throw new not_found; $this->page = safe_get("page"); if ($this->page == "") $this->page = $this->e->name() . "/"; } public function ext() { return $this->e; } public function output() { $install = loc("ext_install"); $name = $this->e->name(); $icon = "api.php?action=icon&size=medium&id=" . $this->e->id(); $v = "0.1 (3 December 2012)"; echo "
\"$name\"
$install
$v
"; echo "
$name"; $m = $this->make_menu(); if ($m != "") { echo " " . $m . " "; } echo wiki::page($this->page); } function make_menu() { $links = array(); $u = logged_user(); if ($u->can_edit_ext($this->e)) { $links["edit"] = "edit.html?page=" . $this->e->wiki_page() . "&id=" . $this->e->id(); $links["upload"] = "upload.html?id=" . $this->e->id(); $links["history"] = "history.html?id=" . $this->e->id() . "&page=" . $this->e->wiki_page(); } if ($u->can_delete_ext()) $links["delete"] = "delete.html?id=" . $this->e->id(); $menu = array(); foreach ($links as $name=>$link) array_push($menu, "$name"); return implode(" | ", $menu); } } $e = null; set_this_link("ext"); output_head("extensions", "baretorrent - extensions"); $page = "Test/"; ?>
output(); ?>