Ignore:
Timestamp:
Jan 7, 2014, 9:54:21 PM (10 years ago)
Author:
chronos
Message:
  • Added: Each client version as separated web page.
File:
1 edited

Legend:

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

    r637 r727  
    3030{
    3131        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        }
     40       
     41        function ShowItem()
     42        {
     43     $YesNo = array('Ne', 'Ano');
     44     $DbResult = $this->System->Database->query('SELECT * FROM ClientVersion WHERE Id='.$_GET['id']);
     45     if($DbResult->num_rows > 0)
     46     {
     47         $Version = $DbResult->fetch_assoc();
     48   
     49     $Output = '<h3>'.T('Client version').'</h3>';
     50     $Output .= '<table class="BaseTable">'.
     51        '<tr><td>'.T('Version').'</td><td>'.$Version['Version'].'</td></tr>'.
     52        '<tr><td>'.T('More information').'</td><td><a href="http://www.wowwiki.com/Patch_'.$Version['Version'].'">wowwiki.com'.
     53        '</a></td></tr>'.
     54        '<tr><td>'.T('Build number').'</td><td>'.$Version['BuildNumber'].'</td></tr>'.
     55        '<tr><td>'.T('Release date').'</td><td>'.HumanDate($Version['ReleaseDate']).'</td></tr>'.
     56        '<tr><td>'.T('Title').'</td><td>'.$Version['Title'].'</td></tr>'.
     57        '<tr><td>'.T('Imported').'</td><td>'.$YesNo[$Version['Imported']].'</td></tr>'.
     58        '</table>';
     59        $Output .= '<div><a href="?">'.T('All versions list').'</a></div>';
     60        if($Version['Imported'])
     61          $Output .= '<div><a href="'.$this->System->Link('/progress/?Version='.$Version['Version']).'">'.T('Progress').'</a></div>';
     62     } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL);
     63                return($Output);
     64        }
     65       
     66        function ShowList()
    3267        {               
    3368                $this->Title = T('Game version');
     
    5590    while($Version = $DbResult->fetch_assoc())
    5691    {
    57       $Output .= '<tr><td><a href="http://www.wowwiki.com/Patch_'.$Version['Version'].'">'.
     92      $Output .= '<tr><td><a href="?action=item&amp;id='.$Version['Id'].'">'.
    5893        $Version['Version'].'</a></td><td>'.$Version['BuildNumber'].'</td><td>'.
    5994        HumanDate($Version['ReleaseDate']).'</td><td>'.$Version['Title'].'</td>'.
Note: See TracChangeset for help on using the changeset viewer.