|
@ -10,17 +10,43 @@ return { |
|
|
run = function(fcgi) |
|
|
run = function(fcgi) |
|
|
fcgi.print("Content-Type: text/html; charset=utf-8\r\n\r\n") |
|
|
fcgi.print("Content-Type: text/html; charset=utf-8\r\n\r\n") |
|
|
local data = "" |
|
|
local data = "" |
|
|
if fcgi.getenv("REQUEST_METHOD") == "POST" then |
|
|
|
|
|
|
|
|
--[[if fcgi.getenv("REQUEST_METHOD") == "POST" then |
|
|
local content_type = fcgi.getenv("CONTENT_TYPE") |
|
|
local content_type = fcgi.getenv("CONTENT_TYPE") |
|
|
local boundary = content_type:match("; boundary=(.*)$") |
|
|
local boundary = content_type:match("; boundary=(.*)$") |
|
|
local post_data = fcgi.post() |
|
|
local post_data = fcgi.post() |
|
|
data = "Content type:" .. content_type .. "\n Boundary: " .. boundary .. "\n" |
|
|
data = "Content type:" .. content_type .. "\n Boundary: " .. boundary .. "\n" |
|
|
local args = {} |
|
|
local args = {} |
|
|
for w in string.gmatch(post_data, "(.-)" .. boundary) do |
|
|
for w in string.gmatch(post_data, "(.-)" .. boundary) do |
|
|
args[#args+1] = w |
|
|
|
|
|
|
|
|
local dataheaders, _ = utils.parse_form_entry(w) |
|
|
|
|
|
args[#args + 1] = dataheaders |
|
|
end |
|
|
end |
|
|
data = table.concat(args, "\n\n") |
|
|
data = table.concat(args, "\n\n") |
|
|
end |
|
|
|
|
|
fcgi.print(form{data = data}) |
|
|
|
|
|
|
|
|
end ]] |
|
|
|
|
|
fcgi.print( |
|
|
|
|
|
form { |
|
|
|
|
|
data = data, |
|
|
|
|
|
classes = { |
|
|
|
|
|
"Beast", |
|
|
|
|
|
"Swordsman", |
|
|
|
|
|
"Spirit Bird", |
|
|
|
|
|
"Twin Blades", |
|
|
|
|
|
"Healer", |
|
|
|
|
|
"Summoner", |
|
|
|
|
|
"Tamer", |
|
|
|
|
|
"Pugilist", |
|
|
|
|
|
"Mounted Fighter", |
|
|
|
|
|
"Fruit Animal", |
|
|
|
|
|
"Spellcaster" |
|
|
|
|
|
}, |
|
|
|
|
|
elements = { |
|
|
|
|
|
"Fire", "Water", "Earth", "Air", |
|
|
|
|
|
"Wood", "Electricity", "Metals", "Dreams", |
|
|
|
|
|
"Light", "Darkness", "Sun", "Moon", |
|
|
|
|
|
"Smoke", "Ice", "Crystal", "Sound", |
|
|
|
|
|
"Poison", "Lightning", "Weapons", "Fortune", |
|
|
|
|
|
"Healing", "Curses", "Day", "Night" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
end |
|
|
end |
|
|
} |
|
|
} |