Autor Zpráva
vipouš
Profil *
Problem s menu na serveru hostingu, na localhost funguje :-(
Pro představu vkladam kody

hlava.php
------------------------------
<?
foreach ($_GET as $k=>$v) $$k=$v;
foreach ($_POST as $k=>$v) $$k=$v;
foreach ($_COOKIE as $k=>$v) $$k=$v;
session_start();
if(!$_SESSION['lng'] or $_GET['lng'])
{
if($_GET['lng'] == "en") $_SESSION['lng'] = "anglicky";
elseif($_GET['lng'] == "de") $_SESSION['lng'] = "nemecky";
elseif($_GET['lng'] == "ru") $_SESSION['lng'] = "rusky";
elseif($_GET['lng'] == "he") $_SESSION['lng'] = "hebrejsky";
else $_SESSION['lng'] = "anglicky";
}
include("lang/".$_SESSION['lng'] .".php");
include_once "kod/dbconect.php";
$ipd = $_SERVER['REMOTE_ADDR'];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<?php echo"$txt[0]"; ?>
<script language="JavaScript">
document.write ("<style>ul.sub{position: absolute; top: 0; left: 110px; z-index:10; width: 250px; visibility: hidden; padding-bottom: 1em;} li.mainHover ul.sub{visibility: visible;} li {behavior: url('hover.htc');}</style>");
</script>
<link href="css/kv4u.css" rel="stylesheet" type="text/css">
<SCRIPT Language="JavaScript" Src="script/foto.js" type="text/javascript"></SCRIPT>
<title>www.kv4U.com</title>
</head>
.........................................pokračuje kod...................................

index.php
-------------------------------------
inkluduje hlavu.php
.................................
obsah stranky
.................................
inkluduje pata.php

pata.php
---------------------------------------
....................................začíná kod a za ním menu je dole vypsano...............................
<div id="menu">
<ul>
<li class="main" >
<h3><?php echo "<div class="tabulka13">$txt[1]</div>"; ?></h3>
<ul class="sub">
<?php
$result = mysql_query("SELECT * FROM menu WHERE idzaznam='info' ORDER BY id ");
while ($row = mysql_fetch_array($result))
{
$langu = $_SESSION['lng'];
$id = $row["id"];
$lang = $row["$langu"];
echo "<li><a href='clanky.php?podkat=$id'><bdo dir="$txt[8]" lang="$txt[9]">$lang</bdo></a></li>";
}
?>
</ul>
</li>
<li class="main" >
<h3><?php echo "<div class="tabulka13"><a href='index.php'>$txt[2]</a></div>"; ?></h3>
<ul class="sub">
<?php
$result = mysql_query("SELECT * FROM menu WHERE idzaznam='historie' ORDER BY id ");
while ($row = mysql_fetch_array($result))
{
$langu = $_SESSION['lng'];
$id = $row["id"];
$lang = $row["$langu"];
echo "<li><a href='clanky.php?podkat=$id'><bdo dir="$txt[8]" lang="$txt[9]">$lang</bdo></a></li>";
}
?>
</ul>
</li>
<li class="main" >
<h3><?php echo "<div class="tabulka13">$txt[3]</div>"; ?></h3>
<ul class="sub">
<?php
$result = mysql_query("SELECT * FROM menu WHERE idzaznam='spa' ORDER BY id ");
while ($row = mysql_fetch_array($result))
{
$langu = $_SESSION['lng'];
$id = $row["id"];
$lang = $row["$langu"];
echo "<li><a href='clanky.php?podkat=$id'><bdo dir="$txt[8]" lang="$txt[9]">$lang</bdo></a></li>";
}
?>
</ul>
</li>
<li class="main" >
<h3><?php echo "<div class="tabulka13">$txt[4]</div>"; ?></h3>
<ul class="sub">
<?php
$result = mysql_query("SELECT * FROM menu WHERE idzaznam='shop' ORDER BY id ");
while ($row = mysql_fetch_array($result))
{
$langu = $_SESSION['lng'];
$id = $row["id"];
$lang = $row["$langu"];
echo "<li><a href='clanky.php?podkat=$id'><bdo dir="$txt[8]" lang="$txt[9]">$lang</bdo></a></li>";
}

?>
</ul>
</li>
<li class="main" >
<h3><?php echo "<div class="tabulka13">$txt[5]</div>"; ?></h3>
<ul class="sub">
<?php
$result = mysql_query("SELECT * FROM menu WHERE idzaznam='hotel' ORDER BY id ");
while ($row = mysql_fetch_array($result))
{
$langu = $_SESSION['lng'];
$id = $row["id"];
$lang = $row["$langu"];
echo "<li><a href='clanky.php?podkat=$id'><bdo dir="$txt[8]" lang="$txt[9]">$lang</bdo></a></li>";
}
?>
</ul>
</li>
<li class="main" >
<h3><?php echo "<div class="tabulka13">$txt[6]</div>"; ?></h3>
<ul class="sub">
<?php
$result = mysql_query("SELECT * FROM menu WHERE idzaznam='oddech' ORDER BY id ");
while ($row = mysql_fetch_array($result))
{
$langu = $_SESSION['lng'];
$id = $row["id"];
$lang = $row["$langu"];
echo "<li><a href='clanky.php?podkat=$id'><bdo dir="$txt[8]" lang="$txt[9]">$lang</bdo></a></li>";
}
?>
</ul>
</li>
<?php
if($_SESSION['user_level'] == 1){
?>
<li class="main" >
<h4><?php echo "<div class='tabulka13'><a href='show.php?ip=$ipd' title='kosik'><bdo dir='$txt[8]' lang='$txt[9]'>$txt[89]</dbo></a></div>"; ?></h4>
<ul class="sub">
</ul>
</li>
<?php
}
if($_SESSION['user_level'] == 2){
?>
<li class="main" >
<h3><?php echo "<div class="tabulka13">Insert</div>"; ?></h3>
<ul class="sub">
<li><a href="vlozit.php" title="Novi zaznam"><bdo dir="$txt[8]" lang="$txt[9]">Novi zaznam</dbo></a></li>
<li><a href="soupis.php" title="Edit"><bdo dir="$txt[8]" lang="$txt[9]">Edit</dbo></a></li>
</ul>
</li>
<?php
}
?>

</div></div>

-----------------------------------------
kv4u.css
------------------------------------------
#menu {width: 110px; font:15px Verdana, sans-serif;}
#menu ul, #menu ul.sub {list-style-type:none; margin: 0; padding: 0;}
#menu li, #menu ul.sub li {margin: 0; padding: 0; width: 100%;}
#menu h3 {background-image:url(../image/button.gif);font-size: 1em; margin:0; width: 98px; height:39px}
#menu h4 {background-image:url(../image/button1.gif);font-size: 1em; margin:0; width: 98px; height:39px}
#menu li > h3 {margin-bottom: 0.2em;}
#menu li > h4 {margin-bottom: 0.2em;}
#menu h3 a {display: block; text-decoration: none; width: 100%;}
#menu h4 a {display: block; text-decoration: none; width: 100%;}
#menu h3 a:hover {color: inherit;}
#menu h4 a:hover {color: inherit;}
#menu ul.sub li {background-color: #EEE; display: block; width: 100%; margin:0; padding: 0; height:20px;}
#menu ul.sub li a {display: block; margin: 0; border-left: 10px solid Gray;}
#menu ul.sub li a:hover {color: inherit; border-left: 10px solid yellow;}

#menu ul li.main:hover h3 a { color: inherit;}
#menu ul li.main:hover h4 a { color: inherit;}
#menu ul li.main {position: relative;}
#menu ul li > ul.sub {position: absolute; top: 0; left: 100px; z-index:10; width: 150px; visibility: hidden; padding-bottom: 1em;}
#menu ul li.main:hover ul.sub {visibility: visible;}


#maciwebmenu {
position: absolute;
top: 5px;
right: 5px;
margin: 0;
padding 0;}

----------------------------------
hover.htc
----------------------------------
<component>
<attach event="onmouseover" handler="hoverRollOver" />
<attach event="onmouseout" handler="hoverRollOff" />
<script type="text/javascript
vipouš
Profil *
hover se nevešel
----------------------------------
hover.htc
----------------------------------
<component>
<attach event="onmouseover" handler="hoverRollOver" />
<attach event="onmouseout" handler="hoverRollOff" />
<script type="text/javascript">
//
// Simple behaviour for IE5+ to emulate :hover CSS pseudo-class.
// Experimental ver 0.1
//
// This is an experimental version! Handle with care!
// Manual at: http://www.hszk.bme.hu/~hj130/css/list_menu/hover/
//

function hoverRollOver() {
element.origClassName = element.className; // backup origonal className
var tempClassStr = element.className;
tempClassStr += "Hover"; // convert name+'Hover' the last class name to emulate tag.class:hover
tempClassStr = tempClassStr.replace(/s/g,"Hover "); //convert name+'Hover' the others to emulate tag.class:hover
tempClassStr += " hover"; // add simple 'hover' class name to emulate tag:hover
element.className = element.className + " " + tempClassStr;
//window.status = element.className; // only for TEST
}
function hoverRollOff() {
element.className = element.origClassName;
}

</script>
</component>
vipouš
Profil *
vyřešeno, na serveru špatmě nastaveno mime............ :-( po nastavení adminem začlo běhat

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: