<?


/* ------------------------------------------------------------------- */
/*

*************************************************
*			UWAGA! SKRYPT NIE JEST DARMOWY.			*
*		DALSZE ROZPOWSZECHNIANIE BEZ ZGODY 			*
*			FIRMY ArtGlobal JEST ZABRONIONE.			*
*************************************************

*************************************************
*	WWW.ArtGlobal.PL		PRODUCENT OPROGRAMOWANIA	*
*	NAZWA SKRYPTU:		NIERUCHOMOSCI 6.0			*
*	WERSJA FINALNA:	04.10.2010						*
*	KONTAKT:				kontakt@artglobal.pl			**
*************************************************

Copyright (c) 2010 ArtGlobal. Wszelkie prawa zastrzeżone.

*/
/* ------------------------------------------------------------------- */

include('config.inc.php');

include('../class/pager.class.php');

if ( $_SESSION['AdminIsLogin'] != 'ba2b3a2' )
{
        header("Location: login.php");
        session_destroy();
        exit;
}

$sql = "SELECT * FROM admins WHERE id = '$idAdmin'";
$q = mysql_query( $sql );
$db = mysql_fetch_array( $q );
$name = $db['name'];
$smarty -> assign('name', $name);

switch ( $_GET['mod'] )
{
	
						
        case 'edit':
                        include('modules/adm-edit.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-edit.tpl');
        break;
        case 'object':
                        include('modules/adm-object.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-object.tpl');
        break;

        case 'adv':
                        include('modules/adm-adv.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-adv.tpl');
        break;
        case 'mailing':
                        include('modules/adm-mailing.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-mailing.tpl');
        break;
        case 'users':
                        include('modules/adm-users.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-users.tpl');
        break;
        case 'pages':
                        include('modules/adm-pages.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-pages.tpl');
        break;
        case 'payment':
                        include('modules/adm-payment.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-payment.tpl');
        break;
		case 'baner':
                        include('modules/adm-reklama.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-reklama.tpl');
        break;
				case 'news':
                        include('modules/adm-news.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-news.tpl');
        break;
        case 'ogloszenia':
                        include('modules/adm-ogloszenie.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-ogloszenie.tpl');
        break;
				case 'diler':
                        include('modules/adm-diler.inc.php');
                        include('modules/adm-stat.inc.php');
												 $smarty -> display('adm-diler.tpl');
        break;
        case 'config':
                        include('modules/adm-config.inc.php');
                        include('modules/adm-stat.inc.php');
        break;
			 case 'editogloszenie':
                        include('modules/adm-editogloszenie.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-editogloszenie.tpl');
        break;
			 case 'editagent':
                        include('modules/adm-editagent.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-editagent.tpl');
        break;
        case 'admins':
                        include('modules/adm-admins.inc.php');
                        include('modules/adm-stat.inc.php');
                        $smarty -> display('adm-admins.tpl');
        break;
        default:
                        $smarty -> assign('home', '');
						include('modules/adm-stat.inc.php');
                 		$smarty -> display('adm-glowna.tpl');

                
}
      


?>
