Tel: 07754 4110-0 | Fax: 07754 4110 85 | gemeinde@lohnsburg.at 
Tragen Sie sich doch in unser Gästebuch ein


Bitte hinterlassen Sie doch einen Eintrag in unserem Gästebuch. Wir freuen uns über jede Anregung - ob positiv oder negativ . . . -
Hier geht es zum Eintrageformular

Der Bürgermeister:
Ing. Max Mayer

#!/usr/bin/perl require("/usr/local/httpd/cgi-bin/wartungssystemv2/intern/wslib.pl"); use CGI; use Bundle::DBI; use DBD::mysql; print "Content-type: text/html\n\n"; #$DBstring="DBI:mysql:guestbook:mysql.netpark.at"; #$DBuser="ws"; #$DBpass="ws4adr"; $script_filename = $ENV{SCRIPT_FILENAME}; $kategorie = (split /\//, $script_filename)[7]; $gemeinde = $kategorie; my $dbh=DBI->connect($DBstring,$DBuser,$DBpass) or print "Error while connect: $dbh->errstr"; my $query="select * from guestbook.GBmain where Name=\"$kategorie\""; my $sth=$dbh->prepare($query) or print "Error while connect: $dbh->errstr"; $rv = $sth->execute() or print "Error while connect: $dbh->errstr"; my $id=$sth->fetchall_arrayref or print "Error while connect: $dbh->errstr"; $GBid=$id->[0][0]; $design=$id->[0][4]; $query="select * from guestbook.GBdata where GBid=$GBid order by datum DESC"; if ($design <= -1000) # fall3 { $periode=$design*-1; $periode-=1000; ($aktsec, $aktmin, $akthour, $aktmday, $aktmon, $aktyear, $aktwday, $aktyday, $aktisdst)=localtime(time); $aktyear += 1900; $aktmon++; $heute = "$aktmday.$aktmon.$aktyear"; $heutedb = sprintf("%04d-%02d-%02d", $aktyear, $aktmon, $aktmday); $jetzt = sprintf("%04d-%02d-%02d %02d:%02d:%02d", $aktyear,$aktmon,$aktmday,$akthour,$aktmin,$aktsec); $query="SELECT DATE_SUB(\"$jetzt\", INTERVAL $periode DAY)"; my $sth=$dbh->prepare($query) or print "Error while connect: $dbh->errstr"; $sth->execute() or print "Error while connect: $dbh->errstr"; my $result=$sth->fetchall_arrayref or print "Error while connect: $dbh->errstr"; $query="select * from guestbook.GBdata where GBid=$GBid and datum >=\"$result->[0][0]\" order by datum"; } my $sth=$dbh->prepare($query) or print "Error while prepare: $dbh->errstr"; $sth->execute() or print "Error while execute: $dbh->errstr"; my $data=$sth->fetchall_arrayref or print "Error while fetch: $dbh->errstr"; $i=-1; if ($design >= 1000) { $count=$design-1000; if ($#{$data} ge $count) { $i=$count-1; } } if ($#{$data} ne -1) { print <<"[HTMLEND]";
Nachstehend sehen Sie die aktuellen Einträge in unser Gästebuch:


[HTMLEND] $i=-1; while ($i < $#{$data}) { $i++; $name=$data->[$i][1]; $email=$data->[$i][2]; $text=$data->[$i][3]; $date=$data->[$i][4]; $text =~ s/sgzrw/\"/g; $name =~ s/sgzrw/\"/g; $email =~ s/sgzrw/\"/g; $text =~ s/sgzrw/\"/g; if ($email eq "") { $email_str=""; } else { $email_str="($email)"; } print <<"[HTMLEND]"; $name $email_str, $date

$text


[HTMLEND] } } $dbh->disconnect(); Ihr Eintrag:
Name:
Email:
Ihr Eintrag:
 
 


Zurück zur Startseite