=$hany) return $val; while(strlen($val)<$hany) $val='0'.$val; return $val; } function convALNUM($str,$allow='') { // v2.0 // letisztítja a beérkező szöveget alfanumerikus karakterekre $eng='aAáÁbBcCdDeEéÉfFgHhGiIíÍjJkKlLmMnNoOóÓöÖőŐpPqQrRsStTuUúÚüÜűŰvVwWxXyYzZ'.$allow; $ns=''; $c=strlen($eng); $r=array(); for ($o=0;$o<$c;$o++) $r[]=$eng{$o}; for ($i=0;$i$max) $backstep=$max; $tmp=substr($base,0,8); $rev=strrev(substr($base,8)); for ($i=0;$i<=$backstep;$i++) { $rev=substr($rev,strpos($rev,'/')+1); } $res=$tmp.strrev($rev).'/'.$urllink; } } return trim($res); } function utf8($str) { #dekódolja az UTF-8 karaktereket ISO-8859-2 -re $str=str_replace(chr(0xC3).chr(0x80) ,'Á',$str); $str=str_replace(chr(0xC3).chr(0x80) ,'Á',$str); $str=str_replace(chr(0xC3).chr(0x81) ,'Á',$str); $str=str_replace(chr(0xC3).chr(0x82) ,'Á',$str); $str=str_replace(chr(0xC3).chr(0x83) ,'Á',$str); $str=str_replace(chr(0xC3).chr(0x84) ,'Á',$str); $str=str_replace(chr(0xC3).chr(0x85) ,'Á',$str); $str=str_replace(chr(0xC3).chr(0x88) ,'É',$str); $str=str_replace(chr(0xC3).chr(0x89) ,'É',$str); $str=str_replace(chr(0xC3).chr(0x8A) ,'É',$str); $str=str_replace(chr(0xC3).chr(0x8B) ,'É',$str); $str=str_replace(chr(0xC3).chr(0x8C) ,'Í',$str); $str=str_replace(chr(0xC3).chr(0x8D) ,'Í',$str); $str=str_replace(chr(0xC3).chr(0x8E) ,'Í',$str); $str=str_replace(chr(0xC3).chr(0x8F) ,'Í',$str); $str=str_replace(chr(0xC3).chr(0x92) ,'Ó',$str); $str=str_replace(chr(0xC3).chr(0x93) ,'Ó',$str); $str=str_replace(chr(0xC3).chr(0x94) ,'Ó',$str); $str=str_replace(chr(0xC3).chr(0x95) ,'Ő',$str); $str=str_replace(chr(0xC3).chr(0x96) ,'Ö',$str); $str=str_replace(chr(0xC3).chr(0x99) ,'Ú',$str); $str=str_replace(chr(0xC3).chr(0x9A) ,'Ú',$str); $str=str_replace(chr(0xC3).chr(0x9B) ,'Ű',$str); $str=str_replace(chr(0xC3).chr(0x9C) ,'Ü',$str); $str=str_replace(chr(0xC3).chr(0xA0) ,'á',$str); $str=str_replace(chr(0xC3).chr(0xA1) ,'á',$str); $str=str_replace(chr(0xC3).chr(0xA2) ,'á',$str); $str=str_replace(chr(0xC3).chr(0xA3) ,'á',$str); $str=str_replace(chr(0xC3).chr(0xA4) ,'á',$str); $str=str_replace(chr(0xC3).chr(0xA5) ,'á',$str); $str=str_replace(chr(0xC3).chr(0xA8) ,'é',$str); $str=str_replace(chr(0xC3).chr(0xA9) ,'é',$str); $str=str_replace(chr(0xC3).chr(0xAA) ,'é',$str); $str=str_replace(chr(0xC3).chr(0xAB) ,'é',$str); $str=str_replace(chr(0xC3).chr(0xAC) ,'í',$str); $str=str_replace(chr(0xC3).chr(0xAD) ,'í',$str); $str=str_replace(chr(0xC3).chr(0xAE) ,'í',$str); $str=str_replace(chr(0xC3).chr(0xAF) ,'í',$str); $str=str_replace(chr(0xC3).chr(0xB2) ,'ó',$str); $str=str_replace(chr(0xC3).chr(0xB3) ,'ó',$str); $str=str_replace(chr(0xC3).chr(0xB4) ,'ő',$str); $str=str_replace(chr(0xC3).chr(0xB5) ,'ő',$str); $str=str_replace(chr(0xC3).chr(0xB6) ,'ö',$str); $str=str_replace(chr(0xC3).chr(0xB9) ,'ú',$str); $str=str_replace(chr(0xC3).chr(0xBA) ,'ú',$str); $str=str_replace(chr(0xC3).chr(0xBB) ,'ű',$str); $str=str_replace(chr(0xC3).chr(0xBC) ,'ü',$str); $str=str_replace(chr(0xC4).chr(0x80) ,'Á',$str); $str=str_replace(chr(0xC4).chr(0x81) ,'á',$str); $str=str_replace(chr(0xC4).chr(0x82) ,'Á',$str); $str=str_replace(chr(0xC4).chr(0x83) ,'á',$str); $str=str_replace(chr(0xC4).chr(0x84) ,'Á',$str); $str=str_replace(chr(0xC4).chr(0x85) ,'á',$str); $str=str_replace(chr(0xC4).chr(0x92) ,'É',$str); $str=str_replace(chr(0xC4).chr(0x93) ,'é',$str); $str=str_replace(chr(0xC4).chr(0x94) ,'É',$str); $str=str_replace(chr(0xC4).chr(0x95) ,'é',$str); $str=str_replace(chr(0xC4).chr(0x96) ,'É',$str); $str=str_replace(chr(0xC4).chr(0x97) ,'é',$str); $str=str_replace(chr(0xC4).chr(0x98) ,'É',$str); $str=str_replace(chr(0xC4).chr(0x99) ,'é',$str); $str=str_replace(chr(0xC4).chr(0x9A) ,'É',$str); $str=str_replace(chr(0xC4).chr(0x9B) ,'é',$str); $str=str_replace(chr(0xC4).chr(0xA8) ,'Í',$str); $str=str_replace(chr(0xC4).chr(0xA9) ,'í',$str); $str=str_replace(chr(0xC4).chr(0xAA) ,'Í',$str); $str=str_replace(chr(0xC4).chr(0xAB) ,'í',$str); $str=str_replace(chr(0xC4).chr(0xAC) ,'Í',$str); $str=str_replace(chr(0xC4).chr(0xAD) ,'í',$str); $str=str_replace(chr(0xC4).chr(0xAE) ,'Í',$str); $str=str_replace(chr(0xC4).chr(0xAF) ,'í',$str); $str=str_replace(chr(0xC4).chr(0xB0) ,'Í',$str); $str=str_replace(chr(0xC4).chr(0xB1) ,'í',$str); $str=str_replace(chr(0xC5).chr(0x8C) ,'Ö',$str); $str=str_replace(chr(0xC5).chr(0x8D) ,'ö',$str); $str=str_replace(chr(0xC5).chr(0x8E) ,'Ő',$str); $str=str_replace(chr(0xC5).chr(0x8F) ,'ő',$str); $str=str_replace(chr(0xC5).chr(0x90) ,'Ő',$str); $str=str_replace(chr(0xC5).chr(0x91) ,'ő',$str); $str=str_replace(chr(0xC5).chr(0xA8) ,'Ű',$str); $str=str_replace(chr(0xC5).chr(0xA9) ,'ű',$str); $str=str_replace(chr(0xC5).chr(0xAA) ,'Ü',$str); $str=str_replace(chr(0xC5).chr(0xAB) ,'ü',$str); $str=str_replace(chr(0xC5).chr(0xAC) ,'Ű',$str); $str=str_replace(chr(0xC5).chr(0xAD) ,'ű',$str); $str=str_replace(chr(0xC5).chr(0xAE) ,'Ű',$str); $str=str_replace(chr(0xC5).chr(0xAF) ,'ű',$str); $str=str_replace(chr(0xC5).chr(0xB0) ,'Ű',$str); $str=str_replace(chr(0xC5).chr(0xB1) ,'ű',$str); $str=str_replace(chr(0xC5).chr(0xB2) ,'U',$str); $str=str_replace(chr(0xC5).chr(0xB3) ,'u',$str); $str=str_replace(chr(0xC2).chr(0xAD),'',$str); $str=str_replace(chr(0xC2).chr(0xA9),'',$str); $str=str_replace(chr(0xC2).chr(0xAE),'',$str); $str=str_replace(chr(0xC2).chr(0xA0),' ',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x88),' ',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x90),'-',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x91),'-',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x92),'-',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x93),'-',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x94),'-',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x95),'-',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x98),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x99),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x9A),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x9B),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x9C),'"',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x9D),'"',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x9E),'"',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0x9F),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xA4),'.',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xA5),'..',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xA6),'...',$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xB2),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xB3),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xB4),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xB3),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xB5),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xB6),"'",$str); $str=str_replace(chr(0xE2).chr(0x80).chr(0xB7),"'",$str); return $str; } function cleanENTITY($str) { #a HTML entitásokat visszaadja ékezetes magyar karakterként $str=str_replace('&' ,'&',$str); $str=str_replace('À' ,'Á',$str); $str=str_replace('À' ,'Á',$str); $str=str_replace('Á' ,'Á',$str); $str=str_replace('Á' ,'Á',$str); $str=str_replace('Â' ,'Á',$str); $str=str_replace('Â' ,'Á',$str); $str=str_replace('Ã' ,'Á',$str); $str=str_replace('Ã' ,'Á',$str); $str=str_replace('Ä' ,'Á',$str); $str=str_replace('Å' ,'Á',$str); $str=str_replace('È' ,'É',$str); $str=str_replace('È' ,'É',$str); $str=str_replace('É' ,'É',$str); $str=str_replace('É' ,'É',$str); $str=str_replace('Ê' ,'É',$str); $str=str_replace('Ê' ,'É',$str); $str=str_replace('Ë' ,'É',$str); $str=str_replace('Ë' ,'É',$str); $str=str_replace('Ì' ,'Í',$str); $str=str_replace('Ì' ,'Í',$str); $str=str_replace('Í' ,'Í',$str); $str=str_replace('Í' ,'Í',$str); $str=str_replace('Î' ,'Í',$str); $str=str_replace('Î' ,'Í',$str); $str=str_replace('Î' ,'Í',$str); $str=str_replace('Ï' ,'Í',$str); $str=str_replace('Ò' ,'Ó',$str); $str=str_replace('Ò' ,'Ó',$str); $str=str_replace('Ó' ,'Ó',$str); $str=str_replace('Ó' ,'Ó',$str); $str=str_replace('Ô' ,'Ó',$str); $str=str_replace('Ô' ,'Ó',$str); $str=str_replace('Õ' ,'Ő',$str); $str=str_replace('Õ' ,'Ő',$str); $str=str_replace('Ö' ,'Ö',$str); $str=str_replace('Ö' ,'Ö',$str); $str=str_replace('Ù' ,'Ú',$str); $str=str_replace('Ù' ,'Ú',$str); $str=str_replace('Ú' ,'Ú',$str); $str=str_replace('Ú' ,'Ú',$str); $str=str_replace('Û' ,'Ü',$str); $str=str_replace('Û' ,'Ü',$str); $str=str_replace('Ü' ,'Ü',$str); $str=str_replace('Ü' ,'Ü',$str); $str=str_replace('à' ,'á',$str); $str=str_replace('à' ,'á',$str); $str=str_replace('á' ,'á',$str); $str=str_replace('á' ,'á',$str); $str=str_replace('â' ,'á',$str); $str=str_replace('â' ,'á',$str); $str=str_replace('ã' ,'á',$str); $str=str_replace('ã' ,'á',$str); $str=str_replace('ä' ,'á',$str); $str=str_replace('ä' ,'á',$str); $str=str_replace('å' ,'á',$str); $str=str_replace('å' ,'á',$str); $str=str_replace('è' ,'é',$str); $str=str_replace('è' ,'é',$str); $str=str_replace('é' ,'é',$str); $str=str_replace('é' ,'é',$str); $str=str_replace('ê' ,'é',$str); $str=str_replace('ê' ,'é',$str); $str=str_replace('ë' ,'é',$str); $str=str_replace('ë' ,'é',$str); $str=str_replace('ì' ,'í',$str); $str=str_replace('ì' ,'í',$str); $str=str_replace('í' ,'í',$str); $str=str_replace('í' ,'í',$str); $str=str_replace('î' ,'í',$str); $str=str_replace('î' ,'í',$str); $str=str_replace('ï' ,'í',$str); $str=str_replace('ï' ,'í',$str); $str=str_replace('Ý' ,'í',$str); $str=str_replace('ò' ,'ó',$str); $str=str_replace('ò' ,'ó',$str); $str=str_replace('ó' ,'ó',$str); $str=str_replace('ó' ,'ó',$str); $str=str_replace('ô' ,'ő',$str); $str=str_replace('ô' ,'ő',$str); $str=str_replace('õ' ,'ő',$str); $str=str_replace('õ' ,'ő',$str); $str=str_replace('ő' ,'ő',$str); $str=str_replace('Ő' ,'ő',$str); $str=str_replace('ö' ,'ö',$str); $str=str_replace('ö' ,'ö',$str); $str=str_replace('ù' ,'ú',$str); $str=str_replace('ù' ,'ú',$str); $str=str_replace('ú' ,'ú',$str); $str=str_replace('ú' ,'ú',$str); $str=str_replace('û' ,'ű',$str); $str=str_replace('û' ,'ű',$str); $str=str_replace('ü' ,'ü',$str); $str=str_replace('þ' ,'ü',$str); $str=str_replace('ü' ,'ü',$str); $str=str_replace('ű' ,'ű',$str); $str=str_replace('·' ,'-',$str); $str=str_replace('–' ,'-',$str); $str=str_replace('–' ,'-',$str); $str=str_replace(' ' ,' ',$str); $str=str_replace('€' ,'',$str); $str=str_replace('€' ,'',$str); $str=str_replace('‚' ,"'",$str); $str=str_replace('‚' ,"'",$str); $str=str_replace('„' ,'"',$str); $str=str_replace('„' ,'"',$str); $str=str_replace('…' ,'.',$str); $str=str_replace('…' ,'.',$str); $str=str_replace('‘' ,"'",$str); $str=str_replace('‘' ,"'",$str); $str=str_replace('’' ,"'",$str); $str=str_replace('’' ,"'",$str); $str=str_replace('“' ,'"',$str); $str=str_replace('“' ,'"',$str); $str=str_replace('”' ,'"',$str); $str=str_replace('”' ,'"',$str); $str=str_replace('˜' ,'"',$str); $str=str_replace('˜' ,'"',$str); $str=str_ireplace('
',' ',$str); $str=preg_replace('/&#[0-9]*;/','',$str); $str=preg_replace('/&[a-zA-Z0-9]*;/','',$str); return $str; } function cleanLINKURL($url) { #megtisztítja a urllinket $url_parts=parse_url($url); $url=lower($url_parts['scheme'].'://'.$url_parts['host']); if ($url_parts['port']!='') $url.=':'.$url_parts['port']; if ($url_parts['path']=='') $url_parts['path']='/'; $url.=$url_parts['path']; if ($url_parts['query']!='') $url.='?'.$url_parts['query']; return $url; } function d($str='',$kill=true,$dump=false) { #debugolásra jó print '
';
  if (is_array($str)) {
    print_r($str);
  } else {
    if ($dump) {
      var_dump($str);
    } else {
      print str_replace('<','<',str_replace('>','>',$str));
    }
  }
  if ($kill) {
    die('
'); } else { print ''; } } function norm($str,$bool=false) { #a gyakrant használt pucoló függvények együttese if ($bool) { return convALNUM(cleanENTITY(utf8($str)),'.,;:?!_/\|&#%=0123456789+-<>()[]@"\''."\r"."\n"); } else { return cleanENTITY(utf8($str)); } } function norm_tarea($input,$flag='OPENTAGS') { $input=stripslashes($input); switch ($flag) { case 'OPENTAGS': $input=str_replace('<','<',$input); $input=str_replace('>','>',$input); break; } return mysqli_real_escape_string($input); } function simpleRemoveHIDDEN($_content) { #Eltűnteti a rejtett szöveget és kinyeri az értékes tartalmat még az eltüntetés előtt $_content=preg_replace('//is','',$_content); $html=array('script','noscript','noframes','select','applet','object','textarea','style','iframe','frameset'); foreach ($html as $ban) $_content=preg_replace('/<'.$ban.'(.*?)<\/'.$ban.'>/is','',$_content); return $_content; } function cuturl($url) { if (substr($url,0,7)=='http://') { $url=substr($url,7); } elseif (substr($url,0,8)=='https://') { $url=substr($url,8); } if (substr($url,0,4)=='www.') { $url=substr($url,4); } return $url; } function ucf($str) { return upper($str{0}).lower(substr($str,1)); } function ucf2($ns) { while (strstr($ns,' ')) $ns=str_replace(' ',' ',$ns); $ns=trim($ns); $ret=array(); foreach (explode(' ',$ns) as $t) $ret[]=ucf($t); return implode(' ',$ret); } function ucf3($str) { if (ord($str{$i})==0xC3 || ord($str{$i})==0xC4 || ord($str{$i})==0xC5) { return upper($str{0}.$str{1}).substr($str,2); } else { return upper($str{0}).substr($str,1); } } function header301($url) { $url=urlcode($url); $txt=' 301 Moved Permanently

Moved Permanently

The document has moved here.

'; header("HTTP/1.1 301 Moved Permanently"); header('Location: '.$url.''); header('Content-Length: '.strlen($txt)); print $txt; die(); } function urlcode($be) { $be=urlencode(lower($be)); $be=str_replace('%2B','+',$be); $be=str_replace('%2F','/',$be); $be=str_replace('%3A',':',$be); $be=str_replace('%3B',';',$be); return $be; } function chooseone($str,$param='') { global $_CH1PARAM; if ($param=='' && $_CH1PARAM) $param=$_CH1PARAM; $str=explode('|',$str); $c=count($str); $x=md5($param.$str); $t=(ord($x{0})*ord($x{1}))%$c; return $str[$t]; } function fixrange($start,$end,$hany,$string) { $van=0; $i=0; $ret=array(); if ($hany>=($end-$start)) { for ($i=$start;$i<=$end;$i++) { $tomb[]=$i; } return tomb_mix($tomb,$string); } while ($van<$hany) { $i++; $t=fixrand($start,$end,$i.$string); if (!in_array($t,$ret)) { $van++; $ret[]=$t; } } return $ret; } function fixrand($start,$stop,$string) { $e=$stop-$start+1; $x=md5($string.$e); $t=$start+(ord($x{0})*ord($x{1}))%$e; return $t; } function tomb_mix($array,$string) { #csak egy dimenziós, nem asszociatív tömbök etesében működik $c=count($array); $be=md5(md5($string)); $v=0; $c2=strlen($be); $result=array(); for ($i=$c;$i>0;$i--) { $tmp=$be{$v}; $v++;if($v>$c2)$v=0; $tmp.=$be{$v}; $v++;if($v>$c2)$v=0; $tmp.=$be{$v}; $tmp=hexdec($tmp); if ($tmp<$i) $tmp*=$tmp; $m=$tmp%$i; $result[]=$array[$m]; $array=tomb_mix_torol($array,$m); } return $result; } function tomb_mix_torol($array,$key) { #a tomb_mix() fvg törlő kieg fgv-e $tmp=array(); for ($i=0;$i$t[2]) { return false; } if ($bool) { return $t; } else { return $t[0]; } } return false; } function is_email($email) { $isValid = true; $atIndex = strrpos($email, "@"); if (is_bool($atIndex) && !$atIndex) { $isValid = false; } else { $domain = substr($email, $atIndex+1); $local = substr($email, 0, $atIndex); $localLen = strlen($local); $domainLen = strlen($domain); if ($localLen < 1 || $localLen > 64) { // local part length exceeded $isValid = false; } else if ($domainLen < 1 || $domainLen > 255) { // domain part length exceeded $isValid = false; } else if ($local[0] == '.' || $local[$localLen-1] == '.') { // local part starts or ends with '.' $isValid = false; } else if (preg_match('/\\.\\./', $local)) { // local part has two consecutive dots $isValid = false; } else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)) { // character not valid in domain part $isValid = false; } else if (preg_match('/\\.\\./', $domain)) { // domain part has two consecutive dots $isValid = false; } else if (!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\","",$local))) { // character not valid in local part unless // local part is quoted if (!preg_match('/^"(\\\\"|[^"])+"$/', str_replace("\\\\","",$local))) { $isValid = false; } } } return $isValid; } function get_Unid($tabla,$mezo='unid',$size=16) { $unid=substr(md5(microtime().rand(1000,9999)),0,$size); if (keres("select {$mezo} from {$tabla} where {$mezo}='{$unid}'")!='') { $unid=get_Unid($tabla,$size,$mezo); } else { return $unid; } } function noupper($str) { $_upper='AÁBCDEÉFHGIÍJKLMNOÓÖŐPQRSTUÚÜŰVWXYZ'; $_lower='aábcdeéfghiíjklmnoóöőpqrstuúüűvwxyz'; $final=0; $upper=0; for ($i=0;$i=90) { return $str{0}.lower(substr($str,1)); } else { return $str; } } else { return $str; } } function stags($be,$param=false) { if ($param) { $be=norm($be,true); } else { $be=str_replace(array("\t","\r\n"),'',$be); } $be=str_replace('<','<',$be); $be=str_replace('>','>',$be); return trim($be); } function valid_ctype_digit($szam) { $a=$szam; $b=$szam+0; $a.='n'; $b.='n'; if ($a!=$b) { return false; } else { return ctype_digit($szam); } } function magyardatum($date='',$br='
') { global $_LANG; if ($date=='') { $ts=time(); } else { $ts=strtotime($date); } $ev=date('Y',$ts); $ho=date('m',$ts); $nap=date('d',$ts); $ora=date('H:i',$ts); switch (date("w", $ts)) { case '0' : $n=$_LANG['d1'];break; case '1' : $n=$_LANG['d2'];break; case '2' : $n=$_LANG['d3'];break; case '3' : $n=$_LANG['d4'];break; case '4' : $n=$_LANG['d5'];break; case '5' : $n=$_LANG['d6'];break; case '6' : $n=$_LANG['d7'];break; } switch ($ho) { case "01" : $m=$_LANG['d8'];break; case "02" : $m=$_LANG['d9'];break; case "03" : $m=$_LANG['d10'];break; case "04" : $m=$_LANG['d11'];break; case "05" : $m=$_LANG['d12'];break; case "06" : $m=$_LANG['d13'];break; case "07" : $m=$_LANG['d14'];break; case "08" : $m=$_LANG['d15'];break; case "09" : $m=$_LANG['d16'];break; case "10" : $m=$_LANG['d17'];break; case "11" : $m=$_LANG['d18'];break; case "12" : $m=$_LANG['d19'];break; } $ret=str_replace('%Y',$ev,$_LANG['d20']); $ret=str_replace('%M',$m,$ret); $ret=str_replace('%D',$nap,$ret); $ret=str_replace('%B',$br,$ret); $ret=str_replace('%W',$n,$ret); $ret=str_replace('%H',$ora,$ret); return $ret; } function substr_cut($str,$l=20) { if (strlen($str)<=$l) { return $str; } else { $i=$l-1; if (ord($str{$i})==0xC3 || ord($str{$i})==0xC4 || ord($str{$i})==0xC5) { $l++; } return substr($str,0,$l).'...'; } } function check_rights($jog) { $j=explode(',',$jog); $t=get_username(true); if ($t[1]=='') { return false; } if ($t[1]=='1') { return true; } if (in_array($t[1],$j)) { return true; } else { return false; } } function permission_denided() { die('Hiba...

HIBA: Letelt a bejelentkezési idő, vagy nem rendelkezik megfelelő jogkörrel a feladat végrehajtásához. Bejelentkezés...

'); } function error_message($str) { die('Hiba...

 

HIBA:

'.$str.'
'); } function mask($str) { return str_repeat('*',strlen($str)); } function get_menu($menu,$urllink=false) { global $_LANG; return ($urllink)?$_LANG[$menu][0]:$_LANG[$menu][1]; } function get_lang() { global $_SUB,$_DEFLANG,$_ACCLANG; if (in_array($_SUB,$_ACCLANG)) { return lower($_SUB); } return $_DEFLANG; } function is_number($be) { if (strlen($be)!=strlen(floor($be*1))) { return false; } return true; } function sec2time($sec) { $returnstring = ''; $days = intval($sec/86400); $hours = intval ( ($sec/3600) - ($days*24)); $minutes = intval( ($sec - (($days*86400)+ ($hours*3600)))/60); $seconds = $sec - ( ($days*86400)+($hours*3600)+($minutes * 60)); $returnstring .= ($days)?(zerofill($days,2).':'):''; $returnstring .= zerofill($hours,2).':'; $returnstring .= zerofill($minutes,2).':'; $returnstring .= zerofill($seconds,2); return ($returnstring); } function szo_cut($str,$kell=30) { $ret=''; $i=0; $levag=false; foreach (explode(' ',$str) as $tmp) { $i++; $ret.=$tmp.' '; if ($i==$kell) { $levag=true; } if ($levag) { if (substr($tmp,-1,1)=='.' || substr($tmp,-1,1)=='?' || substr($tmp,-1,1)=='!') { break; } } } return $ret; } function get_user_info($userid='') { global $_USR; if ($userid=='') { $ret=keres2("select * from {$_USR}_user where email='".get_username()."'"); } else { $ret=keres2("select * from {$_USR}_user where unid='{$userid}'"); } $res=mq("select mezonev,ertek from {$_USR}_user_info where userid='{$ret['unid']}'"); while ($tomb=mysqli_fetch_row($res)) { $ret[$tomb[0]]=$tomb[1]; } return $ret; } function draw_graphiframe($points,$labels,$width=850,$height=100) { print ''; } function get_nodelevel($level) { global $node; if ($level==0) { return $node[0]; } for ($i=0;$i<=$level;$i++) { $ret[]=$node[$i]; } return implode('/',$ret); } function strip_zero($deci) { if (strpos($deci,'.')===false) { return $deci; } while (substr($deci,-1,1)=='0') { $deci=substr($deci,0,-1); } if (substr($deci,-1,1)=='.') { $deci=substr($deci,0,-1); } return $deci; } function get_sablon($level,$sablonid,$leveldb='') { global $_EMAIL,$_PRE; if ($leveldb!='') { $db=$leveldb; } else { if ($_EMAIL['db']!='') { $db=$_EMAIL['db']; } else { $db=$_PRE; } } $sablon=keres("select content from {$db}_email_sablon where unid='{$sablonid}'"); if ($sablon=='') { $sablon=keres("select content from {$db}_email_sablon where unid='1'"); if ($sablon=='') { $sablon='[MAILBODY]'; } } return str_replace('[MAILBODY]',$level,$sablon); } function benne($mystring,$findme) { if (strpos('|'.$mystring.'|','|'.$findme.'|')===false) { return false; } return true; } function ta_echo($be) { $be=str_replace(' ','&nbsp;',$be); $be=str_replace('<','&lt;',$be); $be=str_replace('>','&gt;',$be); $be=str_replace('<','<',$be); $be=str_replace('>','>',$be); $be=str_replace('"','"',$be); return $be; } function mfa($urllink) { return mysqli_fetch_assoc($urllink); } function mfr($urllink) { return mysqli_fetch_row($urllink); } function mres($urllink) { global $link; return mysqli_real_escape_string($link, $urllink); } function mq($sql) { global $_PRE,$_WID,$link; $res=mysqli_query($link, $sql); if ($res===false) { mysqli_query($link, "insert into {$_PRE}_sqlerror (datum,wid,php,sqltext) value ( '".date('Y-m-d H:i:s')."', '{$_WID}', '{$_SERVER['PHP_SELF']}', '".mres($sql)."' )"); } return $res; } function da($datum='Y-m-d H:i:s') { return date($datum); } function char_to_iso($str,$op=0) { if ($op=='0') { return iconv('UTF-8','ISO-8859-2',$str); } elseif ($op=='1') { return utf8_decode($str); } elseif ($op=='2') { return mb_convert_encoding($str, "UTF-8", "utf-8,iso-8859-2,iso-8859-1"); } return $str; } function HTML_level($felado,$feladonev,$cimzett,$cimzettnev,$targy,$level,$reply=true,$attachment='') { $mail = new PHPMailer(); $mail->AddAddress($cimzett, $cimzettnev); if ($reply) { $mail->Sender=$felado; } $mail->From=$felado; $mail->FromName=$feladonev; $mail->MsgHTML($level); $mail->Subject=$targy; if ($attachment!='') { $mail->AddAttachment($attachment); } return $mail->Send(); }