77 lines
2.9 KiB
PHP
77 lines
2.9 KiB
PHP
<?php
|
|
/** \file scripts\page\menu_user_search.php
|
|
* \brief DI webinterface menu user script.
|
|
* \author Rob Schalken, Core|Vision
|
|
* \version 1.0
|
|
* \date 17-10-2008
|
|
*
|
|
* This file contains the menu user search script. This file creates a search
|
|
* engine for users.
|
|
*/
|
|
|
|
//== Required settings ======================
|
|
if (is_valid_action("user_info")) {
|
|
$_PAGE_INFO['page_title'] = "user search menu";
|
|
|
|
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "User maintenance");
|
|
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_user");
|
|
|
|
$menu = "zoekscherm:gebruiker";
|
|
$rights = "menu:gebruikers:root,menu:gebruikers";
|
|
$title = "User search (info)";
|
|
}
|
|
else if (is_valid_action("user_change")) {
|
|
$_PAGE_INFO['page_title'] = "user search menu";
|
|
|
|
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "User maintenance");
|
|
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_user");
|
|
|
|
$menu = "zoekscherm:gebruiker";
|
|
$rights = "menu:gebruikers:root,menu:gebruikers";
|
|
$title = "User search (change)";
|
|
}
|
|
else if (is_valid_action("user_delete")) {
|
|
$_PAGE_INFO['page_title'] = "Delete user menu";
|
|
|
|
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "User maintenance");
|
|
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_user");
|
|
|
|
$menu = "menu:gebruikers:verwijderen";
|
|
$rights = "menu:gebruikers:root,menu:gebruikers";
|
|
$title = "Delete user";
|
|
}
|
|
//===========================================
|
|
|
|
// Clear previous session info
|
|
unset($_SESSION[$_PAGE_INFO['id']]['user_info']);
|
|
unset($_SESSION[$_PAGE_INFO['id']]['customer_info']);
|
|
|
|
// Verify project/rights and log
|
|
if (Ver_Rights_Project_Log($rights, $menu)) {
|
|
// Redirect when creating new user or changing password/pin
|
|
if (!is_valid_action("user_new","user_change_password","user_change_pin")) {
|
|
// Store title
|
|
$_SESSION[$_PAGE_INFO['id']]['title'] = _($title);
|
|
|
|
// Show page header
|
|
print_xml_header();
|
|
|
|
// Include search content
|
|
include("menu_user_search_content.php");
|
|
|
|
// Show page footer
|
|
print_page_footer();
|
|
}
|
|
else if (is_valid_action("user_new")) {
|
|
// Redirect to user new page
|
|
header("Location: ?id=" . $_PAGE_INFO['id'] . "&href=page/menu_user_info&action=" . $_SESSION[$_PAGE_INFO['id']]['action'] . "");
|
|
}
|
|
else if (is_valid_action("user_change_password","user_change_pin")) {
|
|
// set search id
|
|
$_SESSION[$_PAGE_INFO['id']]['search']['user']['id'] = $_SESSION[$_PAGE_INFO['id']]['login']['user']['id'];
|
|
|
|
// Redirect to user info page
|
|
header("Location: ?id=" . $_PAGE_INFO['id'] . "&href=page/menu_user_info&action=" . $_SESSION[$_PAGE_INFO['id']]['action'] . "");
|
|
}
|
|
}
|
|
?>
|