14 lines
1.2 KiB
PHP
Executable File
14 lines
1.2 KiB
PHP
Executable File
<?
|
|
require_once("modules/EcmDocuments/dirstree.php");
|
|
$z="select * from ecmdocs where id='".$_REQUEST['record']."'";
|
|
$w=$GLOBALS['db']->query($z);
|
|
$r=$GLOBALS['db']->fetchByAssoc($w);
|
|
$guid=create_guid();
|
|
$GLOBALS['db']->query("INSERT INTO `ecmcorrespondenceins` (`id`, `name`, `date_entered`, `date_modified`, `modified_user_id`, `assigned_user_id`, `created_by`, `deleted`, `description`, `account_from`, `account_to`, `account_name_from`, `account_name_to`, `reg_date`, `document_date`, `delivery_date`, `stamp_date`, `relation`, `file_id`) VALUES ('".$guid."', '".$r['name']."', '".date("Y-m-d H:m:s")."', '".date("Y-m-d H:m:s")."', '".$r['modified_user_id']."', '".$r['assigned_user_id']."', '".$r['created_by']."', 0, '".$r['description']."', '', '".$r['account_id']."', '', '".$r['account_name']."', '".date("Y-m-d")."', NULL, NULL, NULL, 2, '".$r['file_id']."');");
|
|
|
|
move_relations("ecmdocuments_ecmdocs","ecmdocuments_ecmcorrespondenceins","ecmdoc_id","ecmcorrespondencein_id",$_REQUEST['record'],$guid,1);
|
|
|
|
$GLOBALS['db']->query("update ecmdocs set deleted='1' where id='".$_REQUEST['record']."'");
|
|
|
|
header("Location: index.php?module=EcmCorrespondenceIns&action=DetailView&record=".$guid);
|
|
?>
|