using System;
using System.Data;
using System.Configuration;
using System.Collections;
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.Home;

public partial class user_share_LinkTo : JuSNS.UI.Page.UserPage
{
    Share sd = new Share();
    protected void Page_Load(object sender, EventArgs e)
    {
        string Shareid = Request.QueryString["Id"];
        string Sharetype = Request.QueryString["type"];
        string UserID = Request.QueryString["userid"];
        if ((Shareid == null && Shareid == string.Empty) || (Sharetype == null && Sharetype == string.Empty) || (UserID == null && UserID == string.Empty))
        {
            PageError("错误的参数", "javascript:history.back();");
        }
        string URLStr = string.Empty;
        switch (Sharetype)
        {
            case "1":
                string rurl = "../URL.aspx?url=" + JuSNS.Common.Input.URLEncode(sd.GetURLAddress(Convert.ToInt32(Shareid)));
                Response.Redirect(rurl);
                break;
            case "2":
                URLStr = rooDir+ "/home/Album/PhotoView.aspx?r[0]=" + Shareid + "&r[1]=";
                break;
            case "3":
                URLStr = rooDir + "/home/Album/Albumview.aspx?r[1]=" + Shareid + "";
                break;
            case "4":
                URLStr = rooDir + "/home/blog/article.aspx?r=" + Shareid + "";
                break;
            case "5":
                URLStr = rooDir + "视频";
                break;
            case "6":
                URLStr = rooDir + "/user/?r=" + Shareid + "";
                break;
            case "7"://新闻
                URLStr = rooDir + "/home/news/content.aspx?nid=" + Shareid + "";
                break;
            case "9"://音乐
                URLStr = "音乐";
                break;
            default:
                URLStr = "其他";
                break;
        }
        Response.Redirect(URLStr);
    }
}
