Changeset 77 for trunk/www/Application/View/Emulator.php
- Timestamp:
- Aug 25, 2009, 1:04:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/View/Emulator.php
r74 r77 47 47 } 48 48 $Output .= $Table->Show(); 49 if($this->System->Modules[' User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)49 if($this->System->Modules['Permission']->Check('Emulator', 'Add')) 50 50 { 51 51 $Output .= '<br /><div style="text-align: center;"><a href="?Module=Emulator&Action=Add">Přidat emulátor</a></dev>'; … … 64 64 $Output .= '<div style="text-align: center">'; 65 65 $Emulator = new Emulator($this->Database, $Id); 66 if($this->System->Modules[' User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)66 if($this->System->Modules['Permission']->Check('Emulator', 'Download', $Emulator->Id)) 67 67 { 68 68 if($Emulator->Emulator['Lock'] == 0) $Output .= ' <a href="?Module=Emulator&Action=Download&Id='.$Id.'">Stáhnout</a>'; 69 } 70 if($this->System->Modules['Permission']->Check('Emulator', 'Compile', $Emulator->Id)) 71 { 69 72 if($Emulator->Emulator['Lock'] == 0) $Output .= ' <a href="?Module=Emulator&Action=Compile&Id='.$Id.'">Přeložit</a>'; 70 73 } … … 75 78 function Add() 76 79 { 77 if($this->System->Modules[' User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)80 if($this->System->Modules['Permission']->Check('Emulator', 'Add')) 78 81 { 79 82 $Form = new Form($this->System, $this->ItemFormClass); … … 87 90 function AddFinish() 88 91 { 89 if($this->System->Modules[' User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)92 if($this->System->Modules['Permission']->Check('Emulator', 'Add')) 90 93 { 91 94 $Form = new Form($this->System, $this->ItemFormClass); … … 102 105 { 103 106 $Emulator = new Emulator($this->Database, $_GET['Id']); 104 $Emulator->Download(); 105 $Output = $this->System->SystemMessage('Stažení emulátoru', 'Úloha zařazena do fronty'); 106 $TaskView = new TaskView($this->System); 107 $Output .= $TaskView->ItemList(); 107 if($this->System->Modules['Permission']->Check('Emulator', 'Download', $Emulator->Id)) 108 { 109 $Emulator->Download(); 110 $Output = $this->System->SystemMessage('Stažení emulátoru', 'Úloha zařazena do fronty'); 111 $TaskView = new TaskView($this->System); 112 $Output .= $TaskView->ItemList(); 113 } else $Output = $this->System->Modules['Permission']->AccessDenied(); 108 114 } else $Output = $this->System->SystemMessage('Stažení emulátoru', 'Nebylo zadáno Id'); 109 115 return($Output); … … 115 121 { 116 122 $Emulator = new Emulator($this->Database, $_GET['Id']); 117 $Emulator->Compile(); 118 $Output = $this->System->SystemMessage('Překlad emulátoru', 'Úloha zařazena do fronty'); 119 $TaskView = new TaskView($this->System); 120 $Output .= $TaskView->ItemList(); 123 if($this->System->Modules['Permission']->Check('Emulator', 'Download', $Emulator->Id)) 124 { 125 $Emulator->Compile(); 126 $Output = $this->System->SystemMessage('Překlad emulátoru', 'Úloha zařazena do fronty'); 127 $TaskView = new TaskView($this->System); 128 $Output .= $TaskView->ItemList(); 129 } else $Output = $this->System->Modules['Permission']->AccessDenied(); 121 130 } else $Output = $this->System->SystemMessage('Překlad emulátoru', 'Nebylo zadáno Id'); 122 131 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.