53 lines
1012 B
Plaintext
53 lines
1012 B
Plaintext
|
|
|
|
RENDER()
|
|
{
|
|
|
|
<>
|
|
<link rel="stylesheet" href='style.css'></link>
|
|
<h1>
|
|
<a href="index.uce">UCE Test</a>:
|
|
Session
|
|
</h1>
|
|
</>
|
|
|
|
|
|
string action = context->get["action"];
|
|
if(context->cookies["uce-session"].length() > 0)
|
|
session_start();
|
|
if(action == "start")
|
|
{
|
|
session_start();
|
|
echo("action: starting session");
|
|
}
|
|
else if(action == "store")
|
|
{
|
|
context->session["stored-value"] = make_session_id();
|
|
echo("action: storing value "+context->session["stored-value"]);
|
|
}
|
|
else if(action == "destroy")
|
|
{
|
|
session_destroy();
|
|
echo("action: destroying session");
|
|
}
|
|
|
|
<>
|
|
<br/>
|
|
<a href="?action=start" class="button">Start Session</a> |
|
|
<a href="?" class="button">Refresh</a> |
|
|
<a href="?action=destroy" class="button">Destroy Session</a> |
|
|
<a href="?action=store" class="button">Store Value</a> |
|
|
Info
|
|
<pre><?
|
|
|
|
echo(var_dump(context->cookies));
|
|
echo("SESSION:\n");
|
|
echo(var_dump(context->session));
|
|
|
|
?></pre>
|
|
Params
|
|
<pre><?= var_dump(context->params) ?></pre>
|
|
</>
|
|
|
|
}
|