Files
crm.twinpol.com/modules/EcmDocuments/AddRelation.php

16 lines
595 B
PHP
Raw Normal View History

2025-05-12 15:44:39 +00:00
<?
$z="insert into ecmdocuments_".$_GET['relation']."(id,ecmdocument_id,".$_GET['parent_col'].",deleted) values('".create_guid()."','".$_GET['record']."','".$_GET['parent_id']."','0')";
print $z;
mysql_query($z);
if($_GET['relation']=="correspondences" ||
$_GET['relation']=="correspondenceouts" ||
$_GET['relation']=="contracts" ||
$_GET['relation']=="ecminvoices")
{
$z="update ".$_GET['relation']." set relation='1' where id='".$_GET['parent_id']."'";
mysql_query($z);
}
header("Location: index.php?module=EcmDocuments&action=DetailView&record=".$_GET['record']);
?>