First draft release notes...
[squirrelmail.git] / themes / random.php
1 <?php
2 /** Author: Tyler Akins
3 Theme Name: Random Theme Every Login
4
5 Guess what this does!
6
7 **/
8
9 sq_mt_randomize();
10
11 global $theme, $random_theme_good_themes;
12
13 if (! session_is_registered('random_theme_good_theme')) {
14 $good_themes = array();
15 foreach ($theme as $data) {
16 if (substr($data['PATH'], -18) != '/themes/random.php')
17 $good_themes[] = $data['PATH'];
18 }
19 if (count($good_themes) == 0)
20 $good_themes[] = "../themes/default.php";
21 $which = mt_rand(0, count($good_themes));
22 $random_theme_good_theme = $good_themes[$which];
23 session_register('random_theme_good_theme');
24 }
25
26 @include_once ($random_theme_good_theme);
27
28 ?>