licznik($_SESSION['works']); //$c_il->zapisz_kto('system/agenci.txt',$_SESSION['works']); $_SESSION['works'] = 1; function einf($tresc) { if($tresc == '') { return FALSE; } $odp = '
'; $odp .= $tresc; $odp .= '
'; return $odp; } function eerr($tresc) { if($tresc == '') { return FALSE; } $odp = '
'; $odp .= $tresc; $odp .= '
'; return $odp; } function top($tresc) { //$tresc = iconv("utf-8", "utf-8", $tresc); //$tresc = strtr($tresc, 'ĘÓĄŚŁŻŹĆŃęóąśłżźćń', 'EOASLZZCNeoaslzzcn'); $tresc = str_replace(array('Ą','Ć','Ę','Ł','Ó','Ń','Ż','Ź','Ś','ą','ć','ę','ł','ó','ń','ż','ź','ś'), array('A','C','E','L','O','N','Z','Z','S','a','c','e','l','o','n','z','z','s'), $tresc); $tresc = strtolower($tresc); //$tresc = normaliza($tresc); $i=0; while($i < strlen($tresc)) { //if(! ereg("^[0-9a-zA-Z]$", $tresc[$i])) if(! preg_match('/^[0-9a-zA-Z]$/i', $tresc[$i])) { $tresc[$i] = '_'; } $i++; } while($tresc != ($tmp = str_replace('__', '_', $tresc))) { $tresc = $tmp; }; $tresc = substr($tresc, 0, 64); return $tresc; } function strona($id) { $baza = new C_BAZA('strony'); $sql= "SELECT * FROM `strony` where link = '{$id}' limit 1"; $baza->zapytaj($sql); if($baza->odpowiedz()) return $baza->v['tresc']; else return ''; } function simpleCounter( ){ $counter = 'system/counter.php'; if( is_file( $counter )){ $aFile = file( $counter ); if( isset( $aFile[1] ) && !empty( $aFile[1] ) ){ //echo $aFile[1]; $aExp = explode( '$', $aFile[1] ); $sDate = date( 'Y-m-d' ); $aVisits[0] = $aExp[0]; $aVisits[1] = ( !empty( $aExp[2] ) && $aExp[2] == $sDate ) ? $aExp[1] : 0; // echo $aVisits[1]; } if( !isset( $_SESSION['bSimpleCounter'] ) ){ $sSave = '