<?
extract($_REQUEST);


include("incl/sqlquery.php");
include("incl/conn.php");
include("office/variablen_berg.php");
$server = $_SERVER[HTTP_HOST];

if ($server!="localhost") {$link_index="http://www.pension-bergidyll.de";}
else {$link_index="$PHPSELF";}


if ($site_id=="")
{
$navisel=sqlquery("select * from navi where status = 1 order by rf asc limit 1");
while
($ausgabe_navi=mysql_fetch_array($navisel))
{
$site_id = $ausgabe_navi[n_id];
}
}

if ($site_id=="1")
{

if ($ag_id=="")
{
$sitesel=sqlquery("select * from ag where pg_id = $pg_id order by rf limit 1");
while
($ausgabe_site=mysql_fetch_array($sitesel))
{
$site_id = $ausgabe_site[pg_id]+$ausgabe_site[ag_id]+10000;
}
}
else
{

$sitesel=sqlquery("select * from ag where pg_id = $pg_id and ag_id = $ag_id order by rf limit 1");
while
($ausgabe_site=mysql_fetch_array($sitesel))
{
$site_id = $ausgabe_site[pg_id]+$ausgabe_site[ag_id]+10000;
}


}
}
echo"
<html>
<head>
<title>$bb_lang</title>

<link rel='shortcut icon' href='p1.ico'>
<link rel='stylesheet' href='css/style.css' type='text/css'>
<link rel='stylesheet' href='css/style_admin.css' type='text/css'>

</head>
<body

";
$picsel_info=sqlquery("select * from pic where site_id = $site_id order by rf asc");
$anz_res_pic  = mysql_num_rows($picsel_info);
if ($anz_res_pic>0)
{
echo"
onload='mitte()' onresize='mitte()'
";
}
echo"
scroll='auto' bgcolor='#F5F2D8' marginwidth='0' marginheight='0' topmargin='0' bottommargin='0' leftmargin='0' rightmargin='0'>


<script type='text/javascript'>
<!--

function hoehe()
{
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
    return document.body.offsetHeight;
  } else {
    return 0;
  }
}

function breite()
{
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

var vert_mitte;
var hor_mitte;
var vert_mitte_error;
var hor_mitte_error;


var h;
var b;

function mitte()
{
h = hoehe();
b = breite();
vert_mitte = h/2-60;
hor_mitte = b/2+192;

vert_mitte_error = h/2;
hor_mitte_error= b/2;

document.getElementById('info').style.left = hor_mitte;
document.getElementById('info').style.top = vert_mitte;
document.getElementById('info').style.display = 'block';
document.getElementById('info').style.visibility = 'visible';

}
//-->
</script>



<table width='100%' height='100%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td align='center' valign='middle'>
<table cellspacing='0' cellpadding='0' border='0' style='width:50em; height:30em; border-color:#505050; border:0.06em solid #505050;'>
<tr height='24'><td colspan='2' bgcolor='#B7B784' class='w08em' align='center' valign='middle'>FERIENPENSION BERGIDYLL UND DER ALLTAG BLEIBT ZU HAUS</td></tr>

<tr>
<td style='width:11em; height:9em; background-color:#FCFCF2;' valign='middle' align='center'><p class='g08_lh50em'>FERIENPENSION</p><img src='graf/logo.gif' border='0' style='width:9em; height:1.7em;' title='Einer der schönsten Gegenden des Erzgebirges... Pension Bergidyll'></td>
<td style='width:39em; height:9em; background-color:#FCFCF2;'><img src='graf/sommer.jpg' border='0' style='width:39em; height:9em;' title='Ferienpension Bergidyll im Winter'></td>
</tr>

<tr>
<td style='width:11em; height:18em; background-color:#F4F4D6;' valign='middle' align='center'>

<table cellspacing='0' cellpadding='0' border='0'>
<tr height='10'><td align='right'></td></tr>

";
$navisel=sqlquery("select * from navi where status = 1 order by rf asc");
while
($ausgabe_navi=mysql_fetch_array($navisel))
{

if ($ausgabe_navi[n_id]==1)
{
$pgsel=sqlquery("select * from pg where status = 1 order by rf asc");
while
($ausgabe_pg=mysql_fetch_array($pgsel))
{

echo"
<tr height='20'><td align='right'>&nbsp;&nbsp;<a "; if (($site_id>10000)&&($pg_id=="$ausgabe_pg[pg_id]")){echo"class='r08em'";}else {echo"class='r08em_hell'";} echo" href='$link_index?site_id=$ausgabe_navi[n_id]&pg_id=$ausgabe_pg[pg_id]' title=' $ausgabe_pg[pg_name] '>$ausgabe_pg[pg_name]&nbsp;&nbsp;</a></td></tr>
";
if ($pg_id==$ausgabe_pg[pg_id])
{
echo"<tr height='1'><td align='right'></td></tr>";
$agsel=sqlquery("select * from ag where status = 1 and pg_id = '".$pg_id."'  order by rf asc");
while
($ausgabe_ag=mysql_fetch_array($agsel))
{
if (($ag_id=="")&&($ausgabe_ag[rf]==1)){$ag_id = $ausgabe_ag[ag_id];}
echo"
<tr height='16'><td align='right'>&nbsp;&nbsp;<a "; if (($site_id>10000)&&($pg_id=="$ausgabe_pg[pg_id]")&&($ag_id=="$ausgabe_ag[ag_id]")){echo"class='r08em'";}else {echo"class='r08em_hell'";} echo" href='$link_index?site_id=$ausgabe_navi[n_id]&pg_id=$ausgabe_pg[pg_id]&ag_id=$ausgabe_ag[ag_id]' title=' $ausgabe_ag[ag_name] '>$ausgabe_ag[ag_name]&nbsp;&nbsp;</a></td></tr>
";
}
echo"<tr height='5'><td align='right'></td></tr>";
}
}
}

else
{
echo"
<tr height='20'><td align='right'>&nbsp;&nbsp;<a "; if ($site_id=="$ausgabe_navi[n_id]"){echo"class='r08em'";}else {echo"class='r08em_hell'";} echo" href='$link_index?site_id=$ausgabe_navi[n_id]' title=' $ausgabe_navi[n_text] '>$ausgabe_navi[n_text]</a>&nbsp;&nbsp;</td></tr>
";
}
}
echo"
<tr height='10'><td align='right'></td></tr>

</table>



</td>
<td style='width:39em; height:18em; background-color:#FFFFFF;' valign='middle' align='center'>

";
if($best=="aktiv"){include("php/kdn_best.php");}
else
{
if ($site_id=="1"){$site_id=$pg_id+$ag_id+10000;}

$picsel_info=sqlquery("select * from pic where site_id = $site_id order by rf asc");
$anz_res_pic  = mysql_num_rows($picsel_info);
if ($anz_res_pic>0)
{
echo"

<div  class='dragme' id='info' style='display:block; visibility:visible; cursor:default; position:absolute; top:0px;left:0px; width:180px; height:16px;z-index:99;'>
";
include("incl/browser.php");
include("php/infotool.php");
echo"
</div>
";
}

echo"
<div style='height:16em; top:1em; overflow:auto; width:37em;'>
<table cellspacing='0' cellpadding='0' border='0' height='100%' >
<tr>
<td valign='middle'>
";
include("php/content.php");
echo"
</td>
</tr>
</table>
</div>
";
}
echo"





</td>
</tr>

<tr height='24'><td bgcolor='#CC9966'  align='center' valign='middle' colspan='2' class='w08em'>$bb_gf&nbsp;&nbsp;$bb_stra&nbsp;&nbsp;$bb_plz&nbsp;&nbsp;$bb_ort&nbsp;&nbsp;$bb_tel&nbsp;&nbsp;$bb_fax&nbsp;&nbsp;$bb_email</td></tr>
</table>
</td>
</tr>
</table>









</body>
</html>
";
?>