Changeset 706 for trunk/admin/index.php


Ignore:
Timestamp:
Jan 4, 2014, 11:31:16 PM (11 years ago)
Author:
maron
Message:
  • Added: chose game version in creation dbc structure
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/index.php

    r676 r706  
    189189  global $System,$TranslationTree;
    190190  $Output = '';
     191  if (array_key_exists('GameVersion', $_GET)) {
     192      $_SESSION['GameVersion'] = $_GET['GameVersion'];
     193  }
     194  if (!array_key_exists('GameVersion', $_SESSION))
     195    $_SESSION['GameVersion'] = $System->Config['Web']['GameVersion']; 
     196   
     197  $Output .= '<br />Nastavená verze: '.$_SESSION['GameVersion'].'<br />';
     198
    191199  if (array_key_exists('GroupItem', $_GET)) {
    192     $DbResult = $System->Database->query('SELECT * FROM `ClientVersion` WHERE `Version` = "'.$System->Config['Web']['GameVersion'].'"');
     200    $DbResult = $System->Database->query('SELECT * FROM `ClientVersion` WHERE `Version` = "'.$_SESSION['GameVersion'].'"');
    193201    $Version = $DbResult->fetch_assoc(); 
    194202    $System->Database->query('INSERT INTO  `GroupItemDBC` (`Id` ,`ClientVersion` ,`GroupItem` ,`ColumnIndex`)VALUES (NULL ,  \''.$Version['Id'].'\',  \''.$_GET['GroupItem'].'\',  \''.$_GET['ColumnIndex'].'\')');
     
    207215          $File = new FileStream();
    208216                                             
    209           $File->OpenFile(dirname(__FILE__).'/../source/'.$System->Config['Web']['GameVersion'].'/dbc/'.$Group['DBCFileName'].'.dbc.csv');
     217          $File->OpenFile(dirname(__FILE__).'/../source/'.$_SESSION['GameVersion'].'/dbc/'.$Group['DBCFileName'].'.dbc.csv');
    210218
    211219          //while(!$File->EOF())
     
    239247          $Output .= '</table>';
    240248  } else {
     249
     250    $DbResult = $System->Database->query('SELECT * FROM `ClientVersion`');
     251    while($Version = $DbResult->fetch_assoc()) 
     252    {
     253       $Output .= '<a href="'.$System->Link('/admin/?action=dbcstructure&amp;GameVersion='.$Version['Version']).'">'.$Version['Version'].'</a> ';
     254
     255    } 
     256    $Output .= '<br /><br />';
     257
    241258    foreach($TranslationTree as $Group) 
    242259    {
Note: See TracChangeset for help on using the changeset viewer.