nyshalynn
01-24-2010, 06:15 PM
Hi,
I had a style switcher script that I lost some time ago that allowed for these thing's
Costum Headers and footers (includes) for each style.
An internal clock that would change a theme on a certain date, set by me in it's coding..
E.G.
My Site
|
|
index.php
Switcher.php
|
|
@Layout 1 Folder
|
|
|
1.Css
header.inc
footer.inc
*Images Folder
|
|
@Layout 2 Folder
|
|
|
2.Css
header.inc
footer.inc
*Images Folder
I would also like the options of sound file (sound on mouseover,etc.) , but it's not nec. with custome headers and footers ....
Hear are the 2 scripts I'm trying to combine ...
Click the word --> Part 1 (http://www.centerkey.com/style/switcher/)
------------------------------------------------------------------
Part 2
index.php
<?php
// Includes
include ("header.txt");
// $page
$page = strip_tags($_GET['page']);
// $page IS DEFINED
// IF IT ISN'T IT WILL DISPLAY home.txt
if (!$page)
{
$include = 'home.txt';
include ($include);
}
else
{
// $include page
$include = 'files/'.$page.'.txt';
// $include EXISTS
if (is_file("$include"))
{
// $include
include ($include);
}
// $include IS NOT FOUND
else
{
echo "The page you were trying to access is not found on this server.";
}
}
//
include ("footer.txt");
?>
Switcher.php
<?php
setcookie("sitestyle", $_GET['set'], time()+31536000); /* expire in 1 year */
header("Location: index.php");
?>
--------------------------------------------------------
Header.php
<!-- sticky; will not change -->
<link rel="stylesheet" type="text/css" href="default.css" />
<link rel="stylesheet" type="text/css" media="screen" title="User Defined Style" href="<?php echo (!$_COOKIE["sitestyle"])?'default':$_COOKIE["sitestyle"] ?>.css" />
<!-- alternative; optional -->
<link rel="alternate stylesheet" type="text/css" media="screen" title="main" href="main.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="monochrome" href="monochrome.css" />
Yes !! I need custom header and footers for each style ..
You seem to know what your doing here so help if you would ..
thanx :D:cool:
I had a style switcher script that I lost some time ago that allowed for these thing's
Costum Headers and footers (includes) for each style.
An internal clock that would change a theme on a certain date, set by me in it's coding..
E.G.
My Site
|
|
index.php
Switcher.php
|
|
@Layout 1 Folder
|
|
|
1.Css
header.inc
footer.inc
*Images Folder
|
|
@Layout 2 Folder
|
|
|
2.Css
header.inc
footer.inc
*Images Folder
I would also like the options of sound file (sound on mouseover,etc.) , but it's not nec. with custome headers and footers ....
Hear are the 2 scripts I'm trying to combine ...
Click the word --> Part 1 (http://www.centerkey.com/style/switcher/)
------------------------------------------------------------------
Part 2
index.php
<?php
// Includes
include ("header.txt");
// $page
$page = strip_tags($_GET['page']);
// $page IS DEFINED
// IF IT ISN'T IT WILL DISPLAY home.txt
if (!$page)
{
$include = 'home.txt';
include ($include);
}
else
{
// $include page
$include = 'files/'.$page.'.txt';
// $include EXISTS
if (is_file("$include"))
{
// $include
include ($include);
}
// $include IS NOT FOUND
else
{
echo "The page you were trying to access is not found on this server.";
}
}
//
include ("footer.txt");
?>
Switcher.php
<?php
setcookie("sitestyle", $_GET['set'], time()+31536000); /* expire in 1 year */
header("Location: index.php");
?>
--------------------------------------------------------
Header.php
<!-- sticky; will not change -->
<link rel="stylesheet" type="text/css" href="default.css" />
<link rel="stylesheet" type="text/css" media="screen" title="User Defined Style" href="<?php echo (!$_COOKIE["sitestyle"])?'default':$_COOKIE["sitestyle"] ?>.css" />
<!-- alternative; optional -->
<link rel="alternate stylesheet" type="text/css" media="screen" title="main" href="main.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="monochrome" href="monochrome.css" />
Yes !! I need custom header and footers for each style ..
You seem to know what your doing here so help if you would ..
thanx :D:cool: