Changeset 141 for index.php


Ignore:
Timestamp:
Nov 23, 2007, 11:20:39 PM (17 years ago)
Author:
george
Message:

Opraveno: Výběry oddělené databáze characters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • index.php

    r126 r141  
    11<?php
    2   include('global.php');
    3   include('news.php');
    4   ShowHeader();
    5   echo('<TABLE width="100%" border="0">
     2
     3function Events()
     4{
     5  global $Database;
     6  $Database->select_db('mangos');
     7  $DbResult = $Database->select('game_event', '*,UNIX_TIMESTAMP(start) as start', 'end > NOW() AND start < NOW()');
     8  $Result = '<strong>Probíhající události ve høe:</strong><br>';
     9  while($Row = $DbResult->fetch_array())
     10  {
     11    $Start = floor((time() - $Row['start']) / ($Row['occurence'] * 60)) * $Row['occurence'] + $Row['start'];
     12    $End = $Start + $Row['length'] * 60;
     13    $Result .= $Row['description'].' '.date('H:i:s j.n.Y', $Start).' '.date('H:i:s j.n.Y', $End).'<br>';   
     14  }
     15 
     16  return($Result);
     17}
     18
     19include('global.php');
     20include('news.php');
     21ShowHeader();
     22echo('<TABLE width="100%" border="0">
    623  <TR>
    724    <TD id="MainCell" valign="top">
     
    1532<tr><td width="60%" valign="top">');
    1633
     34
    1735echo(ShowNews());
    1836echo('
    19 </td><td id="EmuInfo" valign="top">
    20 <br>
     37</td><td id="EmuInfo" valign="top">');
     38
     39// Second column
     40
     41//echo(Events());
     42
     43echo('<br>
    2144<div align="center">
    2245<table class="MiniTable" border="1" cellspacing="0" cellpadding="2">
     
    3861
    3962echo('</a></td></tr>
     63
    4064<tr><th>Návod</th><td><a href="jak_zacit.php">zde</a></td></tr>
    4165<tr><th>Stav registrací</th><td>');
     
    6892<tr><th>Postav</th><td>');
    6993
    70 $Database->select_db('mangos');
     94$Database->select_db('characters');
    7195$Result = $Database->select('character', 'COUNT(*)');
    7296$Row = $Result->fetch_array();
Note: See TracChangeset for help on using the changeset viewer.