Changeset 264 for branches/release-1_3/include
- Timestamp:
- Jan 4, 2004, 11:16:36 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/release-1_3/include/functions.inc.php
r243 r264 158 158 } 159 159 160 // get_dirs retourne un tableau contenant tous les sous-répertoires d'un 161 // répertoire 162 function get_dirs( $rep ) 163 { 164 $sub_rep = array(); 165 166 if ( $opendir = opendir ( $rep ) ) 160 /** 161 * returns an array contening sub-directories 162 * 163 * @param string $dir 164 * @return array 165 */ 166 function get_dirs( $directory ) 167 { 168 $sub_dirs = array(); 169 170 if ( $opendir = opendir( $directory ) ) 167 171 { 168 172 while ( $file = readdir ( $opendir ) ) 169 173 { 170 if ( $file != '.' and $file != '..' and is_dir ( $ rep.$file ) )174 if ( $file != '.' and $file != '..' and is_dir ( $directory.'/'.$file ) ) 171 175 { 172 array_push( $sub_ rep, $file );176 array_push( $sub_dirs, $file ); 173 177 } 174 178 } 175 179 } 176 return $sub_ rep;180 return $sub_dirs; 177 181 } 178 182 … … 257 261 } 258 262 259 // get_themes retourne un tableau contenant tous les "template - couleur"260 function get_themes( $theme_dir )261 {262 $themes = array();263 $main_themes = get_dirs( $theme_dir );264 for ( $i = 0; $i < sizeof( $main_themes ); $i++ )265 {266 $colors = get_dirs( $theme_dir.$main_themes[$i].'/' );267 for ( $j = 0; $j < sizeof( $colors ); $j++ )268 {269 array_push( $themes, $main_themes[$i].' - '.$colors[$j] );270 }271 }272 return $themes;273 }274 275 263 // - add_style replaces the 276 264 // $search into <span style="$style">$search</span>
Note: See TracChangeset
for help on using the changeset viewer.