QUOTE(Jem @ Dec 21 2007, 04:15 PM)

OK, what's in the main header.php, and what's in setskin.php?
For setskin.php:
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<?php
if (isset($_GET['skin']) && is_numeric($_GET['skin']) && is_dir('/home/kura/public_html/skins/' . $_GET['skin'])) {
setcookie("myskin", $_GET['skin'], time()+(31*86400));
header("Location: setskin.php");
}
include('header.php');
if (isset($_COOKIE['myskin'])) {
echo "<p>Your skin is currently set to ".(int)$_COOKIE['myskin']."</p>";
} else {
echo "<p>There is no skin currently set.</p>";
}
?>
<p>
<a href="setskin.php?skin=1">Change to skin 1?</a>
<a href="setskin.php?skin=2">Change to skin 2?</a>
</p>
<?php include($footer); ?>
<body>
</body>
</html>
For header.php (the one in the root directory):
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<?php
$pathtoskins = "/home/kura/public_html/skins/";
$defaultskin = 1;
if (isset($_COOKIE['myskin']) && file_exists($pathtoskins . $_COOKIE['myskin'] . '/header.php') && file_exists($pathtoskins . $_COOKIE['myskin'] . '/footer.php')) {
$header = $pathtoskins . $_COOKIE['myskin'] . "/header.php";
$footer = $pathtoskins . $_COOKIE['myskin'] . "/footer.php";
$styles = "/skins/" . $_COOKIE['myskin'] . "/stylesheet.css";
} else {
$header = $pathtoskins . $defaultskin . "/header.php";
$footer = $pathtoskins . $defaultskin . "/footer.php";
$styles = "/skins/" . $defaultskin . "/stylesheet.css";
}
include($header);
?><body>
</body>
</html>
The footer.php file in skins/1/:
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><head>
<link href="style1.css" rel="stylesheet" type="text/css" />
</head>
<hr />
<div class="container">
<h1 align="left" class="menu">Credits</h1>
</div>
</body></html>