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/template_orig.lua | 137 ------------------------------------ 1 file changed, 137 deletions(-) delete mode 100644 MCServer/webadmin/template_orig.lua (limited to 'MCServer/webadmin/template_orig.lua') 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