Easy PHP/Javascript rollover images for osCommerce links

The javascript portion:

[code lang=”php”] < ?php function JavaCatTab($num) { echo 'tab' . $num . 'up = new Image();'; echo 'tab' . $num . 'up.src = "images/design/tab_' . $num . '.gif" ;'; echo 'tab' . $num . 'down = new Image() ;'; echo 'tab' . $num . 'down.src = "images/design/tab_' . $num . 'down.gif" ;'; } ?>

[/code]

The links portion (place below the first part somewhere):

[code lang=”php”] < ?php function catTab($num, $link) { echo '‘;
echo ‘‘;
echo ‘‘;
}

catTab(’01’,’cPath=48′);
catTab(’02’,’cPath=62′);
catTab(’03’,’cPath=56′);
catTab(’04’,’cPath=59′);
catTab(’05’,’cPath=55′);
catTab(’06’,’cPath=63′);
catTab(’07’,’cPath=57′);
?>
[/code]

Easy stylesheets with basic PHP

Create a file called stylesheet.php and link to it in you’re page. Then play with this code:

[code lang=”php”] < ?php header('Content-type: text/css'); // Colour scheme $primary = "#44749d"; $secondary = "#c6d4e1"; $tertiary = "#ffffff"; $quaternary = "#ebe7e0"; $quinary = "#bdb8ad"; ?>

BODY {
background: < ?php echo $tertiary ?>;
color: #000000;
margin: 0px;
}
[/code]