Geschrieben von Beat Rubischon (Link) am
Montag, 3. Mai 2010, 11:25
aus dem *für-Nala* dept.
#!/usr/bin/perl -w
use strict;
# date -d "May 29 14:25" +%s
my $target=1275135900;
my $now=time;
my $diff=$target-$now;
print << "EOF";
Content-type: text/html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Counter</title>
</head>
<script language="JavaScript">
<!--
var line1=new Array();
var line2=new Array();
var line3=new Array();
var line4=new Array();
var line5=new Array();
line1\[0\]=" ___ ";
line2\[0\]=" / _ \\\\ ";
line3\[0\]="| | | | ";
line4\[0\]="| |_| | ";
line5\[0\]=" \\\\___/ ";
line1\[1\]=" _ ";
line2\[1\]=" / | ";
line3\[1\]=" | | ";
line4\[1\]=" | | ";
line5\[1\]=" |_| ";
line1\[2\]=" ____ ";
line2\[2\]="|___ \\\\ ";
line3\[2\]=" __) | ";
line4\[2\]=" / __/ ";
line5\[2\]="|_____| ";
line1\[3\]=" _____ ";
line2\[3\]="|___ / ";
line3\[3\]=" |_ \\\\ ";
line4\[3\]=" ___) | ";
line5\[3\]="|____/ ";
line1\[4\]=" _ _ ";
line2\[4\]="| || | ";
line3\[4\]="| || |_ ";
line4\[4\]="|__ _|";
line5\[4\]=" |_| ";
line1\[5\]=" ____ ";
line2\[5\]="| ___| ";
line3\[5\]="|___ \\\\ ";
line4\[5\]=" ___) | ";
line5\[5\]="|____/ ";
line1\[6\]=" __ ";
line2\[6\]=" / /_ ";
line3\[6\]="| '_ \\\\ ";
line4\[6\]="| (_) | ";
line5\[6\]=" \\\\___/ ";
line1\[7\]=" _____ ";
line2\[7\]="|___ | ";
line3\[7\]=" / / ";
line4\[7\]=" / / ";
line5\[7\]=" /_/ ";
line1\[8\]=" ___ ";
line2\[8\]=" ( _ ) ";
line3\[8\]=" / _ \\\\ ";
line4\[8\]="| (_) | ";
line5\[8\]=" \\\\___/ ";
line1\[9\]=" ___ ";
line2\[9\]=" / _ \\\\ ";
line3\[9\]="| (_) | ";
line4\[9\]=" \\\\__, | ";
line5\[9\]=" /_/ ";
function decrement() {
window.setTimeout('decrement()', 1000);
var now=document.forms.display.counter.value;
now--;
document.forms.display.counter.value=now;
var out1=new String("");
var out2=new String("");
var out3=new String("");
var out4=new String("");
var out5=new String("");
now=now + "";
for (n = 0; n < now.length; n++) {
x=now.substring(n,n+1);
out1=out1 + line1\[x\];
out2=out2 + line2\[x\];
out3=out3 + line3\[x\];
out4=out4 + line4\[x\];
out5=out5 + line5\[x\];
}
document.forms.display.numbers.value = out1 + '\\n' +
out2 + '\\n' + out3 + '\\n' + out4 + '\\n' + out5;
}
// -->
</script>
<body onLoad="window.setTimeout('decrement()', 100);">
<center>
<form name="display">
<input name="counter" type="hidden" value="$diff" />
<textarea name="numbers" cols="54" rows="5" readonly />
</textarea>
</form>
</center>
</body>
EOF
dublin.cgi
2KB (2700 bytes)
Permalink
|