Ejemplo n.º 1
0
<?php

$title = 'Template for testprogram';
include 'header.php';
include 'class/CDatabase.php';
?>
<div id='content'>
<?php 
$db = new CDatabase();
if (isset($_GET['animal'])) {
    $type = $_GET['animal'];
    $res = $db->executeQuery("SELECT * FROM animal WHERE id='{$type}'");
    ?>
	<h1 class="animalName"><?php 
    echo utf8_encode($res[0]['name']);
    ?>
</h1>
	<img id="slider" src="images/<?php 
    echo $res[0]['image'];
    ?>
Front1.jpg" atr="<?php 
    echo utf8_encode($res[0]['animalName']);
    ?>
" width="300" height="360" class="animalFront">
	<div id="menu">
			<p class="buttonInfo" id="infoBtn">Info</p>
			<p class="buttonLive" id="liveBtn">Bor</p>
			<p class="buttonEat" id="eatBtn">Äter</p>
			<p class="buttonExtra" id="extraBtn">Extra</p>
	</div>
	<img id="playText" src="images/speakerOff.png" atr="Högtalare" width="30"  height="30" style="margin: 10px">
Ejemplo n.º 2
0
<?php

$title = 'Template for testprogram';
include 'header.php';
include 'class/CDatabase.php';
$db = new CDatabase();
$res = $db->executeQuery('SELECT animal.id, animal.name from animal');
?>
<div id='content'>
<div id='animalList'>
<h1>Klicka på ett djur</h1>
<i>Tips.. håll musen över varje bild för att höra hur dom låter</i>
<form method="GET">
<?php 
foreach ($res as $key => $value) {
    ?>
 <a href="play.php?animal=<?php 
    echo $res[$key]['id'];
    ?>
" name="<?php 
    echo $res[$key]['id'];
    ?>
"><img id="<?php 
    echo $res[$key]['id'];
    ?>
" class="animal" src="images/<?php 
    echo $res[$key]['id'];
    ?>
Sign.jpg" 
		atr="<?php 
    echo $res[$key]['name'];