function mgRmDir($inpath) { str_replace("//", "/", $inpath); $dir = explode("/", $inpath); foreach ($dir as $key => $val) { $path = implode("/", $dir); if (false == mgUnLink($path)) { return false; } if (NULL != ($dirs = mgGetDir($path))) { foreach ($dirs as $inkey => $inval) { if (mgRmDir($path . "/" . $inval) == false) { return false; } } } if (false == @rmdir($path)) { return false; } if ($inpath != $path) { array_pop($dir); } else { break; } } return true; }
public function runModule() { $actionList = array(); $dirs = mgGetDir(__DIR__ . '/action'); foreach ($dirs as $key => $val) { $item = array(); $item['word'] = $this->getLanguage($val, 'path_action'); $item['value'] = $val; $actionList[] = $item; } return $actionList; }
public function runModule() { $skinDirs = mgGetDir(__TEMPLATE__); $skins = array(); foreach ($skinDirs as $val) { if (file_exists(__TEMPLATE__ . '/' . $val . '/screen.jpg')) { $item = array(); if (file_exists(__TEMPLATE__ . '/' . $val . '/readme.txt')) { $item['readme'] = file_get_contents(__TEMPLATE__ . '/' . $val . '/readme.txt'); } else { $item['readme'] = ''; } $item['template'] = $val; $skins[] = $item; } } return $skins; }
public function runModule() { return mgGetDir(__LANGUAGE__); }