#!/usr/bin/env php my_theme.css * * @copyright © 1999-2007 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail * @subpackage templates * @author Steve Brown * @since 1.5.2 */ /** make sure that first command line argument is set */ if (empty($argv[1])) { echo "Please provide the path to the file containing the \$color theme you\n" . "wish to convert to a stylesheet.\n\n"; exit (1); } $theme_file = $argv[1]; if (!is_file($theme_file) || !is_readable($theme_file)) { echo "The requested theme could not be converted because the file could not\n" . "be opened. Please specify a theme file that can be read.\n\n"; exit(1); } /* set default colors in case color theme is not full */ $def_color = array(); $def_color[0] = '#dcdcdc'; // (light gray) TitleBar $def_color[1] = '#800000'; // (red) $def_color[2] = '#cc0000'; // (light red) Warning/Error Messages $def_color[3] = '#a0b8c8'; // (green-blue) Left Bar Background $def_color[4] = '#ffffff'; // (white) Normal Background $def_color[5] = '#ffffcc'; // (light yellow) Table Headers $def_color[6] = '#000000'; // (black) Text on left bar $def_color[7] = '#0000cc'; // (blue) Links $def_color[8] = '#000000'; // (black) Normal text $def_color[9] = '#ababab'; // (mid-gray) Darker version of #0 $def_color[10] = '#666666'; // (dark gray) Darker version of #9 $def_color[11] = '#770000'; // (dark red) Special Folders color $def_color[12] = '#ededed'; // (light gray) Alternate color for message list $def_color[13] = '#800000'; // (dark red) Color for quoted text -- > 1 quote $def_color[14] = '#ff0000'; // (red) Color for quoted text -- >> 2 or more $def_color[15] = '#002266'; // (dark blue) Unselectable folders $def_color[16] = '#ff9933'; // (orange) Highlight color $color = $def_color; include($theme_file); if ($color === $def_color) { echo "The theme file you specified did not make any alterations to the default\n" . "color scheme. Please choose a different file.\n\n"; exit(1); } $css_source = <<