PageRenderTime 52ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
PHP | 60 lines | 15 code | 7 blank | 38 comment | 10 complexity | f64fbd6d39b0dc3177f7567d5bbd39f8 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0
  1. <?php
  2. /**
  3. * in_the_pink.php
  4. * Name: In the Pink
  5. * Date: October 20, 2001
  6. * Comment: This theme generates random colors, featuring a reddish
  7. * 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: in_the_pink.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. $r = mt_rand(248,255);
  23. $b = mt_rand(140,255);
  24. $g = mt_rand(128,$b);
  25. } else {
  26. /* text */
  27. $b = mt_rand(2,128);
  28. $r = mt_rand(1,$b);
  29. $g = mt_rand(0,$r);
  30. }
  31. /* set array element as hex string with hashmark (for HTML output) */
  32. $color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b);
  33. }
  34. /* Reference from http://www.squirrelmail.org/wiki/CreatingThemes
  35. $color[0] = '#xxxxxx'; // Title bar at the top of the page header
  36. $color[1] = '#xxxxxx'; // Not currently used
  37. $color[2] = '#xxxxxx'; // Error messages (usually red)
  38. $color[3] = '#xxxxxx'; // Left folder list background color
  39. $color[4] = '#xxxxxx'; // Normal background color
  40. $color[5] = '#xxxxxx'; // Header of the message index // (From, Date,Subject)
  41. $color[6] = '#xxxxxx'; // Normal text on the left folder list
  42. $color[7] = '#xxxxxx'; // Links in the right frame
  43. $color[8] = '#xxxxxx'; // Normal text (usually black)
  44. $color[9] = '#xxxxxx'; // Darker version of #0
  45. $color[10] = '#xxxxxx'; // Darker version of #9
  46. $color[11] = '#xxxxxx'; // Special folders color (INBOX, Trash, Sent)
  47. $color[12] = '#xxxxxx'; // Alternate color for message list // Alters between #4 and this one
  48. $color[13] = '#xxxxxx'; // Color for quoted text -- > 1 quote
  49. $color[14] = '#xxxxxx'; // Color for quoted text -- >> 2 or more
  50. */
  51. ?>