Changeset 555
- Timestamp:
- Mar 29, 2009, 4:21:14 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/html.php
r551 r555 12 12 $this->html_cfg = array 13 13 ( 14 "charset" => "utf-8",14 /* "charset" => "utf-8", 15 15 "author" => "Zork", 16 16 "copyright" => "(C) 2008 Heroes of Fantasy, All rights reserved.", … … 19 19 "description" => "Heroes of Fantasy free WoW server běžící na programu MaNGOS", 20 20 "keywords" => "wowserver, world of warcraft, free, wow, server, hof, heroes of fantasy, zdechov, mangos" 21 );21 */ ); 22 22 23 23 if((count($values) > 1) or ($values[0] != 0) and ($values[0] != 0)) … … 63 63 '<link href="inc/teamspeakdisplay/teamspeakdisplay.css" rel="stylesheet" type="text/css" />'. 64 64 '<link rel="alternate" title="Články" href="rss.php?category=articles" type="application/rss+xml" />'. 65 '<link rel="alternate" title="Finanční přispěvky" href="rss.php?category=finance" type="application/rss+xml" />'. 65 66 '<script type="text/javascript" src="styles/global.js"></script>'. 66 67 '<!--[if IE]><link rel="stylesheet" type="text/css" href="styles/ie.css" /><![endif]-->'. -
trunk/rss.php
r551 r555 9 9 $Items = array(); 10 10 11 $DbResult = $db->query('SELECT UNIX_TIMESTAMP(date), articles.* FROM articles ORDER BY date DESC LIMIT '.$NewsCount); 12 while($Row = $DbResult->fetch_array()) 11 if(array_key_exists('category', $_GET)) 13 12 { 14 $Items[] = array( 15 'Title' => $Row['title'], 16 'Link' => 'http://'.$_SERVER['SERVER_NAME'].$Config['Web']['BaseURL'], 17 'Description' => $Row['text']." (".$Row['autor'].")", 18 'Time' => $Row['UNIX_TIMESTAMP(date)'], 19 ); 13 if($_GET['category'] == 'articles') 14 { 15 $Config['Web']['Title'] .= ' - články'; 16 $DbResult = $db->query('SELECT UNIX_TIMESTAMP(date), articles.* FROM articles ORDER BY date DESC LIMIT '.$NewsCount); 17 while($Row = $DbResult->fetch_array()) 18 { 19 $Items[] = array( 20 'Title' => $Row['title'], 21 'Link' => 'http://'.$_SERVER['SERVER_NAME'].$Config['Web']['BaseURL'], 22 'Description' => $Row['text']." (".$Row['autor'].")", 23 'Time' => $Row['UNIX_TIMESTAMP(date)'], 24 ); 25 } 26 } else 27 if($_GET['category'] == 'tickets') 28 { 29 $Config['Web']['Title'] .= ' - žádosti hráčů'; 30 $db->select_db($Config['Mangos']['DatabaseCharacters']); 31 $DbResult = $db->query("SELECT `character_ticket`.`ticket_text` AS `text`, `characters`.`name` AS `name` FROM `character_ticket` JOIN `characters` ON `characters`.`guid` = `character_ticket`.`guid`"); 32 while($Row = $DbResult->fetch_array()) 33 { 34 $Items[] = array( 35 'Title' => $Row['name'].': '.$Row['text'], 36 'Link' => '', 37 'Description' => $Row['name'].': '.$Row['text'], 38 'Time' => 0, 39 ); 40 } 41 } 42 if($_GET['category'] == 'finance') 43 { 44 $Config['Web']['Title'] .= ' - finanční příspěvky'; 45 $DbResult = $db->query('SELECT UNIX_TIMESTAMP(time), operation, description, money FROM finance ORDER BY time DESC LIMIT '.$NewsCount); 46 while($Row = $DbResult->fetch_array()) 47 { 48 $Items[] = array 49 ( 50 'Title' => $OperationType[$Row['operation']].' '.$Row['description'].' ('.$Row['money'].' Kč)', 51 'Link' => 'http://'.$_SERVER['SERVER_NAME'].$Config['Web']['BaseURL'].'finance/', 52 'Description' => $OperationType[$Row['operation']].' '.$Row['description']."<br>".$Row['money']." Kč", 53 'Time' => $Row['UNIX_TIMESTAMP(time)'], 54 ); 55 } 56 } 20 57 } 21 58 -
trunk/sql/structure.sql
r530 r555 83 83 `date` timestamp NOT NULL default '0000-00-00 00:00:00' on update CURRENT_TIMESTAMP, 84 84 PRIMARY KEY (`id`) 85 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 5;85 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=117 ; 86 86 87 87 -- -------------------------------------------------------- … … 117 117 `ip` varchar(16) collate utf8_czech_ci NOT NULL, 118 118 PRIMARY KEY (`id`) 119 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 63;119 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=91 ; 120 120 121 121 -- -------------------------------------------------------- … … 132 132 PRIMARY KEY (`id`) 133 133 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; 134 135 -- -------------------------------------------------------- 136 137 -- 138 -- Struktura tabulky `debug` 139 -- 140 141 CREATE TABLE IF NOT EXISTS `debug` ( 142 `Id` int(11) NOT NULL auto_increment, 143 `Time` datetime NOT NULL, 144 `Backtrace` mediumtext collate latin2_czech_cs NOT NULL, 145 `Log` text collate latin2_czech_cs NOT NULL, 146 `MangosVersion` varchar(255) collate latin2_czech_cs NOT NULL, 147 `DbVersion` varchar(255) collate latin2_czech_cs NOT NULL, 148 `MaxPlayerCount` int(11) NOT NULL, 149 `Uptime` int(11) NOT NULL, 150 `ErrorLog` text collate latin2_czech_cs NOT NULL, 151 `DbErrors` text collate latin2_czech_cs NOT NULL, 152 `Configuration` text collate latin2_czech_cs NOT NULL, 153 PRIMARY KEY (`Id`) 154 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=1 ; 134 155 135 156 -- -------------------------------------------------------- … … 147 168 `ip` varchar(16) collate utf8_czech_ci NOT NULL, 148 169 PRIMARY KEY (`id`) 149 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 18;170 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=41 ; 150 171 151 172 -- -------------------------------------------------------- … … 174 195 `odmena` varchar(255) character set utf8 collate utf8_czech_ci NOT NULL, 175 196 KEY `ID` (`id`) 176 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=12 7;197 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=128 ; 177 198 178 199 -- --------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.