<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####

include_once( "../include/class.SQLString.php" );
include_once("auth.php");
include_once( dirname(__FILE__) . "/../include/class.MenuItems.php" );

db_connect($db_host, $db_user, $db_pass);

$id = safe_query( "select frontpage, cssl, maxmysql from anbieter where anbieter = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$skfrontpage = $werte["frontpage"];
$skssl = $werte["cssl"];
$maxmysql = $werte["maxmysql"];
if ($maxmysql != 0) $skmysql = 1;
?>
<HTML>
<HEAD>
<META content="text/html; charset=<? echo $lang_html_charset; ?>" http-equiv=Content-Type>
<LINK href="<?=$strSkinName?>/style.css" rel=stylesheet type=text/css>
</HEAD>
<BODY bgColor=#ffffff bottomMargin=0 leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
<table width="90%" cellpadding="0" cellspacing="1" border=0>
<tr heigth = "1"></tr>

<?
function menu($seite,$text,$strSkinName,$target="content") {
  menu_unprocessed($seite,ltext($text),$strSkinName,$target);
}

function menu_unprocessed($seite,$text,$strSkinName,$target="content") { ?>
<tr>
<td class="menucolor">
<a href="<?=$seite?>" target=<?= $target ?> class="menu" onclick="top.fraToolbar.location.href = 'toolbar.php?text=<? echo urlencode($text); ?>'";>
<IMG src="<?=$strSkinName?>/pics/alpha.gif" width=4 height=12 border=0>
<IMG src="<?=$strSkinName?>/pics/arrow.gif" width=12 height=9 border=0><? echo $text; ?>
</a>
</td>
</tr>
<? } ?>

<? function menutop($seite,$text,$strSkinName) { ?>
<tr>
<td class="menucolor">
<a href="<?=$seite?>" target="new" class="menu">
<IMG src="<?=$strSkinName?>/pics/alpha.gif" width=4 height=12 border=0>
<IMG src="<?=$strSkinName?>/pics/arrow.gif" width=12 height=9 border=0><? echo ltext($text); ?>
</a>
</td>
</tr>
<? } ?>

<?
if ($num == 1) {
	$bar=urlencode(ltext("m_overview"));
	$content="allgemein_start.php";
	menu("allgemein_start.php","m_overview",$strSkinName);
	if ( $PHP_AUTH_USER != 'res0' ) {
		menu("help.php?left=allgemein_pwaendern.php&right1=alpw_descr1&right2=alpw_descr2","ma_changepw",$strSkinName);
	}
	menu("help.php?left=allgemein_sprache.php&right1=alsp_title1&right2=alsp_descr1","ma_selectlanguage",$strSkinName);
	menu("help.php?left=allgemein_servermeldungen.php&right1=alse_title1&right2=alse_descr1","ma_servermessages",$strSkinName);
	menu("help.php?&right1=sk_title1&right2=sk_descr1&left=skins.php%3Faction%3deditskins",'sk_skins_editor',$strSkinName);

} else if ($num == 2) {
	$bar=urlencode(ltext("m_overview"));
	$content="angebote_start.php";
	menu("angebote_start.php","m_overview",$strSkinName);
	menu("help.php?left=angebote_neu.php&right1=anne_title3&right2=anne_descr1","mang_create",$strSkinName);
	menu("help.php?left=angebote_aendern.php&right1=anae_title1&right2=","mang_change",$strSkinName);
	menu("angebote_loeschen.php","mang_delete",$strSkinName);
} else if ($num == 3) {
	$bar=urlencode(ltext("m_overview"));
	$content="kunden_start.php";
	menu("kunden_start.php","m_overview",$strSkinName);
	menu("help.php?left=kunden_email.php&right1=kuem_title1&right2=kuem_descr1","mk_mailsetup",$strSkinName);
	menu("help.php?left=kunden_index.php&right1=kuin_title1&right2=kuin_descr1","mk_indexsetup",$strSkinName);
	menu("help.php?left=kunden_rundschreiben.php&right1=kuru_descr1&right2=kuru_descr2","mk_mailing",$strSkinName);
	menu("help.php?left=kunden_hilfeseite.php&right1=kuhi_descr1&right2=kuhi_descr2","mk_helpsetup",$strSkinName);
menu("help.php?left=kunden_neu1.php&right1=kune1_title1&right2=kune1_descr1","mk_createuser",$strSkinName);
 menu("help.php?left=kunden_aendern.php&right1=kuae_title1&right2=","mk_edituser",$strSkinName);
 if ($skfrontpage == 1) {
	 menu("help.php?left=kunden_frontpage.php&right1=kufr_title1&right2=kufr_descr1","mk_frontpage",$strSkinName); }
 if ($skssl == 1) {
	 menu("help.php?left=kunden_ssl.php&right1=kuss_descr1&right2=kuss_descr2","mk_ssl",$strSkinName); }
 if ($skmysql == 1) {
	 menu("help.php?left=kunden_mysql.php&right1=kumy_descr1&right2=","mk_mysql",$strSkinName); }
} else if ($num == 4) {
	$bar=urlencode(ltext("m_overview"));
	$content="statistiken_start.php";
	menu("statistiken_start.php","m_overview",$strSkinName);
	menu("statistiken_transfer.php","ms_traffic",$strSkinName);
} else if ($num >= 10) {
	$bar=urlencode(ltext("m_overview"));
	$content="custom_start.php?menublock_id=".$_GET["menublock_id"];
	menu ($content,"m_overview",$strSkinName);
	$onemenu = new MenuItems ( $_GET["menublock_id"] );
	for ( $onemenu->Start(); $onemenu->NextElement(); ) {
		if ( $onemenu->GetInFrame() ) {
			menu_unprocessed ( $onemenu->GetHRef(), $onemenu->GetLabel(), $strSkinName, "content" );
		} else {
			menu_unprocessed ( $onemenu->GetHRef(), $onemenu->GetLabel(), $strSkinName, "_blank" );
		}
	}
}
?>

<script>
top.fraToolbar.location.href = 'toolbar.php?text=<?=$bar?>';
parent.content.location.href = '<?=$content?>';
</script>
</table>
</body>
</html>

