本文整理汇总了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');
}
示例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);
}
}
示例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;
}
}