Dokumentationen

referenz = $ref; $this->bild = $bil; $this->name = $nam; $this->alternative = $alt; $this->titel = $tit; } function ausgabe(){ echo "referenz . "\">\n"; echo "bild . "\"\n"; echo "name=\"" . $this->name . "\"\n"; echo "border=\"0\"\n"; echo "alt=\"" . $this->alternative . "\"\n"; echo "title=\"" . $this->titel . "\"\n"; echo "width=\"150\" height=\"97\"\n"; echo "onmouseover=\"document.images['" . $this->name . "'].src"; echo "='bilder/offen.jpg'\"\n"; echo "onmouseout=\"document.images['" . $this->name . "'].src"; echo "='" . $this->bild . "'\">\n"; echo "\n"; } } $eintrag[0] = new werte("html/index.html", "bilder/html.jpg", "html", "Link nach HTML", "HTML"); $eintrag[1] = new werte("HyperSpec/index.html", "bilder/lisp.jpg", "lisp", "Link nach Lisp", "Lisp"); $eintrag[2] = new werte("lilypond/Documentation/web/index.html", "bilder/lilypond.jpg", "lilypond", "Link nach LilyPond", "LilyPond"); $eintrag[3] = new werte("mysql/index.html", "bilder/mysql.jpg", "mysql", "Link nach MySQL", "MySQL"); $eintrag[4] = new werte("phpdoc/index.html", "bilder/php.jpg", "php", "Link nach PHP", "PHP"); $eintrag[5] = new werte("tex/index.html", "bilder/tex.jpg", "tex", "Link nach TeX", "TeX"); $eintrag[6] = new werte("xfig/index.html", "bilder/xfig.jpg", "xfig", "Link nach XFig", "XFig"); $eintrag[7] = new werte("gnuplot/index.html", "bilder/gnuplot.jpg", "gnuplot", "Link nach GnuPlot", "GnuPlot"); # # Nun werden die sieben Eintraege auf 16 Plaetze verteilt. Das # geschieht mit Zufallszahlengenerator. # for ($i = 0; $i < 16; $i++) $ort[$i] = -1; srand((double)microtime() * 1000000); for ($i = 0; $i < 8; $i++){ $zufall = rand(0, 15); while (-1 != $ort[$zufall]) $zufall = rand(0, 15); $ort[$zufall] = $i; } # # Nun ist klar, dass die sieben Eintraege in dem Array der Orte # unter gebracht ist. Die Tabelle kann also ausgegeben werden. # echo "\n"; for ($zeile = 0; $zeile < 4; $zeile++){ echo " \n"; for ($spalte = 0; $spalte < 4; $spalte++){ $index = 4 * $zeile + $spalte; echo " \n"; } echo " \n"; } echo "
\n"; # # Wenn in dem entsprechenden Ort was steht, dann sollte es # ausgegeben werden # $entscheider = $ort[$index]; if (-1 != $entscheider){ $eintrag[$entscheider]->ausgabe(); } echo "
\n"; ?>