Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int?   revision_id = Utils.TryParseInt32(Request ["id"]);
        bool   raw = Request ["raw"] == "true";
        string d, l;

        if (revision_id != null)
        {
            l = WebServices.DownloadString(WebServices.CreateWebServiceDownloadRevisionUrl(revision_id.Value, false, Master.WebServiceLogin));
            if (raw)
            {
                log.InnerHtml = "<pre>" + HttpUtility.HtmlEncode(l) + "</pre>";
            }
            else
            {
                log.InnerHtml = "<div style='background-color: #ccccff; padding: 5px; margin-top: 5px; margin-bottom: 5px;'><pre style='border-width: 0px;'>" + HttpUtility.HtmlEncode(l) + "</pre></div>";
            }
            d = WebServices.DownloadString(WebServices.CreateWebServiceDownloadRevisionUrl(revision_id.Value, true, Master.WebServiceLogin));
            if (raw)
            {
                diff.InnerHtml = "<pre>" + HttpUtility.HtmlEncode(d) + "</pre>";
            }
            else
            {
                diff.InnerHtml = ParseDiff(d);
            }
        }
    }