Changeset 636 for trunk/admin/index.php


Ignore:
Timestamp:
Dec 11, 2013, 12:15:15 PM (11 years ago)
Author:
chronos
Message:
  • Added: Pages should have set title which is used in HTML header to show title in web browser title bar.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/index.php

    r632 r636  
    55include_once('../img_level.php');
    66
     7class PageAdmin extends Page
     8{
    79function ShowMenu()
    810{
     
    5759  global $System;
    5860 
     61  $this->Title = T('Testing');
    5962  $Output = '<a href="'.$System->Link('/admin/?action=phpinfo').'">PHP info</a><br/>'.
    6063  '<small>PHP informace</small><br/><br/>'.
     
    6770  return($Output);
    6871}
     72
    6973function Uncomplete()
    7074{
     
    171175}
    172176
    173 $Output = '';
    174 if($User->Licence(LICENCE_ADMIN))
    175 {
    176   if(array_key_exists('action', $_GET))
     177  function Show()
    177178  {
    178     if($_GET['action'] == 'img_level') $Output .= ImgLevelShow();
    179     else if($_GET['action'] == 'error') $Output .= TestError(12, 'test');
    180     else if($_GET['action'] == 'exception') $Output .= TestException(12, 'test');
    181     else if($_GET['action'] == 'sqlerror') $Output .= TestSQLError('SELECT dads FROM sdas');
    182     else if($_GET['action'] == 'testing') $Output .= Testing();
    183     else if($_GET['action'] == 'phpinfo') $Output .= ShowPHPInfo();
    184     else if($_GET['action'] == 'locale') $Output .= ShowLocale();
    185     else if($_GET['action'] == 'uncomplete') $Output .= Uncomplete();
    186     else if($_GET['action'] == 'dbcstructure') $Output .= DbcStructure();
    187     else $Output .= ShowMenu();
    188   } else $Output .= ShowMenu(); 
    189 } else $Output .= ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
    190      
    191 ShowPage($Output);
     179          $this->Title = T('Administration');
     180    $Output = '';
     181    if($this->System->User->Licence(LICENCE_ADMIN))
     182    {
     183      if(array_key_exists('action', $_GET))
     184      {
     185        if($_GET['action'] == 'img_level') $Output .= $this->ImgLevelShow();
     186        else if($_GET['action'] == 'error') $Output .= $this->TestError(12, 'test');
     187        else if($_GET['action'] == 'exception') $Output .= $this->TestException(12, 'test');
     188        else if($_GET['action'] == 'sqlerror') $Output .= $this->TestSQLError('SELECT dads FROM sdas');
     189        else if($_GET['action'] == 'testing') $Output .= $this->Testing();
     190        else if($_GET['action'] == 'phpinfo') $Output .= $this->ShowPHPInfo();
     191        else if($_GET['action'] == 'locale') $Output .= $this->ShowLocale();
     192        else if($_GET['action'] == 'uncomplete') $Output .= $this->Uncomplete();
     193        else if($_GET['action'] == 'dbcstructure') $Output .= $this->DbcStructure();
     194        else $Output .= $this->ShowMenu();
     195      } else $Output .= $this->ShowMenu(); 
     196    } else $Output .= ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
     197    return($Output);
     198  }
     199}     
     200$Page = new PageAdmin($System);
     201ShowPageClass($Page);
Note: See TracChangeset for help on using the changeset viewer.