diff --git a/PHP/Public/.htaccess b/PHP/Public/.htaccess new file mode 100644 index 00000000..c6dacc11 --- /dev/null +++ b/PHP/Public/.htaccess @@ -0,0 +1,10 @@ +RewriteEngine On + +# Do not remove this line, otherwise mod_rewrite rules will stop working +RewriteBase / + +RewriteRule ^StyleSheets/(.*)\.css$ lessc.php?filename=$1 [PT,L,QSA] + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php?virtualpath=$1 [PT,L,QSA] diff --git a/PHP/Public/Include/Configuration.inc.php b/PHP/Public/Include/Configuration.inc.php new file mode 100644 index 00000000..e69de29b diff --git a/PHP/Public/Include/MasterPages/000-WebPage.inc.php b/PHP/Public/Include/MasterPages/000-WebPage.inc.php new file mode 100644 index 00000000..6090f4a8 --- /dev/null +++ b/PHP/Public/Include/MasterPages/000-WebPage.inc.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/PHP/Public/Include/Modules/000-Default/Main.inc.php b/PHP/Public/Include/Modules/000-Default/Main.inc.php new file mode 100644 index 00000000..98c7a273 --- /dev/null +++ b/PHP/Public/Include/Modules/000-Default/Main.inc.php @@ -0,0 +1,19 @@ +Render(); + return true; + }) + )); +?> \ No newline at end of file diff --git a/PHP/Public/Include/Pages/000-MainPage.inc.php b/PHP/Public/Include/Pages/000-MainPage.inc.php new file mode 100644 index 00000000..dfc0c073 --- /dev/null +++ b/PHP/Public/Include/Pages/000-MainPage.inc.php @@ -0,0 +1,15 @@ + + Welcome to Universal Editor! + \ No newline at end of file diff --git a/PHP/Public/index.php b/PHP/Public/index.php new file mode 100644 index 00000000..ee65b6a2 --- /dev/null +++ b/PHP/Public/index.php @@ -0,0 +1,40 @@ +. + // ============================================================================= + + // We need to get the root path of the Web site. It's usually something like + // /var/www/yourdomain.com. + global $RootPath; + $RootPath = dirname(__FILE__); + + // Now that we have defined the root path, load the WebFX content (which also + // include_once's the modules and other WebFX-specific stuff) + require_once("WebFX/WebFX.inc.php"); + + // Bring in the WebFX\System and WebFX\IncludeFile classes so we can simply refer + // to them (in this file only) as "System" and "IncludeFile", respectively, from + // now on + use WebFX\System; + use WebFX\IncludeFile; + + // Tell WebFX that we are ready to launch the application. This cycles through + // all of the modules (usually you will define your main application content in + // 000-Default) and executes the first module page that corresponds to the path + // the user is GETting. + System::Launch(); +?> \ No newline at end of file diff --git a/PHP/Public/lessc.php b/PHP/Public/lessc.php new file mode 100644 index 00000000..696fc5f5 --- /dev/null +++ b/PHP/Public/lessc.php @@ -0,0 +1,29 @@ +formatterName = "compressed"; + $v = $less->compileFile($filename . ".less"); + + echo("/* compiled with lessphp v0.4.0 - GPLv3/MIT - http://leafo.net/lessphp */\n"); + echo("/* for human-readable source of this file, replace .css with .less in the file name */\n"); + echo($v); + } + catch (Exception $e) + { + echo "/* " . $e->getMessage() . " */\n"; + } +} +?> \ No newline at end of file