Changeset 199 for trunk/dictionary.php


Ignore:
Timestamp:
Jun 5, 2009, 7:08:55 PM (16 years ago)
Author:
george
Message:
  • Přidáno: Zapomenutí SQL aktualizace k minulému commitu.
  • Opraveno: Zvýraznění aktuální stránky v seznamu čísel stránek.
  • Opraveno: Správné zobrazení položek na stránky ve slovníčku.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dictionary.php

    r198 r199  
    211211    }
    212212  echo('</td></tr>');
    213   echo('<tr><td>
    214   <div style="overflow: auto; width: 100%; height: 100%;">');
     213  echo('<tr><td>');
     214  //<div style="overflow: auto; width: 100%; height: 100%;">');
    215215
    216216  if($Search <> '')
     
    218218    $sql = 'SELECT `user`.`user` AS `UserName`, `user`. `ID` AS `UserID`, `T3`.`Entry`, `T3`.`Original`, `T3`.`Translated`, `T3`.`Description` FROM (SELECT T2.User, `T1`.Language, `T1`.`Text` AS Original, `T2`.`Text` AS `Translated`, `T2`.`Description`, `T1`.`Entry` AS `Entry` FROM `dictionary` AS `T1` JOIN `dictionary` AS `T2` ON `T2`.`Entry` = `T1`.`Entry` AND `T2`.`Language` = '.$_SESSION['language'].' WHERE LOWER(T1.Text) LIKE LOWER("%'.$Search.'%") OR LOWER(T1.Description) LIKE LOWER("%'.$Search.'%") ) AS T3 JOIN `user` ON `user`.`ID` = `T3`.`User` WHERE `T3`.`Language` = 0';
    219219  } else $sql = 'SELECT `user`.`user` AS `UserName`, `ID` AS `UserID`, `T3`.`Entry`, `T3`.`Original`, `T3`.`Translated`, `T3`.`Description` FROM (SELECT T2.User, `T1`.Language, `T1`.`Text` AS Original, `T2`.`Text` AS `Translated`, `T2`.`Description`, `T1`.`Entry` AS `Entry` FROM `dictionary` AS `T1` JOIN `dictionary` AS `T2` ON `T2`.`Entry` = `T1`.`Entry` AND `T2`.`Language` = '.$_SESSION['language'].') AS T3 JOIN `user` ON `user`.`ID` = `T3`.`User` WHERE `T3`.`Language` = 0';
    220   $sql .= ' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage'];
     220  $sql_page = $sql.' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage'];
    221221
    222222  ListPaging('?Page=', '('.$sql.') AS T1', '', $Config['Web']['ItemsPerPage'], $_SESSION['Page']);
     
    227227    if(Licence(LICENCE_USER)) echo('<th>Akce</th>');
    228228    echo('</tr>');
    229   $ID = $Database->SQLCommand($sql);
     229  $ID = $Database->SQLCommand($sql_page);
    230230  while ($Line = mysql_fetch_assoc($ID))
    231231  {
     
    245245  echo('</table>'); 
    246246  ListPaging('?Page=', '('.$sql.') AS T1', '', $Config['Web']['ItemsPerPage'], $_SESSION['Page']);
    247   echo('</div></td></tr>');
     247  echo('</td></tr>');
    248248  echo('</table></form>');
    249249}
Note: See TracChangeset for help on using the changeset viewer.