Ejemplo n.º 1
0
    $page->register_style($theme->stylePath("style.css"));
    $page->register_script(atkconfig("atkroot") . "atk/javascript/launcher.js");
    $content = '<script language="javascript">atkLaunchApp(); </script>';
    $content .= '<br><br><a href="#" onClick="atkLaunchApp()">' . atktext('app_reopen', "atk") . '</a> &nbsp; ' . '<a href="#" onClick="window.close()">' . atktext('app_close', "atk") . '</a><br><br>';
    $box = $ui->renderBox(array("title" => atktext("app_launcher"), "content" => $content));
    $page->addContent($box);
    $output->output($page->render(atktext('app_launcher'), true));
    $output->outputFlush();
} else {
    if ($theme->getAttribute('useframes', true)) {
        // Regular mode. app.php can be included directly.
        include "app.php";
    } else {
        $user =& atkGetUser();
        $indexpage =& atknew('atk.ui.atkindexpage');
        $indexpage->setUsername(getFullUsername());
        $indexpage->setTitle(getAchievoTitle());
        $indexpage->setTopSearchPiece(getSearchPiece());
        $centerpiece = "";
        $centerpiecelinks = array();
        getCenterPiece($centerpiece, $centerpiecelinks);
        $indexpage->setTopCenterPieceLinks($centerpiecelinks);
        if ($user["name"] == "administrator") {
            $destination = array("atknodetype" => "pim.pim", "atkaction" => "adminpim");
        } else {
            $destination = array("atknodetype" => "pim.pim", "atkaction" => "pim");
        }
        $indexpage->setDefaultDestination($destination);
        $indexpage->generate();
    }
}
Ejemplo n.º 2
0
 * @internal includes.
 */
$config_atkroot = "./";
include_once "atk.inc";
include_once "achievotools.inc";
atksession();
atksecure();
require "theme.inc";
$page =& atkinstance("atk.ui.atkpage");
$page->unregister_all_scripts();
$ui =& atkinstance("atk.ui.atkui");
$theme =& atkTheme::getInstance();
$output =& atkOutput::getInstance();
$page->register_style($theme->stylePath("style.css"));
$page->register_stylecode("form{display: inline;}");
$page->register_style($theme->stylePath("top.css"));
//Backwards compatible $content, that is what will render when the box.tpl is used instead of a top.tpl
$username = getFullUsername();
$loggedin = atktext("logged_in_as", "atk") . ": <b>" . $username . "</b>";
$content = '<br>' . $loggedin . ' &nbsp; <a href="index.php?atklogout=1" target="_top">' . ucfirst(atktext("logout", "atk")) . '</a> &nbsp;';
$centerpiece = "";
$centerpiecelinks = array();
getCenterPiece($centerpiece, $centerpiecelinks);
$content .= $centerpiece;
$searchpiece = getSearchPiece();
$content .= "&nbsp;&nbsp;&nbsp; " . $searchpiece;
$title = getAchievoTitle();
$top = $ui->renderBox(array("content" => $content, "logintext" => atktext("logged_in_as"), "logouttext" => ucfirst(atktext("logout", "atk")), "logoutlink" => "index.php?atklogout=1", "logouttarget" => "_top", "centerpiece" => $centerpiece, "centerpiece_links" => $centerpiecelinks, "searchpiece" => $searchpiece, "title" => $title, "user" => $username, "username" => $username), "top");
$page->addContent($top);
$output->output($page->render(atktext("app_title"), true));
$output->outputFlush();
Ejemplo n.º 3
0
 *
 * @version $Revision$
 * $Id$
 */
/**
 * @internal includes..
 */
$config_atkroot = "./";
include_once "atk.inc";
atksession();
atksecure();
include "theme.inc";
$output = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';
$output .= "\n<html>\n <head>\n";
$output .= '  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=' . atktext("charset", "", "atk") . '">';
$output .= "\n  <title>" . getAchievoTitle() . "</title>\n";
$favico = atkconfig("defaultfavico");
if ($favico != "") {
    $output .= '  <link rel="icon" href="' . $favico . '" type="image/x-icon" />' . "\n";
    $output .= '  <link rel="shortcut icon" href="' . $favico . '" type="image/x-icon" />' . "\n";
}
$output .= "\n</head>\n";
atkimport("atk.menu.atkmenu");
atkimport("atk.utils.atkframeset");
$menu =& atkMenu::getMenu();
$theme =& atkinstance('atk.ui.atktheme');
$position = $menu->getPosition();
$scrolling = $menu->getScrollable() == MENU_SCROLLABLE ? FRAME_SCROLL_AUTO : FRAME_SCROLL_NO;
if (isset($ATK_VARS["atknodetype"]) && isset($ATK_VARS["atkaction"])) {
    $destination = "dispatch.php?atknodetype=" . $ATK_VARS["atknodetype"] . "&atkaction=" . $ATK_VARS["atkaction"];
    if (isset($ATK_VARS["atkselector"])) {