getting closer to full port of web app starter
This commit is contained in:
@@ -1 +0,0 @@
|
||||
<?= URL::$fragments['main'] ?>
|
||||
@@ -0,0 +1,7 @@
|
||||
#load "../../lib/app.uce"
|
||||
|
||||
COMPONENT(Request& context)
|
||||
{
|
||||
starter_boot(context);
|
||||
print(starter_page_main_html(context));
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate');
|
||||
if(URL::$fragments['json'])
|
||||
{
|
||||
print(json_encode(URL::$fragments['json']));
|
||||
}
|
||||
else
|
||||
{
|
||||
print(URL::$fragments['main']);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#load "../../lib/app.uce"
|
||||
|
||||
COMPONENT(Request& context)
|
||||
{
|
||||
starter_boot(context);
|
||||
context.header["Content-Type"] = "application/json";
|
||||
context.header["Cache-Control"] = "no-cache, no-store, must-revalidate";
|
||||
if(context.call["json"].get_type_name() == "array")
|
||||
print(json_encode(context.call["json"]));
|
||||
else if(context.var["starter"]["json"].get_type_name() == "array")
|
||||
print(json_encode(context.var["starter"]["json"]));
|
||||
else
|
||||
print(starter_page_main_html(context));
|
||||
}
|
||||
Reference in New Issue
Block a user