using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using JuSNS.Common;
using JuSNS.Home;
using JuSNS.Model;

namespace JuSNS.Web.Inc.Ajax
{
    /// <summary>
    /// 有关相册的操作
    /// </summary>
    public partial class AlbumOperator : JuSNS.UI.Page.UserPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string action = Request.QueryString["action"];
            switch (action)
            {
                case "del": //删除相册
                    Delete();
                    break;
                default:
                    break;
            }
        }


        protected void Delete()
        {
            Album ab = new Album();
            string r = Input.Filter(Request.QueryString["r"]);
            int suc = ab.Del(Convert.ToInt32(r), this.UserID);
            if (suc == 1)
            {
                Response.Write("location.href='" + rooDir + "/home/album/?r[0]=" + this.UserID + "'");
            }
            else
            {
                Response.Write("alert('删除失败');");
            }
        }
    }
}
