From a9b5a6c3a63d8500f3c512574fd802d40b562661 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 19 Apr 2015 10:57:41 +0200 Subject: Split the plugin names and plugin folders to avoid confusing them. Ref.: http://forum.mc-server.org/showthread.php?tid=1877 --- MCServer/webadmin/(original).html | 375 ------------------------------------ MCServer/webadmin/template.lua | 20 +- MCServer/webadmin/template_orig.lua | 137 ------------- 3 files changed, 11 insertions(+), 521 deletions(-) delete mode 100644 MCServer/webadmin/(original).html delete mode 100644 MCServer/webadmin/template_orig.lua (limited to 'MCServer/webadmin') diff --git a/MCServer/webadmin/(original).html b/MCServer/webadmin/(original).html deleted file mode 100644 index 673a93ada..000000000 --- a/MCServer/webadmin/(original).html +++ /dev/null @@ -1,375 +0,0 @@ - - - - -{TITLE} - - - - - - -
- -

{TITLE}

- -
-
- - - - -

Welcome {USERNAME}

- -
-

{PLUGIN_NAME}

- - {CONTENT} - -
- - -
-
- -
- - - -
- - - diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index 6ea7b69bc..9d0f860db 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -30,20 +30,22 @@ function GetDefaultPage() Content = Content .. "

" .. cRoot:Get():GetServer():GetServerID() .. "

" Content = Content .. "

Plugins:

" Content = Content .. "

Players:


"; diff --git a/MCServer/webadmin/template_orig.lua b/MCServer/webadmin/template_orig.lua deleted file mode 100644 index a7480f83e..000000000 --- a/MCServer/webadmin/template_orig.lua +++ /dev/null @@ -1,137 +0,0 @@ --- Use a table for fast concatenation of strings -local SiteContent = {} -function Output(String) - table.insert(SiteContent, String) -end - - - - - -function GetTableSize(Table) - local Size = 0 - for key,value in pairs(Table) do - Size = Size + 1 - end - return Size -end - - - - - -function GetDefaultPage() - local PM = cRoot:Get():GetPluginManager() - - local SubTitle = "Current Game" - local Content = "" - - Content = Content .. "

Server Name:

" - Content = Content .. "

" .. cRoot:Get():GetServer():GetServerID() .. "

" - - Content = Content .. "

Plugins:

" - Content = Content .. "

Players:


"; - - return Content, SubTitle -end - - - - - -function ShowPage(WebAdmin, TemplateRequest) - SiteContent = {} - local BaseURL = WebAdmin:GetBaseURL(TemplateRequest.Request.Path) - local Title = "MCServer WebAdmin" - local MemoryUsageKiB = cRoot:GetPhysicalRAMUsage() - local NumChunks = cRoot:Get():GetTotalChunkCount() - local PluginPage = WebAdmin:GetPage(TemplateRequest.Request) - local PageContent = PluginPage.Content - local SubTitle = PluginPage.PluginName - if (PluginPage.TabName ~= "") then - SubTitle = PluginPage.PluginName .. " - " .. PluginPage.TabName - end - if (PageContent == "") then - PageContent, SubTitle = GetDefaultPage() - end - - Output([[ - - - - -]] .. Title .. [[ - - - - -
- -

- MCServer -

-
-
- - - -

Welcome ]] .. TemplateRequest.Request.Username .. [[

-
-

]] .. SubTitle .. [[

- ]] .. PageContent .. [[ -
- - -
- -
- -
- - - -
- - - - ]]) - - return table.concat(SiteContent) -end -- cgit v1.2.3