Changeset 404 for administrace


Ignore:
Timestamp:
Jan 28, 2009, 11:23:01 AM (16 years ago)
Author:
george
Message:
  • Upraveno: Názvy databází MaNGOSu přesunuty do konfiguračního souboru a odkazované skripty upraveny k použití těchto proměnných.
Location:
administrace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • administrace/global.php

    r362 r404  
    44
    55// Configuration
    6 $MangosConfFile = '/a/mangos/etc/mangosd.conf';
    7 $StdOutLogFile = '/a/log/mangos/mangos-worldd.log';
    8 $ErrOutLogFile = '/a/log/mangos/mangos-worldd.err';
    9 $MangosLogFile = '/a/log/mangos/Server.log';
    10 $MangosDbErrorsLogFile = '/a/log/mangos/DBErrors.log';
     6$MangosConfFile = '/a/mangos1/etc/mangosd.conf';
     7$StdOutLogFile = '/a/mangos1/log/mangos-worldd.log';
     8$ErrOutLogFile = '/a/mangos1/log/mangos-worldd.err';
     9$MangosLogFile = '/a/mangos1/log/Server.log';
     10$MangosDbErrorsLogFile = '/a/mangos1/log/DBErrors.log';
    1111$ItemPerPage = 35;
    1212
  • administrace/home.php

    r389 r404  
    33function Show()
    44{
    5   global $Database;
     5  global $Database, $Config;
    66 
    77  echo('<h3>Správa serveru</h3>');
     
    1111  echo('<a href="gm_rules.php">Pravidla pro GM</a><br>');
    1212  echo('</td><td valign="top">');
    13   echo('<a href="http://game.zdechov.net/statistic/">Statistiky provozu</a><br>');
     13  echo('<a href="http://stat.zdechov.net/game/">Statistiky provozu</a><br>');
    1414  echo('<a href="../navody/">Návody</a><br>');
    1515  echo('<a href="../db/index.php?id=bugreport">Bug report</a>');
     
    2929
    3030  echo('<table class="TableAdmin" cellspacing="0" width="100%" style="color: white;" border="1">');
    31   $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);
     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);
    3232  while($Row = $DbResult->fetch_array())
    3333  {
  • administrace/process_log.php

    r371 r404  
    2222
    2323// Get used database version from database
    24 $DbResult = $Database->query('SELECT * FROM `mangos`.`db_version`');
     24$DbResult = $Database->query('SELECT * FROM `'.$Config['Mangos']['DatabaseMangos'].'`.`db_version`');
    2525$DbRow = $DbResult->fetch_array();
    2626$DbVersion = $DbRow['version'];
    2727
    2828// Get last uptime info
    29 $DbResult = $Database->query('SELECT * FROM `mangos`.`uptime` ORDER BY `starttime` DESC LIMIT 1');
     29$DbResult = $Database->query('SELECT * FROM `'.$Config['Mangos']['DatabaseMangos'].'`.`uptime` ORDER BY `starttime` DESC LIMIT 1');
    3030echo($Database->error);
    3131$DbRow = $DbResult->fetch_array();
  • administrace/rss_tickets.php

    r389 r404  
    77// Get news from database by selected categories
    88$Items = array();
    9 $Database->select_db('characters');
     9$Database->select_db($Config['Mangos']['DatabaseCharacters']);
    1010$DbResult = $Database->query("SELECT `character_ticket`.`ticket_text` AS `text`, `characters`.`name` AS `name` FROM `character_ticket` JOIN `characters` ON `characters`.`guid` = `character_ticket`.`guid`");
    1111while($Row = $DbResult->fetch_array())
  • administrace/user.php

    r389 r404  
    2323  function Login($Username, $Password)
    2424  {
     25    global $Config;
    2526    global $Database;
    26     $Database->select_db('realmd');
     27    $Database->select_db($Config['Mangos']['DatabaseRealmd']);
    2728    $DbResult = $Database->select('account', 'Id,username', '(gmlevel > 0) AND (username = "'.$Username.'") AND (sha_pass_hash = SHA1(CONCAT(UCASE("'.$Username.'"),":",UCASE("'.$Password.'"))))');
    2829    if($DbResult->num_rows > 0)
Note: See TracChangeset for help on using the changeset viewer.