diff options
author | Daniel <darthdaniel85@gmail.com> | 2013-11-17 10:17:44 -0800 |
---|---|---|
committer | Daniel <darthdaniel85@gmail.com> | 2013-11-17 10:17:44 -0800 |
commit | b0c2fecd42bd8b95f2535a525b035f27aebde287 (patch) | |
tree | 9a709073895f4f52713ed0e83241278c4f6f6e57 /framework/Wsat/pages/layout/TWsatLayout.php | |
parent | 4cdac46fcc8411607352defeb962602f93a5b26b (diff) |
WSAT, similar to Microsoft - Web Site Administration Tool and Yii's Gii, will allow as to generate a lot code such as AR classes with the proper relationships... scaffolding... as well as to admin the app configuration and pages configurations in a GUI fashion.
Diffstat (limited to 'framework/Wsat/pages/layout/TWsatLayout.php')
-rw-r--r-- | framework/Wsat/pages/layout/TWsatLayout.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/framework/Wsat/pages/layout/TWsatLayout.php b/framework/Wsat/pages/layout/TWsatLayout.php new file mode 100644 index 00000000..30e52f44 --- /dev/null +++ b/framework/Wsat/pages/layout/TWsatLayout.php @@ -0,0 +1,32 @@ +<?php
+
+/**
+ * Description of MainLayout
+ *
+ * @author daniels
+ */
+class TWsatLayout extends TTemplateControl {
+
+ public function onLoad($param) {
+ parent::onLoad($param);
+ $this->validateSecurity();
+ }
+
+ private function validateSecurity() {
+ if ($this->Session["wsat_password"] !== $this->getService()->getPassword()) {
+ if (!$this->getPage() instanceof TWsatLogin) {
+ $url = $this->Service->constructUrl('TWsatLogin');
+ $this->Response->redirect($url);
+ }
+ }
+ }
+
+ public function logout() {
+ $this->Session["wsat_password"] = "";
+ $url = $this->Service->constructUrl('TWsatLogin');
+ $this->Response->redirect($url);
+ }
+
+}
+
+?>
\ No newline at end of file |