| 1 | <?php
|
|---|
| 2 |
|
|---|
| 3 | function Show()
|
|---|
| 4 | {
|
|---|
| 5 | global $Database, $Config;
|
|---|
| 6 |
|
|---|
| 7 | echo('<h3>Správa serveru</h3>');
|
|---|
| 8 | echo('<table witdh="100%"><tr><td valign="top">');
|
|---|
| 9 | echo('<a href="https://wow.zdechov.net/mysql/">Správa databáze PhpMyAdmin</a><br>');
|
|---|
| 10 | echo('<a href="https://wow.zdechov.net/trac/wow/">Zdrojové kody webu</a><br>');
|
|---|
| 11 | echo('<a href="gm_rules.php">Pravidla pro GM</a><br>');
|
|---|
| 12 | echo('</td><td valign="top">');
|
|---|
| 13 | echo('<a href="http://stat.zdechov.net/game/">Statistiky provozu</a><br>');
|
|---|
| 14 | echo('<a href="../navody/">Návody</a><br>');
|
|---|
| 15 | echo('<a href="../db/index.php?id=bugreport">Bug report</a>');
|
|---|
| 16 | echo('</td><td valign="top">');
|
|---|
| 17 | echo('<a href="rss.php">RSS GM zpráv</a><br>');
|
|---|
| 18 | echo('<a href="rss_tickets.php">RSS herních žádanek</a><br>');
|
|---|
| 19 | echo('</td></table><br>');
|
|---|
| 20 |
|
|---|
| 21 | echo('<form action="?op=AddMessage" method="post">
|
|---|
| 22 | Uživatel: '.$_SESSION['UserName'].' <a href="?op=Logout">Odhlásit</a><br>
|
|---|
| 23 | <input name="text" size="80"> <input type="submit" value="Přidat">');
|
|---|
| 24 | echo('</form>');
|
|---|
| 25 |
|
|---|
| 26 | $PerPage = 15;
|
|---|
| 27 | if(array_key_exists('page', $_GET)) $Page = addslashes($_GET['page']); else $Page = 0;
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 | echo('<table class="TableAdmin" cellspacing="0" width="100%" style="color: white;" border="1">');
|
|---|
| 31 | $DbResult = $Database->query('SELECT wow.gm_news.text as text, '.$Config['Mangos']['DatabaseRealmd'].'.account.username as username FROM wow.gm_news JOIN '.$Config['Mangos']['DatabaseRealmd'].'.account ON wow.gm_news.author = '.$Config['Mangos']['DatabaseRealmd'].'.account.Id ORDER BY wow.gm_news.time DESC LIMIT '.$Page*$PerPage.', '.$PerPage);
|
|---|
| 32 | while($Row = $DbResult->fetch_array())
|
|---|
| 33 | {
|
|---|
| 34 | echo('<tr><td><strong>'.$Row['username'].':</strong> '.$Row['text'].'</td></tr>');
|
|---|
| 35 | }
|
|---|
| 36 | echo('</table>');
|
|---|
| 37 |
|
|---|
| 38 | $DbResult = $Database->query('SELECT COUNT(*) FROM wow.gm_news');
|
|---|
| 39 | $Row = $DbResult->fetch_array();
|
|---|
| 40 | echo(PagesList('?page=', $Page, $Row[0], $PerPage));
|
|---|
| 41 | //echo(phpinfo());
|
|---|
| 42 | }
|
|---|
| 43 |
|
|---|
| 44 | ?>
|
|---|