$v) { //echo"$k => $v
"; $GET_TAB=explode("-",$v); $_GET[$GET_TAB[0]]=$GET_TAB[1]; } } if(!isset($_SESSION['lng'])) { //$jezyk = get_languages('data'); //$_SESSION['lng']=$jezyk[0][1]; $_SESSION['lng']='pl'; } elseif($_GET['lng']=='pl') { $_SESSION['lng']='pl'; } elseif($_GET['lng']=='en') { $_SESSION['lng']='en'; } //$_SESSION['lng']='pl'; include("lng.php"); $id_lng=1; //************************* wybierajka typow modulow *************************** if(isset($_POST['typ_modulu'])) { //$this_page = basename($_SERVER['REQUEST_URI']); //if (strpos($this_page, "?") !== false) $this_page = reset(explode("?", $this_page)); //$przekieruj=$this_page; if($_POST['typ_modulu']>0) { $przekieruj="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; if (strpos($przekieruj, "?") !== false) $przekieruj = reset(explode("?", $przekieruj)); $przekieruj.=str_replace('&','&',create_href(pokaz_gety('mod',$_POST['typ_modulu']),$_POST['aktualna_nazwa_strony'],$plink)); } else { $przekieruj="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; if (strpos($przekieruj, "?") !== false) $przekieruj = reset(explode("?", $przekieruj)); $przekieruj.=str_replace('&','&',create_href(pokaz_gety('','','mod'),$_POST['aktualna_nazwa_strony'],$plink)); } unset($_POST['typ_modulu']); unset($_POST['aktualna_nazwa_strony']); header("Location: ".$przekieruj); exit(); } //*********************** wybierajka typow modulow end ************************* if(isset($_POST['search'])) { echo $szukaj=urlencode(urlencode($_POST['search'])); //header("Location: szukaj.php?szukaj=".$szukaj); //header("Location: http://".$_SERVER['HTTP_HOST']."/wyniki_wyszukiwania.html?search=".$szukaj); header("Location: http://".$_SERVER['HTTP_HOST']."/index.php?search=".$szukaj); exit(); } //echo pole_select_parent('typ_modulu', (int)$_GET['mod'], $kategoria_mod, 4, '0', '- - -', '', 'onchange="document.location.href=\''.create_href(pokaz_gety('mod',$v),$aktualna_nazwa_strony,$plink).'\';"', 1, 10, 'typ_modulu'); if(!empty($_POST)) { $_SESSION['POST_BACKUP']=$_POST; //header("Location: ".basename($_SERVER['SCRIPT_FILENAME'])); //header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); } if(!empty($_SESSION['POST_BACKUP'])) { $_POST=$_SESSION['POST_BACKUP']; unset($_SESSION['POST_BACKUP']); } if(isset($_POST['wyloguj']) OR isset($_GET['logout'])) { unset($_SESSION['zalogowany']); //unset($_SESSION['id_klienta']); //unset($_SESSION['dane']); header("Location: ".basename($_SERVER['SCRIPT_FILENAME'])); exit(); } //if(isset($_GET['gal'])){$_GET['kat']=24;} //$typy_zawartosci2 = array(1 => 'tekst',2 => 'galeria',3 => 'mapka google',11 => 'nowości',14 => 'archiwum nowości',12 => 'księga gości',13 => 'kalendarz'); $typy_zawartosci = array(1 => 'tekst',2 => 'galeria',3 => 'mapka google',4 => 'formularz', 6 => 'zajawka txt', 11 => 'nowości',14 => 'archiwum nowości',12 => 'księga gości',13 => 'kalendarz',15 => 'newsletter',16 => 'instruktorzy',17 => 'video',18 => 'studenci',19 => 'faq',20 => 'produkty'); $szablon=array(1 => 'text.php',2 => 'galeria.php',3 => 'googlemap.php',4 => 'form.php', 6 => 'zajawka_txt.php', 11 => 'news.php',14 => 'news.php',12 => 'ksiega_gosci.php',13 => 'kalendarz.php',15 => 'newsletter.php',16 => 'instruktorzy.php',17 => 'video.php',18 => 'studenci.php',19 => 'faq.php',20 => 'sitemap.php',21 => 'inwestycje_nasza_oferta.php',22 => 'download.php',23 => 'pokaz_produkty.php',24 => 'box_img.php'); $ulclassL=array('submenuL'); if($_SESSION['lng']=='en') { $Result = mysql_query("SELECT * FROM tlumaczenia t RIGHT OUTER JOIN kategorie k ON (t.id_tlum=k.id AND t.tabela='kategorie') ORDER BY k.pos,k.id_parent,k.id"); } else { $Result=mysql_query("SELECT * FROM kategorie WHERE status='1' ORDER BY pos"); } while(@$wiersz=mysql_fetch_array($Result)) { if($_SESSION['lng']=='en') { if(isset($wiersz['tlumaczenie'])){ //$tlumaczenie[$wiersz['tabela']][$wiersz['pole']]['id'][$wiersz['id']]=$wiersz[0]; //$tlumaczenie[$wiersz['tabela']][$wiersz['pole']][$wiersz['id']]=$wiersz['tlumaczenie']; $wiersz['nazwa']=stripslashes($wiersz['tlumaczenie']); } } $kategorie['kategorie'][$wiersz['id_parent']][$wiersz['id']]=stripslashes($wiersz['nazwa']); if($wiersz['zajawka']==1){$kategorie['zajawka'][$wiersz['id_parent']][$wiersz['id']]=stripslashes($wiersz['nazwa']);} else{$kategorie['kategoria_bzaj'][$wiersz['id_parent']][$wiersz['id']]=stripslashes($wiersz['nazwa']);} if($wiersz['ukryj']==1){$kategorie['kategorie_w_menu'][$wiersz['id_parent']][$wiersz['id']]=stripslashes($wiersz['nazwa']);} $kategorie['nazwa'][$wiersz['id']]=stripslashes($wiersz['nazwa']); $kategorie['parent'][$wiersz['id']]=$wiersz['id_parent']; $kategorie['opis'][$wiersz['id']]=stripslashes($wiersz['opis']); $kategorie['kat_id_pos'][$wiersz['id_parent']][$wiersz['pos']]=$wiersz['id'];// //$kategorie['param'][$wiersz['id']]=$wiersz['param']; if(trim($wiersz['param'])!='') { $kategorie['param'][$wiersz['id']]=json_decode($wiersz['param'],true); } if($kategorie['param'][$wiersz['id']]['lnk_typ']==3 AND trim($kategorie['param'][$wiersz['id']]['lnk'])!='') { $kategorie['zewnetrzny'][$wiersz['id']]=$kategorie['param'][$wiersz['id']]['lnk'];// tylko do mapy strony (forum) } /* //if($typ[$wiersz['id']]==1) //{ $moduly[$wiersz['id']] = explode("|", $kategorie['param'][$wiersz['id']]); if(is_array($moduly[$wiersz['id']])) { array_pop($moduly[$wiersz['id']]); foreach($moduly[$wiersz['id']] as $mod) { $art = explode(":", $mod); //echo" |$art[0]| => |$art[1]| => |$art[2]|
"; $modules[$wiersz['id']][$art[0]]=$art[1]; if(isset($art[2]) and trim($art[2])!=''){$values[$wiersz['id']][$art[0]]=$art[2];} //if($art[0]!='m' AND trim($art[0])!=''){$param.=$art[0].":".$art[1]."|";} } } if(trim($modules[$wiersz['id']]['lnk'])!='' AND trim($values[$wiersz['id']]['lnk'])!='' AND $typ[$wiersz['id']]==1) { $link_zew[$wiersz['id']]=$modules[$wiersz['id']]['lnk'].":".$values[$wiersz['id']]['lnk']; } else if(trim($values[$wiersz['id']]['lnk'])!='' AND $typ[$wiersz['id']]==1) { $link_zew[$wiersz['id']]=$modules[$wiersz['id']]['lnk']; //$link_zew[$wiersz['id']]=$modules[$wiersz['id']]['lnk']; } //echo $link_zew[$_GET['kat']]."
"; //} */ } /* if($but==0){$id_kat=$sid_kat=$id_lng;}else{$id_kat=$sid_kat=$kat_id_pos[$id_lng][$but];} if(isset($_GET['p'])) { $id_kat=$sid_kat=$kat_id_pos[$kat_id_pos[1][$but]][$_GET['p']]; } */ //********* sid_kat *********** if(!isset($_GET['kat'])) { $sid_kat=$id_lng;//1; $sid_kat=$kategorie['kat_id_pos'][$id_lng][1]; } else { //$sid_kat = $_GET['kat'];// ******** tymczasowo fryz //$sid_kat=litree_parent($parent,$_GET['kat'],(litree_level($parent,$_GET['kat'],$lev=-1)),$all='grand'); $sid_kat=litree_parent($kategorie['parent'],$_GET['kat'],(litree_level($kategorie['parent'],$_GET['kat'],$lev=-1)),$all='grand'); } //********* sid_kat end *********** //$haslo_dnia=$opis[$id_kat]; //***************** loading modules **********************/ if(!isset($_GET['kat'])){$_GET['kat']=$id_kat;} $id_kat=$_GET['kat']; /* $Result_modules=mysql_query("SELECT * FROM gdzie WHERE id_kat='$id_kat' ORDER BY pos"); if(mysql_num_rows($Result_modules)>0) { } else { if(is_array($kategoria[$id_kat])) { $t=0; foreach($kategoria[$id_kat] as $kk => $vv) { $t++; if($t==1) { $id_kat=$_GET['kat']=$kk; $Result_modules=mysql_query("SELECT * FROM gdzie WHERE id_kat='$kk' ORDER BY pos"); } //echo"$kk
"; } } } */ //$kk=check_modules($kategoria,$id_kat); //********** check_modules *************// $id_kat_org=$_GET['kat']; $kk=check_modules($kategorie['kategorie'],$id_kat); $id_kat=$_GET['kat']=$kk; //$Result_modules=mysql_query("SELECT * FROM gdzie WHERE id_kat='$kk' ORDER BY pos"); //********** check_modules *************// //***************** loading modules end **********************/ /* $Res=mysql_query("SELECT * FROM ciekawostki WHERE status='1' ORDER BY id"); while($wrs=mysql_fetch_array($Res)) { $ciekawostka['tresc'][$wrs['id']]=stripslashes($wrs['tresc']); $ciekawostka['link'][$wrs['id']]=stripslashes($wrs['tytul']); } @mysql_free_result ($Res); */ /* $res=mysql_query("SELECT * FROM button WHERE status='1' ORDER BY typ,pos"); while(@$wrs_br=mysql_fetch_array($res)) { $baner_reklamowy['foto'][$wrs_br['typ']][$wrs_br['id']]=$wrs_br['foto']; $baner_reklamowy['link'][$wrs_br['id']]=$wrs_br['link']; $baner_reklamowy['target'][$wrs_br['id']]=$wrs_br['target']; } */ /* $Res=mysql_query("SELECT * FROM strona_gl WHERE status='1' ORDER BY typ,pos"); while(@$whaslo=mysql_fetch_array($Res)) { $strona_gl['tytul'][$whaslo['id']]=stripslashes($whaslo['tytul']); $strona_gl['tresc'][$whaslo['id']]=stripslashes($whaslo['tresc']); $strona_gl['link'][$whaslo['id']]=stripslashes($whaslo['link']); $strona_gl['img'][$whaslo['id']]=stripslashes($whaslo['img']); $strona_gl['typ'][$whaslo['id']]=stripslashes($whaslo['typ']); } */ //$query="moduly m RIGHT OUTER JOIN (relacje r RIGHT OUTER JOIN artykul a ON(r.rel_id_art=a.art_id)) ON(r.rel_id_mod=m.mod_id OR a.art_typ=m.mod_id)"; //$res=mysql_query("SELECT * FROM relacje r RIGHT OUTER JOIN moduly m ON (m.mod_status='1' AND m.mod_id=r.rel_id_mod) ORDER BY m.mod_pos"); //$res=mysql_query("SELECT * FROM artykul a RIGHT OUTER JOIN (relacje r RIGHT OUTER JOIN moduly m ON (m.mod_status='1' AND m.mod_id=r.rel_id_mod)) ON(a.art_id=r.rel_id_art)".((isset($_GET['mod']) AND $_GET['mod']>0)?" WHERE a.art_typ='".(int)$_GET['mod']."'":"")." ORDER BY m.mod_pos"); //$res=mysql_query("SELECT * FROM artykul a RIGHT OUTER JOIN (relacje r RIGHT OUTER JOIN moduly m ON (m.mod_status='1' AND m.mod_id=r.rel_id_mod)) ON(a.art_id=r.rel_id_art".((isset($_GET['mod']) AND $_GET['mod']>0)?" AND a.art_typ='".(int)$_GET['mod']."'":"").") ORDER BY m.mod_pos"); //$res=mysql_query("SELECT * FROM artykul a RIGHT OUTER JOIN (relacje r RIGHT OUTER JOIN moduly m ON (m.mod_status='1' AND m.mod_id=r.rel_id_mod)) ON(a.art_id=r.rel_id_art) ORDER BY m.mod_pos"); $res=mysql_query("SELECT * FROM (relacje r RIGHT OUTER JOIN moduly m ON (m.mod_status='1' AND m.mod_id=r.rel_id_mod)) ORDER BY m.mod_pos"); while(@$wrs_mod=mysql_fetch_array($res)) { $mod_kat['tree'][$wrs_mod['mod_id_parent']][$wrs_mod['mod_id']]=stripslashes($wrs_mod['mod_nazwa']); if($wrs_mod['mod_typ']=='kat' OR $wrs_mod['mod_id_parent']>0) { $mod_kat['tree_mod'][$wrs_mod['mod_id_parent']][$wrs_mod['mod_id']]=stripslashes($wrs_mod['mod_nazwa']); } $mod_kat['name'][$wrs_mod['mod_id']]=stripslashes($wrs_mod['mod_nazwa']); $mod_kat['parent'][$wrs_mod['mod_id']]=$wrs_mod['mod_id_parent']; if(isset($wrs_mod['rel_id_art'])){$mod_kat['rel'][$wrs_mod['rel_id_mod']][]=$wrs_mod['rel_id_art'];} if(trim($wrs_mod['mod_param'])!=''){$mod_kat['param'][$wrs_mod['mod_id']]=json_decode(stripslashes($wrs_mod['mod_param']),true);} $mod_kat['opis'][$wrs_mod['mod_id']]=stripslashes($wrs_mod['mod_opis']); /* if(isset($wrs_mod['art_id'])) { $mod_kat['art']['tytul'][$wrs_mod['art_id']]=stripslashes($wrs_mod['art_tytul']); $mod_kat['art']['tresc'][$wrs_mod['art_id']]=stripslashes($wrs_mod['art_tresc']); $mod_kat['art']['zajawka'][$wrs_mod['art_id']]=stripslashes($wrs_mod['art_zajawka']); $mod_kat['art']['add_date'][$wrs_mod['art_id']]=stripslashes($wrs_mod['art_add_date']); $mod_kat['art']['mod_date'][$wrs_mod['art_id']]=stripslashes($wrs_mod['art_mod_date']); $mod_kat['art']['autor'][$wrs_mod['art_id']]=stripslashes($wrs_mod['art_autor']); $mod_kat['art']['param'][$wrs_mod['art_id']]=stripslashes($wrs_mod['art_param']); $mod_kat['art']['typ'][$wrs_mod['art_id']]=stripslashes($wrs_mod['art_typ']); } */ } ob_start(); if((isset($_GET['k']) AND isset($_GET['k1']) AND isset($_GET['a'])) OR (isset($_GET['search']) AND isset($_GET['a']))) { include("modules/tresc_artykulu.php"); } if(isset($_GET['aktualnosci']) AND isset($_GET['akt'])) { include("modules/tresc_aktualnosci.php"); } $tresc_artykulu = ob_get_contents(); ob_end_clean(); ?> Szanuj Energie

Szanuj energie

$v) { if(is_file($v)) { include($v); } } } ?>

Budowa serwisu dofinansowana przez Wojewódzki Fundusz Ochrony
Środowiska i Gospodarki Wodnej w Warszawie
www.wfosigw.pl

2010-2011 Szanuj-Energie.pl

StudioGraficzne.com: Projektowanie stron internetowych