Example #1
0
function SERVICE_CMSCSS_mambo()
{
    global $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix, $include_path, $thename, $bgcolor1, $bgcolor2, $css, $row_colors, $jz_MenuItem, $jz_MenuItemHover, $jz_MenuItemLeft, $jz_MainItemHover, $jz_MenuSplit;
    $option = trim(strtolower(mosGetParam($_REQUEST, 'option')));
    $Itemid = intval(mosGetParam($_REQUEST, 'Itemid', null));
    $database = new database($mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix);
    $mainframe = new mosMainFrame($database, $option, '.');
    $mainframe->initSession();
    $thename = $mainframe->getTemplate();
    // Now let's set the style sheet for CMS stuff
    $_SESSION['cms-style'] = "templates/" . $thename . "/css/template_css.css";
    $_SESSION['cms-theme-data'] = urlencode($bgcolor1 . "|" . $bgcolor2);
    $row_colors = array('sectiontableentry2', 'tabheading');
    $jz_MenuItemHover = "tabheading";
    $jz_MenuItem = "sectiontableentry2";
    $jz_MenuItemLeft = "jzMenuItemLeft";
    $jz_MenuSplit = "jzMenuSplit";
    $jz_MainItemHover = "jzMainItemHover";
    // Now let's set the CSS
    $css = $include_path . "style/cms-theme/default.php";
    return $css;
}
Example #2
0
File: index.php Project: cwcw/cms
    }
}
/** do we have a valid Itemid yet?? */
if ($Itemid === null) {
    /** Nope, just use the homepage then. */
    $query = "SELECT id" . "\n FROM #__menu" . "\n WHERE menutype='mainmenu'" . "\n AND published='1'" . "\n ORDER BY parent, ordering" . "\n LIMIT 1";
    $database->setQuery($query);
    $Itemid = $database->loadResult();
}
/** patch to lessen the impact on templates */
if ($option == 'search') {
    $option = 'com_search';
}
/** mainframe is an API workhorse, lots of 'core' interaction routines */
$mainframe = new mosMainFrame($database, $option, '.');
$mainframe->initSession();
// loads english language file by default
if ($mosConfig_lang == '') {
    $mosConfig_lang = 'english';
}
include_once 'language/' . $mosConfig_lang . '.php';
// frontend login & logout controls
$return = mosGetParam($_REQUEST, 'return', NULL);
$message = mosGetParam($_POST, 'message', 0);
if ($option == "login") {
    $mainframe->login();
    // JS Popup message
    if ($message) {
        ?>
		<script> 
		<!--//