コード例 #1
0
ファイル: conf.php プロジェクト: ejoan/erikajoan.com
$tern_wp_youtube_fields = array('Youtube ID:' => '_tern_wp_youtube_video', 'Youtube Publish Date:' => '_tern_wp_youtube_published', 'Youtube Author:' => '_tern_wp_youtube_author');
$tern_wp_youtube_array = array();
$tern_wp_youtube_version = 206;
//                                *******************************                                 //
//________________________________** FILE CLASS                **_________________________________//
//////////////////////////////////**                           **///////////////////////////////////
//                                **                           **                                 //
//                                *******************************                                 //
require_once dirname(__FILE__) . '/class/file.php';
$getFILE = new fileClass();
//                                *******************************                                 //
//________________________________** LOAD CLASSES              **_________________________________//
//////////////////////////////////**                           **///////////////////////////////////
//                                **                           **                                 //
//                                *******************************                                 //
$l = $getFILE->directoryList(array('dir' => dirname(__FILE__) . '/class/', 'rec' => true, 'flat' => true, 'depth' => 1));
if (is_array($l)) {
    foreach ($l as $k => $v) {
        require_once $v;
    }
}
//                                *******************************                                 //
//________________________________** LOAD CORE FILES           **_________________________________//
//////////////////////////////////**                           **///////////////////////////////////
//                                **                           **                                 //
//                                *******************************                                 //
$l = $getFILE->directoryList(array('dir' => dirname(__FILE__) . '/core/', 'rec' => true, 'flat' => true, 'depth' => 1));
if (is_array($l)) {
    foreach ($l as $k => $v) {
        require_once $v;
    }
コード例 #2
0
ファイル: file.php プロジェクト: oligoform/WP-Members-Lists
 function directoryList($b)
 {
     $b = array_merge(array('dir' => '/', 'rec' => false, 'flat' => true, 'depth' => '*'), $b);
     $b['dir'] = substr($b['dir'], -1) != '/' ? $b['dir'] . '/' : $b['dir'];
     if (@is_dir($b['dir'])) {
         $a = array();
         if ($p = @opendir($b['dir'])) {
             while (($f = @readdir($p)) !== false) {
                 $n = $b['dir'] . $f;
                 if (is_file($n)) {
                     $a[$f] = $n;
                 } elseif (is_dir($n) and $f != '.' and $f != '..' and $b['rec'] and ($b['depth'] == '*' or $b['depth'] != 1)) {
                     $x = array_merge($b, array('dir' => $n . '/', 'depth' => $b['depth'] !== '*' ? $b['depth'] - 1 : $b['depth']));
                     if ($b['flat']) {
                         $a = array_merge($a, fileClass::directoryList($x));
                     } else {
                         $a[$n] = fileClass::directoryList($x);
                     }
                 }
             }
             closedir($p);
             return $a;
         }
     }
     return false;
 }