function get_admin_announcements_rs() { $announcements_rs = array(); $user_cnt = fetch_user_cnt(NULL, INCLUDE_ROLE_PERMISSIONS, EXCLUDE_CURRENT_USER, INCLUDE_ACTIVATE_USER); if ($user_cnt > 0) { $announcements_rs[] = array(heading => get_opendb_lang_var('activate_users'), message => get_opendb_lang_var('there_are_no_of_users_awaiting_activation', array('no_of_users' => $user_cnt)), link => "user_listing.php?restrict_active_ind=X", link_text => get_opendb_lang_var('activate_users')); } if (validate_user_passwd(get_opendb_session_var('user_id'), 'admin')) { $announcements_rs[] = array(heading => get_opendb_lang_var('change_admin_user_password'), message => get_opendb_lang_var('change_admin_user_password_msg'), link => "user_admin.php?op=change_password&user_id=" . get_opendb_session_var('user_id'), link_text => get_opendb_lang_var('change_my_password')); } if (fetch_user_email(get_opendb_session_var('user_id')) == '*****@*****.**') { $announcements_rs[] = array(heading => get_opendb_lang_var('change_admin_user_email'), message => get_opendb_lang_var('change_admin_user_email_msg'), link => "user_admin.php?op=edit&user_id=" . get_opendb_session_var('user_id'), link_text => get_opendb_lang_var('edit_my_info')); } if (!is_exists_any_item_type()) { $admin_type_r = get_system_admin_tools_menu('s_item_type'); $announcements_rs[] = array(heading => get_opendb_lang_var('no_item_types'), message => get_opendb_lang_var('add_new_item_type_msg'), link => "admin.php?type=s_item_type", link_text => $admin_type_r['link'] . ' Admin Tool'); } if (!is_exists_any_site_plugin()) { $admin_type_r = get_system_admin_tools_menu('s_site_plugin'); $announcements_rs[] = array(heading => get_opendb_lang_var('no_site_plugins'), message => get_opendb_lang_var('add_new_site_plugin_msg'), link => "admin.php?type=s_site_plugin", link_text => $admin_type_r['link'] . ' Admin Tool'); } return $announcements_rs; }
echo _theme_header($page_title); echo "<h2>" . $page_title . "</h2>"; $listingObject = new HTML_Listing($PHP_SELF, $HTTP_VARS, $HTTP_VARS['mode']); $listingObject->setNoRowsMessage(get_opendb_lang_var('no_users_found')); if ($HTTP_VARS['restrict_active_ind'] == 'X') { $restrict_users_mode = INCLUDE_ACTIVATE_USER; } else { if ($HTTP_VARS['show_deactivated_users'] == 'Y') { $restrict_users_mode = INCLUDE_DEACTIVATED_USER; } else { $restrict_users_mode = EXCLUDE_DEACTIVATED_USER; } } $listingObject->startListing(); if (is_numeric($listingObject->getItemsPerPage())) { $listingObject->setTotalItems(fetch_user_cnt(NULL, INCLUDE_ROLE_PERMISSIONS, INCLUDE_CURRENT_USER, $restrict_users_mode)); if ($listingObject->getTotalItemCount() > 0) { $result = fetch_user_rs(NULL, INCLUDE_ROLE_PERMISSIONS, INCLUDE_CURRENT_USER, $restrict_users_mode, $listingObject->getCurrentOrderBy(), $listingObject->getCurrentSortOrder(), $listingObject->getStartIndex(), $listingObject->getItemsPerPage()); } } else { $result = fetch_user_rs(NULL, INCLUDE_ROLE_PERMISSIONS, INCLUDE_CURRENT_USER, $restrict_users_mode, $listingObject->getCurrentOrderBy(), $listingObject->getCurrentSortOrder()); //$include_deactivated_users } $listingObject->addHeaderColumn(NULL, 'user_id_rs', FALSE, 'checkbox'); $listingObject->addHeaderColumn(get_opendb_lang_var('user'), 'user_id'); $listingObject->addHeaderColumn(get_opendb_lang_var('action')); $listingObject->addHeaderColumn(get_opendb_lang_var('user_role'), 'role'); if ($HTTP_VARS['restrict_active_ind'] != 'X') { $listingObject->addHeaderColumn(get_opendb_lang_var('last_visit'), 'lastvisit'); } if ($result) {