* @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 . ' <a href="index.php?atklogout=1" target="_top">' . ucfirst(atktext("logout", "atk")) . '</a> '; $centerpiece = ""; $centerpiecelinks = array(); getCenterPiece($centerpiece, $centerpiecelinks); $content .= $centerpiece; $searchpiece = getSearchPiece(); $content .= " " . $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();
$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> ' . '<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(); } }