home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ Import Namespace="System.IO" %> <%@ Import Namespace="System.Collections" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="System.Web.Util" %> <style> body { margin:0,0,0,0; } table, td { font-size=10pt;font-family:Verdana; } td.products td { text-align:center; font-size:8pt; vertical-align:top; height:248 } td.select { color:ffffff; background-color:000000; font-size:14pt;} td.select select { width:130 } td.cart { height:2500 } td.cart td { font-size:9pt; font-weight:700} td.cart a { font-size:11pt; font-weight:700} h3 { font-size:22 } h2 { font-size:22 } a:link { color:blue; } a:visited { color:blue; } div.details {background-color:ffffcc; padding-top:15; padding-bottom:20; } div.details table { width:280; } div.details table td { font-family:Verdana; font-size:8pt; } table.nutr td { font-family: Verdana; font-size:8pt; } img.selected { border-color:DC6035;border-style:solid;} img.unselected { border-color:ffffcc;border-style:solid;} table.details td { font-family: Verdana; font-size:12pt; padding-right:50; width:50% } span.blurb { font-size:9pt;} table.form td { padding-right:15 } .weblet { font-family:Arial;font-style:italic;font-weight:bold;font-size:10pt; color:#66ff66 } .weblettext { font-family:Verdona;font-size:10pt } .loginname { font-family:Tahoma; font-weight:bold;font-size:50pt;color:#6699cc} .topbanner { font-family:Arial;font-weight:bold;font-size:10pt;color:white } .topbutton { font-family:Arial;font-weight:bold;font-size:11pt;color:black } .subscriptiontitle { font-family:Arial;font-style:italic;font-weight:bold;font-size:16pt; color:#9C0001 } </style> <script runat="server" language="C#"> public bool update = false; public void Page_Load(Object sender, EventArgs e) { if (!IsPostBack) { String appurl = Request.QueryString["url"]; MyWebApplication app = MyWeb.GetApplication(appurl); //checking if local if(app.LocalApplication) { Response.Redirect("myweb://Home/myweb2.aspx?success=local" ); } else if (app != null && appurl != null && appurl.Length>0) { UrlHidden.Value = appurl; AppName.Text =(app.Manifest.Name.Length >0) ? (app.Manifest.Name):"the Local Application selected";; String oldVersion = app.Manifest.Version; oldVersion = oldVersion.ToLower(); MyWebManifest newManifest = MyWeb.GetManifest(appurl); if(newManifest == null) { Response.Redirect("myweb://Home/myweb2.aspx?success=notfound"); } else { String newVersion = newManifest.Version; newVersion = newVersion.ToLower(); if (!oldVersion.Equals(newVersion) ) { update=true; NewVersion.Text = newVersion; OldVersion.Text = oldVersion; } } } } } public void Submit_Click(Object sender, EventArgs e) { MyWebApplication app = MyWeb.GetApplication(UrlHidden.Value); if (app != null) { if (app.Update()) { Response.Redirect("myweb://Home/myweb2.aspx?success=yes&URL="+UrlHidden.Value); } else if (!app.Update() ) { Response.Redirect("myweb://Home/myweb2.aspx?success=no"); } } else if (app ==null) { Response.Redirect("myweb://Home/myweb2.aspx?success=NoApp"); } } </script> <body bgcolor="ffffff"> <form runat="server" method="GET" action="update.aspx"> <input type="hidden" id="UrlHidden" runat="server"/> <!-----Main toolbar Starts here --------> <table width=100% cellspacing=0 cellpadding=0> <tr> <td> <table width="100%" bgcolor="#336699"> <tr height=70> <td width=15><!-- Space Filler --></td> <td align=left class="loginname">MyWeb </td> <td valign=bottom class="topbutton"> </td> </tr> </table> </td> </tr> <tr> <td> <table bgcolor="#003366" cellspacing=0 width=100% cellpadding=0> <tr height=20 class="topbanner"> <td width=50><!----- Space Filler ----></td> <td align=right> <a id="StartBtn" style="color:#99ccff;text-decoration:none;font-size:9pt" href="install.aspx">Install Application</a> <span style="font-weight:100;color:#99ccff"> | </span> <a style="color:#99ccff;text-decoration:none;font-size:9pt;" href="myweb://home">Home</a> </td> </tr> </table> </td> </tr> <!------End of main toolbar -----> <tr> <td align="center"> <br><br> <!------ Beginning of Dialog Box ------> <table width="80%" cellpadding=0 cellspacing=0> <tr> <td> <font face=verdana size=4 color=#003366><b>Update Application</b> </font> </td> </tr> <tr> <td> <table bordercolor="#f5deb3" bgcolor=#fffff0 width=100% border=1 cellpadding=20 cellspacing=0> <tr> <td align=center> <% if (update) { %> Version <b><asp:Label id="OldVersion" runat="server"/></b> of <b><asp:Label id="AppName" runat="server"/></b> is currently installed on your machine.<br>Version <b><asp:Label id="NewVersion" runat="server"/></b> is now available for update. This version will now be installed on your machine.<br><br> <input type="submit" OnServerClick="Submit_Click" value=" OK " runat="server"> <input type="button" value=" Cancel " OnClick="javascript:window.navigate('myweb://home')"/> <% } else { %> The most recent version of this application has already been installed.<br>An update is not necessary.<br><br> <input type="button" value=" Return to Home Page " OnClick="javascript:window.navigate('myweb://home')"/> <% } %> <br> </td> </tr> </table> </td> </tr> </table> <!------- end of dialog box --------> </td> </tr> </table> </form> </body> </html>