Changeset 485


Ignore:
Timestamp:
Jun 18, 2010, 7:33:21 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Zahrnutí sloučeného posledního data návštěvy z poddomén.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/banners.php

    r484 r485  
    2424
    2525
    26 $Query = 'SELECT *, (`Hits` + COALESCE((SELECT SUM(`Hits`) FROM `Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `TotalHits` FROM `Referrer` AS `T2` WHERE (`Show`=1) AND (`Parent`=0) AND (`DateLast` > (NOW() - INTERVAL '.$MonthAge.' MONTH))';
     26$Query = 'SELECT * FROM (SELECT *, (`Hits` + COALESCE((SELECT SUM(`Hits`) FROM `Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `TotalHits`, GREATEST(`DateLast`, COALESCE((SELECT MAX(`DateLast`) FROM `Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `MaxDateLast` FROM `Referrer` AS `T2` WHERE (`Show`=1) AND (`Parent`=0)) AS `T3` WHERE (`T3`.`MaxDateLast` > (NOW() - INTERVAL '.$MonthAge.' MONTH))';
    2727 
    2828
     
    3636$TableColumns = array(
    3737  array('Name' => 'Web', 'Title' => 'Adresa'),
    38   array('Name' => 'DateLast', 'Title' => 'Naposledy'),
     38  array('Name' => 'MaxDateLast', 'Title' => 'Naposledy'),
    3939  array('Name' => 'TotalHits', 'Title' => 'Příchodů'),
    4040);
    41 $Order = GetOrderTableHeader($TableColumns, 'DateLast', 1);
     41$Order = GetOrderTableHeader($TableColumns, 'MaxDateLast', 1);
    4242echo($Order['Output']);
    4343
     
    4848{
    4949  echo('<tr><td><a href="'.$Line['LastURL'].'">'.$Line['Web'].'</a></td>'.
    50     '<td>'.HumanDate($Line['DateLast']).'</td>'.
     50    '<td>'.HumanDate($Line['MaxDateLast']).'</td>'.
    5151    '<td>'.$Line['TotalHits'].'</td></tr>');
    5252}
Note: See TracChangeset for help on using the changeset viewer.