I didn't write it I just cleaned it up a little. Step 1: create a include file called bgcolor.php or whatever. Step 2: include("bgcolor.php"); in php file. Step 3: replace your body statement. Best Wishes, marc
By : marc
**************************************** * save this as say bgcolor.php * **************************************** <?php
$today = date("w");
$bgcolor = array(
"#F0F4F1", "#FEF0C5", "#FFFFFF", "#FBFFC4",
"#E6EDFF", "#FFE0DD", "#E9FFE6"
);
$b_link="#0000FF"; // link $b_vlink="#800080"; // visited link $b_alink="#FF0000"; // active link $format = "\" link=\"%s\" vlink=\"%s\" alink=\"%s\""; $part_two = sprintf($format,$b_link,$b_vlink,$b_alink); ?> **************************************** * Place code below in your php files * **************************************** <?php include("bgcolor.php"); ?>
**************************************** * Replace your body statement with... * **************************************** <?php include("bgcolor.php"); ?> <body bgcolor="<?php print("$bgcolor[$today]");print("$part_two");?>>
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.