49 lines
1.3 KiB
PHP
49 lines
1.3 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.
|
|
*/
|
|
|
|
if(
|
|
!is_valid_action(
|
|
"cust_new",
|
|
"cust_info", "cust_change", "cust_delete",
|
|
"workorder_receipt", "service_limits"
|
|
)
|
|
) {
|
|
// Redirect page back to login page
|
|
force_logout(_("No valid rights"), "Invalid action: " . $_SESSION[$_PAGE_INFO['id']]['action']);
|
|
}
|
|
|
|
$page = new MTinfoSearchScreen();
|
|
|
|
//===========================================
|
|
|
|
// Clear previous session info
|
|
unset($_SESSION[$_PAGE_INFO['id']]['customer_info']);
|
|
unset($_SESSION[$_PAGE_INFO['id']]['user_info']);
|
|
|
|
// Verify project/rights and log
|
|
if( $page->user_has_rights() ) {
|
|
// Redirect when creating new customer
|
|
if (!is_valid_action("cust_new")) {
|
|
// 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'] . "");
|
|
}
|
|
}
|
|
?>
|