Changeset 627
- Timestamp:
- Aug 19, 2009, 9:06:06 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/config.sample.php
r624 r627 60 60 'ShowSQLQuery' => false, 61 61 'ShowPHPError' => false, 62 'OS' => 'GNU/Linux',63 62 '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',68 63 '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 }, 69 76 ), 70 77 'CheckRegistration' => array -
trunk/inc/server.php
r625 r627 19 19 $date_arr = explode(' ', $date); 20 20 $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); 22 23 $time = mktime($time_stp[0], $time_stp[1], $time_stp[2], $date[1], $date[2], $date[0]); 23 24 if($time == 1) $human_date = date('d.m.Y H:i:s', $time); -
trunk/pages/dotation.php
r625 r627 10 10 <th>Příspěvek(CZK)</th> 11 11 </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'); 13 13 while($row = $load_dotation->fetch_assoc()) 14 14 { … … 31 31 ); 32 32 33 $load_money = $db->query('SELECT SUM(` money`) FROM `finance`;')->fetch_row();33 $load_money = $db->query('SELECT SUM(`Money`) FROM `Finance`;')->fetch_row(); 34 34 35 35 $Output .= '<p><strong>Aktuální stav financí: '.$load_money[0].' Kč</strong></p>'; … … 42 42 '</tr>'; 43 43 44 $load_dotation = $db->query('SELECT * FROM ` finance` ORDER BY `id` DESC');44 $load_dotation = $db->query('SELECT * FROM `Finance` ORDER BY `Id` DESC'); 45 45 while($row = $load_dotation->fetch_assoc()) 46 46 { 47 $odmena = $row[' odmena'];47 $odmena = $row['Reward']; 48 48 49 if($row[' time'] != '')49 if($row['Time'] != '') 50 50 { 51 $date = $server->HumanDate($row[' time'], 0);51 $date = $server->HumanDate($row['Time'], 0); 52 52 //$date = $row['time']; 53 53 } else $date = ''; 54 if($row[' money'] > 0) $plus = '+';54 if($row['Money'] > 0) $plus = '+'; 55 55 else $plus = ''; 56 56 $Output .= '<tr>'. 57 57 '<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>'. 60 60 '<td>'.$odmena.'</td>'. 61 61 '</tr>'; -
trunk/pages/gh.php
r626 r627 6 6 <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>'; 7 7 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']); 9 9 while($Guild = $DbResult->fetch_assoc()) 10 10 { -
trunk/pages/gmteam.php
r625 r627 5 5 global $db, $Config; 6 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`');7 $Result = $db->query('SELECT * FROM `GmTeam` WHERE (`RealmId` = '.$Realm['Id'].') AND (`TimeTo` IS NULL) ORDER BY `RealmId`, `Nick`'); 8 8 if($Realm['Id'] == 0) $Output = '<h3 class="PageTitle">'.$Realm['Name'].'</h3>'; 9 9 else $Output = '<h3 class="PageTitle">Svět '.$Realm['Name'].'</h3>'; … … 13 13 14 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>'.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>'. 20 20 '<td>'.$Line['Delegation'].'</td>'; 21 $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']);22 21 $Output .= '<td>'; 23 22 $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'].'"'); 25 24 while($LineMangos = $ResultMangos->fetch_array()) 26 25 { … … 50 49 //$_COOKIE['RealmIndex'] 51 50 51 $db->select_db($Config['Database']['Database']); 52 52 $Output = '<h2 class="PageTitle">GM tým</h3>'; 53 53 … … 59 59 $Output .= '<br />'.$server->RealmSelection(); 60 60 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'); 64 while($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 61 70 echo($Output); 62 71 -
trunk/pages/server.php
r624 r627 1 1 <?php 2 2 3 echo('<h3 class="PageTitle">Server Heroes of Fantasy :</h3>'.3 $Output = '<h3 class="PageTitle">Server Heroes of Fantasy</h3>'. 4 4 '<table class="BaseTable"> 5 5 <tr> 6 <t d colspan="2"><strong>Statistiky :</strong></td>6 <th colspan="2">Statistiky</th> 7 7 </tr> 8 8 <tr> … … 43 43 </tr> 44 44 <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> 50 46 </tr> 51 47 <tr> … … 62 58 </tr> 63 59 <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 64 foreach($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> 65 77 </tr> 66 78 <tr> 67 79 <td>Procesor</td> 68 <td>'.$ Config['Web']['CPU'].'</td>80 <td>'.$Server['CPU'].'</td> 69 81 </tr> 70 82 <tr> 71 83 <td>Operační paměť</td> 72 <td>'.$ Config['Web']['Memory'].'</td>84 <td>'.$Server['Memory'].'</td> 73 85 </tr> 74 86 <tr> 75 87 <td>Pevný disk</td> 76 <td>'.$ Config['Web']['HDD'].'</td>88 <td>'.$Server['HDD'].'</td> 77 89 </tr> 78 90 <tr> 79 91 <td>Adresa serveru</td> 80 <td>'.$ Config['Web']['WoWServerAddr'].'</td>92 <td>'.$Server['Address'].'</td> 81 93 </tr> 82 94 <tr> 83 95 <td>Internetová linka</td> 84 <td>'.$ Config['Web']['Internet'].'</td>96 <td>'.$Server['Internet'].'</td> 85 97 </tr> 86 98 <tr> 87 <td colspan="2"><strong>Grafické statistiky serveru :</strong></td> 99 <td>Světy</td> 100 <td>'.implode(',', $Realms).'</td> 88 101 </tr> 89 102 <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> 92 105 </tr> 93 </table>'); 106 </table>'; 107 } 108 $Output .= '</td></tr> 109 </table>'; 110 111 echo($Output); 94 112 95 113 ?> -
trunk/pages/webconfig.php
r581 r627 10 10 $msg = '<center><b>Ukládám změny.</b></center><br /> 11 11 <meta http-equiv="refresh" content="1;url=?page=webconfig">'; 12 } else 13 { 14 $msg = ''; 15 } 12 } else $msg = ''; 16 13 17 14 function Check($value, $option) … … 46 43 } 47 44 } 48 $Output = '<form method="post">45 $Output = '<form method="post"> 49 46 <div align="left"> 50 47 <b>Náhodný obrázek v hlavičce stránky.</b><br /> -
trunk/rss.php
r585 r627 42 42 if($_GET['category'] == 'finance') 43 43 { 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'); 45 45 $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); 47 47 while($Row = $DbResult->fetch_assoc()) 48 48 { 49 49 $Items[] = array 50 50 ( 51 'Title' => $OperationType[$Row[' operation']].' '.$Row['description'].' ('.$Row['money'].' Kč)',51 'Title' => $OperationType[$Row['Operation']].' '.$Row['Description'].' ('.$Row['Money'].' Kč)', 52 52 '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)'], 55 55 ); 56 56 }
Note:
See TracChangeset
for help on using the changeset viewer.