72 lines
2.7 KiB
PHP
72 lines
2.7 KiB
PHP
<?php
|
|
/** \file scripts\page\menu_doc_info.php
|
|
* \brief DI webinterface menu document script.
|
|
* \author Rob Schalken, Core|Vision
|
|
* \version 1.0
|
|
* \date 17-10-2008
|
|
*
|
|
* This file contains the menu document info script. This file displays document info.
|
|
*/
|
|
|
|
//== Required settings ======================
|
|
if (is_valid_action("doc_new")) {
|
|
$_PAGE_INFO['page_title'] = "document new menu";
|
|
|
|
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "Documentation");
|
|
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_doc");
|
|
|
|
$menu = "menu:documentatie:nieuw";
|
|
$rights = "menu:documentatie";
|
|
$title = "Add document";
|
|
}
|
|
else if (is_valid_action("doc_change")) {
|
|
$_PAGE_INFO['page_title'] = "document change menu";
|
|
|
|
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN'], "Documentation", "Document search (change)");
|
|
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu", "page/menu_doc", "page/menu_doc_search");
|
|
|
|
$menu = "menu:documentatie:wijzigen";
|
|
$rights = "menu:documentatie";
|
|
$title = "Change document";
|
|
}
|
|
//===========================================
|
|
|
|
// Verify project/rights and log
|
|
if (Ver_Rights_Project_Log($rights, $menu)) {
|
|
// Check action
|
|
if (is_valid_action("doc_change")) {
|
|
// Check if this is a recall action
|
|
if (!$_SESSION[$_PAGE_INFO['id']]['recall_counter']) {
|
|
if (isset($_SESSION[$_PAGE_INFO['id']]['search']['doc']['id'])) {
|
|
// Retrieve lance data
|
|
$row_doc = db_fetch_file($_SESSION[$_PAGE_INFO['id']]['search']['doc']['id'], "algemene_documenten");
|
|
|
|
if (is_array($row_doc)) {
|
|
$_SESSION[$_PAGE_INFO['id']]['doc_info'] = $row_doc;
|
|
}
|
|
else {
|
|
// ID not valid!!! => Redirect back to search menu
|
|
header("Location: ?id=" . $_PAGE_INFO['id'] . "&href=page/menu_doc_search");
|
|
}
|
|
}
|
|
else {
|
|
// ID not valid!!! => Redirect back to search menu
|
|
header("Location: ?id=" . $_PAGE_INFO['id'] . "&href=page/menu_doc_search");
|
|
}
|
|
}
|
|
}
|
|
|
|
// Store title
|
|
$_SESSION[$_PAGE_INFO['id']]['title'] = _($title);
|
|
|
|
// Show page header
|
|
$y_position = (isset($_SESSION[$_PAGE_INFO['id']]['doc_info']['y_position'])) ? ($_SESSION[$_PAGE_INFO['id']]['doc_info']['y_position']) : 0;
|
|
print_xml_header($y_position);
|
|
|
|
// Include info content
|
|
include("menu_doc_info_content.php");
|
|
|
|
// Show page footer
|
|
print_page_footer();
|
|
}
|
|
?>
|