/* **************************************************************** */ /* CONFIGURATION */ /* **************************************************************** */ $min_width = 1; // minimale wortlänge $max_width = 15; // maximale wortlänge $def_width = 4; // standard wortlänge $height = 15; // anzahl worteingabefelder $dictfiles = array( // wörterbuchdateien "Deutsche Wörter" => "german.dic", "Deutsche Städte" => "staedte.dic", "Deutsche Städte und Gemeinden" => "gemeinden.dic", "Englische Wörter" => "english.dic", "KFZ-Kennzeichen Deutschland" => "kfz.dic", "Automarken" => "autos.dic", "Tiere" => "tiere.dic" ); $width_modes = array( // modi für wortlänge "exakt", // "normal" "zwischen" // "spezial" ); // bei änderungen hier muss die logik // entsprechend angepasst werden /* **************************************************************** */ /* DEFAULTS */ /* **************************************************************** */ $width = $def_width; // gew. (max.) wortlänge $dict = 0; // nummer des gew. wörterbuchs $dictfile = current($dictfiles); // dateiname des gew. wörterbuchs $width_mode = 0; // modus für wortlänge /* **************************************************************** */ /* USER INPUT */ /* **************************************************************** */ if (isset($_GET['show_source'])) { header('Content-Type: text/plain; charset=utf-8'); readfile(__FILE__); exit; } if (isset($_REQUEST['width'])) { $user_width = intval($_REQUEST['width']); if ($user_width <= $max_width && $user_width >= $min_width) { $width = $user_width; } } if (isset($_REQUEST['width_mode'])) { $user_width_mode = intval($_REQUEST['width_mode']); if (!empty($width_modes[$user_width_mode])) { $width_mode = $user_width_mode; } } if (isset($_REQUEST['width_min'])) { $user_width_min = intval($_REQUEST['width_min']); if ($user_width_min < $max_width && $user_width_min >= $min_width) { $width_min = $user_width_min; } if (@$width_min >= $width) { $width = $width_min + 1; } } if (isset($_REQUEST['dict'])) { $user_dict = array_values($dictfiles); $user_dict = $user_dict[intval($_REQUEST['dict'])]; if (!empty($user_dict)) { $dict = intval($_REQUEST['dict']); $dictfile = $user_dict; } } /* **************************************************************** */ /* BEGINN DOKUMENT */ /* **************************************************************** */ ?>
">Fragen / Anregungen / Kontakt / neues Wörterbuch: hier abgeben
© Der Quelltext dieses Programms (GitHub) steht unter der GNU GPL zur Verfügung. Letzte Änderung: .