Changeset 80 for trunk/comparison.php


Ignore:
Timestamp:
Feb 10, 2009, 3:22:31 PM (16 years ago)
Author:
maron
Message:

Porovnávání dvou vybraných, odkaz na porovnávání

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/comparison.php

    r79 r80  
    4343  $Textentry = $_GET['entry']; 
    4444
    45   $DataID = $Database->SQLCommand('SELECT * FROM '.$Table.' Where entry = '.$Textentry);
     45
     46        if ((array_key_exists('ID1', $_GET)) and ($_GET['ID1'] <> -1)) { //porovnání pouze 2 textů
     47                $TextID1 = $_GET['ID1']; 
     48                $TextID2 = $_GET['ID2']; 
     49                $WhereID = " AND (ID = $TextID1 OR ID = $TextID2 OR Language = 0)";     
     50        } else $WhereID = '';
     51
     52  $DataID = $Database->SQLCommand('SELECT * FROM '.$Table.' Where entry = '.$Textentry.$WhereID);
    4653  $i = 0;
    4754  while($Line = mysql_fetch_assoc($DataID)) {
     
    8693        <th>'.$TextItem['Name'].'</th>');
    8794          for ($i = 0; $i < count($Line); $i++) {
    88         if ($i >= 1) {
     95        if ($i > 1) {
    8996          echo ('<td>');
    9097          CompareString($Line[$i][$TextItem['Column']],$Line[$i-1][$TextItem['Column']]);
Note: See TracChangeset for help on using the changeset viewer.