array(), // Unix name from filesystem 'theme_name' => array() // Title ); // Only activated themes for the user $add = " WHERE `theme_active`='Y'"; // Do we have admin? if (IS_ADMIN()) $add = ''; // Select all themes we want $result = SQL_QUERY("SELECT `theme_path`, `theme_name` FROM `{!_MYSQL_PREFIX!}_themes`".$add." ORDER BY `theme_name` ASC", __FILE__, __LINE__); // Load all themes while ($content = SQL_FETCHARRAY($result)) { // Construct relative include file name $INC = sprintf("theme/%s/theme.php", SQL_ESCAPE($content['theme_path'])); // Load it's theme.php file if found if (isIncludeReadable($INC)) { // And save all data in array loadInclude($INC); $themesArray['theme_unix'][] = $content['theme_path']; $themesArray['theme_name'][] = $GLOBALS['theme_data']['name']; } // END - if } // END - while // Free the result SQL_FREERESULT($result); // Construct selection form for the box template $OUT = ''; foreach ($themesArray['theme_unix'] as $key => $theme) { $OUT .= "