// All rights reserved. This script is part of PHPWCMS. The PHPWCMS web content management system is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html A copy is found in the textfile GPL.txt and important notices to the license from the author is found in LICENSE.txt distributed with these scripts. This script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This copyright notice MUST APPEAR in all copies of the script! *************************************************************************************/ // ---------------------------------------------------------------- // obligate check for phpwcms constants if (!defined('PHPWCMS_ROOT')) { die("You Cannot Access This Script Directly, Have a Nice Day."); } // ---------------------------------------------------------------- // create paginating for users if(isset($_GET['c'])) { $_SESSION['list_user_count'] = (trim($_GET['c']) == 'all') ? '99999' : intval($_GET['c']); } if(isset($_GET['page'])) { $_SESSION['list_user_page'] = intval($_GET['page']); } // set default values for paginating if(empty($_SESSION['list_user_count'])) { $_SESSION['list_user_count'] = 25; } $_userInfo = array(); // get filter and paginating form values if(isset($_POST['do_pagination'])) { $_SESSION['list_admin'] = empty($_POST['showadmin']) ? 0 : 1; $_SESSION['list_befe'] = empty($_POST['showbefe']) ? 0 : 1; $_SESSION['list_norm'] = empty($_POST['shownorm']) ? 0 : 1; $_SESSION['list_fe'] = empty($_POST['showfe']) ? 0 : 1; $_SESSION['list_user_page'] = intval($_POST['page']); $_SESSION['filter_results'] = clean_slweg($_POST['filter']); if(empty($_SESSION['filter_results'])) { unset($_SESSION['filter_results']); } else { $_SESSION['filter_results'] = convertStringToArray($_SESSION['filter_results'], ' '); } } if(empty($_SESSION['list_user_page'])) { $_SESSION['list_user_page'] = 1; } $_userInfo['list_admin'] = isset($_SESSION['list_admin']) ? $_SESSION['list_admin'] : 0; $_userInfo['list_befe'] = isset($_SESSION['list_befe']) ? $_SESSION['list_befe'] : 0; $_userInfo['list_norm'] = isset($_SESSION['list_norm']) ? $_SESSION['list_norm'] : 0; $_userInfo['list_fe'] = isset($_SESSION['list_fe']) ? $_SESSION['list_fe'] : 0; $_userInfo['list'] = array(); // if admin user should be listed $_userInfo['where_query'] = ' WHERE usr_aktiv != 9'; if($_userInfo['list_admin']) { $_userInfo['where_query'] .= ' AND usr_admin=1'; } if($_userInfo['list_befe']) { $_userInfo['list'][] = ' usr_fe=2 '; } if($_userInfo['list_norm']) { $_userInfo['list'][] = ' usr_fe=1 '; } if($_userInfo['list_fe']) { $_userInfo['list'][] = ' usr_fe=0 '; } $_userInfo['list'] = trim(implode('OR', $_userInfo['list'])); if($_userInfo['list']) { $_userInfo['where_query'] .= ' AND ('.$_userInfo['list'].')'; } if(isset($_SESSION['filter_results']) && count($_SESSION['filter_results'])) { $_userInfo['filter_array'] = array(); foreach($_SESSION['filter_results'] as $_userInfo['filter']) { //usr_name, usr_login, usr_email $_userInfo['filter_array'][] = "CONCAT(usr_name, usr_login, usr_email) LIKE '%".aporeplace($_userInfo['filter'])."%'"; } if(count($_userInfo['filter_array'])) { $_userInfo['where_query'] .= ' AND ('.implode('OR', $_userInfo['filter_array']).')'; } } // paginating values $_userInfo['count_total'] = _dbQuery("SELECT COUNT(*) FROM ".DB_PREPEND."phpwcms_user ".$_userInfo['where_query'], 'COUNT'); $_userInfo['pages_total'] = ceil($_userInfo['count_total'] / $_SESSION['list_user_count']); if($_SESSION['list_user_page'] > $_userInfo['pages_total']) { $_SESSION['list_user_page'] = empty($_userInfo['pages_total']) ? 1 : $_userInfo['pages_total']; } ?>'; echo ''; } ?>
1) { echo ''; echo ''; echo ''; echo ''; echo ''; } else { echo ''; } ?>
/> /> /> /> '; if($_SESSION['list_user_page'] > 1) { echo ''; echo ''; } else { echo ''; } echo '/'.$_userInfo['pages_total'].' '; if($_SESSION['list_user_page'] < $_userInfo['pages_total']) { echo ''; echo ''; } else { echo ''; } echo ' | 
10 25 50 100 250
.gif" alt="" width="19" height="16" border="0"> > ">aktiv_mini.gif" alt="" width="14" height="15" border="0">">" onclick="return confirm('Delete user ');">">