connect( $db_host, $db_user, $db_pass, $db_db ) ; //echo mysql_error() ; $baza->debug = 1; if( !empty( $_SESSION['user_id'] )){ $osoba = new CUser( $baza, $_SESSION['user_id'] ) ; } if( $_GET['akcja'] == 'lang' ) { $lang_id = $_GET['lang_id'] + 0 ; if( $lang_id == 0 ) $lang_id = 1 ; $_SESSION['lang_id'] = $lang_id ; header( "Location: index.php?lng=".$lang_id ) ; exit() ; } if( empty($_REQUEST['akcja']) && empty( $_REQUEST['mod'] ) && empty( $_REQUEST['mid'])) { $lang = $_GET['lng'] + 0 ; if( $lang == 0 ) $lang = 1 ; $baza->query( "select g.menu, m.mtekst from glowna as g inner join menu as m on m.mid = g.menu where jezyk = '$lang'" ) ; $row = $baza->get_array() ; $url = "index.php?mid=".$row['menu']."&lng=".$lang ; $url = $lang.'_'.$row['menu'].'_'.mod_rewrite( $row['mtekst'] ).'.html' ; header( "Location: ".$url ) ; exit() ; } $baza->query( "Select * from ustawienia" ) ; while( $row = $baza->get_array() ) { $config[$row['nazwa']] = $row['wartosc'] ; } $class_menu = new cMenu( $_GET['lng'] ) ; //print_r( $config ) ; //exit() ; $webpage = 'szablony/index_layout.tpl' ; if( $ver[0] == 5 ) { include( 'system/includes/index5.php' ) ; } else { include( 'system/includes/index4.php' ) ; } if( !empty( $_GET['mid'] )) { $mid = $_GET['mid'] + 0 ; $baza->query( "insert into menu_wejscia ( mid, liczba ) values ( '$mid', '1') on duplicate key update liczba = liczba + 1" ) ; } /* if( $_SERVER['REMOTE_ADDR'] == '82.139.13.157' ) { error_reporting( E_ALL ) ; echo 'jest' ; include( 'plugins/function.infoboks.php' ) ; echo 'aaa'.smarty_function_infoboks( $params, $kontroler ).'bbb' ; } */ //echo $baza->sqlq ; //$baza->close() ; //echo $baza->sqlq ; //phpinfo() ; function list_system_locales(){ ob_start(); system('locale -a'); $str = ob_get_contents(); ob_end_clean(); return split("\\n", trim($str)); } //print_r( list_system_locales() ) ; ob_end_flush() ; ?>