<?php
if($_REQUEST['record']){
	if($GLOBALS['db']->query("update ecmproducts set date_modified='".date("Y-m-d H:i:s")."' where id='".$_REQUEST['record']."'"))echo "ok";
	else echo "false";
}
else{
	$w=$GLOBALS['db']->query("select p.date_modified,p.id,p.name,p.code from ecmprices_ecmproducts as e inner join ecmproducts as p on p.id=e.ecmproduct_id where e.ecmprice_id='418fa92d-1f20-4a4f-bd78-4d6662e89059' and e.deleted='0' order by p.date_modified desc");
	while($r=$GLOBALS['db']->fetchByAssoc($w)){
		echo '<a href="index.php?module=EcmPrices&action=changeDM&record='.$r['id'].'">'.$r['date_modified'].' '.$r['code'].' '.$r['name'].'</a> ';
		//if($GLOBALS['db']->query("update ecmproducts set date_modified='".date("Y-m-d H:i:s")."' where id='".$r['id']."'"))echo "ok";
		//else echo "false";
		echo '<br>';
	}
}
?>