query('select accountid from contactdetails where contactid='.$id); $accountid = $adb->query_result($sql,0,'accountid'); if($accountid == 0) $accountid=''; $hidden .= '
'; $hidden .= ''; $hidden .= ''; $hidden .= ''; $hidden .= ''; $hidden .= ''; $hidden .= ''; $hidden .= ''; $hidden .= ''; $hidden .= ''; return $hidden; } function renderRelatedPotentials($query,$id) { global $vtlog; global $mod_strings; global $app_strings; require_once('include/RelatedListView.php'); $hidden = getHiddenValues($id); echo $hidden; $focus = new Potential(); $button = ''; if(isPermitted("Potentials",1,"") == 'yes') { $button .= ' '; } $returnset = '&return_module=Contacts&return_action=DetailView&return_id='.$id; $list = GetRelatedList('Contacts','Potentials',$focus,$query,$button,$returnset); $vtlog->logthis("Potential Related List for Contact Displayed",'info'); echo '
'; } function renderRelatedTasks($query,$id) { global $vtlog; global $adb; global $mod_strings; global $app_strings; require_once('include/RelatedListView.php'); $hidden = getHiddenValues($id); $hidden .= ''; echo $hidden; $focus = new Activity(); $button = ''; if(isPermitted("Activities",1,"") == 'yes') { $button .= ' '; $button .= ' '; } $returnset = '&return_module=Contacts&return_action=DetailView&return_id='.$id; $list = GetRelatedList('Contacts','Activities',$focus,$query,$button,$returnset); $vtlog->logthis("Activity Related List for Contact Displayed",'info'); echo ''; } function renderRelatedEmails($query,$id) { global $vtlog; global $mod_strings; global $app_strings; $hidden = getHiddenValues($id); $hidden .=""; $hidden .=""; echo $hidden; $focus = new Email(); $button = ''; if(isPermitted("Emails",1,"") == 'yes') { $button .= ''; } $returnset = '&return_module=Contacts&return_action=DetailView&return_id='.$id; $list = GetRelatedList('Contacts','Emails',$focus,$query,$button,$returnset); $vtlog->logthis("Email Related List for Contact Displayed",'info'); echo ''; } function renderRelatedHistory($query,$id) { getHistory('Contacts',$query,$id); echo '

'; } function renderRelatedTickets($query,$id) { global $vtlog; global $mod_strings; global $app_strings; $hidden = getHiddenValues($id); echo $hidden; $focus = new HelpDesk(); $button = ''; $button .= ' '; $returnset = '&return_module=Contacts&return_action=DetailView&return_id='.$id; $list = GetRelatedList('Contacts','HelpDesk',$focus,$query,$button,$returnset); $vtlog->logthis("Ticket Related List for Contact Displayed",'info'); echo ''; } function renderRelatedAttachments($query,$id) { global $vtlog; $hidden = getHiddenValues($id); echo $hidden; getAttachmentsAndNotes('Contacts',$query,$id); $vtlog->logthis("Notes&Attachmenmts for Contact Displayed",'info'); echo ''; } function renderRelatedProducts($query,$id) { require_once('modules/Products/Product.php'); global $mod_strings; global $app_strings; $hidden = getHiddenValues($id,$sid); echo $hidden; $focus = new Product(); $button = ''; if(isPermitted("Products",1,"") == 'yes') { $button .= ' '; } $returnset = '&return_module=Contacts&return_action=DetailView&return_id='.$id; $list = GetRelatedList('Contacts','Products',$focus,$query,$button,$returnset); echo ''; } function renderRelatedSalesOrders($query,$id,$sid="product_id") { require_once('modules/Orders/SalesOrder.php'); global $mod_strings; global $app_strings; $hidden = getHiddenValues($id,$sid); echo $hidden; $focus = new SalesOrder(); $button = ''; if(isPermitted("SalesOrder",1,"") == 'yes') { $button .= ' '; } $returnset = '&return_module=Contacts&return_action=DetailView&return_id='.$id; $list = GetRelatedList('Contacts','SalesOrder',$focus,$query,$button,$returnset); echo ''; } function renderRelatedOrders($query,$id) { require_once('modules/Orders/Order.php'); global $mod_strings; global $app_strings; $hidden = getHiddenValues($id); echo $hidden; $focus = new Order(); $button = ''; if(isPermitted("Orders",1,"") == 'yes') { $button .= ' '; } $returnset = '&return_module=Contacts&return_action=DetailView&return_id='.$id; $list = GetRelatedList('Contacts','Orders',$focus,$query,$button,$returnset); echo ''; } function renderRelatedQuotes($query,$id) { global $mod_strings; global $app_strings; require_once('modules/Quotes/Quote.php'); $hidden = getHiddenValues($id); echo $hidden; $focus = new Quote(); $button = ''; if(isPermitted("Quotes",1,"") == 'yes') { $button .= ' '; } $returnset = '&return_module=Contacts&return_action=DetailView&return_id='.$id; $list = GetRelatedList('Contacts','Quotes',$focus,$query,$button,$returnset); echo ''; } echo get_form_footer(); ?>