diff options
Diffstat (limited to 'framework/Wsat')
-rw-r--r-- | framework/Wsat/pages/TWsatLogin.php | 15 | ||||
-rw-r--r-- | framework/Wsat/pages/TWsatScaffolding.php | 28 | ||||
-rw-r--r-- | framework/Wsat/pages/layout/TWsatLayout.php | 62 | ||||
-rw-r--r-- | framework/Wsat/pages/layout/TWsatLayout.tpl | 104 | ||||
-rw-r--r-- | framework/Wsat/themes/.htaccess | 2 | ||||
-rw-r--r-- | framework/Wsat/themes/PradoSoft/main.css | 18 |
6 files changed, 105 insertions, 124 deletions
diff --git a/framework/Wsat/pages/TWsatLogin.php b/framework/Wsat/pages/TWsatLogin.php index 0bbdc53f..69f8cc39 100644 --- a/framework/Wsat/pages/TWsatLogin.php +++ b/framework/Wsat/pages/TWsatLogin.php @@ -8,8 +8,11 @@ class TWsatLogin extends TPage { public function login() { - if ($this->IsValid) { - $this->Session["wsat_password"] = $this->getService()->getPassword(); + $config_pass = $this->getService()->getPassword(); + $user_pass = $this->password->Text; + + if ($user_pass === $config_pass) { + $this->Session["wsat_password"] = $config_pass; $authManager = $this->Application->getModule('auth'); $url = $authManager->ReturnUrl; @@ -17,15 +20,11 @@ class TWsatLogin extends TPage { $url = $this->Service->constructUrl('TWsatHome'); } $this->Response->redirect($url); + } else { + echo "user or pass wrong"; } } - public function validatePassword($sender, $param) { - $config_pass = $this->getService()->getPassword(); - $user_pass = $this->password->Text; - $param->IsValid = $user_pass === $config_pass; - } - } ?>
\ No newline at end of file diff --git a/framework/Wsat/pages/TWsatScaffolding.php b/framework/Wsat/pages/TWsatScaffolding.php index afa00273..ce5860d3 100644 --- a/framework/Wsat/pages/TWsatScaffolding.php +++ b/framework/Wsat/pages/TWsatScaffolding.php @@ -1,15 +1,15 @@ -<?php
-
-/**
- * Description of Inicio
- *
- * @author daniels
- */
-Prado::using("System.Wsat.TWsatARGenerator");
-
-class TWsatScaffolding extends TPage {
-
-
-}
-
+<?php + +/** + * Description of Inicio + * + * @author daniels + */ +Prado::using("System.Wsat.TWsatARGenerator"); + +class TWsatScaffolding extends TPage { + + +} + ?>
\ No newline at end of file diff --git a/framework/Wsat/pages/layout/TWsatLayout.php b/framework/Wsat/pages/layout/TWsatLayout.php index e799125b..ce337265 100644 --- a/framework/Wsat/pages/layout/TWsatLayout.php +++ b/framework/Wsat/pages/layout/TWsatLayout.php @@ -1,32 +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);
- }
-
-}
-
+<?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 diff --git a/framework/Wsat/pages/layout/TWsatLayout.tpl b/framework/Wsat/pages/layout/TWsatLayout.tpl index 37cf4183..d91ff333 100644 --- a/framework/Wsat/pages/layout/TWsatLayout.tpl +++ b/framework/Wsat/pages/layout/TWsatLayout.tpl @@ -1,53 +1,53 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <com:THead Title="PRADO - WSAT">
- <com:TMetaTag HttpEquiv="Content-Type" Content="text/html; charset=utf-8" />
- <com:TMetaTag HttpEquiv="Content-Language" Content="en" />
- </com:THead>
-
- <body>
- <com:TForm>
-
- <div id="header">
- <a href="<%= $this->Service->DefaultPageUrl %>">
- <div class="logo"></div>
- <div style="float: left; margin-top: 17px">PRADO <br /> Web Site Administration Tool</div>
- </a>
- <div class="mantisbg"></div>
- <div style="clear: both"></div>
- </div>
-
- <div class="mainmenu">
- <div style="float: right"><com:TLinkButton Text="Logout" OnClick="logout" /></div>
- <div style="float: right"><com:THyperLink NavigateUrl="http://www.pradosoft.com/" Text="PradoSoft.com" Target="_blank" /> | </div>
- <div style="float: right"><com:THyperLink NavigateUrl="<%= $this->Service->DefaultPageUrl %>" Text="Web App" Target="_blank" /> | </div>
- <div style="float: right"><com:THyperLink NavigateUrl="http://www.pradosoft.com/forum/" Text="Help" Target="_blank" /> | </div>
- <div style="clear: both"></div>
- </div>
-
- <div id="central_div">
- <div id="toc">
- <div class="topic">
- <div>Code Generation</div>
- <ul>
- <li><com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatGenerateAR') %>" Text="AR Classes" /></li>
- <li><com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatScaffolding') %>" Text="Scaffolding" /></li>
- </ul>
- </div>
- </div>
-
- <div id="content">
- <com:TContentPlaceHolder ID="Content" />
- </div>
-
- <div style="clear: both"></div>
- </div>
-
- <div id="footer">
- Copyright © 2005-<%= date('Y') %> <a href="http://www.pradosoft.com">PradoSoft</a>.
- <br/><br/>
- <%= Prado::poweredByPrado() %>
- </div>
- </com:TForm>
- </body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <com:THead Title="PRADO - WSAT"> + <com:TMetaTag HttpEquiv="Content-Type" Content="text/html; charset=utf-8" /> + <com:TMetaTag HttpEquiv="Content-Language" Content="en" /> + </com:THead> + + <body> + <com:TForm> + + <div id="header"> + <a href="<%= $this->Service->DefaultPageUrl %>"> + <div class="logo"></div> + <div style="float: left; margin-top: 17px">PRADO <br /> Web Site Administration Tool</div> + </a> + <div class="mantisbg"></div> + <div style="clear: both"></div> + </div> + + <div class="mainmenu"> + <div style="float: right"><com:TLinkButton Text="Logout" OnClick="logout" /></div> + <div style="float: right"><com:THyperLink NavigateUrl="http://www.pradosoft.com/" Text="PradoSoft.com" Target="_blank" /> | </div> + <div style="float: right"><com:THyperLink NavigateUrl="<%= $this->Service->DefaultPageUrl %>" Text="Web App" Target="_blank" /> | </div> + <div style="float: right"><com:THyperLink NavigateUrl="http://www.pradosoft.com/forum/" Text="Help" Target="_blank" /> | </div> + <div style="clear: both"></div> + </div> + + <div id="central_div"> + <div id="toc"> + <div class="topic"> + <div>Code Generation</div> + <ul> + <li><com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatGenerateAR') %>" Text="AR Classes" /></li> + <li><com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatScaffolding') %>" Text="Scaffolding" /></li> + </ul> + </div> + </div> + + <div id="content"> + <com:TContentPlaceHolder ID="Content" /> + </div> + + <div style="clear: both"></div> + </div> + + <div id="footer"> + Copyright © 2005-<%= date('Y') %> <a href="http://www.pradosoft.com">PradoSoft</a>. + <br/><br/> + <%= Prado::poweredByPrado() %> + </div> + </com:TForm> + </body> </html>
\ No newline at end of file diff --git a/framework/Wsat/themes/.htaccess b/framework/Wsat/themes/.htaccess index 1caf5e97..f7661d04 100644 --- a/framework/Wsat/themes/.htaccess +++ b/framework/Wsat/themes/.htaccess @@ -1 +1 @@ -allow from all
+allow from all diff --git a/framework/Wsat/themes/PradoSoft/main.css b/framework/Wsat/themes/PradoSoft/main.css index c35a87d8..ed36c238 100644 --- a/framework/Wsat/themes/PradoSoft/main.css +++ b/framework/Wsat/themes/PradoSoft/main.css @@ -123,24 +123,6 @@ html, body{ font-size: 11px; } -.success_panel{ - background-color: #C5FBBD; - border: 1px solid #76C376; - padding: 10px; - margin: 10px 0; - border-radius: 5px; - text-align: center; -} - -.exception_panel{ - background-color: #ff6666; - border: 1px solid red; - padding: 10px; - margin: 10px 0; - border-radius: 5px; - text-align: center; -} - #footer { clear:both; color: gray; |