Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Navigacija

Parašė mariuse3· 2010 Lap. 7 22:11:43
#1

Sveiki, tai vat po ilgos pertaukos pradejau vel kaska daryti su php. Fizikos mokytojas manes paprase sukurti tinklapi, i kuri jis galetu deti ivairias pamokas ar informacijos saltinius susijusius su pamokomis. Bet man iskilo viena problemike, nezinau kaip padaryti kad navigacijoje butu sub kategorija. Pvz paspaudus ant Kategorijos "fizika" po ja arba salia jos islystu dar kelios kategorijos. Kaskada labai senai buvau mates kaska i tai panasaus, gal galetumet padet? Aciu iskart.

Parašė Lukas.· 2010 Lap. 7 22:11:53
#2


openside("Nacigacija");
 
echo"
<table bgcolor='#084B8A' border='0' align='center'><tr>
<td>
<style type=\"text/css\">
 
/*Credits: Dynamic Drive <span style="border-bottom: 1px dotted black;">CSS</span> Library */
/*URL: <a href='http://www.dynamicdrive.com/style/' target='_blank'><span style='color:005C5B'>http://www.dynamicdrive.com/style/</span></a> */
 
.suckerdiv ul{
margin: 0;
padding: 0;
list-style-type: none;
width: 155px; /* Width of Menu Items */
border-bottom: 0px solid #084B8A
}
 
.suckerdiv ul li{
position: relative;
}
 
/*Sub level menu items */
.suckerdiv ul li ul{
position: absolute;
width: 170px; /*sub menu width*/
top: 0;
visibility: hidden;
}
 
/* Sub level menu links style */
.suckerdiv ul li a{
display: block;
overflow: auto; /*force hasLayout in IE7 */
color: white;
text-decoration: none;
background: #084B8A;
padding: 1px 5px;
border: 0px solid #ffffff;
border-bottom: 0;
}
 
.suckerdiv ul li a:visited{
color: white;
}
 
.suckerdiv ul li a:hover{
background-color: #8A0808;
}
 
.suckerdiv .subfolderstyle{
background: url(http://www.nbarsn.com/themes/newest/images/bullet.gif) no-repeat center right;
}
 
 
/* Holly Hack for IE \*/
* <span style="border-bottom: 1px dotted black;">html</span> .suckerdiv ul li { float: left; height: 1%; }
* <span style="border-bottom: 1px dotted black;">html</span> .suckerdiv ul li a { height: 1%; }
/* End */
 
</style>
 
<script type=\"text/javascript\">
 
//SuckerTree Vertical Menu 1.1 (Nov 8th, 06)
//By Dynamic Drive: <a href='http://www.dynamicdrive.com/style/' target='_blank'><span style='color:005C5B'>http://www.dynamicdrive.com/style/</span></a>
 
var menuids=[\"suckertree1\"] //Enter id(s) of SuckerTree UL menus, separated by commas
 
function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName(\"ul\")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName(\"a\")[0].className=\"subfolderstyle\"
		if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
			ultags[t].style.left=ultags[t].parentNode.offsetWidth+\"px\" //dynamically position first level submenus to be width of main menu item
		else //else if this is a sub level submenu (ul)
		  ultags[t].style.left=ultags[t-1].getElementsByTagName(\"a\")[0].offsetWidth+\"px\" //position menu to the right of menu item that activated it
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName(\"ul\")[0].style.display=\"block\"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName(\"ul\")[0].style.display=\"none\"
    }
    }
		for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use \"display:none\" to hide menus (to prevent possible page scrollbars
		ultags[t].style.visibility=\"visible\"
		ultags[t].style.display=\"none\"
		}
  }
}
 
if (window.addEventListener)
window.addEventListener(\"load\", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent(\"onload\", buildsubmenus)
 
</script>
";
 
echo"<div class=\"suckerdiv\">
 
<ul id=\"suckertree1\">
 
 
<li><a href=\"".BASEDIR."news.php\">Pagrindinis</a></li>
<li><a href=\"".BASEDIR."forum/index.php\">Forumas</a></li>
<li><table border='0' cellpadding='0' cellspacing='0' width='100%'><tr>
<td><a href=\"#\">Sezonai</a></tr></td></table>
  <ul>
  <li><a href=\"".BASEDIR."viewpage.php?page_id=192\">Sezonų apžvalgos</a></li>
  <li><a href=\"".BASEDIR."viewpage.php?page_id=189\">All - Star game</a></li>
  <li><a href=\"".BASEDIR."viewpage.php?page_id=184\">Šlovės galerija</a></li>
  </ul>
<li><a href=\"".BASEDIR."viewpage.php?page_id=186\">Informacija, pagalba</a></li>
<li><a href=\"".BASEDIR."viewpage.php?page_id=201\">Laukiančiųjų eilė</a></li>
<li><a href=\"".BASEDIR."viewpage.php?page_id=185\">Taisyklės</a></li>
<li><a href=\"".BASEDIR."viewpage.php?page_id=200\">Medaliai</a></li>
<li><a href=\"".BASEDIR."infusions/user_gold_panel/index.php\">Taškai</a></li>
<li><a href=\"".BASEDIR."search.php\">Paieška</a></li>
 
 
 
 
 
 
<li><a href=\"#\">Turnyro dalyviams</a>
<ul>
  <li><a href=\"".BASEDIR."komandu_savininkai.php\">Komandų savininkai</a></li>
  <li><a href=\"".BASEDIR."turnyrine_lentele.php\">Turnyrinė lentelė</a></li>
  <li><a href=\"".BASEDIR."irasyti.php\">Užregistruoti varžybas</a></li>
   <li><a href=\"".BASEDIR."parduotuve.php\">Parduotuvė</a></li>
  <li><a href=\"".FORUM."viewthread.php?forum_id=24&thread_id=1915\">Free Agents</a></li>
  <li><a href=\"".BASEDIR."startinis_penketas.php\">Startinis penketas</a></li>
  <li><a href=\"".BASEDIR."infusions/mvp_mod/mvp_istorija.php\">MVP Istorija</a></li>
  <li><a href=\"".BASEDIR."infusions/keitimai/keisti.php\">Atlikti keitimą</a></li>
  <li><a href=\"".BASEDIR."infusions/keitimai/atlikti_keitimai.php\">Atlikti keitimai</a></li>
  <li><a href=\"".BASEDIR."rezultatai.php\">Rezultatai</a></li>
 
 
<li><table border='0' cellpadding='0' cellspacing='0' width='100%' bgcolor='#084B8A'><tr>
<td><a href=\"#\">Žaidėjai</a></td></tr></table>
  <ul>
 <li><a href=\"".BASEDIR."zaidejai/visi/zaidejai_pts.php\">Visi</a></li>
 <li><a href=\"".BASEDIR."zaidejai/naujokai/zaidejai_pts.php\">Naujokai</a></li>
 <li><a href=\"".BASEDIR."zaidejai/antrameciai/zaidejai_pts.php\">Antramečiai</a></li>
 <li><a href=\"".BASEDIR."zaidejai/c/zaidejai_pts.php\">C</a></li>
 <li><a href=\"".BASEDIR."zaidejai/pf/zaidejai_pts.php\">PF</a></li>
 <li><a href=\"".BASEDIR."zaidejai/sf/zaidejai_pts.php\">SF</a></li>
 <li><a href=\"".BASEDIR."zaidejai/sg/zaidejai_pts.php\">SG</a></li>
 <li><a href=\"".BASEDIR."zaidejai/pg/zaidejai_pts.php\">PG</a></li>
</ul>
 
 
<li><table border='0' cellpadding='0' cellspacing='0' width='100%' bgcolor='#084B8A'><tr>
<td><a href=\"#\">Komandos</a></td></tr></table>
  <ul>
 <li><a href=\"".BASEDIR."komandos/visos/komandos_pts.php\">Visos</a></li>
 <li><a href=\"".BASEDIR."komandos/east/komandos_pts.php\">East</a></li>
 <li><a href=\"".BASEDIR."komandos/west/komandos_pts.php\">West</a></li>
</ul>
 
 
<li><a href=\"".BASEDIR."rekordai_taskai.php\">Rekordai</a></li>
<li>";
if ($userdata['user_te_id']) {
echo "<a href=\"".BASEDIR."irasyti.php\">Slaptažodis: <b>......</b></a>
 
";
} else {
echo "<a href=\"".BASEDIR."irasyti.php\">Slaptažodis: <b>dalyviams!</b></a>";
}
echo "</li>
</ul>
<li><a href=\"#\">Siuntiniai</a>
  <ul>
  <li><a href=\"".BASEDIR."Nbarsn rosters [14].rar\">Nbarsn rosters [14]</a></li>
  <li><a href=\"".BASEDIR."Nbarsn_patch.rar\">Nbarsn slide patch</a></li>
  <li><a href=\"http://files.filefront.com/RealisticRoster08v8rar/;12002951;/fileinfo.html\" target='_blank'>ESPN HD v8 (I dalis)</a></li>
 <li><a href=\"http://files.filefront.com/Shoes+patch+5+for+RR8zip/;12001916;/fileinfo.html\" target='_blank'>ESPN HD v8 (II dalis)</a></li>
 <li><a href=\"http://rapidshare.com/files/140246839/Court_pack_Live_08_fixed_by_Albys_v.2.zip.html\" target='_blank'>ESPN HD v8 (III dalis)</a></li>
</ul>
 
 
</ul>
</div>
</td>
</tr>
</table>";
 
closeside();
 

Parašė mariuse3· 2010 Lap. 8 12:11:37
#3

biskuti netaip mane supratai, bet dekui kad padedi, va pasidariau pats kokios norejau :

openside("Navigacija")
?>
 
<style type="text/css">
 
.suckerdiv ul{
display:block;
list-style-type: none;
width: 161px;
padding: 0;
margin: 2px 0px 2px 0px;
text-decoration: none;
font: 10px verdana;
font-weight: bold;
color:#fff;
cursor: default;
}
 
.suckerdiv ul li{
position: relative;
background-image: url(http://fizikospamokos.comuv.com/images/nav.gif);
}
 
/*Sub level menu items */
.suckerdiv ul li ul{
position: absolute;
width: 161px; /*sub menu width*/
top: 0;
visibility: hidden;
}
 
/* Sub level menu links style */
.suckerdiv ul li a{
display: block;
overflow: auto; /*force hasLayout in IE7 */
display:block;
width: 150px;
padding: 5px;
margin: 2px 0px 2px 0px;
text-decoration: none;
background-image: url(http://fizikospamokos.comuv.com/images/nav.gif);
border: 1px solid #000;
font: 10px verdana;
font-weight: bold;
color:#fff;
cursor: default;
}
 
.suckerdiv ul li a:visited{
color:;
}
 
.suckerdiv ul li a:hover{
display:block;
width: 150px;
padding: 5px;
margin: 2px 0px 2px 0px;
text-decoration: none;
background-color: #000000;
border: 1px solid #000;
font: 10px verdana;
font-weight: bold;
color:#fff;
cursor: default;
}
 
.suckerdiv .subfolderstyle{
background: url() no-repeat center right;
}
 
 
/* Holly Hack for IE \*/
* <span style="border-bottom: 1px dotted black;">html</span> .suckerdiv ul li { float: left; height: 1%; }
* <span style="border-bottom: 1px dotted black;">html</span> .suckerdiv ul li a { height: 1%; }
/* End */
 
</style>
 
<script type="text/javascript">
 
var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas
 
function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
for (var t=0; t<ultags.length; t++){
ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main 
 
menu item
else //else if this is a sub level submenu (ul)
ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item 
 
that activated it
ultags[t].parentNode.onmouseover=function(){
this.getElementsByTagName("ul")[0].style.display="block"
}
ultags[t].parentNode.onmouseout=function(){
this.getElementsByTagName("ul")[0].style.display="none"
}
}
for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to 
 
prevent possible page scrollbars
ultags[t].style.visibility="visible"
ultags[t].style.display="none"
}
}
}
 
if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)
 
</script>
 
<div class="suckerdiv">
<ul id="suckertree1">
<li><a href='news.php'>Namai</a>
 
</li>
<li><a href='http://fizikospamokos.comuv.com/articles.php?article_id=1'>Fizika</a>
<ul>
<li><a href="#">7-8klasės</a>
<ul>
<li><a href='news.php'>7 klasė</a>
<li><a href='news.php'>8 klasė</a>
</ul>
 
<li><a href="#">9-10klasės</a>
<ul>
<li><a href='news.php'>9 klasė</a>
<li><a href='news.php'>10 klasė</a>
</ul>
<li><a href="#">11-12klasės</a>
<ul>
<li><a href='news.php'>11(A) klasė</a>
<li><a href='news.php'>12(A) klasė</a>
</ul>
 
</li>
</ul>
<li><a href='http://www.olimpiados.lt/'>Olimpiados</a>
</li>
<li><a href='http://www.fizika.ktu.lt/konkursai.htm'>BARZAUSKO TURNYRAS</a>
 
<li><a href='http://www.etalon.lt'>Etalon</a>
<li><a href='http://www.egzaminai.lt/naujienos/'>Egzaminai</a>
 
<li><a href='forum/index.php'>Forumas</a>
<li><a href='weblinks.php'>Naudingos nuorodos</a>
<li><a href='search.php'>Paieška</a>
</li>
<li><a href="#">Ugdymo programa</a>
<ul>
<li><a href='http://fizikospamokos.comuv.com/articles.php?article_id=2'>Bendrosios nuostatos</a>
<li><a href='news.php'>5-6 klasės</a>
<li><a href='news.php'>7-8 klasės</a>
<li><a href='news.php'>9-10 klasės</a>
<li><a href='news.php'>11-12 klasės</a>
</ul>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<?
closeside();