Example #1
0
 function getContent($action, $params, $sfl_dirlocation, $sfl_basepath, $sfl_maxfiles, $sfl_userlocation, $sfl_file)
 {
     $retVal = "false";
     // We should alsways get directory through Ajax call, userlocation only at initial call
     $sfl_userlocation = "";
     switch ($action) {
         case "delete":
             //$retVal = "<div style=\"text-align: left\">";
             // Just send the information text back!
             $retVal = ModSimpleFileListerHelperv10::deleteFile($params, $sfl_file);
             //$retVal .= "</div>";
             break;
         case "next" || "prev" || "dir" || "sort":
             $retVal = "<div style=\"text-align: left\">";
             $retVal .= ModSimpleFileListerHelperv10::getDirContents($params, $sfl_dirlocation, $sfl_basepath, $sfl_maxfiles, $sfl_userlocation);
             $retVal .= "</div>";
             break;
         default:
             $retVal = "Action missing";
             break;
     }
     $app = JFactory::getApplication();
     echo $retVal;
     $app->close();
 }