Exemplo n.º 1
0
    $mainbox_content .= " <a class=\"adminlinks\" href=\"" . $apcms['baseURL'] . "?c=admin&amp;act=sidebars\">" . $apcms['LANGUAGE']['ADMIN_SIDEBARMANAGEMENT'] . "</a><br />\n";
    $mainbox_content .= " <a class=\"adminlinks\" href=\"" . $apcms['baseURL'] . "?c=admin&amp;act=user\">" . $apcms['LANGUAGE']['ADMIN_USERMANAGEMENT'] . "</a><br />\n";
    $mainbox_content .= " <a class=\"adminlinks\" href=\"" . $apcms['baseURL'] . "?c=admin&amp;act=groups\">" . $apcms['LANGUAGE']['ADMIN_GROUPMANAGEMENT'] . "</a><br />\n";
    $lnav = new APC_Smarty($apcms['themesdir'] . '/' . $THEME);
    $lnav->assign('navbox_head', $apcms['LANGUAGE']['ADMIN_NAVBOX_MAIN']);
    $lnav->assign('navbox_content', $mainbox_content);
    $lout = $lnav->fetch('navbox.tpl');
    $AdminSideBar .= "\n<br />\n" . $lout;
    $smarty->assign('apcms_adminSideBar', $AdminSideBar);
    if (isset($_GET['act']) && trim($_GET['act']) != "") {
        $act = htmlspecialchars(urldecode(trim($_GET['act'])));
        $act = str_replace("./", "", $act);
        $act = str_replace("../", "", $act);
        $act = str_replace("..", "", $act);
        $ainclude = $act;
        $aincludefile = $PATH . "/includes/" . $act . ".admin.inc.php";
    } else {
        $act = "main";
        $ainclude = "main";
        $aincludefile = $PATH . "/includes/main.admin.inc.php";
    }
    $AOUT = "";
    if (!apcms_CheckAccess('admin_' . $act . '_access', $_SESSION['groups'])) {
        $error = $apcms['LANGUAGE']['ERROR_ACCESS_DENIED'];
        $apcms['redirect_url'] = $apcms['referer'];
        $apcms['redirect_time'] = 3;
    } else {
        include $aincludefile;
    }
    $COUT .= $AOUT;
}
Exemplo n.º 2
0
        preg_match_all("/(\\[box=)([^\\]]+)(\\])/siU", $navbox_content, $matches);
        for ($countthis = 0; $countthis < count($matches[0]); $countthis++) {
            $boxcontent = apcms_DisplayBoxContent($matches[2][$countthis]);
            $navbox_content = str_replace($matches[0][$countthis], $boxcontent, $navbox_content);
        }
        $lnav = new APC_Smarty($apcms['themesdir'] . '/' . $THEME);
        $lnav->assign('navbox_head', apcms_Strip($retright[$a][1]));
        $lnav->assign('navbox_content', $navbox_content);
        $lout = $lnav->fetch('navbox.tpl');
        $RightSideBar .= $lout;
    }
}
$smarty->assign('apcms_leftSideBar', $LeftSideBar);
$smarty->assign('apcms_rightSideBar', $RightSideBar);
$COUT = "";
if (!apcms_CheckAccess('global_access', $_SESSION['groups'])) {
    $error = $apcms['LANGUAGE']['ERROR_ACCESS_DENIED'];
    $apcms['redirect_url'] = $apcms['referer'];
    $apcms['redirect_time'] = 3;
} else {
    include $includefile;
}
$smarty->assign('CONTENT', "<br />" . $COUT);
if (isset($PAGE_TITLE) && trim($PAGE_TITLE) != "") {
    $TITLE = $apcms['title'] . " - " . $PAGE_TITLE;
} else {
    $TITLE = $apcms['title'];
}
$smarty->assign('TITLE', $TITLE);
$smarty->assign('head_version', $apcms['version']);
$smarty->assign('head_title', $PAGE_TITLE);