Gästebuch

Tragen Sie sich in unser Gästebuch ein:

",$text); $text=str_replace("\r","",$text); return ($text); } function gbgetVars($myKey) { // Holt Get-Vars if (isset($_GET[$myKey])) { if (get_magic_quotes_gpc()) { return (stripslashes($_GET[$myKey])); } else { return ($_GET[$myKey]); } } else { return (""); } } function gbServerVars($myKey) { // Holt Server-Vars if (isset($_SERVER[$myKey])) { return ($_SERVER[$myKey]); } else { return (""); } } function gbfwritePad($fp,$myVar,$length) { // Schreibt gepadded in Datei fwrite($fp,$myVar.str_repeat(" ",$length),$length); } function gbfgetPad($fp,$length) { // Liest gepaddete Daten return rtrim(fread($fp,$length)); } function gbformatText($text) { // Ersetzt BB-Formate $text=str_replace("[i]","",$text); $text=str_replace("[/i]","",$text); $text=str_replace("[b]","",$text); $text=str_replace("[/b]","",$text); $text=str_replace(":)"," ",$text); $text=str_replace(";)"," ",$text); $text=str_replace(":eek:"," ",$text); $text=str_replace(":("," ",$text); $text=str_replace(":o"," ",$text); $text=str_replace(":roll:"," ",$text); $text=str_replace(":lol:"," ",$text); $text.=""; return($text); } $filename="../assets/plugindata/w2dgb56c6edefff94d4acc8781924ab4367ef.dat"; $maxpage=5; $admin=0; $gbrepost=false; // Daten schreiben if (gbgetVars("action")=="post") { include ('../assets/w2dcaptcha.php'); $cap=new captchas(); $cap->datapath='../assets/plugindata/'; if ($cap->checkticket(gbpostVars('gbid'),gbpostVars('gbcode'))) { $pos=0; // Position ermitteln if (!file_exists($filename)) { // Neue Datei $fp=fopen($filename,"w"); flock ($fp,2); gbfwritePad($fp,1,6); flock ($fp,3); fclose($fp); $pos=1; $fp=fopen($filename,"r+"); flock ($fp,2); } else { // Anhängen $fp=fopen($filename,"r+"); flock ($fp,2); $pos=gbfgetPad($fp,6); $pos++; fseek($fp,0); gbfwritePad($fp,$pos,6); } // Schreiben fseek($fp,6+($pos-1)*4890); if ($admin) { gbfwritePad($fp,0,1); } else { gbfwritePad($fp,1,1); } gbfwritePad($fp,gbServerVars("REMOTE_ADDR"),15); gbfwritePad($fp,gbpostVars("username"),256); gbfwritePad($fp,substr(gbNLBR(gbpostVars("message")),0,512),4096); gbfwritePad($fp,gbpostVars("email"),256); gbfwritePad($fp,gbpostVars("www"),256); gbfwritePad($fp, date("d.m.Y"),10); flock ($fp,3); fclose($fp); // Benutzerinterface echo("

Vielen Dank für Ihren Eintrag in unser Gästebuch. Wir freuen uns über jeden Besucher und nehmen Kritik und Anregungen sehr ernst.

\n"); echo("Das Gästebuch anzeigen

\n"); } else { echo("

Der eingegebene Sicherheitscode ist ungültig.

\n"); $gbrepost=true; } } if (gbgetVars("action")=="") { // Anzeigen $displaycount=0; if (file_exists($filename)) { $fp=fopen($filename,"r"); flock ($fp,1); $recordcount=gbfgetPad($fp,6); $first=gbgetVars("offset"); if ($first==0) { $first=1; }; $last=$first+$maxpage-1; for ($i=1; $i<=$recordcount; $i++) { fseek($fp,6+($recordcount-$i)*4890); $view=gbfgetPad($fp,1); gbfgetPad($fp,15); if ($view==1) { $displaycount++; if ($i>=$first && $i<=$last) { $username=gbfgetPad($fp,256); $message=gbfgetPad($fp,4096); $email=gbfgetPad($fp,256); $www=gbfgetPad($fp,256); $date=gbfgetPad($fp,10); echo("

"); echo("$date - "); if ($email=="") { echo(htmlentities($username)); } else { echo(""); echo(htmlentities($username)); echo("\n"); } if ($www!="") { if (substr($www,0,7)!="http://") { $wwwplus="http://".$www; } else { $wwwplus=$www; } echo(" "); echo("(".htmlentities($www).")"); echo("\n"); } echo("
\n"); echo(gbformatText($message)."

\n"); } } } flock ($fp,3); fclose ($fp); } // Navigation echo("

\n"); echo("Hier klicken, um einen Eintrag zu schreiben
\n"); if ($displaycount!=0) { if ($first>1) { print "Zurück "; }; $page=0; if ($displaycount>$maxpage) { for ($i=1;$i<=$displaycount;$i=$i+$maxpage) { $page++; if ($i==$first) { print " $page "; } else { print "$page "; } } } if ($displaycount>$last) { print "Weiter "; } } echo("

\n"); } if ((gbgetVars("action")=="form") or $gbrepost) { ?>
Name:
E-Mail:
WWW:
Eintrag:
fett kursiv
Code:
Um das Gästebuch vor Missbrauch zu schützen, geben Sie bitte den oben angezeigten Code ein:
Eingabe:





"; $monat=$monat+1; if ($monat==13) { $monat=1; $jahr=$jahr+1; } echo""; kalenderblatt($monat,$jahr); echo""; function kalenderblatt($monat,$jahr) { // // Hier die Termine eintragen // if ($monat ==1) { // Januar $days = array( ); } if ($monat ==2) { //Februar $days = array( 1=>array('http://www.98fahrenheit.de','linked-day'), 4=>array('http://www.peter-rohde.de','linked-day'), 9=>array('http://www.webtodateforum.de','linked-day'), 12=>array('http://www.reiterhof-reiterferien.de','linked-day'), ); } if ($monat ==3) { // März $days = array( 2=>array('http://www.98fahrenheit.de','linked-day'), 3=>array('http://www.peter-rohde.de','linked-day'), 8=>array('http://www.webtodateforum.de','linked-day'), 22=>array('http://www.reiterhof-reiterferien.de','linked-day'), 26=>array('http://www.kuestenforum.de','linked-day textual','
26
'), 16=>array('http://www.kuestenforum.de','linked-day textual','
16
'), ); } if ($monat ==4) { // April $days = array( 12=>array('http://www.98fahrenheit.de','linked-day'), 13=>array('http://www.peter-rohde.de','linked-day'), 18=>array('http://www.webtodateforum.de','linked-day'), 24=>array('http://www.reiterhof-reiterferien.de','linked-day'), 25=>array('http://www.kuestenforum.de','linked-day textual','XX'), ); } if ($monat ==5) { // Mai $days = array( ); } if ($monat ==6) { // Juni $days = array( ); } if ($monat ==7) { // Juli $days = array( ); } if ($monat ==8) { // August $days = array( ); } if ($monat ==9) { // September $days = array( ); } if ($monat ==10) { // Oktober $days = array( ); } if ($monat ==11) { // November $days = array( ); } if ($monat ==12) { // Dezember $days = array( ); } echo generate_calendar($jahr, $monat, $days); } setlocale(LC_TIME, $oldlocale); # PHP Calendar (version 2.3), written by Keith Devens # http://keithdevens.com/software/php_calendar # see example at http://keithdevens.com/weblog # License: http://keithdevens.com/software/license function generate_calendar($year, $month, $days = array(), $day_name_length = 2, $month_href = NULL, $first_day = 0, $pn = array()){ $first_of_month = gmmktime(0,0,0,$month,1,$year); #remember that mktime will automatically correct if invalid dates are entered # for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998 # this provides a built in "rounding" feature to generate_calendar() $day_names = array(); #generate all the day names according to the current locale for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday $day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month)); $weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day $title = htmlentities(ucfirst($month_name)).' '.$year; #note that some locales don't capitalize month and day names #Begin calendar. Uses a real
. See http://diveintomark.org/archives/2002/07/03 @list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable if($p) $p = ''.($pl ? ''.$p.'' : $p).' '; if($n) $n = ' '.($nl ? ''.$n.'' : $n).''; $calendar = ''."\n". '

'.$p.($month_href ? ''.$title.'' : $title).$n.":

\n"; if($day_name_length){ #if the day names should be shown ($day_name_length > 0) #if day_name_length is >3, the full name of the day will be printed foreach($day_names as $d) $calendar .= ''; $calendar .= "\n"; } if($weekday > 0) $calendar .= ''; #initial 'empty' days for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){ if($weekday == 7){ $weekday = 0; #start a new week $calendar .= "\n"; } $heute=""; $heuteende=""; if ($month==date("m",time())) { if ($day==date('j',time())){ $heute=''; $heuteende=""; } } if(isset($days[$day]) and is_array($days[$day])){ @list($link, $classes, $content) = $days[$day]; if(is_null($content)) $content = $day; $calendar .= '' : '>'). // ($link ? ''.$heute.''.$content.'' : .$content)''; ($link ? $heute.''.$content.'' : $content).$heuteende.''; } else $calendar .= ""; } if($weekday != 7) $calendar .= ''; #remaining "empty" days return $calendar."\n
'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'
 
$heute$day$heuteende 
\n"; } ?>

Schulferien und Feiertage

".$mytext."

"); } else { $digits=substr("00000000".$counttotal,-8); echo("

"); if ($myplaintext==0) { for ($i=0;$i<8;$i++) { $digit=substr($digits,$i,1); echo ("\"".$digit."\"/"); } } else { echo($digits); } echo("

\n"); } } if ($myunique) { echo(''); } $fp=fopen($myfile,"w"); if ($fp) { flock($fp,2); fputs($fp, substr("0000000000".$counttotal,-10)." ",11); fputs($fp, substr("0000000000".$counttoday,-10)." ",11); fputs($fp, $today,10); flock($fp,3); fclose ($fp); } ?>