$length) { $length -= strlen($etc); if (!$break_words) $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1)); return substr($string, 0, $length).$etc; } else return $string; } function form_date($string) { $datum = explode(".", $string); if ($datum['1'] == '01'){$datum['1'] = 'Januar';} if ($datum['1'] == '02'){$datum['1'] = 'Februar';} if ($datum['1'] == '03'){$datum['1'] = 'März';} if ($datum['1'] == '04'){$datum['1'] = 'April';} if ($datum['1'] == '05'){$datum['1'] = 'Mai';} if ($datum['1'] == '06'){$datum['1'] = 'Juni';} if ($datum['1'] == '07'){$datum['1'] = 'Juli';} if ($datum['1'] == '08'){$datum['1'] = 'August';} if ($datum['1'] == '09'){$datum['1'] = 'September';} if ($datum['1'] == '10'){$datum['1'] = 'Oktober';} if ($datum['1'] == '11'){$datum['1'] = 'November';} if ($datum['1'] == '12'){$datum['1'] = 'Dezember';} $datum = $datum['0'].". ".$datum['1']." ".$datum['2']; return $datum; } function check_email($email) { if( (preg_match('/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/', $email)) || (preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/',$email)) ) { $host = explode('@', $email); if (!function_exists('checkdnsrr')) { function checkdnsrr($host, $type = '') { if(!empty($host)) { if($type == '') $type = "MX"; @exec("nslookup -type=$type $host 141.1.1.1", $output); foreach ($output as $line) { if(eregi("^$host",$line)) { return true; } } } } } if(checkdnsrr($host[1].'.', 'MX') ) {return true;} if(checkdnsrr($host[1].'.', 'A') ) {return true;} if(checkdnsrr($host[1].'.', 'CNAME') ){return true;} } return false; } function create_css($mpoints){ foreach($mpoints as $key => $mp){ $text .= '#'.$mp.' {display:block;margin:0px;padding:0px 0px 5px 0px;border:0px;background:url("../gfx/mp/'.$mp.'_normal.png") no-repeat;width:146px;min-width:146px;max-width:146px;height:44px;min-height:44px;max-height:44px;} #'.$mp.':link {background:url("../gfx/mp/'.$mp.'_normal.png") no-repeat;} #'.$mp.':hover {background:url("../gfx/mp/'.$mp.'_hover.png") no-repeat;} #'.$mp.':active {background:url("../gfx/mp/'.$mp.'_hover.png") no-repeat;} #'.$mp.':focus {background:url("../gfx/mp/'.$mp.'_hover.png") no-repeat;} '; } file_put_contents('./css/menu.css',$text); } function set_error($message){ global $error; $error = $message; return; } function create_error(){ global $error; if(isset($error)){ return ''; unset($error); }else{ return; } } ?> Galerie – Feuerwehr Straach