Added PrimaryServerVersion to the webadmin (patch contributed by STR_Warrior)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1088 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
912a1e7adc
commit
65aa72a2c3
@ -14,6 +14,15 @@ local function HTML_Select_On_Off( name, defaultValue )
|
|||||||
.. [[</select>]]
|
.. [[</select>]]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function HTML_Select_Version( name, defaultValue )
|
||||||
|
return [[<select name="]] .. name .. [[">]]
|
||||||
|
.. HTML_Option("29", "1.2.5", defaultValue == 3 )
|
||||||
|
.. HTML_Option("39", "1.3.2", defaultValue == 2 )
|
||||||
|
.. HTML_Option("47", "1.4.2", defaultValue == 1 )
|
||||||
|
.. HTML_Option("49", "1.4.5", defaultValue == 0 )
|
||||||
|
.. [[</select>]]
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function ShowGeneralSettings( Request )
|
local function ShowGeneralSettings( Request )
|
||||||
local Content = ""
|
local Content = ""
|
||||||
@ -33,6 +42,9 @@ local function ShowGeneralSettings( Request )
|
|||||||
if( tonumber( Request.PostParams["Server_Port"] ) ~= nil ) then
|
if( tonumber( Request.PostParams["Server_Port"] ) ~= nil ) then
|
||||||
SettingsIni:SetValue("Server", "Port", Request.PostParams["Server_Port"], false )
|
SettingsIni:SetValue("Server", "Port", Request.PostParams["Server_Port"], false )
|
||||||
end
|
end
|
||||||
|
if( tonumber( Request.PostParams["Server_Version"] ) ~= nil ) then
|
||||||
|
SettingsIni:SetValue("Server", "PrimaryServerVersion", Request.PostParams["Server_Version"], false )
|
||||||
|
end
|
||||||
if( tonumber( Request.PostParams["Authentication_Authenticate"] ) ~= nil ) then
|
if( tonumber( Request.PostParams["Authentication_Authenticate"] ) ~= nil ) then
|
||||||
SettingsIni:SetValue("Authentication", "Authenticate", Request.PostParams["Authentication_Authenticate"], false )
|
SettingsIni:SetValue("Authentication", "Authenticate", Request.PostParams["Authentication_Authenticate"], false )
|
||||||
end
|
end
|
||||||
@ -60,6 +72,8 @@ local function ShowGeneralSettings( Request )
|
|||||||
<td><input type="text" name="Server_MaxPlayers" value="]] .. SettingsIni:GetValue("Server", "MaxPlayers") .. [["></td></tr>
|
<td><input type="text" name="Server_MaxPlayers" value="]] .. SettingsIni:GetValue("Server", "MaxPlayers") .. [["></td></tr>
|
||||||
<tr><td>Port:</td>
|
<tr><td>Port:</td>
|
||||||
<td><input type="text" name="Server_Port" value="]] .. SettingsIni:GetValue("Server", "Port") .. [["></td></tr>
|
<td><input type="text" name="Server_Port" value="]] .. SettingsIni:GetValue("Server", "Port") .. [["></td></tr>
|
||||||
|
<tr><td>Shown Version:</td>
|
||||||
|
<td>]] .. HTML_Select_Version("Server_Version", SettingsIni:GetValueI("Server", "PrimaryServerVersion") ) .. [[</td></tr>
|
||||||
</table><br>
|
</table><br>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
|
Loading…
Reference in New Issue
Block a user