diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a09d069 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Ignore vim temporary/backup files +*~ +.*.swp +# Exclude composer installed libs +/vendor +/composer.lock +# Common UNIX user home directory files +/.bash* +/.vim* +/.composer +/.gitconfig +/.vim* +/.less* +/.ssh +/.phplint-cache diff --git a/bin/manage b/bin/manage new file mode 100755 index 0000000..211a8ed --- /dev/null +++ b/bin/manage @@ -0,0 +1,7 @@ +#!/usr/bin/php + array( + "$root_dir_path/config.local.yml", + ), + 'templates' => array( + 'static_directories' => array( + "$root_dir_path/static" + ), + ), + 'default' => array( + // Set here your configuration parameters default value + ), + ), + $root_dir_path +); + +$sentry_span = new SentrySpan('core.init', 'Core initialization'); + +// Put here your own initialization stuff + +require 'views/index.php'; + +$sentry_span->finish(); + +# vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab diff --git a/includes/views/index.php b/includes/views/index.php new file mode 100644 index 0000000..8c4c821 --- /dev/null +++ b/includes/views/index.php @@ -0,0 +1,64 @@ + $last_updated) + $last_updated = $file_last_updated; + } + } +} + +/** + * Cache manifest file + * @param EesyPHP\UrlRequest $request + * @return void + */ +function handle_cache_manifest($request) { + $cache = ["home"]; + $last_updated = filemtime(Tpl::resolve_templates_path("index.tpl")); + foreach (Tpl::static_directories() as $static_directory) + _list_static_directory_files($static_directory, $static_directory, $cache, $last_updated); + Tpl::assign("cache", $cache); + Tpl::assign("last_updated", date("Y/m/d H:i:s", $last_updated)); + header("Content-type: text/plain"); + $content = Tpl::fetch("cache_manifest.tpl"); + $etag = md5($content); + header("Cache-Control: max-age=3000, must-revalidate"); + header("Last-Modified: ".gmdate("D, d M Y H:i:s", $last_updated)." GMT"); + header("Etag: $etag"); + print($content); + exit(); +} +Url :: add_url_handler("#^cache\.manifest$#", 'handle_cache_manifest'); + +# vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab diff --git a/locales/.gitignore b/locales/.gitignore new file mode 100644 index 0000000..cfeb792 --- /dev/null +++ b/locales/.gitignore @@ -0,0 +1,4 @@ +headers.pot +js-*-messages.pot +php-messages.pot +templates-*-messages.pot diff --git a/public_html/.htaccess b/public_html/.htaccess new file mode 100644 index 0000000..6b7a1a0 --- /dev/null +++ b/public_html/.htaccess @@ -0,0 +1,8 @@ +RewriteEngine On +#RewriteBase /app + +# If the request is not for a valid file +RewriteCond %{REQUEST_FILENAME} !-f +# If the request is not for a valid link +RewriteCond %{REQUEST_FILENAME} !-l +RewriteRule ^ index.php [L] diff --git a/public_html/cache.manifest b/public_html/cache.manifest deleted file mode 100644 index 5b24735..0000000 --- a/public_html/cache.manifest +++ /dev/null @@ -1,39 +0,0 @@ -CACHE MANIFEST -# Date : 2018/06/18 - Version : 1 - -CACHE: -index.html -favicon.png -icon-196x196.png -icon-128x128.png - -inc/main.css - -inc/main.js -inc/mysc_objects.js - -inc/mydialog.js - -# Bootstrap -inc/lib/bootstrap/css/bootstrap.min.css -inc/lib/bootstrap/css/bootstrap-theme.min.css -inc/lib/bootstrap/css/bootstrap.css -inc/lib/bootstrap/css/bootstrap-theme.css -inc/lib/bootstrap/css/bootstrap.css.map -inc/lib/bootstrap/css/bootstrap-theme.min.css.map -inc/lib/bootstrap/css/bootstrap-theme.css.map -inc/lib/bootstrap/css/bootstrap.min.css.map -inc/lib/bootstrap/js/bootstrap.js -inc/lib/bootstrap/js/npm.js -inc/lib/bootstrap/js/bootstrap.min.js -inc/lib/bootstrap/fonts/glyphicons-halflings-regular.eot -inc/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 -inc/lib/bootstrap/fonts/glyphicons-halflings-regular.woff -inc/lib/bootstrap/fonts/glyphicons-halflings-regular.svg -inc/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf - -# jQuery -inc/lib/jquery.min.js - -NETWORK: -* diff --git a/public_html/index.php b/public_html/index.php new file mode 100644 index 0000000..534b0af --- /dev/null +++ b/public_html/index.php @@ -0,0 +1,9 @@ + - - - - - + + + + + - + - + - +
@@ -266,18 +266,18 @@ - + - + - - - - + + + +