Changeset 627


Ignore:
Timestamp:
Aug 19, 2009, 9:06:06 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Strkutura a názvy tabulek gm_tym, finance, finance_rewards.
  • Upraveno: Stránka informací o serveru doplněna pro podporu zobrazení více fyzických serverů.
  • Přidáno: Zobrazení dřívějších GM v dolní částí stránky GM týmu.
Location:
trunk
Files:
1 added
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/config.sample.php

    r624 r627  
    6060    'ShowSQLQuery' => false,
    6161    'ShowPHPError' => false,
    62     'OS' => 'GNU/Linux',
    6362    'ServerFounded' => '1.1.2000',
    64     'CPU' => 'AMD Athlon 64 X2 5600+, 2,8 GHz',
    65     'Memory' => '8 GB DDR2 800 MHz dual channel',
    66     'HDD' => 'WD Green 1 TB, 32 MB cache',
    67     'Internet' => '16/16 Mbit/s, agregace 1:32',
    6863    'BankAccount' => '670100-2202937132/6210',
     64    'ServerList' => array(
     65      array(
     66        'OS' => 'GNU/Linux',
     67        'CPU' => 'AMD Athlon 64 X2 5600+, 2,8 GHz',
     68        'Memory' => '8 GB DDR2 800 MHz dual channel',
     69        'HDD' => 'WD Green 1 TB, 32 MB cache',
     70        'Address' => 'localhost',
     71        'Internet' => '16/16 Mbit/s, agregace 1:32',
     72        'Realms' => array(1),
     73        'Statistic' => 'http://localhost/stat/',
     74      },
     75    },
    6976  ),
    7077  'CheckRegistration' => array
  • trunk/inc/server.php

    r625 r627  
    1919    $date_arr = explode(' ', $date);
    2020    $date = explode('-', $date_arr[0]);
    21     $time_stp = explode(':', $date_arr[1]);
     21    if(count($date_arr) > 1) $time_stp = explode(':', $date_arr[1]);
     22      else $time_stp = array(0, 0, 0);
    2223    $time = mktime($time_stp[0], $time_stp[1], $time_stp[2], $date[1], $date[2], $date[0]);
    2324    if($time == 1) $human_date = date('d.m.Y H:i:s', $time);
  • trunk/pages/dotation.php

    r625 r627  
    1010    <th>Příspěvek(CZK)</th>
    1111  </tr>';
    12 $load_dotation = $db->query('SELECT * FROM `finance_reward` ORDER BY `Price` DESC');
     12$load_dotation = $db->query('SELECT * FROM `FinanceReward` ORDER BY `Price` DESC');
    1313while($row = $load_dotation->fetch_assoc())
    1414{
     
    3131);
    3232
    33 $load_money = $db->query('SELECT SUM(`money`) FROM `finance`;')->fetch_row();
     33$load_money = $db->query('SELECT SUM(`Money`) FROM `Finance`;')->fetch_row();
    3434
    3535$Output .= '<p><strong>Aktuální stav financí: '.$load_money[0].' Kč</strong></p>';
     
    4242  '</tr>';
    4343
    44 $load_dotation = $db->query('SELECT * FROM `finance` ORDER BY `id` DESC');
     44$load_dotation = $db->query('SELECT * FROM `Finance` ORDER BY `Id` DESC');
    4545while($row = $load_dotation->fetch_assoc())
    4646{
    47   $odmena = $row['odmena'];
     47  $odmena = $row['Reward'];
    4848 
    49   if($row['time'] != '')
     49  if($row['Time'] != '')
    5050  {
    51     $date = $server->HumanDate($row['time'], 0);
     51    $date = $server->HumanDate($row['Time'], 0);
    5252    //$date = $row['time'];
    5353  } else $date = '';
    54   if($row['money'] > 0) $plus = '+';
     54  if($row['Money'] > 0) $plus = '+';
    5555    else $plus = '';
    5656  $Output .= '<tr>'.
    5757    '<td>'.$date.'</td>'.
    58     '<td>'.$plus.$row['money'].'</td>'.
    59     '<td>'.$operace[$row['operation']].' '.$row['description'].'</td>'.
     58    '<td>'.$plus.$row['Money'].'</td>'.
     59    '<td>'.$operace[$row['Operation']].' '.$row['Description'].'</td>'.
    6060    '<td>'.$odmena.'</td>'.
    6161    '</tr>';
  • trunk/pages/gh.php

    r626 r627  
    66<table class="BaseTable"><tr><th>Vedoucí spolku</th><th>Jméno spolku</th><th>Typ domu</th><th>Týdenní poplatek</th><th>Další platba</th></tr>';
    77
    8 $DbResult = $db->query('SELECT GuildHouse.Id, GuildHouse.NextPayment, guild.name AS Name, GuildHouseType.Name AS TypeName, GuildHouseType.Tax AS Tax, guild.BankMoney, characters.name AS LeaderName FROM GuildHouse LEFT JOIN GuildHouseType ON GuildHouseType.Id = GuildHouse.Type LEFT JOIN '.$Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters'].'.guild ON guildid = GuildHouse.Id LEFT JOIN '.$Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters'].'.characters ON characters.guid = guild.leaderguid');
     8$DbResult = $db->query('SELECT GuildHouse.Guild, GuildHouse.NextPayment, guild.name AS Name, GuildHouseType.Name AS TypeName, GuildHouseType.Tax AS Tax, guild.BankMoney, characters.name AS LeaderName FROM GuildHouse LEFT JOIN GuildHouseType ON GuildHouseType.Id = GuildHouse.Type LEFT JOIN '.$Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters'].'.guild ON guildid = GuildHouse.Guild LEFT JOIN '.$Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters'].'.characters ON characters.guid = guild.leaderguid WHERE GuildHouse.Realm = '.$_COOKIE['RealmIndex']);
    99while($Guild = $DbResult->fetch_assoc())
    1010{     
  • trunk/pages/gmteam.php

    r625 r627  
    55  global $db, $Config;
    66 
    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`');
     7  $Result = $db->query('SELECT * FROM `GmTeam` WHERE (`RealmId` = '.$Realm['Id'].') AND (`TimeTo` IS NULL) ORDER BY `RealmId`, `Nick`');
    88  if($Realm['Id'] == 0) $Output = '<h3 class="PageTitle">'.$Realm['Name'].'</h3>';
    99    else $Output = '<h3 class="PageTitle">Svět '.$Realm['Name'].'</h3>';
     
    1313 
    1414  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>'.
     15  { 
     16    // Create link from name if ForumId defined
     17    if($Line['ForumId'] != 0) $Line['Nick'] = '<a href="'.$Config['Web']['BaseURL'].'forum/memberlist.php?mode=viewprofile&u='.$Line['ForumId'].'">'.$Line['Nick'].'</a>';
     18   
     19    $Output .= '<tr><td>'.$Line['Nick'].'</td>'.
    2020      '<td>'.$Line['Delegation'].'</td>';
    21     $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']);
    2221    $Output .= '<td>';
    2322    $Characters = array();
    24     $ResultMangos = $db->query('SELECT * FROM `characters` WHERE account = "'.$Line['id'].'"');
     23    $ResultMangos = $db->query('SELECT * FROM `'.$Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters'].'`.`characters` WHERE `account` = "'.$Line['AccountId'].'"');
    2524    while($LineMangos = $ResultMangos->fetch_array())
    2625    {
     
    5049//$_COOKIE['RealmIndex']
    5150
     51$db->select_db($Config['Database']['Database']);
    5252$Output = '<h2 class="PageTitle">GM tým</h3>';
    5353
     
    5959$Output .= '<br />'.$server->RealmSelection();
    6060
     61$Output .= '<h3 class="PageTitle">Dřívější GM</h3>';
     62$List = array();
     63$DbResult = $db->query('SELECT * FROM `GmTeam` WHERE `TimeTo` IS NOT NULL');
     64while($DbRow = $DbResult->fetch_assoc())
     65{
     66  $List[] = $DbRow['Nick'].' ('.$server->HumanDate($DbRow['TimeFrom'], 0).' - '.$server->HumanDate($DbRow['TimeTo'], 0).')';
     67}
     68$Output .= implode(', ', $List);
     69
    6170echo($Output);
    6271
  • trunk/pages/server.php

    r624 r627  
    11<?php
    22
    3 echo('<h3 class="PageTitle">Server Heroes of Fantasy :</h3>'.
     3$Output = '<h3 class="PageTitle">Server Heroes of Fantasy</h3>'.
    44'<table class="BaseTable">
    55  <tr>
    6     <td colspan="2"><strong>Statistiky :</strong></td>
     6    <th colspan="2">Statistiky</th>
    77  </tr>
    88  <tr>
     
    4343  </tr>
    4444  <tr>
    45     <td colspan="2"><strong>Software :</strong></td>
    46   </tr>
    47   <tr>
    48     <td>Operační systém</td>
    49     <td>'.$Config['Web']['OS'].'</td>
     45    <th colspan="2">Software</th>
    5046  </tr>
    5147  <tr>
     
    6258  </tr>
    6359  <tr>
    64     <td colspan="2"><b>Hardware :</b></td>
     60    <th colspan="2">Servery</th>
     61  </tr>
     62  <tr><td colspan="2" style="padding: 5px;">';
     63 
     64foreach($Config['Web']['ServerList'] as $Index => $Server)
     65{
     66  $Realms = array();
     67  foreach($Server['Realms'] as $Realm)
     68    $Realms[] = $Config['Mangos']['RealmList'][$Realm]['Name'];
     69   
     70  $Output .= '<table class="BaseTable" style="margin: 5px;">
     71  <tr>
     72    <th colspan="2">Server '.($Index + 1).'</td>
     73  </tr>
     74  <tr>
     75    <td>Operační systém</td>
     76    <td>'.$Server['OS'].'</td>
    6577  </tr>
    6678  <tr>
    6779    <td>Procesor</td>
    68     <td>'.$Config['Web']['CPU'].'</td>
     80    <td>'.$Server['CPU'].'</td>
    6981  </tr>
    7082  <tr>
    7183    <td>Operační paměť</td>
    72     <td>'.$Config['Web']['Memory'].'</td>
     84    <td>'.$Server['Memory'].'</td>
    7385  </tr>
    7486  <tr>
    7587    <td>Pevný disk</td>
    76     <td>'.$Config['Web']['HDD'].'</td>
     88    <td>'.$Server['HDD'].'</td>
    7789  </tr>
    7890  <tr>
    7991    <td>Adresa serveru</td>
    80     <td>'.$Config['Web']['WoWServerAddr'].'</td>
     92    <td>'.$Server['Address'].'</td>
    8193  </tr>
    8294  <tr>
    8395    <td>Internetová linka</td>
    84     <td>'.$Config['Web']['Internet'].'</td>
     96    <td>'.$Server['Internet'].'</td>
    8597  </tr>
    8698  <tr>
    87     <td colspan="2"><strong>Grafické statistiky serveru :</strong></td>
     99    <td>Světy</td>
     100    <td>'.implode(',', $Realms).'</td>
    88101  </tr>
    89102  <tr>
    90     <td>Stránka projektu</td>
    91     <td><a href="http://stat.zdechov.net/game/">stat.zdechov.net/game/</a></td>
     103    <td>Grafy</td>
     104    <td><a href="'.$Server['Statistic'].'">'.$Server['Statistic'].'</a></td>
    92105  </tr>
    93 </table>');
     106  </table>';
     107}
     108$Output .= '</td></tr>
     109</table>';
     110
     111echo($Output);
    94112
    95113?>
  • trunk/pages/webconfig.php

    r581 r627  
    1010  $msg = '<center><b>Ukládám změny.</b></center><br />
    1111  <meta http-equiv="refresh" content="1;url=?page=webconfig">';
    12 } else
    13 {
    14   $msg = '';
    15 }
     12} else $msg = '';
    1613
    1714function Check($value, $option)
     
    4643  }
    4744}
    48 $Output ='<form method="post">
     45$Output = '<form method="post">
    4946<div align="left">
    5047  <b>Náhodný obrázek v hlavičce stránky.</b><br />
  • trunk/rss.php

    r585 r627  
    4242  if($_GET['category'] == 'finance')
    4343  {
    44     $OperationType = array('consumption' => 'Spotřeba', 'contribution' => 'Příspěvek', 'buy' => 'Nákup', 'sell' => 'Prodej', 'internet' => 'Internet');
     44    $OperationType = array('consumption' => 'Spotřeba', 'contribution' => 'Příspěvek', 'buy' => 'Nákup', 'sell' => 'Prodej', 'internet' => 'Internet', 'hosting' => 'Hosting');
    4545    $Config['Web']['Title'] .= ' - finanční příspěvky';
    46     $DbResult = $db->query('SELECT UNIX_TIMESTAMP(time), operation, description, money FROM finance ORDER BY time DESC LIMIT '.$NewsCount);
     46    $DbResult = $db->query('SELECT UNIX_TIMESTAMP(Time), Operation, Description, Money FROM Finance ORDER BY Time DESC LIMIT '.$NewsCount);
    4747    while($Row = $DbResult->fetch_assoc())
    4848    {
    4949      $Items[] = array
    5050      (
    51         'Title' => $OperationType[$Row['operation']].' '.$Row['description'].' ('.$Row['money'].' Kč)',
     51        'Title' => $OperationType[$Row['Operation']].' '.$Row['Description'].' ('.$Row['Money'].' Kč)',
    5252        'Link' => 'http://'.$_SERVER['SERVER_NAME'].$Config['Web']['BaseURL'].'finance/',
    53         'Description' => $OperationType[$Row['operation']].' '.$Row['description'].'<br />'.$Row['money'].' Kč',
    54         'Time' => $Row['UNIX_TIMESTAMP(time)'],
     53        'Description' => $OperationType[$Row['Operation']].' '.$Row['Description'].'<br />'.$Row['Money'].' Kč',
     54        'Time' => $Row['UNIX_TIMESTAMP(Time)'],
    5555      );
    5656    }   
Note: See TracChangeset for help on using the changeset viewer.