Skip to content
Snippets Groups Projects
Commit b6f7e894 authored by Rico van Endern's avatar Rico van Endern
Browse files

Merged dev into master

parents bb94a9e7 764ef584
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*.md text *.md text
*.po text *.po text
*.js text *.js text
*.less text
*.css text *.css text
*.ini text *.ini text
*.properties text *.properties text
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
</IfModule> </IfModule>
RewriteEngine on RewriteEngine on
RewriteRule ^(.*).less$ less/style.php?name=$1.less RewriteRule ^(.*).less$ less/style.php?name=$1.less
\ No newline at end of file
<?php
const ROOT_DIR="/infoscreen";
?>
...@@ -12,9 +12,17 @@ if (!isset($_GET["name"])) { ...@@ -12,9 +12,17 @@ if (!isset($_GET["name"])) {
$less_file = $_GET["name"]; //"panels/departure/style.less"; $less_file = $_GET["name"]; //"panels/departure/style.less";
$debug=isset($_GET["debug"]); $debug=isset($_GET["debug"]);
include "config/config.php"; /*find root dir*/
echo ROOT_DIR; $url_arr = explode("/",$_SERVER["PHP_SELF"]);
$url_arr_size = sizeof($url_arr);
$ROOT_DIR = "";
for ($i=1;$i<($url_arr_size-2);$i++)
{
$ROOT_DIR.="/".$url_arr[$i];
}
if ($debug)
echo $ROOT_DIR;
/*end finding*/
$panel = null; $panel = null;
...@@ -73,6 +81,6 @@ if ($debug) { ...@@ -73,6 +81,6 @@ if ($debug) {
else else
echo $content; echo $content;
} else { } else {
header("Location: ".ROOT_DIR."/$cache_file"); header("Location: ".$ROOT_DIR."/$cache_file");
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment