00001 <?php 00002 00007 class List_User extends oxAdminList 00008 { 00015 public function render() 00016 { 00017 $this->_oList = oxNew( "oxlist", "core" ); 00018 $this->_oList->setSqlLimit( 0, 5000 ); 00019 $this->_oList->init( "oxuser" ); 00020 00021 $aWhere = $this->buildWhere(); 00022 00023 $sSql = $this->_buildSelectString( $this->_oList->getBaseObject() ); 00024 $sSql = $this->_prepareWhereQuery( $aWhere, $sSql ); 00025 $sSql = $this->_prepareOrderByQuery( $sSql ); 00026 $sSql = $this->_changeselect( $sSql ); 00027 $this->_oList->selectString( $sSql ); 00028 00029 parent::render(); 00030 00031 $aWhere = oxConfig::getParameter( "where"); 00032 if ( is_array( $aWhere ) ) { 00033 foreach ( $aWhere as $sField => $sValue ) { 00034 $this->_aViewData["where"]->{str_replace( '.', '__', $sField )} = $sValue; 00035 } 00036 } 00037 00038 $this->_aViewData["menustructure"] = $this->getNavigation()->getDomXml()->documentElement->childNodes; 00039 00040 return "list_user.tpl"; 00041 } 00042 00046 protected function _prepareWhereQuery( $aWhere, $sSql ) 00047 { 00048 $sQ = parent::_prepareWhereQuery( $aWhere, $sSql ); 00049 00050 00051 return $sQ; 00052 } 00053 00057 protected function _buildSelectString( $oObject = null ) 00058 { 00059 return 'select oxuser.oxid, oxuser.oxfname, oxuser.oxlname, oxuser.oxusername, oxuser.oxregister from oxuser where 1 '; 00060 } 00061 00069 protected function _prepareOrderByQuery( $sSql = null ) 00070 { 00071 if ( $sSort = oxConfig::getParameter( "sort" ) ) { 00072 $sSql .= " order by $sSort "; 00073 } 00074 00075 return $sSql; 00076 } 00077 }