czas_total*1000).', processing_time;desc="Time to process request at origin";dur=' . $dbReadTotalTime); header_remove("X-Robots-Tag"); header("X-Robots-Tag: index, follow"); ob_end_flush() ; $headers = headers_list(); $found = false; foreach ($headers as $h) { if (stripos($h, 'X-Robots-Tag') !== false && stripos($h, 'noindex') !== false) { $found = true; break; } } if ($found) { $log = "==== ".date('Y-m-d H:i:s')." ====\n"; $log .= "HEADERS:\n" . print_r($headers, true) . "\n"; $log .= "_GET:\n" . print_r($_GET, true) . "\n"; $log .= "_POST:\n" . print_r($_POST, true) . "\n"; $log .= "_COOKIE:\n" . print_r($_COOKIE, true) . "\n"; $log .= "_SESSION:\n" . print_r($_SESSION, true) . "\n"; $log .= "============================\n\n"; file_put_contents(__DIR__ . "/robots_debug.log", $log, FILE_APPEND); } }); ob_start("ob_gzhandler"); //if( $_SERVER['REMOTE_ADDR'] == '82.139.13.157' ) { include( 'engine/class.httpbl.php' ) ; /* $httpbl = new Httpbl('slophldcyakx') ; $httpbl->block( 'C' ) ; $httpbl->block( 'H' ) ; $httpbl->log_file( 'log/httpbl.txt' ) ; $httpbl->cache( 'engine/cache/httpbl' ) ; $httpbl->check() ; */ //} if( !in_array( $_GET['akcja'], array( 'koszyk', 'zamowienie_full' ))) { header( "X-Robots-Tag: googlebot: index" ) ; } include( 'engine/config.php' ) ; include( 'engine/funkcje.php' ) ; include( 'engine/mysql.php' ) ; include( 'engine/smarty/Smarty.class.php' ) ; include( 'engine/class.header.php' ) ; include( 'engine/seo.php' ) ; session_save_path( "./session" ) ; session_start() ; //print_r( $_SESSION ) ; /*setcookie( 'bask_cook', '', time()-336*3600, '/', '.tuszmarkt.pl') ; */ //print_r( unserialize($_COOKIE['bask_cook'] )) ; $baza = new CBaza() ; $baza->connect($db_host, $db_user, $db_pass, $db_db) ; if( $_SERVER['REMOTE_ADDR'] == '88.156.84.203' ) { $baza->debug = 1 ; //print_r( $_SERVER ) ; } function do_kolejki( $email, $rodzaj, $dane_json = '', $id_zam = 0, $temat = '', $tresc = '' ) { global $baza, $prefix, $config ; $dane_do_emaila = '' ; $json_decode = array() ; if( !empty( $dane_json )) { $json_decode = json_decode( $dane_json, true ) ; $dane_do_emaila = base64_encode( $dane_json ) ; } $generuj = 0 ; if( !empty( $id_zam )) $generuj = 1 ; $rodzaj = $baza->safe_string( $rodzaj ) ; $baza->query( "select * from ".$prefix."email_new where etyp = '$rodzaj'" ) ; $row = $baza->get_array() ; if( !empty( $temat )) $row['etytul'] = $temat ; $kolejka = array( 'email' => $email, 'temat' => $row['etytul'], 'tresc' => $tresc, 'id_zam' => $id_zam, 'id_szablonu' => $row['eid'], 'regulamin' => $row['eregulamin'], 'reply_to_email' => $json_decode['reply'], 'rodo' => $row['erodo'], 'generuj_pdf' => $generuj, 'dane_do_emaila' => $dane_do_emaila ) ; $baza->save( $prefix."kolejka_email", $kolejka, "not-imp" ) ; } if( preg_match( '/index.php\/index.php\?akcja\=mapa\&co\=kat/', $_SERVER['REQUEST_URI'] )) { header( "Location: https://www.tuszmarkt.pl/drukarki.html", true, 301 ) ; exit() ; } if( preg_match( '/index\.php\/index\.php/', $_SERVER['REQUEST_URI'] )) { $req_url = str_replace( '/index.php/index.php', '/index.php', $_SERVER['REQUEST_URI'] ); header( "Location: https://www.tuszmarkt.pl".$req_url ) ; exit() ; } if( preg_match( '/index\.php\//', $_SERVER['REQUEST_URI'] )) { $req_url = str_replace( '/index.php/', '/', $_SERVER['REQUEST_URI'] ); if( preg_match( '/subkat/', $req_url )) { preg_match( '/subkat([0-9]+)/', $req_url, $matches ) ; $id = $matches[1] + 0; $baza->query( "select url from ".$prefix."url where id_el = '$id' and typ_el = 'kat'" ) ; $row = $baza->get_array() ; $req_url = '/'.$row['url'] ; } header( "Location: https://www.tuszmarkt.pl".$req_url, true, 301 ) ; exit() ; } if( preg_match( '/.html/', $_SERVER['REQUEST_URI'] )) { $req_uri = $baza->safe_string( ltrim( $_SERVER['REQUEST_URI'], '/' )) ; if( preg_match( '/\?/', $req_uri )) { $req_uri = substr( $req_uri, 0, strpos( $req_uri, '?' ) ) ; } $baza->query( "select typ_el, id_el from ".$prefix."url where url = '$req_uri'" ) ; $row = $baza->get_array() ; if( !empty( $row )) { if( $row['typ_el'] == 'prod' ) { $_GET['akcja']="product"; $_GET['id'] = $row['id_el']; } elseif( $row['typ_el'] == 'kat' ) { $_GET['akcja'] = 'list'; $_GET['id'] = $row['id_el'] ; /* $baza->query( "select mp1 from ".$prefix."menu where mid = '".$row['id_el']."'" ) ; $row = $baza->get_array() ; $_GET['sid'] = $row['mp1'] ; */ } } } if( preg_match( '/opinie-o-sklepie/', $_SERVER['REQUEST_URI'] )) { $_GET['akcja'] = 'opinie_o_sklepie' ; } elseif( preg_match( '/napisz-opinie/', $_SERVER['REQUEST_URI'] )) { $_GET['akcja'] = 'napisz_opinie' ; } include( "modules/wejscia_tagi.php" ) ; if( @!eregi( $_SERVER['HTTP_HOST'], $_SERVER['HTTP_REFERER'] ) ) { include( "modules/wejscia.php" ) ; } /*if( empty( $_COOKIE['ab_ab'] )) { $random = rand(0,10) ; setcookie( "ab_ab", $random, time()+3600*24*31 ) ; } */ if( !empty( $_COOKIE['js_uniqid'] )) { $tr_uniq =$baza->safe_string( $_COOKIE['js_uniqid'] ); } else { $tr_uniq = uniqid() ; } setcookie( "js_uniqid", $tr_uniq, time()+3600*24*61, '/', 'www.tuszmarkt.pl', true ) ; if( !empty($_SESSION["kid"]) ) { if( $_GET['akcja'] == 'list' ) { $tracking_rodzaj = 'list' ; $tracking_item = $_GET['id'] + 0 ; } elseif( $_GET['akcja'] == 'product' ) { $tracking_rodzaj = 'item' ; $tracking_item = $_GET['id'] + 0 ; } $tracking_user = $_SESSION['kid'] ; if( !empty( $tracking_rodzaj )) $baza->Query( "insert into ".$prefix."tracking2 ( rodzaj, item, user, liczba ) values ( '$tracking_rodzaj', '$tracking_item', '$tracking_user', '1') on duplicate key update liczba = liczba +1 " ) ; } $tracking_u = array() ; $tracking_u['akcja'] = $_GET['akcja'] ; $tracking_u['id_akcji'] = $_GET['id'] ; $tracking_u['uniqid'] = $tr_uniq ; $tracking_u['email'] = $utm2['email'] ; //$tracking_u['klient'] = $_SESSION['kid'] ; $tracking_u['page'] = $_SERVER['REQUEST_URI'] ; if( !empty( $_REQUEST )) { $tracking_u['request'] = serialize( $_REQUEST ) ; } $baza->save( $prefix."sledzenie_uniqid", $tracking_u, 'not_imp', '0', 'delayed' ) ; if( !empty( $_GET['affil'] )) { setcookie( 'affil', 1, time() + 3600*24*30 ) ; } /* przekierowanie forum cdrinfo.pl */ if( !empty( $_GET['d'] )) { if( $_GET['id'] == 426 ) { header( "Location: /zamiennik-tonera-q2612a-czarny-hp-12a.html", true, 301 ) ; exit() ; } elseif( $_GET['id'] == 374 ) { header( "Location: /zamiennik-tonera-mlt-d111s-czarny-zamiennik.html ", true, 301 ) ; exit() ; } } if( $_GET['akcja'] == 'list' ) { $get_id = $_GET['id'] + 0 ; $baza->query( "select mp3 from ".$prefix."menu where mid = '$get_id'" ) ; $row = $baza->get_array() ; if( ($row['mp3'] > 0) && (!empty( $tr_uniq ) || !empty( $tr_uniq2 )) ) { $sledzenie_kat = array() ; $sledzenie_kat['id_elementu'] = $_GET['id'] + 0 ; $sledzenie_kat['data'] = date( 'Y-m-d' ) ; if( !empty( $tr_uniq2 )) { $tmpu2 = unserialize( encrypt_decrypt('decrypt', $tr_uniq2 )); $skledzenie_kat['uniqid'] = $tmpu2['email'] ; } else $skledzenie_kat['uniqid'] = $tr_uniq ; $baza->query( "insert into ".$prefix."sledzenie_kat ( id_elementu, data, uniqid ) values ( '".$sledzenie_kat['id_elementu']."', '".$sledzenie_kat['data']."', '".$skledzenie_kat['uniqid']."' ) on duplicate key update ts = now(), data = '".date( 'Y-m-d' )."'" ) ; $baza->query( "select id from ".$prefix."sledzenie_kat where uniqid = '".$skledzenie_kat['uniqid']."' order by id desc limit 9, 1" ) ; $row = $baza->get_array() ; if( !empty( $row['id'] )) { $baza->query( "delete from ".$prefix."sledzenie_kat where uniqid = '".$skledzenie_kat['uniqid']."' and id <= ".$row['id'] ) ; } } } include ( "modules/online.php" ) ; /* naliczanie koszyka */ function koszyk_stat_2025() { global $baza, $prefix ; $akcje = array( 1 => 'koszyk', 'checkout', 'zamow' ) ; foreach( $akcje as $i => $nazwa ) { if( $_GET['akcja'] == $nazwa ) { $data = date( 'Y-m-d' ) ; $empty = 0 ; $ip = $_SERVER['REMOTE_ADDR'] ; $krok1 = $krok2 = $krok3 = 0 ; switch( $i ) { case 1: $krok1 = 1 ; break ; case 2: $krok2 = 1 ; break ; case 3: $krok3 = 1 ; break ; } if( $krok1 == 1 && !empty( $_GET['empty'] )) { $empty = 1 ; } // $krok$i = 1 ; $baza->query( "insert ignore into ".$prefix."koszyk_stat ( data, ip, krok1, krok2, krok3, empty ) values ( '$data', '$ip', '$krok1', '$krok2', '$krok3', '$empty' ) on duplicate key update krok$i = krok$i + 1, empty = '$empty'" ) ; } } } koszyk_stat_2025() ; $page_header = new CHeader() ; if( $_SERVER['REMOTE_ADDR'] != '88.156.84.20311' ) { class PageController extends Smarty { function begin() { $this->template_dir='engine/szablony_2023' ; $this->compile_dir='engine/szablony_c_2023' ; $this->plugins_dir[]='engine/plugins' ; $this->cache_dir='engine/cache_2023' ; } } } else { class PageController extends Smarty { function begin() { $this->template_dir='engine/szablony_dev' ; $this->compile_dir='engine/szablony_c_dev' ; $this->plugins_dir[]='engine/plugins' ; $this->cache_dir='engine/cache_dev' ; } } } $tpl = new PageController ; $tpl->begin() ; $tpl->register_modifier('cena', 'cena_full_smarty'); $tpl->register_modifier('css_manuf', 'css_manuf'); $tpl->register_modifier('data_pl', 'data_pl'); $tpl->compile_check = true; // $tpl->caching = 1 ; $tpl->assign( 'isGoogle', 0 ) ; include( 'engine/class.google.php' ) ; $google = new GoogleBotChecker() ; if( $google->isGoogle( $_SERVER['REMOTE_ADDR'] )) { $tpl->assign( 'isGoogle', 1 ) ; } if( $_GET['akcja'] == 'product' || $_GET['akcja'] == 'list' ) { $logowanie_arr = array( 'akcja' => $baza->safe_string($_GET['akcja']), 'id' => $_GET['id']+0 ) ; $tpl->Assign( 'logowanie_arr', $logowanie_arr ) ; } $_GET['dd_key'] = get_url_var( 'key' ) ; if( !empty( $_GET['dd_key'] ) && ( $_GET['dd_key'] == 'darmowa-dostawa' ) ) { $_SESSION['pokaz_kod_dd'] = 1 ; } if( $_SERVER['SSL_PROTOCOL'] || ($_SERVER['HTTPS'] == "on") ) { $tpl->assign( 'https', 1 ) ; } $tpl->assign( 'filemtimestyle', filemtime( 'style2024.css' )); $uid = $baza->safe_string( $_SESSION['unikalny_id'] ) ; if( !empty( $uid )) { $baza->query( "select inpost_basket_key from ".$prefix."inpost_koszyk where uid = '$uid' order by id desc limit 1" ) ; $row_inpost_koszyk = $baza->get_array() ; $tpl->assign( 'inpost_basket_key', $row_inpost_koszyk['inpost_basket_key'] ) ; } // pobierz ustawienia sklepu $query = "select conf_nazwa, conf_wartosc from ".$prefix."config" ; $result = mysql_query( $query ) ; if( $result == false ) { die( 'config error' ) ; } while( $row = mysql_fetch_array( $result, MYSQL_ASSOC )) { $config[$row['conf_nazwa']] = $row['conf_wartosc'] ; } $config['adres'] = 'https://www.tuszmarkt.pl/' ; $config['adres_https'] = 'https://www.tuszmarkt.pl/' ; if( preg_match( '/inkdata/', $_SERVER['HTTP_HOST'] )) { $tpl->assign( 'inkdata', 1 ) ; $config['adres_https'] = 'https://www.inkdata.pl/' ; } elseif( preg_match( '/tusze24/', $_SERVER['SERVER_NAME'] )) { $tpl->assign( 'inkdata', 1 ) ; $config['adres_https'] = 'https://tusze24.pl/' ; } /* if( $_SERVER['SSL_PROTOCOL'] || ($_SERVER['HTTPS'] == "on") ) { $akcja = $_GET['akcja'] ; if( $akcja != "logowanie" && $akcja != 'platnosc' && $akcja != "password" && $akcja != "konto" && $akcja != "facebook" && $akcja != "register" && $akcja != 'rejestracja' && $akcja != "basket" && $akcja != "kod_prom" && $akcja != "zamowienie_full" && $akcja != "basket_old" && $akcja != "openid" && $akcja != "zamow" && $akcja != 'openid_login' && $akcja != 'przelewy24' && $akcja != 'przelewy24powtorz' && $akcja != 'przelewy24_2' && $akcja != 'paymento' && $akcja != 'karta' && $akcja != '' ) { // $url = str_replace( "https:", "http:", $_SERVER["SCRIPT_URI"] ) ; $url = "http://".$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"] ; if( $akcja == "szukaj" ) { $url .= '?akcja=szukaj&znajdz='.$_REQUEST['znajdz'].'&st='.$_REQUEST['st'].'&sf='.$_REQUEST['sf'] ; header( "Location: ".$url ) ; exit() ; } if( empty( $_SERVER['QUERY_STRING'] )) { header( "Location: ".$url ) ; exit() ; } else { header( "Location: ".$url."?".$_SERVER['QUERY_STRING'] ) ; exit() ; } } } */ $tpl->assign( 'adres_https', $config['adres_https'] ) ; // print_r( $_GET ) ; $akcja = $_GET['akcja'] ; if( !empty( $_SESSION['menu_in'] ) && ($akcja != 'product') ) { unset( $_SESSION['menu_in'] ) ; } if( empty( $akcja )) $pagetype = 'home' ; else { if( $akcja == 'product' ) $pagetype = 'product' ; elseif( $akcja == 'wyniki') $pagetype = 'searchresults' ; elseif( $akcja == 'list') $pagetype = 'category' ; elseif( $akcja == 'zamow' ) $pagetype = 'purchase' ; elseif( $akcja == 'basket' ) $pagetype = 'cart' ; else $pagetype = 'other' ; } function glowna_szukaj_typ( &$smarty ) { global $baza, $prefix ; $tab[0] = 'Wybierz rodzaj' ; $baza->query( "Select * from ".$prefix."menu where mp1 = 0 and maktywne = 1 and mid != 5273 and mid != 9713 and mid in ( 36, 48 ) order by mtekst" ) ; while( $row = $baza->get_array() ) { if( $row['mid'] == 11647 ) continue ; if( $row['mid'] == 8306 ) continue ; if( $row['mid'] == 1907 ) continue ; $tab[$row['mid']] = $row['mtekst'] ; } $smarty->assign( 'szukaj_typ', $tab ) ; } glowna_szukaj_typ( $tpl ) ; if( empty( $akcja )) { $page_header->setKeywords("tusze,tonery,tusze do drukarek,tonery do drukarek,zamienniki") ; $page_header->setDescription("Dostarczamy tusze i tonery do wszystkich drukarek w Polsce. Tylko u nas możesz liczyć na fachową pomoc oraz na dostawę w ciągu 24 godzin.", 0) ; $page_header->setTitle( 'Tusze do drukarek, tonery oraz zamienniki. ', 0 ) ; include( "modules/glowna.php" ) ; } elseif( $akcja == 'inpost_pay' ) { include( "modules/inpost_pay.php" ) ; } elseif( $akcja == 'faktura' ) { include( "modules/faktura.php" ) ; } elseif( $akcja == 'nowe_drukarki' ) { include( "modules/nowe_drukarki.php" ) ; } elseif( $akcja == 'nowe_tusze' ) { include( "modules/nowe_tusze.php" ) ; } elseif( $akcja == 'list' ) { include( "modules/list.php" ) ; } elseif( $akcja == 'opinia_zamowienie' ) { include( "modules/opinia_zamowienie.php" ) ; } elseif( $akcja == 'auth' ) { include( "modules/auth.php" ) ; } elseif( $akcja == 'producent' ) { include( "modules/producent.php" ) ; } elseif( $akcja == 'konto' ) { include( "modules/konto.php" ) ; } elseif( $akcja == 'news' ) { include( "modules/news.php" ) ; } elseif( $akcja == 'product' ) { $tpl->assign( 'google_prodid', (int)$_GET['id'] ) ; include( 'modules/product.php' ) ; } elseif( $akcja == 'item' ) { $_GET['id'] = $_GET['item'] + 0 ; $tpl->assign( 'google_prodid', (int)$_GET['id'] ) ; include( 'modules/product.php' ) ; } elseif( $akcja == 'doofinder' ) { include( 'modules/doofinder.php' ) ; } elseif( $akcja == 'basket' ) { include( 'modules/basket.php' ) ; } elseif( $akcja == 'koszyk' ) { include( 'modules/koszyk.php' ) ; } elseif( $akcja == 'blog' ) { include( 'modules/blog.php' ) ; } elseif( $akcja == 'basket_add' ) { include( 'modules/basket_add.php' ) ; } elseif( $akcja == "kategoria" ) { include( 'modules/kategoria.php' ) ; } elseif( $akcja == "drukarki" ) { include( 'modules/drukarki.php' ) ; } elseif( $akcja == "tusze" ) { include( 'modules/tusze.php' ) ; } elseif( $akcja == 'checkout' ) { include( 'modules/checkout.php' ) ; } elseif( $akcja == 'pytanie' ) { include( 'modules/pytanie.php' ) ; } elseif( $akcja == 'zadaj_pytanie' ) { include( 'modules/zadaj_pytanie.php' ) ; } elseif( $akcja == 'find-ink' ) { include( 'modules/find-ink.php' ) ; } elseif( $akcja == 'search' ) { include( 'modules/search.php' ) ; } elseif( $akcja == "webhook_twisto" ) { include( 'modules/webhook_twisto.php' ) ; } elseif( $akcja == 'opinie_o_sklepie' ) { include( 'modules/opinie_o_sklepie.php' ) ; } elseif( $akcja == 'napisz_opinie' ) { include( 'modules/napisz_opinie.php' ) ; } elseif( $akcja == 'facebook' ) { include( 'modules/facebook.php' ) ; } elseif( $akcja == 'wyniki' ) { include( 'modules/wyniki.php' ) ; } elseif( $akcja == 'wynik' ) { include( 'modules/wynik.php' ) ; } elseif( $akcja == 'ocen' ) { include( 'modules/ocen.php' ) ; } elseif( $akcja == 'txt' ) { include( 'modules/txt.php' ) ; } elseif( $akcja == 'logowanie' ) { include( 'modules/logowanie.php' ) ; } elseif( $akcja == 'rejestracja' ) { include( 'modules/rejestracja.php' ) ; } elseif( $akcja == 'przelewy24powtorz' ) { include( 'modules/przelewy24powtorz.php' ) ; } elseif( $akcja == 'rejestracja_compl' ) { include( 'modules/rejestracja_compl.php' ) ; } elseif( $akcja == 'logout' ) { include( 'modules/logout.php' ) ; } elseif( $akcja == 'openid_add' ) { include( 'modules/openid_add.php' ) ; } elseif( $akcja == 'openid_login' ) { include( 'modules/openid_login.php' ) ; } elseif( $akcja == 'password' ) { include( 'modules/password.php' ) ; } elseif( $akcja == 'zglos_blad' ) { include( 'modules/zglos_blad.php' ) ; } elseif( $akcja == "basket_allpay" ) { include( "modules/basket_allpay.php" ) ; } elseif( $akcja == "basket_platnosci" ) { include( "modules/basket_platnosci.php" ) ; } elseif( $akcja == 'statyczne' ) { include( "modules/statyczne.php" ) ; } elseif( $akcja == "zamow" ) { include( "modules/zamow.php" ) ; } elseif( $akcja == "januzi" ) { include( "modules/januzi.php" ) ; } elseif( $akcja == "zamowienie_full" ) { include( "modules/zamowienie_full.php" ) ; } elseif( $akcja == 'zmien_platnosc' ) { include( "modules/zmien_platnosc.php" ) ; } elseif( $akcja == 'platnosc' ) { include( "modules/platnosc.php" ) ; } elseif( $akcja == 'typ' ) { include( 'modules/typ.php' ) ; } elseif( $akcja == 'mapa' ) { include( 'modules/mapa.php' ) ; } elseif( $akcja == 'kontakt' ) { include( 'modules/kontakt.php' ) ; } elseif( $akcja == 'paymento' ) { include( 'modules/paymento.php' ) ; } elseif( $akcja == 'porady' ) { include( 'modules/porady.php' ) ; } elseif( $akcja == 'opinia' ) { include( 'modules/opinia.php' ) ; } elseif( $akcja == 'karta' ) { include( 'modules/karta.php' ) ; } elseif( $akcja == 'skup' ) { include( 'modules/skup.php' ) ; } elseif( $akcja == 'paczkomaty' ) { include( 'modules/paczkomaty.php' ) ; } elseif( $akcja == 'mail' ) { include( 'modules/mail.php' ) ; } elseif( $akcja == 'przelewy24' ) { include( 'modules/basket_przelewy.php' ) ; } elseif( $akcja == 'przelewy24new' ) { include( 'modules/przelewy24new.php' ) ; } elseif( $akcja == 'blik' ) { include( 'modules/blik.php' ) ; } elseif( $akcja == 'paypo' ) { include( 'modules/paypo.php' ) ; } elseif( $akcja == 'twisto' ) { include( 'modules/twisto.php' ) ; } elseif( $akcja == 'przelewy24_blik' ) { include( 'modules/przelewy24_blik.php' ) ; } elseif( $akcja == 'przelewy24status' ) { include( 'modules/przelewy24status.php' ) ; } elseif( $akcja == 'przelicz' ) { include( 'modules/przelicz.php' ) ; } elseif( $akcja == 'przelewy24_2' ) { include( 'modules/przelewy24.php' ) ; } elseif( $akcja == 'test' ) { include( 'modules/test.php' ) ; } $tpl->assign( 'google_pagetype', $pagetype ) ; /* elseif( $akcja == 'test' ) { include( 'send_mail.php' ) ; mail_przyjete_zamowienie( 'januzi@tlen.pl', 1000 ) ; } */ //if( $_SERVER['REMOTE_ADDR'] == '82.139.13.157' ) { //include( 'modules/tagi.php' ) ; // } if( $_SERVER['REMOTE_ADDR'] == '82.139.13.157' || $_SERVER['REMOTE_ADDR'] == '95.51.150.90 ' ) { /* $kod_prom['wartosc'] = 40 ; $kod_prom['typ'] = 'pln' ; $kod_prom['producent'] = 0 ; $_SESSION['kod_prom'] = serialize( $kod_prom ) ; */ // unset( $_SESSION['kod_prom'] ) ; //print_r( $_SESSION ) ; } //$page_header->addrss( 'rss.php', 'Nowe produkty' ) ; if( !empty( $_SESSION['kid'] ) && $_GET['akcja'] != 'checkout' ) { $page_header->addjavascript( 'js/collapse.js', 'defer' ) ; } $page_header->addcssdefer( 'producent.css' ) ; $main_template = 'index.tpl' ; if( !empty( $_SERVER['REQUEST_URI'] )) { $req = $_SERVER['REQUEST_URI'] ; if( $req != '/' && $req != '/index.php' && $req != '/index.php?l=1' && empty( $akcja ) && empty( $_GET['affil' ] ) && empty( $_GET['utm_source']) && empty( $_GET['gclid']) && empty( $_GET['gtm_debug']) && empty( $_GET['fbclid'] ) && empty( $_GET['f'] ) && empty( $_GET['register'] ) && empty( $_GET['l'] )) { header("HTTP/1.0 404 Not Found"); $main_template = 'index_404.tpl' ; $page_header->setTitle( 'Nie znaleziono', 0 ) ; $page_header->setDescription( 'Strona, której szukasz, znajduje się gdzieś indziej.', 1 ) ; } } $page_header->putHeader( $tpl ) ; if( $_SERVER['REMOTE_ADDR'] == '82.139.13.2141' ) echo $tpl->fetch( 'header_unpack.tpl' ) ; else echo $tpl->fetch( 'header.tpl' ) ; echo $tpl->fetch( $main_template ) ; //echo '' ; if( $_SERVER['REMOTE_ADDR'] == '88.156.84.2031' ) { // print_r( $_SESSION ) ; //print_r( $_SERVER['REQUEST_URI'] ); //print_r( $_GET ) ; $baza->close() ; error_reporting( E_ALL ) ; /* function get_host($ip){ $ptr= 'mkyquupsvazf.'.implode(".",array_reverse(explode(".",$ip))).".dnsbl.httpbl.org"; echo $ptr ; $host = dns_get_record($ptr); if ($host == null) return $ip; else return $host; } print_r( get_host( '116.40.230.18' )) ; */ } $dbReadEndTime = microtime(true); $dbReadTotalTime = ($dbReadEndTime - $dbReadStartTime)*1000; //$baza->close() ; //ob_end_flush() ; /* $dbReadEndTime2 = microtime(true); $dbReadTotalTime2 = ($dbReadEndTime2 - $dbReadStartTime)*1000; $plik = fopen( 'log/microtime.log', 'a' ) ; fwrite( $plik, ($dbReadEndTime2-$dbReadEndTime)."\r\n" ) ; fclose( $plik ) ; */ ?>