mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-31 22:04:04 -06:00
28 lines
551 B
Text
28 lines
551 B
Text
#include "WebInterface.h"
|
|
|
|
using namespace Upp;
|
|
|
|
MTObj<String> WebInterface::SharedVariable;
|
|
Callback1<String> WebInterface::MessageFromWeb;
|
|
|
|
|
|
SKYLARK(HomePage, "")
|
|
{
|
|
http
|
|
("SharedVariable", WebInterface::SharedVariable.Get())
|
|
("Time", FormatTime(GetSysTime(), "YYYY/MM/DD hh:mm:ss"))
|
|
.RenderResult("SkylarkGuiExample/index");
|
|
}
|
|
|
|
|
|
SKYLARK(PostSomeData, "PostSomeData:POST")
|
|
{
|
|
WebInterface::MessageFromWeb(http["SharedVariable"]);
|
|
http.Redirect(HomePage);
|
|
}
|
|
|
|
SKYLARK(CatchAll, "**")
|
|
{
|
|
http.Redirect(HomePage);
|
|
}
|
|
|