PageRenderTime 57ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1_5_1/squirrelmail/themes/kind_of_blue.php

#
PHP | 64 lines | 17 code | 8 blank | 39 comment | 10 complexity | c037cdfe4767c76978ff4a44b4fa7107 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0
  1. <?php
  2. /**
  3. * kind_of_blue.php
  4. * Name: Kind of Blue
  5. * Date: October 20, 2001
  6. * Comment: This theme generates random colors, featuring a
  7. * light bluish background with dark text.
  8. *
  9. * @author Jorey Bump
  10. * @copyright &copy; 2000-2006 The SquirrelMail Project Team
  11. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  12. * @version $Id: kind_of_blue.php 10559 2006-01-23 18:46:41Z tokul $
  13. * @package squirrelmail
  14. * @subpackage themes
  15. */
  16. /** seed the random number generator */
  17. sq_mt_randomize();
  18. for ($i = 0; $i <= 15; $i++) {
  19. /* background/foreground toggle */
  20. if ($i == 0 or $i == 3 or $i == 4 or $i == 5 or $i == 9 or $i == 10 or $i == 12) {
  21. /* background */
  22. $b = mt_rand(248,255);
  23. $r = mt_rand(180,255);
  24. $g = mt_rand(178,$r);
  25. } else {
  26. /* text */
  27. $cmin = 0;
  28. $cmax = 128;
  29. /** generate random color **/
  30. $b = mt_rand($cmin,$cmax);
  31. $g = mt_rand($cmin,$cmax);
  32. $r = mt_rand($cmin,$cmax);
  33. }
  34. /* set array element as hex string with hashmark (for HTML output) */
  35. $color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b);
  36. }
  37. /* Reference from http://www.squirrelmail.org/wiki/CreatingThemes
  38. $color[0] = '#xxxxxx'; // Title bar at the top of the page header
  39. $color[1] = '#xxxxxx'; // Not currently used
  40. $color[2] = '#xxxxxx'; // Error messages (usually red)
  41. $color[3] = '#xxxxxx'; // Left folder list background color
  42. $color[4] = '#xxxxxx'; // Normal background color
  43. $color[5] = '#xxxxxx'; // Header of the message index // (From, Date,Subject)
  44. $color[6] = '#xxxxxx'; // Normal text on the left folder list
  45. $color[7] = '#xxxxxx'; // Links in the right frame
  46. $color[8] = '#xxxxxx'; // Normal text (usually black)
  47. $color[9] = '#xxxxxx'; // Darker version of #0
  48. $color[10] = '#xxxxxx'; // Darker version of #9
  49. $color[11] = '#xxxxxx'; // Special folders color (INBOX, Trash, Sent)
  50. $color[12] = '#xxxxxx'; // Alternate color for message list // Alters between #4 and this one
  51. $color[13] = '#xxxxxx'; // Color for quoted text -- > 1 quote
  52. $color[14] = '#xxxxxx'; // Color for quoted text -- >> 2 or more
  53. */
  54. ?>