<!DOCTYPE html><!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
<?php
$style = isset($_GET['style']) ? $_GET['style'] : "default";
$files= array();
$dh = opendir("styles");
while($file = @readdir($dh)){
if(preg_match("/[.]css$/", "", $file))
{
$file = preg_replace("/[.]css$/", "", $file);
$files []= $file;
}
}
?>
<style type="text/css" media="all">@import url(styles/<?php echo ($style);?>.css);</style>
</head>
<body>
<table width="800px">
<tr>
<td width='200px' class="menu" valign='top'>
<div class="menu-active"><a href="home.php">Home</a></div>
<div class="menu-inactive"><a href="faq.php">faq</a></div>
<div class="menu-inactive"><a href="contact.php">contatti</a></div>
</td>
<td width='600px' valign='top'>
<table class="box">
<tr>
<td class="box-title">
Importanti informazioni
</td>
</tr>
<tr>
<td class="box-content">
lots of information about important events and stuff
</td>
</tr>
</table>
</td>
</tr>
</table>
<form>
Style:<select name="style">
<?php
foreach ($files as $file){?>
<option value="<?php ($file);?>"
<?php ($file==$style ? "selected":"");?>>
<?php ($file);?>
</option>
<?php } ?>
</select>
<input type="submit" value="Select">
</form>
</body>
</html>