00001 <?php
00006 class defaultAdminTemplate extends aliroAdminTemplateBase {
00007
00008 protected $doctype = 'xhtml_10_trans';
00009
00010 protected $tname = '.';
00011
00012 protected $cssname = 'adminDefault.css';
00013
00014 protected $logincss = 'adminDefaultLogin.css';
00015
00016 public function __construct () {
00017
00018 $this->areas = array (
00019 array ('position' => 'cpanel', 'min' => 500, 'max' => 800, 'style' => 'Div')
00020 );
00021
00022 $this->colours = array (
00023 _ALIRO_ERROR_FATAL => 'fatalcolour',
00024 _ALIRO_ERROR_SEVERE => 'severecolour',
00025 _ALIRO_ERROR_WARN => 'warncolour',
00026 _ALIRO_ERROR_INFORM => 'informcolour'
00027 );
00028 parent::__construct();
00029
00030 T_('Logout');
00031 }
00032
00033 public function moduleStyleDiv ($moduleclass_sfx, $title, $content) {
00034 $html = <<<MODULE_HTML
00035
00036 <div class="module$moduleclass_sfx">
00037 <h4>$title</h4>
00038 $content
00039 </div>
00040
00041 MODULE_HTML;
00042
00043 return $html;
00044 }
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 public function toolBarItemHTML ($task, $alt, $href, $icon, $iconOver, $linkIfJavaScript=true) {
00056 if ($linkIfJavaScript AND $this->request->getStickyAliroParam($_POST, 'alironoscript')) $startlink = $endlink = '';
00057 else {
00058 $startlink = <<<LINK_START
00059 <a class="toolbar" href="$href">
00060 LINK_START;
00061 $endlink = '</a>';
00062 }
00063 $html = <<<SHORT_ITEM
00064
00065 <div class="toolitem">
00066 $startlink
00067 $alt
00068 $endlink
00069 <noscript><input type="radio" name="alironstask" value="$task" /></noscript>
00070 </div>
00071
00072 SHORT_ITEM;
00073
00074 $this->toolbar = $html.$this->toolbar;
00075
00076 }
00077
00078
00079 public function render () {
00080 $this->preRender();
00081 echo <<<ADMIN_HTML
00082 {$this->header()}
00083 <body>
00084 <div id="AliroAdmin">
00085 <form enctype="multipart/form-data" action="index.php" method="post" name="adminForm">
00086 <div id="AliroAdminNavigation">
00087 <div class="aliroadminlogo">
00088 Aliro
00089 </div>
00090 $this->mainmenu
00091 </div>
00092 <div id="AliroMainPart">
00093 <div id="AliroAdminLogout">
00094 <a href='index.php?option=logout'><strong>{$this->T_('Logout')}</strong></a> $this->username
00095 </div>
00096 <div id="AliroAdminToolbar">
00097 {$this->getToolbar()}
00098 </div>
00099 <div id="AliroAdminMainbox">
00100 <div id="aliroerrors">
00101 {$this->errorMessage()}
00102 </div>
00103 <div id="AliroAdminMain">
00104 {$this->mainBody()}
00105 </div>
00106 <div id='AliroAdminFooter'>
00107 $this->versiontext
00108 </div>
00109 <div id='AliroAdminPageTimer'>
00110 {$this->getTimeMessage()}
00111 </div>
00112 <div id='AliroAdminDebug'>
00113 {$this->request->getDebug()}
00114 </div>
00115 </div>
00116 </div>
00117 </form>
00118 </div>
00119 </body>
00120 </html>
00121
00122 ADMIN_HTML;
00123
00124 }
00125
00126
00127 function login () {
00128
00129 echo <<<HTML_LOGIN
00130 {$this->header(true)}
00131
00132 <body>
00133 <div id="wrapper">
00134 <form action="index.php" method="post" name="loginForm" id="loginForm">
00135 <div id='AliroLoginBody'>
00136 <div id='AliroLoginHeading'>
00137 <h1>$this->sitename</h1>
00138 </div>
00139 <div id='AliroUserName'>
00140 <label for='AliroAdminUser'>User:</label>
00141 <input id='AliroAdminUser' name='usrname' type='text' size='15' />
00142 </div>
00143 <div id='AliroPassword'>
00144 <label for='AliroPass'>Password:</label>
00145 <input id='AliroPass' name='pass' type='password' size='15' />
00146 </div>
00147 <div id="wrapper2">
00148 <input type="hidden" name="option" value="login" />
00149 <div id='AliroLoginButton'>
00150 <input type="submit" name="submit" class="button" value="Login" />
00151 </div>
00152 </div>
00153 </div>
00154 </form>
00155 </div>
00156 </body>
00157 </html>
00158
00159 HTML_LOGIN;
00160
00161 }
00162
00163 }
00164
00165 ?>