#!/usr/bin/perl ####################################################################### # # # Free Perl Guestbook written 2002 by # # # # Tri Dung Nguyen # # www.vitinh.de # # # # Version 1.23 - 06.Aug.03 # # Copyright (C) 2002-2003 # # # # This guestbook is absolutely free, for private and for # # commercial sites. # # # # You may not sell this script. You may offer it freely to # # others. You may not alter the code and then call it another # # name. You may not alter the code and then resell it under # # another name, either. # # # # All copyright notices and the download links at the bottom of # # the guestbook (when the pages are viewed on the internet) must # # remain intact! # # # # This program is provided in the hope that it will be useful, # # but without warranty. You must decide between two things: # # using or not using it! # # # # For help, take a look at the support page at: # # # # www.vitinh.de # # # ####################################################################### ####################################################################### # # # You may change the first line of this page if the path to # # PERL on your server is not "/usr/bin/perl". Contact your admin # # or take a look at the HELP, or FAQ page of the provider to get # # this. # # # ####################################################################### $SEND_MAIL="/usr/lib/sendmail -t"; #(comment if server OS is Windows) #use Net::SMTP; # (UNcomment if server OS is Windows) #$smtp = Net::SMTP->new("localhost"); # (UNcomment if server OS is Windows) ####################################################################### # # # You may change the line above if the path to SENDMAIL on your # # server is not "/usr/lib/sendmail -t" # # # ####################################################################### ####################################################################### # # # NO CHANGES UNDER THIS LINE REQUIRED # # Changing of program codes may cause the fatal errors! # # # # UNTERHALB DIESER NACHRICHT NICHTS AENDERN # # Es koennte zur Fehlfunktion des Gaestebuches fuehren! # # # # KHONG THAY DOI GI DUOI DONG CHU NAY # # Thay doi trong ma nguon co the lam hong chuong trinh! # # # # NE PAS CHANGER LE TEXTE APRÈS CE MESSAGE! # # # ####################################################################### ####################### BEGIN OF PROGRAM CODE ######################### $Version = "1.23"; $online = 1; $demo = 0; use CGI::Carp qw(fatalsToBrowser); use CGI qw(:standard); use Time::Local; $conttype = "Content-type: text/html\n\n"; $file_url = "http://www.vitinh.de/downloads/guestbook"; $update_service = "http://www.vitinh.de/cgi-bin/update_service.cgi"; $language_page = $file_url."/languages.htm"; if($online == 0){ $file_url = "file://D:/Website/Tri Dung"; $update_service = "update_service.cgi"; } $readonly = ""; $demo_info = ""; if($demo == 1){ $readonly = "readonly"; $demo_info = "
This is a demo guestbook, you cannot change anything on this page!
"; } ################### Wichtige Variablen Definition ##################### $dir = "./tdpn_v_10_dir"; $guestbook_datei = "$dir/guestbook.datei"; $guestbook_setup = "$dir/guestbook.setup"; $guestbook_lang = "$dir/guestbook.lang"; $guestbook_lang_de = "$dir/guestbook_de.lang"; $guestbook_lang_vn = "$dir/guestbook_vn.lang"; $guestbook_lang_fr = "$dir/guestbook_fr.lang"; $guestbook_lang_own = "$dir/guestbook_own.lang"; $guestbook_style = "$dir/guestbook.style"; $guestbook_pass = "$dir/guestbook.pass"; $guestbook_private_pass = "$dir/guestbook_private.pass"; $default_pass = "tridung"; $guestbook_bad_words = "$dir/guestbook_bad.words"; $guestbook_icons = "$dir/guestbook.icons"; $tdpn_1 = "


Download Free Perl Guestbook Version $Version
"; $tdpn_2 = "FPG $Version by www.vitinh.de - © 2002-2003
"; $guestgook_title_images_online = "\"Free"; $info_title_color = "red"; $dir =~ s/\.\///; $info_reason = qq( Some reasons why this error occured: Things you may do: If you are not the guestbook owner, please inform his/her about this error!
); $info_login = qq(
); ################### Wichtige Kontrolle ################################# if(not((-e $dir) or (-d $dir))){ &install; } ######## Die Aktionen und Werte aus FORM ############################### &get_date; &extract_form; ######### Get info from form #################### sub extract_form{ if ($ENV{'REQUEST_METHOD'} eq "GET") { $buffer = $ENV{'QUERY_STRING'}; } elsif ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } @pairs = split(/\&/, $buffer); foreach $pair (@pairs){ ($name, @values) = split(/=/, $pair); $value = join ("=", @values); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } } $page_to_show = $FORM{'page_to_show'}; $sign_name = $FORM{'sign_name'}; $sign_email = $FORM{'sign_email'}; $sign_url = $FORM{'sign_url'}; $sign_ip = $FORM{'sign_ip'}; $sign_home = $FORM{'sign_home'}; $sign_message = $FORM{'sign_message'}; $sign_preview = $FORM{'sign_preview'}; $password = $FORM{'password'}; $user_pass = $FORM{'user_pass'}; $control_number = $FORM{'control_number'}; ######### Style Variablen ############## $New_Owner_Name = $FORM{'Owner_Name'}; $New_Owner_Email = $FORM{'Owner_Email'}; $Mail_To_Me = $FORM{'Mail_To_Me'}; if((!$Mail_To_Me) or ($Mail_To_Me eq "")){ $Mail_To_Me = "off"; } $Mail_To_Him = $FORM{'Mail_To_Him'}; $Mail_To_Him = $FORM{'Mail_To_Him'}; if((!$Mail_To_Him) or ($Mail_To_Him eq "")){ $Mail_To_Him = "off"; } $New_Password = $FORM{'New_Password'}; $New_Max_Entries_Per_Page = $FORM{'Max_Entries_Per_Page'}; $New_Big_Table_Background = $FORM{'Big_Table_Background'}; $New_Big_Table_BgColor = $FORM{'Big_Table_BgColor'}; $New_Table_Background = $FORM{'Table_Background'}; $New_Table_BgColor = $FORM{'Table_BgColor'}; $New_Book_Title_Text = $FORM{'Book_Title_Text'}; $New_Book_Title_Image = $FORM{'Book_Title_Image'}; $New_GB_BgColor = $FORM{'GB_BgColor'}; $New_GB_Background = $FORM{'GB_Background'}; $New_Message_BgColor = $FORM{'Message_BgColor'}; $New_Message_Header_BgColor = $FORM{'Message_Header_BgColor'}; $New_Message_Footer_BgColor = $FORM{'Message_Footer_BgColor'}; $New_Font_Color = $FORM{'Font_Color'}; $New_Email_Icon = $FORM{'Email_Icon'}; $New_Homepage_Icon = $FORM{'Homepage_Icon'}; $New_Book_Language = $FORM{'Book_Language'}; $New_Vietuni = $FORM{'Vietuni'}; $New_Vietnamese_Typing_Script = $FORM{'Vietnamese_Typing_Script'}; $New_Owner_Homepage = $FORM{'Owner_Homepage'}; $New_CSS_Area = $FORM{'CSS_Area'}; $New_CSS_Area =~ s/\"//g; ######### Edit Options ################# $his_date = $FORM{'his_date'}; $his_time_in_sec = $FORM{'his_time_in_sec'}; $his_ip = $FORM{'his_ip'}; $my_reply = $FORM{'my_reply'}; $action = $FORM{'action'}; if($action eq "restore"){ if(&password){ &install; } else{ $info_title = "ERROR!"; $info = "The password you entered was not correct!"; $info_reason = qq(Note: this is the owner password.

Click [here] to go back! ); &info; } } elsif($action eq "control"){ &read_files; $info_title = "$Owner_Name\'s Guestbook Control Panel"; if($Owner_Name =~ /s$/i){ $info_title = "$Owner_Name\' Guestbook Control Panel"; } $info_title_color = "#7083c7"; $info = qq(Only the owner can change the preferences of this guestbook. Please choose an action and enter your owner password to continue! ); $info_reason = ""; if($control_number){ $info = qq(Only the owner can edit, delete, reply messages. Please choose an action and enter your owner password to continue! ); $info_login = qq(
Choose an action:
Password:
); } else{ $info_login = qq(
Choose an action:
Password:
); } &info; } elsif($action eq "edit"){ if(&password){ &read_files; &get_icons; &create_edit_page; } else{ $info_title = "INVALID PASSWORD!"; $info = "Invalid password!"; $info_reason = "Please try again!"; $info_login = qq(
Choose an action:
Password:
); &info; } } elsif($action eq "delete"){ if(&password){ &read_files; &delete_now; } else{ $info_title = "INVALID PASSWORD!"; $info = "Invalid password!"; $info_reason = "Please try again!"; $info_login = qq(
Choose an action:
Password:
); &info; } } elsif($action eq "chpref"){ if(&password){ &read_files; &preferences; } else{ $info_title = "INVALID PASSWORD!"; $info = "Invalid password!"; $info_reason = ""; $info_login = qq([Go back] and try again! ); &info; } } elsif($action eq "save_prefs"){ if(&password){ &read_files; &save_prefs; } else{ $info_title_color = "red"; $info_title = "ERROR!"; $info = "Sorry, you cannot run this program from here!"; $info_reason = "Do not try to hack this guestbook!"; $info_reason .= " Your IP ($ENV{'REMOTE_ADDR'}) has been sent to the guestbook owner!"; $info_login = ""; &hacked; &info; } } elsif($action eq "chicons"){ if(&password){ &read_files; &chicons; } else{ $info_title = "INVALID PASSWORD!"; $info = "Invalid password!"; $info_reason = ""; $info_login = qq([Go back] and try again! ); &info; } } elsif($action eq "save_icons"){ if(&password){ &read_files; &save_icons; } else{ $info_title_color = "red"; $info_title = "ERROR!"; $info = "Sorry, you cannot run this program from here!"; $info_reason = "Do not try to hack this guestbook!"; $info_reason .= " Your IP ($ENV{'REMOTE_ADDR'}) has been sent to the guestbook owner!"; $info_login = ""; &hacked; &info; } } elsif($action eq "sign"){ &check_user_pass; &read_files; &get_icons; &sign_gb; } elsif($action eq "add"){ &check_user_pass; &read_files; &add_entry; } elsif($action eq "preview"){ &check_user_pass; &read_files; &preview; } elsif($action eq "save_edited"){ if(&password){ &read_files; &save_edited; } else{ $info_title_color = "red"; $info_title = "ERROR!"; $info = "Sorry, you cannot run this program from here!"; $info_reason = "Do not try to hack this guestbook!"; $info_reason .= " Your IP ($ENV{'REMOTE_ADDR'}) has been sent to the guestbook owner!"; $info_login = ""; &hacked; &info; } } elsif($action eq "set_cookie"){ open(PASS, "<$guestbook_private_pass") or die "Cannot check user password!"; my $UserPass = ; close(PASS); if($user_pass eq $UserPass){ &set_cookie; $conttype = ""; $info_title_color = "#7083c7"; $info_title = "Authorized!"; $info = "You are logged in! Please click the button below to enter guestbook!"; $info_reason = "Note: Don't forget to [log out] if you are using a public computer (in internet cafe, in library...)"; $info_login = qq(
); &info; } else{ $info_title = "Authorization required!"; $info_title_color = "red"; $info = "The password you entered was not correct!"; $info_reason = "Please enter password and click Log in to continue! You may have to contact the webmaster to get this password!"; $info_login = qq(
Password:
Save password
); &info; } } elsif($action eq "log_out"){ &log_out; $conttype = ""; $info_title_color = "#7083c7"; $info_title = "Logged out!"; $info = "You are logged out! Thank you for visiting!"; $info_reason = ""; $info_login = qq(
); &info; } elsif($action eq "last_entry"){ &check_user_pass; &read_files; &last_entry; } else{ &check_user_pass; &read_files; &create_page; } ######### Time and Date ############################################### sub zweistellig { if(length ($_[0]) <2) { return "0".$_[0]; } else { return $_[0]; } } sub get_date{ ($sec, $min, $std, $tag, $mon, $jahr) = localtime(time); $sec = &zweistellig ($sec); $min = &zweistellig ($min); $std = &zweistellig ($std); $tag = &zweistellig ($tag); $mon = &zweistellig (++$mon); $jahr = $jahr + 1900; $sign_time_in_sec = timelocal($sec,$min,$std,$tag,$mon-1,$jahr-1900); $sign_time = $jahr.".".$mon.".".$tag." - ".$std.":".$min.":".$sec; $sign_date = $jahr.$mon.$tag; } ####################################################################### sub install{ ####### SET UP ######################################################## $guestbook_setup_content = qq(STYLE===guestbook.style=== LANGUAGE===guestbook.lang=== MAIL_TO_ME===on=== MAIL_TO_HIM===on=== ); ####### LANGUAGE ##### $guestbook_lang_content = qq(####### English ####### Charset="iso-8859-1"= Owner_Name="Webmaster"= Owner_Email="you\@yourserver.com"= Owner_Replied="replied"= Total_Entries="Total entries:"= On_Page="on"= Total_Pages="pages"= Viewing_Page="Viewing page:"= Homepage="Home page"= User_Is_From="from"= User_Wrote_On="wrote on"= User_Wrote_At="at"= JS_Last_Page="This is the last page!"= JS_First_Page="This is the first page!"= JS_Please_Fill_In_Required="Please fill in all required fields"= FORM_Required="(required)"= FORM_Select_Page="Select a page"= FORM_Sign_Button="Sign guestbook"= View_Guestbook="View guestbook"= Feel_Free_To_Tell="Feel free to tell me what you think"= Preview_Of_Your_Message="Preview of your message"= Your_Name="Your name:"= Your_Email="Your e-mail:"= Your_URL="Your homepage:"= Your_Home="You are from:"= Your_Message="Your message:"= FORM_View_Button="View guestbook"= FORM_Write_Button="Write it down"= FORM_Reset_Button="Reset all"= FORM_Back_Button=" Go back "= Sign_Options="Options:"= English_Typing="English typing"= Vietnamese_Typing="Vietnamese typing (kiểu TELEX)"= HTML_Disabled="HTML disabled"= Preview="Show preview page before writing"= Thank_Title="Thank you!"= Thank_Message="Thank you! Your message has been added to my guestbook!"= Email_Not_Valid="Email not valid!"= Email_Not_Valid_Message="The e-mail you entered has a not valid format!"= ); $guestbook_lang_content_de = qq(####### German ####### Charset="iso-8859-1"= Owner_Name="Webmaster"= Owner_Email="you\@yourserver.com"= Owner_Replied="antwortet"= Total_Entries="Einträge:"= On_Page="auf"= Total_Pages="Seiten"= Viewing_Page="Aktuelle Seite:"= Homepage="Homepage"= User_Is_From="aus"= User_Wrote_On="schrieb am"= User_Wrote_At="um"= JS_Last_Page="Dies ist die letzte Seite!"= JS_First_Page="Dies ist die erste Seite!"= JS_Please_Fill_In_Required="Bitte alle erforderlichen Felder ausfüllen!"= FORM_Required="(erforderlich)"= FORM_Select_Page="Seitenauswahl"= FORM_Sign_Button="Eintragen"= View_Guestbook="Einträge lesen"= Feel_Free_To_Tell="Hier kannst Du Deine Meinung schreiben"= Preview_Of_Your_Message="Vorschau von Deiner Nachricht"= Your_Name="Dein Name:"= Your_Email="Deine E-Mail:"= Your_URL="Deine Homepage:"= Your_Home="Du kommst aus:"= Your_Message="Deine Nachricht:"= FORM_View_Button="Einträge lesen"= FORM_Write_Button="Eintragen"= FORM_Reset_Button="Zurücksetzen"= FORM_Back_Button=" Zurück "= Sign_Options="Optionen:"= English_Typing="English typing"= Vietnamese_Typing="Vietnamese typing (kiểu TELEX)"= HTML_Disabled="HTML deaktiviert"= Preview="Vorschau-Funktion"= Thank_Title="Vielen Dank!"= Thank_Message="Deine Nachricht wurde erfolgreich übertragen und gespeichert"= Email_Not_Valid="Email ungütig!"= Email_Not_Valid_Message="Die von Dir eingegebene E-Mail Adresse hat kein gütiges Format!"= ); $guestbook_lang_content_vn = qq(####### Vietnamese ####### Charset="iso-8859-1"= Owner_Name="Webmaster"= Owner_Email="you\@yourserver.com"= Owner_Replied="trả lời"= Total_Entries="Tổng số lưu bút:"= On_Page="trên"= Total_Pages="trang"= Viewing_Page="Đang xem trang:"= Homepage="Trang chủ"= User_Is_From="đến từ"= User_Wrote_On="viết ngày"= User_Wrote_At="lúc"= JS_Last_Page="Day la trang cuoi!"= JS_First_Page="Day la trang dau!"= JS_Please_Fill_In_Required="Lam on dien day du cac o bat buoc!"= FORM_Required="(bắt buộc)"= FORM_Select_Page="Xem trang khác"= FORM_Sign_Button="Viết lưu bút"= View_Guestbook="Xem lưu bút"= Feel_Free_To_Tell="Hãy để lại vài dòng lưu bút"= Preview_Of_Your_Message="Duyệt lại lưu bút của bạn"= Your_Name="Tên bạn:"= Your_Email="E-mail của bạn:"= Your_URL="Homepage của bạn:"= Your_Home="Bạn đến từ:"= Your_Message="Lưu bút:"= FORM_View_Button="Xem sổ lưu bút"= FORM_Write_Button="Viết lưu bút"= FORM_Reset_Button=" Soạn lại "= FORM_Back_Button=" Quay lại "= Sign_Options="Lựa chọn:"= English_Typing="English typing"= Vietnamese_Typing="Vietnamese typing (kiểu TELEX)"= HTML_Disabled="không hỗ trợ HTML"= Preview="Duyệt lưu bút trước khi ghi"= Thank_Title="Cám ơn bạn!"= Thank_Message="Cám ơn bạn đã bớt chút thời gian viết lưu bút."= Email_Not_Valid="Ðịa chỉ E-mail sai!"= Email_Not_Valid_Message="Ðịa chỉ E-mail bạn đưa không chính xác. Làm ơn xem lại!"= ); $guestbook_lang_content_fr = qq(####### Francais ####### Charset="iso-8859-1"= Owner_Name="Webmaster"= Owner_Email="you\@yourserver.com"= Owner_Replied="répond"= Total_Entries="Inscriptions totals:"= On_Page="à"= Total_Pages="pages"= Viewing_Page="Page actuelle:"= Homepage="Page d'accueil"= User_Is_From="de"= User_Wrote_On="a écrit à"= User_Wrote_At=" - "= JS_Last_Page="C'est la dernière page!"= JS_First_Page="C'est la première page!"= JS_Please_Fill_In_Required="Veuillez compléter tous les champs requis"= FORM_Required="(entrée obligatoire)"= FORM_Select_Page="Choisissez une page"= FORM_Sign_Button="Faire une inscription"= View_Guestbook="Livre d'hôtes"= Feel_Free_To_Tell="Donnez-moi votre opinion..."= Preview_Of_Your_Message="Aperçu de votre message"= Your_Name="Votre nom:"= Your_Email="Votre e-mail:"= Your_URL="Votre page web:"= Your_Home="Votre localité:"= Your_Message="Votre commentaire:"= FORM_View_Button="Livre d'hôtes"= FORM_Write_Button="Envoyer"= FORM_Reset_Button="Annuler"= FORM_Back_Button=" Retourner "= Sign_Options="Options:"= English_Typing="English typing"= Vietnamese_Typing="Vietnamese typing (kiểu TELEX)"= HTML_Disabled="HTML handicapé"= Preview="Indiquer prévision"= Thank_Title="Merci!"= Thank_Message="Merci! Votre message a été ajouté à mon livre d'hôtes!"= Email_Not_Valid="Email inadmissible!"= Email_Not_Valid_Message="Le E-mail que vous avez écrit a un format inadmissible!"= ); ####### STYLE ######## $guestbook_style_content = qq(####### HTML Header ########################## <-Anfang HTML Head-> == WELCOME TO MY GUESTBOOK! == <-Ende HTML Head-> ####### CSS Datei fuers GB ################### <-Anfang CSS-> <-Ende CSS-> ####### HTML Body ########################### <-Anfang HTML Body-> <-Ende HTML Body-> ####### HTML Foot ########################### <-Anfang HTML Foot-> <-Ende HTML Foot-> ####### So soll die Seite aussehen ########## ####### Vorsicht bei der Mustererkennung #### <-Anfang PAGE Definition-> Max_Entries_Per_Page="10"= Max_Word_Length="40"= Dirty_Words_Filter_Status="on"= Dirty_Words_Filter_Option="error"= Big_Table_Width="95%"= Big_Table_BgColor="#7083c7"= Big_Table_Background="$file_url/images/big_table_bg.gif"= Big_Table_Padding="1"= Big_Table_Spacing="0"= Table_Width="100%"= Table_BgColor="#7083c7"= Table_Background="$file_url/images/table_head_bg.gif"= Table_Padding="0"= Table_Spacing="1"= Font_Face="Verdana, Arial"= Font_Size="2"= Font_Color="#7083c7"= Book_Title_Text="WELCOME TO MY GUESTBOOK!"= Book_Title_Image="$file_url/images/guestbook.jpg"= GB_BgColor="#ffffff"= GB_Background=""= Message_BgColor="#ffffff"= Message_Header_BgColor="#f0f0f0"= Message_Footer_BgColor="#f6f6f6"= Email_Icon="$file_url/images/email_icon.gif"= Homepage_Icon="$file_url/images/homepage_icon.gif"= FPG_And_Smileys_Script="$file_url/scripts/fpg_and_smileys.js"= FPG_Codes="on"= Smileys="on"= Vietuni="off"= Vietnamese_Typing_Script="$file_url/scripts/vietuni.js"= Owner_Homepage="http://www.tridung.de"= TimezoneOffset="0"= <-Ende PAGE Definition-> ); if($action eq "restore"){ print $conttype; print qq~ Guestbook Restore
GUESTBOOK RESTORE
Guestbook Restore has performed these tasks:
    ~; open(SETUP, ">$guestbook_setup") or die "Cannot open $guestbook_setup $!"; print SETUP $guestbook_setup_content; close(SETUP); print qq~
  • Created a setup file. ~; open(LANG, ">$guestbook_lang") or die "Cannot open $guestbook_lang $!"; print LANG $guestbook_lang_content; close(LANG); print qq~
  • Created a default language file (English). ~; open(LANG, ">$guestbook_lang_de") or die "Cannot open $guestbook_lang_de $!"; print LANG $guestbook_lang_content_de; close(LANG); print qq~
  • Created a language file (German). ~; open(LANG, ">$guestbook_lang_vn") or die "Cannot open $guestbook_lang_vn $!"; print LANG $guestbook_lang_content_vn; close(LANG); print qq~
  • Created a language file (Vietnamese). ~; open(LANG, ">$guestbook_lang_fr") or die "Cannot open $guestbook_lang_fr $!"; print LANG $guestbook_lang_content_fr; close(LANG); print qq~
  • Created a language file (French). ~; open(STYLE, ">$guestbook_style") or die "Cannot open $guestbook_style $!"; print STYLE $guestbook_style_content; close(STYLE); print qq~
  • Created a style file. ~; if(&create_icons){ print "
  • Created a icons file."; } if(not(-e $guestbook_datei)){ open(DATEI, ">$guestbook_datei") or die "Cannot open $guestbook_datei $!"; print DATEI ""; close(DATEI); print qq~
  • Created an empty guestbook entries file. ~; } else{ print "
  • Your guestbook entries stay intact."; } $chmoded = chmod 0777, $guestbook_setup, $guestbook_lang, $guestbook_lang_de, $guestbook_lang_vn, $guestbook_lang_fr, $guestbook_style, $guestbook_icons, $guestbook_datei; print qq~
  • Your password stays intact.
  • $chmoded files successfully chmoded (777).
Enjoy your new FPG $Version!

-- Tri Dung --

$tdpn_2
~; } else{ print $conttype; print qq~ Setup Routine
SETUP ROUTINE
~; mkdir ($dir, 0777) or die "Cannot create file directory. $! Please check write permission on your server!"; print qq~ This is the first time you use Free Perl Guestbook of VITINH.DE

Please wait while I'm setting up the guestbook for you...
  • File directory created. ~; open(SETUP, ">$guestbook_setup") or die "Cannot open $guestbook_setup $!"; print SETUP $guestbook_setup_content; close(SETUP); print qq~
  • Setup file created. ~; open(LANG, ">$guestbook_lang") or die "Cannot open $guestbook_lang $!"; print LANG $guestbook_lang_content; close(LANG); print qq~
  • Default language file created (English). ~; open(LANG, ">$guestbook_lang_de") or die "Cannot open $guestbook_lang_de $!"; print LANG $guestbook_lang_content_de; close(LANG); print qq~
  • Language file created (German). ~; open(LANG, ">$guestbook_lang_vn") or die "Cannot open $guestbook_lang_vn $!"; print LANG $guestbook_lang_content_vn; close(LANG); print qq~
  • Language file created (Vietnamese). ~; open(LANG, ">$guestbook_lang_fr") or die "Cannot open $guestbook_lang_fr $!"; print LANG $guestbook_lang_content_fr; close(LANG); print qq~
  • Language file created (French). ~; open(STYLE, ">$guestbook_style") or die "Cannot open $guestbook_style $!"; print STYLE $guestbook_style_content; close(STYLE); print qq~
  • Style file created. ~; if(&create_icons){ print "
  • Icons file created."; } open(DATEI, ">$guestbook_datei") or die "Cannot open $guestbook_datei $!"; print DATEI ""; close(DATEI); print qq~
  • An empty guestbook entries file created. ~; $default_pass_crypted = crypt($default_pass, "tridung"); open(PASS, ">$guestbook_pass"); print PASS $default_pass_crypted; close(PASS); $chmoded = chmod 0777, $guestbook_setup, $guestbook_lang, $guestbook_lang_de, $guestbook_lang_vn, $guestbook_lang_fr, $guestbook_style, $guestbook_datei, $guestbook_icons, $guestbook_pass; print qq~
  • $chmoded files successfully chmoded (777).
  • Your default owner-password is: $default_pass. You must change this password to protect your guestbook! Go to the [Control Panel] of this guestbook to change the password!
Installation completed! Enjoy your new FPG $Version!

-- Tri Dung --

$tdpn_2
~; } ################# Ende Wichtige Variablen Definition ################# exit; } ########## Anfang Funktion read_files ################################ sub read_files{ ######## Lese guestbook.setup ######################################## $cop1 = "Please don't change the copyright notice!"; $cop2 = "The copyright notice must stay intact!"; if(not(-e $guestbook_icons)){ &create_icons; } if(not(-e $guestbook_bad_words)){ $all_dirty_words = qq(fucks shithead shite shit shits twat nigger motherfucker fucker cunt sucker cock bastard fuck fucking wanks wank cunts bastards wankers wanker arsehole arseholes arse-hole arse-holes arse-licker arse-lickers arselicker arselickers arse arses ficken fickt ficke fickte fickst gefickt ficker arsch arschloch arschficker arschlecker wichser wichsen wichst wichse gewichst bumsen bumse bumst gebumst bumser nutte nutten hure huren hurensohn hurensöhne merde); $all_dirty_words =~ s/\t//g; # entfernt Tabulatoren open(BAD, ">$guestbook_bad_words") or die "Cannot create dirty words list $!"; print BAD $all_dirty_words; close(BAD); } open(BAD, "<$guestbook_bad_words") or die "Cannot open $guestbook_bad_words $!"; while(){ $Dirty_Words .= $_; } $Dirty_Words =~ s/\n/ /g; close(BAD); if(not(-e $guestbook_setup)){ $info_title = "INTERNAL ERROR!"; $guestbook_setup =~ s/$dir\///ig; $info = "The file $guestbook_setup does not exist!

This file must have been deleted or moved by you!"; &info; } open(SETUP, "<$guestbook_setup") or die "Cannot open $guestbook_setup"; while(){ $setup_temp .= $_; } close(SETUP); my @setup_temp_array = split(/\n/, $setup_temp); my $sta = 0; while($sta < scalar @setup_temp_array){ if($setup_temp_array[$sta] =~ m/^STYLE\=\=\=(.+)(\.style)\=\=\=$/ig) { $style_file = $setup_temp_array[$sta]; $style_file =~ s/^STYLE\=\=\=(.+)(\.style)\=\=\=$/$1$2/ig; $style_file = "$dir/$style_file"; } if($setup_temp_array[$sta] =~ m/^LANGUAGE\=\=\=(.*)(\.lang)\=\=\=$/ig) { $language_file = $setup_temp_array[$sta]; $Book_Language = $language_file; $language_file =~ s/^LANGUAGE\=\=\=(.+)(\.lang)\=\=\=$/$1$2/ig; $language_file = "$dir/$language_file"; $Book_Language =~ s/^LANGUAGE\=\=\=guestbook_(.*)(\.lang)\=\=\=$/$1/ig; if($Book_Language eq "LANGUAGE===guestbook.lang==="){ $Book_Language = "en"; } } if($setup_temp_array[$sta] =~ m/^MAIL_TO_ME\=\=\=(.+)\=\=\=$/ig) { $MTM = $setup_temp_array[$sta]; $MTM =~ s/^MAIL_TO_ME\=\=\=(.+)\=\=\=$/$1/ig; } if($setup_temp_array[$sta] =~ m/^MAIL_TO_HIM\=\=\=(.+)\=\=\=$/ig) { $MTH = $setup_temp_array[$sta]; $MTH =~ s/^MAIL_TO_HIM\=\=\=(.+)\=\=\=$/$1/ig; } $sta++; } ##################################################################### if(!$tdpn_1){ $info_title = "INTERNAL ERROR!"; $info=$cop2; $info_reason = ""; $info_login = ""; &info; } ######## Lese Style File ################# if(not(-e $style_file)){ $info_title = "INTERNAL ERROR!"; $style_file =~ s/$dir\///ig; $info = "The file: $style_file does not exist!"; &info; } open(STYLE, "<$style_file") or die "Cannot open $style_file"; while(