query($sql); } if($_REQUEST['return_module'] == 'Potentials' && $_REQUEST['record'] != '' && $_REQUEST['return_id'] != '') { $sql = 'delete from contpotentialrel where contactid='.$_REQUEST['record'].' and potentialid='.$_REQUEST['return_id']; $adb->query($sql); } if($_REQUEST['record'] != '' && $_REQUEST['return_id'] != '') { $sql = 'delete from seactivityrel where crmid = '.$_REQUEST['record'].' and activityid = '.$_REQUEST['return_id']; $adb->query($sql); $sql_recentviewed ='delete from tracker where user_id = '.$current_user->id.' and item_id = '.$_REQUEST['record']; $adb->query($sql_recentviewed); } if($_REQUEST['return_module'] == 'Products') { $sql = 'delete from vendorcontactrel where contactid='.$_REQUEST['record'].' and vendorid='.$_REQUEST['return_id']; $adb->query($sql); } if($_REQUEST['return_module'] == $_REQUEST['module']) $focus->mark_deleted($_REQUEST['record']); header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&activity_mode=".$_REQUEST['activity_mode']."&record=".$_REQUEST['return_id']); ?>