summaryrefslogtreecommitdiff
path: root/framework/Wsat/pages/layout
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Wsat/pages/layout')
-rw-r--r--framework/Wsat/pages/layout/TWsatLayout.php32
-rw-r--r--framework/Wsat/pages/layout/TWsatLayout.tpl53
2 files changed, 85 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
diff --git a/framework/Wsat/pages/layout/TWsatLayout.tpl b/framework/Wsat/pages/layout/TWsatLayout.tpl
new file mode 100644
index 00000000..47068a3f
--- /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" />&nbsp;|&nbsp;</div>
+ <div style="float: right"><com:THyperLink NavigateUrl="<%= $this->Service->DefaultPageUrl %>" Text="Web App" Target="_blank" />&nbsp;|&nbsp;</div>
+ <div style="float: right"><com:THyperLink NavigateUrl="http://www.pradosoft.com/forum/" Text="Help" Target="_blank" />&nbsp;|&nbsp;</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 &copy; 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