$ty" : $ty = "

$ty

"; return($ty); } function strposa($haystack, $needle, $offset=0) { if(!is_array($needle)) $needle = array($needle); foreach($needle as $query) { if(strpos($haystack, $query, $offset) !== false) return true; // stop on first true result } return false; } function sqli($st) { $array = array("TRUNCATE","DELETE","UPDATE","UNION","INSERT","DROP","HTTP","--","%20","&#", "/**/", "1'", "';", " EXEC "); return(strposa((strtoupper($st)), $array)); } if($ak=="cl") { setcookie ("la_", $la); header("Location:/"); exit(); } if(!$la_) $la_ = "p"; require("lang.".$la_.".php"); if($st == "aktualnosci") { $bl = 1000000; $st = ""; } if($st OR $bl OR (strlen($qu)>3 AND !sqli($qu))) { $fo_ .= "\n\n"; $he_ .= "\n\n"; if($st) // strony { $r = mysql_query("SELECT tytul,tresc,id FROM $b_st WHERE idt LIKE '$st' AND rodzaj LIKE 's'", $mysql_link); $tr = @mysql_result($r, 0, "tresc"); $ty = @mysql_result($r, 0, "tytul"); $ty = ereg_replace("^ZZ", "Ż", $ty); $id = @mysql_result($r, 0, "id"); if(!$ty) { header("Location:$do_"); exit(); } $r = mysql_query("SELECT tytul,idt FROM $b_st WHERE rodzic=$id AND rodzaj LIKE 's' ORDER BY waga", $mysql_link); $lf = @mysql_num_rows($r); if($lf) { $tr .= ""; } } elseif($bl) // blog { ($la_ == "p") ? $ms = array(1=>"STY", "LUT", "MAR", "KWI", "MAJ", "CZE", "LIP", "SIE", "WRZ", "PAŹ", "LIS", "GRU") : $ms = array(1=>"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "APR", "SEP", "OCT", "NOV", "DEC"); if(ctype_digit($bl)) // lista { if($bl == 1000000) $bl = 1; // slurp!!! $ty = AKTUALNOSCI; if($bl>1) $ty .= " | $bl"; $r = mysql_query("SELECT idt, tytul, zajawka, data FROM $b_bl WHERE status LIKE 'p' AND lang LIKE '$la_' ORDER BY data DESC LIMIT ".(($bl-1)*20).", 20", $mysql_link); $lf = mysql_num_rows($r); for($b=0; $b<$lf; $b++) { $it = @mysql_result($r, $b, "idt"); $da = @mysql_result($r, $b, "data"); $tz = @mysql_result($r, $b, "tytul"); $za = @mysql_result($r, $b, "zajawka"); $tr .= "
".$ms[date("n", $da)]."
".date("j", $da)."

$tz

$za
"; } $r = mysql_query("SELECT id FROM $b_bl WHERE status LIKE 'p' AND lang LIKE '$la_'", $mysql_link); $lf = mysql_num_rows($r); $ls = ceil($lf/20); if($ls>1) { $tr .= ""; } } else { $r = mysql_query("SELECT tytul,tresc,data FROM $b_bl WHERE idt LIKE '$bl' AND status LIKE 'p'", $mysql_link); $ty = @mysql_result($r, 0, "tytul"); $ty = ereg_replace("^ZZ", "Ż", $ty); if(!$ty) { header("Location:$do_"); exit(); } $tr = @mysql_result($r, 0, "tresc"); $da = @mysql_result($r, 0, "data"); $tr = "
".$ms[date("n", $da)]."
".date("j", $da)."
$tr"; } } else // wyszukiwarka { $ty = SZUKANA_FRAZA.": $qu"; $fr = mb_strtoupper($qu, "UTF-8"); $fr2 = mb_strtolower($qu,"UTF-8"); $r = mysql_query("SELECT tytul,idt FROM $b_st WHERE rodzaj LIKE 's' AND (tytul LIKE '%$fr%' OR tresc LIKE '%$fr%' OR tytul LIKE '%$fr2%' OR tresc LIKE '%$fr2%') AND tresc NOT LIKE '' AND lang LIKE '$la_' ORDER BY id DESC", $mysql_link); $lf = @mysql_num_rows($r); $rb = mysql_query("SELECT tytul,idt FROM $b_bl WHERE status LIKE 'p' AND (tytul LIKE '%$fr%' OR tresc LIKE '%$fr%' OR tytul LIKE '%$fr2%' OR tresc LIKE '%$fr2%') AND tresc NOT LIKE '' AND lang LIKE '$la_' ORDER BY id DESC", $mysql_link); $lb = @mysql_num_rows($rb); if(($lf+$lb)>0) { for($b=0; $b<$lb; $b++) { $te = mysql_result($rb, $b, "tytul"); $dt = mysql_result($rb, $b, "idt"); $tr .= "$te

"; } for($b=0; $b<$lf; $b++) { $te = mysql_result($r, $b, "tytul"); $dt = mysql_result($r, $b, "idt"); $tr .= "$te

"; } } else $tr .= BRAK_WYNIKOW; } // lightbox $tr = preg_replace('//i', '', $tr); $tr = preg_replace('//i', '', $tr); $tr = preg_replace('/([a-zA-z0-9 ]*)/i', '$1', $tr); $tr = preg_replace('/([a-zA-Z0-9:\/\.\-_% ]*)/i', '$1', $tr); $tr = preg_replace('/([a-zA-Z0-9:\/\.\-_% ]*)/i', '$1', $tr); $ti = " | $ty"; $r = mysql_query("SELECT tytul,tresc FROM $b_st WHERE rodzaj LIKE 'm' AND rodzic=1 AND lang LIKE '$la_' ORDER BY waga", $mysql_link); $lf = @mysql_num_rows($r); $tr = "

$ty

$tr
"; for($b=0; $b<$lf; $b++) { $ty = mysql_result($r, $b, "tytul"); $tc = mysql_result($r, $b, "tresc"); if(ereg("\.\.\.$", $ty)) { $tc = ereg_replace("

|

", "", $tc); $tc = ereg_replace("", "", $tc); $tr .= "
    $tc
"; } else { $ty = robtyt($ty); $tr .= "
$ty$tc
"; } } $tr .= "
"; } else { ($la_ == "p") ? $ms = array(1=>"stycznia", "lutego", "marca", "kwietnia", "maja", "czerwca", "lipca", "sierpnia", "września", "października", "listopada", "grudnia") : $ms = array(1=>"January", "February", "March", "April", "May", "June", "July", "August", "Septemper", "October", "November", "December"); $he_ .= "\n"; $fo_ .= "\n\n"; $r = mysql_query("SELECT tytul,id,tresc FROM $b_st WHERE rodzaj LIKE 'm' AND lang LIKE '$la_' ORDER BY waga", $mysql_link); $ty = robtyt(mysql_result($r, 0, "tytul")); $tc = mysql_result($r, 0, "tresc"); $tr .= "
$ty$tc
\n "; // slider $rs = mysql_query("SELECT * FROM $b_sl WHERE lang LIKE '$la_' ORDER BY id DESC", $mysql_link); $ls = @mysql_num_rows($rs); for($b=0; $b<$ls; $b++) { $im = mysql_result($rs, $b, "image"); $li = mysql_result($rs, $b, "link"); if(!$li) $li = "#"; $tr .= "\n \n \n"; } $tr .= "
\n
"; $lf = @mysql_num_rows($r); $po = 1; for($b=1; $b<$lf; $b++) { $ty = mysql_result($r, $b, "tytul"); $tc = mysql_result($r, $b, "tresc"); $ic = mysql_result($r, $b, "id"); if($ic==18 OR $ic==183) // aktualności { ($po==1) ? $cl = "mod12x" : $cl = "mod22x"; $tr .= "

".AKTUALNOSCI."

"; $ra = mysql_query("SELECT idt, tytul, data FROM $b_bl WHERE status LIKE 'p' AND lang LIKE '$la_' ORDER BY data DESC LIMIT 0, 6", $mysql_link); $la = mysql_num_rows($ra); if($la) { for($c=0; $c<$la; $c++) { $it = @mysql_result($ra, $c, "idt"); $da = @mysql_result($ra, $c, "data"); $tz = @mysql_result($ra, $c, "tytul"); if(!$c) $tr .= "
"; elseif($c==3) $tr .= "
"; $tr .= "$tz ".date("j", $da)." ".$ms[date("n", $da)]." ".date("Y", $da); } } else $tr .= "
"; $tr .= "
".CZYTAJ."
"; $po += 2; } else { ($po==1) ? $cl = "mod1" : $cl = "mod2"; // if($b>($lf-3)) $cl .= " h115"; if(ereg("\.\.\.$", $ty)) { $tc = ereg_replace("

|

", "", $tc); $tc = ereg_replace("", "", $tc); $tr .= "
    $tc
"; } else { $ty = robtyt($ty); $tr .= "
$ty$tc
"; } $po++; } if($po>3) $po=1; } for($a=$po; $a<=3; $a++) { // $tr .= "
"; } } // kontakt $r = mysql_query("SELECT tresc FROM $b_st WHERE id=6", $mysql_link); $ko_ = @mysql_result($r, 0, "tresc"); // menu $r = mysql_query("SELECT tytul,idt FROM $b_st WHERE rodzic=0 AND id!=6 AND lang LIKE '$la_' ORDER BY waga", $mysql_link); $lf = @mysql_num_rows($r); for($b=0; $b<$lf; $b++) { $te = mysql_result($r, $b, "tytul"); $it = mysql_result($r, $b, "idt"); (!$b) ? $me_ .= "
  • " : $me_ .= "
  • "; $me_ .= "$te
  • "; } ?> Militia Immaculatae | <? echo RNTO.$ti; ?>
    "; ?>
    Copyright 2012–".(date("Y"))." ".SERWIS; ?>