array(), // Unix name from filesystem 'theme_name' => array(), // Title 'theme_author' => array(), // Theme author's name 'theme_email' => array(), // Author's email address 'theme_url' => array(), // URL were you can download it from 'theme_version' => array(), // Version number of theme ); // Read directory "themes" $includes = getArrayFromDirectory('theme/', '', false, true, array('css', 'images')); // Walk through all entries and add it foreach ($includes as $inc) { // Get directory from it $dir = basename(dirname($inc)); // Load include file loadInclude($inc); // Add found theme to array array_push($themes['theme_unix'] , $dir); array_push($themes['theme_name'] , $GLOBALS['theme_data']['name']); array_push($themes['theme_author'] , $GLOBALS['theme_data']['author']); array_push($themes['theme_email'] , $GLOBALS['theme_data']['email']); array_push($themes['theme_url'] , $GLOBALS['theme_data']['url']); array_push($themes['theme_version'], $GLOBALS['theme_data']['version']); } // END - while // Sort array by Uni* name array_pk_sort($themes, array('theme_name')); // Generate output lines for the template $OUT = ''; foreach ($themes['theme_unix'] as $key => $unix) { // Already installed is default $formContent = '