#!/bin/perl
use Mysql;
use strict;
use CGI qw(:standard);
my $save=param('save');
my $dd = param('day');
my $mm = param('month');
my $yy = param('year');
my $ftag = param('ftag');
my $datum;
print header();
print "\n";
print "
\n";
print "\n";
print "\n";
print "Datumsformat dd-mm-yyyy. Ist dd oder mm kleiner als 10,
muß eine führende 0 eingegeben werden.
\n";
print "Bei Eingabe eines ungültigen Datums wird 00-00-0000 gespeichert!
\n";
my $dbh = DBI->connect("DBI:mysql:database=c2;host=localhost",'root','', {RaiseError => 1});
if ($save eq "") {
my $sth = $dbh->prepare("select description,datum from not_run_on order by datum");
$sth->execute;
#print "\n";
}
if ($save eq "Speichern") {
$datum="$yy" . "-" . "$mm" . "-" . "$dd";
$dbh->do("update not_run_on set datum='$datum' where description='$ftag'");
print "
Gespeichert\n";
#print "$ftag $dd $mm $yy";
}
print "\n";
print "\n";