<%@ Page Language="C#" %>
<%@ Import Namespace="System"%>
<%@ Import Namespace="System.Web"%>
<%@ Import Namespace="System.Web.UI" %>

<script runat="server">
    void Page_Load(object sender, EventArgs e)
    {
        string url = string.Empty, uid = string.Empty, st = string.Empty;
        url = Request.QueryString["url"] == null ? "" : Request.QueryString["url"].ToString();
        uid = Request.QueryString["source"] == null ? "" : Request.QueryString["source"].ToString();
        st = Request.QueryString["st"] == null ? "" : Request.QueryString["st"].ToString();

        Response.Cookies["V5ShopUnionID"].Value = Server.UrlEncode(uid);
        if (st != "")
        {
            try
            {
                Response.Cookies["V5ShopUnionID"].Expires = DateTime.Now.AddHours(double.Parse(st));
            }
            catch { }
        }
        Response.Redirect(url);
    }
</script>
