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; }
$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) { $info = "相册删除成功"; } else { $info = "相册删除失败"; } returnpage($page, $info, $cnt, $albumids1, $yeshu, $url); function returnpage($page, $info, $cnt, $albumids1, $yeshu, $url) { echo "<html>\n\t\t<head>\n\t\t<script charset='utf-8' src='../../js/jquery-1.6.min.js'></script>\n\t\t<script src='../../plugins/layer/lib.js'></script>\n\t\t<script src='../../plugins/layer/layer.min.js'></script>\n\t\t<script src='../../plugins/layer/laycode.min.js'></script>\n\t\t<script src='../../js/gl_user/gl_user.js'></script>\n\t\t</head>\n\t\t<body>"; if ($page == 1) { echo "<meta http-equiv='content-type' content='application/xhtml;charset=gb2312' />\n\t\t\t<script>\n\t\t\tvar ii1 = layer.load('" . $info . "');\n \t\tsetTimeout(function(){\n \t\tlocation.href='../" . $url . ".php?page=1';\n \t\t}, 1000);\n\t\t\t</script>"; } else { if ($page != 1 && $page == $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 { $info = "Ïà²áɾ³ýʧ°Ü£¬ÇëÉÔºóÖØÊÔ..."; } } else { $info = "Ïà²áɾ³ýʧ°Ü£¬ÇëÉÔºóÖØÊÔ..."; } returnpage($page, $info, $cnt, $yeshu, $url); function returnpage($page, $info, $cnt, $yeshu, $url) { echo "<html>\n\t\t<head>\n\t\t<script charset='utf-8' src='../../js/jquery-1.6.min.js'></script>\n\t\t<script src='../../plugins/layer/lib.js'></script>\n\t\t<script src='../../plugins/layer/layer.min.js'></script>\n\t\t<script src='../../plugins/layer/laycode.min.js'></script>\n\t\t<script src='../../js/gl_user/gl_user.js'></script>\n\t\t</head>\n\t\t<body>"; if ($page == 1) { echo "<meta http-equiv='content-type' content='application/xhtml;charset=gb2312' />\n\t\t\t<script>\n\t\t\tvar ii1 = layer.load('" . $info . "');\n \t\tsetTimeout(function(){\n \t\tlocation.href='../" . $url . ".php?page=1';\n \t\t}, 1000);\n\t\t\t</script>"; } else {