Changeset 466 for trunk/dictionary.php
- Timestamp:
- Apr 15, 2010, 8:20:31 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dictionary.php
r457 r466 75 75 $DbResult = $System->Database->query('SELECT * FROM '.$Table.' Where ID = '.$TextID); 76 76 $Line = $DbResult->fetch_assoc(); 77 if(!$Line) die('Překlad nenalezen.'); 78 79 $Text = ''; 80 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 81 $Text .= ' '.$Line[$TextItem['Column']]; 82 WriteTranslatNames($Text,$mode); 77 if(!$Line) ShowMessage('Překlad nenalezen.', MESSAGE_CRITICAL); 78 else 79 { 80 $Text = ''; 81 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 82 $Text .= ' '.$Line[$TextItem['Column']]; 83 WriteTranslatNames($Text,$mode); 84 } 83 85 } 84 86 } else … … 123 125 } else 124 126 $System->Database->query('INSERT INTO `Dictionary` ( `Text` , `Entry` , `Description` , `User`, `Language` ) VALUES ("'.$_POST['Translated'].'", "'.$Entry.'", "'.$_POST['Description'].'", '.$User->Id.', '.$_SESSION['language'].')'); 125 echo('Záznam byl uložen!');126 } else echo('Nebyly zaslány všechny položky formuláře.');127 ShowMessage('Záznam byl uložen!'); 128 } else ShowMessage('Nebyly zaslány všechny položky formuláře.', MESSAGE_CRITICAL); 127 129 } else 128 130 if(($_GET['action'] == 'remove') and $User->Licence(LICENCE_USER)) 129 131 { 130 132 $System->Database->query('DELETE FROM `Dictionary` WHERE `User`='.$User->Id.' AND `Language`='.$_SESSION['language'].' AND `Entry`='.$_GET['entry']); 133 ShowMessage('Záznam odstraněn.'); 131 134 } else 132 135 if(($_GET['action'] == 'modify') and $User->Licence(LICENCE_USER)) … … 207 210 { 208 211 if($Line['UserID'] == $User->Id) 209 echo('<td><a href="?action=remove&entry='.$Line['Entry'].'">Smazat</a> <a href="?action=modify&entry='.$Line['Entry'].'">Upravit</a></td>'); 212 echo('<td><a href="?action=remove&entry='.$Line['Entry'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'. 213 ' <a href="?action=modify&entry='.$Line['Entry'].'">Upravit</a></td>'); 210 214 else echo('<td></td>'); 211 215 }
Note:
See TracChangeset
for help on using the changeset viewer.