Changeset 213 for trunk/log.php


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/log.php

    r136 r213  
    3232} else
    3333{
    34   if(array_key_exists('type', $_GET)) $Type = '&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.