<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" StylesheetTheme="" EnableTheming="false"%>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Web.Security" %>
<%@ Import Namespace="PowerEasy.Foundation" %>

<script runat="server" type="text/C#">
protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                Stream proxyStream = Request.InputStream;
                string siteUrl = string.Empty;
                if(SiteConfig.SiteInfo.Product.ToLower() == "bizidea")
                {
                    siteUrl = "http://update.powereasy.net/ShopHelpLinks.xml";
                }
                else
                {
                    siteUrl = "http://update.powereasy.net/HelpLinks.xml";
                }
                Uri url = new Uri(siteUrl);
                HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
                myHttpWebRequest.Method = "GET";
                myHttpWebRequest.ContentType = "application/x-www-form-urlencoded";
                HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
                Stream receiveStream = myHttpWebResponse.GetResponseStream();
                StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
                string msg = readStream.ReadToEnd();
                readStream.Close();
                Response.ContentType = "text/xml";
                Response.Write(msg);
                Response.Flush();
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message.ToString());
            }
        }
</script>
