FPDAM2023/Public/app/index.php

87 lines
4.0 KiB
PHP
Executable File

<?php
include __DIR__ . "/../../PHP/FPDAM2023.Secrets.php";
include \FPDAM2023\Secrets::anp_path . "/PHP/AnPBuilder.php";
$anp_builder = new AnPBuilder([
"name" => "FPDAM2023",
"language" => "es",
"language_code" => "es_ES",
"license_text" => "© 2023-2023 CopyLeft. GPLv3",
"domain" => in_array(($domain = preg_replace('/^.+\.(test|local|k3y.pw|[\.]+)$/', "$1", $_SERVER["HTTP_HOST"])), ["test"]) ? "local" : $domain,
"url" => AnPBuilder::get_host(),
"description" => "Aplicación Web orientada a la gestión de pequeños contenidos para el segundo año del FP de DAM 2023 en IES Muralla Romana de Lugo.",
"keywords" => "anp,fpdam2023,fp,dam,2023,muralla romana,ies,kyman",
"since" => 20230710,
"version" => 20230710,
"kstats" => "AQYUkMUKBxGTTt7u92gKaxz7bfXefNq74xa3S6AZHks6uFYyDA9FpK8h5",
"extension" => "webp",
"key" => "fpdam2023",
"root" => "/^\\/app(\\/(index\\.php)?)?\\/?$/",
"script" => AnPBuilder::get_cache(function(){ ?><script data-type="text/javascript" data-language="ECMAScript 2015" charset="utf-8">
(() => {
const primary_domain = window.location.href.match(/^[a-z0-9]+\:\/{2}[^\.]+\.([^\/\#]+)([\/\#]|$)/i)[1],
anp_domain = "https://anp." + (
["k3y.pw", "local"].includes(primary_domain) ? primary_domain :
["test"].includes(primary_domain) ? "local" :
primary_domain
);
new AnPBuilder({
domain : anp_domain,
scripts : [[
["https://cdn.k3y.pw/js/html2canvas/1.4.1/html2canvas.min.js", "js"],
["https://cdn.k3y.pw/js/jsPDF/2.5.1/jspdf.umd.min.js", "js", "https://cdn.k3y.pw/js/jsPDF/2.5.1/jspdf.umd.min.js.map"],
["https://cdn.k3y.pw/js/DOMPurify/3.0.4/purify.min.js", "js", "https://cdn.k3y.pw/js/DOMPurify/3.0.4/purify.min.js.map"],
"https://jsreports.k3y.pw/ecma/JSReports.ecma.js"
], [
"/ecma/FPDAM2023.ecma.js"
], [
"/ecma/views/FPDAM2023.Admission.ecma.js"
]],
css : [
"/css/FPDAM2023.icons.css"
],
scss : "/scss/FPDAM2023.css",
callback : () => {
fpdam2023 = new AnP({
anp_root : anp_domain,
object_name : "fpdam2023",
settings_files : [
"/json/FPDAM2023.settings.json",
"/json/FPDAM2023.settings.secrets.json"
],
anp_autostart : false,
anp_route : "/app"
}, FPDAM2023);
fpdam2023.start(() => {});
}
});
})();
</script><?php }),
"callback" => function(){
foreach([] as $file)
if(file_exists($file))
include $file;
$fpdam2023 = new AnP([
"root_paths" => FPDAM2023\Secrets::root_paths,
"settings_files" => [
"/JSON/FPDAM2023.php.settings.json",
"/JSON/FPDAM2023.php.settings.secrets.json"
],
"routes_root" => "/app",
"secrets" => [
class_exists('\AnP\Secrets') && property_exists('\AnP\Secrets', "settings") ? \AnP\Secrets::settings : [],
class_exists('\FPDAM2023\Secrets') && property_exists('\FPDAM2023\Secrets', "settings") ? \FPDAM2023\Secrets::settings : [],
]
]);
}
]);