src.dualinventive.com/mtinfo/dist/webroot/main/scripts/page/menu_system_search.php

71 lines
2.8 KiB
PHP

<?php
/** \file scripts\page\menu_system_search.php
* \brief DI webinterface menu system search script.
* \author Rob Schalken, Core|Vision
* \version 1.0
* \date 17-10-2008
*
* This file contains the menu system search script. This file creates a search
* engine for equipment types.
*/
//== Required settings ======================
if (is_valid_action("equipment_info")) {
$_PAGE_INFO['page_title'] = "equipment type search menu";
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "System maintenance", "Equipment type maintenance");
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_system&action=system_overview", "page/menu_system&action=equipment_overview");
$rights = "menu:systeemonderhoud";
$menu = "zoekscherm:materieel_type";
$title = "Equipment type search (info)";
}
else if (is_valid_action("equipment_change")) {
$_PAGE_INFO['page_title'] = "equipment type search menu";
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "System maintenance", "Equipment type maintenance");
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_system&action=system_overview", "page/menu_system&action=equipment_overview");
$rights = "menu:systeemonderhoud";
$menu = "zoekscherm:materieel_type";
$title = "Equipment type search (change)";
}
else if (is_valid_action("equipment_delete")) {
$_PAGE_INFO['page_title'] = "Delete equipment type";
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "System maintenance", "Equipment type maintenance");
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_system&action=system_overview", "page/menu_system&action=equipment_overview");
$rights = "menu:systeemonderhoud";
$menu = "menu:systeemonderhoud:materieel_type:verwijderen";
$title = "Delete equipment type";
}
//===========================================
// Clear previous session info
unset($_SESSION[$_PAGE_INFO['id']]['system_info']);
// Verify project/rights and log
if (Ver_Rights_Project_Log($rights, $menu)) {
// Redirect when creating new equipment type
if (!is_valid_action("equipment_new")) {
// Store title
$_SESSION[$_PAGE_INFO['id']]['title'] = $title;
// Show page header
print_xml_header();
// Include search content
include("menu_system_search_content.php");
// Show page footer
print_page_footer();
}
else {
// Redirect to equipment new page
header("Location: ?id=" . $_PAGE_INFO['id'] . "&href=page/menu_system_info&action=" . $_SESSION[$_PAGE_INFO['id']]['action'] . "");
}
}
?>