* @package AgileBill * @version 1.4.93 */ function list_menu_files($id, $name, $default, $path, $pre, $ext, $class) { global $C_translate; if($path == 'product_cat') $path = PATH_THEMES . '' . DEF_THEME_N . '/blocks/product_cat/'; elseif($path == 'whois_plugin') $path = PATH_PLUGINS . '/whois/'; elseif($path == 'product') $path = PATH_PLUGINS . '/product/'; elseif($path == 'e911') $path = PATH_PLUGINS . '/e911/'; elseif($path == 'provision_plugin') $path = PATH_PLUGINS . '/provision/'; elseif($path == 'affiliate_plugin') $path = PATH_PLUGINS . '/affiliate/'; elseif($path == 'checkout_plugin') $path = PATH_PLUGINS . '/checkout/'; elseif($path == 'theme') $path = PATH_THEMES; elseif($path == 'language') $path = PATH_LANGUAGE . '/core/'; $count = 0; chdir($path); $dir = opendir($path); while ($file_name = readdir($dir)) { $display = true; if($file_name != '..' && $file_name != '.') { if(!empty($ext)) { $cute = eregi_replace($ext.'$', "", $file_name); if(!eregi($ext.'$', $file_name)) $display = false; } if(!empty($pre)) { $cute = eregi_replace('^'.$pre, "", $cute); if(!eregi('^'.$pre, $file_name)) $display = false; } if($display) { $arr[] = $cute; $cute = eregi_replace("_"," ",$cute); $cute = eregi_replace("-"," ",$cute); $arrc[] = $cute; $count++; } } } $return = ''; echo $return; } ?>