header('Content-Type: text/html; charset=iso-8859-2');
ini_set("session.use_trans_sid",0);
session_start();
ob_start();
//przekierownaie 301
if ($_SERVER['HTTP_HOST']=='www.tema.home.pl' || $_SERVER['HTTP_HOST']=='tema.home.pl'){
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.tema.bialystok.pl" );
}
// ustalenie nawigacji, zabezpieczenie oglądania elementów strony osobno
$all='tema#1*1#amet';
include('./funkcje/bde01.php');
$browse = !empty($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : $_ENV['HTTP_USER_AGENT'];
if( preg_match('/(bot|crawl|infoseek|inktomi|frooglebot|google|gooru|msnbot|alexa|alltheweb|alkaline|almaden.ibm.com|appie|arachnophilia|aretha|architext|ask|jeeves|askjeeves|asterias|augurfind|auresys|backrub|bdcindexer|bigbrother|bjaaland|blackwidow|blindekuh|bloodhound|bobby|boris|brightnet|cassandra|cgireader|churl|cmc|collective|combine|core|cosmos|cruiser|cusco|cyberspyder|deweb|digger|digout4u|directhit|docomo|download_express|dwcp|ebiness|echo|e-collector|eit|emacs|esther|evliyacelebi|ezresult|fdse|felix|ferret|fetchrover|fido|finnish|fireball|fouineur|francoroute|funnelweb|gama|gazz|gcreep|geturl|golem|grapnel|griffon|gromit|gulliver|harvest|havindex|holmes|hometown|htdig|htmlgobble|hyperdecontextualizer|ia_archiver|ibm|iconoclast|ilse|imagelock|incywincy|informant|intelliagent|internetseer|iron33|javabee|jeeves|jobo|jubii|jumpstation|justview|katipo|kdd|kilroy|kit_fireball|labelgrabber.txt|lachesis|larbin|legs|linkchecker|linkidator|linkscan|linkwalker|lockon|lycos|magpie|mantraagent|marvin|mattie|mediafox|mercator|merzscope|meshexplorer|mixcat|moget|monster|motor|muscatferret|myweb|ncsa|nederland.zoek|netcarta|netcraft|netmechanic|netoskop|netscoop|netsprint|newscan-online|nhse|nomad|northstar|nzexplorer|occam|octopus|onet|openfind|osis-project|packrat|pageboy|parasite|patric|pegasus|perignator|perman|petersnews|phantom|piltdownman|pimptrain|pioneer|pitkow|plumtreewebaccessor|portalb|raven|rbse|redalert|rhcs|roadrunner|robbie|robi|robofox|robozilla|rules|scooter|search|senrigan|seventwentyfour|sgscout|shaggy|sidewinder|sleek|slurp|steeler|szukacz|t-h-u-n-d-e-r-s-t-o-n-e|teoma|tkwww|turnitin|ultraseek|urlck|vagabondo|yahoo|valkyrie|webquest|wisenutbot)/i', $browse )){
$blnRobot = '1';
} else {
$blnRobot = '0';
}
if($blnRobot=='1'){
ini_set("url_rewriter.tags", "");
$go=explode(",",$_SERVER['QUERY_STRING']);
} else {
ini_set("arg_separator.output","&");
$go=explode(",",$_SERVER['QUERY_STRING']);
$testtp1=count($go);
for($i=0;$i<$testtp1;$i++) {
$testtp=explode('&',$go[$i]);
$go[$i]=$testtp[0];
}
}
$go[0]=AddSlashes(strip_tags($go[0]));
$go[1]=AddSlashes(strip_tags($go[1]));
//wejście do bazy
$link = mysql_connect($db_conect, $db_user, $db_pass)
or die ("Error");
mysql_select_db ($db) or die ("Error");
// wczytanie topu, metatagów
$query = 'SELECT tpl FROM seo';
$result = mysql_query ($query) or die ("Error");
while ($line = mysql_fetch_array($result)) {$metatop=''.trim(wordwrap(htmlspecialchars(StripSlashes($line[0])),50, ' ',1)).'';}
// procedura zabezpieczenia przed kopiowaniem strony
if (eregi("WebReaper",$HTTP_USER_AGENT)) {
exit;
}
elseif (eregi("WebCopier",$HTTP_USER_AGENT)) {
exit;
}
elseif (eregi("Offlin",$HTTP_USER_AGENT)) {
exit;
}
elseif (eregi("Gozil",$HTTP_USER_AGENT)) {
exit;
}
elseif (eregi("Teleport",$HTTP_USER_AGENT)) {
exit;
}
elseif (eregi("WebStri",$HTTP_USER_AGENT)) {
exit;
}
elseif (eregi("HTTrack",$HTTP_USER_AGENT)) {
exit;
}
elseif (eregi("WebZIP",$HTTP_USER_AGENT)) {
exit;
}
if($go[0]==''){$go[0]='0';}
//producenci
if($go[1]==''){$go[1]='0';}
$jest=0;
$dostepnefoto=$dostepnezal='';
$query = 'SELECT k.kID, k.title, k.opis, k.k1ID, k.k2ID, k.k3ID, p.title, p.pID FROM kat AS k, prod AS p WHERE k.kID=\''.$go[0].'\' AND k.pID=p.pID AND k.akt=1 ORDER BY k.kID';
$result = mysql_query ($query) or die ("Error");
while ($line = mysql_fetch_array($result)) {
$jest=1;
$kID=StripSlashes($line[0]);
$title=StripSlashes($line[1]);
$title=wordwrap(StripSlashes($title),50,' ',1);
$opis=preg_replace('/[\n\r\t]/', '
', $line[2]);
$opis=nl2br($opis);
$opis=str_replace('
','
', $opis);
$opis=str_replace('
',' ', $opis);
$opis=str_replace(' ',' ', $opis);
$opis=str_replace(' ',' ', $opis);
$opis=str_replace(' ',' ', $opis);
$opis=str_replace(' ',' ', $opis);
$opis=StripSlashes($opis);
$opis=wordwrap(StripSlashes($opis),50,' ',1);
$opis=podmiana($opis);
$description=$opis;
$opis='';
$k1ID = StripSlashes($line[3]);
$k2ID = StripSlashes($line[4]);
$k3ID = StripSlashes($line[5]);
$producent = StripSlashes($line[6]);
$pID = StripSlashes($line[7]);
$querygaleria = 'SELECT fID, img FROM katf WHERE fID=\''.$go[1].'\' AND kID=\''.$kID.'\' ORDER BY kID';
$resultgaleria = mysql_query ($querygaleria) or die ("Error");
$i=0;
while ($linegaleria = mysql_fetch_array($resultgaleria)) {
$fIDfot = StripSlashes($linegaleria[0]);
$imgfot = StripSlashes($linegaleria[1]);
$i=1;
$imgbig='';
}
}
?>
echo $metatop; ?> | |
if ($jest==0){echo 'KatalogTen produkt zaostał usuniety z naszej bazy';}else{include('./moduly/t02.php');echo '';} if ($i==0){echo ' To zdjęcie zostało usuniete z naszej bazy';} ?> |
|
include('./plstopka.php'); ?> |