当前位置: 首页>>代码示例>>PHP>>正文


PHP Album::getFoldersTree方法代码示例

本文整理汇总了PHP中Album::getFoldersTree方法的典型用法代码示例。如果您正苦于以下问题:PHP Album::getFoldersTree方法的具体用法?PHP Album::getFoldersTree怎么用?PHP Album::getFoldersTree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Album的用法示例。


在下文中一共展示了Album::getFoldersTree方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $pAlbumId = $this->getParam('album_id');
     $pDossierId = $this->getParam('dossier_id');
     // $album_dao = _dao("album");
     $dossier_dao = _dao("dossier");
     $photo_dao = _dao("photo");
     if ($pDossierId > 0) {
         $dossier = $dossier_dao->get($pDossierId);
     } else {
         $dossier->dossier_id = 0;
         $dossier->dossier_album = $this->getParam('album_id');
         $dossier->dossier_parent = -1;
         $dossier->dossier_nom = CopixI18N::get('album|album.message.topfolder');
         $dossier->dossier_comment = "";
         $dossier->album_id = $pAlbumId;
     }
     if ($dossier->dossier_album != $pAlbumId) {
         return false;
     }
     $pictures = $photo_dao->findAllByAlbumAndFolder($pAlbumId, $pDossierId);
     $tpl->assign('album_id', $pAlbumId);
     $tpl->assign('dossier_id', $pDossierId);
     $tpl->assign('dossier', $dossier);
     $tpl->assign('pictures', $pictures);
     $tpl->assign('picture_thumbsize', '_s64');
     $dossiers_tree = Album::getFoldersTree($pAlbumId);
     $dossiers_commands = Album::tree2commands($dossiers_tree);
     $tpl->assign('commands_move', $dossiers_commands);
     $toReturn = $tpl->fetch('editphotos.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:33,代码来源:editphotos.zone.php

示例2: delFolder

 /**
  * delFolder
  *
  * Efface un dossier
  *
  * @author Fr�d�ric Mossmann <fmossmann@cap-tic.fr>
  * @param integer $album_id Id de l'album
  * @param integer $dossier_id Id du dossier
  * @param string $mode Mode d'effacement (conservation des photos ou non)
  * 	 */
 public function delFolder($album_id, $dossier_id, $mode = "moveparent")
 {
     $album_dao = _dao("album");
     $dossier_dao = _dao("dossier");
     $photo_dao = _dao("photo");
     if ($dossier_id <= 0) {
         return false;
     }
     $dossier = $dossier_dao->get($dossier_id);
     if ($dossier->dossier_album != $album_id) {
         return false;
     }
     $folders = Album::getFoldersTree($album_id, $dossier_id);
     $pictures = $photo_dao->findAllByAlbumAndFolder($album_id, $dossier_id);
     if (_request('dossier_todo') == 'moveparent') {
         // D�placement des dossiers...
         foreach ($folders as $folder_tmp) {
             $dossier_modif = $dossier_dao->get($folder_tmp->dossier_id);
             $dossier_modif->dossier_parent = $dossier->dossier_parent;
             $dossier_dao->update($dossier_modif);
         }
         // D�placement des photos...
         foreach ($pictures as $picture_tmp) {
             $picture_modif = $photo_dao->get($picture_tmp->photo_id);
             $picture_modif->photo_dossier = $dossier->dossier_parent;
             $photo_dao->update($picture_modif);
         }
         // Suppression du dossier vide...
         $dossier_dao->delete($dossier_id);
     } elseif (_request('dossier_todo') == 'deleteall') {
         //			echo "<li><tt>BEGIN Delete (album=".$album_id."/dossier=".$dossier_id.")</tt></li>";
         //			echo "<ul>";
         // D�placement des dossiers...
         foreach ($folders as $folder_tmp) {
             $dossier_modif = $dossier_dao->get($folder_tmp->dossier_id);
             Album::delFolder($album_id, $dossier_modif->dossier_id, $mode);
         }
         // D�placement des photos...
         foreach ($pictures as $picture_tmp) {
             $picture_modif = $photo_dao->get($picture_tmp->photo_id);
             //				echo "<li><tt>Delete photo (album=".$album_id."/dossier=".$dossier_id."/photo=".$picture_modif->photo_id.")</tt></li>";
             Album::delPhoto($picture_modif->photo_id);
         }
         // Suppression du dossier vide...
         //			echo "<li><tt>Delete dossier (album=".$album_id."/dossier=".$dossier_id.")</tt></li>";
         $dossier_dao->delete($dossier_id);
         //			echo "</ul>";
         //			echo "<li><tt>END   Delete (album=".$album_id."/dossier=".$dossier_id.")</tt></li>";
     } else {
     }
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:62,代码来源:album.class.php

示例3: getPopup

 /**
  * Affichage de l'album en popup
  *
  * Affichage simplifi� de l'album, avec choix de la taille et de la position de l'image.
  * Retourne le code Wiki pour l'affichage de l'image directement dans le blog.
  *
  * @author Fr�d�ric Mossmann <fmossmann@cap-tic.fr>
  */
 public function getPopup()
 {
     $tpl = new CopixTpl();
     $kernel_service =& CopixClassesFactory::Create('kernel|kernel');
     if (!_request("album_id") || trim(_request("album_id")) == "" || !preg_match("/^[0-9]+\$/", _request("album_id"))) {
         return CopixActionGroup::process('genericTools|Messages::getError', array('message' => CopixI18N::get('album.error.noalbumnumber'), 'back' => CopixUrl::get('||')));
     }
     $album_id = _request("album_id");
     if (_request("dossier_id") === null || !preg_match("/^[0-9]+\$/", _request("dossier_id"))) {
         //correction de bug : 0 &&
         if ($get = _sessionGet('modules|album|vignettes|lastfolder|' . $album_id)) {
             $dossier_id = $get;
         } else {
             $dossier_id = 0;
         }
     } else {
         $dossier_id = _request("dossier_id");
         _sessionSet('modules|album|vignettes|lastfolder|' . $album_id, $dossier_id);
     }
     $format = _request("format");
     if (Kernel::getLevel("MOD_ALBUM", $album_id) < PROFILE_CCV_READ) {
         return CopixActionGroup::process('genericTools|Messages::getError', array('message' => CopixI18N::get('kernel|kernel.error.noRights'), 'back' => CopixUrl::get('||')));
     }
     $tplAlbum = new CopixTpl();
     $album_dao = CopixDAOFactory::create("album");
     $album = $album_dao->get($album_id);
     if (!$album) {
         return CopixActionGroup::process('genericTools|Messages::getError', array('message' => CopixI18N::get('album.error.noalbum'), 'back' => CopixUrl::get('||')));
     }
     $parent = $kernel_service->getModParentInfo("MOD_ALBUM", $album_id);
     $album->parent = $parent;
     $dossier_dao = CopixDAOFactory::create("dossier");
     if ($dossier_id > 0) {
         $dossier = $dossier_dao->get($dossier_id);
     } else {
         $dossier->dossier_id = 0;
         $dossier->dossier_album = $album_id;
         $dossier->dossier_parent = -1;
         $dossier->dossier_nom = "Racine";
         $dossier->dossier_comment = "";
         $dossier->album_id = $album_id;
     }
     $tplAlbum->assign("album", $album);
     $tplAlbum->assign("dossier", $dossier);
     $album_dao = CopixDAOFactory::create("photo");
     // $photolist = $album_dao->findAllByAlbum($album_id);
     $photolist = $album_dao->findAllByAlbumAndFolder($album_id, $dossier_id);
     // Kernel::MyDebug($photolist);
     $tplAlbum->assign("photolist", $photolist);
     foreach ($photolist as $photothumb) {
         Album::createThumbnails($photothumb->album_id . '_' . $photothumb->album_cle, $photothumb->photo_id . '_' . $photothumb->photo_cle, $photothumb->photo_ext);
     }
     $dossiers_childs = Album::getFoldersTree($album_id, $dossier_id);
     $tplAlbum->assign("dossierlist", $dossiers_childs);
     $tplAlbum->assign('field', _request("field"));
     $tplAlbum->assign('format', $format);
     $tplAlbum->assign('album_thumbsize', "_s128");
     $result = $tplAlbum->fetch("popup_album.tpl");
     $tpl->assign('PHOTOS', $result);
     $album_nom = isset($album->parent["nom"]) ? $album->parent["nom"] : CopixI18N::get('album.moduleDescription');
     $tpl->assign('TITLE_PAGE', $album_nom);
     $tpl->assign('field', _request("field"));
     $tpl->assign('format', $format);
     $tpl->assign('album_id', $album_id);
     $tpl->assign('dossier_id', $dossier_id);
     $result = $tpl->fetch('album|popup.tpl');
     $ppo = new CopixPPO();
     $ppo->result = $result;
     $ppo->TITLE_PAGE = CopixI18N::get('album.title.album', array($album_nom));
     CopixHTMLHeader::addCSSLink(_resource("styles/module_album.css"));
     CopixHTMLHeader::addCSSLink(_resource("styles/module_album_popup.css"));
     return _arPPO($ppo, array('template' => 'popup_ppo.tpl', 'mainTemplate' => 'default|main_popup.php'));
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:81,代码来源:album.actiongroup.php


注:本文中的Album::getFoldersTree方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。