/* * tsGuestbook * Version: 1.1 * (C) 2008 by Top-Side.de * Lizenz: http://creativecommons.org/licenses/by-nc-sa/3.0/deed.de */ include("gb_files/data/config.php"); $font_size_small = $font_size * 0.75; $width_left = round($width / 3); $width_right = $width - $width_left; $border = "border: ".$border_width."px ".$border_style." ".$border_color; $style = " td.left { color: ".$font_color."; width: ".$width_left."px; ".$border."; vertical-align: top; background: ".$color_cell_left." } td.right { color: ".$font_color."; width: ".$width_right."px; ".$border."; background: ".$color_cell_right." } .inverse { color: ".$color_background_center."; background: ".$border_color."; padding: 2px } table { ".$border."; border-collapse: collapse; spacing: 0 } body { scrollbar-base-color: ".$color_background."; scrollbar-arrow-color: ".$border_color."; background: ".$color_background." } td { color: ".$font_color."; font-family: ".$font_family."; font-size: ".$font_size."px; padding: 5px; background: ".$color_background_center." } a:link { color: ".$link_color."; font-family: ".$font_family."; font-size: ".$font_size."px; text-decoration: ".$link_style." } a:active { color: ".$link_color."; font-family: ".$font_family."; font-size: ".$font_size."px; text-decoration: ".$link_style." } a:visited { color: ".$link_color."; font-family: ".$font_family."; font-size: ".$font_size."px; text-decoration: ".$link_style." } a:hover { color: ".$link_color_hover."; font-family: ".$font_family."; font-size: ".$font_size."px; text-decoration: ".$link_style_hover." } textarea { color: ".$font_color."; font-family: ".$font_family."; font-size: ".$font_size."px; background-color: ".$color_background_center."; ".$border." } input { color: ".$font_color."; font-family: ".$font_family."; font-size: ".$font_size."px; background-color: ".$color_background_center."; ".$border." } select { color: ".$font_color."; font-family: ".$font_family."; font-size: ".$font_size."px; background-color: ".$color_background_center."; ".$border." } table.none { border: none }\ntable.none td { padding: 0px; background-color: transparent }\nimg { border: none } "; $weekday = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"); function TrimUrl($url) { $shorturl = $url; if(strlen($url) > 30) $shorturl = substr($url, 0, 30)."..."; return $shorturl; } function ReloadLock($reloadTicks) { $reloadLock = 0; $ip = $_SERVER['REMOTE_ADDR']; $time = time(); $file = file("gb_files/data/reload"); for($i = 0; $i < sizeof($file); $i++) { $item = explode("|", $file[$i]); if($item[0] > $time - $reloadTicks) { if(trim($item[1]) == $ip) $reloadLock = $reloadTicks - ($time - $item[0]); $newContent .= $file[$i]; } } if($reloadLock == 0) $newContent .= $time."|".$ip."\n"; $handle = fopen("gb_files/data/reload", "w"); fwrite($handle, $newContent); fclose($handle); return $reloadLock; } function Redirect() { $ref = basename($_SERVER["HTTP_REFERER"]); $url = basename($_SERVER["REQUEST_URI"]); if(empty($ref) || $ref == $url) $ref = "guestbook.php"; echo "