Location: PHPKode > projects > Hosting App > hosting/browse.php
<?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


	$tpl -> MxBloc('header', 'modify', './tpl/admin/header.mxt');

		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');

	    		$tpl -> MxBloc('body.main_bloc', 'modify', './tpl/admin/list_users.mxt'); // user form

	    		build_subUsers(& $tpl);

					list_users($HTTP_GET_VARS['offset'], $limit_per_page);

					break;

				case "domain": 

					$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.domains.mxt');

					$tpl -> MxBloc('body.main_bloc', 'modify', './tpl/admin/list_domains.mxt'); // domain form

					list_domains($HTTP_GET_VARS['offset'], $limit_per_page);

					build_subDomains(& $tpl);

					break;

				case "product" :

					$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.products.mxt');

					$tpl -> MxBloc('body.main_bloc', 'modify', './tpl/admin/list_products.mxt'); // product form		

					list_products($HTTP_GET_VARS['offset'], $limit_per_page);

					build_subProducts(& $tpl);

					break;
					
				case "email" :
				
					$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.emails.mxt');

					$tpl -> MxBloc('body.main_bloc', 'modify', './tpl/admin/list_emails.mxt'); // domain form

					list_emails($HTTP_GET_VARS['offset'], $limit_per_page);

					build_subEmails(& $tpl);
					
					break;

				case "conf"	:

					$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.conf.mxt');

//					build_subConf();

					break;

			} // switch

		}

	

switch($HTTP_SERVER_VARS['REQUEST_METHOD']){

	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();

	



?>
Return current item: Hosting App