X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=themes%2Fspice_of_life_lite.php;h=dcba8e6b031d245dfec2c526ede8f911bacc0aba;hb=865050ce6daedb8dbbbb568a36e802b0b6459565;hp=b6fc270428f963d3c252d02c0688294e17dbd951;hpb=95b5b26d396622b5ae99a56d030b86725220d640;p=squirrelmail.git diff --git a/themes/spice_of_life_lite.php b/themes/spice_of_life_lite.php old mode 100755 new mode 100644 index b6fc2704..dcba8e6b --- a/themes/spice_of_life_lite.php +++ b/themes/spice_of_life_lite.php @@ -1,55 +1,41 @@ 1 quote - $color[14] = '#xxxxxx'; // Color for quoted text -- >> 2 or more - -**/ - -?> +/** + * Name: Spice of Life - Lite + * Date: October 20, 2001 + * Comment This theme generates random colors, featuring a + * lite background with dark text. + * + * @author Jorey Bump + * @copyright 2000-2010 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package squirrelmail + * @subpackage themes + */ + +/** Prevent direct script loading */ +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { + die(); +} + +for ($i = 0; $i <= 16; $i++) { + /** background/foreground toggle **/ + if ($i == 0 or $i == 3 or $i == 4 or $i == 5 or $i == 9 or $i == 10 or $i == 12 or $i == 16) { + /** background **/ + $cmin = 128; + $cmax = 255; + } else { + /** text **/ + $cmin = 0; + $cmax = 127; + } + + /** generate random color **/ + $r = mt_rand($cmin,$cmax); + $g = mt_rand($cmin,$cmax); + $b = mt_rand($cmin,$cmax); + + /** set array element as hex string with hashmark (for HTML output) **/ + $color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b); +}