Sind Sie sicher, dass Sie die richtigen Rechte für dieses Verzeichnis besitzen ?"; $langPassChanged = "Neues Passwort OK."; $langPassError = "Das neue Password funktioniert nicht !"; $langPassword = "Ändere Big Sam Passwort"; $langRetype = "Wiederholen Sie das neue Passwort :"; $langSubmit = "Nachricht abschicken"; $langSubmitModif = "Änderungen abschicken"; $langSystemError = "System Fehler"; $langSystemMessage = "System Nachricht"; $langWrongPassword = "Falsches Administrator-Passwort"; /******************************************* * Configuration Step 2 : Carbon Copy Email * *******************************************/ // carbonCopy = 1 enables mail sending to mailRecipient. // mailRecipient receives a mail each times an entry is entered (if carbonCopy = 1) // mailSubject is the subject of the mail which is sent. $carbonCopy = 1; $mailRecipient = "pottharst@gmx.de"; $mailSubject = "Neuer Gaestebucheintrag"; /******************************** * Configuration Step 3 : Colors * ********************************/ // Choosing colors (Remove the unwanted color-model) /* // Standard (Greys, bright background) $colorWhite = "\"#FFFFFF\""; $colorBlack = "\"#000000\""; $colorHeads = "\"#666666\""; $colorBody1 = "\"#EEEEEE\""; $colorBody2 = "\"#DDDDDD\""; */ // Arne P. $colorWhite = "\"#FFFFFF\""; $colorBlack = "\"#000000\""; $colorHeads = "\"#666666\""; $colorBody1 = "\"ivory\""; $colorBody2 = "\"wheat\""; $colorText = "\"#666666\""; /* // The Following is the BIG SAM standard $colorWhite = "\"#FFFFFF\""; $colorBlack = "\"#000000\""; $colorHeads = "\"#42426F\""; $colorBody1 = "\"#FFF8DC\""; $colorBody2 = "\"#EFE8CC\""; */ // Data submission form colors $formHeadColor = $colorHeads; $formBodyColor = $colorBody1; $formTailColor = $colorBody2; $formHeadText = $colorWhite; $formBodyText = $colorBlack; // Guestbook entries colors $entryHeadColor = $colorHeads; $entryBodyColor1 = $colorBody2; $entryBodyColor2 = $colorBody1; $entryHeadText = $colorWhite; $entryBodyText1 = $colorBlack; $entryBodyText2 = $colorText; // Messages colors $adminHeadColor = $colorHeads; $adminHeadText = $colorWhite; $adminBodyColor1 = $colorBody2; $adminBodyText1 = $colorBlack; $adminBodyColor2 = $colorBody1; $adminBodyText2 = $colorText; /******************************** * Configuration Step 4 : Header * ********************************/ function displayHeader() { global $version; // header ("Expires: Sat, 01 Jan 2000 00:00:00 GMT"); // echo ("\n"); // echo ("\n"); // You migh use and include instead of all this : // include ("head.inc"); echo (''); echo ('arnep.de - Gästebuch'); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo (""); echo (''); echo (''); echo ('
'); echo ('
"arnep"
'); echo ('

'); echo ('/index
'); echo ('/news
'); echo ('/ich
'); echo ('/postkarte
'); echo ('/reisen
'); echo ('/peterprogramme
'); echo ('/scripte
'); echo ('/kreativ
'); echo ('

/gaeste

'); echo (''); echo ('/statistik
'); echo ('/links
'); echo ('/kontakt
'); echo ('/sitemap
'); include ('/var/www/kunden/10002/arnep.de/htdocs/include/suchen.inc'); echo ('
'); echo ('

arnep.de - Gästebuch

'); } /******************************** * Configuration Step 5 : Footer * ********************************/ function displayFooter() { echo ('

'); echo ('Based on Big SamDownload – Design: (c) 2001 Arne Pottharst
'); echo ('Stand: 22.04.2002Kontakt – (c) Inhalt & Konzeption: Arne Pottharst 1996-2001
'); echo ('
'); echo (''); } /****************************************************** * Configuration Step 6 : Number of messages displayed * ******************************************************/ // Number of fields to be displayed simultaneously. // To display everything, set $displayStep to 0. $displayStep = 10; /************************************************ * Configuration Step 7 : Allow AutoLink System * ************************************************/ $allowAutoLink=1; /************************ * End of Configuration * ************************/ // $absoluteScriptPath is the name of the current script (this file) and which is going to // be modified by itself. This means that (theoretically) this file can be // placed anywhere on the system, with any fileName. $absoluteScriptPath = $PATH_TRANSLATED; $relativeScriptPath = $PHP_SELF; // when the php preprocessor is installed as an independant binary (as CGI). if ($PATH_INFO!="") { $relativeScriptPath = $PATH_INFO; } // to be used when $PHP_SELF contains virtual directory reference // (for multi-users servers, eg : free.fr, online.fr ...) if (($SERVER_NAME=="php.proxad.net")||(($SERVER_NAME=="php3.pro.proxad.net"))) { $relativeScriptPath = substr($relativeScriptPath, strpos(substr($relativeScriptPath, 1), "/")+1); } $theName=substr($absoluteScriptPath, 0, strrpos($absoluteScriptPath, ".")); $extension=substr($absoluteScriptPath, strrpos($absoluteScriptPath, ".")+1); // The dataFile contains all the guestbook entries, and $adminpassword . // $adminpassword is the password which will be asked for any administration // actions. This password could be changed only if in admin mode (old // $adminpassword matches $admin). // Defines the name of the database file where the entries are stored. $dataFile = "${theName}.dat.${extension}"; //****************************************************************************** // function displayForm : Display the form which enables the client to type a // message. function displayForm() { global $relativeScriptPath; $borderThickness = 3; global $formHeadColor; global $formBodyColor; global $formTailColor; global $formHeadText; global $formBodyText; global $langName; global $langEmail; global $langLocation; global $langHomepage; global $langMessage; global $langSubmit; // Writing HTML Code echo ("
\n"); echo ("
\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("
$langName $langEmail
$langLocation $langHomepage
\n"); echo ("$langMessage
\n"); echo ("
\n"); echo ("
\n"); echo "Einträge werden im Moment nur gespeichert, aber nicht angezeigt. Schreibt also war rein!

"; echo (""); echo ("
\n"); echo ("Achtung Spammer:
\n"); echo ("Erspart Euch und mir die Mühe und tragt hier nicht Eure Spam-Einträge ein, ich werde sie innerhalb weniger Stunden löschen, ohne daß sie jemals jemand gesehen hat. Danke.

\n"); echo ("Anleitung:
\n"); echo ("Fülle das obenstehende Formular nach bestem Wissen und Gewissen aus!
\n"); echo ("Falls Du einen Hyperlink oder eine E-Mail-Adresse einfügen willst, so\n"); echo ("kannst Du das auf die folgende Art und Weise tun:
\n"); echo ("Füge einen Hyperlink so ein: http://www.arnep.de. Er erscheint dann anklickbar.
\n"); echo ("Bei einer E-Mail-Adresse ist das ganze schon etwas komplizierter: mailto:arne@arnep.de, dann erscheint die Adresse ebenfalls anklickbar...
\n"); echo ("HTML ist leider nicht zugelassen.
\n"); echo ("Ich behalte mir das Recht vor, Einträge in Extremfällen zu löschen (Spamming, Beleidigungen u.ä.).
Außerdem korrigiere ich in Einzelfällen auch Rechtschreibfehler, aber nur, wenn sie mich arg stören ;-)
\n"); echo ("Falls Ihr Euren Beitrag abändern wollt (warum auch immer...) schreibt an gbook@arnep.de\n"); echo ("
\n"); echo ("
\n"); echo ("
\n"); } //****************************************************************************** // function displayMessage displays the $errorMessage error message. function displayMessage($errorMessage,$msgType) { global $adminHeadColor; global $adminHeadText; global $adminBodyColor1; global $adminBodyText1; global $adminBodyColor2; global $adminBodyText2; global $langAdminError; global $langSystemError; global $langSystemMessage; global $langBsGuestbook; displayHeader(); echo ("
"); echo ("
"); echo ("  $langBsGuestbook
"); echo ("
"); if ($msgType=="1") // Admin Message echo ("  $langAdminError"); if ($msgType=="2") // System Error echo ("  $langSystemError"); if ($msgType=="3") // System Message echo ("  $langSystemMessage"); echo (""); echo ("
"); echo (""); echo ("
$errorMessage

"); echo ("

 

\n"); echo ("
"); displayFooter(); exit; } //****************************************************************************** // function standardizeText filters ambiguous chains in $str function standardizeStoredText($str) { $str = str_replace("'", "'", $str); # $str = str_replace("\\\"", "\"", $str); $str = htmlspecialchars($str); $str = str_replace("\\\"", "\"", $str); $str = str_replace("\\\\", "", $str); $str = str_replace('\"', '"', $str); $str = str_replace("[comment]", "", $str); $str = str_replace("[/comment]", "", $str); $str = str_replace("\n", "
", $str); $str = str_replace("\r", "", $str); $str = str_replace("$", "$", $str); return $str; } function standardizeDisplayedText($str) { return $str; } function standardizeAdminText($str) { return $str; } function seekHttp($rawText) { $pattern = array( "/http:\/\/((\w|\.|\?|\%|=|\~|\/|-)*)/", "/mailto:((\w|\.|@|-)*)/"); $replacement = array( "http://\\1", "\\1"); $hyperLinkedText=preg_replace($pattern, $replacement, $rawText); return $hyperLinkedText; } //****************************************************************************** // function Xfopen : opens a file $fileName and locks it function Xfopen($fileName, $openMode, $sharing) { global $langOpenError; $fp=@fopen($fileName, $openMode); if (!$fp) { displayMessage($langOpenError,2); } if ($sharing==true) { $op=1; } else { $op=2; } if (!@flock($fp,$op)) { @flock($fp,3); displayMessage("flock timeout",2); } return $fp; } //****************************************************************************** // function Xfclose : unlocks the file $fp and closes it function Xfclose($fp) { @flock($fp,3); @fclose($fp); } //****************************************************************************** // function fullDisplay function fullDisplay() { global $displayStep,$displayBegin ; global $entryHeadColor,$entryHeadText, $entryBodyColor1,$entryBodyText1, $entryBodyColor2,$entryBodyText2 ; global $relativeScriptPath; global $index; global $archive_mail, $archive_name, $archive_homepage, $archive_location, $archive_text, $archive_date; global $allowAutoLink; global $langHomepage, $langLocationFrom; displayHeader(); // Displays the entry form to enable the client to type a message. displayForm(); if ($index==0) { displayFooter(); return; } echo ("

 

\n"); // Message arrays are displayed here : echo "
\n"; // Displaying all the entries. if ($displayStep==0) { $displayBegin=1; $displayStep=$index; } if ($displayBegin==1) { $startAt=$index % $displayStep; if ($startAt==0) $startAt=$displayStep; } else { $startAt=$displayBegin+$displayStep-1; } for ($msgNumber=$startAt ; $msgNumber>=$displayBegin ; $msgNumber--) { echo ("
"); echo ("    $archive_date[$msgNumber]    "); echo ("
"); echo (""); if ($archive_mail[$msgNumber]!="") { echo ("$msgNumber: ".standardizeDisplayedText($archive_name[$msgNumber]).""); } else { echo ("$msgNumber: ".standardizeDisplayedText($archive_name[$msgNumber])); } if ($archive_location[$msgNumber]!="") { echo (" $langLocationFrom ".standardizeDisplayedText($archive_location[$msgNumber])); } echo (""); echo (""); echo (""); if ($archive_homepage[$msgNumber]!="" && $archive_homepage[$msgNumber]!="http://") { echo ("$langHomepage ".standardizeDisplayedText($archive_homepage[$msgNumber]).""); } echo (""); echo ("
"); echo (""); if ($allowAutoLink==1) echo (seekHttp(standardizeDisplayedText($archive_text[$msgNumber]))); else echo (standardizeDisplayedText($archive_text[$msgNumber])); echo ("


\n"); } echo ("

 

\n"); for($i=1;$i<=$index;$i=$nextEnd+1) { $nextBegin = $i; if ($i==1) { $nextEnd=$index % $displayStep; if ($nextEnd==0) $nextEnd=$displayStep; } else $nextEnd = $i+$displayStep-1; if ($displayBegin==$nextBegin && $nextEnd!=$nextBegin) echo ("[$nextBegin-$nextEnd]\n"); else if ($displayBegin==$nextBegin && $nextEnd==$nextBegin) echo ("[$nextBegin]\n"); else if ($nextEnd==$nextBegin) echo ("[$nextBegin]\n"); else echo ("[$nextBegin-$nextEnd]\n"); } echo "[!]
\n"; echo "\n"; displayFooter(); } //****************************************************************************** function readData($resetBegin) { global $adminpassword; global $index; global $dataFile; global $archive_mail, $archive_name, $archive_text, $archive_date, $archive_location, $archive_homepage, $archive_ip, $archive_agent; global $displayBegin, $displayStep; global $langName, $langEmail, $langHomepage, $langLocation; // Includes automatically filled data arrays : $index = 0; $fout=Xfopen($dataFile, "r", true); @include($dataFile); Xfclose($fout); // From now, $index will indicate the number of data entries. // Beginning of the data to be displayed, default = 1 if (!isset($displayBegin)) $displayBegin=""; if ($displayBegin=="" || $resetBegin==1) { $displayBegin = $index-$displayStep+1; if ($displayBegin<=0) $displayBegin=1; } } //****************************************************************************** // If the Datafile does not exist, creates it. if (!file_exists(${dataFile})) { $fout = Xfopen($dataFile, "w+", false); fputs($fout, ""); //';\n"); fputs ($fout,"\$archive_location[ \$index] = '$location';\n"); fputs ($fout,"\$archive_homepage[ \$index] = '$homepage';\n"); fputs ($fout,"\$archive_ip[ \$index] = '$ip';\n"); fputs ($fout,"\$archive_agent[ \$index] = '$agent';\n\n"); fputs ($fout,"\n?>"); //", "\n", $message); $mailBody = "From: $name <$email> $langLocationFrom $location\n$langHomepage $homepage\n$insert_msgdate\n\n$message"; mail($mailRecipient,$mailSubject,$mailBody,"From: $email\nReply-to: $name <$email>"); } // Sendet eine E-Mail an den Einträger $mailBody = "Hallo $name!\n\nVielen Dank, dass Du in mein Gaestebuch geschrieben hast.\nSchau' doch mal wieder bei meiner Homepage vorbei!\n\nMfG, Arne P.\n\nHomepage: http://www.arnep.de/"; mail($email,"Danke fuer Deinen Eintrag!",$mailBody,"From: arne@arnep.de\nReply-to: Arne P. "); if (strpos($HTTP_REFERER, "?")==false) $page=$HTTP_REFERER; else $page=substr($HTTP_REFERER, 0, strpos($HTTP_REFERER, "?")); header("Location: $page?"); exit; } } else { readData(0); if ($admin==$adminpassword) { if ($command=="") { displayHeader(); /************************************************************************ * Use Case no 2-A * * * * Admin mode (The administrator can modify password, fields, or remove * * messages). * * $admin = $adminpassword * * Shows a password modification form. * * Shows all messages and enables to modify/delete them. * ************************************************************************/ echo("

BIG SAM

$langGbAdmin

\n"); echo("
\n"); // Display the form which enables the admin to change his password echo ("
\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("
\n"); echo (" $langPassword.
"); echo ("  $langnewPassword"); echo (" 
"); echo ("  $langRetype"); echo (" 
\n"); echo ("\n"); echo ("\n"); echo ("
\n"); echo ("
\n"); echo("


\n"); // Message arrays are displayed here in forms in order to modify them : echo ("
\n"); for ($i=1 ; $i<=$index ; $i++) { $msgNumber = $index - $i + 1; $str = str_replace("
", "\n", $archive_text[$msgNumber]); $str = str_replace('', '[comment]', $str); $str = str_replace('', '[/comment]', $str); echo ("\n"); echo ("\n"); // echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n
\n"); echo (" "); echo ("$langEntry #$msgNumber. 
  $langName $langEmail
$langLocation $langHomepage
$langIP $langAgent
$langDate  
\n
\n"); } echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("
\n"); displayFooter(); exit; } else if ($command=="passwd") { // Use Case no 2-B // Admin mode (The administrator is modifying his password.). // $admin = $adminpassword // $newPassword1 = "New Password 1" // $newPassword2 = "New Password 2" // Check if $newPassword1 matches $newPassword2 // Set the $adminpassword line to : // $adminpassword = "$newPassword1" in the dataFile if($newPassword1!=$newPassword2) { // The passwords doesn't match displayMessage("$langPassError",1); } else { // Rewrites the whole Datafile with the new password, and all the entries. $fout = Xfopen($dataFile, "w", false); fputs ($fout,""); //"); //
\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("
Bitte Passwort eingeben:
\n"); echo ("
\n"); } else { /************************************************ * Use Case no 2-Z * * * * If $admin does NOT match $adminpassword. * * $admin != $adminpassword * * Error message : "Wrong Admin Password" * ************************************************/ displayMessage("$langWrongPassword",1); } } ?>