Changeset 556


Ignore:
Timestamp:
Jul 29, 2013, 10:06:28 PM (11 years ago)
Author:
chronos
Message:
  • Modified: Game client version table transformed to application module ClientVersion.
Location:
trunk
Files:
1 added
3 edited
1 moved

Legend:

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

    r553 r556  
    11<?php
    22
    3 include('includes/global.php');
     3class ModuleClientVersion extends AppModule
     4{
     5  function __construct($System)
     6  {
     7    parent::__construct($System);
     8    $this->Name = 'ClientVersion';
     9    $this->Version = '1.0';
     10    $this->Creator = 'Chronos';
     11    $this->License = 'GNU/GPL';
     12    $this->Description = 'Manage and show list of known versions of WoW client.';
     13    $this->Dependencies = array('');
     14  }
     15 
     16  function Start()
     17  {
     18        $this->System->RegisterPage('version.php', 'PageClientVersion');
     19        $this->System->RegisterMenuItem(array(
     20        'Title' => 'Verze hry',
     21        'Hint' => 'Seznam verzí herního klienta',
     22        'Link' => $this->System->Link('/version.php'),
     23        'Permission' => LICENCE_ANONYMOUS,
     24        'Icon' => '',
     25    ), 10);
     26  }
     27}
    428
    5 $DbResult = $System->Database->query('SELECT COUNT(*) FROM `ClientVersion`');
    6 $DbRow = $DbResult->fetch_row();
    7 $PageList = GetPageList($DbRow[0]);   
     29class PageClientVersion extends Page
     30{
     31        function Show()
     32        {               
     33    $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `ClientVersion`');
     34    $DbRow = $DbResult->fetch_row();
     35    $PageList = GetPageList($DbRow[0]);   
    836
    9 $Output = '<h3>Verze hry</h3>'.
    10   $PageList['Output'];
     37    $Output = '<h3>Verze hry</h3>'.
     38      $PageList['Output'];
    1139
    12 $TableColumns = array(
    13   array('Name' => 'Version', 'Title' => 'Verze'),
    14   array('Name' => 'BuildNumber', 'Title' => 'Sestavení'),
    15   array('Name' => 'ReleaseDate', 'Title' => 'Datum uvolnění'),
    16   array('Name' => 'Title', 'Title' => 'Titutek'),
    17 );
    18 $Order = GetOrderTableHeader($TableColumns, 'BuildNumber', 1);
    19 $Output .= '<table class="BaseTable">'.
    20   $Order['Output'];
     40    $TableColumns = array(
     41      array('Name' => 'Version', 'Title' => 'Verze'),
     42      array('Name' => 'BuildNumber', 'Title' => 'Sestavení'),
     43      array('Name' => 'ReleaseDate', 'Title' => 'Datum uvolnění'),
     44      array('Name' => 'Title', 'Title' => 'Titutek'),
     45    );
     46    $Order = GetOrderTableHeader($TableColumns, 'BuildNumber', 1);
     47    $Output .= '<table class="BaseTable">'.
     48      $Order['Output'];
    2149
    22 $DbResult = $System->Database->query('SELECT * FROM ClientVersion '.$Order['SQL'].$PageList['SQLLimit']);
    23 while($Version = $DbResult->fetch_assoc())
    24 {
    25   $Output .= '<tr><td><a href="http://www.wowwiki.com/Patch_'.$Version['Version'].'">'.
    26     $Version['Version'].'</a></td><td>'.$Version['BuildNumber'].'</td><td>'.
    27     HumanDate($Version['ReleaseDate']).'</td><td>'.$Version['Title'].'</td></tr>';
     50    $DbResult = $this->System->Database->query('SELECT * FROM ClientVersion '.$Order['SQL'].$PageList['SQLLimit']);
     51    while($Version = $DbResult->fetch_assoc())
     52    {
     53      $Output .= '<tr><td><a href="http://www.wowwiki.com/Patch_'.$Version['Version'].'">'.
     54        $Version['Version'].'</a></td><td>'.$Version['BuildNumber'].'</td><td>'.
     55        HumanDate($Version['ReleaseDate']).'</td><td>'.$Version['Title'].'</td></tr>';
     56    }
     57    $Output .= '</table>'.
     58      $PageList['Output'];
     59    return($Output);       
     60  }
    2861}
    29 $Output .= '</table>'.
    30   $PageList['Output'];
    31      
    32 ShowPage($Output);
     62
  • trunk/includes/Version.php

    r555 r556  
    11<?php
    22
    3 $Revision = 555; // Subversion revision
     3$Revision = 556; // Subversion revision
    44$DatabaseRevision = 543; // Database structure revision
    55$ReleaseTime = '2013-07-29';
  • trunk/includes/global.php

    r555 r556  
    2222include_once(dirname(__FILE__).'/../Modules/Import/Import.php');
    2323include_once(dirname(__FILE__).'/../Modules/Server/Server.php');
     24include_once(dirname(__FILE__).'/../Modules/ClientVersion/ClientVersion.php');
    2425include_once(dirname(__FILE__).'/../Modules/FrontPage/FrontPage.php');
    2526
     
    7576  $System->ModuleManager->RegisterModule(new ModuleImport($System));
    7677  $System->ModuleManager->RegisterModule(new ModuleServer($System));
     78  $System->ModuleManager->RegisterModule(new ModuleClientVersion($System));
    7779  $System->ModuleManager->StartAll();
    7880}
  • trunk/includes/system.php

    r555 r556  
    8787                                'Permission' => LICENCE_ANONYMOUS,
    8888                                'Icon' => '',
    89                 ),
    90                 array(
    91                                 'Title' => 'Verze hry',
    92                                 'Hint' => 'Seznam verzí herního klienta',
    93                                 'Link' => $this->Link('/version.php'),
    94                                 'Permission' => LICENCE_ANONYMOUS,
    95                                 'Icon' => '',
    96                 ),
     89                ),             
    9790                array(
    9891                                'Title' => 'IRC chat',
Note: See TracChangeset for help on using the changeset viewer.