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

72 lines
2.5 KiB
PHP

<?php
/** \file scripts\page\menu_cust_search.php
* \brief DI webinterface menu customer script.
* \author Rob Schalken, Core|Vision
* \version 1.0
* \date 17-10-2008
*
* This file contains the menu customer search script. This file creates a search
* engine for customers.
*/
//== Required settings ======================
if (is_valid_action("cust_info")) {
$_PAGE_INFO['page_title'] = "company search menu";
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "Company maintenance");
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_cust");
$menu = "zoekscherm:klant";
$rights = "menu:klanten:root,menu:klanten";
$title = "Company search (info)";
}
else if (is_valid_action("cust_change")) {
$_PAGE_INFO['page_title'] = "company search menu";
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "Company maintenance");
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_cust");
$menu = "zoekscherm:klant";
$rights = "menu:klanten:root,menu:klanten";
$title = "Company search (change)";
}
else if (is_valid_action("cust_delete")) {
$_PAGE_INFO['page_title'] = "Delete company menu";
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "Company maintenance");
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_cust");
$menu = "menu:klanten:verwijderen";
$rights = "menu:klanten:root,menu:klanten";
$title = "Delete company";
}
//===========================================
// Clear previous session info
unset($_SESSION[$_PAGE_INFO['id']]['customer_info']);
unset($_SESSION[$_PAGE_INFO['id']]['user_info']);
// Verify project/rights and log
if (Ver_Rights_Project_Log($rights, $menu)) {
// Redirect when creating new customer
if (!is_valid_action("cust_new")) {
// Store title
$_SESSION[$_PAGE_INFO['id']]['title'] = $title;
// Show page header
print_xml_header();
// Include search content
include("menu_cust_search_content.php");
// Show page footer
print_page_footer();
}
else {
// Redirect to customer new page
header("Location: ?id=" . $_PAGE_INFO['id'] . "&href=page/menu_cust_info&action=" . $_SESSION[$_PAGE_INFO['id']]['action'] . "");
}
}
?>