Ignore:
Timestamp:
Feb 22, 2015, 11:20:50 PM (10 years ago)
Author:
chronos
Message:
  • Modified: Tabs converted to spaces.
  • Modified: Remove spaces from end of lines.
  • Added: Code format script.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/ClientVersion/ClientVersion.php

    r800 r816  
    1616  function Start()
    1717  {
    18         $this->System->RegisterPage('client-version', 'PageClientVersion');
    19         $this->System->RegisterMenuItem(array(
    20         'Title' => T('Game version'),
    21         'Hint' => T('List of the game client versions'),
    22         'Link' => $this->System->Link('/client-version/'),
    23         'Permission' => LICENCE_ANONYMOUS,
    24         'Icon' => '',
     18    $this->System->RegisterPage('client-version', 'PageClientVersion');
     19    $this->System->RegisterMenuItem(array(
     20      'Title' => T('Game version'),
     21      'Hint' => T('List of the game client versions'),
     22      'Link' => $this->System->Link('/client-version/'),
     23      'Permission' => LICENCE_ANONYMOUS,
     24      'Icon' => '',
    2525    ), 10);
    2626  }
     
    2929class PageClientVersion extends Page
    3030{
    31         function Show()
    32         {
    33                 if(array_key_exists('action', $_GET))
    34                 {
    35                         if($_GET['action'] == 'item') $Output = $this->ShowItem();
    36                         else $Output = $this->ShowList();
    37                 } else $Output = $this->ShowList();
    38                 return($Output);
    39         }
     31  function Show()
     32  {
     33    if(array_key_exists('action', $_GET))
     34    {
     35      if($_GET['action'] == 'item') $Output = $this->ShowItem();
     36      else $Output = $this->ShowList();
     37    } else $Output = $this->ShowList();
     38    return($Output);
     39  }
    4040
    41         function ShowItem()
    42         {
     41  function ShowItem()
     42  {
    4343    if(array_key_exists('id', $_GET))
    4444    {
     
    6464      } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL);
    6565    } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL);
    66                 return($Output);
    67         }
     66    return($Output);
     67  }
    6868
    69         function ShowList()
    70         {
    71                 $this->Title = T('Game version');
     69  function ShowList()
     70  {
     71    $this->Title = T('Game version');
    7272    $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `ClientVersion`');
    7373    $DbRow = $DbResult->fetch_row();
Note: See TracChangeset for help on using the changeset viewer.