src.dualinventive.com/mtinfo/dist/webroot/main/app/include/download_id.php

24 lines
762 B
PHP

<?php
// Required documents
require_once("../../include/core_xml.php");
require_once("../../include/document.php");
require_once('../../app/di_app_projects/a_get_generic.php');
// Decrypt document id
$password = $userId . "_" . $projectId;
$doc_id = decrypt($_GET['doc_id'], $password);
// Default
$table = (!isset($_GET['table'])) ? "project_documenten" : $_GET['table'];
// Get data
$doc_data = db_fetch_file($doc_id, $table);
// Download document (inline)
if (!download_document($doc_id, $table, TRUE)) {
DBG("download " . serialize($doc_data) . " in " . $table . " failed");
} else {
// Log user-project action
db_log_user_project($projectId, "menu:projecten:project_documentatie:overzicht", serialize($doc_data));
}
?>