src.dualinventive.com/mtinfo/dist/webroot/rc-4.05/scripts/page/menu_kb_search.php

72 lines
2.5 KiB
PHP

<?php
/** \file scripts\page\menu_kb_search.php
* \brief DI webinterface menu lance script.
* \author Rob Schalken, Core|Vision
* \version 1.0
* \date 17-10-2008
*
* This file contains the menu document search script. This file creates a search
* engine for documents.
*/
//== Required settings ======================
if (is_valid_action("doc_info")) {
$_PAGE_INFO['page_title'] = "knowledge base search menu";
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "Knowledge Base");
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_kb");
$menu = "menu:documentatie:overzicht";
$rights = "menu:documentatie";
$title = "View document";
}
else if (is_valid_action("doc_change")) {
$_PAGE_INFO['page_title'] = "knowledge base search menu";
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "Knowledge Base");
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_kb");
$menu = "zoekscherm:documenten";
$rights = "menu:documentatie";
$title = "Document search (change)";
}
else if (is_valid_action("doc_delete")) {
$_PAGE_INFO['page_title'] = "Delete knowledge base document";
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "Knowledge Base");
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_kb");
$menu = "menu:documentatie:verwijderen";
$rights = "menu:documentatie";
$title = "Delete document";
}
//===========================================
// Clear previous session info
unset($_SESSION[$_PAGE_INFO['id']]['doc_info']);
// Verify project/rights and log
if (Ver_Rights_Project_Log($rights, $menu)) {
// Redirect when creating new user
if (!is_valid_action("doc_new")) {
// Store title
$_SESSION[$_PAGE_INFO['id']]['title'] = _($title);
// Add calendar to header
$extra_header_HTML = "<script type=\"text/javascript\" src=\"" . JAVA_DIR . "calender.js\"></script>\n";
// Show page header
print_xml_header(0, $extra_header_HTML);
// Include search content
include("menu_kb_search_content.php");
// Show page footer
print_page_footer();
}
else {
// Redirect to doc new page
header("Location: ?id=" . $_PAGE_INFO['id'] . "&href=page/menu_kb_info&action=" . $_SESSION[$_PAGE_INFO['id']]['action'] . "");
}
}
?>