hab noch eine vorschlag....wegen die uhrzeit....villeicht kannst du ja in javasscript machen wie in meine website :
www.fun-haha.netURL geaenderthier ist den code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Dynamic Drive DHTML Scripts- Local Time script</title>
<link rel="stylesheet" type="text/css" href="../ddincludes/mainstyle.css" />
<style type="text/css">
.bigbox{
border: 1px solid black;
background-color: grey;
padding: 3px;
margin-bottom: 0.5em;
width: 200px;
}
</style>
<script type="text/javascript">
var weekdaystxt=["Sontag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]
function showLocalTime(container, servermode, offsetMinutes, displayversion){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.displayversion=displayversion
var servertimestring=(servermode=="server-php")? '<? print date("F d, Y H:i:s", time())?>' : (servermode=="server-ssi")? 'July 04, 2006 08:50:46' : '<%= Now() %>'
this.localtime=this.serverdate=new Date(servertimestring)
this.localtime.setTime(this.serverdate.getTime()+offsetMinutes*60*1000) //add user offset to server time
this.updateTime()
this.updateContainer()
}
showLocalTime.prototype.updateTime=function(){
var thisobj=this
this.localtime.setSeconds(this.localtime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}
showLocalTime.prototype.updateContainer=function(){
var thisobj=this
if (this.displayversion=="long")
this.container.innerHTML=this.localtime.toLocaleString()
else{
var hour=this.localtime.getHours()
var minutes=this.localtime.getMinutes()
var seconds=this.localtime.getSeconds()
var ampm=(hour>=12)? "PM" : "AM"
var dayofweek=weekdaystxt[this.localtime.getDay()]
this.container.innerHTML=formatField(hour)+":"+formatField(minutes)+":"+formatField(seconds)+" ("+dayofweek+")"
}
setTimeout(function(){thisobj.updateContainer()}, 1000) //update container every second
}
function formatField(num, isHour){
if (typeof isHour!="undefined"){ //if this is the hour field
var hour=(num>12)? num-12 : num
return (hour==0)? 12 : hour
}
return (num<=9)? "0"+num : num//if this is minute or sec field
}
</script>
</head>
<body>
<div class="bigbox"><b>Local:</b> <span id="timebox"></span></div>
<div class="bigbox"><b>Berlin:</b> <span id="timebox2"></span></div>
<script type="text/javascript">
new showLocalTime("timebox", "server-php", 0, "short")
new showLocalTime("timebox2", "server-php", 0, "short")
</script>
</body>
</html>
« Last edit by
Quix0r on Thu Mar 29, 2007 1:54 pm. »