Source for file random.php
Documentation is available at random.php
* Name: Random Theme Every Login
* Date: December 24, 2001
* Comment: Guess what this does!
* @copyright © 2000-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: random.php,v 1.17 2006/07/15 12:01:31 tokul Exp $
/** Prevent direct script loading */
if ((isset
($_SERVER['SCRIPT_FILENAME']) &&
$_SERVER['SCRIPT_FILENAME'] == __FILE__
) ||
(isset
($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) &&
$HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__
) ) {
/** load required functions */
include_once(SM_PATH .
'functions/global.php');
include_once(SM_PATH .
'functions/strings.php');
/** Initialize the random number generator */
foreach ($theme as $data) {
if (substr($data['PATH'], -
18) !=
'/themes/random.php') {
$good_themes[] =
$data['PATH'];
if (count($good_themes) ==
0) {
$good_themes[] =
'../themes/default.php';
$random_theme_good_theme =
$good_themes[$which];
// remove current sm_path from theme name
$random_theme_good_theme=
preg_replace("/^$path/",'',$random_theme_good_theme);
// get random theme stored in session
@include_once (SM_PATH .
$random_theme_good_theme);
Documentation generated on Sat, 07 Oct 2006 16:13:08 +0300 by phpDocumentor 1.3.0RC6