diff --git a/application/admin/controllers/UserController.php b/application/admin/controllers/UserController.php index 61593c99..487238fb 100755 --- a/application/admin/controllers/UserController.php +++ b/application/admin/controllers/UserController.php @@ -1,7 +1,8 @@ db->select(); - $select->from('users') + + $select->from('users') ->where('usertype = ?', 'member') ->order('users.id desc'); - - view::addPaginator($select,$this,20); - }//listAction - -#添加本地用户 - function localAction() - { - $this->view->ac = $ac = $this->_getParam('ac'); - $submit = $this->_getParam('submit'); - $local = new Local(); + - if(empty($ac)) - { - $select=$this->db->select(); - - $select->from(array('u'=>'users','l'=>'users_local')) - ->join(array('l'=>'users_local'),'u.id=l.uid') - ->order('u.id desc'); - - view::addPaginator($select,$this,20); - return; - } - - if($ac=='addLocal') - { - if(view::isXmlHttpRequest($this)) - { - $status = $local->addLocalUser(); - if($status !== true) - { - $this->jsonexit(array('error'=>$status)); - return true; - }else{ - $this->jsonexit(array('success'=>1)); - return true; - } - }else{ - - } - } - - if($ac == 'delete') - { - view::Post($this,$local->deleteUser($this->_getParam('id')),-1); - return; - } + $paginator = Zend_Paginator::factory($select); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(30); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml'); + $this->view->paginator=$paginator; }//listAction function searchAction() @@ -204,10 +169,10 @@ class Admin_UserController extends Zend_Controller_Action if (isset($id)) { try { - $sql="select * from users where id=?"; - $result=$this->db->query($sql,$id); - $rows = $result->fetch(); - $this->view->infos=$rows; + $user = new \Users\Users; + $this->view->infos=$user->getUser($id); + $this->view->usertypes = $user->getUserType(); + } catch (Exception $e) { $this->messenger->addMessage($e->getMessage()); } @@ -276,6 +241,7 @@ class Admin_UserController extends Zend_Controller_Action $updates=array(); if (isset($id)) { + if(!empty($newpwd)&&!empty($cfnewpwd)) { if($newpwd==$cfnewpwd) @@ -303,6 +269,7 @@ class Admin_UserController extends Zend_Controller_Action } catch (Exception $e) { $this->messenger->addMessage($e->getMessage()); } + $this->_redirect("/admin/user/show/id/$id"); } else { diff --git a/application/admin/views/scripts/user/adminlist.phtml b/application/admin/views/scripts/user/adminlist.phtml index f47d1de3..3606ba74 100755 --- a/application/admin/views/scripts/user/adminlist.phtml +++ b/application/admin/views/scripts/user/adminlist.phtml @@ -2,51 +2,46 @@ $this->headTitle($this->config->title->site); $this->headTitle('后台管理'); $this->headTitle()->setSeparator(' - '); -# $this->headLink()->appendStylesheet('/css/admin.css'); + $this->headLink()->appendStylesheet('/css/admin.css'); $this->breadcrumb('首页'); $this->breadcrumb('后台首页'); $this->breadcrumb('用户管理'); $this->breadcrumb()->setSeparator(' > '); ?> - - -
-
partial('user/left.phtml'); ?>
- -
-

管理员列表

-
- - - - - - - - - - - - paginator)): ?> - - paginator as $item): ?> - - - - - - - - - - - -
用户名电子邮箱用户类型真实姓名电话操作
- '>查看详细 -
- -
+
+partial('user/left.phtml'); ?>
+ +
+
管理员列表
+
同步管理员到geonetwork
+ + + + + + + + + + + +paginator)): ?> + +paginator as $item): ?> + + + + + + + + + + + +
用户名电子邮箱用户类型真实姓名电话操作
+'>查看详细 +
+ +
\ No newline at end of file diff --git a/application/admin/views/scripts/user/index.phtml b/application/admin/views/scripts/user/index.phtml index 8c8853de..bd8d7911 100755 --- a/application/admin/views/scripts/user/index.phtml +++ b/application/admin/views/scripts/user/index.phtml @@ -2,26 +2,42 @@ $this->headTitle($this->config->title->site); $this->headTitle('后台管理'); $this->headTitle()->setSeparator(' - '); - $this->headLink()->appendStylesheet('/css/admin.css'); $this->breadcrumb('首页'); $this->breadcrumb('后台管理首页'); $this->breadcrumb()->setSeparator(' > '); ?> -
-partial('user/left.phtml'); ?> -
- -
-

用户总数: su['total'];?>,其中管理员: suadmin['total'];?>

-
-
-

搜索用户

-
- -
姓名
-
单位
-
项目
-
-
-
+
+
+ partial('user/left.phtml'); ?> +
+ +
+

用户总数: su['total'];?>,其中管理员: suadmin['total'];?>

+
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+
+
\ No newline at end of file diff --git a/application/admin/views/scripts/user/left.phtml b/application/admin/views/scripts/user/left.phtml index c25352ae..8e891e9e 100755 --- a/application/admin/views/scripts/user/left.phtml +++ b/application/admin/views/scripts/user/left.phtml @@ -1,7 +1,6 @@