Changeset 155 for trunk/team.php


Ignore:
Timestamp:
Mar 12, 2009, 1:27:34 PM (16 years ago)
Author:
maron
Message:

Globální hledání

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/team.php

    r142 r155  
    7575echo('<table class="BaseTable">');
    7676
     77if(array_key_exists('search', $_GET))  $_SESSION['Where'] = ' WHERE `name` LIKE "%'.$_GET['search'].'%" OR `description` LIKE "%'.$_GET['search'].'%"';
     78if(array_key_exists('Where', $_GET)) {
     79         $_SESSION['Where'] = ' WHERE '.$_GET['Where'];
     80     if($_GET['Where'] == '') $_SESSION['Where'] = '';     
     81 }
     82else if(!array_key_exists('Where', $_SESSION)) $_SESSION['Where'] = '';
     83
     84if ($_SESSION['Where'] <> '') echo (' <a href="?Where">Zrušit filtr týmů</a><br />');
     85
     86
    7787$desc = $_SESSION['Desc'];
    7888if($desc == '') $desc = 'DESC'; else $desc = '';
     
    91101echo ('</tr>');
    92102
    93 $ID = $Database->SQLCommand('SELECT *,(SELECT count(*) FROM user WHERE team = team.ID) as numberuser FROM team ORDER BY '.$_SESSION['Order'].' '.$_SESSION['Desc'].' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage']);
     103$ID = $Database->SQLCommand('SELECT *,(SELECT count(*) FROM user WHERE team = team.ID) as numberuser FROM team '.$_SESSION['Where'].' ORDER BY '.$_SESSION['Order'].' '.$_SESSION['Desc'].' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage']);
    94104while($Line = mysql_fetch_assoc($ID))
    95105{
Note: See TracChangeset for help on using the changeset viewer.