<?php
////////////////////////////////////////////////////////////////////////////////
// Copyright (c), 2002, Sadri Sahraoui <hide@address.com> //
// Hosting App - A web based hosting management system //
// http://sf.net/projetcs/hostingapp/ //
// //
// This program is free software. You can redistribute it and/or modify //
// it under the terms of the GNU General Public License //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY, without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details //
// //
// You should have received a copy of GNU General Public License //
// along with this program. //
////////////////////////////////////////////////////////////////////////////////
/**
*
*
* @version v1, 03/09/2002
*/
session_start();
define('MX_GENERAL_PATH', 'config/'); // path to Mxconf.php
define('MX_ERROR_PATH', 'modules/Mx/'); // path to ErrorManager.php
require("./config/config.inc.php");
$tpl = new ModeliXe("admin/main.mxt", session_name()."=".session_id()); // Instantiation of Modelixe Class
$tpl -> SetModeliXe();
$tpl -> SetMxLang("./lang/index.lang.".$lang); // define default langage file path
$tpl -> MxText('title', $app_name." ".$app_version);
$tpl -> MxBloc('header', 'modify', './tpl/admin/header.mxt'); //print header
$tpl -> MxBloc('body', 'modify', './tpl/admin/body.mxt'); // print body
$tpl -> MxBloc('footer', 'modify', './tpl/admin/footer.mxt'); // print footer
if (!isset($HTTP_GET_VARS['what'])) {
$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.menu.mxt');
}else{
switch($HTTP_GET_VARS['what']){
case "user":
$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.users.mxt');
view_user ($tpl, $HTTP_GET_VARS['id'], 'view'); // build the user detail page
build_subUsers(& $tpl);
break;
case "domain":
$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.domains.mxt');
view_domain ($tpl, $HTTP_GET_VARS['id'], 'view'); // build the domain detail page
build_subDomains(& $tpl);
break;
case "product":
$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.products.mxt');
build_subProducts(& $tpl);
view_product ($tpl, $HTTP_GET_VARS['id'], 'view'); // build the product page
break;
case "email":
$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.emails.mxt');
build_subEmails(& $tpl);
view_email ($tpl, $HTTP_GET_VARS['id'], 'view'); // build the product page
break;
case "conf" :
$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.conf.mxt');
// build_subConf();
break;
} // switch
}
switch($HTTP_SERVER_VARS['REQUEST_METHOD']){ // determine if w r in GET or POST context to display the image in the left
case "GET":
$tpl -> MxImage('body.cat_img', "img/".$HTTP_GET_VARS['what']."s.1.gif");
break;
case "POST":
$tpl -> MxImage('body.cat_img', "img/".$HTTP_POST_VARS['what']."s.1.gif");
break;
default:
$tpl -> MxImage('body.cat_img', "img/".$HTTP_GET_VARS['what']."s.1.gif");
} // switch
$tpl -> MxWrite(); // now we can build the template
?>