Exemplo n.º 1
0
function getCenterPiece(&$centerpiece, &$centerpiecelinks)
{
    $user =& atkGetUser();
    $theme =& atkinstance("atk.ui.atktheme");
    // Set the dispatchfile for this menu based on the theme setting, or to the default if not set.
    // This makes sure that all calls to dispatch_url will generate a url for the main frame and not
    // within the menu itself.
    $dispatcher = $theme->getAttribute('dispatcher', atkconfig("dispatcher", "index.php"));
    // do not use atkSelf here!
    $c =& atkinstance("atk.atkcontroller");
    $c->setPhpFile($dispatcher);
    if ($theme->getAttribute('useframes', true)) {
        $target = 'target="main"';
    } else {
        $target = "";
    }
    //$centerpiece = $centerpiecelinks['pim'] = href(dispatch_url("dashboard.mainboard", "start"), atktext("pim"), SESSION_NEW, false,$target);
    // change location link - if location_name is null there is only one location!
    if ($user['location_id'] !== null) {
        $current_location = atktext('current_location') . ': ' . $user['location_name'];
        $atktarget = "index.php?atknodetype=locations.location&atkaction=change&atklevel=0&atkprevlevel=0&atkselect=[atkprimkey]";
        $params = array("atkfilter" => $filter, "atktarget" => $atktarget);
        $centerpiece = $centerpiecelinks['change_location'] = href(dispatch_url("locations.location", "select", $params), $current_location, SESSION_NEW, false, $target);
    }
    // if user settings is allowed put link to it
    if (is_allowed("loginmanager.settings", "edit") && substr($user['name'], 0, 4) != 'demo') {
        $centerpiece .= '     ';
        $centerpiece .= $centerpiecelinks['userprefs'] = href(dispatch_url("loginmanager.settings", "edit"), atktext("userprefs"), SESSION_NEW, false, $target);
    }
}
Exemplo n.º 2
0
$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"])) {
        $destination .= "&atkselector=" . $ATK_VARS["atkselector"];
    }
    if (isset($ATK_VARS["searchstring"])) {
        $destination .= "&searchstring=" . $ATK_VARS["searchstring"];
    }
} else {
    if (atkArrayNvl(atkGetUser(), "name") == "administrator") {
        $destination = session_url(dispatch_url("pim.pim", "adminpim"), SESSION_NEW);
    } else {
        $destination = session_url(dispatch_url("pim.pim", "pim"), SESSION_NEW);
    }
}
$frame_top_height = $theme->getAttribute('frame_top_height');
$frame_menu_width = $theme->getAttribute('frame_menu_width');
$topframe =& new atkFrame($frame_top_height ? $frame_top_height : "75", "top", "top.php", FRAME_SCROLL_NO, true);
$mainframe =& new atkFrame("*", "main", $destination, FRAME_SCROLL_AUTO, true);
$menuframe =& new atkFrame($position == MENU_LEFT || $position == MENU_RIGHT ? $frame_menu_width ? $frame_menu_width : 190 : $menu->getHeight(), "menu", "menu.php", $scrolling);
$noframes = '<p>Your browser doesnt support frames, but this is required to run ' . atktext('app_title') . "</p>\n";
$root =& new atkRootFrameset();
if (atkconfig("top_frame")) {
    $outer =& new atkFrameSet("*", FRAMESET_VERTICAL, 0, $noframes);
    $outer->addChild($topframe);
    $root->addChild($outer);
} else {
    $outer =& $root;
Exemplo n.º 3
0
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"])) {
        $destination .= "&atkselector=" . $ATK_VARS["atkselector"];
    }
    if (isset($ATK_VARS["searchstring"])) {
        $destination .= "&searchstring=" . $ATK_VARS["searchstring"];
    }
} else {
    $destination = session_url(dispatch_url("dashboard.mainboard", "start"), SESSION_NEW);
}
$frame_top_height = 55;
$frame_menu_width = $theme->getAttribute('frame_menu_width');
$topframe =& new atkFrame($frame_top_height ? $frame_top_height : "75", "top", "top.php", FRAME_SCROLL_NO, true);
$mainframe =& new atkFrame("*", "main", $destination, FRAME_SCROLL_AUTO, true);
$menuframe =& new atkFrame($position == MENU_LEFT || $position == MENU_RIGHT ? $frame_menu_width ? $frame_menu_width : 190 : $menu->getHeight(), "menu", "menu.php", $scrolling);
$noframes = '<p>Your browser doesnt support frames, but this is required to run ' . atktext('app_title') . "</p>\n";
$root =& new atkRootFrameset();
if (atkconfig("top_frame")) {
    $outer =& new atkFrameSet("*", FRAMESET_VERTICAL, 0, $noframes);
    $outer->addChild($topframe);
    $root->addChild($outer);
} else {
    $outer =& $root;
    $outer->m_noframes = $noframes;