'._P_DICT.''; $index=replace_in_template('podstrony',include 'includes/pages/dict.php',$index); break; case 'print': echo include 'includes/pages/print.php';break; case 'save': echo include 'includes/pages/ann.php';break; case 'content': $kategoria = mysql_fetch_array(mysql_query('select * from `'.prefix().'dzialy` where `id` = '.intval($_GET['n']))); $sciezka = $sep.''.$kategoria['nazwa'].''; $index=replace_in_template('podstrony',include 'includes/pages/content.php',$index);break; case 'admin': $sciezka = $sep.''._P_ADMIN.''; $index=replace_in_template('podstrony',include 'admin.php',$index); break; case 'cat': $kat=mysql_fetch_array(mysql_query('select * from `'.prefix().'ogloszenia_kategorie` where `id` ='.intval($_GET['catid']))); $sciezka = $sep.''.$kat['nazwa'].''; $index=replace_in_template('podstrony',include 'includes/pages/cat.php',$index); break; case 'ann': $kat=mysql_fetch_array(mysql_query('select * from `'.prefix().'ogloszenia` where `id` ='.intval($_GET['annid']))); $sciezka = $sep.''.$kat['tytul'].''; $index=replace_in_template('podstrony',include 'includes/pages/ann.php',$index); break; case 'answer': $kat=mysql_fetch_array(mysql_query('select * from `'.prefix().'ogloszenia` where `id` ='.intval($_GET['annid']))); $sciezka = $sep.''._A_TITLE.$kat['tytul'].''; $index=replace_in_template('podstrony',include 'includes/pages/answer.php',$index); break; case 'addann': $sciezka = $sep.''._P_ADDANN.''; $index=replace_in_template('podstrony',include 'includes/pages/addann.php',$index); break; case 'ankieta': $sciezka = $sep.''._P_POLL.''; $index=replace_in_template('podstrony',include 'includes/pages/ankieta.php',$index); break; case 'search': $index=replace_in_template('search_string_value',htmlentities(stripslashes($_REQUEST['search_str'])),$index); $index=replace_in_template('selected_lang_all',($_REQUEST['search_lang']==0?' selected="selected"':''),$index); $index=replace_in_template('selected_lang_pl',($_REQUEST['search_lang']=='pl'?' selected="selected"':''),$index); $index=replace_in_template('selected_lang_en',($_REQUEST['search_lang']=='en'?' selected="selected"':''),$index); $index=replace_in_template('selected_lang_bl',($_REQUEST['search_lang']=='bl'?' selected="selected"':''),$index); $index=replace_in_template('selected_checkbox',($_REQUEST['search_picture']=='on'?' checked="checked"':''),$index); $sciezka = $sep.''._RESULTS.''; $index=replace_in_template('podstrony',include 'includes/pages/search.php',$index); break; default: if($lang){ $template=open_template('main.html'); $cats=mysql_query('select * from `'.prefix().'ogloszenia` where aktywne=1 and (jezyk=\''.$lang.'\' or jezyk=\'bl\') '.state_query().' order by data desc limit 10'); $catst=''; $i=0; $num=mysql_num_rows($cats); while(($cat=mysql_fetch_array($cats))!==false){ $catt = open_template('ogloszenie.html'); $catt = replace_ann($catt,$cat); if($i==$num-1)$catt = str_replace('
','',$catt); $catst.=display_template($catt); $i++; } $template=replace_in_template('ogloszenia','
'._LATESTANNS.'


'.$catst,$template); $index=replace_in_template('podstrony',display_template($template),$index); } break; } if($lang){ $index=cats($index); $index=pool($index); if(stristr($_SERVER['QUERY_STRING'],'stan=')){ $query_link=str_replace('&stan=NY','',$_SERVER['QUERY_STRING']); $query_link=str_replace('stan=NY','',$query_link); $query_link=str_replace('&stan=NJ','',$query_link); $query_link=str_replace('stan=NJ','',$query_link); $query_link=str_replace('&stan=Illinois','',$query_link); $query_link=str_replace('stan=Illinois','',$query_link); $query_link=str_replace('&stan=all','',$query_link); $query_link=str_replace('stan=all','',$query_link); $query_link=str_replace('&stan=inny','',$query_link); $query_link=str_replace('stan=inny','',$query_link); $stanlink='index.php?'.$query_link.'&stan'; }else{ $stanlink='index.php?'.($_SERVER['QUERY_STRING']?$_SERVER['QUERY_STRING'].'&':'').'stan'; } $index=replace_in_template('state_string',$stanlink,$index); $index=replace_in_template('NYselected',($_SESSION['stan']=='NY'?'style="color:black;"':''),$index); $index=replace_in_template('NJselected',($_SESSION['stan']=='NJ'?'style="color:black;"':''),$index); $index=replace_in_template('Illinoisselected',($_SESSION['stan']=='Illinois'?'style="color:black;"':''),$index); $index=replace_in_template('allselected',($_SESSION['stan']=='all'?'style="color:black;"':''),$index); $index=replace_in_template('innyselected',($_SESSION['stan']=='inny'?'style="color:black;"':''),$index); $index=replace_in_template('sciezka',''._P_HOME.''.$sciezka,$index); if(stristr($_SERVER['QUERY_STRING'],'lang=pl')){ $langpllink='index.php?'.$_SERVER['QUERY_STRING']; $langenlink='index.php?'.str_replace('lang=pl','lang=en',$_SERVER['QUERY_STRING']); }else if(stristr($_SERVER['QUERY_STRING'],'lang=en')){ $langpllink='index.php?'.str_replace('lang=en','lang=pl',$_SERVER['QUERY_STRING']); $langenlink='index.php?'.$_SERVER['QUERY_STRING']; }else{ $langpllink='index.php?'.($_SERVER['QUERY_STRING']?$_SERVER['QUERY_STRING'].'&lang=pl':'lang=pl'); $langenlink='index.php?'.($_SERVER['QUERY_STRING']?$_SERVER['QUERY_STRING'].'&lang=en':'lang=en'); } $index=replace_in_template('lang_pl_link',$langpllink,$index); $index=replace_in_template('lang_en_link',$langenlink,$index); $dat1=gmmktime()+(1*3600); $dat2=gmmktime()-(4*3600); $data1=gmdate('d F Y',$dat1).' '.gmdate('H:i:s',$dat1); $data2=gmdate('d F Y',$dat2).' '.gmdate('H:i:s',$dat2); $index=str_replace('
','
'.$data1.' GMT+1
'.$data2.' GMT-4
',$index); $index=replace_in_template('query_string',$_SERVER['QUERY_STRING'],$index); if($_GET['p']!='search'){ $index=replace_in_template('search_string_value','',$index); $index=replace_in_template('selected_lang_all','',$index); $index=replace_in_template('selected_lang_pl','',$index); $index=replace_in_template('selected_lang_en','',$index); $index=replace_in_template('selected_lang_bl','',$index); $index=replace_in_template('selected_checkbox','',$index); } } if($_GET['p']!='print' && $_GET['p']!='save')echo display_template($index); ?>