init
This commit is contained in:
204
modules/CampaignLog/CampaignLog.php
Executable file
204
modules/CampaignLog/CampaignLog.php
Executable file
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class CampaignLog extends SugarBean {
|
||||
|
||||
var $table_name = 'campaign_log';
|
||||
var $object_name = 'CampaignLog';
|
||||
var $module_dir = 'CampaignLog';
|
||||
|
||||
var $new_schema = true;
|
||||
|
||||
var $campaign_id;
|
||||
var $target_tracker_key;
|
||||
var $target_id;
|
||||
var $target_type;
|
||||
var $activity_type;
|
||||
var $activity_date;
|
||||
var $related_id;
|
||||
var $related_type;
|
||||
var $deleted;
|
||||
var $list_id;
|
||||
var $hits;
|
||||
var $more_information;
|
||||
var $marketing_id;
|
||||
function CampaignLog() {
|
||||
global $sugar_config;
|
||||
parent::SugarBean();
|
||||
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
global $locale;
|
||||
$temp_array = $this->get_list_view_array();
|
||||
//make sure that both items in array are set to some value, else return null
|
||||
if(!(isset($temp_array['TARGET_TYPE']) && $temp_array['TARGET_TYPE']!= '') || !(isset($temp_array['TARGET_ID']) && $temp_array['TARGET_ID']!= ''))
|
||||
{ //needed values to construct query are empty/null, so return null
|
||||
$GLOBALS['log']->debug("CampaignLog.php:get_list_view_data duntion: temp_array['TARGET_TYPE'] and/or temp_array['TARGET_ID'] are empty, return null");
|
||||
$emptyArr = array();
|
||||
return $emptyArr;
|
||||
}
|
||||
if ( ( $this->db->dbType == 'mysql' ) or ( $this->db->dbType == 'oci8' ) )
|
||||
{
|
||||
$query="select first_name, last_name, CONCAT(CONCAT(first_name, ' '), last_name) name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'";
|
||||
}
|
||||
if($this->db->dbType == 'mssql')
|
||||
{
|
||||
$query="select first_name, last_name, (first_name + ' ' + last_name) name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'";
|
||||
}
|
||||
if($temp_array['TARGET_TYPE']=='Accounts'){
|
||||
$query="select name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'";
|
||||
}
|
||||
|
||||
$result=$this->db->query($query);
|
||||
$row=$this->db->fetchByAssoc($result);
|
||||
|
||||
if ($row) {
|
||||
if($temp_array['TARGET_TYPE']=='Accounts'){
|
||||
$temp_array['RECIPIENT_NAME']=$row['name'];
|
||||
}else{
|
||||
$full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], '');
|
||||
$temp_array['RECIPIENT_NAME']=$full_name;
|
||||
}
|
||||
}
|
||||
$temp_array['RECIPIENT_EMAIL']=$this->retrieve_email_address($temp_array['TARGET_ID']);
|
||||
|
||||
$query = 'select name from email_marketing where id = \'' . $temp_array['MARKETING_ID'] . '\'';
|
||||
$result=$this->db->query($query);
|
||||
$row=$this->db->fetchByAssoc($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$temp_array['MARKETING_NAME'] = $row['name'];
|
||||
}
|
||||
|
||||
return $temp_array;
|
||||
}
|
||||
|
||||
function retrieve_email_address($trgt_id = ''){
|
||||
$return_str = '';
|
||||
if(!empty($trgt_id)){
|
||||
$qry = " select eabr.primary_address, ea.email_address";
|
||||
$qry .= " from email_addresses ea ";
|
||||
$qry .= " Left Join email_addr_bean_rel eabr on eabr.email_address_id = ea.id ";
|
||||
$qry .= " where eabr.bean_id = '{$trgt_id}' ";
|
||||
$qry .= " and ea.deleted = 0 ";
|
||||
$qry .= " and eabr.deleted = 0" ;
|
||||
$qry .= " order by primary_address desc ";
|
||||
|
||||
$result=$this->db->query($qry);
|
||||
$row=$this->db->fetchByAssoc($result);
|
||||
|
||||
if (!empty($row['email_address'])){
|
||||
$return_str = $row['email_address'];
|
||||
}
|
||||
}
|
||||
return $return_str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//this function is called statically by the campaing_log subpanel.
|
||||
function get_related_name($related_id, $related_type) {
|
||||
global $locale;
|
||||
$db= DBManagerFactory::getInstance();
|
||||
if ($related_type == 'Emails') {
|
||||
$query="SELECT name from emails where id='$related_id'";
|
||||
$result=$db->query($query);
|
||||
$row=$db->fetchByAssoc($result);
|
||||
if ($row != null) {
|
||||
return $row['name'];
|
||||
}
|
||||
}
|
||||
if ($related_type == 'Contacts') {
|
||||
$query="SELECT first_name, last_name from contacts where id='$related_id'";
|
||||
$result=$db->query($query);
|
||||
$row=$db->fetchByAssoc($result);
|
||||
if ($row != null) {
|
||||
return $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']);
|
||||
}
|
||||
}
|
||||
if ($related_type == 'Leads') {
|
||||
$query="SELECT first_name, last_name from leads where id='$related_id'";
|
||||
$result=$db->query($query);
|
||||
$row=$db->fetchByAssoc($result);
|
||||
if ($row != null) {
|
||||
return $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']);
|
||||
}
|
||||
}
|
||||
if ($related_type == 'Prospects') {
|
||||
$query="SELECT first_name, last_name from prospects where id='$related_id'";
|
||||
$result=$db->query($query);
|
||||
$row=$db->fetchByAssoc($result);
|
||||
if ($row != null) {
|
||||
return $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']);
|
||||
}
|
||||
}
|
||||
if ($related_type == 'CampaignTrackers') {
|
||||
$query="SELECT tracker_url from campaign_trkrs where id='$related_id'";
|
||||
$result=$db->query($query);
|
||||
$row=$db->fetchByAssoc($result);
|
||||
if ($row != null) {
|
||||
return $row['tracker_url'] ;
|
||||
}
|
||||
}
|
||||
if ($related_type == 'Accounts') {
|
||||
$query="SELECT name from accounts where id='$related_id'";
|
||||
$result=$db->query($query);
|
||||
$row=$db->fetchByAssoc($result);
|
||||
if ($row != null) {
|
||||
return $row['name'];
|
||||
}
|
||||
}
|
||||
return $related_id.$related_type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
48
modules/CampaignLog/Menu.php
Executable file
48
modules/CampaignLog/Menu.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings, $app_strings;
|
||||
$module_menu = Array(
|
||||
);
|
||||
?>
|
||||
100
modules/CampaignLog/Popup_picker.html
Executable file
100
modules/CampaignLog/Popup_picker.html
Executable file
@@ -0,0 +1,100 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: SearchHeader -->
|
||||
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/popup_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" >
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
|
||||
<td align="right"><input type="hidden" name="action" value="PopupProspects"/>
|
||||
<input type="hidden" name="query" value="true"/>
|
||||
<input type="hidden" name="record" value="{RECORD_VALUE}"/>
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="form_submit" value="{FORM_SUBMIT}" />
|
||||
<input type="hidden" name="request_data" value="{request_data}" />
|
||||
<input type="hidden" name="form" value="{FORM}" />
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
/* initialize the popup request from the parent */
|
||||
|
||||
if(window.document.forms['popup_query_form'].request_data.value == "")
|
||||
{
|
||||
window.document.forms['popup_query_form'].request_data.value
|
||||
= JSON.stringify(window.opener.get_popup_request_data());
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
<!-- END: SearchHeader -->
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list view">
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20">
|
||||
<td scope="col" NOWRAP>{CHECKALL}</td>
|
||||
<td scope="col" width="35%" ><slot><a href="{ORDER_BY}campaign_name" class="listViewThLinkS1">{MOD.LBL_LIST_CAMPAIGN_NAME}{arrow_start}{campaign_name_arrow}{arrow_end}</a></slot></td>
|
||||
<td scope="col" width="20%" ><slot><a href="{ORDER_BY}activity_date" class="listViewThLinkS1">{MOD.LBL_LIST_ACTIVITY_DATE}{arrow_start}{activity_date_arrow}{arrow_end}</a></slot></td>
|
||||
<td scope="col" width="45%" nowrap><slot><a href="{ORDER_BY}campaign_objective" class="listViewThLinkS1">{MOD.LBL_LIST_CAMPAIGN_OBJECTIVE}{arrow_start}{campaign_objective_arrow}{arrow_end}</a></slot></td>
|
||||
</tr>
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
<td valign="top">{PREROW}</td>
|
||||
<td scope='row' valign=TOP><slot><{TAG_TYPE} href="#" onclick="send_back('CampaignLog','{CAMPAIGNLOG.ID}');">{CAMPAIGNLOG.CAMPAIGN_NAME}</{TAG_TYPE}></slot></td>
|
||||
<td valign=TOP><slot>{CAMPAIGNLOG.ACTIVITY_DATE}</slot></td>
|
||||
<td nowrap="nowrap" valign="top"><slot>{CAMPAIGNLOG.CAMPAIGN_OBJECTIVE}</slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="20" class="listViewHRS1"></td>
|
||||
</tr>
|
||||
<!-- END: row -->
|
||||
</table>
|
||||
{ASSOCIATED_JAVASCRIPT_DATA}
|
||||
<!-- END: main -->
|
||||
177
modules/CampaignLog/Popup_picker.php
Executable file
177
modules/CampaignLog/Popup_picker.php
Executable file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $theme;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class Popup_Picker
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function Popup_Picker()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function _get_where_clause()
|
||||
{
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query']))
|
||||
{
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "target_id", "campaign_log.target_id");
|
||||
//append_where_clause($where_clauses, "last_name", "prospects.last_name");
|
||||
|
||||
$where = generate_where_statement($where_clauses);
|
||||
if (!empty($where))
|
||||
$where.=" AND ";
|
||||
$where .=" activity_type='targeted'";
|
||||
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//START:FOR MULTI-SELECT
|
||||
$multi_select=false;
|
||||
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Prospects',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/CampaignLog/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
//$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new CampaignLog();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->multi_select_popup=$multi_select; //FOR MULTI-SELECT
|
||||
if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");//FOR MULTI-SELECT
|
||||
//$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']); //FOR MULTI-SELECT
|
||||
//$ListView->setHeaderText($button); //FOR MULTI-SELECT
|
||||
$ListView->setQuery($where, '', 'campaign_name', 'CAMPAIGNLOG');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false); //FOR MULTI-SELECT
|
||||
$ListView->processListView($seed_bean, 'main', 'CAMPAIGNLOG');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
} // end of class Popup_Picker
|
||||
?>
|
||||
99
modules/CampaignLog/language/en_us.lang.php
Executable file
99
modules/CampaignLog/language/en_us.lang.php
Executable file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_LIST_ID'=>'Prospect List ID',
|
||||
'LBL_ID' => 'ID',
|
||||
'LBL_TARGET_TRACKER_KEY'=>'Target Tracker Key',
|
||||
'LBL_TARGET_ID'=>'Target ID',
|
||||
'LBL_TARGET_TYPE'=>'Target Type',
|
||||
'LBL_ACTIVITY_TYPE' =>'Activity Type',
|
||||
'LBL_ACTIVITY_DATE' => 'Activity Date',
|
||||
'LBL_RELATED_ID' => 'Related Id',
|
||||
'LBL_RELATED_TYPE'=>'Related Type',
|
||||
'LBL_DELETED' => 'Deleted',
|
||||
'LBL_MODULE_NAME' =>'Campaign Log',
|
||||
'LBL_LIST_RECIPIENT_EMAIL'=>'Recipient Email',
|
||||
'LBL_LIST_RECIPIENT_NAME'=>'Recipient Name',
|
||||
'LBL_ARCHIVED'=>'Archived',
|
||||
'LBL_HITS'=>'Hits',
|
||||
|
||||
'LBL_CAMPAIGN_NAME' => 'Name:',
|
||||
'LBL_CAMPAIGN' => 'Campaign:',
|
||||
'LBL_NAME' => 'Name: ',
|
||||
'LBL_INVITEE' => 'Contacts',
|
||||
'LBL_LIST_CAMPAIGN_NAME' => 'Campaign',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_LIST_TYPE' => 'Type',
|
||||
'LBL_LIST_END_DATE' => 'End Date',
|
||||
'LBL_DATE_ENTERED' => 'Date Entered',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
'LBL_MODIFIED' => 'Modified By: ',
|
||||
'LBL_CREATED' => 'Created By: ',
|
||||
'LBL_TEAM' => 'Team: ',
|
||||
'LBL_ASSIGNED_TO' => 'Assigned To: ',
|
||||
'LBL_CAMPAIGN_START_DATE' => 'Start Date: ',
|
||||
'LBL_CAMPAIGN_END_DATE' => 'End Date: ',
|
||||
'LBL_CAMPAIGN_STATUS' => 'Status: ',
|
||||
'LBL_CAMPAIGN_BUDGET' => 'Budget: ',
|
||||
'LBL_CAMPAIGN_EXPECTED_COST' => 'Expected Cost: ',
|
||||
'LBL_CAMPAIGN_ACTUAL_COST' => 'Actual Cost: ',
|
||||
'LBL_CAMPAIGN_EXPECTED_REVENUE' => 'Expected Revenue: ',
|
||||
'LBL_CAMPAIGN_TYPE' => 'Type: ',
|
||||
'LBL_CAMPAIGN_OBJECTIVE' => 'Objective: ',
|
||||
'LBL_CAMPAIGN_CONTENT' => 'Description: ',
|
||||
'LBL_CREATED_LEAD' => 'Created Lead',
|
||||
'LBL_CREATED_CONTACT' => 'Created Contact',
|
||||
'LBL_LIST_FORM_TITLE'=> 'Targeted Campaigns',
|
||||
'LBL_LIST_ACTIVITY_DATE'=>'Activity Date',
|
||||
'LBL_LIST_CAMPAIGN_OBJECTIVE'=>'Campaign Objective',
|
||||
'LBL_RELATED'=>'Related',
|
||||
'LBL_CLICKED_URL_KEY'=>'Clicked URL Key',
|
||||
'LBL_URL_CLICKED'=>'URL Clicked',
|
||||
'LBL_MORE_INFO'=>'More Information',
|
||||
|
||||
'LBL_CAMPAIGNS' => 'Campaigns',
|
||||
'LBL_LIST_MARKETING_NAME' => 'Marketing Id',
|
||||
);
|
||||
?>
|
||||
85
modules/CampaignLog/language/pl_pl.lang.php
Executable file
85
modules/CampaignLog/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1-->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_LIST_ID'=>'ID List potencjalnych klientów',
|
||||
'LBL_ID' => 'ID',
|
||||
'LBL_TARGET_TRACKER_KEY'=>'Klucz śledzenia celu',
|
||||
'LBL_TARGET_ID'=>'ID celu',
|
||||
'LBL_TARGET_TYPE'=>'Typ celu',
|
||||
'LBL_ACTIVITY_TYPE' =>'Rodzaje działań',
|
||||
'LBL_ACTIVITY_DATE' => 'Data działań',
|
||||
'LBL_RELATED_ID' => 'ID powiązania',
|
||||
'LBL_RELATED_TYPE'=>'Typ powiązania',
|
||||
'LBL_DELETED' => 'Usunięte',
|
||||
'LBL_MODULE_NAME' =>'Log kampanii',
|
||||
'LBL_LIST_RECIPIENT_EMAIL'=>'Odbiorca poczty',
|
||||
'LBL_LIST_RECIPIENT_NAME'=>'Nazwa odbiorcy',
|
||||
'LBL_ARCHIVED'=>'Archiwum',
|
||||
'LBL_HITS'=>'Trafienia',
|
||||
|
||||
'LBL_CAMPAIGN_NAME' => 'Nazwa:',
|
||||
'LBL_CAMPAIGN' => 'Kampania:',
|
||||
'LBL_NAME' => 'Nazwa: ',
|
||||
'LBL_INVITEE' => 'Kontakty',
|
||||
'LBL_LIST_CAMPAIGN_NAME' => 'Kampania',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_LIST_TYPE' => 'Typ',
|
||||
'LBL_LIST_END_DATE' => 'Data zakończenia',
|
||||
'LBL_DATE_ENTERED' => 'Data wprowadzenia',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji',
|
||||
'LBL_MODIFIED' => 'Zmodyfikowane przez: ',
|
||||
'LBL_CREATED' => 'Stworzone przez: ',
|
||||
'LBL_TEAM' => 'Zespół: ',
|
||||
'LBL_ASSIGNED_TO' => 'Przydzielone do: ',
|
||||
'LBL_CAMPAIGN_START_DATE' => 'Data rozpoczęcia: ',
|
||||
'LBL_CAMPAIGN_END_DATE' => 'Data zakończenia: ',
|
||||
'LBL_CAMPAIGN_STATUS' => 'Status: ',
|
||||
'LBL_CAMPAIGN_BUDGET' => 'Budżet: ',
|
||||
'LBL_CAMPAIGN_EXPECTED_COST' => 'Spodziewane koszty: ',
|
||||
'LBL_CAMPAIGN_ACTUAL_COST' => 'Aktualne koszty: ',
|
||||
'LBL_CAMPAIGN_EXPECTED_REVENUE' =>'Spodziewany dochód: ',
|
||||
'LBL_CAMPAIGN_TYPE' => 'Typ: ',
|
||||
'LBL_CAMPAIGN_OBJECTIVE' => 'Rzeczywisty: ',
|
||||
'LBL_CAMPAIGN_CONTENT' => 'Opis: ',
|
||||
'LBL_CREATED_LEAD' => 'Utwórz wizytówkę',
|
||||
'LBL_CREATED_CONTACT' => 'Utwórz kontakt',
|
||||
'LBL_LIST_FORM_TITLE' => 'Pozycjonowane kampanie',
|
||||
'LBL_LIST_ACTIVITY_DATE' =>'Data działania',
|
||||
'LBL_LIST_CAMPAIGN_OBJECTIVE' =>'Rzeczywista kampania',
|
||||
'LBL_RELATED' =>'Powiązany',
|
||||
'LBL_CLICKED_URL_KEY' =>'Kliknięte klucze URL',
|
||||
'LBL_URL_CLICKED' =>'Kliknięte adresy URL',
|
||||
'LBL_MORE_INFO' =>'Więcej Informacji',
|
||||
'LBL_CAMPAIGNS' =>'Kampanie',
|
||||
);
|
||||
?>
|
||||
86
modules/CampaignLog/metadata/subpanels/ForTargets.php
Executable file
86
modules/CampaignLog/metadata/subpanels/ForTargets.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'campaign_name1'=>array(
|
||||
'vname' => 'LBL_LIST_CAMPAIGN_NAME',
|
||||
'width' => '20%',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'campaign_id',
|
||||
'target_module' => 'Campaigns',
|
||||
),
|
||||
'activity_type' => array(
|
||||
'vname' => 'LBL_ACTIVITY_TYPE',
|
||||
'width' => '10%',
|
||||
),
|
||||
'activity_date' => array(
|
||||
'vname' => 'LBL_ACTIVITY_DATE',
|
||||
'width' => '10%',
|
||||
),
|
||||
'related_name' => array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'related_id',
|
||||
'target_module_key' => 'related_type',
|
||||
'parent_id' =>'target_id',
|
||||
'parent_module'=>'target_type',
|
||||
'vname' => 'LBL_RELATED',
|
||||
'width' => '60%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'related_id'=>array(
|
||||
'usage' =>'query_only',
|
||||
),
|
||||
'related_type'=>array(
|
||||
'usage' =>'query_only',
|
||||
),
|
||||
'target_id'=>array(
|
||||
'usage' =>'query_only',
|
||||
),
|
||||
'target_type'=>array(
|
||||
'usage' =>'query_only',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
99
modules/CampaignLog/metadata/subpanels/default.php
Executable file
99
modules/CampaignLog/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelAddToProspectListButton','create'=>'true'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'recipient_name'=>array(
|
||||
'vname' => 'LBL_LIST_RECIPIENT_NAME',
|
||||
'width' => '14%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'recipient_email'=>array(
|
||||
'vname' => 'LBL_LIST_RECIPIENT_EMAIL',
|
||||
'width' => '14%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'marketing_name'=>array(
|
||||
'vname' => 'LBL_LIST_MARKETING_NAME',
|
||||
'width' => '14%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'activity_type' => array(
|
||||
'vname' => 'LBL_ACTIVITY_TYPE',
|
||||
'width' => '14%',
|
||||
),
|
||||
'activity_date' => array(
|
||||
'vname' => 'LBL_ACTIVITY_DATE',
|
||||
'width' => '14%',
|
||||
),
|
||||
'related_name' => array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'related_id',
|
||||
'target_module_key' => 'related_type',
|
||||
'parent_id' =>'target_id',
|
||||
'parent_module'=>'target_type',
|
||||
'vname' => 'LBL_RELATED',
|
||||
'width' => '20%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'hits' => array(
|
||||
'vname' => 'LBL_HITS',
|
||||
'width' => '5%',
|
||||
),
|
||||
'target_id'=>array(
|
||||
'usage' =>'query_only',
|
||||
),
|
||||
'target_type'=>array(
|
||||
'usage' =>'query_only',
|
||||
),
|
||||
'related_id'=>array(
|
||||
'usage' =>'query_only',
|
||||
),
|
||||
'related_type'=>array(
|
||||
'usage' =>'query_only',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
282
modules/CampaignLog/vardefs.php
Executable file
282
modules/CampaignLog/vardefs.php
Executable file
@@ -0,0 +1,282 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$dictionary['CampaignLog'] = array ('audited'=>false,
|
||||
'comment' => 'Tracks items of interest that occurred after you send an email campaign',
|
||||
'table' => 'campaign_log',
|
||||
|
||||
'fields' => array (
|
||||
'id' => array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => true,
|
||||
'reportable'=>true,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
'campaign_id' => array (
|
||||
'name' => 'campaign_id',
|
||||
'vname' => 'LBL_CAMPAIGN_ID',
|
||||
'type' => 'id',
|
||||
'comment' => 'Campaign identifier'
|
||||
),
|
||||
'target_tracker_key' => array (
|
||||
'name' => 'target_tracker_key',
|
||||
'vname' => 'LBL_TARGET_TRACKER_KEY',
|
||||
'type' => 'varchar',
|
||||
'len' => '36',
|
||||
'comment' => 'Identifier of Tracker URL'
|
||||
),
|
||||
'target_id' => array (
|
||||
'name' => 'target_id',
|
||||
'vname' => 'LBL_TARGET_ID',
|
||||
'type' => 'varchar',
|
||||
'len' => '36',
|
||||
'comment' => 'Identifier of target record'
|
||||
),
|
||||
'target_type' => array (
|
||||
'name' => 'target_type',
|
||||
'vname' => 'LBL_TARGET_TYPE',
|
||||
'type' => 'varchar',
|
||||
'len' => '25',
|
||||
'comment' => 'Descriptor of the target record type (e.g., Contact, Lead)'
|
||||
),
|
||||
'activity_type' => array (
|
||||
'name' => 'activity_type',
|
||||
'vname' => 'LBL_ACTIVITY_TYPE',
|
||||
'type' => 'enum',
|
||||
'options'=>'campainglog_activity_type_dom',
|
||||
'len' => '25',
|
||||
'comment' => 'The activity that occurred (e.g., Viewed Message, Bounced, Opted out)'
|
||||
),
|
||||
'activity_date' => array (
|
||||
'name' => 'activity_date',
|
||||
'vname' => 'LBL_ACTIVITY_DATE',
|
||||
'type' => 'datetime',
|
||||
'comment' => 'The date the activity occurred'
|
||||
),
|
||||
'related_id' => array (
|
||||
'name' => 'related_id',
|
||||
'vname' => 'LBL_RELATED_ID',
|
||||
'type' => 'varchar',
|
||||
'len' => '36',
|
||||
),
|
||||
'related_type' => array (
|
||||
'name' => 'related_type',
|
||||
'vname' => 'LBL_RELATED_TYPE',
|
||||
'type' => 'varchar',
|
||||
'len' => '25',
|
||||
),
|
||||
'archived' => array (
|
||||
'name' => 'archived',
|
||||
'vname' => 'LBL_ARCHIVED',
|
||||
'type' => 'bool',
|
||||
'reportable'=>false,
|
||||
'default'=>'0',
|
||||
'comment' => 'Indicates if item has been archived'
|
||||
),
|
||||
'hits' => array (
|
||||
'name' => 'hits',
|
||||
'vname' => 'LBL_HITS',
|
||||
'type' => 'int',
|
||||
'default'=>'0',
|
||||
'reportable'=>true,
|
||||
'comment' => 'Number of times the item has been invoked (e.g., multiple click-thrus)'
|
||||
),
|
||||
'list_id' => array(
|
||||
'name' => 'list_id',
|
||||
'vname' => 'LBL_LIST_ID',
|
||||
'type' => 'id',
|
||||
'reportable' =>false,
|
||||
'len' => '36',
|
||||
'comment' => 'The target list from which item originated'
|
||||
),
|
||||
'deleted' => array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED',
|
||||
'type' => 'bool',
|
||||
'reportable'=>false,
|
||||
'comment' => 'Record deletion indicator'
|
||||
),
|
||||
'recipient_name' => array(
|
||||
'name' => 'recipient_name',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'recipient_email' => array(
|
||||
'name' => 'recipient_email',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'marketing_name' => array(
|
||||
'name' => 'marketing_name',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'campaign_name1' => array (
|
||||
'name' => 'campaign_name1',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'campaign_id',
|
||||
'vname' => 'LBL_CAMPAIGN_NAME',
|
||||
'type' => 'relate',
|
||||
'table' => 'campaigns',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Campaigns',
|
||||
'dbType' => 'varchar',
|
||||
'link'=>'campaign',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'campaign_name' => array(
|
||||
'name' => 'campaign_name',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'campaign_objective' => array(
|
||||
'name' => 'campaign_objective',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'campaign_content' => array(
|
||||
'name' => 'campaign_content',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'campaign'=> array (
|
||||
'name' => 'campaign',
|
||||
'type' => 'link',
|
||||
'relationship' => 'campaign_campaignlog',
|
||||
'source'=>'non-db',
|
||||
'vname'=> 'LBL_CAMPAIGNS',
|
||||
),
|
||||
'related_name'=>array (
|
||||
'source'=>'function',
|
||||
'function_name'=>'get_related_name',
|
||||
'function_class'=>'CampaignLog',
|
||||
'function_params'=> array('related_id', 'related_type'),
|
||||
'function_params_source'=>'this', //valid values are 'parent' or 'this' default is parent.
|
||||
'type'=>'function',
|
||||
'name'=>'related_name',
|
||||
'reportable'=>false,
|
||||
),
|
||||
'date_modified' => array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
),
|
||||
'more_information'=> array(
|
||||
'name'=>'more_information',
|
||||
'vname'=>'LBL_MORE_INFO',
|
||||
'type'=>'varchar',
|
||||
'len'=>'100',
|
||||
),
|
||||
'marketing_id' => array(
|
||||
'name' => 'marketing_id',
|
||||
'vname' => 'LBL_MARKETING_ID',
|
||||
'type' => 'id',
|
||||
'reportable' =>false,
|
||||
'comment' => 'ID of marketing email this entry is associated with',
|
||||
),
|
||||
'created_contact'=> array (
|
||||
'name' => 'created_contact',
|
||||
'vname' => 'LBL_CREATED_CONTACT',
|
||||
'type' => 'link',
|
||||
'relationship' => 'campaignlog_contact',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'created_lead'=> array (
|
||||
'name' => 'created_lead',
|
||||
'vname' => 'LBL_CREATED_LEAD',
|
||||
'type' => 'link',
|
||||
'relationship' => 'campaignlog_lead',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
),
|
||||
'indices' => array (
|
||||
array (
|
||||
'name' =>'campaign_log_pk',
|
||||
|
||||
'type' =>'primary',
|
||||
'fields'=>array('id')
|
||||
),
|
||||
array (
|
||||
'name' =>'idx_camp_tracker',
|
||||
|
||||
'type' =>'index',
|
||||
'fields'=>array('target_tracker_key')
|
||||
),
|
||||
|
||||
array (
|
||||
'name' =>'idx_camp_campaign_id',
|
||||
|
||||
'type' =>'index',
|
||||
'fields'=>array('campaign_id')
|
||||
),
|
||||
|
||||
array (
|
||||
'name' =>'idx_camp_more_info',
|
||||
|
||||
'type' =>'index',
|
||||
'fields'=>array('more_information')
|
||||
),
|
||||
),
|
||||
'relationships' => array (
|
||||
'campaignlog_contact' => array( 'lhs_module'=> 'CampaignLog',
|
||||
'lhs_table'=> 'campaign_log',
|
||||
'lhs_key' => 'related_id',
|
||||
'rhs_module'=> 'Contacts',
|
||||
'rhs_table'=> 'contacts',
|
||||
'rhs_key' => 'id',
|
||||
'relationship_type'=>'one-to-many'),
|
||||
'campaignlog_lead' => array('lhs_module'=> 'CampaignLog',
|
||||
'lhs_table'=> 'campaign_log',
|
||||
'lhs_key' => 'related_id',
|
||||
'rhs_module'=> 'Leads',
|
||||
'rhs_table'=> 'leads',
|
||||
'rhs_key' => 'id',
|
||||
'relationship_type'=>'one-to-many'),
|
||||
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
Reference in New Issue
Block a user