summaryrefslogtreecommitdiffstats
path: root/MCServer/webadmin/template.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MCServer/webadmin/template.lua143
1 files changed, 95 insertions, 48 deletions
diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua
index 84a50b055..1b2f18246 100644
--- a/MCServer/webadmin/template.lua
+++ b/MCServer/webadmin/template.lua
@@ -23,30 +23,11 @@ end
function GetDefaultPage()
local PM = cRoot:Get():GetPluginManager()
- local SubTitle = "Current Game"
+ local SubTitle = "Home"
local Content = ""
- Content = Content .. "<h4>Server Name:</h4>"
- Content = Content .. "<p>" .. cRoot:Get():GetServer():GetServerID() .. "</p>"
+ Content = Content .. "<h4>Home Home Home</h4><ul>I have no idea what this content should do.</ul>"
- Content = Content .. "<h4>Plugins:</h4><ul>"
- local AllPlugins = PM:GetAllPlugins()
- for key,value in pairs(AllPlugins) do
- if( value ~= nil and value ~= false ) then
- Content = Content .. "<li>" .. key .. " V." .. value:GetVersion() .. "</li>"
- end
- end
-
- Content = Content .. "</ul>"
- Content = Content .. "<h4>Players:</h4><ul>"
-
- local AddPlayerToTable = function( Player )
- Content = Content .. "<li>" .. Player:GetName() .. "</li>"
- end
- cRoot:Get():ForEachPlayer( AddPlayerToTable )
-
- Content = Content .. "</ul><br>";
-
return Content, SubTitle
end
@@ -83,20 +64,47 @@ function ShowPage(WebAdmin, TemplateRequest)
Output([[
<!DOCTYPE html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="icon" href="/favicon.ico">
-<title>]] .. Title .. [[</title>
-<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,300' rel='stylesheet' type='text/css'>
-<link rel="stylesheet" type="text/css" href="/style.css">
+ <title>]] .. Title .. [[</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css">
+ <link rel="stylesheet" type="text/css" href="/style.css">
+ <link rel="icon" href="/favicon.ico">
</head>
+
<body>
-<div id="wrapper">
- <div id="containerHolder">
- <a href="./" class="title light">MCServer</a>
- <div id="container">
- <div id="sidebar">
- <ul class="sideNav">
- <li class='link'><a href=']] .. BaseURL .. [['>Home</a></li>
+ <div class="contention">
+ <div class="pagehead">
+ <div class="row1">
+ <div class="wrapper">
+ <img src="/logo_login.png" alt="MCServer Logo" class="logo">
+ </div>
+ </div>
+ <div id="panel">
+ <div class="upper">
+ <div class="wrapper">
+ <ul class="menu top_links">
+ <li><a href=".././"><img src="/log_out.png" style="vertical-align:bottom;"> Log Out</a></li>
+ </ul>
+ <div class="welcome"><strong>Welcome back, ]] .. TemplateRequest.Request.Username .. [[</strong></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row2 push10">
+ <div class="wrapper padtopp">
+ <table width="100%" border="0" align="center"><tbody>
+ <tr>
+ <!-- start: usercp_nav -->
+ <td width="180" valign="top">
+ <table border="0" cellspacing="0" cellpadding="5" class="tborder">
+ <tbody><tr>
+ <td class="thead"><strong>Menu</strong></td>
+ </tr>
+ <tr>
+ <td class="trow1 smalltext"><a href=']] .. BaseURL .. [[' class='usercp_nav_item usercp_nav_home'>Home</a></td>
+ </tr>
+ <!-- start: usercp_nav_messenger -->
+ <tr><td class="tcat"><div><span class="smalltext"><strong>Server Management</strong></span></div></td></tr></tbody><tbody style="" id="usercppms_e"><tr><td class="trow1 smalltext">
]])
@@ -105,32 +113,71 @@ function ShowPage(WebAdmin, TemplateRequest)
local PluginWebTitle = value:GetWebTitle()
local TabNames = value:GetTabNames()
if (GetTableSize(TabNames) > 0) then
- Output("<li>"..PluginWebTitle.."</li>\n");
+ 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("<li class='link'><a href='" .. BaseURL .. PluginWebTitle .. "/" .. webname .. "'>" .. prettyname .. "</a></li>\n")
+ Output("<div><a href='" .. BaseURL .. PluginWebTitle .. "/" .. webname .. "' class='usercp_nav_item usercp_nav_sub_pmfolder'>" .. prettyname .. "</a></div>\n")
end
+
+ Output("<br>\n");
end
end
- Output([[
- </ul>
+ Output([[</td></tr></tbody>
+ </table>
+ </td>
+ <!-- end: usercp_nav -->
+ <td valign="top" style='padding-left:25px;'>
+ <table border="0" cellspacing="0" cellpadding="5" class="tborder">
+ <tbody><tr>
+ <td class="thead" colspan="2"><strong>]] .. SubTitle .. [[</strong></td>
+ </tr>
+ <tr>
+ <td class="trow2">
+ ]] .. PageContent .. [[
+ </td>
+ </tr>
+ </tbody></table>
+ </td>
+ </tr>
+ </tbody></table>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="upper">
+ <div class="wrapper">
+ <ul class="menu bottom_links">
+ <li><a>Server Name: <strong>]] .. cRoot:Get():GetServer():GetServerID() .. [[</strong></a></li>
+ <li><a>Memory: <strong>]] .. MemoryUsageKiB / 1024 .. [[MB</strong></a></li>
+ <li><a>Chunks: <strong>]] .. NumChunks .. [[</strong></a></li>
+ <li><a><script type="text/javascript">
+document.write ('Time: <strong><span id="date-time">', new Date().toLocaleString(), '<\/span><\/strong>')
+if (document.getElementById) onload = function () {
+ setInterval ("document.getElementById ('date-time').firstChild.data = new Date().toLocaleString()", 50)
+}
+</script></a></li>
+ </ul>
+ <ul class="menu bottom_right">
+
+ </ul>
+ </div>
+ </div>
+ <div class="lower">
+ <div class="wrapper">
+ <span id="current_time"><strong>FusionCare</strong> Web Developement</span>
+ <span id="copyright">
+ Powered By <a href="http://www.mc-server.org" target="_blank">MC Server</a>.
+ </span>
+ <span id="theme">
+ Theme created by Justin S.
+ </span>
</div>
-
- <div id="main" class="page-]] .. string.lower(PluginPage.PluginName .. "-" .. string.gsub(PluginPage.TabName, "[^a-zA-Z0-9]+", "-")) .. reqParamsClass .. [[">
- <h2 class="welcome-msg">Welcome <span class="username">]] .. TemplateRequest.Request.Username .. [[</span></h2>
-
- <hr/>
-
- <h3>]] .. SubTitle .. [[</h3>
- ]] .. PageContent .. [[</div>
- <div class="clear"></div>
</div>
</div>
- <div id="footer"><div class="fleft">running MCServer using <span class="bold">]] .. MemoryUsageKiB / 1024 .. [[MB</span> of memory; <span class="bold">]] .. NumChunks .. [[</span> chunks</div><div class="fright">design by <a href="//www.github.com/WebFreak001">WebFreak001</a></div><div class="clear"></div></div>
-</div>
</body>
+
</html>
]])