Changeset 625 for trunk


Ignore:
Timestamp:
Aug 18, 2009, 12:25:53 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Stránka GM týmu přepracována do přehlednější formy s podporou více světů.
Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/server.php

    r624 r625  
    380380        else $Target = '';
    381381      $Output .= '<div style="text-align: center;"><form name="RealmSelection'.$FormNameSufix.'" action="'.$Target.'" method="post">'.
    382       '<div>Svět <select name="RealmIndex" onchange="document.RealmSelection'.$FormNameSufix.'.submit()">';
     382      '<div>Výběr světa <select name="RealmIndex" onchange="document.RealmSelection'.$FormNameSufix.'.submit()">';
    383383      foreach($Config['Mangos']['RealmList'] as $Index => $Realm)
    384384      {
  • trunk/index.php

    r624 r625  
    5151  array('link' => 'forum/', 'Text' => 'Fórum'),
    5252  array('link' => '?page=server', 'Text' => 'Server'),
     53  array('link' => '?page=gmteam', 'Text' => 'GM Tým'),
    5354  //array('link' => 'bug_tracker/', 'Text' => 'Nahlaš chybu'),
    5455  array('link' => 'gallery/', 'Text' => 'Galerie'),
     
    6869  array('link' => '?page=tophraci', 'Text' => 'Nej hráči'),
    6970  array('link' => '?page=guildy', 'Text' => 'Spolky'),
    70   array('link' => '?page=gmteam', 'Text' => 'GM Tým'),
     71  array('link' => 'armory/', 'Text' => 'Armory'),
    7172  array('link' => '?page=gh', 'Text' => 'Domky spolků'),
    7273  array('link' => '?page=arena', 'Text' => 'Arény'),
  • trunk/pages/dotation.php

    r624 r625  
    1010    <th>Příspěvek(CZK)</th>
    1111  </tr>';
    12 $load_dotation = $db->query('SELECT * FROM `finance_reward` ORDER BY `Id` DESC');
     12$load_dotation = $db->query('SELECT * FROM `finance_reward` ORDER BY `Price` DESC');
    1313while($row = $load_dotation->fetch_assoc())
    1414{
  • trunk/pages/gmteam.php

    r615 r625  
    11<?php
    22
    3 $Role = array('Hráč', 'Moderátor', 'Game Master', 'Kontrolor chyb', 'Vedoucí Tábora', 'Administrátor', 'Správce Systému');
     3function ShowGMList($Realm)
     4{
     5  global $db, $Config;
     6 
     7  $Result = $db->query('SELECT `gm_tym`.*, `account`.`id`, `account`.`username` FROM `'.$Config['Mangos']['DatabaseRealmd'].'`.`account` LEFT JOIN `'.$Config['Database']['Database'].'`.`gm_tym` ON `gm_tym`.`AccountId` = `account`.`id` WHERE (`account`.`locked` = 0) AND (`account`.`gmlevel` > 0) AND (`gm_tym`.`RealmId` = '.$Realm['Id'].') ORDER BY `gm_tym`.`RealmId`, `account`.`username`');
     8  if($Realm['Id'] == 0) $Output = '<h3 class="PageTitle">'.$Realm['Name'].'</h3>';
     9    else $Output = '<h3 class="PageTitle">Svět '.$Realm['Name'].'</h3>';
     10  $Output .= '<table class="BaseTable">'.
     11    '<tr><th>Jméno</th><th>Pověření</th><th>Postavy</th></tr>';
     12  if($Result->num_rows == 0) return('');
     13 
     14  while($Line = $Result->fetch_array())
     15  {
     16    $Line['username'] = strtoupper($Line['username'][0]).strtolower(substr($Line['username'], 1));
     17    if(substr($Line['username'], -2, 2) == 'gm') $Line['username'] = substr($Line['username'], 0, -2);
     18 
     19    $Output .= '<tr><td>'.$Line['username'].'</td>'.
     20      '<td>'.$Line['Delegation'].'</td>';
     21    $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']);
     22    $Output .= '<td>';
     23    $Characters = array();
     24    $ResultMangos = $db->query('SELECT * FROM `characters` WHERE account = "'.$Line['id'].'"');
     25    while($LineMangos = $ResultMangos->fetch_array())
     26    {
     27      if($LineMangos['online'] == 1) $Characters[] = $LineMangos['name'].'(online)';
     28        else $Characters[] = $LineMangos['name'];
     29    }
     30    $Output .= implode(', ', $Characters);
     31    $Output .= '</td>';
    432
    5 echo('<h3 class="PageTitle">GM tým</h3>');
    6 echo($server->RealmSelection());
    7 $db->select_db($Config['Mangos']['DatabaseRealmd']);
    8 $Result = $db->query('SELECT * FROM account WHERE (locked = 0) AND (gmlevel > 0) ORDER BY username');
    9 echo('<table class="GMTeamTable">');
    10 while($Line = $Result->fetch_array())
    11 {
    12   $Line['username'] = strtoupper($Line['username'][0]).strtolower(substr($Line['username'], 1));
    13   if(substr($Line['username'], -2, 2) == 'gm') $Line['username'] = substr($Line['username'], 0, -2);
    14  
    15   echo('<tr class="start"><th>Přezdívka:</th>');
    16   echo('<td>'.$Line['username'].'</td>');
    17   echo('</tr>');
    18   echo('<tr><th>Pověření:</th>');
    19   echo('<td>'.$Line['Note'].'</td>');
    20   echo('</tr>');
    2133/*
    22   if ($Line['Email'] <> '')
    23   {
    24     echo '<tr><td><p>Email:</p></td>';
    25     echo '<td><p><b>'.$Line['Email'].'</b></p></td>';
    26     echo '</tr>';
    27   }
    28   $Acc = $Line['AccID'];
    29 */
    30   $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']);
    31   echo('<tr><th>GM Postavy ve hře:</th>');
    32   echo('<td>');
    33   $Characters = array();
    34   $ResultMangos = $db->query('SELECT * FROM `characters` WHERE account = "'.$Line['id'].'"');
    35   while($LineMangos = $ResultMangos->fetch_array())
    36   {
    37     if($LineMangos['online'] == 1) $Characters[] = $LineMangos['name'].'(online)';
    38       else $Characters[] = $LineMangos['name'];
    39   }
    40   echo(implode(', ', $Characters));
    41   echo('</td></tr>');
    42 
    43 //  $Database->select_db($Config['Mangos']['DatabaseRealmd']);
     34 * //  $Database->select_db($Config['Mangos']['DatabaseRealmd']);
    4435  if($Line['ForumId'] != 0)
    4536  {
     
    4940  }
    5041  //echo('<tr><td colspan="2"><hr></td></tr>');
     42  */
     43    $Output .= '</tr>';
     44  }
     45  $Output .= '</table>';
     46  return($Output);
    5147}
    52 echo('</table>');
     48
     49//$Role = array('Hráč', 'Moderátor', 'Game Master', 'Kontrolor chyb', 'Vedoucí Tábora', 'Administrátor', 'Správce Systému');
     50//$_COOKIE['RealmIndex']
     51
     52$Output = '<h2 class="PageTitle">GM tým</h3>';
     53
     54$Output .= ShowGMList(array('Id' => 0, 'Name' => 'Všechny světy'));
     55foreach($Config['Mangos']['RealmList'] as $Realm)
     56{
     57  $Output .= ShowGMList($Realm);
     58}
     59$Output .= '<br />'.$server->RealmSelection();
     60
     61echo($Output);
    5362
    5463?>
  • trunk/pages/teamspeak.php

    r606 r625  
    33echo('<table class="SimpleTable"><tr><td>');
    44echo('<h4>TeamSpeak server</h4>');
    5 echo('Adresa pro připojení: wow.zdechov.net<br /><br />');
     5echo('Adresa pro připojení: '.$Config['Web']['WoWServerAddr'].'<br /><br />');
    66
    77  // The code between the 2 lines below turns on PHPs error handlers.
     
    3535  // Set the teamspeak server IP or Hostname below (DO NOT INCLUDE THE
    3636  // PORT NUMBER):
    37   $settings['serveraddress'] = 'wow.zdechov.net';
     37  $settings['serveraddress'] = $Config['Web']['WoWServerAddr'];
    3838 
    3939  // If your you use another port than 8767 to connect to your teamspeak
     
    7171echo('</td></tr></table>');
    7272
    73 
    7473?>
  • trunk/sql/updates/624.sql

    r624 r625  
    1 CREATE TABLE `wow`.`finance_reward` (
     1CREATE TABLE `finance_reward` (
    22`Id` INT NOT NULL AUTO_INCREMENT ,
    33`Reward` VARCHAR( 255 ) NOT NULL ,
Note: See TracChangeset for help on using the changeset viewer.