Ik heb eens een scriptje gemaakt om verschillende layouts te testen dat opeens niet meer werkt sinds ik in een ander scriptje van de site heb zitten klooien met cookies, ook met negatieve vervaltijden. Het scriptje waar ik in heb zitten klooien bestaat niet meer maar het andere wel.
Ik draai verder mijn server op directadmin.
Ik heb ook al mijn browsergegevens gewist en mijn server herstart.
code die in de page geincluded wordt:
PHP: theme.php
<div class="panel panel-default">
<div class="panel-heading">
change theme
</div>
<div class="panel-body">
<p>
Here can you change the the home style of the whole site. Your choice will be saved on your computer as a cookie.<br>
All themes come from bootswatch.com .
</p>
<?php
if(isset($_POST['cerulean'])){
setcookie("theme", "https://bootswatch.com/cerulean/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['cosmo'])){
setcookie("theme", "https://bootswatch.com/cosmo/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['cyborg'])){
setcookie("theme", "https://bootswatch.com/cyborg/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['darkly'])){
setcookie("theme", "https://bootswatch.com/darkly/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['flatly'])){
setcookie("theme", "https://bootswatch.com/flatly/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['journal'])){
setcookie("theme", "https://bootswatch.com/journal/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['lumen'])){
setcookie("theme", "https://bootswatch.com/lumen/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['paper'])){
setcookie("theme", "https://bootswatch.com/paper/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['readable'])){
setcookie("theme", "https://bootswatch.com/readable/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['sandstone'])){
setcookie("theme", "https://bootswatch.com/sandstone/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['simplex'])){
setcookie("theme", "https://bootswatch.com/simplex/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['slate'])){
setcookie("theme", "https://bootswatch.com/slate/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['spacelab'])){
setcookie("theme", "https://bootswatch.com/spacelab/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['superhero'])){
setcookie("theme", "https://bootswatch.com/superhero/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['united'])){
setcookie("theme", "https://bootswatch.com/united/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
if(isset($_POST['yeti'])){
setcookie("theme", "https://bootswatch.com/yeti/bootstrap.min.css", time() + (86400 * 30), "/");
header('Location: index.php?p=theme&success=true');
}
?>
<form method="post">
<table class="table table-striped table-hover ">
<thead>
<tr>
<th>Theme</th>
<th>Enable</th>
</tr>
</thead>
<tbody>
<tr>
<td><b>Cerulean</b></td>
<td><button name="cerulean" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Cosmo</b></td>
<td><button name="cosmo" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Cyborg</b></td>
<td><button name="cyborg" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Darkly</b> <span class="text-success">(default theme)</span></td>
<td><button name="darkly" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Flatly</b></td>
<td><button name="flatly" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Journal</b></td>
<td><button name="journal" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Lumen</b></td>
<td><button name="lumen" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Paper</b></td>
<td><button name="paper" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Readable</b></td>
<td><button name="readable" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Sandstone</b></td>
<td><button name="sandstone" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Simplex</b></td>
<td><button name="simplex" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Slate</b></td>
<td><button name="slate" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Spacelab</b></td>
<td><button name="spacelab" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Superhero</b></td>
<td><button name="superhero" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>United</b></td>
<td><button name="united" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
<tr>
<td><b>Yeti</b></td>
<td><button name="yeti" type="submit" class="btn btn-info btn-xs">Enable</button></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
Toon Meer