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 (isAdmin()) $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", secureString($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 .= "