id.' and item_id = '.$_REQUEST['record']; $adb->query($sql_recentviewed); if($_REQUEST['return_module'] == 'Contacts') { $sql = 'delete from cntactivityrel where contactid = '.$_REQUEST['return_id'].' and activityid = '.$_REQUEST['record']; $adb->query($sql); } else { $sql= 'delete from seactivityrel where activityid='.$_REQUEST['record']; $adb->query($sql); } if($_REQUEST['return_module'] == 'HelpDesk') { $sql = 'delete from seticketsrel where ticketid = '.$_REQUEST['return_id'].' and crmid = '.$_REQUEST['record']; $adb->query($sql); } if($_REQUEST['module'] == $_REQUEST['return_module']) $focus->mark_deleted($_REQUEST['record']); $activity_id=$_REQUEST['record']; $sql = 'delete from activity_reminder where activity_id='.$activity_id; $adb->query($sql); $sql = 'delete from recurringevents where activityid='.$activity_id; $adb->query($sql); header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&record=".$_REQUEST['return_id']); ?>