Changeset 561 for trunk/Modules/Translation/Form.php
- Timestamp:
- Aug 13, 2013, 11:31:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Form.php
r552 r561 16 16 } 17 17 return $Text; 18 } 18 } 19 19 20 20 function Show() 21 21 { 22 $Action = ''; 23 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; 24 25 if($Action == 'delete') $Output = $this->Delete(); 26 else $Output = $this->ShowForm(); 27 return($Output); 28 } 29 30 function ShowForm() 31 { 22 32 global $System, $Config, $User, $TranslationTree; 33 23 34 $Output = ''; 24 35 … … 197 208 } else $Output = ShowMessage('Nebylo zadáno ID.', MESSAGE_CRITICAL); 198 209 return($Output); 210 } 211 212 function Delete() 213 { 214 global $System, $User, $Config; 215 216 if($User->Licence(LICENCE_MODERATOR)) 217 { 218 $TextID = $_GET['ID']; 219 $System->Database->query('DELETE FROM `'.$Table.'` WHERE `ID` = '.$TextID.' AND `Language` <> '.$Config['OriginalLanguage']); 220 $Output = ShowMessage('Překlad byl smazán.'); 221 WriteLog('Překlad byl smazán! <a href="form.php?group='.$GroupID.'&ID='.$TextID.'">'.$TextID.'</a>', LOG_TYPE_MODERATOR); 222 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL); 223 return($Output); 199 224 } 200 225 }
Note:
See TracChangeset
for help on using the changeset viewer.