/** * Mendapatkan list file dari suatu direktori * default: ekstension * * @param string $cdir * @return Array */ function b_getlistfile($cdir = "") { if ($dirhandle = opendir($cdir)) { while ($cfile = readdir($dirhandle)) { if (substr($cfile, 0, 1) != ".") { if (is_dir($cdir . "/" . $cfile)) { $alistfiletemp = b_getlistfile($cdir . "/" . $cfile); if (count($alistfiletemp) > 0) { foreach ($alistfiletemp as $cfiletemp) { $alistfile[] = $cfiletemp; } } } else { $alistfile[] = $cdir . "/" . $cfile; } } } } return $alistfile; }
?> <div class="judul">Extension</div> <?php if ($cerror != "") { ?> <br><div class="warning"><?php echo $cerror; ?> </div><br> <?php } ?> <table class="table_admin"> <?php $ext1 = b_getlistfile("./extensions"); $ext2 = b_getlistfile("../extensions"); if (is_array($ext1)) { if (is_array($ext2)) { $exts = array_merge($ext1, $ext2); } else { $exts = $ext1; } } else { if (is_array($ext2)) { $exts = $ext2; } } if (is_array($exts)) { foreach ($exts as $cfile) { if (eregi("init.php", $cfile)) { $ainfo = b_readinit($cfile);