'.$sub.''; $fad=''; $fad2=''; $klasa='class="dropdown"';} else { $sub=''; $fad=''; $fad2=''; $klasa=''; $czysub='';} if($rowxa[id]==$_GET[a]){$klasa=' class="active"';}else{$klasa='';} //tworze menu $menu_top.='
  • '.stripcslashes($rowxa[title01]).' '.$fad.''.$fad2.''.$sub.'
  • '; } //if(!($id==2)){$menu_top="
  • Poprzednia strona
  • $menu_top";} if($menu_top==""){ $pytaniea = "SELECT * FROM html_page WHERE id='$id' AND run_element='1' LIMIT 1"; $resa = mysql_query($pytaniea); while ($rowxa = mysql_fetch_array($resa)){ $next_id=$rowxa[parrent_id]; } if($next_id=='0'){$menu_top=menu_top(2);}else{$menu_top=menu_top($next_id); } } return $menu_top; } function menu_top_sub($id){ global $bmenu; $pytaniea = "SELECT * FROM html_page WHERE parrent_id='$id' AND run_element='1' ORDER by pos_element ASC"; $resa = mysql_query($pytaniea); while ($rowxa = mysql_fetch_array($resa)){ $menu_top_next=''; //sprawdzam przekierowanie itworze link if(!($rowxa[redirecturl]=="")){$link=stripcslashes($rowxa[redirecturl]);}else{ $naglowek=l_nagl(stripcslashesx($rowxa[title01])); if($rowxa[parrent_id]==$_GET[b]){$bmenu=$_GET[b];} $link="web.php/a,$rowxa[id],b,$id,$naglowek";} $menu_top_next=menu_top_sub($rowxa[id]); //tworze menu $menu_top.='
  • '.stripcslashes($rowxa[title01]).'
  • '; if(!($menu_top_next=="")){ //$menu_top_next=menu_top($rowxa[parrent_id]); //$menu_top_next=''; } //$menu_top.=''; //substrony if(($rowxa[id]==$_GET[a]) OR ($_GET[b]==$rowxa[id])){ if(!($rowxa[parrent_id]==0)){ if(!($bmenu)){$bmenu=$rowxa[id];} //$menu_top_next=$rowxa[parrent_id]; $bmenu=''; } //jesli nie ma podstron w otwartej stronie. //sprawdz czy w parrencie jest submenu //sprawdz czy sa podstrony // } //end //} //end2 //daj submenu jesli jest //if(!($menu_top_next=="")){ //$menu_top.=' //'.$menu_top_next.' //'; //} } return $menu_top; } //tworzenie www ----------------------------------------------------------------------- //sterownik stron include("$page_file/swith.php"); //ustawiam dane podstawowe - nagłowek title strony $title.=' - '.$setting[page_name].' '; //wyswietlam template include("$tmpl/index.tmpl.php"); //zamykam polaczenie z baza------------------------------------------------------------ mysql_close(); } else{ //gdy brak polaczenia z baza danych---------------------------------------------------- echo'
    Blad systemu
    '; } ?>