Changeset 213


Ignore:
Timestamp:
Jun 20, 2009, 4:40:20 PM (16 years ago)
Author:
maron
Message:

Oprava zobrazování logu při přepínání stránek

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/action.php

    r212 r213  
    3636        echo('<tr><td><a href="download.php?addon">Čeština pro klienta</a></td><td>'.$Line[0].'</td></tr>');
    3737        echo('<tr><td><a href="aowow/?search='.$Search.'">Vyhledávací databáze AoWoW</a></td></tr>');
    38         $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `dictionary` WHERE (`Text` LIKE "%'.$Search.'%" OR `Description` LIKE "%'.$Search.'%") AND Language = 1'));
     38        $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `dictionary` WHERE (`Text` LIKE "%'.$Search.'%" OR `Description` LIKE "%'.$Search.'%") AND Language = 0'));
    3939        echo('<tr><td><a href="dictionary.php?search='.$Search.'">Slovníček</a></td><td>'.$Line[0].'</td></tr>');
    4040 
  • trunk/log.php

    r136 r213  
    3232} else
    3333{
    34   if(array_key_exists('type', $_GET)) $Type = '&amp;type='.$_GET['type'];
    35     else $Type = '';
     34  if(array_key_exists('Page', $_GET)) $_SESSION['Page'] = $_GET['Page'];
     35  else if(!array_key_exists('Page', $_SESSION)) $_SESSION['Page'] = 1;
     36
     37  if(array_key_exists('type', $_GET)) $_SESSION['type'] = $_GET['type'];
     38  else if(!array_key_exists('type', $_SESSION)) $_SESSION['type'] = '';
    3639 
     40  if($_SESSION['type'] <> '') $Type = '&amp;type='.$_SESSION['type'];
     41    else {
     42                 $Type = '';
     43                 unset($_SESSION['type']);
     44        }
     45         
    3746  $RSSChannels = array(array('Title' => 'Záznamy změn', 'URL' => 'log.php?rss'.$Type));
    3847  ShowPage();
    3948 
    40   if(array_key_exists('Page', $_GET)) $_SESSION['Page'] = $_GET['Page'];
    41   else if(!array_key_exists('Page', $_SESSION)) $_SESSION['Page'] = 1;
    4249
    4350  echo('<strong>Filtr: </strong>');
    44   echo('<span style="color:black"><a href="log.php" title="Bez filtrování">Všechny</a></span> ');
     51  echo('<span style="color:black"><a href="log.php?type=" title="Bez filtrování">Všechny</a></span> ');
    4552  foreach($LogTypes as $Index => $LogItem)
    4653  {
     
    5158  echo('<br /><br />');
    5259
    53   if(array_key_exists('type', $_GET)) $Where = ' WHERE type = "'.$_GET['type'].'"';
     60  if(array_key_exists('type', $_SESSION)) $Where = ' WHERE type = "'.$_SESSION['type'].'"';
    5461    else $Where = '';
    5562  $sql = 'SELECT *,(SELECT user.user FROM user WHERE user.id = log.user) as user FROM log '.$Where.'ORDER BY date DESC LIMIT '.(($_SESSION['Page'] - 1)*100).',100';
Note: See TracChangeset for help on using the changeset viewer.