1){ini_set("session.cookie_domain", $config['domain']);} session_start(); if(!empty($_SERVER['REQUEST_URI']) && strstr($_SERVER['REQUEST_URI'], 'http://') !== false){die('STOP BOT');} //function podaj_czas(){list($usec, $sec) = explode(" ", microtime());return ((float)$usec + (float)$sec);}$na_poczatku = podaj_czas(); $time_start = microtime(true); //echo $_SERVER['REQUEST_URI']; include('./config.php'); include('./lang_'.$config['lang'].'.php'); include('./function.php'); require_once('./smarty/Smarty.class.php'); $smarty = new Smarty; //$smarty->debugging = true; $smarty->template_dir = './'.$config['template'].'/'; $smarty->compile_dir = './temp/templates_c/'; $smarty->config_dir = './temp/configs/'; $smarty->cache_dir = './temp/cache/'; //połaczenie z mysql $sql_conn=@mysql_connect($db['host'], $db['user'], $db['pass'])or die('DB Error: '.mysql_error());mysql_select_db($db['name']);unset($db); mysql_query('SET NAMES "utf8"'); if(preg_match('/index\.php/i',$_SERVER['REQUEST_URI'],$zz)) { if(!empty($_GET['idmenu'])){$Z['idmenu']=$_GET['idmenu'];} if(!empty($_GET['module'])){$Z['module']=$_GET['module'];} if(!empty($_GET['action'])){$Z['action']=$_GET['action'];} } else{ if(preg_match('/^((.*)\-'.$config['id_name'].'([0-9\_]+))\.html$/i',$_GET['p'],$zz)){$Z['id']=$zz[3];$Z['name']=$zz[2]; $Z['idmenu']=$config['idmenu'];} else if(preg_match('/^('.$config['page_name'].'-([0-9\_]+))\.html$/i',$_GET['p'],$zz)){$Z['idmenu']=$config['idmenu']; $_GET['page']=$zz[2];} else if(preg_match('/^(.*)\-'.$config['tag_name'].'-([0-9\_]+)\.html$/i',$_GET['p'],$zz)){$Z['idmenu']=$config['idmenu']; $Z['tag']=$zz[1];$_GET['page']=$zz[2];} else if(preg_match('/^(.*)\-'.$config['tag_name'].'\.html$/i',$_GET['p'],$zz)){$Z['idmenu']=$config['idmenu']; $Z['tag']=$zz[1];} else if(preg_match('/^(.*)\.html$/i',$_GET['p'],$zz)){$Z['idmenu']=search_menu_id($zz[1]);} //else if(preg_match('/^(.*)-([0-9\_]+)\.xml$/i',$_GET['p'],$zz)){$Z['idmenu']=search_menu_id($zz[1]);} else if(empty($_GET['p'])){$Z['idmenu']=$config['idmenu'];} //else if(!empty($_GET['p'])){$err=404;} $Z['module']=$menu[$Z['idmenu']]['module']; $Z['action']=$menu[$Z['idmenu']]['action']; } if(preg_match('/^(sitemap|sitemap-([0-9\_]+))\.xml$/i',$_GET['p'],$zz)){$Z['module']='sitemap'; $_GET['page']=$zz[2];} //sprawdzamy czy jestes zalogowany if(($_SESSION['usersession']>0)&&($u[$_SESSION['usersession']]['id']==$_SESSION['usersession'])) { $user=$u[$_SESSION['usersession']]; } //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// if((is_file('./module/'.$Z['module'].'/index.php')) && ($Z['module']) ) { if(!empty($Z['action'])){include('./module/'.$Z['module'].'/'.$Z['action'].'.php');} else{include('./module/'.$Z['module'].'/index.php');} }else{$err=404;} //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// if(($config['adult']==1)||($menu[$Z['idmenu']]['adult']==1)){$config['meta'].=''; }if($config['stats']==1){$stats='';}else{unset($stats);} if($err==404){if(!empty($config['404'])){ if($config['404']=='301'){header("HTTP/1.1 301 Moved Permanently"); header("Location: ".$config['site_url']); header("Connection: close"); exit;}else{if(is_file($config['404'])){include($config['404']); die();}}} $tpl='404'; $config['menu_l']=0;$config['menu_r']=0;$config['site_title']='404'; $my_cache_id='404'; $path_nav[]='404'; header("HTTP/1.0 404 Not Found"); } $index= array('action'=>$action, 'page'=>page(), 'online_stats'=>online_stats(), //'path_nav'=>path_nav($Z['idmenu'],$Z['idcat'],$path_nav), 'id'=>$Z['id'], 'tpl'=>$tpl.'.tpl', 'msg'=>$msg); //echo $smarty->assign('c','art'); //echo $smarty->fetch('foto.tpl'); // $data['title']='dfdsfdsfds fs f Żdsf s'; // echo 'cc'. preg_match('/(ż|Ż|ź|Ź|ć|Ć|ł|Ł|ó|Ó|ń|Ń|ą|Ą|ę|Ę|ś|Ś)/',$data['title']); $smarty->assign('user', $user); $smarty->assign('lang', $lang); //lang $smarty->assign('config', $config); $smarty->assign('index', $index); $smarty->display('index.tpl',$my_cache_id); if((!empty($Z['keyword']))&&($ile==1)&&(preg_match('/(ż|Ż|ź|Ź|ć|Ć|ł|Ł|ó|Ó|ń|Ń|ą|Ą|ę|Ę|ś|Ś)/',$data[0]['title'].$data[0]['keywords'].$data[0]['text']))) { include('sciagacz_zdjec.php'); if($user['rank']>8){ echo' [PL ok] '; } }//else{echo' nie pl '.$data[0]['title'].$data[0]['keywords'].$data[0]['text'];} if($user['rank']>8){echo' Ściągaj manualnie ';} mysql_close($sql_conn); if($user['rank']==10){$time_end = microtime(true); echo ($time_end - $time_start);} ?>