Changeset 538 for trunk/dictionary.php
- Timestamp:
- May 14, 2013, 9:21:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dictionary.php
r533 r538 130 130 if($User->Licence(LICENCE_USER)) 131 131 { 132 $System->Database->query('DELETE FROM `Dictionary` WHERE (`User`='.$User->Id.') AND (`Id`='. $_GET['id'].')');132 $System->Database->query('DELETE FROM `Dictionary` WHERE (`User`='.$User->Id.') AND (`Id`='.($_GET['id'] * 1).')'); 133 133 $Output = ShowMessage('Záznam odstraněn.'); 134 134 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL); … … 142 142 if($User->Licence(LICENCE_USER)) 143 143 { 144 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE `Id`='.$_GET['id']); 145 $DbRow = $DbResult->fetch_assoc(); 146 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE (`User` IS NULL) '. 147 'AND (`Entry`='.$DbRow['Entry'].') AND (`Language`= '.$Config['OriginalLanguage'].')'); 148 $DbRow2 = $DbResult->fetch_assoc(); 149 $Output = '<form action="dictionary.php?action=save" method="post">'. 144 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE `Id`='.($_GET['id'] * 1)); 145 if($DbResult->num_rows > 0) 146 { 147 $DbRow = $DbResult->fetch_assoc(); 148 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE (`User` IS NULL) '. 149 'AND (`Entry`='.$DbRow['Entry'].') AND (`Language`= '.$Config['OriginalLanguage'].')'); 150 $DbRow2 = $DbResult->fetch_assoc(); 151 $Output = '<form action="dictionary.php?action=save" method="post">'. 150 152 '<fieldset><legend>Upravení slova</legend>'. 151 153 '<input type="hidden" name="id" value="'.$_GET['id'].'"/>'. … … 159 161 '</fieldset>'. 160 162 '</form>'; 163 } else $Output = ShowMessage('Položka nenalezena', MESSAGE_CRITICAL); 161 164 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL); 162 165 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.