Direkt zum Seiteninhalt

Hauptmenü:

Seite 1

\\r\\n
\\r\\n\";\r\nvar form=document.getElementById('awf');\r\nform.noValidate=true;\r\nform.onsubmit=function(event){event.preventDefault();awf_Validate();return false;};\r\nawf_SP(1);\r\n}\r\n\r\n"; echo "function awf_SP(page)\r\n{\r\nif(page===1)\r\n{\r\nawf_activePage=1;\r\nawf_activeID='awf-ID1';\r\ndocument.getElementById(\"awf\").innerHTML=\"
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n
Dieses Feld ist erforderlich.
Die Eingabe ist ungültig - Bitte nur Zahlen
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

Erbebnis lange Strecke:

\\r\\n
\\r\\n
\\r\\n
\\r\\n

Ergebnis kurze Strecke:

\\r\\n
\\r\\n
\\r\\n
\\r\\n
\";\r\nawf_SetNum('awf-ID16',awf_ID16,2,',');\r\nawf_CheckNum('awf-ID16',awf_ID16,'','',2,',');\r\nif(awf_ID1)awf_Scroll('awf',true);\r\nawf_ID1=true;\r\n}\r\nawf_Update(null);\r\n}\r\n\r\nfunction awf_PageOutputVal()\r\n{\r\nawf_OutputVal('awf-ID16',awf_ID16);\r\nawf_OutputVal('awf-ID21',awf_ID21);\r\nawf_OutputVal('awf-ID32',awf_ID32);\r\n}\r\n\r\n"; echo "function awf_Validate()\r\n{\r\nif(awf_activePage===1)\r\n{\r\nif(awf_isLost('awf-ID16')) return;\r\nif(!awf_isDisabled('awf-ID16') && awf_isVisible('awf-ID16'))\r\n{\r\nif(awf_isRequired('awf-ID16')){awf_ShowError('awf-ID16-error-req','awf-ID16');return;}\r\nif(awf_isInvalid('awf-ID16')){awf_ShowError('awf-ID16-error-inv','awf-ID16');return;}\r\n}\r\n}\r\nawf_ValidateRC();\r\n}\r\n\r\nfunction awf_ValidateRC()\r\n{\r\nawf_Submit();\r\n}\r\n\r\n"; echo "function awf_FS(submit)\r\n{\r\nawf_boolSubmit=submit;\r\n}\r\n\r\nfunction awf_Submit()\r\n{\r\nif(!awf_boolSubmit && awf_activePage<1)\r\n{\r\nawf_SP(awf_activePage+1);\r\nreturn;\r\n}\r\nif(awf_boolSubmit || awf_activePage===1)\r\n{\r\ndocument.getElementById('awf-fieldset').disabled='disabled';\r\nvar fd=new FormData();\r\nfd.append('ID16',awf_ID16);\r\nfd.append('ID21',awf_ID21);\r\nfd.append('ID32',awf_ID32);\r\nvar c=new XMLHttpRequest();c.open('POST',awf_url+'?submit=awf');\r\nc.onreadystatechange=function(){if(c.readyState===4){if(c.status===200){awf_Success(c.responseText);}else{awf_Error(c.statusText);}}};\r\nc.send(fd);\r\n}\r\n}\r\n\r\n"; echo "function awf_Back()\r\n{\r\nif(awf_activePage>1) {awf_SP(awf_activePage-1);}\r\n}\r\n\r\n"; echo "function awf_Reset()\r\n{\r\nlocation.reload();\r\n}\r\n\r\n"; echo "function awf_Success(resp)\r\n{\r\nif(resp!=='OK'){awf_Error(resp);return;}\r\ndocument.getElementById(\"awf\").innerHTML=\"
\\r\\n
\\r\\n
\\r\\n
Vielen Dank für Ihre Nachricht.
Die Formulardaten wurden erfolgreich übermittelt.
\\r\\n
\\r\\n
\\r\\n
\";\r\nawf_Update(null);\r\nawf_Scroll('awf',true);\r\n}\r\n\r\nfunction awf_Error(err)\r\n{\r\ndocument.getElementById(\"awf\").innerHTML=\"
\\r\\n
\\r\\n
\\r\\n
Bei der Verarbeitung der Formulardaten ist ein Fehler aufgetreten
Bitte wiederholen Sie den Vorgang.
\\r\\n
\\r\\n
\\r\\n
\";\r\nawf_Update(null);\r\nvar c=document.createComment(err);document.getElementById(\"awf\").appendChild(c);\r\nawf_Scroll('awf',true);\r\n}\r\n\r\n"; echo "function awf_Update(ele)\r\n{\r\nif(ele!==null)\r\n{\r\nswitch(ele.id)\r\n{\r\ncase 'awf-ID16':{awf_ID16=ele.value;awf_CheckNum('awf-ID16',ele.value,'','',2,',');} break;\r\n}\r\n}\r\nawf_ID21=awf_FmtNum(awf_SToN(awf_ID16)/1.618,3,',');\r\nawf_ID32=awf_FmtNum(awf_SToN(awf_ID16)/2.618,3,',');\r\nawf_PageOutputVal();\r\n}\r\n\r\n"; echo "function awf_isLost(id)\r\n{\r\nreturn (document.getElementById(id)===null);\r\n}\r\n\r\nfunction awf_isRequired(id)\r\n{\r\nreturn (document.getElementById(id).validity.valueMissing);\r\n}\r\n\r\nfunction awf_isInvalid(id)\r\n{\r\nreturn (!document.getElementById(id).validity.valid);\r\n}\r\n\r\nfunction awf_isDisabled(id)\r\n{\r\nreturn (document.getElementById(id).disabled);\r\n}\r\n\r\nfunction awf_ShowError(id,focus)\r\n{\r\nvar ele=document.getElementById(id); if(ele===null)return;\r\nif(!awf_isErrorInView(ele))awf_Scroll(id,false);\r\nele.style.zIndex='100';\r\nele.style.opacity='1';\r\nsetTimeout(function(){awf_HideError(ele,focus);},2000);\r\n}\r\n\r\nfunction awf_Scroll(id,isp)\r\n{\r\nvar scr=document.getElementById(id);\r\nif(scr)\r\n{\r\nscr.scrollIntoView();\r\nif((scr.getBoundingClientRect().bottom+100=100)&&(ele.getBoundingClientRect().bottom<=window.innerHeight));\r\n}\r\n\r\nfunction awf_SetString(id,value)\r\n{\r\nvar ele=document.getElementById(id);\r\nif(ele)ele.value=value;\r\n}\r\n\r\nfunction awf_SetNum(id,value,decpl,decsp)\r\n{\r\nvar ele=document.getElementById(id);\r\nif(ele)\r\n{\r\nif(value===''){ele.value='';return;}\r\nvalue=value.replace(decsp,'.');var str=Number(value).toFixed(decpl);str=str.replace('.',decsp);\r\nele.value=str;\r\n}\r\n}\r\n\r\nfunction awf_FmtNum(value,decpl,decsp)\r\n{\r\nvar str=Number(value).toFixed(decpl);str=str.replace('.',decsp);\r\nreturn str;\r\n}\r\n\r\nfunction awf_SToN(str)\r\n{\r\nstr=str.replace(',','.');\r\nreturn Number(str);\r\n}\r\n\r\nfunction awf_SetTA(id,value)\r\n{\r\nvar ele=document.getElementById(id);\r\nif(ele)ele.value=value;\r\n}\r\n\r\nfunction awf_SetRadio(name,value)\r\n{\r\nvar r=document.getElementsByName(name);\r\nif(r)\r\n{\r\nfor(var i=0;i-1);\r\n}\r\n}\r\n\r\nfunction awf_Transform(mode,val)\r\n{\r\nswitch(mode)\r\n{\r\ncase 0:{return val.trim();} break;\r\ncase 1:{return val.trim().toLowerCase();} break;\r\ncase 2:{return val.trim().toUpperCase();} break;\r\ndefault:{return val;} break;\r\n}\r\n}\r\n\r\nfunction awf_SetValid(id,valid)\r\n{\r\nvar ele=document.getElementById(id);\r\nif(!ele)return;\r\nif(valid)ele.setCustomValidity(''); else ele.setCustomValidity('Invalid');\r\n}\r\n\r\nfunction awf_OutputVal(classid,value)\r\n{\r\nvar els=document.getElementsByClassName(classid+'-out');\r\nArray.prototype.forEach.call(els,function(ele){\r\nif(value==='')value=' ';\r\nif(ele.nodeName.toUpperCase()==='SPAN')ele.innerText=value;\r\n});\r\n}\r\n\r\nfunction awf_CheckNum(id,value,min,max,decpl,decsp)\r\n{\r\nif(value===''){awf_SetValid(id,true);return true;}\r\nvalue=value.replace(decsp,'.');\r\nvar pat=/^-?\\d+\\.?\\d*\$/; if(!pat.test(value)){awf_SetValid(id,false);return false;}\r\nvar num=Number(value).toFixed(decpl);\r\nif(num.toString()!==value){awf_SetValid(id,false);return false;}\r\nif(min!==''){if(numNumber(max)){awf_SetValid(id,false);return false;}}\r\nawf_SetValid(id,true); return true;\r\n}\r\n\r\nfunction awf_CheckTA(id,value,min,max)\r\n{\r\nif(value===''){awf_SetValid(id,true);return true;}\r\nif(min!==''){if(value.lengthNumber(max)){awf_SetValid(id,false);return false;}}\r\nawf_SetValid(id,true); return true;\r\n}\r\n\r\nfunction awf_SetRadioValid(id,num,valid)\r\n{\r\nfor(var i=0;iNumber(max))return false;}\r\nreturn true;\r\n}\r\n\r\nfunction awf_GetCBValue(id,num)\r\n{\r\nvar val=[];\r\nfor(var i=0;imax){awf_SetValid(id,false);return;}\r\nif(files!==null&&files.length>0)\r\n{\r\nfor(var i=0;ifs){awf_SetValid(id,false);return;}\r\nvar regex=new RegExp('(.*?)\\.('+ext+')\$');\r\nif(!regex.test(f.name.toLowerCase())){awf_SetValid(id,false);return;}\r\n}\r\n}\r\nawf_SetValid(id,true);\r\n}\r\n\r\nfunction awf_GetFUNames(files)\r\n{\r\nif(files===null||files.length===0)return '';\r\nvar n='';\r\nfor(var i=0;i0)n+=',';n+=f.name;\r\n}\r\nreturn n;\r\n}\r\n\r\nfunction awf_AddZeroTen(i)\r\n{\r\nvar x=i.toString();\r\nif(i<10)x='0'+x;\r\nreturn x;\r\n}\r\n\r\nfunction awf_MakeDTString(of,y,m,d,hh,mm)\r\n{\r\nvar out='';\r\nswitch(of)\r\n{\r\ncase 0:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)){out=m+'/'+d+'/'+y;}break;\r\ncase 1:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)&&!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=m+'/'+d+'/'+y+' '+hh+':'+mm;}break;\r\ncase 2:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)){out=d+'.'+m+'.'+y;}break;\r\ncase 3:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)&&!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=d+'.'+m+'.'+y+' '+hh+':'+mm;}break;\r\ncase 4:if(!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=hh+':'+mm;}break;\r\ncase 5:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)){out=y+'-'+m+'-'+d;}break;\r\ncase 6:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)&&!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=y+'-'+m+'-'+d+' '+hh+':'+mm+':00';}break;\r\ncase 7:if(!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=hh+':'+mm+':00';}break;\r\n}\r\nreturn out;\r\n}\r\n\r\nfunction awf_isEmpty(s)\r\n{\r\nreturn(!s||s.length===0);\r\n}\r\n\r\nfunction awf_SetDT(id,y,m,d,hh,mm)\r\n{\r\nvar ele=document.getElementById(id+'-year');if(ele)ele.value=y;\r\nele=document.getElementById(id+'-month');if(ele)ele.value=m;\r\nele=document.getElementById(id+'-day');if(ele)ele.value=d;\r\nele=document.getElementById(id+'-hour');if(ele)ele.value=hh;\r\nele=document.getElementById(id+'-min');if(ele)ele.value=mm;\r\n}\r\n\r\nfunction awf_isYMDValid(y,m,d)\r\n{\r\nif(!y&&!m&&!d)return true;\r\nif(!y||!m||!d)return false;\r\nvar dt=new Date(y,m-1,d);\r\nreturn(dt&&(dt.getMonth()+1==m));\r\n}\r\n\r\nfunction awf_isHHMMValid(hh,mm)\r\n{\r\nif(!hh&&!mm)return true;\r\nif(!hh||!mm)return false;\r\nreturn true;\r\n}\r\n\r\nfunction awf_isYMDHHMMValid(y,m,d,hh,mm)\r\n{\r\nif(!y&&!m&&!d&&!hh&&!mm)return true;\r\nif(!y||!m||!d||!hh||!mm)return false;\r\nreturn true;\r\n}\r\n\r\nfunction awf_CalcAge(y,m,d)\r\n{\r\nvar now=new Date();\r\nvar d1=new Date(now.getFullYear(),now.getMonth(),now.getDate());\r\nvar d2=new Date(y,m-1,d);\r\nvar a=d1.getFullYear()-d2.getFullYear();\r\nvar m=d1.getMonth()-d2.getMonth();\r\nif(m<0||(m===0&&d1.getDate()=dt1&&dt0<=dt2);\r\n}\r\n\r\nfunction awf_ShowContainer(id)\r\n{\r\nvar ele=document.getElementById(id);\r\nif(ele){if(ele.style.display!=='block')ele.style.display='block';}\r\n}\r\n\r\nfunction awf_HideContainer(id)\r\n{\r\nvar ele=document.getElementById(id);\r\nif(ele){if(ele.style.display!=='none')ele.style.display='none';}\r\n}\r\n\r\nfunction awf_isVisible(id)\r\n{\r\nvar ele=document.getElementById(id);\r\nif(!ele)return false;\r\nreturn !!(ele.offsetWidth||ele.offsetHeight||ele.getClientRects().length);\r\n}\r\n\r\n"; exit(); } //////////////////////////////////////////////////////////////////////////////////////////////////// function arclab_Error($error) { header('Content-Type: text/html; charset=utf-8'); echo "function awf_Run(id)\r\n{\r\ndocument.getElementById(id).innerHTML=\"$error\";\r\n}\r\n"; exit(); } //////////////////////////////////////////////////////////////////////////////////////////////////// function arclab_InputUTF8($a) { if(mb_detect_encoding($a)=="UTF-8"&&mb_check_encoding($a,"UTF-8"))return $a; return utf8_encode($a); } function arclab_VarToHTML($a) { $b=nl2br(htmlspecialchars($a,ENT_QUOTES,'UTF-8')); return trim($b); } function arclab_isEmail($a) { //return filter_var($a,FILTER_VALIDATE_EMAIL); $p="/^[^@,;:\x22\s<>()\[\]]+@[^@,;:\s\x22\x27<>()\[\]+!#$%&]+\.[^@,;:\s\x22\x27<>()\[\]+!#$%&]+$/"; return preg_match($p, $a); } function arclab_isASCII($s) { return mb_detect_encoding($s,'ASCII',true); } function arclab_EncodeEmailIDN($a) { if(!function_exists('idn_to_ascii'))return $a; $p=explode('@',$a); if(count($p)==2) { $a=$p[0].'@'.idn_to_ascii($p[1]); } return $a; } function arclab_FilterHeader($a) { $r=array('/(\n+)/i','/(\r+)/i','/(\t+)/i','/(%0A+)/i','/(%0D+)/i','/(%08+)/i','/(%09+)/i'); $b=preg_replace($r,'',$a); return $b; } function arclab_EncodeHeader($a,$i) { return mb_encode_mimeheader($a,'UTF-8','B',PHP_EOL,strlen($i)); } function arclab_EncodeHeaderEmail($a,$b,$i) { $a=arclab_FilterHeader($a); $b=arclab_FilterHeader($b); if(!arclab_isEmail($b))return ''; $e=''; if(!empty($a)) { $e="\"".mb_encode_mimeheader($a,'UTF-8','B',PHP_EOL,strlen($i))."\""; } if(!empty($b)) { $t='<'.arclab_EncodeEmailIDN($b).'>'; if(strpos($e,PHP_EOL)||(strlen($i)+strlen($e)+strlen($t)>76))$e.=PHP_EOL; if(!empty($e))$e.=' '; $e.=$t; return $e; } return ''; } function arclab_isUploadValid($v,$e,$s,$n,$r) { $c=0; if(!isset($_FILES[$v])){if($r)return false;else return true;} foreach($_FILES[$v]['tmp_name'] as $i => $FTN) { if(!empty($_FILES[$v]['error'][$i]))return false; if(empty($FTN)||!is_uploaded_file($FTN))return false; $FN=$_FILES[$v]['name'][$i]; $FS=$_FILES[$v]['size'][$i]; if(!empty($e)){if(!preg_match('/(.*?)\.('.$e.')$/',strtolower($FN)))return false;} if($FS>$s)return false; $c++; } if($c>$n)return false; return true; } function arclab_EncodeBody($a,$p) { if($p)return "Content-Transfer-Encoding: 8bit\r\n\r\n".$a; return "Content-Transfer-Encoding: base64\r\n\r\n".chunk_split(base64_encode($a)); } function arclab_ConvertNumeric($s) { $ic=strpos($s,','); $ip=strpos($s,'.'); if($ic!==FALSE&&$ip!==FALSE) { if($ic>$ip)$s=str_replace(',','',$s); if($ic<$ip){$s=str_replace('.','',$s);$s=str_replace(',','.',$s);} } else { if($ic!==FALSE)$s=str_replace(',','.',$s); } return floatval($s); } function arclab_DecPl($f,$n) { return number_format($f,$n,'.',''); } function arclab_ConvertDateTime($year,$month,$day,$hour,$min,$sec) { return sprintf('%04d-%02d-%02d %02d:%02d:%02d',(int)$year,(int)$month,(int)$day,(int)$hour,(int)$min,(int)$sec); } function arclab_ConvertDate($year,$month,$day) { return sprintf('%04d-%02d-%02d',(int)$year,(int)$month,(int)$day); } function arclab_ConvertTime($hour,$min,$sec) { return sprintf('%02d:%02d:%02d',(int)$hour,(int)$min,(int)$sec); } function arclab_ConvertBoolean($s) { if(empty($s))return 0; $s=strtoupper($s); if($s=='TRUE'||$s=='YES'||$s=='Y'||$s=='ON'||$s=='WAHR'||$s=='JA'||$s=='J'||$s=='AN')return 1; if($s=='FALSE'||$s=='NO'||$s=='N'||$s=='OFF'||$s=='FALSCH'||$s=='NEIN'||$s=='AUS')return 0; if(s==0) return 0; else return 1; } function arclab_UUIDv4() { return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',mt_rand(0,0xffff),mt_rand(0,0xffff),mt_rand(0,0xffff),mt_rand(0,0x0fff)|0x4000,mt_rand(0, 0x3fff)|0x8000,mt_rand(0,0xffff),mt_rand(0,0xffff),mt_rand(0,0xffff)); } //////////////////////////////////////////////////////////////////////////////////////////////////// function arclab_Submit() { if(strtolower($_SERVER['REQUEST_METHOD'])!=='post')arclab_SubmitDone('E001'); $ID16='';if(isset($_POST['ID16']))$ID16=arclab_InputUTF8($_POST['ID16']);if($ID16===null||$ID16==='')arclab_SubmitDone('E002/ID16'); $ID21='';if(isset($_POST['ID21']))$ID21=arclab_InputUTF8($_POST['ID21']); $ID32='';if(isset($_POST['ID32']))$ID32=arclab_InputUTF8($_POST['ID32']); arclab_SubmitDone(); } function arclab_SubmitDone($err='') { header('Content-Type: text/html; charset=utf-8'); if($err==='')echo "OK";else echo($err); exit(); } ?>');>
Zurück zum Seiteninhalt | Zurück zum Hauptmenü