<?php
// Settings:
// Name of the guestbook:
$title = "Gästebuch";
// Administration password:
$password = "wwb12345";
// File in which the entries will be saved (requires CHMOD 666):
$gbdata = "guestbook.dat";
// How many entries per page?
$entries_per_page = 10;
// Admin E-mail for notifications (optional):
$adminemail = "info@wallwitzburg.de";
// BB-Codes on?
$bbcode = true;
// Make links clickable:
$autolink = true;
// If you want to use smilies specify the smiley folder e.g. "img/" (where these images are: smile.gif, wink.gif, biggrin.gif, tongue.gif, neutral.gif, frown.gif):
$smiley_folder = "forum/img/";
// Time format:
$time_format = "%d. %B. %Y, %H:%M";
// Length limitations:
$name_maxlength = 40;
$name_word_maxlength = 30;
$email_maxlength = 40;
$hp_maxlength = 40;
$place_maxlength = 40;
$place_word_maxlength = 25;
$text_maxlength = 3000;
$text_minlength = 5;
$text_word_maxlength = 50;
// Paths to images for Homepage and E-Mail links (optional):
$homepage_icon = "";
$email_icon = "";
// Language settings:
$new_entry = "Neuer Eintrag";
$back = "Zurück";
$preview_marking = "Vorschau";
$error_marking = "Fehler:";
$optional_marking = "*";
$name_marking = "Name:";
$email_marking = "E-Mail:";
$hp_marking = "Internetseite:";
$place_marking = "Ort:";
$comment_marking = "Kommentrar:";
$password_marking = "Passwort:";
$password_wrong_marking = "Passwort falsch!";
$submit_button = "Senden";
$preview_button = "Vorschau";
$bbcode_exp = "* optional <br> Der Text kann folgendermaßen formatiert werden: [b]Text[/b] für <b>fett</b>, [i]Text[/i] für <i>kursiv</i>.<br />Um Links einzufügen: [link]http://www.domain.de/[/link].";
$error_no_name = "Kein Name eingetragen!";
$error_no_text = "Keine Nachricht eingetragen!";
$error_email_wrong = "E-Mailaddresse scheint falsch!";
$error_text_too_long = "Ihre Nachricht ist mit ([characters] characters) Anschlägen zu lang, Bitte kürzen sie Ihren Text auf [max_characters] Zeichen.";
$error_text_too_short = "Ihre Nachricht ist zu kurz.";
$error_word_too_long = "Das "[word]" ist zu lang!";
$error_already_made_entry = "Sie haben binnen den letzeten 5 Minuen schon einen Eintrag verfasst. Bitte versuchen sie es später noch einmal oder benutzen sie unser Forum!";
$delete_entry_marking = "Eintrag löschen:";
$delete_entry_conf_marking = "Sind sie sicher, dass sie den Eintrag <b>[name]</b> löschen möchten?";
$no_authorisation_marking = "Nicht angemledet. Bitte loggen sie sich ein.";
$log_in_marking = "Einloggen";
$edit_button = "Bearbeiten";
$delete_button = "Löschen";
$delete_conf_button = "Löchen";
$previous_page = "<";
$next_page = ">";
$still_no_entries_marking = "Bis jetzt keine Einträge";
$mail_subject = "Neuer Eintrag in unser Gästebuch";
$hp_link_marking = "Internetseite";
$email_link_marking = "E-mail";
//$months_translated = array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
// End of settings
##############################################################################
session_start();
function bbcode($string)
{
$string = preg_replace("#[b](.+?)[/b]#is", "<b>\1</b>", $string);
$string = preg_replace("#[i](.+?)[/i]#is", "<i>\1</i>", $string);
$string = preg_replace("#[u](.+?)[/u]#is", "<u>\1</u>", $string);
$string = preg_replace("#[link]www.(.+?)[/link]#is", "<a href="http://www.\1">www.\1</a>", $string);
$string = preg_replace("#[link](.+?)[/link]#is", "<a href="\1">\1</a>", $string);
$string = preg_replace("#[link=(.+?)](.+?)[/link]#is", "<a href="\1">\2</a>", $string);
$string = preg_replace("#[url]www.(.+?)[/url]#is", "<a href="http://www.\1">www.\1</a>", $string);
$string = preg_replace("#[url](.+?)[/url]#is", "<a href="\1">\1</a>", $string);
$string = preg_replace("#[url=(.+?)](.+?)[/url]#is", "<a href="\1">\2</a>", $string);
return $string;
}
function smilies($string)
{
global $smiley_folder;
$string = str_replace(":-)", "<img src="".$smiley_folder."smile.gif" alt=":-)" width="15" height="15" />", $string);
$string = str_replace("(-:", "<img src="".$smiley_folder."smile.gif" alt=":-)" width="15" height="15" />", $string);
$string = str_replace(":)", "<img src="".$smiley_folder."smile.gif" alt=":)" width="15" height="15" />", $string);
$string = str_replace("(:", "<img src="".$smiley_folder."smile.gif" alt=":)" width="15" height="15" />", $string);
$string = str_replace(";-)", "<img src="".$smiley_folder."wink.gif" alt=";-)" width="15" height="15" />", $string);
$string = str_replace(":-D", "<img src="".$smiley_folder."biggrin.gif" alt=":-D" width="15" height="15" />", $string);
$string = str_replace(":D", "<img src="".$smiley_folder."biggrin.gif" alt=":D" width="15" height="15" />", $string);
$string = str_replace(":-P", "<img src="".$smiley_folder."tongue.gif" alt=":-P" width="15" height="15" />", $string);
$string = str_replace(":-p", "<img src="".$smiley_folder."tongue.gif" alt=":-p" width="15" height="15" />", $string);
$string = str_replace(":-|", "<img src="".$smiley_folder."neutral.gif" alt=":-|" width="15" height="15" />", $string);
$string = str_replace(":|", "<img src="".$smiley_folder."neutral.gif" alt=":|" width="15" height="15" />", $string);
$string = str_replace(":-(", "<img src="".$smiley_folder."frown.gif" alt=":-(" width="15" height="15" />", $string);
$string = str_replace(":(", "<img src="".$smiley_folder."frown.gif" alt=":(" width="15" height="15" />", $string);
$string = str_replace(")-:", "<img src="".$smiley_folder."frown.gif" alt=":-(" width="15" height="15" />", $string);
return $string;
}