Location: PHPKode > projects > Hosting App > hosting/index.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, 28/08/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);

	$tpl -> MxText('title', $app_name." ".$app_version);

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

		if (!isset($HTTP_GET_VARS['w'])) {

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

		}else{

			switch($HTTP_GET_VARS['w']){ 

				case "user": 
				
					$select[""]				 = "Choose from list";
					$select["ID"] 		 = "Client ID";
					$select["user"] 	 = "User";
					$select["name"] 	 = "Name";
					$select["company"] = "Company";

					$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.users.mxt');
					
					$tpl -> MxBloc('body.main_bloc', 'modify', './tpl/admin/searchform.mxt');
					
					$tpl -> MxFormField('body.main_bloc.search', "text", "query", "");
			
					$tpl -> MxHidden('body.main_bloc.what', "what=".$HTTP_GET_VARS['w']);

					$tpl -> MxSelect('body.main_bloc.where', 'where', '', $select);

					$tpl -> MxFormField('body.main_bloc.submit', "submit", "submit", "");

					build_subUsers(& $tpl);

					break;

				case "domain": 

					$select[""]				 = "Choose from list";
					$select["ID"] 		 = "Domain ID";
					$select["domain"]  = "Domain";
					$select["pack"] 	 = "Product";
					$select["user"]		 = "User";

					$tpl -> MxBloc('sub_menu', 'modify', './tpl/admin/sub.domains.mxt');
										
					$tpl -> MxBloc('body.main_bloc', 'modify', './tpl/admin/searchform.mxt');
					
					$tpl -> MxFormField('body.main_bloc.search', "text", "query", "");
			
					$tpl -> MxHidden('body.main_bloc.what', "what=".$HTTP_GET_VARS['w']);

					$tpl -> MxSelect('body.main_bloc.where', 'where', '', $select);

					$tpl -> MxFormField('body.main_bloc.submit', "submit", "submit", "");

					build_subDomains(& $tpl);

					break;

				case "product":

					$select[""]				 = "Choose from list";
					$select["ID"] 		 = "Product ID";
					$select["name"]    = "Product name";

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

					$tpl -> MxBloc('body.main_bloc', 'modify', './tpl/admin/searchform.mxt');
					
					$tpl -> MxFormField('body.main_bloc.search', "text", "query", "");
			
					$tpl -> MxHidden('body.main_bloc.what', "what=".$HTTP_GET_VARS['w']);

					$tpl -> MxSelect('body.main_bloc.where', 'where', '', $select);

					$tpl -> MxFormField('body.main_bloc.submit', "submit", "submit", "");


					build_subProducts(& $tpl);

					break;
					
				case "email":

					$select[""]				 = "Choose from list";
					$select["domain"]  = "Domain";
					$select["email"]	 = "Email";

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

					$tpl -> MxBloc('body.main_bloc', 'modify', './tpl/admin/searchform.mxt');
					
					$tpl -> MxFormField('body.main_bloc.search', "text", "query", "");
			
					$tpl -> MxHidden('body.main_bloc.what', "what=".$HTTP_GET_VARS['w']);

					$tpl -> MxSelect('body.main_bloc.where', 'where', '', $select);

					$tpl -> MxFormField('body.main_bloc.submit', "submit", "submit", "");


					build_subEmails(& $tpl);

					break;

				case "conf"	:

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

					build_subConf(& $tpl);

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

					build_subEmails(& $tpl);

			} // switch
		}


if ($HTTP_GET_VARS['w'] ) $tpl -> MxImage('body.cat_img', "img/".$HTTP_GET_VARS['w']."s.1.gif");

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

	$tpl -> MxWrite();

	

	







?>
Return current item: Hosting App