[Phpcms-plugins-cvs] admin4phpCMS/modules/user class.module_user.php,1.5,1.6
Brought to you by:
mjahn
From: Martin J. <mj...@us...> - 2004-07-24 08:58:35
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24990/modules/user Modified Files: class.module_user.php Log Message: changed some things Index: class.module_user.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/user/class.module_user.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- class.module_user.php 18 Jun 2004 15:17:01 -0000 1.5 +++ class.module_user.php 24 Jul 2004 08:58:25 -0000 1.6 @@ -30,6 +30,9 @@ /* * $Log$ +* Revision 1.6 2004/07/24 08:58:25 mjahn +* changed some things +* * Revision 1.5 2004/06/18 15:17:01 mjahn * module filemanager and editor included * @@ -183,6 +186,9 @@ } $root = $actiondata['_root']; $actiondata = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Benutzerverwaltung', 'module'=>'user', '_id'=>'usermenu', '_root'=>'mainmenu', 'id'=>'', 'class'=>''); + if ($this->display) { + $actiondata ['extra'] = 'class="active"'; + } $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); return true; } @@ -204,15 +210,15 @@ $root = $actiondata['_root']; - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Benutzerübersicht', 'module'=>'user', '_id'=>'useroverview', 'action'=>'', 'id'=>'', 'class'=>'', 'param'=>''); + $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Benutzerübersicht', 'module'=>'user', '_id'=>'useroverview'); if ($this->action == '') { - $actiondata['id'] = 'current'; + $actiondata['extra'] = 'id="current"'; } $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Rechteübersicht', 'module'=>'user', '_id'=>'usermenuchg', 'action'=>'rights', 'id'=>'', 'class'=>'', 'param'=>''); + $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Rechteübersicht', 'module'=>'user', '_id'=>'usermenuchg', 'action'=>'rights'); if ($this->action == 'rights') { - $actiondata['id'] = 'current'; + $actiondata['extra'] = 'id="current"'; } $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); return true; @@ -228,28 +234,79 @@ $root = $actiondata['_root']; - $actiondata = array ('_id'=>'benutzerlogin', '_root'=>$root, '_type'=>'headline', 'content'=>'Benutzerlogin', 'id'=>'', 'class'=>''); + $actiondata = array ('_id'=>'benutzerlogin', '_root'=>$root, '_type'=>'headline', 'content'=>'Benutzerlogin'); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - $actiondata = array ('_id'=>'loginform', '_root'=>$root, '_type'=>'form', 'method'=>'post', 'id'=>'', 'class'=>'', 'action'=>'index.php'); + $actiondata = array ('_id'=>'loginform', '_root'=>$root, '_type'=>'form', 'method'=>'post', 'action'=>'index.php'); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - $actiondata = array ('_id'=>'method', '_type'=>'form_input_hidden', 'value'=>'post', 'name'=>'method','_root'=>'loginform', 'id'=>'', 'class'=>''); + $actiondata = array ('_id'=>'method', '_type'=>'form_input_hidden', 'value'=>'post', 'name'=>'method','_root'=>'loginform'); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - $actiondata = array ('_id'=>'handle', '_type'=>'form_input_text', 'label'=>'Benutzername', 'value'=>'Benutzername', 'name'=>'handle','_root'=>'loginform', 'id'=>'', 'class'=>''); + $actiondata = array ('_id'=>'handle', '_type'=>'form_input_text', 'label'=>'Benutzername', 'value'=>'Benutzername', 'name'=>'handle','_root'=>'loginform'); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - $actiondata = array ('_id'=>'passwd', '_type'=>'form_input_password', 'value'=>'', 'label'=>'Passwort', 'name'=>'passwd','_root'=>'loginform', 'id'=>'', 'class'=>''); + $actiondata = array ('_id'=>'passwd', '_type'=>'form_input_password', 'value'=>'', 'label'=>'Passwort', 'name'=>'passwd','_root'=>'loginform'); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - $actiondata = array ('_id'=>'submit', '_type'=>'form_button', 'value'=>'Absenden', 'name'=>'submit','text'=>'Absenden', '_root'=>'loginform', 'id'=>'', 'class'=>''); + $actiondata = array ('_id'=>'submit', '_type'=>'form_button', 'value'=>'Absenden', 'name'=>'submit','text'=>'Absenden', '_root'=>'loginform'); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); return true; } if (!$this->display) { return true; } + + if ($this->action == '') { + + $actiondata = array ('_type'=>'form', '_id'=>'userform', '_root'=>$actiondata ['_root'], 'action'=>'#'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + + $content = ''; + foreach ($this->_USER->_auth->tree->root->children as $i=>$user) { + ob_start (); + print_r($user); + $content = ob_get_contents(); + ob_end_clean (); + + $actiondata = array ('_type'=>'paragraph', '_id'=>'userform-'.$i, '_root'=>'userform'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + + foreach ($user->children as $userdata) { + $actiondata = array ('_type'=>'form_input_text', '_id'=>'userform-'.$i.'-'.$userdata->name, '_root'=>'userform-'.$i, 'name'=>'userform-'.$i.'-'.$userdata->name, 'label'=>$userdata->name, 'value'=>$userdata->content); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + } + + } + } + if ($this->action == 'rights') { + + ob_start (); + print_r($this->_USER->_perm->tree); + $content = ob_get_contents (); + ob_end_clean (); + + $actiondata = array ('_type'=>'form', '_id'=>'userform', '_root'=>$actiondata ['_root'], 'action'=>'#', 'content'=>'<pre>'.$content.'<pre>'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + + + $content = ''; + foreach ($this->_USER->_perm->tree->root->children as $i=>$user) { + ob_start (); + print_r($user); + $content = ob_get_contents(); + ob_end_clean (); + + $actiondata = array ('_type'=>'paragraph', '_id'=>'userform-'.$i, '_root'=>'userform'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + + foreach ($user->children as $userdata) { + $actiondata = array ('_type'=>'form_input_text', '_id'=>'userform-'.$i.'-'.$userdata->name, '_root'=>'userform-'.$i, 'name'=>'userform-'.$i.'-'.$userdata->name, 'label'=>$userdata->name, 'value'=>$userdata->content); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + } + + } + } return true; } |