$bezeichnung_kommentar"; $error = "1"; } }
$previewschritt="$FORM{'previewschritt'}";
$comments = "$FORM{'message'}";
if ($previewschritt eq "1") {
$comments =~ s/\n//g;
$comments =~ s/"/\"/g;
$previewschritt="";
} else {
$comments =~ s/\n/
/g;
}
$wordlength++;
if ($comments =~/\w{$wordlength}/) {
$output="Kommentar enthält ein zu langes Wort!";
&missingfields;
}
$counttagright=0;
while ($comments =~/>/g) {
$counttagright++;
}
$counttagleft=0;
while ($comments =~/HTML-Tags wurden nicht richtig benutzt. Bitte korrigieren.";
&missingfields;
}
if ($error eq "1") {
$pr = "";
$pr .= "
Es wurden ein oder mehrere Felder nicht ausgefüllt, die benötigt werden (s.unten).
Bitte drücke den 'Back'-Button Deines Browsers, um das nachzuholen.";
$pr2 = "$output";
$output = "$pr";
$output .= "$pr2";
&missingfields;
}
if ($FORM{'uploadfile'} eq "") {
@days = ('Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag');
@months = ('1','2','3','4','5','6','7','8','9','10','11','12');
($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
$hour2=$hour+$timediff;
$time = sprintf("%02d:%02d:%02d",$hour2,$min,$sec);
$year += 1900;
$FORM{'date'} = "$mday.$months[$mon].$year";
if ($mon eq "12") {
$mon = "1";
} else {
++$mon;
}
($hour, $min) = split(/\:/, $time, 2);
$mydate = "$mday$mon$year$hour2$min";
$mydate =~ s/://g;
if ($signway eq "bottom") {
$path2 = "$messagepath"."entrylogs.txt";
open(HTML, ">>$path2");
print HTML "$mydate\n";
close(HTML);
} else {
$path2 = "$messagepath"."entrylogs.txt";
open(HTML, "<$path2");
&LockFile(HTML);
@info=;
close(HTML);
&UnLockFile(HTML);
&LockFile(HTML);
open(HTML, ">$path2");
print HTML "$mydate\n";
foreach $line (@info) {
print HTML "$line";
}
close(HTML);
&UnLockFile(HTML);
}
if ($moderated eq "ON"){
$status="OFF";
} else
{
$status="ON";
}
$ext = '.guestlog';
open(GUEST,">$messagepath$mydate$ext");
print GUEST "$FORM{'name'}|%%|$FORM{'email'}|%%|$FORM{'city'}|%%|$FORM{'URL'}|%%|$FORM{'homepage'}|%%|$FORM{'street'}|%%|$FORM{'plz'}|%%|$FORM{'bundesland'}|%%|$FORM{'country'}|%%|$FORM{'phone'}|%%|$FORM{'sex'}|%%|$FORM{'icq'}|%%|$FORM{'cust1'}|%%|$FORM{'cust2'}|%%|$FORM{'cust3'}|%%|$FORM{'cust4'}|%%|$FORM{'cust5'}|%%|$comments|%%|$FORM{'uploadfile'}|%%|$FORM{'date'}|%%|$ENV{'REMOTE_ADDR'}|%%|$FORM{'banner'}|%%|$status";
close(GUEST);
if (($sendvisitor eq "1") && ($FORM{'email'})) {
open(LOG,"<$messagepath"."guestzillathx.txt");
@gbmail_1=;
close(LOG);
open(MAIL,"|$mailprog -t") || &error("$font Mailprogramm konnte nicht geöffnet werden.");
print MAIL "From: $ownermail\n";
print MAIL "To: $FORM{'email'}\n";
print MAIL "Subject: $website_title\n\n";
foreach $line (@gbmail_1) {
#if ($FORM{'email'}) { $comments =~ s/[email]/\$FORM{'email'}/g; }
#if ($FORM{'name'}) { $comments =~ s/[name]/\$FORM{'name'}/g; }
print MAIL "$line";
}
print MAIL "\n";
close (MAIL);
}
if (($sendowner eq "1") && ($ownermail)) {
open(LOG,"<$messagepath"."guestzillanotify.txt");
@gbmail_1=;
close(LOG);
open(MAIL,"|$mailprog -t") || &error("$font Mailprogramm konnte nicht geöffnet werden.");
print MAIL "From: $ownermail\n";
print MAIL "To: $ownermail\n";
print MAIL "Subject: $website_title\n\n";
foreach $line (@gbmail_1) {
#if ($FORM{'email'}) { $comments =~ s/[email]/\$FORM{'email'}/g; }
#if ($FORM{'name'}) { $comments =~ s/[name]/\$FORM{'name'}/g; }
print MAIL "$line";
}
if ($include eq "1") {
print MAIL "------------\n";
print MAIL "Eintrag von: $FORM{'name'}\n";
if ($FORM{'email'} eq "") {
$FORM{'email'}="Keine EMail-Adresse angegeben.";
}
print MAIL "Mail-Adresse: $FORM{'email'}\n";
print MAIL "Kommentar:\n$comments\n";
print MAIL "\n";
if ($moderated eq "ON") {
print MAIL "Moderatoren-Modus ist eingeschaltet.\n";
print MAIL "Der Eintrag muss freigeschaltet werden.\n\n";
print "\n";
}
print MAIL "Nachricht loeschen:";
print MAIL "\n";
print MAIL "$scripturl?action=delete2&login=admin&password=$adminpwd";
print MAIL "&delete=$mydate\n";
print MAIL "\n";
print MAIL "Nachricht editieren:";
print MAIL "\n";
print MAIL "$scripturl?action=posts2&login=admin&password=$adminpwd";
print MAIL "&private=$mydate\n";
}
print MAIL "\n";
close (MAIL);
}
if ($messageorpage eq "1") {
if ($moderated ne "ON") {
print "Content-Type: text/html\n\n";
}
$output = "";
$output .= "
$font $thankyoumessage
$website_title";
if ($moderated eq "ON") {
$output .="
$font Der Moderatoren-Modus ist eingeschaltet.
Die Nachricht muss erst freigeschaltet werden.
";
}
print $output;
&footer;
}
else {
print"Location: $thankyoupage\n\n";
}
} else {
$comments =~ s/"/"/gi;
######################### UPLOAD ?
#########
#########
print "Content-Type: text/html\n\n";
&header;
print <<"EOM";
EOM
&footer;
}
}
###############################################
# Subroutine: UPLOAD
sub upload {
open(UPLOAD,"<$messagepath"."uploadconfig.txt") || &adminerror("File wurde nicht gefunden:
'uploadconfig.txt'");
$uploading=;
close(UPLOAD);
($imgdir,$ext1,$ext2,$maxkb,$maxfiles,$namebase,$fileurl,$scaleimage,$scalewidth, $scaleheight,$border,$scalefactor,$exceedbreite,$exceedhoehe,$andor,$firstfactor,$secondfactor) = split(/\|\%\%\|/, $uploading);
#Mailprobs einlesen
open(MAILPROP,"<$messagepath"."guestzillaemail.txt") || &adminerror("File wurde nicht gefunden:
'guestzillaemail.txt'");
$mailprops=;
close(MAILPROP);
($sendvisitor,$sendowner,$ownermail,$mailprog,$include) = split(/\|\%\%\|/, $mailprops);
use CGI qw(:standard);
use CGI;
my $req = new CGI;
$file = $req->param("upfile");
$filesize = (stat($file))[7]; #auslesen der Dateigrösse
$name= $req->param("name");
$email= $req->param("email");
$homepage= $req->param("homepage");
$icq= $req->param("icq");
$URL= $req->param("URL");
$street=$req->param("street");
$phone= $req->param("phone");
$plz= $req->param("plz");
$city= $req->param("city");
$bundesland= $req->param("bundesland");
$country= $req->param("country");
$sex= $req->param("sex");
$cust1= $req->param("cust1");
$cust2= $req->param("cust2");
$cust3= $req->param("cust3");
$cust4= $req->param("cust4");
$cust5= $req->param("cust5");
$banner= $req->param("banner");
$comments= $req->param("message");
$numberfile = "$messagepath/uploadcounter.txt";
if ($file ne "")
{
my $fileName = $file;
$fileName =~ s!^.*(\\|\/)!!;
$newmain = $fileName;
$extension = (lc(substr($newmain,length($newmain) - 4,4))); # file-extension auslesen
$filenotgood = "kacka"; # ggf 'yes' wieder löschen (aus voriger Schleife)
if (($extension ne $ext1) && ($extension ne $ext2))
{
$filenotgood = "yes";
}
&getnumber;
$dateiname = "$namebase$number$extension";
if (($filesize / 1000) > $maxkb)
{
&error("File ist zu gross!");
}
if ($number >= $maxfiles)
{
&error("Zu viele Files auf dem Server!");
}
if ($filenotgood eq "yes")
{
&error("Filetyp nicht unterstützt!");
}
} else {
error (" $font Kein File angegeben.");
}
open (OUTFILE, ">$imgdir/$dateiname");
while (my $bytesread = read($file, my $buffer, 1024))
{
print OUTFILE $buffer;
}
close (OUTFILE);
$number++;
&putnumber;
$file="$imgdir/$dateiname";
if ($extension eq $ext1) {
&gifsize("$file");
}
elsif ($extension eq $ext2) {
&jpegsize("$file");
} else {
unlink("$file");
&error_invalid_file_type;
}
if ($scaleimage eq "1") {
$FORM{'uploadfile'}="
";
}
elsif ($scaleimage eq "2"){
$percentwidth=$width/100;
$percentheight=$height/100;
$endwidth=$percentwidth*$scalefactor;
$endheight=$percentheight*$scalefactor;
$width=int($endwidth);
$height=int($endheight);
$FORM{'uploadfile'}="
";
}
elsif ($scaleimage eq "3"){
if ($andor eq "0") {
if (($width > $exceedbreite) && ($height > $exceedhoehe)) {
$percentwidth=$width/100;
$percentheight=$height/100;
$endwidth=$percentwidth*$firstfactor;
$endheight=$percentheight*$firstfactor;
$width=int($endwidth);
$height=int($endheight);
$secondfactor=100-$secondfactor;
while(($width > $exceedbreite) || ($height > $exceedhoehe)) {
$percentwidth=$width/100;
$percentheight=$height/100;
$endwidth=$percentwidth*$secondfactor;
$endheight=$percentheight*$secondfactor;
$width=int($endwidth);
$height=int($endheight);
}
}
}
elsif ($andor eq "1") {
if (($width > $exceedbreite) || ($height > $exceedhoehe)) {
$percentwidth=$width/100;
$percentheight=$height/100;
$endwidth=$percentwidth*$firstfactor;
$endheight=$percentheight*$firstfactor;
$width=int($endwidth);
$height=int($endheight);
$secondfactor=100-$secondfactor;
while(($width > $exceedbreite) || ($height > $exceedhoehe)) {
$percentwidth=$width/100;
$percentheight=$height/100;
$endwidth=$percentwidth*$secondfactor;
$endheight=$percentheight*$secondfactor;
$width=int($endwidth);
$height=int($endheight);
}
}
}
$FORM{'uploadfile'}="
";
}
else {
$FORM{'uploadfile'}="
";
}
@days = ('Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag');
@months = ('1','2','3','4','5','6','7','8','9','10','11','12');
($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
$hour2=$hour+$timediff;
$time = sprintf("%02d:%02d:%02d",$hour2,$min,$sec);
$year += 1900;
$FORM{'date'} = "$mday.$months[$mon].$year";
if ($mon eq "12") {
$mon = "1";
} else {
++$mon;
}
($hour, $min) = split(/\:/, $time, 2);
$mydate = "$mday$mon$year$hour2$min";
$mydate =~ s/://g;
if ($signway eq "bottom") {
$path2 = "$messagepath"."entrylogs.txt";
open(HTML, ">>$path2");
&LockFile(HTML);
print HTML "$mydate\n";
close(HTML);
&UnLockFile(HTML);
} else {
$path2 = "$messagepath"."entrylogs.txt";
open(HTML, "<$path2");
&LockFile(HTML);
@info=;
close(HTML);
&UnLockFile(HTML);
open(HTML, ">$path2");
&LockFile(HTML);
print HTML "$mydate\n";
foreach $line (@info) {
print HTML "$line";
}
close(HTML);
&UnLockFile(HTML);
}
if ($moderated eq "ON"){
$status="OFF";
} else
{
$status="ON";
}
$ext = '.guestlog';
open(GUEST,">$messagepath$mydate$ext");
print GUEST "$name|%%|$email|%%|$city|%%|$URL|%%|$homepage|%%|$street|%%|$plz|%%|$bundesland|%%|$country|%%|$phone|%%|$sex|%%|$icq|%%|$cust1|%%|$cust2|%%|$cust3|%%|$cust4|%%|$cust5|%%|$comments|%%|$FORM{'uploadfile'}|%%|$FORM{'date'}|%%|$ENV{'REMOTE_ADDR'}|%%|$banner|%%|$status";
close(GUEST);
if (($sendvisitor eq "1") && ($email ne "")) {
open(LOG,"<$messagepath"."guestzillathx.txt");
@gbmail_1=;
close(LOG);
open(MAIL,"|$mailprog -t") || &error("$font Mailprogramm konnte nicht geöffnet werden.");
print MAIL "From: $ownermail\n";
print MAIL "To: $email\n";
print MAIL "Subject: $website_title\n\n";
foreach $line (@gbmail_1) {
#if ($FORM{'email'}) { $comments =~ s/[email]/\$FORM{'email'}/g; }
#if ($FORM{'name'}) { $comments =~ s/[name]/\$FORM{'name'}/g; }
print MAIL "$line";
}
print MAIL "\n";
close (MAIL);
}
if (($sendowner eq "1") && ($ownermail)) {
open(LOG,"<$messagepath"."guestzillanotify.txt");
@gbmail_1=;
close(LOG);
open(MAIL,"|$mailprog -t") || &error("$font Mailprogramm konnte nicht geöffnet werden.");
print MAIL "From: $ownermail\n";
print MAIL "To: $ownermail\n";
print MAIL "Subject: $website_title\n\n";
foreach $line (@gbmail_1) {
#if ($FORM{'email'}) { $comments =~ s/[email]/\$FORM{'email'}/g; }
#if ($FORM{'name'}) { $comments =~ s/[name]/\$FORM{'name'}/g; }
print MAIL "$line";
}
if ($include eq "1") {
print MAIL "------------\n";
print MAIL "Eintrag von: $name\n";
if ($email eq "") {
$email="Keine EMail-Adresse angegeben.";
}
print MAIL "Mail-Adresse: $email\n";
print MAIL "Kommentar:\n$comments\n";
print MAIL "\n";
if ($moderated eq "ON") {
print MAIL "Moderatoren-Modus ist eingeschaltet.\n";
print MAIL "Der Eintrag muss freigeschaltet werden.\n\n";
print "\n";
}
print MAIL "Nachricht loeschen:";
print MAIL "\n";
print MAIL "$scripturl?action=delete2&login=admin&password=$adminpwd";
print MAIL "&delete=$mydate\n";
print MAIL "\n";
print MAIL "Nachricht editieren:";
print MAIL "\n";
print MAIL "$scripturl?action=posts2&login=admin&password=$adminpwd";
print MAIL "&private=$mydate\n";
print MAIL "\n";
}
print MAIL "\n";
close (MAIL);
}
if ($moderated ne "ON") {
}
&header;
if ($messageorpage eq "1") {
$output = "";
$output .= "
$font $thankyoumessage
$website_title";
if ($moderated eq "ON") {
$output .="
$font Danke!
Sobald ich wieder online bin, setze ich Ihren Eintrag in das Gästebuch ein.
";
}
print $output;
&footer;
}
else {
print "
$font Danke!
Sobald ich wieder online bin, setze ich Ihren Eintrag in das Gästebuch ein.
";
}
}
############################################################################
# File gegen gemeinsamen Zugriff schützen
############################################################################
sub LockFile {
local(*DATEI=@_) ;
if ($lock==1) {
flock(DATEI,2);
}
}
sub UnLockFile {
local(*DATEI=@_) ;
if ($Lock==1) {
flock(DATEI,8);
}
}
sub getnumber
{
open (NUMBERGET, "<$numberfile") || die "$numberfile nicht gefunden oder keine Berechtigung\n";
$number=;
close (NUMBERGET);
}
sub gifsize {
local($filename) = @_;
open(GIF, "<$filename") || &error_invalid_file_type;
read(GIF, $type, 6); $type =~ /GIF8[7,9]a/ || &error_invalid_file_type;
read(GIF, $s, 4) == 4 || &error_invalid_file_type; close(GIF);
($a,$b,$c,$d)=unpack("C"x4,$s);
# join ("", 'WIDTH=', $b<<8|$a, ' HEIGHT=', $d<<8|$c);
$width = $b<<8|$a;
$height = $d<<8|$c;
}
# jpegsize : gets the width and height (in pixels) of a jpeg file
# Andrew Tong, werdna@ugcs.caltech.edu February 14, 1995
# modified slightly by alex@ed.ac.uk
sub jpegsize {
open ( JPEG, $file );
binmode ( JPEG );
my($done)=0;
my($c1,$c2,$ch,$s,$length, $dummy)=(0,0,0,0,0,0);
my($a,$b,$c,$d);
if( read(JPEG, $c1, 1) &&
read(JPEG, $c2, 1) &&
ord($c1) == 0xFF &&
ord($c2) == 0xD8 ){
while (ord($ch) != 0xDA && !$done) {
# Find next marker (JPEG markers begin with 0xFF)
# This can hang the program!!
while (ord($ch) != 0xFF) { return(0,0) unless read(JPEG, $ch, 1); }
# JPEG markers can be padded with unlimited 0xFF's
while (ord($ch) == 0xFF) { return(0,0) unless read(JPEG, $ch, 1); }
# Now, $ch contains the value of the marker.
if ((ord($ch) >= 0xC0) && (ord($ch) <= 0xC3)) {
return(0,0) unless read (JPEG, $dummy, 3);
return(0,0) unless read(JPEG, $s, 4);
($a,$b,$c,$d)=unpack("C"x4,$s);
$width = $c<<8|$d;
$height = $a<<8|$b;
# return ($c<<8|$d, $a<<8|$b );
} else {
# We **MUST** skip variables, since FF's within variable names are
# NOT valid JPEG markers
return(0,0) unless read (JPEG, $s, 2);
($c1, $c2) = unpack("C"x2,$s);
$length = $c1<<8|$c2;
last if (!defined($length) || $length < 2);
read(JPEG, $dummy, $length-2);
}
}
}
return (0,0);
}
sub putnumber
{
open (NUMBERPUT, ">$numberfile") || die "$numberfile nicht gefunden oder keine Berechtigung\n";
print NUMBERPUT "$number";
close(NUMBERPUT);
}
sub error_invalid_file_type {
&error("$font Upload ist fehlgeschlagen.
Es können nur Dateien des Typs GIF oder JPG verwendet werden.
");
exit;
}
###############################################
# Subroutine: CHECKMAIL
sub checkmail {
local($email) = @_;
if ($email !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) {
&error("
$font Bitte eine gültige EMail-Adresse angeben.
");
&footer;
exit;
}
}
###############################################
# Subroutine: Fehlende Felder
sub missingfields {
print "Content-Type: text/html\n\n";
&header;
print "$font $output";
&footer;
exit;
}
###############################################
# Subroutine: Instant Delete
sub instantdelete {
print "Content-Type: text/html\n\n";
&header;
print "$font Nachricht $FORM{'number'} l\&\#246;schen.";
print "
";
&footer;
exit;
}
###############################################
# Subroutine: Instant Edit
sub instantedit {
print "Content-Type: text/html\n\n";
&header;
print "$font Nachricht $FORM{'number'} editieren.";
print "
";
&footer;
exit;
}
###############################################
# Subroutine: Error
sub error {
print "Content-Type: text/html\n\n";
&header;
local($e) = @_;
print "$font $e ";
&footer;
exit;
}
###############################################
# Subroutine: INPUTFIELD
sub inputfield {
open(LOG,"<$messagepath"."eingabefelder.txt") || &adminerror("File wurde nicht gefunden:
'eingabefelder.txt'");
$log=;
close(LOG);
($bezeichnung_name,$bezeichnung_email,$bezeichnung_city,$bezeichnung_URL,$bezeichnung_Homepagename,$bezeichnung_Strasse,$bezeichnung_plz,$bezeichnung_bundesland,$bezeichnung_country,$bezeichnung_phone,$bezeichnung_sex,$bezeichnung_icq,$bezeichnung_cust1,$bezeichnung_cust2,$bezeichnung_cust3,$bezeichnung_cust4,$bezeichnung_cust5,$bezeichnung_kommentar,$bezeichnung_uploadfile,$bzeichnung_datum,$bezeichnung_ip,$bezeichnung_banner) = split(/\|\%\%\|/, $log);
open(LOG,"<$messagepath"."eingabefelder_required.txt") || &adminerror("File wurde nicht gefunden:
'eingabefelder_required.txt'");
$log=;
close(LOG);
($require_name,$require_email,$require_city,$require_URL,$require_Homepagename,$require_Strasse, $require_plz, $require_bundesland, $require_country,$require_phone,$require_sex,$require_icq,$require_cust1,$require_cust2,$require_cust3,$require_cust4,$require_cust5,$require_kommentar,$require_uploadfile,$require_banner) = split(/\|\%\%\|/, $log);
if ($require_name eq "0") { $radio_name_0 = "checked";
} elsif ($require_name eq "1") { $radio_name_1 = "checked";
} elsif ($require_name eq "2") { $radio_name_2 = "checked";
} else { $radio_name_1 = "checked";
}
if ($require_banner eq "0") { $radio_banner_0 = "checked";
} elsif ($require_banner eq "1") { $radio_banner_1 = "checked";
} elsif ($require_banner eq "2") { $radio_banner_2 = "checked";
} else { $radio_banner_1 = "checked";
}
if ($require_email eq "0") { $radio_email_0 = "checked";
} elsif ($require_email eq "1") { $radio_email_1 = "checked";
} elsif ($require_email eq "2") { $radio_email_2 = "checked";
} else { $radio_email_1 = "checked";
}
if ($require_city eq "0") { $radio_city_0 = "checked";
} elsif ($require_city eq "1") { $radio_city_1 = "checked";
} elsif ($require_city eq "2") { $radio_city_2 = "checked";
} else { $radio_city_1 = "checked";
}
if ($require_URL eq "0") { $radio_URL_0 = "checked";
} elsif ($require_URL eq "1") { $radio_URL_1 = "checked";
} elsif ($require_URL eq "2") { $radio_URL_2 = "checked";
} else { $radio_URL_1 = "checked";
}
if ($require_Homepagename eq "0") { $radio_Homepagename_0 = "checked";
} elsif ($require_Homepagename eq "1") { $radio_Homepagename_1 = "checked";
} elsif ($require_Homepagename eq "2") { $radio_Homepagename_2 = "checked";
} else { $radio_Homepagename_1 = "checked";
}
if ($require_Strasse eq "0") { $radio_Strasse_0 = "checked";
} elsif ($require_Strasse eq "1") { $radio_Strasse_1 = "checked";
} elsif ($require_Strasse eq "2") { $radio_Strasse_2 = "checked";
} else { $radio_Strasse_1 = "checked";
}
if ($require_plz eq "0") { $radio_plz_0 = "checked";
} elsif ($require_plz eq "1") { $radio_plz_1 = "checked";
} elsif ($require_plz eq "2") { $radio_plz_2 = "checked";
} else { $radio_plz_1 = "checked";
}
if ($require_bundesland eq "0") { $radio_bundesland_0 = "checked";
} elsif ($require_bundesland eq "1") { $radio_bundesland_1 = "checked";
} elsif ($require_bundesland eq "2") { $radio_bundesland_2 = "checked";
} else { $radio_bundesland_1 = "checked";
}
if ($require_country eq "0") { $radio_country_0 = "checked";
} elsif ($require_country eq "1") { $radio_country_1 = "checked";
} elsif ($require_country eq "2") { $radio_country_2 = "checked";
} else { $radio_country_1 = "checked";
}
if ($require_phone eq "0") { $radio_phone_0 = "checked";
} elsif ($require_phone eq "1") { $radio_phone_1 = "checked";
} elsif ($require_phone eq "2") { $radio_phone_2 = "checked";
} else { $radio_phone_1 = "checked";
}
if ($require_sex eq "0") { $radio_sex_0 = "checked";
} elsif ($require_sex eq "1") { $radio_sex_1 = "checked";
} elsif ($require_sex eq "2") { $radio_sex_2 = "checked";
} else { $radio_sex_1 = "checked";
}
if ($require_icq eq "0") { $radio_icq_0 = "checked";
} elsif ($require_icq eq "1") { $radio_icq_1 = "checked";
} elsif ($require_icq eq "2") { $radio_icq_2 = "checked";
} else { $radio_icq_1 = "checked";
}
if ($require_cust1 eq "0") { $radio_cust1_0 = "checked";
} elsif ($require_cust1 eq "1") { $radio_cust1_1 = "checked";
} elsif ($require_cust1 eq "2") { $radio_cust1_2 = "checked";
} else { $radio_cust1_1 = "checked";
}
if ($require_cust2 eq "0") { $radio_cust2_0 = "checked";
} elsif ($require_cust2 eq "1") { $radio_cust2_1 = "checked";
} elsif ($require_cust2 eq "2") { $radio_cust2_2 = "checked";
} else { $radio_cust2_1 = "checked";
}
if ($require_cust3 eq "0") { $radio_cust3_0 = "checked";
} elsif ($require_cust3 eq "1") { $radio_cust3_1 = "checked";
} elsif ($require_cust3 eq "2") { $radio_cust3_2 = "checked";
} else { $radio_cust3_1 = "checked";
}
if ($require_cust4 eq "0") { $radio_cust4_0 = "checked";
} elsif ($require_cust4 eq "1") { $radio_cust4_1 = "checked";
} elsif ($require_cust4 eq "2") { $radio_cust4_2 = "checked";
} else { $radio_cust4_1 = "checked";
}
if ($require_cust5 eq "0") { $radio_cust5_0 = "checked";
} elsif ($require_cust5 eq "1") { $radio_cust5_1 = "checked";
} elsif ($require_cust5 eq "2") { $radio_cust5_2 = "checked";
} else { $radio_cust5_1 = "checked";
}
if ($require_uploadfile eq "0") { $radio_uploadfile_0 = "checked";
} elsif ($require_uploadfile eq "1") { $radio_uploadfile_1 = "checked";
} elsif ($require_uploadfile eq "2") { $radio_uploadfile_2 = "checked";
} else { $radio_uploadfile_1 = "checked";
}
if ($require_kommentar eq "0") { $radio_kommentar_0 = "checked";
} elsif ($require_kommentar eq "1") { $radio_kommentar_1 = "checked";
} elsif ($require_kommentar eq "2") { $radio_kommentar_2 = "checked";
} else { $radio_kommentar_1 = "checked";
}
print "Content-Type: text/html\n\n";
print "";
print "";
print "$scriptname - Administration von $website_title (Definition Eingabefelder)";
print "";
print "";
print "";
print "";
print "

";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
$font$font Definition der Eingabefelder:";
print "
";
&adminfooter;
}
###############################################
# Subroutine: INPUTFIELD2
sub inputfield2 {
open(LOG,">$messagepath"."eingabefelder.txt") || &adminerror("File wurde nicht gefunden:
'eingabefelder.txt'");
print LOG "$FORM{'bezeichnung_name'}|%%|$FORM{'bezeichnung_email'}|%%|$FORM{'bezeichnung_city'}|%%|$FORM{'bezeichnung_URL'}|%%|$FORM{'bezeichnung_Homepagename'}|%%|$FORM{'bezeichnung_Strasse'}|%%|$FORM{'bezeichnung_plz'}|%%|$FORM{'bezeichnung_bundesland'}|%%|$FORM{'bezeichnung_country'}|%%|$FORM{'bezeichnung_phone'}|%%|$FORM{'bezeichnung_sex'}|%%|$FORM{'bezeichnung_icq'}|%%|$FORM{'bezeichnung_cust1'}|%%|$FORM{'bezeichnung_cust2'}|%%|$FORM{'bezeichnung_cust3'}|%%|$FORM{'bezeichnung_cust4'}|%%|$FORM{'bezeichnung_cust5'}|%%|$FORM{'bezeichnung_kommentar'}|%%|$FORM{'bezeichnung_uploadfile'}|%%|$FORM{'Datum'}|%%|$FORM{'ip'}|%%|$FORM{'bezeichnung_banner'}|%%|$FORM{'status'}";
close(LOG);
open(LOG,">$messagepath"."eingabefelder_required.txt") || &adminerror("File wurde nicht gefunden:
'eingabefelder_required.txt'");
print LOG "$FORM{'q_name'}|%%|$FORM{'q_email'}|%%|$FORM{'q_city'}|%%|$FORM{'q_URL'}|%%|$FORM{'q_Homepagename'}|%%|$FORM{'q_Strasse'}|%%|$FORM{'q_plz'}|%%|$FORM{'q_bundesland'}|%%|$FORM{'q_country'}|%%|$FORM{'q_phone'}|%%|$FORM{'q_sex'}|%%|$FORM{'q_icq'}|%%|$FORM{'q_cust1'}|%%|$FORM{'q_cust2'}|%%|$FORM{'q_cust3'}|%%|$FORM{'q_cust4'}|%%|$FORM{'q_cust5'}|%%|$FORM{'q_kommentar'}|%%|$FORM{'q_uploadfile'}|%%|$FORM{'q_banner'}";
close(LOG);
print "Content-Type: text/html\n\n";
print "";
print "";
print "
$scriptname - Administration von $website_title (Definition Eingabefelder)";
print "
";
print "";
print "";
print "
";
print "

";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
$font
Eingabefelder aktualisiert!";
&adminfooter;
}
###############################################
# Subroutine: PICOPTS
sub picopts {
open(UPLOAD,"<$messagepath"."uploadconfig.txt") || &adminerror("File wurde nicht gefunden:
'uploadconfig.txt'");
$uploading=
;
close(UPLOAD);
($imgdir,$ext1,$ext2,$maxkb,$maxfiles,$namebase,$fileurl,$scaleimage,$scalewidth, $scaleheight,$border,$scalefactor,$exceedbreite,$exceedhoehe,$andor,$firstfactor,$secondfactor) = split(/\|\%\%\|/, $uploading);
print "Content-Type: text/html\n\n";
print "";
print "";
print "$scriptname - Administration von $website_title (Bild-Upload)";
print "";
print "";
print "";
print "";
print "

";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
$font$font Allgemeine Einstellungen:";
print "
";
&adminfooter;
}
###############################################
# Subroutine: PICOPTS2
sub picopts2 {
open(LOG,">$messagepath"."uploadconfig.txt") || &adminerror("File wurde nicht gefunden:
'uploadconfig.txt'");
print LOG "$FORM{'imgdir'}|%%|$FORM{'ext1'}|%%|$FORM{'ext2'}|%%|$FORM{'maxkb'}|%%|$FORM{'maxfiles'}|%%|$FORM{'namebase'}|%%|$FORM{'fileurl'}|%%|$FORM{'scale'}|%%|$FORM{'width'}|%%|$FORM{'height'}|%%|$FORM{'border'}|%%|$FORM{'factor'}|%%|$FORM{'exceedbreite'}|%%|$FORM{'exceedhoehe'}|%%|$FORM{'andor'}|%%|$FORM{'firstfactor'}|%%|$FORM{'secondfactor'}";
close(LOG);
print "Content-Type: text/html\n\n";
print "";
print "";
print "
$scriptname - Administration von $website_title (Bild-Upload)";
print "
";
print "";
print "";
print "
";
print "

";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
$font
Einstellungen aktualisiert!";
&adminfooter;
}
###############################################
# Subroutine: GENERAL
sub general {
open(LOG,"<$messagepath"."guestzillaproperties.txt") || &adminerror("File wurde nicht gefunden:
'guestzillaproperties.txt'");
$properties=
;
close(LOG);
($adminpwd, $scriptname, $website_title,$signway,$badwordfilter,$allowhtml,$entriesperpage,$usefasthtm,$timediff,$translateemote,$previewon,$wordlength,$moderated,$code,$popwidth,$popheigth) = split(/\|\%\%\|/, $properties);
$adminpwd=(reverse $adminpwd);
$adminpwd =~ tr/c-zab/a-z/;
$adminpwd =~ tr/b-za/a-z/;
print "Content-Type: text/html\n\n";
print "";
print "";
print "$scriptname - Administration von $website_title (Allgemeine Einstellungen)";
print "";
print "";
print "";
print "";
print "

";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
$font$font Allgemeine Einstellungen:";
print "
";
&adminfooter;
}
###############################################
# Subroutine: GENERAL2
sub general2 {
$password=$FORM{'password'};
$password =~ tr/a-z/b-za/;
$password =~ tr/a-z/c-zab/;
$password=(reverse $password);
open(LOG,">$messagepath"."guestzillaproperties.txt") || &adminerror("File wurde nicht gefunden:
'guestzillaproperties.txt'");
print LOG "$password|%%|$FORM{'scriptname'}|%%|$FORM{'title'}|%%|$FORM{'signway'}|%%|$FORM{'badword'}|%%|$FORM{'html'}|%%|$FORM{'entries'}|%%|$FORM{'fast'}|%%|$FORM{'timediff'}|%%|$FORM{'translate'}|%%|$FORM{'pre'}|%%|$FORM{'wordlength'}|%%|$FORM{'moderate'}|%%|$FORM{'code'}|%%|$FORM{'popwidth'}|%%|$FORM{'popheigth'}";
close(LOG);
print "Content-Type: text/html\n\n";
print "";
print "";
print "
$scriptname - Administration von $website_title (Allgemeine Einstellungen)";
print "
";
print "";
print "";
print "
";
print "

";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
$font
Einstellungen aktualisiert!";
&adminfooter;
}
###############################################
# Subroutine: OUTPUT
sub output {
#Output einlesen
open(OUTPUT,"<$messagepath"."guestzillaoutput.txt") || &adminerror("File wurde nicht gefunden:
'guestzillaoutput.txt'");
$output=