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 = "Kommentar 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 Programmkommentar"; /******************************** * Configuration Step 3 : Colors * ********************************/ // PeterProgramme $colorWhite = "\"#000000\""; $colorBlack = "\"#000000\""; $colorHeads = "\"\""; $colorBody1 = "\"\""; $colorBody2 = "\"\""; $colorText = "\"#666666\""; // 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() { echo ('/peterprogramme : Kommentar'); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo (''); echo ('
'); echo ('
"peterprogramme"
'); echo ('
'); echo ('/index
'); echo ('

/programme

'); echo ('Web-Utils
'); echo ('Tools & Utils
'); echo ('Spiele
'); echo ('Sinnloses...
'); echo ('

'); echo ('/spiele
'); echo ('/history
'); echo ('/lizenz
'); echo ('
'); echo ('arnep.de/
'); echo ('
'); echo (''); echo (''); echo ('
'); echo (' Hilfe'); echo ('
'); echo ('

'); echo ('
'); echo ('

/peterprogramme : Kommentar

'); #PeterProgramme Programme Kommentar'); # echo (''); # echo (''); # echo (''); # echo ('
'); # echo ('

PeterProgramme Kommentar

'); # echo ('
\n"; $content .= $tempcontent; $fout = Xfopen($dataFile, "w+", false); fputs ($fout,$content); Xfclose($fout); // Sending a mail to $mailRecipient $message = str_replace("
", "\n", $message); $mailBody = "Von: $name <$email> \n".date( "d.m.Y, H:i:s" )."\nProgramm: $dataFile\n$message"; mail($mailRecipient,"Kommentar zu einem Programm",$mailBody,"From: $email\nReply-to: $name <$email>"); // Sendet eine E-Mail an den Einträger $mailBody = "Hallo $name!\n\nVielen Dank, daß Du einen Kommentar zu einem meiner Programme geschrieben hast.\nSchau' doch mal wieder bei meiner Homepage vorbei!\n\nMfG, Arne P.\n\nHomepage: http://www.arnep.de/"; mail($email,"Danke für Deinen Kommentar!",$mailBody,"From: arne@arnep.de\nReply-to: Arne P. "); header("Location: $programmname"); exit; } ?>
'); # echo ('
'); # echo ('Web-Utils
'); # echo ('Tools & Utils
'); # echo ('Spiele
'); # echo ('Sinnloses...
'); # echo ('
Hauptseite'); # echo ('

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


'); echo ('Stand: 17.03.2002Kontakt – (c) Inhalt & Konzeption: Arne Pottharst 1996-2001'); 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; } $theName=substr($absoluteScriptPath, 0, strrpos($absoluteScriptPath, ".")); $extension=substr($absoluteScriptPath, strrpos($absoluteScriptPath, ".")+1); // Defines the name of the database file where the entries are stored. //$dataFile = "${theName}.dat.${extension}"; $dataFile = 'feedback/'.$programmname; //wird per ULR-Parameter übergeben //****************************************************************************** // 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; global $programmname; // Writing HTML Code echo ("
\n"); echo ("
\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("
$langName $langEmail
\n"); echo ("$langMessage
\n"); echo ("
\n"); echo ("
\n"); echo (""); echo (""); echo ("
\n"); echo ("
Abbrechen\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; global $dataFile; 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
$dataFile
"); 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("[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() { displayHeader(); displayForm(); displayFooter(); } //****************************************************************************** if (!isset($name)) { $name=""; $message=""; } if ($name=="" || $message=="") { fullDisplay(); exit; } else { if (file_exists(${dataFile})) { $fout = Xfopen($dataFile, "r+", false); $tempcontent = fread ($fout, filesize ($dataFile)); Xfclose($fout); } $name=standardizeStoredText($name); $email=standardizeStoredText($email); $message=standardizeStoredText($message); $content = "\n
"; if ($email) { $content .= "$name"; } else { $content .= "$name"; } $content .= " schrieb am ".date( "d.m.Y, H:i:s" )."
$message