summaryrefslogtreecommitdiffstats
path: root/Server/webadmin
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2015-12-19 15:30:32 +0100
committerAlexander Harkness <me@bearbin.net>2015-12-19 15:30:32 +0100
commit8b851d504875906afe3b40dd87f642fd7d5a93f1 (patch)
treebdc9006f78ba8ae91e26213130d07e67124b044f /Server/webadmin
parentMerge pull request #2774 from cuberite/worktycho-patch-1 (diff)
downloadcuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar
cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.gz
cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.bz2
cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.lz
cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.xz
cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.zst
cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.zip
Diffstat (limited to '')
-rw-r--r--Server/webadmin/login_template.html4
-rw-r--r--Server/webadmin/template.lua26
2 files changed, 15 insertions, 15 deletions
diff --git a/Server/webadmin/login_template.html b/Server/webadmin/login_template.html
index fb6f21b52..d0ab9b566 100644
--- a/Server/webadmin/login_template.html
+++ b/Server/webadmin/login_template.html
@@ -53,9 +53,9 @@
<ul class="menu bottom_links">
<li><a href="http://cuberite.org" target="_blank">Cuberite</a></li>
<li><a href="http://forum.mc-server.org" target="_blank">Forums</a></li>
- <li><a href="http://builds.cuberite.org" target="_blank">Buildserver</a></li>
+ <li><a href="https://builds.cuberite.org" target="_blank">Buildserver</a></li>
<li><a href="http://api-docs.cuberite.org" target="_blank">API Documentation</a></li>
- <li><a href="http://book.cuberite.org/" target="_blank">User's Manual</a></li>
+ <li><a href="https://book.cuberite.org/" target="_blank">User's Manual</a></li>
</ul>
</div>
</div>
diff --git a/Server/webadmin/template.lua b/Server/webadmin/template.lua
index 5b3ecf152..00b2523b7 100644
--- a/Server/webadmin/template.lua
+++ b/Server/webadmin/template.lua
@@ -25,7 +25,7 @@ function GetDefaultPage()
local SubTitle = "Current Game"
local Content = ""
-
+
Content = Content .. "<h4>Plugins:</h4><ul>"
PM:ForEachPlugin(
function (a_CBPlugin)
@@ -34,16 +34,16 @@ function GetDefaultPage()
end
end
)
-
+
Content = Content .. "</ul>"
Content = Content .. "<h4>Players:</h4><ul>"
-
+
cRoot:Get():ForEachPlayer(
function(a_CBPlayer)
Content = Content .. "<li>" .. a_CBPlayer:GetName() .. "</li>"
end
)
-
+
Content = Content .. "</ul><br>";
return Content, SubTitle
@@ -69,17 +69,17 @@ function ShowPage(WebAdmin, TemplateRequest)
if (PageContent == "") then
PageContent, SubTitle = GetDefaultPage()
end
-
+
local reqParamsClass = ""
-
+
for key,value in pairs(TemplateRequest.Request.Params) do
reqParamsClass = reqParamsClass .. " param-" .. string.lower(string.gsub(key, "[^a-zA-Z0-9]+", "-") .. "-" .. string.gsub(value, "[^a-zA-Z0-9]+", "-"))
end
-
+
if (string.gsub(reqParamsClass, "%s", "") == "") then
reqParamsClass = " no-param"
end
-
+
Output([[
<!-- Copyright Justin S and MCServer Team, licensed under CC-BY-SA 3.0 -->
<html>
@@ -140,7 +140,7 @@ function ShowPage(WebAdmin, TemplateRequest)
local TabNames = value:GetTabNames()
if (GetTableSize(TabNames) > 0) then
Output("<div><a class='usercp_nav_item usercp_nav_pmfolder' style='text-decoration:none;'><b>"..PluginWebTitle.."</b></a></div>\n");
-
+
for webname,prettyname in pairs(TabNames) do
Output("<div><a href='" .. BaseURL .. PluginWebTitle .. "/" .. webname .. "' class='usercp_nav_item usercp_nav_sub_pmfolder'>" .. prettyname .. "</a></div>\n")
end
@@ -149,7 +149,7 @@ function ShowPage(WebAdmin, TemplateRequest)
end
end
-
+
Output([[
</td>
</tr>
@@ -179,9 +179,9 @@ function ShowPage(WebAdmin, TemplateRequest)
<ul class="menu bottom_links">
<li><a href="http://cuberite.org" target="_blank">Cuberite</a></li>
<li><a href="http://forum.mc-server.org" target="_blank">Forums</a></li>
- <li><a href="http://builds.cuberite.org" target="_blank">Buildserver</a></li>
+ <li><a href="https://builds.cuberite.org" target="_blank">Buildserver</a></li>
<li><a href="http://api-docs.cuberite.org" target="_blank">API Documentation</a></li>
- <li><a href="http://book.cuberite.org/" target="_blank">User's Manual</a></li>
+ <li><a href="https://book.cuberite.org/" target="_blank">User's Manual</a></li>
</ul>
</div>
</div>
@@ -195,6 +195,6 @@ function ShowPage(WebAdmin, TemplateRequest)
</body>
</html>
]])
-
+
return table.concat(SiteContent)
end