PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/webmail-release-1_4_22/themes/in_the_pink.php

#
PHP | 37 lines | 14 code | 4 blank | 19 comment | 11 complexity | f1574cf1024380c637c790db6cf8905e 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 2000-2011 The SquirrelMail Project Team
  11. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  12. * @version $Id: in_the_pink.php 14084 2011-01-06 02:44:03Z pdontthink $
  13. * @package squirrelmail
  14. * @subpackage themes
  15. */
  16. /* seed the random number generator */
  17. sq_mt_randomize();
  18. for ($i = 0; $i <= 16; $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 or $i == 16) {
  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. }