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


PHP Album::deleteAlbum方法代码示例

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


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

示例1: excluirAction

 public function excluirAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $db = new Album();
     $dbf = new Fotos();
     $id = $this->_request->getParam('id');
     $db->deleteAlbum($id);
     $dbf->deleteFotos($id);
     $this->_redirect('painel/album/listar');
 }
开发者ID:agenciaaeh,项目名称:kahina,代码行数:11,代码来源:AlbumController.php

示例2: deleteAlbum

 /**
  * Delete the entire album PERMANENTLY. Be careful! This is unrecoverable.
  * Returns true if successful
  *
  * @return bool
  */
 function deleteAlbum()
 {
     if (!$this->isDynamic()) {
         foreach ($this->getSubAlbums() as $folder) {
             $subalbum = new Album($album, $folder);
             $subalbum->deleteAlbum();
         }
         foreach ($this->getImages() as $filename) {
             $image = newImage($this, $filename);
             $image->deleteImage(true);
         }
         chdir($this->localpath);
         $filelist = safe_glob('*');
         foreach ($filelist as $file) {
             if ($file != '.' && $file != '..') {
                 unlink($this->localpath . $file);
                 // clean out any other files in the folder
             }
         }
     }
     query("DELETE FROM " . prefix('options') . "WHERE `ownerid`=" . $this->id);
     query("DELETE FROM " . prefix('comments') . "WHERE `type`='albums' AND `ownerid`=" . $this->id);
     query("DELETE FROM " . prefix('albums') . " WHERE `id` = " . $this->id);
     if ($this->isDynamic()) {
         return unlink($this->localpath);
     } else {
         return rmdir($this->localpath);
     }
 }
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:35,代码来源:class-album.php

示例3: header

     }
     if ($notify == '&') {
         $notify = '';
     } else {
         $notify .= '&saved';
     }
     header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit' . $qs_albumsuffix . $notify . $pg . $returntab);
     exit;
     /** DELETION ******************************************************************/
     /*****************************************************************************/
 } else {
     if ($action == "deletealbum") {
         if ($_GET['album']) {
             $folder = sanitize_path($_GET['album']);
             $album = new Album($gallery, $folder);
             if ($album->deleteAlbum()) {
                 $nd = 3;
             } else {
                 $nd = 4;
             }
             $albumdir = dirname($folder);
             if ($albumdir != '/' && $albumdir != '.') {
                 $albumdir = "&album=" . urlencode($albumdir);
             } else {
                 $albumdir = '';
             }
         }
         header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-edit.php?page=edit" . $albumdir . "&ndeleted=" . $nd);
         exit;
     }
 }
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:31,代码来源:admin-edit.php


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