aboutsummaryrefslogtreecommitdiff
path: root/css.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2011-10-05 14:20:34 +0200
committerKevin Chabowski <kevin@kch42.de>2011-10-05 14:20:34 +0200
commit80c1f9eabaa5d62fad2de1de97e35cc99fb999bc (patch)
tree8a1fee1fdf08271c8f050c052d1ebc39c2e4fa0a /css.php
parentdf88147d9bde725785e353bbf67d52608783204c (diff)
downloadratatoeskr-cms-80c1f9eabaa5d62fad2de1de97e35cc99fb999bc.tar.gz
ratatoeskr-cms-80c1f9eabaa5d62fad2de1de97e35cc99fb999bc.tar.bz2
ratatoeskr-cms-80c1f9eabaa5d62fad2de1de97e35cc99fb999bc.zip
Added css.php
Diffstat (limited to 'css.php')
-rw-r--r--css.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/css.php b/css.php
new file mode 100644
index 0000000..bbc4bef
--- /dev/null
+++ b/css.php
@@ -0,0 +1,29 @@
+<?php
+/*
+ * File: css.php
+ * Spit out User-defined CSS styles.
+ *
+ * License:
+ * This file is part of Ratatöskr.
+ * Ratatöskr is licensed unter the MIT / X11 License.
+ * See "ratatoeskr/licenses/ratatoeskr" for more information.
+ */
+
+require_once(dirname(__FILE__) . "/ratatoeskr/sys/models.php");
+
+if(!isset($_GET["name"]))
+ die();
+try
+{
+ $style = Style::by_name($_GET["name"]);
+ header("Content-Type: text/css; charset=UTF-8");
+ echo $style->code;
+}
+catch(DoesNotExistError $e)
+{
+ header("HTTP/1.1 404 Not Found");
+ header("Content-Type: text/plain; charset=UTF-8");
+ echo "404 - Not found.";
+}
+
+?>