Changeset 186 for administrace


Ignore:
Timestamp:
Jan 1, 2008, 2:22:36 PM (17 years ago)
Author:
george
Message:

Doplnění funkcí a odkazů v administraci. Opět funkční RSS kanály GM zpráv a ticketů(žádanek).

Location:
administrace
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • administrace/home.php

    r185 r186  
    44{
    55  global $Database;
     6 
    67  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 
    719  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>'); 
    1022 
    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);
    1329  while($Row = $DbResult->fetch_array())
    1430  {
    15     echo($Row['username'].': '.$Row['text'].'<br>');
     31    echo('<strong>'.$Row['username'].':</strong> '.$Row['text'].'<br>');
    1632  }
     33  echo('</td></tr></table>');
    1734 
     35  $DbResult = $Database->query('SELECT COUNT(*) FROM wow.gm_news');
     36  $Row = $DbResult->fetch_array();
     37  echo(PagesList('?page=', $Page, $Row[0], $PerPage));
    1838  //echo(phpinfo());
    1939}
  • administrace/index.php

    r185 r186  
    44if(!array_key_exists('HTTPS', $_SERVER))
    55{
    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();
    88}
    99
     
    3030      $Database->select_db('wow');
    3131      $Database->insert('gm_news', array('author' => $_SESSION['UserId'], 'text' => addslashes($_POST['text']), 'time' => 'NOW()'));
    32       echo('Zpráva vložena.<br>');
     32      //echo('Zpráva vložena.<br>');
    3333    }
    3434    break;
     
    5050}
    5151
     52//echo(phpinfo());
    5253ShowFooter();
    5354
  • administrace/user.php

    r185 r186  
    33class User
    44{
    5   var $SessionTimeout = 20; // minutes
     5  var $SessionTimeout = 30; // minutes
    66 
    77  function Check()
Note: See TracChangeset for help on using the changeset viewer.