Example #1
0
function Del_Albumtype($moduleid)
{
    $album_result = Query_Album($moduleid);
    $album_num = Query_AlbumNum($album_result);
    for ($i1 = 0; $i1 < $album_num; $i1++) {
        $album_array = Query_AlbumArray($album_result);
        $album_array_id = $album_array['ids'];
        $photo_result = getPhotoResultByAlbumID($album_array_id);
        $photo_num = getPhotoNumByAlbumID($photo_result);
        for ($i2 = 0; $i2 < $photo_num; $i2++) {
            $photo_array = getPhotoArrayByAlbumID($photo_result);
            $photo_pathnew = "../" . $photo_array['photo_path'];
            $photo_thumbnailnew = "../" . $photo_array['photo_thumbnail'];
            $photoid = $photo_array['ids'];
            if (delPhoto($photoid) == true) {
                delFileo($photo_thumbnailnew);
                delFileo($photo_pathnew);
            }
        }
        delAlbumByAlbumID($album_array_id);
    }
    if (delAlbumTypeByID($moduleid) == true) {
        $info = "相册分类删除成功";
    } else {
        $info = "由于网络原因,操作失败,请稍后重试...";
    }
    return $info;
}
Example #2
0
require_once '../../include/photo_gl_function.php';
$public_function = new public_function();
$blog_userid = $_SESSION['UID'];
$albumids = $_GET['albumids'];
$cnt = $_GET['cnt'];
$yeshu = $_GET['yeshu'];
$albumids1 = explode(',', $albumids);
$url = str_replace(" ", "", $_GET['url']);
$page = str_replace(" ", "", $_GET['page']);
$album_name = "默认相册";
//获取当前用户的默认相册
$sql = "select ids,album_name,album_author from blog_album where album_author='{$blog_userid}' and album_name='{$album_name}'";
$moren_array = $public_function->getarray($public_function->getresult($sql));
$moren_albumid = $moren_array['ids'];
for ($i = 0; $i < count($albumids1); $i++) {
    $photo_result = getPhotoResultByAlbumID($albumids1[$i]);
    $photo_num = getPhotoNumByAlbumID($photo_result);
    for ($i2 = 0; $i2 < $photo_num; $i2++) {
        $photo_array = getPhotoArrayByAlbumID($photo_result);
        $photo_pathnew = "../" . $photo_array['photo_path'];
        $photo_thumbnailnew = "../" . $photo_array['photo_thumbnail'];
        $photoid = $photo_array['ids'];
        if (delPhoto($photoid) == true) {
            delFileo($photo_thumbnailnew);
            delFileo($photo_pathnew);
        }
    }
    $boolean = delAlbumByAlbumID($albumids1[$i]);
}
$info = "";
if ($boolean == true) {
Example #3
0
require_once '../../include/public_function.php';
require_once '../../include/album_function.php';
require_once '../../include/file_operation.php';
require_once '../../include/photo_gl_function.php';
$public_function = new public_function();
$blog_userid = $_SESSION['UID'];
$albumid = str_replace(" ", "", $_GET['albumid']);
$page = str_replace(" ", "", $_GET['page']);
$url = str_replace(" ", "", $_GET['url']);
$cnt = $_GET['cnt'];
$yeshu = $_GET['yeshu'];
//ɾ³ýÏà²á
$del_album_sql = "delete from blog_album where ids='{$albumid}'";
$del_album_result = $public_function->getresult($del_album_sql);
if ($del_album_result > 0) {
    $photo_result = getPhotoResultByAlbumID($albumid);
    $photo_num = getPhotoNumByAlbumID($photo_result);
    for ($i2 = 0; $i2 < $photo_num; $i2++) {
        $photo_array = getPhotoArrayByAlbumID($photo_result);
        $photo_pathnew = "../" . $photo_array['photo_path'];
        $photo_thumbnailnew = "../" . $photo_array['photo_thumbnail'];
        $photoid = $photo_array['ids'];
        if (delPhoto($photoid) == true) {
            delFileo($photo_thumbnailnew);
            delFileo($photo_pathnew);
        }
    }
    $boolean = delAlbumByAlbumID($albumid);
    if ($boolean == true) {
        $info = "Ïà²áɾ³ý³É¹¦";
    } else {