Lines Matching refs:manager
17 var $manager = null; variable in dokuwiki_farm_animalmanager
23 function __construct($manager) { argument
24 $this->manager = & $manager;
34 return $this->manager->wl('animal', $a);
42 if(isset($this->manager->opt['new'])) {
43 if(isset($this->manager->opt['save'])) {
45 $this->manager->error('system_errors', 'system_badtoken_failure');
52 $this->manager->success('animal_new_create_success');
53 unset($this->manager->opt['save']);
54 unset($this->manager->opt['new']);
55 $this->manager->opt['aid'] = $n;
58 $this->manager->error('animal_new_errors', 'animal_new_noname_failure');
65 if(!isset($this->manager->opt['aid'])) {
66 $this->manager->error('animal_errors', 'animal_noid_failure');
69 if(!dokuwiki_farm_animal::exists($this->manager->opt['aid'])) {
70 …$this->manager->error('animal_errors', array('code' => 'animal_unknownanimal_failure', 'data' => a…
73 $this->animal = new dokuwiki_farm_animal($this->manager->opt['aid'], $this->manager);
77 !isset($this->manager->opt['status']) &&
78 !isset($this->manager->opt['lockstate']) &&
79 …!(isset($this->manager->opt['users']) && (isset($this->manager->opt['save']) || isset($this->manag…
80 …isset($this->manager->opt['editfile']) && isset($this->manager->opt['save']) && isset($this->manag…
81 …et($this->manager->opt['editfile']) && isset($this->manager->opt['create']) && isset($this->manage…
82 …!(isset($this->manager->opt['delete']) && (isset($this->manager->opt['confirm']) || isset($this->m…
87 $this->manager->error('system_errors', 'system_badtoken_failure');
92 if(isset($this->manager->opt['status'])) {
93 $s = $this->manager->opt['status'];
96 …$this->manager->error('animal_status_errors', array('code' => 'animal_status_update_failure', 'dat…
97 }else $this->manager->success('animal_status_update_success');
100 if(isset($this->manager->opt['lockstate'])) {
101 $s = $this->manager->opt['lockstate'];
104 …$this->manager->error('animal_status_errors', array('code' => 'animal_status_update_failure', 'dat…
105 }else $this->manager->success('animal_status_update_success');
110 if(isset($this->manager->opt['users']) && isset($this->manager->opt['save'])) {
112 $this->manager->error('animal_users_errors', 'postparametermissing_failure');
114 …$this->manager->error('animal_users_errors', array('code' => 'emptyfield_failure', 'data' => array…
116 …$this->manager->error('animal_users_errors', array('code' => 'emptyfield_failure', 'data' => array…
118 …$this->manager->error('animal_users_errors', array('code' => 'emptyfield_failure', 'data' => array…
128 …$this->manager->error('animal_users_errors', array('code' => 'invalidfield_failure', 'data' => arr…
130 …$this->manager->error('animal_users_errors', array('code' => 'invalidfield_failure', 'data' => arr…
132 …$this->manager->error('animal_users_errors', array('code' => 'invalidfield_failure', 'data' => arr…
134 …$this->manager->error('animal_users_errors', array('code' => 'invalidfield_failure', 'data' => arr…
136 …$this->manager->error('animal_users_errors', array('code' => 'invalidfield_failure', 'data' => arr…
139 $this->manager->success('animal_users_add_success');
140 }else $this->manager->error('animal_users_errors', 'animal_users_add_create_failure');
147 if(isset($this->manager->opt['users']) && isset($this->manager->opt['deleteuser'])) {
148 if($this->animal->deleteUser(base64_decode($this->manager->opt['deleteuser']))) {
149 $this->manager->success('animal_users_delete_success');
150 }else $this->manager->error('animal_users_errors', 'animal_users_delete_failure');
154 …isset($this->manager->opt['editfile']) && isset($this->manager->opt['save']) && isset($this->manag…
155 if(isset($this->manager->opt['editfile_delete'])) {
156 if($this->animal->setFileContent(base64_decode($this->manager->opt['file']), '', true)) {
157 $this->manager->success('animal_editfile_delete_success');
158 $this->manager->opt['file'] = null;
159 }else $this->manager->error('animal_editfile_errors', 'animal_editfile_delete_failure');
160 …}elseif(isset($_POST['animal_file']) && (isset($this->manager->opt['editfile_saveempty']) || !empt…
161 …if($this->animal->setFileContent(base64_decode($this->manager->opt['file']), isset($this->manager-…
162 $this->manager->success('animal_editfile_save_success');
163 }else $this->manager->error('animal_editfile_errors', 'animal_editfile_save_failure');
164 }else $this->manager->error('animal_editfile_errors', 'animal_editfile_save_failure');
166 …et($this->manager->opt['editfile']) && isset($this->manager->opt['create']) && isset($this->manage…
167 if($this->animal->setFileContent($this->manager->opt['file'], '')) {
168 $this->manager->success('animal_editfile_save_success');
169 $this->manager->opt['file'] = base64_encode($this->manager->opt['file']);
170 }else $this->manager->error('animal_editfile_errors', 'animal_editfile_save_failure');
174 if(isset($this->manager->opt['delete']) && isset($this->manager->opt['cancel'])) {
175 if(isset($this->manager->opt['confirm'])) unset($this->manager->opt['confirm']);
176 unset($this->manager->opt['delete']);
178 if(isset($this->manager->opt['delete']) && isset($this->manager->opt['confirm'])) {
179 if($this->animal->getName() == $this->manager->conf['animaltemplate']) {
180 …$this->manager->error('animal_delete_errors', array('code' => 'animal_delete_tpl_failure', 'data' …
182 $this->manager->success('animal_delete_success');
184 unset($this->manager->opt['delete']);
185 unset($this->manager->opt['confirm']);
186 unset($this->manager->opt['aid']);
187 …}else $this->manager->error('animal_delete_errors', array('code' => 'animal_delete_failure', 'data…
195 …set($this->manager->opt['config']) && !isset($this->manager->opt['users']) && !isset($this->manage…
200 … 'class="current_action"' : '').' href="'.$this->wl().'" title="'.$this->manager->getLang('animal_…
201 …isset($this->manager->opt['users']) ? 'class="current_action"' : '').' href="'.$this->wl(array('us…
202 …et($this->manager->opt['editfile']) ? 'class="current_action"' : '').' href="'.$this->wl(array('ed…
203 …sset($this->manager->opt['delete']) ? 'class="current_action"' : '').' href="'.$this->wl(array('de…
204 …ptln(' <a href="'.$this->animal->getUrl().'" target="_blank" title="'.$this->manager->getLang('vis…
213 …set($this->manager->opt['config']) && !isset($this->manager->opt['users']) && !isset($this->manage…
218 if($this->manager->conf['animalmaxsize'] > 0) {
220 $p = $s / $this->manager->conf['animalmaxsize'];
224 …manager->getLang('animal_info_size').' : <span class="size_disp" style="background-color:rgb('.$r.…
226 …if($this->manager->conf['animalmaxsize'] <= 0) ptln(' '.$this->manager->getLang('animal_info_siz…
230 …is->manager->getLang('animal_info_status').' : <select onmouseover="if(!this.i)this.i=this.selecte…
231 …($status == 'open' ? 'selected="selected"' : '').' value="open">'.$this->manager->getLang('animal_…
232 …aintenance' ? 'selected="selected"' : '').' value="maintenance">'.$this->manager->getLang('animal_…
233 …atus == 'closed' ? 'selected="selected"' : '').' value="closed">'.$this->manager->getLang('animal_…
234 …status == 'abuse' ? 'selected="selected"' : '').' value="abuse">'.$this->manager->getLang('animal_…
238 …s->manager->getLang('animal_info_lockstate').' : <select onmouseover="if(!this.i)this.i=this.selec…
239 …ptln(' <option '.($lockstate == '' ? 'selected="selected"' : '').' value="">'.$this->manager->g…
240 …kstate == 'edits' ? 'selected="selected"' : '').' value="edits">'.$this->manager->getLang('animal_…
241 …kstate == 'admin' ? 'selected="selected"' : '').' value="admin">'.$this->manager->getLang('animal_…
242 …$lockstate == 'all' ? 'selected="selected"' : '').' value="all">'.$this->manager->getLang('animal_…
245 …ptln(' '.$this->manager->getLang('animal_info_creation').' : '.$this->animal->getInfos()->getCre…
248 ptln(' '.$this->manager->getLang('animal_info_pages'.$k).' : '.$i.'<br />');
252 ptln(' '.$this->manager->getLang('animal_info_medias'.$k).' : '.$i.'<br />');
255 …ptln(' '.$this->manager->getLang('animal_info_cachesize').' : '.$this->animal->getInfos()->getSi…
256 …ptln(' '.$this->manager->getLang('animal_info_indexsize').' : '.$this->animal->getInfos()->getSi…
261 if(isset($this->manager->opt['users']) && $this->animal) {
263 ptln(' '.$this->manager->getLang('animal_users'));
267 ptln(' '.$this->manager->getLang('animal_users_warning'));
270 $sort = isset($this->manager->opt['sort']) ? $this->manager->opt['sort'] : 'name';
271 $grp = isset($this->manager->opt['grp']) ? $this->manager->opt['grp'] : null;
278 …if($grp) ptln($this->manager->getLang('animal_users_onlygrpactive').' : '.$grp.' [<a href="'.$this…
281 …manager->getLang('animal_users_login').' <a href="'.$this->wl(array('users' => true, 'grp' => $grp…
282 ptln(' <th>'.$this->manager->getLang('animal_users_name').'</th>');
283 ptln(' <th>'.$this->manager->getLang('animal_users_mail').'</th>');
284 ptln(' <th>'.$this->manager->getLang('animal_users_grps').'</th>');
290 …ref="'.$this->wl(array('users' => true, 'grp' => $g)).'" title="'.$this->manager->getLang('animal_…
296 …manager->getLang('animal_users_reallydeleteuser', $l, 'js').'\')) document.location=\''.$this->wl(…
301 …$this->manager->formHead(array('farm_cmd' => 'animal', 'farm_opt[aid]' => $this->animal->getName()…
302 ptln(' <br /><b>'.$this->manager->getLang('animal_users_add').'</b><br />');
303 …ptln(' '.$this->manager->getLang('animal_users_login').' : <input type="text" name="new_animal_use…
304 …ptln(' '.$this->manager->getLang('animal_users_pass').' : <input type="text" name="new_animal_user…
305 …ptln(' '.$this->manager->getLang('animal_users_name').' : <input type="text" name="new_animal_user…
306 …ptln(' '.$this->manager->getLang('animal_users_mail').' : <input type="text" name="new_animal_user…
307 …ptln(' '.$this->manager->getLang('animal_users_grps').' : <input type="text" name="new_animal_user…
308 …ptln(' <input type="submit" name="farm_opt[save]" value="'.$this->manager->getLang('btn_create').'…
313 if(isset($this->manager->opt['editfile']) && $this->animal) {
315 ptln(' '.$this->manager->getLang('animal_editfile'));
319 ptln(' '.$this->manager->getLang('animal_change_warning'));
322 $file = isset($this->manager->opt['file']) ? base64_decode($this->manager->opt['file']) : null;
327 ptln(' '.$this->manager->getLang('animal_editfile_fs', $this->animal->getName()));
334 …ptln('<div class="file_infos">('.$this->animal->getInfos()->formatedprint($this->manager->getLang(…
339 …$this->manager->formHead(array('farm_cmd' => 'animal', 'farm_opt[aid]' => $this->animal->getName()…
340 …ptln($this->manager->getLang('animal_editfile_create').' : <input type="text" id="editfile_path" n…
341 …ptln(' <input type="submit" name="farm_opt[create]" value="'.$this->manager->getLang('btn_create')…
345 …$this->manager->formHead(array('farm_cmd' => 'animal', 'farm_opt[aid]' => $this->animal->getName()…
346 …ptln(' <a name="animal_editfile"></a>'.$this->manager->getLang('animal_editfile_file', $file).'<br…
348 …ptln(' <input type="checkbox" name="farm_opt[editfile_saveempty]" /> '.$this->manager->getLang('an…
349 …ptln(' <input type="checkbox" name="farm_opt[editfile_delete]" /> '.$this->manager->getLang('anima…
350 …ptln(' <input type="submit" name="farm_opt[save]" value="'.$this->manager->getLang('btn_save').'" …
356 if(isset($this->manager->opt['new'])) {
358 ptln(' '.$this->manager->getLang('animal_new_title'));
361 $this->manager->formHead(array('farm_cmd' => 'animal', 'farm_opt[new]' => 1));
362 …ptln(' '.$this->manager->getLang('animal_new_name').' : <i>'.$this->manager->conf['farmwebroot'].'…
363 ptln(' '.$this->manager->getLang('animal_new_template').' : <select name="animal_template">');
364 …_animal::listAnimals() as $a) ptln(' <option '.($a->getName() == $this->manager->conf['animaltemp…
366 …if($this->manager->conf['virtual']) ptln(' '.$this->manager->getLang('animal_new_host').' : <input…
367 …ptln(' <input type="submit" name="farm_opt[save]" value="'.$this->manager->getLang('btn_create').'…
372 if(isset($this->manager->opt['delete'])) {
374 ptln(' '.$this->manager->getLang('animal_delete'));
377 …$this->manager->formHead(array('farm_cmd' => 'animal', 'farm_opt[aid]' => $this->animal->getName()…
378 …manager->getLang('animal_delete_sure', $this->animal->getName()).' <input type="submit" name="farm…