Changeset 186 for administrace
- Timestamp:
- Jan 1, 2008, 2:22:36 PM (17 years ago)
- Location:
- administrace
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
administrace/home.php
r185 r186 4 4 { 5 5 global $Database; 6 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('<a href="http://game.zdechov.net/statistic/">Statistiky provozu</a><br>'); 13 echo('<a href="../navody/">Návody</a><br>'); 14 echo('</td><td valign="top">'); 15 echo('<a href="rss.php">RSS GM zpráv</a><br>'); 16 echo('<a href="rss_tickets.php">RSS herních ádanek</a><br>'); 17 echo('</td></table><br>'); 18 7 19 echo('<form action="?op=AddMessage" method="post"> 8 <input name="text" width="40"> <input type="submit" value="Pøidat"><br><br>');9 echo('</form>'); 20 <input name="text" size="80"> <input type="submit" value="Pøidat">'); 21 echo('</form>'); 10 22 11 echo('<strong>Historie zpráv:</strong><br>'); 12 $DbResult = $Database->query('SELECT wow.gm_news.text as text, realmd.account.username as username FROM wow.gm_news JOIN realmd.account ON wow.gm_news.author = realmd.account.Id ORDER BY wow.gm_news.time DESC LIMIT 0 , 30'); 23 $PerPage = 15; 24 if(array_key_exists('page', $_GET)) $Page = addslashes($_GET['page']); else $Page = 0; 25 26 27 echo('<strong>Historie zpráv:</strong><table cellspacing="0" width="100%" style="color: white;" border="1"><tr><td>'); 28 $DbResult = $Database->query('SELECT wow.gm_news.text as text, realmd.account.username as username FROM wow.gm_news JOIN realmd.account ON wow.gm_news.author = realmd.account.Id ORDER BY wow.gm_news.time DESC LIMIT '.$Page*$PerPage.', '.$PerPage); 13 29 while($Row = $DbResult->fetch_array()) 14 30 { 15 echo( $Row['username'].':'.$Row['text'].'<br>');31 echo('<strong>'.$Row['username'].':</strong> '.$Row['text'].'<br>'); 16 32 } 33 echo('</td></tr></table>'); 17 34 35 $DbResult = $Database->query('SELECT COUNT(*) FROM wow.gm_news'); 36 $Row = $DbResult->fetch_array(); 37 echo(PagesList('?page=', $Page, $Row[0], $PerPage)); 18 38 //echo(phpinfo()); 19 39 } -
administrace/index.php
r185 r186 4 4 if(!array_key_exists('HTTPS', $_SERVER)) 5 5 { 6 Header('Location: https'.substr($_SERVER["SCRIPT_URI"], 4));7 die();6 // Header('Location: https://'.$_SERVER['HTTP_HOST'].substr($_SERVER["SCRIPT_NAME"], 4)); 7 // die(); 8 8 } 9 9 … … 30 30 $Database->select_db('wow'); 31 31 $Database->insert('gm_news', array('author' => $_SESSION['UserId'], 'text' => addslashes($_POST['text']), 'time' => 'NOW()')); 32 echo('Zpráva vloena.<br>');32 //echo('Zpráva vloena.<br>'); 33 33 } 34 34 break; … … 50 50 } 51 51 52 //echo(phpinfo()); 52 53 ShowFooter(); 53 54 -
administrace/user.php
r185 r186 3 3 class User 4 4 { 5 var $SessionTimeout = 20; // minutes5 var $SessionTimeout = 30; // minutes 6 6 7 7 function Check()
Note:
See TracChangeset
for help on using the changeset viewer.