104 lines
4.5 KiB
PHP
104 lines
4.5 KiB
PHP
|
<?php
|
||
|
|
||
|
include __DIR__ . "/../PHP/CSV2SQL.Secrets.php";
|
||
|
include \CSV2SQL\Secrets::anp_path . "/PHP/AnPBuilder.php";
|
||
|
|
||
|
$anp_builder = new AnPBuilder([
|
||
|
"name" => "CSV2SQL",
|
||
|
"language" => "es",
|
||
|
"language_code" => "es_ES",
|
||
|
"license_text" => "© 2022-2023 CopyLeft. GPLv3",
|
||
|
"url" => AnPBuilder::get_host(),
|
||
|
"description" => "Aplicación Web orientada a migrar ficheros CSV a SQL.",
|
||
|
"keywords" => "csv,sql,mariadb,sqlserver,transact,mysql",
|
||
|
"since" => 20230209,
|
||
|
"version" => 20230209,
|
||
|
"kstats" => "1fGQBj6KGMzua8u9zasfhWTmU2jbjuJpCWwCBJvkzhWTnXFipxHZyAu3V",
|
||
|
"extension" => "webp",
|
||
|
"key" => "csv2sql",
|
||
|
"root" => "/^(\\/(index\\.php)?)?\\/?$/",
|
||
|
"domain" => preg_replace('/^csv2sql\.(.+)$/', "$1", $_SERVER["HTTP_HOST"]),
|
||
|
"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/jszip.min.js", "js"]
|
||
|
], [
|
||
|
"/ecma/CSV2SQL.ecma.js"
|
||
|
], [
|
||
|
"/ecma/CSV2SQL.MySQL.ecma.js",
|
||
|
"/ecma/CSV2SQL.SQLServer.ecma.js"
|
||
|
]],
|
||
|
css : [
|
||
|
"/css/CSV2SQL.icons.css"
|
||
|
],
|
||
|
scss : "/scss/CSV2SQL.css",
|
||
|
callback : () => {
|
||
|
csv2sql = new AnP({
|
||
|
anp_root : anp_domain,
|
||
|
object_name : "csv2sql",
|
||
|
default_settings_files : [
|
||
|
anp_domain + "/json/AnP.settings.json",
|
||
|
anp_domain + "/json/AnP.settings.custom.json",
|
||
|
"/json/CSV2SQL.settings.json"
|
||
|
],
|
||
|
default_i18n_files : [
|
||
|
anp_domain + "/json/AnP.i18n.english.json",
|
||
|
anp_domain + "/json/AnP.i18n.espanol.json",
|
||
|
anp_domain + "/json/AnP.i18n.galego.json",
|
||
|
anp_domain + "/json/AnP.i18n.nihongo.json",
|
||
|
anp_domain + "/json/AnP.i18n.russkiy.json"
|
||
|
],
|
||
|
default_views_files : [
|
||
|
anp_domain + "/json/AnP.views.json"
|
||
|
],
|
||
|
default_routes_files : [
|
||
|
anp_domain + "/json/AnP.routes.json",
|
||
|
"/json/CSV2SQL.routes.json"
|
||
|
],
|
||
|
anp_autostart : false,
|
||
|
anp_route : "",
|
||
|
allow_users : false
|
||
|
}, CSV2SQL);
|
||
|
csv2sql.start(() => {});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
})();
|
||
|
|
||
|
</script><?php }),
|
||
|
"callback" => function(){
|
||
|
|
||
|
foreach([] as $file)
|
||
|
if(file_exists($file))
|
||
|
include $file;
|
||
|
|
||
|
$csv2sql = new AnP([
|
||
|
"root_paths" => [
|
||
|
"/mnt/d/git/CSV2SQL",
|
||
|
"/mnt/d/git/CSV2SQL/Public",
|
||
|
"/mnt/d/git/AnP",
|
||
|
"/mnt/d/git/AnP/Public"
|
||
|
],
|
||
|
"settings_files" => "/JSON/CSV2SQL.php.settings.json",
|
||
|
"routes_files" => "/JSON/CSV2SQL.php.routes.json",
|
||
|
"routes_root" => "/app",
|
||
|
"secrets" => [
|
||
|
class_exists('\AnP\Secrets') && property_exists('\AnP\Secrets', "settings") ? \AnP\Secrets::settings : [],
|
||
|
class_exists('\CSV2SQL\Secrets') && property_exists('\CSV2SQL\Secrets', "settings") ? \CSV2SQL\Secrets::settings : [],
|
||
|
]
|
||
|
]);
|
||
|
|
||
|
}
|
||
|
]);
|