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

34 lines
1.1 KiB
PHP

<?php
/** \file project_transfer.php
* \brief DI project_transfer page
* \author Bram Lentjes, Core|Vision
* \version 1.0
* \date 09-04-2014
*
* This file contains the project_transfer file.
*/
require_once("include/db_workorder.php");
require_once('app/di_app_projects/a_get_generic.php');
// Check if info is set
if (isset($_POST['project_name'])) {
// Split the information
$information = explode("*", $_POST['project_name']);
// Get information for the database
$info['projectid'] = $information[0];
$info['timestamp'] = date("Y-m-d H:i:s");
$info['gps'] = $information[1];
$info['platform'] = $_PAGE_INFO['MTinfo_device'];
$info['status'] = $information[2];
// Store document transfer in database
db_store_project_transfer($info, $userId, $userTable);
// Call page so the 'goedgekeurd/afgekeurd' value will be visible into the input field
echo "
<script type=\"text/javascript\">
ajax_post('',getProjectId(),'?id=" . $_PAGE_INFO['id'] . "&href=app/di_app_projects/a_get_appointmentbook.php','loaded_page');
</script>";
}