'.stripcslashes($rowxa[title01]).''; $menu_check=menu_top_sub($rowxa[id]); if(!($menu_check=="")){if(($_GET[a]==$rowxa[id]) OR ($_GET[b]==$rowxa[id])){$menu_top.=$menu_check;}} } //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";} //tworze menu $menu_top.='
  • '.stripcslashes($rowxa[title01]).' •
  • '; //if($menu_top_next==""){$menu_top_next=menu_top($rowxa[parrent_id]);} //substrony if(($rowxa[id]==$_GET[a]) OR ($_GET[b]==$rowxa[id])){ if(!($rowxa[parrent_id]==0)){ if(!($bmenu)){$bmenu=$rowxa[id];} $menu_top_next=menu_top_sub($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.='
    '; } } 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 //if(($_GET[a]==0) OR ($_GET[a]==1)){ include("$tmpl/index.tmpl.php"); //}else{ //include("$tmpl/index.tmpl.2.php"); //} //zamykam polaczenie z baza------------------------------------------------------------ mysql_close(); } else{ //gdy brak polaczenia z baza danych---------------------------------------------------- echo'
    Blad systemu
    '; } ?>