diff options
author | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
---|---|---|
committer | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
commit | 74b31be9515eddfa63005d6760614badfaba9fea (patch) | |
tree | 47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /framework/Wsat/pages/layout | |
parent | 2b11341614ac4a15be697fa8acad07055154ac54 (diff) | |
parent | 0c5026b55cde5c104f10686afd8b441568175d38 (diff) |
Backports for Prado 3.2.4
Diffstat (limited to 'framework/Wsat/pages/layout')
-rw-r--r-- | framework/Wsat/pages/layout/TWsatLayout.php | 36 | ||||
-rw-r--r-- | framework/Wsat/pages/layout/TWsatLayout.tpl | 53 |
2 files changed, 89 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..67caa77d --- /dev/null +++ b/framework/Wsat/pages/layout/TWsatLayout.php @@ -0,0 +1,36 @@ +<?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 new file mode 100644 index 00000000..d91ff333 --- /dev/null +++ b/framework/Wsat/pages/layout/TWsatLayout.tpl @@ -0,0 +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> +</html>
\ No newline at end of file |