Changeset 286 for trunk/comparison.php
- Timestamp:
- Dec 22, 2009, 10:22:38 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/comparison.php
r243 r286 10 10 //TODO: barevné porovnání 11 11 //strcasecmp($String1, $String2) == 0 je totožné 12 // 12 // echo $String1.'<br /><br />'; 13 13 $ArrStr1 = explode(' ', $String1); 14 14 $ArrStr2 = explode(' ', $String2); 15 15 16 16 for($i = 0; $i < count($ArrStr1); $i++) 17 17 { 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 18 if(isset($ArrStr2[$i])) 19 { 20 if($ArrStr1[$i] == $ArrStr2[$i]) 21 { 22 echo($ArrStr1[$i].' '); 23 } else 24 { 25 $find = false; 26 for($j = 0; $j < count($ArrStr2); $j++) 27 { 28 if(($ArrStr1[$i] == $ArrStr2[$j]) and ($find == false)) 29 { 30 echo($ArrStr1[$i].' '); 31 $find = true; 32 } 33 } 34 if($find == false) 35 echo('<span class="edit">'.$ArrStr1[$i].' </span>'); 36 } 37 } else echo('<span class="edit">'.$ArrStr1[$i].' </span>'); 38 38 } 39 // 39 // echo $ArrStr1[0]; 40 40 } 41 41 42 if(array_key_exists('group', $_GET)) $GroupId = $_GET['group']; else $GroupId = 1;42 $GroupId = LoadGroupIdParameter(); 43 43 $Table = $TranslationTree[$GroupId]['TablePrefix']; 44 44 … … 48 48 if((array_key_exists('ID1', $_GET)) and ($_GET['ID1'] <> -1)) //porovnání pouze 2 textů 49 49 { 50 51 52 $WhereID = " AND (ID = $TextID1 OR ID = $TextID2 OR Language = 0)";50 $TextID1 = $_GET['ID1']; 51 $TextID2 = $_GET['ID2']; 52 $WhereID = ' AND (ID = '.$TextID1.' OR ID = '.$TextID2.' OR Language = 0)'; 53 53 } else $WhereID = ''; 54 54 … … 57 57 while($Line = mysql_fetch_assoc($DataID)) 58 58 { 59 60 $i = $i + 1; 59 $BuffLine[$i] = $Line; 60 $i = $i + 1; 61 61 } 62 62 // if(!$Line) die('Překlad nenalezen.'); … … 70 70 foreach($Line as $Index => $LineItem) 71 71 { 72 72 $LineUser = mysql_fetch_array($Database->SQLCommand('SELECT * FROM user WHERE id = '.$LineItem['User'])); 73 73 echo('<th>'.$LineUser['user'].'</th>'); 74 74 } … … 78 78 foreach($Line as $Index => $LineItem) 79 79 { 80 80 echo('<td><a href="form.php?group='.$GroupId.'&ID='.$LineItem['ID'].'">'.$LineItem['ID'].'</a></td>'); 81 81 } 82 82 echo('</tr>'); … … 84 84 foreach($Line as $Index => $LineItem) 85 85 { 86 86 echo('<td><a href="form.php?group='.$GroupId.'&ID='.$LineItem['Take'].'">'.$LineItem['Take'].'</a></td>'); 87 87 } 88 88 echo('</tr>'); … … 90 90 foreach($Line as $Index => $LineItem) 91 91 { 92 93 94 92 echo('<td>'); 93 WriteLanguagesWithoutSel($LineItem['Language']); 94 echo('</td>'); 95 95 } 96 96 echo('</tr>'); … … 98 98 foreach($Line as $Index => $LineItem) 99 99 { 100 101 102 100 echo('<td>'); 101 echo (GetVersionWOW($LineItem['VersionStart']).' - '.GetVersionWOW($LineItem['VersionEnd'])); 102 echo('</td>'); 103 103 } 104 104 echo('</tr>'); 105 105 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 106 106 { 107 108 109 110 111 112 113 114 115 116 117 107 if($Line[0][$TextItem['Column']] <> '') 108 { 109 echo('<tr><th>'.$TextItem['Name'].'</th>'); 110 for($i = 0; $i < count($Line); $i++) 111 { 112 if($i > 0) 113 { 114 echo('<td>'); 115 CompareString($Line[$i][$TextItem['Column']],$Line[$i - 1][$TextItem['Column']]); 116 echo('</td>'); 117 } else echo('<td>'.$Line[$i][$TextItem['Column']].'</td>'); 118 118 } 119 echo ('</tr>');119 echo ('</tr>'); 120 120 } 121 121 }
Note:
See TracChangeset
for help on using the changeset viewer.