<div id=sidemenu>
<?
//include ("search.php");
/*
$db = new DBConnect();
$db2 = new DBConnect();
$sql="select * from pages where id='483'";
$db->query($sql);
$row=$db->fetchrow();
$nazwa_strony=$row['nazwa'];
$opis_strony=$row['tresc'];
*/
echo "<div id=sidemenu_header>";
if ($_SESSION['language']==1) echo "nasza oferta";
if ($_SESSION['language']==2) echo "our offer";
if ($_SESSION['language']==3) echo "unser Angebot";
echo "</div>
<div id=sidemenu_body>";
$sql = "select * from `menu` where id>1 and widoczna=1 and jezyk=".$_SESSION['language']." order by pozycja"; //and (`tresc_krotka` like '".$_GET['page'].",%' or `tresc_krotka` like '%,".$_GET['page'].",%' or `tresc_krotka`='') order by rand()
$result = $db->query($sql);
while ($row=$db->fetchrow())
{
$sql = "select * from `pages` where widoczna=1 and sidemenu=".$row['id']." and menu<>0 order by pozycja"; //and (`tresc_krotka` like '".$_GET['page'].",%' or `tresc_krotka` like '%,".$_GET['page'].",%' or `tresc_krotka`='') order by rand()
$result = $db2->query($sql);
if ($db2->numrows()>0)
{
echo "<a href='javascript:void(0)' onclick='rozwin(".$row['id'].")' >".$row['nazwa']."</a>";
echo "<div id=sidediv".$row['id']." ";
if ($sidemenu!=$row['id']) echo " style='display:none'";
echo ">";
$sql = "select * from `pages` where widoczna=1 and sidemenu=".$row['id']." and menu=0 order by pozycja"; //and (`tresc_krotka` like '".$_GET['page'].",%' or `tresc_krotka` like '%,".$_GET['page'].",%' or `tresc_krotka`='') order by rand()
$result = $db2->query($sql);
while ($row2=$db2->fetchrow())
{
echo "<a href='".$row2['link'].".html' style='margin-left:35px;'>".$row2['nazwa']."</a>";
}
echo "</div>";
}
else
{
$nazwa=str_replace("-","",$row['nazwa']);
$nazwa=str_replace(" ","_",$nazwa);
$nazwa=str_replace("\"","",$nazwa);
$nazwa=str_replace("?","",$nazwa);
$nazwa=str_replace("__","_",$nazwa);
echo "<a href='".$nazwa.",sidemenu".$row['id'].".html'>".$row['nazwa']."</a>";
}
}
//include("search.php");
/*
if ($opis_strony!='') echo $opis_strony."<br>";
$sql = "select * from `aktualnosci` where skrypt_id='513' order by id desc"; //and (`tresc_krotka` like '".$_GET['page'].",%' or `tresc_krotka` like '%,".$_GET['page'].",%' or `tresc_krotka`='') order by rand()
$result = $db->query($sql);
//<div id=links>
//<div id=links_header></div>
//<div id=links_body>
while ($row=$db->fetchrow())
{
$typ = end(explode(".",$row['plik']));
if ($typ!='swf')
{
echo "<div class=links_block>";
if ($row['opcje']=='_blank') $row['link']='http://'.$row['link'];
if ($row['link']!='http://') echo "<a href='".$row['link']."' target='".$row['opcje']."' title=''>";
if (file_exists("upload/".$row['plik'].".jpg")) echo "<img src='upload/".$row['plik'].".jpg' alt='' style='vertical-align:middle;'>";
if (($row['nazwa']!='') || ($row['tresc']!='')) echo " ".$row['nazwa']." ".$row['tresc'];
if ($row['link']!='http://') echo "</a>";
echo "</div>";
}
else
{
echo "<div id=baner".$row['id']." style='height:155px;width:260px;z-index:1;'> </div>";
?>
<script type="text/javascript">
var so = new SWFObject("upload/<?echo "".$row['plik'];?>", "movie", "680", "155", "6", "#fff'");
so.addParam("loop", "true");
so.addParam("allowfullscreen", "true");
so.addParam("wmode", "transparent");
so.write("baner<?echo $row['id']?>");
</script>
<?
}
}
//</div>
//</div>
*/
?>
<?
/*
$sql= "select * from `pages` where jezyk=".$_SESSION['language']." and widoczna=1 and menu=0 and sidemenu=1 order by pozycja ;";
$result = $db ->query($sql);
echo "<ul id=sddm2>";
//echo "<li ><a href='http://".$_SERVER['SERVER_NAME']."'>STRONA GŁÓWNA</a></li>";
while ($row=$db->fetchrow())
{
echo "<li ";
if ($_GET['page']==$row['id']) echo " class=menu_current";
else
if (($current==$row['id'])&&($_GET['searchfield']=='')) echo " class=menu_current";
if ($row['zachowanie']==0) echo"><a href='".$row['link'].".html'";
if ($row['zachowanie']==1) echo"><a href=\"javascript:mopen('m".$row['id']."')\" onmouseout=\"mclosetime()\"";
if ($row['zachowanie']==2) echo"><a href='".$row['link'].".html'";
$sql= "select * from `pages` where jezyk=".$_SESSION['language']." and widoczna=1 and menu=".$row['id']." order by pozycja;";
$db2 ->query($sql);
if ($db2->numrows()>0)
{
if ($row['zachowanie']==0) echo " onmouseover=\"mopen('m".$row['id']."')\" onmouseout=\"mclosetime()\" ";
}
echo ">".$row['nazwa']."</a>";
if ($db2->numrows()>0)
{
echo "
<div id=m".$row['id']." onmouseover='mcancelclosetime()' onmouseout='mclosetime()'>";
while ($row2=$db2->fetchrow()) echo "<a href='".$row2['link'].".html'>".$row2['nazwa']."</a>";
echo "</div>";
}
echo "</li>";
}
echo "<li></li></ul>";
*/
//include ("news_left.php");
$sql = "select * from `pages` where menu='516' and widoczna=1 order by pozycja"; //and (`tresc_krotka` like '".$_GET['page'].",%' or `tresc_krotka` like '%,".$_GET['page'].",%' or `tresc_krotka`='') order by rand()
$result = $db->query($sql);
while ($row=$db->fetchrow()) echo "<a href='".$row['link'].".html'>".$row['nazwa']."</a><br>";
?>
</div>
<?//include("script/s483.php");?>
<div id=sidemenu_bottom></div>
<?//include("login.php");?>
</div>