function showOppPanelAction() { @($opp_id = DevblocksPlatform::importGPC($_REQUEST['id'], 'integer', 0)); @($view_id = DevblocksPlatform::importGPC($_REQUEST['view_id'], 'string', '')); @($email = DevblocksPlatform::importGPC($_REQUEST['email'], 'string', '')); $tpl = DevblocksPlatform::getTemplateService(); $tpl_path = dirname(dirname(__FILE__)) . '/templates/'; $tpl->assign('path', $tpl_path); /* * [IMPORTANT -- Yes, this is simply a line in the sand.] * You're welcome to modify the code to meet your needs, but please respect * our licensing. Buy a legitimate copy to help support the project! * http://www.cerberusweb.com/ */ $license = CerberusLicense::getInstance(); if (empty($id) && (empty($license['serial']) || !empty($license['serial']) && isset($license['a'])) && 10 <= DAO_CrmOpportunity::getItemCount()) { $tpl->display('file:' . $tpl_path . 'crm/opps/rpc/trial.tpl'); return; } $tpl->assign('view_id', $view_id); $tpl->assign('email', $email); if (!empty($opp_id) && null != ($opp = DAO_CrmOpportunity::get($opp_id))) { $tpl->assign('opp', $opp); if (null != ($address = DAO_Address::get($opp->primary_email_id))) { $tpl->assign('address', $address); } } $custom_fields = DAO_CustomField::getBySource(CrmCustomFieldSource_Opportunity::ID); $tpl->assign('custom_fields', $custom_fields); if (!empty($opp_id)) { $custom_field_values = DAO_CustomFieldValue::getValuesBySourceIds(CrmCustomFieldSource_Opportunity::ID, $opp_id); if (isset($custom_field_values[$opp->id])) { $tpl->assign('custom_field_values', $custom_field_values[$opp->id]); } } $workers = DAO_Worker::getAllActive(); $tpl->assign('workers', $workers); $tpl->display('file:' . $tpl_path . 'crm/opps/rpc/peek.tpl'); }