','_','x' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'','' ); $string=str_replace($zamien_co, $zamien_na, strtolower(strip_tags($string))); // $string = preg_replace('~[^\\pL0-9_]+~u', '_', $string); // substitutes anything but letters, numbers and '_' with separator // $string = iconv("utf-8", "us-ascii//TRANSLIT", trim($string, "_")); // TRANSLIT does the whole job // $string = preg_replace('~[^-a-z0-9_]+~', '', strtolower($string)); // keep only letters, numbers, '_' and separator $string = preg_replace('/(_){2,}/', '_', $string); return $string; } function modNAMEnoslash($string) { $string=trim($string); $zamien_co=array('ą','±','ć','ę','ł','ń','ó','ś','¶','ż','Ľ','ź','ˇ','Ć','Ę','Ł','Ń','Ó','Ś','¦','Ż','Ź','Ą','"',"'",'¬',':','(',')','{','}','[',']',' ',',','\\','*','®','?','@','=','+','!','^','$','%','&','~',':',';'); $zamien_na=array('a','a','c','e','l','n','o','s','s','z','z','z','a','c','e','l','n','o','s','_','z','z','a','' ,'' ,'_','' ,'' ,'' ,'' ,'' ,'_','_','-','_','x' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ); $string=str_replace($zamien_co, $zamien_na, strtolower(strip_tags($string))); // $string = preg_replace('~[^\\pL0-9_]+~u', '_', $string); // substitutes anything but letters, numbers and '_' with separator // $string = iconv("utf-8", "us-ascii//TRANSLIT", trim($string, "_")); // TRANSLIT does the whole job // $string = preg_replace('~[^-a-z0-9_]+~', '', strtolower($string)); // keep only letters, numbers, '_' and separator //$string = preg_replace('/(_){2,}/', '_', $string); return $string; } function string_filter_in($string) { $part1='&oa'; $part2='cute;'; $string=str_replace($part1.$part2,'ó',$string); $string=str_replace('

 

','',$string); if(!is_array($string))$string=addslashes($string);else $string=addslashes(implode($string)); return $string; } function string_filter_in_array() { for($i=0; $istring_filter_in($_POST[func_get_arg($i)]); } } function sfia() { for($i=0; $istring_filter_in($_POST[func_get_arg($i)]); } } function sfi($s,$specialchars=false) { if($specialchars==true) { return htmlspecialchars($this->string_filter_in($s)); } else { return $this->string_filter_in($s); } } function sfo($s,$specialchars=false) { if($specialchars==true) { return htmlspecialchars(stripslashes($s)); } else { return stripslashes($s); } } function sfot($s) { return htmlspecialchars(stripslashes($s)); } function ucfirst_pl($txt) { $txt=ucfirst($txt); $first=substr($txt,0,1); $rest=substr($txt,1,strlen($txt)); $zamien_co=array('ą','ć','ę','ł','ń','ó','ś','ż','ź'); $zamien_na=array('Ą','Ć','Ę','Ł','Ń','Ó','Ź','Ż','Ź'); $first=str_replace($zamien_co,$zamien_na,$first); return $first.$rest; } function lcfirst_pl($txt) { $first=substr($txt,0,1); $first=strtolower($first); $rest=substr($txt,1,strlen($txt)); $zamien_co=array('Ą','Ć','Ę','Ł','Ń','Ó','Ś','Ż','Ź'); $zamien_na=array('ą','ć','ę','ł','ń','ó','ś','ż','ź'); $first=str_replace($zamien_co,$zamien_na,$first); return $first.$rest; } function strtolower_pl($txt) { $zamien_co=array('Ą','Ć','Ę','Ł','Ń','Ó','Ś','Ż','Ź'); $zamien_na=array('ą','ć','ę','ł','ń','ó','ś','ż','ź'); return strtolower(str_replace($zamien_co,$zamien_na,$txt)); } function strtoupper_pl($txt) { $zamien_co=array('ą','ć','ę','ł','ń','ó','ś','ż','ź'); $zamien_na=array('Ą','Ć','Ę','Ł','Ń','Ó','Ś','Ż','Ź'); return strtoupper(str_replace($zamien_co,$zamien_na,$txt)); } function strip_multiple_br($tekst, $strip_end=true) { $tekst=preg_replace('/(<[bB][rR][ \/]{0,}>[\s]{0,}){3,}/', '

', $tekst); if($strip_end==true) $tekst=preg_replace('/(<[bB][rR][ \/]{0,}>[\s]{0,}){1,}$/', '', $tekst); return $tekst; } function strip_multiple_nl($tekst, $strip_end=true) { $tekst=preg_replace('/([\r\n]+\t*[\r\n]*){3,}/', "\n\n", $tekst); return trim($tekst); } function nl2br($txt) { return str_replace('\n',"
",$txt); } function post_filter() { if(count($_POST)>0) foreach($_POST as $key => $value) { if(!@is_array($value) && !strstr($key,'[]')) { $_POST[$key]=$this->sfi(trim($_POST[$key])); } } } function get2field($field, $no_special=false) { $t=trim(urldecode(stripslashes($_GET[$field]))); if($no_special==true) return $t; return htmlspecialchars($t); } function get2string($field) { return $this->get2field($field,true); } function transliterate($txt) { $chars = array( 'a' => 'a', 'ô' => 'o', 'I' => 'd', '?' => 'f', 'ë' => 'e', 'š' => 's', 'o' => 'o', 'ü' => 'ss', 'ă' => 'a', 'ř' => 'r', '?' => 't', 'ň' => 'n', 'a' => 'a', 'k' => 'k', 's' => 's', '?' => 'y', 'n' => 'n', 'ĺ' => 'l', 'h' => 'h', '?' => 'p', 'ó' => 'o', 'ú' => 'u', 'ě' => 'e', 'é' => 'e', 'ç' => 'c', '?' => 'w', 'c' => 'c', 'o' => 'o', '?' => 's', 'o' => 'o', 'g' => 'g', 't' => 't', '?' => 's', 'e' => 'e', 'c' => 'c', 'ś' => 's', 'î' => 'i', 'ű' => 'u', 'ć' => 'c', 'ę' => 'e', 'w' => 'w', '?' => 't', 'u' => 'u', 'i' => 'c', 'ö' => 'o', 'e' => 'e', 'y' => 'y', 'š' => 'a', 'ł' => 'l', 'u' => 'u', 'ů' => 'u', 'ż' => 's', 'g' => 'g', 'l' => 'l', 'f' => 'f', 'ž' => 'z', '?' => 'w', '?' => 'b', 'a' => 'a', 'i' => 'i', 'i' => 'i', '?' => 'd', 'ť' => 't', 'r' => 'r', 'ä' => 'a', 'í' => 'i', 'ŕ' => 'r', 'e' => 'e', 'ü' => 'u', 'o' => 'o', 'e' => 'e', 'n' => 'n', 'ń' => 'n', 'h' => 'h', 'g' => 'g', 'đ' => 'd', 'j' => 'j', 'y' => 'y', 'u' => 'u', 'u' => 'u', 'u' => 'u', 'ţ' => 't', 'ý' => 'y', 'ő' => 'o', 'â' => 'a', 'ž' => 'l', '?' => 'w', 'ż' => 'z', 'i' => 'i', 'a' => 'a', 'g' => 'g', '?' => 'm', 'o' => 'o', 'i' => 'i', 'u' => 'u', 'i' => 'i', 'ź' => 'z', 'á' => 'a', 'u' => 'u', '?' => 'th', '?' => 'dh', 'a' => 'a', 'ľ' => 'u', 'e' => 'e', ); return str_replace(array_keys($chars), array_values($chars), $txt); } function check_spam($content, $words) { $content=strip_tags($content); $zamien_co=array('"',"'",':',';','(',')','.',',','/','\\','*','?','@','=','!','^','$','%','&','_','-','+','|'); $zamien_na=array('' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ); $content=str_replace($zamien_co,$zamien_na,$content); $slowa='|'.str_replace(' ', '|', $words).'|'; $content_slowa = preg_split("/\s/", $content); if(count($content_slowa)>0) foreach($content_slowa as $slowo) { $slowo=trim($slowo); if(empty($slowo)) continue; if(stristr($slowa, '|'.$slowo.'|')) $matched_words[] = $slowo; } if(count($matched_words)==0) return array(); return $matched_words; } function make_urls($txt) { $patterns[0] = '/(http\:\/\/[^\s]+)/'; $patterns[1] = '/([\s])www\.([^\s]+)/'; // $replacements[0] = '$1'; // $replacements[1] = '$1www.$2'; $replacements[0] = '$1'; $replacements[1] = '$1www.$2'; if(@is_array($txt)) { return array( trim(preg_replace($patterns, $replacements, ' '.$txt[0].' ')), trim(preg_replace($patterns, $replacements, ' '.$txt[1].' ')) ); } else { return trim(preg_replace($patterns, $replacements, ' '.$txt.' ')); } } //addons function apply_read_addon($addon, $value) { global $CS; switch($addon) { case 'date': if($value==0) $value='-'; break; case 'to_null': if($value==0) $value=''; break; case 'to_upper': $value=$this->strtoupper_pl($value); break; case 'to_lower': $value=
Fatal error: Call to a member function modNAMEnoslash() on a non-object in /classes/route.php on line 17