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

Dateigrösse: 8.56 kb

[Anzeige ohne Zeilennummern]


1 
<html>
    <head>
        <title> A r t i k e l  mit PHP by Mike Steiner</title>
        <link rel="stylesheet" href="scblack.css" type="text/css">
    </head>
    
<body>

<?php
/*
if ( $br == 'Internet Explorer' && $v == 5 )
    {
    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>";
    echo "<div align='center'><img src=\"../img/atom.gif\" alt=\"atom.gif\" name=\"atom\" width=\"35\" height=\"34\" border=\"1\" align=\"top\"><br><br>";
    echo "<a style='color:black;font-size:11px;font-weight:bold;' href='javascript:history.back()'>zur&uuml;ck</a></div>";
    exit();
    }
//************************************* Umleitung Bug IE 5.01 **********************************/

$smile = "<img src='supersmile.gif' width='21' height='20' alt='richtig' border='0'>";
$redx = "<img src='red_x.gif' width='16' height='16' alt='falsch' border='0'>";

if(isset($_POST['submit'])){
$loesung=array("die","der","das","der","das","das","die","die","die","das","der","die","die","der");

$s = "<img src='supersmile.gif' width='21' height='20' alt='richtig' border='0'>";
$img = "<img src='red_x.gif' width='16' height='16' alt='falsch' border='0'>";

$ok = false;
foreach ($loesung as $key => $value) {
    if ($value == $_POST[$key]){
    $ok[$key] = true;
    }
}
//print_r($ok);

    if (count($ok) != 1) {
$a = count($ok);
$c = count($loesung);
$b = $c - $a;
$a = ": ".$a." Einträge";
$b = ": ".$b." Einträge";
    }
}//isset schleife

$monate = array("Dezember","Januar","Februar","M&auml;rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
$zeit = date("H:i");
$m = date("n");
$tag = date("j");
$jahr = date("Y");
$monat = $monate[$m];
?>

<table border="0" style="backgroundcolor:white" cellpadding="2" cellspacing="0" width="100%">
        <tr height="30">
        <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>
    </tr>
</table>
<br>
<table width="100%">
<tr>
<td width="50%" style="border:0px dashed gray">

<table>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="artikel">
<tr>
<td width="250">
<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;}} ?>
<br><br></td><td align="left" width="250">
<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;}} ?>
<br><br></td></tr>

<tr><td width="250">
<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;}} ?>
<br><br></td><td align="left" width="250">
<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;}} ?>
<br><br></td></tr>

<tr><td width="250">
<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;}} ?>
<br><br></td><td align="left" width="250">
<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;}} ?>
<br><br></td></tr>

<tr><td width="250">
<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;}} ?>
<br><br></td><td align="left" width="250">
<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;}} ?>
<br><br></td></tr>

<tr><td width="250">
<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;}} ?>
<br><br></td><td align="left" width="250">
<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;}} ?>
<br><br></td></tr>

<tr><td width="250">
<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;}} ?>
<br><br></td><td align="left" width="250">
<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;}} ?>
<br><br></td></tr>

<tr><td width="250">
<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;}} ?>
<br><br></td><td align="left" width="250">
<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;}} ?>
<br><br></td></tr>
</table>
</td>
<td align="right" width="50%" style="border:0px dashed gray">
<?php echo $gif = "<img src=\"objecte.gif\">"; ?></td>
</tr>
</table>

<hr><br>
 
<table width="100%">
<tr height="30px">
<td width="25%">

<input title=" richtig oder falsch ??? - click hier " class="sub" type="submit" value="kontrollieren" name="submit" />
</form>

</td>
<td align="left" width="45%"><?php echo $smile; ?>&nbsp;richtig&nbsp;<?php echo $a; ?></td>
<td width="30%">
<!-- <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>
</tr>
<tr height="50px">
<td>
<!-- overLIB (c) Erik Bosrup (c) www.bosrup.com -->
<script type="text/javascript" src="../js/overlib421/overlib.js"></script> 
<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">
</td>
<td align="left" width="10%"><?php echo $redx; ?>&nbsp;&nbsp;falsch&nbsp;<?php echo $b; ?></td>
<td>&nbsp;</td>
</tr>
</table>

</body>
</html>