Example #1
0
 public function actionDisplay($lang, $type, $module_dispatch, $categeorie, $page, $album, $HelperAlbum)
 {
     $DetailAlbum = new DetailAlbum();
     $UpdateAlbum = new UpdateAlbum();
     $DeleteAlbum = new DeleteAlbum();
     $HelperAlbum->readConfigFile($HelperAlbum->albumPath . '/' . $album . '/' . $HelperAlbum->albumConfig);
     $layout = "";
     if ($type == ADD) {
         $layout .= $AddAlbum->add($lang, $module_dispatch, $categeorie, $page);
     } elseif ($type == DETAIL) {
         $image = $HelperAlbum->albumPath . '/' . $album . '/original/' . $HelperAlbum->config["headpicture"];
         $show = $HelperAlbum->config['show'] == 'on' ? "showtrue" : "showfalse";
         $layout .= $DetailAlbum->detail($lang, $module_dispatch, $HelperAlbum->config["title"], $HelperAlbum->config["description"], $HelperAlbum->config["date"], $image, $show);
     } elseif ($type == UPDATE) {
         $layout .= $UpdateAlbum->debutUpdate($lang, $module_dispatch, $categeorie, $album, $HelperAlbum->config["title"], $HelperAlbum->config["description"], $HelperAlbum->config["date"], $HelperAlbum->config['show'], $page);
         $HelperAlbum->readConfigFile($HelperAlbum->albumPath . '/' . $album . '/' . $HelperAlbum->pictureConfig);
         $HelperAlbum->getPictures($HelperAlbum->albumPath . '/' . $album . '/original', true);
         $i = 0;
         foreach ($HelperAlbum->pictures as $file) {
             $layout .= $UpdateAlbum->milieuUpdate($file, $HelperAlbum->config[$file['file'] . '_title']);
             $i++;
         }
         if ($i == 0) {
             $layout .= $UpdateAlbum->milieuUpdate("", "Aucune photo disponible");
         }
         $layout .= $UpdateAlbum->finUpdate($lang, $module_dispatch);
     } elseif ($type == DELETE) {
         $show = $HelperAlbum->config['show'] == 'on' ? "showtrue" : "showfalse";
         $layout .= $DeleteAlbum->delete($lang, $module_dispatch, $categeorie, $album, $HelperAlbum->config["title"], $HelperAlbum->config["description"], $HelperAlbum->config["date"], $show, $page);
     }
     return $layout;
 }
Example #2
0
 public function actionDisplay($lang, $type, $module_dispatch, $categeorie, $page, $folder, $HelperFolder)
 {
     $DetailFolder = new DetailFolder();
     $UpdateFolder = new UpdateFolder();
     $DeleteFolder = new DeleteAlbum();
     // IDEM ALBUM
     $AddFolder = new AddAlbum();
     // IDEM ALBUM
     $HelperFolder->readConfigFile($HelperFolder->folderPath . '/' . $folder . '/' . $HelperFolder->folderConfig);
     $layout = "";
     if ($type == ADD) {
         $layout .= $AddFolder->add($lang, $module_dispatch, $categeorie, $page);
     } elseif ($type == DETAIL) {
         $show = $HelperFolder->config['show'] == 'on' ? "showtrue" : "showfalse";
         $layout .= $DetailFolder->detail($lang, $module_dispatch, $HelperFolder->config["title"], $HelperFolder->config["description"], $HelperFolder->config["date"], $show);
     } elseif ($type == UPDATE) {
         $layout .= $UpdateFolder->update($lang, $module_dispatch, $categeorie, $folder, $HelperFolder->config["title"], $HelperFolder->config["description"], $HelperFolder->config["date"], $HelperFolder->config['show'], $page);
     } elseif ($type == DELETE) {
         $show = $HelperFolder->config['show'] == 'on' ? "showtrue" : "showfalse";
         $layout .= $DeleteFolder->delete($lang, $module_dispatch, $categeorie, $folder, $HelperFolder->config["title"], $HelperFolder->config["description"], $HelperFolder->config["date"], $show, $page);
     }
     return $layout;
 }