forked from siteserver/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPageUpdateSystem.cs
More file actions
49 lines (37 loc) · 1.44 KB
/
PageUpdateSystem.cs
File metadata and controls
49 lines (37 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Web.UI.WebControls;
using SiteServer.BackgroundPages.Settings;
using SiteServer.CMS.Api;
using SiteServer.CMS.Api.Sys.Packaging;
using SiteServer.Utils;
using SiteServer.CMS.Core;
using SiteServer.CMS.Packaging;
namespace SiteServer.BackgroundPages
{
public class PageUpdateSystem : BasePage
{
public Button BtnUpload;
protected override bool IsSinglePage => true;
public static string GetRedirectUrl()
{
return PageUtils.GetSiteServerUrl(nameof(PageUpdateSystem), null);
}
public string PackageId => PackageUtils.PackageIdSsCms;
public string InstalledVersion => SystemManager.Version;
public string AdminUrl => PageUtils.GetAdminDirectoryUrl(string.Empty);
public string DownloadApiUrl => ApiRouteDownload.GetUrl(ApiManager.InnerApiUrl);
public string UpdateApiUrl => ApiRouteUpdate.GetUrl(ApiManager.InnerApiUrl);
public string UpdateSsCmsApiUrl => ApiRouteUpdateSsCms.GetUrl(ApiManager.InnerApiUrl);
public void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
if (SystemManager.IsNeedInstall())
{
Page.Response.Write("系统未安装,向导被禁用");
Page.Response.End();
return;
}
BtnUpload.OnClientClick = ModalManualUpdateSystem.GetOpenWindowString();
}
}
}