Changeset 349 for trunk/save.php
- Timestamp:
- Mar 3, 2010, 10:37:40 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/save.php
r321 r349 19 19 else $complete = 0; 20 20 21 $DbResult = $Database->SQLCommand('SELECT * FROM '.$Table.' WHERE Language = 0 AND entry = '.$entry);21 $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`Language` = 0) AND (`entry` = '.$entry.')'); 22 22 if(mysql_num_rows($DbResult) == 0) ErrorMessage('Neznámé Id položky'); 23 23 $LineAJ = mysql_fetch_array($DbResult); 24 $LineTake = mysql_fetch_array($Database->SQLCommand('SELECT VersionEnd,VersionStart FROM '.$Table.' WHERE ID= '.$TextID));24 $LineTake = mysql_fetch_array($Database->SQLCommand('SELECT `VersionEnd`, `VersionStart` FROM `'.$Table.'` WHERE `ID` = '.$TextID)); 25 25 if(mysql_num_rows($DbResult) == 0) ErrorMessage('Neznámé Id položky'); 26 $DbResult = $Database->SQLCommand('SELECT * FROM '.$Table.' WHERE user='.$UserID.' AND entry = '.$entry.' AND VersionStart = '.$LineTake['VersionStart'].' AND VersionEnd = '.$LineTake['VersionEnd']);26 $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`user`='.$UserID.') AND (`entry` = '.$entry.') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')'); 27 27 $Line = mysql_fetch_array($DbResult); 28 28 if(!$Line) … … 69 69 while($SameTranLine = mysql_fetch_assoc($SameTranID)) 70 70 { 71 $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM '.$Table.' WHERE user='.$UserID.' AND entry = '.$SameTranLine['entry'].' AND VersionStart = '.$LineTake['VersionStart'].' AND VersionEnd = '.$LineTake['VersionEnd']));71 $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`user`='.$UserID.') AND (`entry` = '.$SameTranLine['entry'].') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')')); 72 72 if(!$Line) 73 73 { … … 93 93 94 94 // Konec kontrolování stejných textů 95 95 96 96 echo('Překlad <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a> ('.$entry.') uložen!<br />'); 97 97 foreach($LastIDs as $LastID) 98 98 { 99 99 if(count($LastIDs) > 1) echo('Nalezen stejný překlad, systémově přeložen: <a href="form.php?group='.$GroupId.'&ID='.$LastID.'">'.$LastID.'</a> Převzat z: <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a><br />'); 100 WriteLog('Text <a href="form.php?group='.$GroupId.'&ID='.$LastID.'">'.$LastID.'</a> ze skupiny <a href=" ?group='.$GroupId.'&action=filter">'.$TranslationTree[$GroupId]['Name'].'</a> uložen! Převzat z <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a>.', 1);100 WriteLog('Text <a href="form.php?group='.$GroupId.'&ID='.$LastID.'">'.$LastID.'</a> ze skupiny <a href="TranslationList.php?group='.$GroupId.'&action=filter">'.$TranslationTree[$GroupId]['Name'].'</a> uložen! Převzat z <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a>.', 1); 101 101 } 102 102 } else … … 106 106 if(array_key_exists($GroupItem['Column'], $_POST)) 107 107 $sql .= ', `'.$GroupItem['Column'].'`="'.$_POST[$GroupItem['Column']].'"'; 108 $sql .= ', `Language` = '.$Language.' WHERE `ID` = '.$TextID.' AND `Language` 108 $sql .= ', `Language` = '.$Language.' WHERE `ID` = '.$TextID.' AND `Language` <> 0'; 109 109 //echo($sql); 110 110 $Database->SQLCommand($sql); … … 116 116 echo('<br />Překládat: <a href="TranslationList.php?group='.$GroupId.'&action=notran">Nepřeložené</a> '); 117 117 118 $prev = FollowingTran($TextID, $Table,$GroupId, True);119 $next = FollowingTran($TextID, $Table,$GroupId);118 $prev = FollowingTran($TextID, $Table, $GroupId, True); 119 $next = FollowingTran($TextID, $Table, $GroupId); 120 120 echo('<br /><br />'); 121 121 $redirecting = mysql_fetch_assoc($Database->SQLCommand('SELECT `redirecting` FROM `user` WHERE `ID`='.$UserID));
Note:
See TracChangeset
for help on using the changeset viewer.