Quelltext der Datei: http://www.michaelster.ch/lernen/daf/artikel.php

Dateigrösse: 8.56 kb

[Anzeige ohne Zeilennummern]


  1 <html>
  2     <head>
  3         <title> A r t i k e l  mit PHP by Mike Steiner</title>
  4         <link rel="stylesheet" href="scblack.css" type="text/css">
  5     </head>
  6     
  7 <body>
  8 
  9 <?php
 10 /*
 11 if ( $br == 'Internet Explorer' && $v == 5 )
 12     {
 13     echo "<div style='-moz-border-radius: 4px; background-color:#f8f8ff; padding:20px; margin: 20px; text-align:center; border:1px solid gray;font-size:16px; font-weight:none'><b>Hallo Internet Explorer User !</b><br><br>Dein Browser <b>".$br."</b> kann in der <b>Version ".$v."</b> diese Seite nicht korrekt darstellen.<br><br><b>Was du dagegen tun kannst ?</b><br><br><li style='padding:10px 0px'>Upgrade auf <b>Internet Explorer 6</b>&nbsp;<a href='http://www.microsoft.com/downloads/details.aspx?displaylang=de&FamilyID=1E1550CB-5E5D-48F5-B02B-20B602228DE6'><img src=\"../img/download.gif\" alt=\"Download MSIE 6\" name=\"atom\" width=\"15\" height=\"15\" border=\"1\" valign=\"middle\"></a></li><li>Umsteigen auf <b>Mozilla Firefox</b>&nbsp;<a href='http://www.firefox-browser.de/windows.php'><img src=\"../img/download.gif\" alt=\"Download Firefox\" name=\"atom\" width=\"15\" height=\"15\" border=\"1\" valign=\"middle\"></a></li></div>";
 14     echo "<div align='center'><img src=\"../img/atom.gif\" alt=\"atom.gif\" name=\"atom\" width=\"35\" height=\"34\" border=\"1\" align=\"top\"><br><br>";
 15     echo "<a style='color:black;font-size:11px;font-weight:bold;' href='javascript:history.back()'>zur&uuml;ck</a></div>";
 16     exit();
 17     }
 18 //************************************* Umleitung Bug IE 5.01 **********************************/
 19 
 20 $smile = "<img src='supersmile.gif' width='21' height='20' alt='richtig' border='0'>";
 21 $redx = "<img src='red_x.gif' width='16' height='16' alt='falsch' border='0'>";
 22 
 23 if(isset($_POST['submit'])){
 24 $loesung=array("die","der","das","der","das","das","die","die","die","das","der","die","die","der");
 25 
 26 $s = "<img src='supersmile.gif' width='21' height='20' alt='richtig' border='0'>";
 27 $img = "<img src='red_x.gif' width='16' height='16' alt='falsch' border='0'>";
 28 
 29 $ok = false;
 30 foreach ($loesung as $key => $value) {
 31     if ($value == $_POST[$key]){
 32     $ok[$key] = true;
 33     }
 34 }
 35 //print_r($ok);
 36 
 37     if (count($ok) != 1) {
 38 $a = count($ok);
 39 $c = count($loesung);
 40 $b = $c - $a;
 41 $a = ": ".$a." Einträge";
 42 $b = ": ".$b." Einträge";
 43     }
 44 }//isset schleife
 45 
 46 $monate = array("Dezember","Januar","Februar","M&auml;rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
 47 $zeit = date("H:i");
 48 $m = date("n");
 49 $tag = date("j");
 50 $jahr = date("Y");
 51 $monat = $monate[$m];
 52 ?>
 53 
 54 <table border="0" style="backgroundcolor:white" cellpadding="2" cellspacing="0" width="100%">
 55         <tr height="30">
 56         <td width="65%" colspan="2" style="color:#f8f8ff; padding-left:5px" style="backgroundcolor:#0099CC" height="30" align="left" valign="middle">'die' - 'der' - 'das' ??? - Setzen Sie den richtigen Artikel ein!</td><td width="35%" valign="middle" style="color:#f8f8ff; padding-right:5px" style="backgroundcolor:#0099CC" height="30" align="right"><?php echo $tag.". ".$monat." ".$jahr."&nbsp;&nbsp;|&nbsp;&nbsp;".$zeit." Uhr"; ?></td>
 57     </tr>
 58 </table>
 59 <br>
 60 <table width="100%">
 61 <tr>
 62 <td width="50%" style="border:0px dashed gray">
 63 
 64 <table>
 65 <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="artikel">
 66 <tr>
 67 <td width="250">
 68 <input type="text" name="0" value="<?php if($ok[0] || $_POST[0]=='?') {echo $loesung[0];} else {echo $_POST[0];}; ?>" size="3" />&nbsp;Gabel&nbsp;<?php if($ok[0]) {echo $s;} else {if($_POST[0]=='?') {echo '';} else {echo $img;}} ?>
 69 <br><br></td><td align="left" width="250">
 70 <input type="text" name="1" value="<?php if($ok[1] || $_POST[1]=='?') {echo $loesung[1];} else {echo $_POST[1];}; ?>" size="3" />&nbsp;Schuh&nbsp;<?php if($ok[1]) {echo $s;} else {if($_POST[1]=='?') {echo '';} else {echo $img;}} ?>
 71 <br><br></td></tr>
 72 
 73 <tr><td width="250">
 74 <input type="text" name="2" value="<?php if($ok[2] || $_POST[2]=='?') {echo $loesung[2];} else {echo $_POST[2];}; ?>" size="3" />&nbsp;Haus&nbsp;<?php if($ok[2]) {echo $s;} else {if($_POST[2]=='?') {echo '';} else {echo $img;}} ?>
 75 <br><br></td><td align="left" width="250">
 76 <input type="text" name="3" value="<?php if($ok[3] || $_POST[3]=='?') {echo $loesung[3];} else {echo $_POST[3];}; ?>" size="3" />&nbsp;Stuhl&nbsp;<?php if($ok[3]) {echo $s;} else {if($_POST[3]=='?') {echo '';} else {echo $img;}} ?>
 77 <br><br></td></tr>
 78 
 79 <tr><td width="250">
 80 <input type="text" name="4" value="<?php if($ok[4] || $_POST[4]=='?') {echo $loesung[4];} else {echo $_POST[4];}; ?>" size="3" />&nbsp;Weinglas&nbsp;<?php if($ok[4]) {echo $s;} else {if($_POST[4]=='?') {echo '';} else {echo $img;}} ?>
 81 <br><br></td><td align="left" width="250">
 82 <input type="text" name="5" value="<?php if($ok[5] || $_POST[5]=='?') {echo $loesung[5];} else {echo $_POST[5];}; ?>" size="3" />&nbsp;Taschenmesser&nbsp;<?php if($ok[5]) {echo $s;} else {if($_POST[5]=='?') {echo '';} else {echo $img;}} ?>
 83 <br><br></td></tr>
 84 
 85 <tr><td width="250">
 86 <input type="text" name="6" value="<?php if($ok[6] || $_POST[6]=='?') {echo $loesung[6];} else {echo $_POST[6];}; ?>" size="3" />&nbsp;Gitarre&nbsp;<?php if($ok[6]) {echo $s;} else {if($_POST[6]=='?') {echo '';} else {echo $img;}} ?>
 87 <br><br></td><td align="left" width="250">
 88 <input type="text" name="7" value="<?php if($ok[7] || $_POST[7]=='?') {echo $loesung[7];} else {echo $_POST[7];}; ?>" size="3" />&nbsp;Musik&nbsp;<?php if($ok[7]) {echo $s;} else {if($_POST[7]=='?') {echo '';} else {echo $img;}} ?>
 89 <br><br></td></tr>
 90 
 91 <tr><td width="250">
 92 <input type="text" name="8" value="<?php if($ok[8] || $_POST[8]=='?') {echo $loesung[8];} else {echo $_POST[8];}; ?>" size="3" />&nbsp;Pfanne&nbsp;<?php if($ok[8]) {echo $s;} else {if($_POST[8]=='?') {echo '';} else {echo $img;}} ?>
 93 <br><br></td><td align="left" width="250">
 94 <input type="text" name="9" value="<?php if($ok[9] || $_POST[9]=='?') {echo $loesung[9];} else {echo $_POST[9];}; ?>" size="3" />&nbsp;Telefon&nbsp;<?php if($ok[9]) {echo $s;} else {if($_POST[9]=='?') {echo '';} else {echo $img;}} ?>
 95 <br><br></td></tr>
 96 
 97 <tr><td width="250">
 98 <input type="text" name="10" value="<?php if($ok[10] || $_POST[10]=='?') {echo $loesung[10];} else {echo $_POST[10];}; ?>" size="3" />&nbsp;Kamm&nbsp;<?php if($ok[10]) {echo $s;} else {if($_POST[10]=='?') {echo '';} else {echo $img;}} ?>
 99 <br><br></td><td align="left" width="250">
100 <input type="text" name="11" value="<?php if($ok[11] || $_POST[11]=='?') {echo $loesung[11];} else {echo $_POST[11];}; ?>" size="3" />&nbsp;Schere&nbsp;<?php if($ok[11]) {echo $s;} else {if($_POST[11]=='?') {echo '';} else {echo $img;}} ?>
101 <br><br></td></tr>
102 
103 <tr><td width="250">
104 <input type="text" name="12" value="<?php if($ok[12] || $_POST[12]=='?') {echo $loesung[12];} else {echo $_POST[12];}; ?>" size="3" />&nbsp;Katze&nbsp;<?php if($ok[12]) {echo $s;} else {if($_POST[12]=='?') {echo '';} else {echo $img;}} ?>
105 <br><br></td><td align="left" width="250">
106 <input type="text" name="13" value="<?php if($ok[13] || $_POST[13]=='?') {echo $loesung[13];} else {echo $_POST[13];}; ?>" size="3" />&nbsp;Besen&nbsp;<?php if($ok[13]) {echo $s;} else {if($_POST[13]=='?') {echo '';} else {echo $img;}} ?>
107 <br><br></td></tr>
108 </table>
109 </td>
110 <td align="right" width="50%" style="border:0px dashed gray">
111 <?php echo $gif = "<img src=\"objecte.gif\">"; ?></td>
112 </tr>
113 </table>
114 
115 <hr><br>
116  
117 <table width="100%">
118 <tr height="30px">
119 <td width="25%">
120 
121 <input title=" richtig oder falsch ??? - click hier " class="sub" type="submit" value="kontrollieren" name="submit" />
122 </form>
123 
124 </td>
125 <td align="left" width="45%"><?php echo $smile; ?>&nbsp;richtig&nbsp;<?php echo $a; ?></td>
126 <td width="30%">
127 <!-- <p align="right"><a href="#.php">n&auml;chste &Uuml;bung</a>&nbsp;<img src='back_turnable.gif' width='25' height='25' alt='n&auml;chste &Uuml;bung' border='0'></p> --></td>
128 </tr>
129 <tr height="50px">
130 <td>
131 <!-- overLIB (c) Erik Bosrup (c) www.bosrup.com -->
132 <script type="text/javascript" src="../js/overlib421/overlib.js"></script> 
133 <img onmouseover="return overlib('Du findest die richtige Antwort nicht? - Tippe ein \'?\' ins Feld ein und bestätige auf der Tastatur mit Enter oder klicke mit der Maus auf kontrollieren - Dann wird die Lösung angezeigt.', OFFSETX,10, OFFSETY,-50, CAPTION,'Probleme ???');" onmouseout="return nd();" src="icon_help_winxp.gif" alt="" width="26" height="26" border="0" align="left">
134 </td>
135 <td align="left" width="10%"><?php echo $redx; ?>&nbsp;&nbsp;falsch&nbsp;<?php echo $b; ?></td>
136 <td>&nbsp;</td>
137 </tr>
138 </table>
139 
140 </body>
141 </html>
142 
143