Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Location
    N.Y.
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry sTYLE switcher in php & java ....

    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
    ------------------------------------------------------------------
    Part 2

    index.php
    PHP Code:
    <?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 Code:
    <?php

    setcookie
    ("sitestyle"$_GET['set'], time()+31536000);  /* expire in 1 year */

    header("Location: index.php");

    ?>
    --------------------------------------------------------

    Header.php

    PHP Code:
    <!-- 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
    Last edited by nyshalynn; 01-24-2010 at 09:09 PM.

  • #2
    New to the CF scene
    Join Date
    Jan 2010
    Location
    N.Y.
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Um' should I take it that I posted this in the wrong place ???
    Or your just not good enough with this use of the the language ??

    Let me know ???
    Thanks..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •