Changeset 85 for trunk/save.php
- Timestamp:
- Feb 11, 2009, 6:57:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/save.php
r71 r85 20 20 else $complete = 0; 21 21 22 if(array_key_exists('Repair', $_POST) and Licence(1))23 {24 $Line = mysql_fetch_array($Database->SQLCommand('SELECT user FROM '.$Table.' Where ID = '.$TextID));25 $UserID = $Line['user'];26 $complete = 1;27 WriteLog($TranslationTree[$GroupId]['Name'].' '.$entry.' Opraven moderátorem! <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a>', 4);28 }29 30 22 //if(( == '') AND ($complete == 1)) die('Musite zadat název textu'); 31 23 … … 45 37 //echo('INSERT INTO `'.$Table.'` ('.$Columns.') VALUES ('.$Values.')'); 46 38 $Database->SQLCommand('INSERT INTO `'.$Table.'` ('.$Columns.') VALUES ('.$Values.')'); 47 $LastID = mysql_insert_id();39 $LastID = mysql_insert_id(); 48 40 echo('Překlad <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a> uložen!<br />'); 49 41 WriteLog($TranslationTree[$GroupId]['Name'].' <a href="form.php?group='.$GroupId.'&ID='.$LastID.'">'.$LastID.'</a> uložen! Převzat z: <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a>', 1); … … 51 43 { 52 44 $sql = 'UPDATE '.$Table.' SET `Complete` = '.$complete; 53 foreach($TranslationTree[$GroupId]['Items'] as $GroupItem)45 foreach($TranslationTree[$GroupId]['Items'] as $GroupItem) 54 46 $sql .= ', `'.$GroupItem['Column'].'`="'.@$_POST[$GroupItem['Column']].'"'; 55 $sql .= ', `Language` = '.$Language.' WHERE ID = '.$TextID.' AND Language <> 0';47 $sql .= ', `Language` = '.$Language.' WHERE ID = '.$TextID.' AND Language <> 0'; 56 48 //echo($sql); 57 49 $Database->SQLCommand($sql); … … 59 51 echo('Změny v překladu: <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a> uloženy!<br />'); 60 52 WriteLog('Změny v překladu: '.$entry.' uloženy! <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a>', 1); 61 $type_translation = 1;62 $ID_translation = $TextID;63 $Database->SQLCommand("DELETE FROM tag WHERE ID_translation = $ID_translation AND type_translation = $type_translation");64 53 } 65 54
Note:
See TracChangeset
for help on using the changeset viewer.