更新到 5.2 正式版后第一次 SVN 提交。

[email protected]


git-svn-id: https://svn.code.sf.net/p/hawebs/svn@618 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
YuCheng Hu
2010-11-16 08:20:29 +00:00
parent 706ed2d268
commit 9cce682da9
32 changed files with 4212 additions and 0 deletions
@@ -0,0 +1,113 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
require_once('Smarty_setup.php');
require_once('include/utils/utils.php');
//Redirecting Header for single page layout
require_once('user_privileges/default_module_view.php');
global $singlepane_view;
$currentmodule = vtlib_purify($_REQUEST['module']);
$RECORD = vtlib_purify($_REQUEST['record']);
$category = getParentTab();
if($singlepane_view == 'true' && $_REQUEST['action'] == 'CallRelatedList' ) {
header("Location:index.php?action=DetailView&module=$currentmodule&record=$RECORD&parenttab=$category");
} else {
$focus = CRMEntity::getInstance($currentmodule);
if(isset($_REQUEST['record']) && $_REQUEST['record']!='') {
$focus->retrieve_entity_info($RECORD,$currentmodule);
$focus->id = $RECORD;
$focus->firstname=$focus->column_fields['firstname'];
$focus->lastname=$focus->column_fields['lastname'];
$log->debug("id is ".$focus->id);
$log->debug("name is ".$focus->name);
}
global $mod_strings;
global $app_strings;
global $theme;
global $currentModule;
global $current_user;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
$smarty = new vtigerCRM_Smarty;
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
}
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
$smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode']));
}
if(!$_SESSION['rlvs'][$module])
{
unset($_SESSION['rlvs']);
}
if(isset($_REQUEST['record']) && $_REQUEST['record']!='')
{
$userid = $current_user->id;
$sql = "select fieldname from vtiger_field where uitype = '13' and tabid = 7 and vtiger_field.presence in (0,2)";
$result = $adb->pquery($sql, array());
$num_fieldnames = $adb->num_rows($result);
for($i = 0; $i < $num_fieldnames; $i++)
{
$fieldname = $adb->query_result($result,$i,"fieldname");
$permit= getFieldVisibilityPermission("Leads",$userid,$fieldname);
}
}
$smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar'));
$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events'));
$smarty->assign("CATEGORY",$category);
$parent_email = getEmailParentsList('Leads',$focus->id, $focus);
$smarty->assign("HIDDEN_PARENTS_LIST",$parent_email);
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
if ($mod_seq_field != null) {
$mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
} else {
$mod_seq_id = $focus->id;
}
$smarty->assign('MOD_SEQ_ID', $mod_seq_id);
// END
$smarty->assign("ID",$focus->id);
$smarty->assign("NAME",$focus->lastname.' '.$focus->firstname);
$smarty->assign("EMAIL",$focus->column_fields['email']);
$smarty->assign("YAHOO",$focus->column_fields['yahooid']);
$related_array = getRelatedLists($currentModule,$focus);
$smarty->assign("RELATEDLISTS", $related_array);
require_once('include/ListView/RelatedListViewSession.php');
if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) {
$relationId = vtlib_purify($_REQUEST['relation_id']);
RelatedListViewSession::addRelatedModuleToSession($relationId,
vtlib_purify($_REQUEST['selected_header']));
}
$open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
$smarty->assign("SELECTEDHEADERS", $open_related_modules);
$smarty->assign("SINGLE_MOD",$app_strings['Lead']);
$smarty->assign("MODULE", $currentmodule);
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
$smarty->assign("MOD",$mod_strings);
$smarty->assign("APP",$app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$smarty->display("RelatedLists.tpl");
}
?>
@@ -0,0 +1,272 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
require_once('data/Tracker.php');
require_once('include/utils/utils.php');
require_once('include/utils/UserInfoUtil.php');
global $mod_strings,$app_strings,$log,$current_user,$theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
if(isset($_REQUEST['record']))
{
$id = $_REQUEST['record'];
$log->debug(" the id is ".$id);
}
$category = getParentTab();
//Retreive lead details from database
$sql = "SELECT firstname, lastname, company, smownerid from vtiger_leaddetails inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_leaddetails.leadid where vtiger_leaddetails.leadid =?";
$result = $adb->pquery($sql, array($id));
$row = $adb->fetch_array($result);
//if company field is not present
if(getFieldVisibilityPermission('Leads',$current_user->id,'company') == '1'){
$row["company"] = '';
}
$firstname = $row["firstname"];
$lastname = $row["lastname"];
$company = $row["company"];
$potentialname = $row["company"] ."-";
$userid = $row["smownerid"];
//Retreiving the current user id
$modified_user_id = $current_user->id;
$log->info("Convert Lead view");
$date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']);
$roleid=$current_user->roleid;
$subrole = getRoleSubordinates($roleid);
if(count($subrole)> 0)
{
$roleids = $subrole;
array_push($roleids, $roleid);
}
else
{
$roleids = $roleid;
}
if($sortid != '') {
$sales_stage_query="select sales_stage from vtiger_sales_stage";
$params = array();
}
elseif($is_admin)
{
$sales_stage_query="select sales_stage from vtiger_sales_stage inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_sales_stage.picklist_valueid where roleid != 'H1' order by sortid";
$params = array();
}else
{
if (count($roleids) > 0) {
$sales_stage_query="select sales_stage from vtiger_sales_stage inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_sales_stage.picklist_valueid where roleid in (". generateQuestionMarks($roleids) .") and picklistid in (select picklistid from vtiger_sales_stage) order by sortid";
$params = array($roleids);
} else {
$sales_stage_query="select sales_stage from vtiger_sales_stage inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_sales_stage.picklist_valueid where picklistid in (select picklistid from vtiger_sales_stage) order by sortid";
$params = array();
}
}
$sales_stage_result = $adb->pquery($sales_stage_query, $params);
$noofsalesRows = $adb->num_rows($sales_stage_result);
$sales_stage_fld = '';
$sales_stage_list[] = array();
for($j = 0; $j < $noofsalesRows; $j++)
{
$sales_stageValue=$adb->query_result($sales_stage_result,$j,strtolower(sales_stage));
if(in_array($sales_stageValue,$sales_stage_list)) continue;
$sales_stage_list[] = $sales_stageValue;
if($value == $sales_stageValue)
{
$chk_val = "selected";
}
else
{
$chk_val = '';
}
$sales_stage_fld.= '<OPTION value="'.$sales_stageValue.'" '.$chk_val.'>'.getTranslatedString($sales_stageValue).'</OPTION>';
}
function isActive($field,$mod){
global $adb,$theme;
$tabid = getTabid($mod);
$query = 'select * from vtiger_field where fieldname = ? and tabid = ? and presence in (0,2)';
$res = $adb->pquery($query,array($field,$tabid));
$rows = $adb->num_rows($res);
if($rows > 0){
return true;
}else
return false;
}
$userselected = '';
$groupselected = '';
$userdisplay = 'none';
$groupdisplay = 'none';
$private = '';
if($userid != ''){
global $adb;
$query = "SELECT * from vtiger_users WHERE id = ?";
$res = $adb->pquery($query,array($userid));
$rows = $adb->num_rows($res);
if($rows > 0){
$userselected = 'checked';
$userdisplay= 'block';
}else{
$groupselected = 'checked';
$groupdisplay= 'block';
}
}
if($current_user->id != 1){
require('user_privileges/sharing_privileges_'.$current_user->id.'.php');
$Acc_tabid= getTabid('Accounts');
$con_tabid = getTabid('Contacts');
if($defaultOrgSharingPermission[$Acc_tabid] === 0 || $defaultOrgSharingPermission[$Acc_tabid] == 3){
$private = 'private';
}elseif($defaultOrgSharingPermission[$con_tabid] === 0 || $defaultOrgSharingPermission[$con_tabid] == 3){
$private = 'private';
}
}
$convertlead = '<form name="ConvertLead" method="POST" action="index.php" onsubmit="VtigerJS_DialogBox.block();">
<input type="hidden" name="module" value="Leads">
<input type="hidden" name="record" value="'.$id.'">
<input type="hidden" name="action">
<input type="hidden" name="parenttab" value="'.$category.'">
<input type="hidden" name="current_user_id" value="'.$modified_user_id.'">
<div id="orgLay" style="display: block;" class="layerPopup" >
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="layerHeadingULine">
<tr>
<td class="genHeaderSmall" align="left"><IMG src="'. vtiger_imageurl('Leads.gif', $theme).'">'.$mod_strings['LBL_CONVERT_LEAD'].' '.$firstname.' '.$lastname.'</td>
<td align="right"><a href="javascript:fninvsh(\'orgLay\');"><img src="'. vtiger_imageurl('close.gif', $theme).'" align="absmiddle" border="0"></a></td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=0 width=95% align=center>
<tr>
<td class=small >
<table border=0 celspacing=0 cellpadding=5 width=100% align=center bgcolor=white>
<tr>
<td colspan="2" class="detailedViewHeader"><b>'.$mod_strings['LBL_CONVERT_LEAD_INFORMATION'].'</b></td>
</tr>
<tr>
<td align="right" class="dvtCellLabel" width="50%">'.$app_strings['LBL_ASSIGNED_TO'].'</td>
<td class="dvtCellInfo" width="50%">
<input type="radio" name="assigntype" value="U" onclick="toggleAssignType(this.value)" '.$userselected.' />&nbsp;'.$app_strings['LBL_USER'].'
<input type="radio" name="assigntype" value="T" onclick="toggleAssignType(this.value)" '.$groupselected.' />&nbsp;'.$app_strings['LBL_GROUP'].'
<span id="assign_user" style="display:'.$userdisplay.'">
<select name="assigned_user_id" class="detailedViewTextBox">'.get_select_options_with_id(get_user_array(false,"Active", $userid,$private),$userid).'</select>
</span>
<span id="assign_team" style="display:'.$groupdisplay.'">
<select name="assigned_group_id" class="detailedViewTextBox">'.get_select_options_with_id(get_group_array(false,"Active", $userid,$private),$userid).'</select>
</span>
</td>
</tr>';
if(vtlib_isModuleActive('Accounts') && (isPermitted('Accounts','EditView')== 'yes')){
$convertlead .= '<tr>
<td align="right" class="dvtCellLabel">'.$mod_strings['LBL_ACCOUNT_NAME'].'</td>
<td class="dvtCellInfo"><input type="text" name="account_name" class="detailedViewTextBox" value="'.$company.'" readonly="readonly"></td>
</tr>';
}
if(vtlib_isModuleActive('Potentials') && (isPermitted('Potentials','EditView')== 'yes')){
// An array which as module => fields mapping, to check for field permissions
$fields_list = array( 'Potentials'=> array('potentialname', 'closingdate', 'amount', 'sales_stage'));
$fields_permission = array();
foreach($fields_list as $mod=>$fields){
foreach($fields as $key=>$field) {
if(getFieldVisibilityPermission($mod, $current_user->id, $field)=='0' && (isActive($field,$mod) == true)){
$fields_permission[$field] = '0';
$potTabid = getTabid('Potentials');
global $adb;
$query = 'select typeofdata from vtiger_field where fieldname = ? and tabid = ?';
$res = $adb->pquery($query,array($field,$potTabid));
$type = $adb->query_result($res,0,'typeofdata');
if(strpos($type,'M')){
$mandatory[$field] = '*';
}
}
else
$fields_permission[$field] = '1';
}
}
$convertlead .='<tr>
<td align="right" class="dvtCellLabel">'.$mod_strings['LBL_DO_NOT_CREATE_NEW_POTENTIAL'].'</td>
<td class="dvtCellInfo"><input type="checkbox" name="createpotential" onClick="if(this.checked) { $(\'ch\').hide(); } else { $(\'ch\').show(); }"></td>
</tr>
<tr>
<td colspan="2" id="ch" height="100px" style="padding:0px;" >
<div style="display: block;" id="cc" >
<table width="100%" border="0" cellpadding="5" cellspacing="0" >';
if($fields_permission['potentialname']=='0') {
$convertlead .= '<tr>
<td align="right" class="dvtCellLabel" width="53%"><font color="red">'.$mandatory['potentialname'].'</font>'.$mod_strings['LBL_POTENTIAL_NAME'].'</td>
<td class="dvtCellInfo" width="47%">
<input name="potential_name" class="detailedViewTextBox" value="'.$potentialname.'" tabindex="3">
<input type="hidden" name="potentialname_mandatory" id="potentialname_mandatory" value='.$mandatory['potentialname'].' />
</td>
</tr>';
}
if($fields_permission['closingdate']=='0') {
$convertlead .= '<tr>
<td align="right" class="dvtCellLabel"><font color="red">'.$mandatory['closingdate'].'</font>'.$mod_strings['LBL_POTENTIAL_CLOSE_DATE'].'</td>
<td class="dvtCellInfo">
<input type="hidden" name="closingdate_mandatory" id="closingdate_mandatory" value='.$mandatory['closingdate'].' />
<input name="closedate" style="border: 1px solid rgb(186, 186, 186);" id="jscal_field_closedate" type="text" tabindex="4" size="10" maxlength="10" value="'.$focus->closedate.'">
<img src="themes/'.$theme.'/images/btnL3Calendar.gif" id="jscal_trigger_closedate" >
<font size=1><em old="(yyyy-mm-dd)">('.$current_user->date_format.')</em></font>
<script id="conv_leadcal">
getCalendarPopup(\'jscal_trigger_closedate\',\'jscal_field_closedate\',\''.$date_format.'\')
</script>
</td>
</tr>';
}
if($fields_permission['amount']=='0') {
$convertlead .= '<tr>
<td align="right" class="dvtCellLabel"><font color="red">'.$mandatory['amount'].'</font>'.$mod_strings['LBL_POTENTIAL_AMOUNT'].'</td>
<td class="dvtCellInfo">
<input type="hidden" name="amount_mandatory" id="amount_mandatory" value='.$mandatory['amount'].' />
<input type="text" name="potential_amount" class="detailedViewTextBox">'.$potential_amount.'</td>
</tr>';
}
if($fields_permission['sales_stage']=='0') {
$convertlead .='<tr>
<td align="right" class="dvtCellLabel"><font color="red">'.$mandatory['sales_stage'].'</font>'.$mod_strings['LBL_POTENTIAL_SALES_STAGE'].'</td>
<td class="dvtCellInfo">
<input type="hidden" name="salesstage_mandatory" id="salesstage_mandatory" value='.$mandatory['sales_stage'].' />
<select name="potential_sales_stage" class="detailedViewTextBox">'.$sales_stage_fld.'</select></td>
</tr>';
}
$convertlead .='</table>
</div>
</td>
</tr>';
}
$convertlead .='</table>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=5 width=100% class="layerPopupTransport">
<tr>
<td align="center">
<input name="Save" value=" '.$app_strings['LBL_SAVE_BUTTON_LABEL'].' " onclick="this.form.action.value=\'LeadConvertToEntities\'; return verify_data(ConvertLead)" type="submit" class="crmbutton save small">&nbsp;&nbsp;
<input type="button" name=" Cancel " value=" '.$app_strings['LBL_CANCEL_BUTTON_LABEL'].' " onClick="hide(\'orgLay\')" class="crmbutton cancel small">
</td>
</tr>
</table>
</div></form>';
echo $convertlead;
?>
@@ -0,0 +1,12 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
include('modules/CustomView/CustomAction.php');
?>
@@ -0,0 +1,14 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
include('modules/CustomView/index.php');
?>
+39
View File
@@ -0,0 +1,39 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header$
* Description: Deletes an Account record and then redirects the browser to the
* defined return URL.
********************************************************************************/
global $currentModule;
$focus = CRMEntity::getInstance($currentModule);
global $mod_strings;
require_once('include/logging.php');
$log = LoggerManager::getLogger('lead_delete');
//Added to fix 4600
$url = getBasic_Advance_SearchURL();
if(!isset($_REQUEST['record']))
die($mod_strings['ERR_DELETE_RECORD']);
DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$_REQUEST['record'],$_REQUEST['return_id']);
$parenttab = getParentTab();
header("Location: index.php?module=".vtlib_purify($_REQUEST['return_module'])."&action=".vtlib_purify($_REQUEST['return_action'])."&record=".vtlib_purify($_REQUEST['return_id'])."&parenttab=".$parenttab."&relmodule=".vtlib_purify($_REQUEST['module']).$url);
?>
@@ -0,0 +1,186 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
require_once('Smarty_setup.php');
require_once('data/Tracker.php');
require_once('include/CustomFieldUtil.php');
require_once('include/utils/utils.php');
require_once('include/utils/UserInfoUtil.php');
require_once('user_privileges/default_module_view.php');
global $mod_strings;
global $app_strings;
global $currentModule, $singlepane_view;
global $log;
$focus = CRMEntity::getInstance($currentModule);
if(isset($_REQUEST['record']))
{
$focus->id = $_REQUEST['record'];
$focus->retrieve_entity_info($_REQUEST['record'],"Leads");
$focus->id = $_REQUEST['record'];
$log->debug("id is ".$focus->id);
$focus->firstname=$focus->column_fields['firstname'];
$focus->lastname=$focus->column_fields['lastname'];
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
}
global $theme,$current_user;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
$log->info("Lead detail view");
$smarty = new vtigerCRM_Smarty;
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
$smarty->assign("ID", $focus->id);
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
if ($mod_seq_field != null) {
$mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
} else {
$mod_seq_id = $focus->id;
}
$smarty->assign('MOD_SEQ_ID', $mod_seq_id);
// END
$smarty->assign("SINGLE_MOD", 'Lead');
$lead_name = $focus->lastname;
if (getFieldVisibilityPermission($currentModule, $current_user->id,'firstname') == '0') {
$lead_name .= ' '.$focus->firstname;
}
$smarty->assign("NAME",$lead_name );
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
$smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields));
$smarty->assign("CUSTOMFIELD", $cust_fld);
if(useInternalMailer() == 1)
$smarty->assign("INT_MAILER","true");
$val = isPermitted("Leads","EditView",$_REQUEST['record']);
if(isPermitted("Leads","EditView",$_REQUEST['record']) == 'yes')
$smarty->assign("EDIT_DUPLICATE","permitted");
if(isPermitted("Leads","EditView",$_REQUEST['record']) == 'yes' && isPermitted("Leads","ConvertLead") =='yes' && (isPermitted("Accounts","EditView") =='yes' || isPermitted("Contacts","EditView") == 'yes') && (vtlib_isModuleActive('Contacts') || vtlib_isModuleActive('Accounts')))
{
$smarty->assign("CONVERTLEAD","permitted");
}
$category = getParentTab();
$smarty->assign("CATEGORY",$category);
if(isPermitted("Leads","Delete",$_REQUEST['record']) == 'yes')
$smarty->assign("DELETE","permitted");
if(isPermitted("Emails","EditView",'') == 'yes')
{
//Added to pass the parents list as hidden for Emails -- 09-11-2005
$parent_email = getEmailParentsList('Leads',$_REQUEST['record'], $focus);
$smarty->assign("HIDDEN_PARENTS_LIST",$parent_email);
$smarty->assign("SENDMAILBUTTON","permitted");
$smarty->assign("EMAIL1",$focus->column_fields['email']);
$smarty->assign("EMAIL2",$focus->column_fields['yahooid']);
}
if(isPermitted("Leads","Merge",'') == 'yes')
{
global $current_user;
require("user_privileges/user_privileges_".$current_user->id.".php");
$wordTemplateResult = fetchWordTemplateList("Leads");
$tempCount = $adb->num_rows($wordTemplateResult);
$tempVal = $adb->fetch_array($wordTemplateResult);
for($templateCount=0;$templateCount<$tempCount;$templateCount++)
{
$optionString[$tempVal["templateid"]] =$tempVal["filename"];
$tempVal = $adb->fetch_array($wordTemplateResult);
}
if($is_admin)
$smarty->assign("MERGEBUTTON","permitted");
elseif($tempCount >0)
$smarty->assign("MERGEBUTTON","permitted");
$smarty->assign("TEMPLATECOUNT",$tempCount);
$smarty->assign("WORDTEMPLATEOPTIONS",$app_strings['LBL_SELECT_TEMPLATE_TO_MAIL_MERGE']);
$smarty->assign("TOPTIONS",$optionString);
}
$tabid = getTabid("Leads");
$validationData = getDBValidationData($focus->tab_name,$tabid);
$data = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record']));
$smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar'));
$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events'));
$smarty->assign("IS_REL_LIST",isPresentRelatedLists($currentModule));
$smarty->assign("USE_ASTERISK", get_use_asterisk($current_user->id));
if($singlepane_view == 'true')
{
$related_array = getRelatedLists($currentModule,$focus);
$smarty->assign("RELATEDLISTS", $related_array);
require_once('include/ListView/RelatedListViewSession.php');
if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['selected_tab_id'])) {
RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['selected_tab_id']), vtlib_purify($_REQUEST['selected_header']));
}
$open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
$smarty->assign("SELECTEDHEADERS", $open_related_modules);
}
$smarty->assign("SinglePane_View", $singlepane_view);
if(PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule.'_listquery'])){
$recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id);
VT_detailViewNavigation($smarty,$recordNavigationInfo,$focus->id);
}
// Record Change Notification
$focus->markAsViewed($current_user->id);
// END
include_once('vtlib/Vtiger/Link.php');
$customlink_params = Array('MODULE'=>$currentModule, 'RECORD'=>$focus->id, 'ACTION'=>vtlib_purify($_REQUEST['action']));
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC','DETAILVIEW','DETAILVIEWWIDGET'), $customlink_params));
$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true));
$smarty->display("DetailView.tpl");
?>
@@ -0,0 +1,47 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
require_once('include/logging.php');
require_once('include/database/PearDatabase.php');
global $adb;
$local_log =& LoggerManager::getLogger('LeadsAjax');
global $currentModule;
$modObj = CRMEntity::getInstance($currentModule);
$ajaxaction = $_REQUEST["ajxaction"];
if($ajaxaction == "DETAILVIEW")
{
$crmid = $_REQUEST["recordid"];
$tablename = $_REQUEST["tableName"];
$fieldname = $_REQUEST["fldName"];
$fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]);
if($crmid != "")
{
$modObj->retrieve_entity_info($crmid,"Leads");
$modObj->column_fields[$fieldname] = $fieldvalue;
$modObj->id = $crmid;
$modObj->mode = "edit";
$modObj->save("Leads");
if($modObj->id != "")
{
echo ":#:SUCCESS";
}else
{
echo ":#:FAILURE";
}
}else
{
echo ":#:FAILURE";
}
} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){
require_once 'include/ListView/RelatedListViewContents.php';
}
?>
+141
View File
@@ -0,0 +1,141 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
require_once('Smarty_setup.php');
require_once('data/Tracker.php');
require_once('include/CustomFieldUtil.php');
require_once('include/utils/utils.php');
global $mod_strings,$app_strings,$theme,$currentModule,$current_user;
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty;
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) {
$focus->id = $_REQUEST['record'];
$focus->mode = 'edit';
$focus->retrieve_entity_info($_REQUEST['record'],"Leads");
$focus->firstname=$focus->column_fields['firstname'];
$focus->lastname=$focus->column_fields['lastname'];
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
$focus->mode = '';
}
if(empty($_REQUEST['record']) && $focus->mode != 'edit'){
setObjectValuesFromRequest($focus);
}
$disp_view = getView($focus->mode);
if($disp_view == 'edit_view')
$smarty->assign("BLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields));
else
{
$smarty->assign("BASBLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields,'BAS'));
$smarty->assign("ADVBLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields,'ADV'));
}
$smarty->assign("OP_MODE",$disp_view);
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
//retreiving the combo values array
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$category = getParentTab();
$smarty->assign("CATEGORY",$category);
$lead_name = $focus->lastname;
if (getFieldVisibilityPermission($currentModule, $current_user->id,'firstname') == '0') {
$lead_name .= ' '.$focus->firstname;
}
$smarty->assign("NAME",$lead_name);
if(isset($cust_fld))
{
$smarty->assign("CUSTOMFIELD", $cust_fld);
}
if($focus->mode == 'edit')
{
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
$smarty->assign("MODE", $focus->mode);
}
if(isset($_REQUEST['campaignid']))
$smarty->assign("campaignid",vtlib_purify($_REQUEST['campaignid']));
if (isset($_REQUEST['return_module']))
$smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module']));
else
$smarty->assign("RETURN_MODULE","Leads");
if (isset($_REQUEST['return_action']))
$smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action']));
else
$smarty->assign("RETURN_ACTION","index");
if (isset($_REQUEST['return_id']))
$smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id']));
if (isset($_REQUEST['return_viewname']))
$smarty->assign("RETURN_VIEWNAME", vtlib_purify($_REQUEST['return_viewname']));
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id());
$smarty->assign("ID", $focus->id);
$smarty->assign("MODULE",$currentModule);
$smarty->assign("SINGLE_MOD",'Lead');
//create the html select code here and assign it
$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
$smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
$tabid = getTabid("Leads");
$validationData = getDBValidationData($focus->tab_name,$tabid);
$data = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$smarty->assign("DUPLICATE",vtlib_purify($_REQUEST['isDuplicate']));
global $adb;
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
if($focus->mode != 'edit' && $mod_seq_field != null) {
$autostr = getTranslatedString('MSG_AUTO_GEN_ON_SAVE');
$mod_seq_string = $adb->pquery("SELECT prefix, cur_id from vtiger_modentity_num where semodule = ? and active=1",array($currentModule));
$mod_seq_prefix = $adb->query_result($mod_seq_string,0,'prefix');
$mod_seq_no = $adb->query_result($mod_seq_string,0,'cur_id');
if($adb->num_rows($mod_seq_string) == 0 || $adb->num_rows($mod_seq_string) == 0 || $focus->checkModuleSeqNumber($focus->table_name, $mod_seq_field['column'], $mod_seq_prefix.$mod_seq_no))
echo '<br><font color="#FF0000"><b>'. getTranslatedString('LBL_DUPLICATE'). ' '. getTranslatedString($mod_seq_field['label'])
.' - '. getTranslatedString('LBL_CLICK') .' <a href="index.php?module=Settings&action=CustomModEntityNo&parenttab=Settings&selmodule='.$currentModule.'">'.getTranslatedString('LBL_HERE').'</a> '
. getTranslatedString('LBL_TO_CONFIGURE'). ' '. getTranslatedString($mod_seq_field['label']) .'</b></font>';
else
$smarty->assign("MOD_SEQ_ID",$autostr);
} else {
$smarty->assign("MOD_SEQ_ID", $focus->column_fields[$mod_seq_field['name']]);
}
// END
if($focus->mode == 'edit')
$smarty->display("salesEditView.tpl");
else
$smarty->display("CreateView.tpl");
?>
@@ -0,0 +1,13 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('include/utils/ExportRecords.php');
?>
@@ -0,0 +1,107 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
require_once('Smarty_setup.php');
require_once('include/utils/utils.php');
require_once('database/DatabaseConnection.php');
global $mod_strings, $app_strings, $app_list_strings;
global $current_language, $currentModule, $current_userid, $theme;
require_once('themes/'.$theme.'/layout_utils.php');
$req_module = vtlib_purify($_REQUEST['module']);
$focus = CRMEntity::getInstance($req_module);
$return_module=vtlib_purify($_REQUEST['module']);
$delete_idstring=vtlib_purify($_REQUEST['idlist']);
$parenttab = getParenttab();
$smarty = new vtigerCRM_Smarty;
$ids_list = array();
$errormsg = '';
if(isset($_REQUEST['del_rec']))
{
$url = getBasic_Advance_SearchURL();
$delete_id_array=explode(",",$delete_idstring,-1);
foreach ($delete_id_array as $id)
{
if(isPermitted($req_module,'Delete',$id) == 'yes') {
$sql="update vtiger_crmentity set deleted=1 where crmid=?";
$result = $adb->pquery($sql, array($id));
DeleteEntity($req_module,$return_module,$focus,$id,"");
}
else {
$ids_list[] = $id;
}
}
if(count($ids_list) > 0) {
$ret = getEntityName($req_module,$ids_list);
if(count($ret) > 0)
{
$errormsg = implode(',',$ret);
}
echo "<table border='0' cellpadding='5' cellspacing='0' width='100%' height='450px'><tr><td align='center'>";
echo "<div style='border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); width: 55%; position: relative; z-index: 10000000;'>
<table border='0' cellpadding='5' cellspacing='0' width='98%'>
<tbody><tr>
<td rowspan='2' width='11%'><img src='". vtiger_imageurl('denied.gif', $theme) ."' ></td>
<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='70%'>
<span class='genHeaderSmall'>$app_strings[LBL_DUP_PERMISSION] $req_module $errormsg</span></td>
</tr>
<tr>
<td class='small' align='right' nowrap='nowrap'>
<a href='javascript:window.location.reload();'>$app_strings[LBL_GO_BACK]</a><br>
</td>
</tr>
</tbody></table>
</div>";
echo "</td></tr></table>";
exit;
}
}
include("include/saveMergeCriteria.php");
$ret_arr=getDuplicateRecordsArr($req_module);
$fld_values=$ret_arr[0];
$total_num_group=count($fld_values);
$fld_name=$ret_arr[1];
$ui_type=$ret_arr[2];
$smarty->assign("NAVIGATION",$ret_arr["navigation"]);//Added for page navigation
$smarty->assign("MODULE",$req_module);
$smarty->assign("NUM_GROUP",$total_num_group);
$smarty->assign("FIELD_NAMES",$fld_name);
$smarty->assign("CATEGORY",$parenttab);
$smarty->assign("ALL_VALUES",$fld_values);
if(isPermitted($req_module,'Delete','') == 'yes')
$button_del = $app_strings['LBL_MASS_DELETE'];
$smarty->assign("DELETE",$button_del);
$smarty->assign("MOD", return_module_language($current_language,$req_module));
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH",$image_path);
$smarty->assign("APP", $app_strings);
$smarty->assign("CMOD", $mod_strings);
$smarty->assign("MODE",'view');
if(isset($_REQUEST['button_view']))
{
$smarty->assign("VIEW",'true');
}
if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
$smarty->display("FindDuplicateAjax.tpl");
else
$smarty->display('FindDuplicateDisplay.tpl');
?>
+14
View File
@@ -0,0 +1,14 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
include('modules/Import/index.php');
?>
File diff suppressed because it is too large Load Diff
+152
View File
@@ -0,0 +1,152 @@
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
document.write("<script type='text/javascript' src='include/js/Mail.js'></"+"script>");
document.write("<script type='text/javascript' src='include/js/Merge.js'></"+"script>");
function verify_data(form) {
if(! form.createpotential.checked == true){
if (trim(form.potential_name.value) == ""){
alert(alert_arr.OPPORTUNITYNAME_CANNOT_BE_EMPTY);
return false;
}
if(form.closingdate_mandatory != null && form.closingdate_mandatory.value == '*'){
if (form.closedate.value == ""){
alert(alert_arr.CLOSEDATE_CANNOT_BE_EMPTY);
return false;
}
}
if (form.closedate.value != "" ){
var x = dateValidate('closedate','Potential Close Date','DATE');
if(!x){
return false;
}
}
if(form.amount_mandatory.value == '*'){
if (form.potential_amount.value == ""){
alert(alert_arr.AMOUNT_CANNOT_BE_EMPTY);
return false;
}
}
intval= intValidate('potential_amount','Potential Amount');
if(!intval){
return false;
}
}
else{
return true;
}
}
function togglePotFields(form)
{
if (form.createpotential.checked == true)
{
form.potential_name.disabled = true;
form.closedate.disabled = true;
form.potential_amount.disabled = true;
form.potential_sales_stage.disabled = true;
}
else
{
form.potential_name.disabled = false;
form.closedate.disabled = false;
form.potential_amount.disabled = false;
form.potential_sales_stage.disabled = false;
form.potential_sales_stage.value="";
}
}
function set_return(product_id, product_name) {
if(document.getElementById('from_link').value != '') {
window.opener.document.QcEditView.parent_name.value = product_name;
window.opener.document.QcEditView.parent_id.value = product_id;
} else {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
}
}
function set_return_todo(product_id, product_name) {
if(document.getElementById('from_link').value != '') {
window.opener.document.QcEditView.task_parent_name.value = product_name;
window.opener.document.QcEditView.task_parent_id.value = product_id;
} else {
window.opener.document.createTodo.task_parent_name.value = product_name;
window.opener.document.createTodo.task_parent_id.value = product_id;
}
}
function set_return_specific(product_id, product_name) {
//Used for DetailView, Removed 'EditView' formname hardcoding
var fldName = getOpenerObj("lead_name");
var fldId = getOpenerObj("lead_id");
fldName.value = product_name;
fldId.value = product_id;
}
function add_data_to_relatedlist(entity_id,recordid) {
opener.document.location.href="index.php?module=Emails&action=updateRelations&destination_module=leads&entityid="+entity_id+"&parentid="+recordid;
}
//added by rdhital/Raju for emails
function submitform(id){
document.massdelete.entityid.value=id;
document.massdelete.submit();
}
function searchMapLocation(addressType)
{
var mapParameter = '';
if (addressType == 'Main')
{
if(fieldname.indexOf('lane') > -1)
{
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('lane')]))
mapParameter = document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('lane')]).innerHTML+' ';
}
if(fieldname.indexOf('pobox') > -1)
{
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('pobox')]))
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('pobox')]).innerHTML+' ';
}
if(fieldname.indexOf('city') > -1)
{
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('city')]))
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('city')]).innerHTML+' ';
}
if(fieldname.indexOf('state') > -1)
{
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('state')]))
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('state')]).innerHTML+' ';
}
if(fieldname.indexOf('country') > -1)
{
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('country')]))
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('country')]).innerHTML+' ';
}
if(fieldname.indexOf('code') > -1)
{
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('code')]))
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('code')]).innerHTML+' ';
}
}
mapParameter = removeHTMLFormatting(mapParameter);
window.open('http://maps.google.com/maps?q='+mapParameter,'goolemap','height=450,width=700,resizable=no,titlebar,location,top=200,left=250');
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('include/Ajax/CommonAjax.php');
?>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,11 @@
<?php
/*+*******************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
require_once 'include/ListView/ListViewPagging.php';
?>
@@ -0,0 +1,172 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* modules/Leads/ListViewTop.php,v 1.22 2005/04/19 17:00:30 ray Exp $
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
/** Function to get the 5 New Leads
*return array $values - array with the title, header and entries like Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries
*/
function getNewLeads($maxval,$calCnt)
{
global $log;
$log->debug("Entering getNewLeads() method ...");
require_once("data/Tracker.php");
require_once("include/utils/utils.php");
global $currentModule;
global $theme;
global $focus;
global $action;
global $adb;
global $app_strings;
global $current_language;
global $current_user;
$current_module_strings = return_module_language($current_language, 'Leads');
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
if($_REQUEST['lead_view']=='')
{
$query = "select lead_view from vtiger_users where id =?";
$result=$adb->pquery($query, array($current_user->id));
$lead_view=$adb->query_result($result,0,'lead_view');
}
else
$lead_view=$_REQUEST['lead_view'];
$today = date("Y-m-d", time());
if($lead_view == 'Today')
{
$start_date = date("Y-m-d",strtotime("$today"));
}
else if($lead_view == 'Last 2 Days')
{
$start_date = date("Y-m-d", strtotime("-2 days"));
}
else if($lead_view == 'Last Week')
{
$start_date = date("Y-m-d", strtotime("-1 week"));
}
$list_query = 'select vtiger_leaddetails.firstname, vtiger_leaddetails.lastname, vtiger_leaddetails.leadid, vtiger_leaddetails.company
from vtiger_leaddetails inner join vtiger_crmentity on vtiger_leaddetails.leadid = vtiger_crmentity.crmid
where vtiger_crmentity.deleted =0 AND vtiger_leaddetails.converted =0 AND vtiger_leaddetails.leadid > 0 AND
vtiger_leaddetails.leadstatus not in ("Lost Lead", "Junk Lead","'.$current_module_strings['Lost Lead'].'","'.$current_module_strings['Junk Lead'].'")
AND vtiger_crmentity.createdtime >=? AND vtiger_crmentity.smownerid = ?';
$list_query .= " LIMIT 0," . $adb->sql_escape_string($maxval);
if($calCnt == 'calculateCnt') {
$list_result_rows = $adb->pquery(mkCountQuery($list_query), array($start_date, $current_user->id));
return $adb->query_result($list_result_rows, 0, 'count');
}
$list_result = $adb->pquery($list_query, array($start_date, $current_user->id));
$noofrows = $adb->num_rows($list_result);
$open_lead_list =array();
if ($noofrows > 0) {
for($i=0;$i<$noofrows && $i<$maxval;$i++)
{
$open_lead_list[] = Array('leadname' => $adb->query_result($list_result,$i,'firstname').' '.$adb->query_result($list_result,$i,'lastname'),
'company' => $adb->query_result($list_result,$i,'company'),
'id' => $adb->query_result($list_result,$i,'leadid'),
);
}
}
$title=array();
$title[]='Leads.gif';
$title[]=$current_module_strings["LBL_NEW_LEADS"];
$title[]='home_mynewlead';
$title[]=getLeadView($lead_view);
$title[]='showLeadView';
$title[]='MyNewLeadFrm';
$title[]='lead_view';
$header=array();
$header[] =$current_module_strings['LBL_LIST_LEAD_NAME'];
$header[] =$current_module_strings['Company'];
$entries=array();
foreach($open_lead_list as $lead)
{
$value=array();
$lead_fields = array(
'LEAD_NAME' => $lead['leadname'],
'COMPANY' => $lead['company'],
'LEAD_ID' => $lead['id'],
);
$Top_Leads = (strlen($lead['leadname']) > 20) ? (substr($lead['leadname'],0,20).'...') : $lead['leadname'];
$value[]= '<a href="index.php?action=DetailView&module=Leads&record='.$lead_fields['LEAD_ID'].'">'.$Top_Leads.'</a>';
$value[]=$lead_fields['COMPANY'];
$entries[$lead_fields['LEAD_ID']]=$value;
}
$search_qry = "&query=true&Fields0=leadstatus&Condition0=n&Srch_value0=Lost+Lead&Fields1=leadstatus&Condition1=n&Srch_value1=Junk+Lead&Fields2=assigned_user_id&Condition2=e&Srch_value2=".$current_user->column_fields['user_name']."&Fields3=createdtime&Condition3=h&Srch_value3=".$start_date."&searchtype=advance&search_cnt=4&matchtype=all";
$values=Array('ModuleName'=>'Leads','Title'=>$title,'Header'=>$header,'Entries'=>$entries,'search_qry'=>$search_qry);
$log->debug("Exiting getNewLeads method ...");
if (($display_empty_home_blocks && count($entries) == 0 ) || (count($entries)>0))
return $values;
}
/** Function to get the Lead View from the Combo List
* @param string $lead_view - (eg today, last 2 days)
* Returns the Lead view select option
*/
function getLeadView($lead_view)
{
global $log;
$log->debug("Entering getLeadView(".$lead_view.") method ...");
$today = date("Y-m-d", time());
if($lead_view == 'Today')
{
$selected1 = 'selected';
}
else if($lead_view == 'Last 2 Days')
{
$selected2 = 'selected';
}
else if($lead_view == 'Last Week')
{
$selected3 = 'selected';
}
$LEAD_VIEW_SELECT_OPTION = '<select class=small name="lead_view" onchange="showLeadView(this)">';
$LEAD_VIEW_SELECT_OPTION .= '<option value="Today" '.$selected1.'>';
$LEAD_VIEW_SELECT_OPTION .= 'Today';
$LEAD_VIEW_SELECT_OPTION .= '</option>';
$LEAD_VIEW_SELECT_OPTION .= '<option value="Last 2 Days" '.$selected2.'>';
$LEAD_VIEW_SELECT_OPTION .= 'Last 2 Days';
$LEAD_VIEW_SELECT_OPTION .= '</option>';
$LEAD_VIEW_SELECT_OPTION .= '<option value="Last Week" '.$selected3.'>';
$LEAD_VIEW_SELECT_OPTION .= 'Last Week';
$LEAD_VIEW_SELECT_OPTION .= '</option>';
$LEAD_VIEW_SELECT_OPTION .= '</select>';
$log->debug("Exiting getLeadView method ...");
return $LEAD_VIEW_SELECT_OPTION;
}
?>
@@ -0,0 +1,45 @@
<?php
/*+**********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
************************************************************************************/
global $mod_strings,$app_strings,$theme,$currentModule,$current_user;
require_once('Smarty_setup.php');
require_once('include/utils/utils.php');
$focus = CRMEntity::getInstance($currentModule);
$focus->mode = '';
$mode = 'mass_edit';
$disp_view = getView($focus->mode);
$smarty = new vtigerCRM_Smarty;
$smarty->assign("BLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields));
$smarty->assign("IDS",$_REQUEST['idstring']);
$smarty->assign("MASS_EDIT","1");
$smarty->assign("MODULE",$currentModule);
$smarty->assign("APP",$app_strings);
$smarty->assign("CATEGORY",getParentTab());
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
// Field Validation Information
$tabid = getTabid($currentModule);
$validationData = getDBValidationData($focus->tab_name,$tabid);
$validationArray = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME",$validationArray['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$validationArray['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$validationArray['fieldlabel']);
$smarty->display('MassEditForm.tpl');
?>
@@ -0,0 +1,67 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
global $currentModule;
$focus = CRMEntity::getInstance($currentModule);
$idlist= vtlib_purify($_REQUEST['massedit_recordids']);
$viewid = vtlib_purify($_REQUEST['viewname']);
$return_module = vtlib_purify($_REQUEST['massedit_module']);
$return_action = 'index';
global $rstart;
//Added to fix 4600
$url = getBasic_Advance_SearchURL();
if(isset($_REQUEST['start']) && $_REQUEST['start']!=''){
$rstart = "&start=".vtlib_purify($_REQUEST['start']);
}
if(isset($idlist)) {
$recordids = explode(';', $idlist);
for($index = 0; $index < count($recordids); ++$index) {
$recordid = $recordids[$index];
if($recordid == '') continue;
if(isPermitted($currentModule,'EditView',$recordid) == 'yes') {
// Save each module record with update value.
$focus->retrieve_entity_info($recordid, $currentModule);
$focus->mode = 'edit';
$focus->id = $recordid;
foreach($focus->column_fields as $fieldname => $val)
{
if(isset($_REQUEST[$fieldname."_mass_edit_check"]))
{
if($fieldname == 'assigned_user_id'){
if($_REQUEST['assigntype'] == 'U') {
$value = $_REQUEST['assigned_user_id'];
} elseif($_REQUEST['assigntype'] == 'T') {
$value = $_REQUEST['assigned_group_id'];
}
} else {
if(is_array($_REQUEST[$fieldname]))
$value = $_REQUEST[$fieldname];
else
$value = trim($_REQUEST[$fieldname]);
}
$focus->column_fields[$fieldname] = $value;
}
else{
$focus->column_fields[$fieldname] = decode_html($focus->column_fields[$fieldname]);
}
}
$focus->save($currentModule);
}
}
}
$parenttab = getParentTab();
header("Location: index.php?module=$return_module&action=$return_action&parenttab=$parenttab$rstart");
?>
+234
View File
@@ -0,0 +1,234 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
?>
<html>
<body>
<script>
if (document.layers)
{
document.write("This feature requires IE 5.5 or higher for Windows on Microsoft Windows 2000, Windows NT4 SP6, Windows XP.");
document.write("<br><br>Click <a href='#' onclick='window.history.back();'>here</a> to return to the previous page");
}
else if (document.layers || (!document.all && document.getElementById))
{
document.write("This feature requires IE 5.5 or higher for Windows on Microsoft Windows 2000, Windows NT4 SP6, Windows XP.");
document.write("<br><br>Click <a href='#' onclick='window.history.back();'>here</a> to return to the previous page");
}
else if(document.all)
{
document.write("<br><br>Click <a href='#' onclick='window.history.back();'>here</a> to return to the previous page");
document.write("<OBJECT Name='vtigerCRM' codebase='modules/Settings/vtigerCRM.CAB#version=1,5,0,0' id='objMMPage' classid='clsid:0FC436C2-2E62-46EF-A3FB-E68E94705126' width=0 height=0></object>");
}
</script>
<?php
require_once('include/database/PearDatabase.php');
require_once('config.php');
global $default_charset;
// Fix For: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107
$randomfilename = "vt_" . str_replace(array("."," "), "", microtime());
$templateid = $_REQUEST['mergefile'];
if($templateid == "")
{
die("Select Mail Merge Template");
}
//get the particular file from db and store it in the local hard disk.
//store the path to the location where the file is stored and pass it as parameter to the method
$sql = "select filename,data,filesize from vtiger_wordtemplates where templateid=?";
$result = $adb->pquery($sql, array($templateid));
$temparray = $adb->fetch_array($result);
$fileContent = $temparray['data'];
$filename=html_entity_decode($temparray['filename'], ENT_QUOTES, $default_charset);
// Fix For: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107
$filename= $randomfilename . "_word.doc";
$filesize=$temparray['filesize'];
$wordtemplatedownloadpath =$root_directory ."/test/wordtemplatedownload/";
$handle = fopen($wordtemplatedownloadpath .$filename,"wb");
fwrite($handle,base64_decode($fileContent),$filesize);
fclose($handle);
//for mass merge
$mass_merge = $_REQUEST['allselectedboxes'];
$single_record = $_REQUEST['record'];
if($mass_merge != "")
{
$mass_merge = explode(";",$mass_merge);
//array_pop($mass_merge);
$temp_mass_merge = $mass_merge;
if(array_pop($temp_mass_merge)=="")
array_pop($mass_merge);
//$mass_merge = implode(",",$mass_merge);
}else if($single_record != "")
{
$mass_merge = $single_record;
}else
{
die("Record Id is not found");
}
//<<<<<<<<<<<<<<<<header for csv and select columns for query>>>>>>>>>>>>>>>>>>>>>>>>
global $current_user;
require('user_privileges/user_privileges_'.$current_user->id.'.php');
if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0 || $module == "Users" || $module == "Emails")
{
$query1="select tablename,columnname,fieldlabel from vtiger_field where tabid=7 and vtiger_field.presence in (0,2) order by tablename";
$params1 = array();
}
else
{
$profileList = getCurrentUserProfileList();
$query1="select vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field INNER JOIN vtiger_profile2field ON vtiger_profile2field.fieldid=vtiger_field.fieldid INNER JOIN vtiger_def_org_field ON vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid in (7) AND vtiger_profile2field.visible=0 AND vtiger_def_org_field.visible=0 AND vtiger_profile2field.profileid IN (". generateQuestionMarks($profileList) .") and vtiger_field.presence in (0,2) GROUP BY vtiger_field.fieldid order by vtiger_field.tablename";
$params1 = array($profileList);
//Postgres 8 fixes
if( $adb->dbType == "pgsql")
$query1 = fixPostgresQuery( $query1, $log, 0);
}
$result = $adb->pquery($query1, $params1);
$y=$adb->num_rows($result);
for ($x=0; $x<$y; $x++)
{
$tablename = $adb->query_result($result,$x,"tablename");
$columnname = $adb->query_result($result,$x,"columnname");
$querycolumns[$x] = $tablename.".".$columnname;
if($columnname == "smownerid")
{
$querycolumns[$x] = "case when (vtiger_users.user_name not like '') then concat(vtiger_users.last_name,' ',vtiger_users.first_name) else vtiger_groups.groupname end as username,vtiger_users.first_name,vtiger_users.last_name,vtiger_users.user_name,vtiger_users.yahoo_id,vtiger_users.title,vtiger_users.phone_work,vtiger_users.department,vtiger_users.phone_mobile,vtiger_users.phone_other,vtiger_users.phone_fax,vtiger_users.email1,vtiger_users.phone_home,vtiger_users.email2,vtiger_users.address_street,vtiger_users.address_city,vtiger_users.address_state,vtiger_users.address_postalcode,vtiger_users.address_country";
}
$field_label[$x] = "LEAD_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel")));
if($columnname == "smownerid")
{
$field_label[$x] = $field_label[$x].",USER_FIRSTNAME,USER_LASTNAME,USER_USERNAME,USER_YAHOOID,USER_TITLE,USER_OFFICEPHONE,USER_DEPARTMENT,USER_MOBILE,USER_OTHERPHONE,USER_FAX,USER_EMAIL,USER_HOMEPHONE,USER_OTHEREMAIL,USER_PRIMARYADDRESS,USER_CITY,USER_STATE,USER_POSTALCODE,USER_COUNTRY";
}
}
$csvheader = implode(",",$field_label);
//<<<<<<<<<<<<<<<<End>>>>>>>>>>>>>>>>>>>>>>>>
if(count($querycolumns) > 0)
{
$selectcolumns = implode($querycolumns,",");
$query = "select ".$selectcolumns." from vtiger_leaddetails
inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_leaddetails.leadid
inner join vtiger_leadsubdetails on vtiger_leadsubdetails.leadsubscriptionid=vtiger_leaddetails.leadid
inner join vtiger_leadaddress on vtiger_leadaddress.leadaddressid=vtiger_leadsubdetails.leadsubscriptionid
inner join vtiger_leadscf on vtiger_leaddetails.leadid = vtiger_leadscf.leadid
left join vtiger_campaignleadrel on vtiger_leaddetails.leadid = vtiger_campaignleadrel.leadid
left join vtiger_campaignrelstatus on vtiger_campaignrelstatus.campaignrelstatusid = vtiger_campaignleadrel.campaignrelstatusid
LEFT JOIN vtiger_groups
ON vtiger_groups.groupid = vtiger_crmentity.smownerid
left join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid
where vtiger_crmentity.deleted=0 and vtiger_leaddetails.leadid in (". generateQuestionMarks($mass_merge) .")";
$result = $adb->pquery($query, array($mass_merge));
$avail_pick_arr = getAccessPickListValues('Leads');
while($columnValues = $adb->fetch_array($result))
{
$y=$adb->num_fields($result);
for($x=0; $x<$y; $x++)
{
$value = $columnValues[$x];
foreach($columnValues as $key=>$val)
{
if($val == $value && $value != '')
{
if(array_key_exists($key,$avail_pick_arr))
{
if(!in_array($val,$avail_pick_arr[$key]))
{
$value = "Not Accessible";
}
}
}
}
//<<<<<<<<<<<<<<< For Blank Fields >>>>>>>>>>>>>>>>>>>>>>>>>>>>
if(trim($value) == "--None--" || trim($value) == "--none--")
{
$value = "";
}
//<<<<<<<<<<<<<<< End >>>>>>>>>>>>>>>>>>>>>>>>>>>>
$actual_values[$x] = $value;
$actual_values[$x] = str_replace('"'," ",$actual_values[$x]);
//if value contains any line feed or carriage return replace the value with ".value."
if (preg_match ("/(\r?\n)/", $actual_values[$x]))
{
$actual_values[$x] = '"'.$actual_values[$x].'"';
}
$actual_values[$x] = decode_html(str_replace(","," ",$actual_values[$x]));
}
$mergevalue[] = implode($actual_values,",");
}
$csvdata = implode($mergevalue,"###");
}else
{
die("No vtiger_fields to do Merge");
}
// Fix for: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107
$datafilename = $randomfilename . "_data.csv";
$handle = fopen($wordtemplatedownloadpath.$datafilename,"wb");
fwrite($handle,$csvheader."\r\n");
fwrite($handle,str_replace("###","\r\n",$csvdata));
fclose($handle);
?>
<script>
if (window.ActiveXObject){
try
{
ovtigerVM = eval("new ActiveXObject('vtigerCRM.ActiveX');");
if(ovtigerVM)
{
var filename = "<?php echo $filename?>";
if(filename != "")
{
if(objMMPage.bDLTempDoc("<?php echo $site_URL?>/test/wordtemplatedownload/<?php echo $filename?>","MMTemplate.doc"))
{
try
{
if(objMMPage.Init())
{
objMMPage.vLTemplateDoc();
objMMPage.bBulkHDSrc("<?php echo $site_URL;?>/test/wordtemplatedownload/<?php echo $datafilename ?>");
objMMPage.vBulkOpenDoc();
objMMPage.UnInit()
window.history.back();
}
}catch(errorObject)
{
document.write("Error while processing mail merge operation");
}
}else
{
document.write("Cannot get template document");
}
}
}
}
catch(e) {
document.write("Requires to download ActiveX Control from vtigerCRM. Please, ensure that you have administration privilage");
}
}
</script>
</body>
</html>
+20
View File
@@ -0,0 +1,20 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Leads/Popup.php,v 1.7 2005/03/23 14:19:48 samk Exp $
* Description: TODO: To be written.
********************************************************************************/
require_once('Popup.php');
?>
@@ -0,0 +1,134 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('Smarty_setup.php');
require_once('database/DatabaseConnection.php');
require_once('modules/Users/Users.php');
require_once('include/utils/utils.php');
$module = vtlib_purify($_REQUEST['module']);
$focus = CRMEntity::getInstance($module);
global $mod_strings, $app_strings, $app_list_strings;
global $current_language, $currentModule, $theme;
global $adb;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
$mode = $_REQUEST['mergemode'];
if($mode == 'mergesave') {
$return_module=vtlib_purify($_REQUEST['return_module']);
$action=vtlib_purify($_REQUEST['action']);
$return_action=vtlib_purify($_REQUEST['return_action']);
$parenttab=vtlib_purify($_REQUEST['parent']);
$merge_id=vtlib_purify($_REQUEST['record']);
$recordids=vtlib_purify($_REQUEST['pass_rec']);
$result = $adb->pquery("SELECT count(*) AS count FROM vtiger_crmentity WHERE crmid=? and deleted=0", array($merge_id));
$count = $adb->query_result($result,0,'count');
if($count > 0)
{
// First, save the primary record
$focus->mode="edit";
setObjectValuesFromRequest($focus);
$focus->save($module);
$rec_values=$focus->column_fields;
// Remove the id of primary record from the list of records to be deleted.
$del_value=explode(",",$recordids,-1);
$offset = array_search($merge_id,$del_value);
unset($del_value[$offset]);
// Transfer the related lists of the records to be deleted, to the primary record's related list
if(method_exists($focus, 'transferRelatedRecords')){
$focus->transferRelatedRecords($module,$del_value,$merge_id);
} else {
transferRelatedRecords($module,$del_value,$merge_id);
}
// Delete the records by id specified in the list
foreach($del_value as $value)
{
DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$value,"");
}
}
?>
<script>
window.self.close();window.opener.location.href=window.opener.location.href;
</script>
<?php
} elseif ($mode == 'mergefields') {
$idstring=vtlib_purify($_REQUEST['passurl']);
$parent_tab=getParentTab();
$exploded_id=explode(",",$idstring,-1);
$record_count = count($exploded_id);
$smarty = new vtigerCRM_Smarty;
$smarty->assign("EDIT_DUPLICATE","");
if($record_count == 2) {
if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes'
&& isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes')
$smarty->assign("EDIT_DUPLICATE","permitted");
}
else {
if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[2]) == 'yes'
&& isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[2]) == 'yes')
$smarty->assign("EDIT_DUPLICATE","permitted");
}
$all_values_array=getRecordValues($exploded_id,$module);
$all_values=$all_values_array[0];
$js_arr_val=$all_values_array[1];
$fld_array=$all_values_array[2];
$js_arr=implode(",",$js_arr_val);
$imported_records = Array();
$sql="select bean_id from vtiger_users_last_import where bean_type=? and deleted=0";
$result = $adb->pquery($sql, array($module));
$num_rows=$adb->num_rows($result);
$count=0;
for($i=0; $i<$num_rows;$i++)
{
foreach($exploded_id as $value)
if($value == $adb->query_result($result,$i,"bean_id"))
$count++;
array_push($imported_records,$adb->query_result($result,$i,"bean_id"));
}
if ($record_count == $count)
$no_existing=1;
else
$no_existing=0;
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("RECORD_COUNT",$record_count);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULENAME", $module);
$smarty->assign("PARENT_TAB", $parent_tab);
$smarty->assign("JS_ARRAY", $js_arr);
$smarty->assign("ID_ARRAY", $exploded_id);
$smarty->assign("IDSTRING",$idstring);
$smarty->assign("ALLVALUES", $all_values);
$smarty->assign("FIELD_ARRAY", $fld_array);
$smarty->assign("IMPORTED_RECORDS", $imported_records);
$smarty->assign("NO_EXISTING", $no_existing);
$smarty->display("MergeFields.tpl");
}
?>
@@ -0,0 +1,12 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('include/quickcreate.php');
?>
+183
View File
@@ -0,0 +1,183 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
require_once('modules/Leads/Leads.php');
require_once('include/logging.php');
require_once('include/database/PearDatabase.php');
require_once('include/utils/UserInfoUtil.php');
$local_log =& LoggerManager::getLogger('index');
global $log,$adb;
$focus = new Leads();
global $current_user;
$currencyid=fetchCurrency($current_user->id);
$rate_symbol = getCurrencySymbolandCRate($currencyid);
$rate = $rate_symbol['rate'];
$curr_symbol=$rate_symbol['symbol'];
//added to fix 4600
$search=vtlib_purify($_REQUEST['search_url']);
if(isset($_REQUEST['record']))
{
$focus->id = $_REQUEST['record'];
}
if(isset($_REQUEST['mode']))
{
$focus->mode = $_REQUEST['mode'];
}
//$focus->retrieve($_REQUEST['record']);
foreach($focus->column_fields as $fieldname => $val)
{
if(isset($_REQUEST[$fieldname])) {
if(is_array($_REQUEST[$fieldname]))
$value = $_REQUEST[$fieldname];
else
$value = trim($_REQUEST[$fieldname]);
$log->info("the value is ".$value);
$focus->column_fields[$fieldname] = $value;
}
}
if(isset($_REQUEST['annualrevenue'])) {
$value = convertToDollar($_REQUEST['annualrevenue'],$rate);
$focus->column_fields['annualrevenue'] = $value;
}
if($_REQUEST['assigntype'] == 'U') {
$focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id'];
} elseif($_REQUEST['assigntype'] == 'T') {
$focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id'];
}
$focus->save("Leads");
$return_id = $focus->id;
$log->info("the return id is ".$return_id);
$parenttab = getParentTab();
if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']);
else $return_module = "Leads";
if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']);
else $return_action = "DetailView";
if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']);
$local_log->debug("Saved record with id of ".$return_id);
//code added for returning back to the current view after edit from list view
if($_REQUEST['return_viewname'] == '') $return_viewname='0';
if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']);
if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == "Campaigns")
{
if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "")
{
$campLeadStatusResult = $adb->pquery("select campaignrelstatusid from vtiger_campaignleadrel where campaignid=? AND leadid=?",array($_REQUEST['return_id'], $focus->id));
$leadStatus = $adb->query_result($campLeadStatusResult,0,'campaignrelstatusid');
$sql = "delete from vtiger_campaignleadrel where leadid = ?";
$adb->pquery($sql, array($focus->id));
if(isset($leadStatus) && $leadStatus !=''){
$sql = "insert into vtiger_campaignleadrel values (?,?,?)";
$adb->pquery($sql, array($_REQUEST['return_id'], $focus->id,$leadStatus));
}
else{
$sql = "insert into vtiger_campaignleadrel values (?,?,1)";
$adb->pquery($sql, array($_REQUEST['return_id'], $focus->id));
}
}
}
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab&viewname=$return_viewname&start=".vtlib_purify($_REQUEST['pagenumber']).$search);
/** Function to save the Lead custom fields info into database
* @param integer $entity_id - leadid
*/
function save_customfields($entity_id)
{
$log->debug("Entering save_customfields(".$entity_id.") method ...");
$log->debug("save custom vtiger_field invoked ".$entity_id);
global $adb;
$dbquery="select * from customfields where module='Leads'";
$result = $adb->pquery($dbquery, array());
$custquery = "select * from leadcf where leadid=?";
$cust_result = $adb->pquery($custquery, array($entity_id));
if($adb->num_rows($result) != 0)
{
$columns='';
$params = array();
$update='';
$noofrows = $adb->num_rows($result);
for($i=0; $i<$noofrows; $i++)
{
$fldName=$adb->query_result($result,$i,"fieldlabel");
$colName=$adb->query_result($result,$i,"column_name");
if(isset($_REQUEST[$colName]))
{
$fldvalue=$_REQUEST[$colName];
$log->info("the columnName is ".$fldvalue);
if(get_magic_quotes_gpc() == 1)
{
$fldvalue = stripslashes($fldvalue);
}
}
else
{
$fldvalue = '';
}
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $adb->num_rows($cust_result) !=0)
{
//Update Block
if($i == 0)
{
$update = $colName.'=?';
}
else
{
$update .= ', '.$colName.'=?';
}
array_push($params, $fldvalue);
}
else
{
//Insert Block
if($i == 0)
{
$columns='leadid, '.$colName;
array_push($params, $entity_id);
}
else
{
$columns .= ', '.$colName;
}
array_push($params, $fldvalue);
}
}
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $adb->num_rows($cust_result) !=0)
{
//Update Block
$query = 'update leadcf SET '.$update.' where leadid=?';
array_push($params, $entity_id);
$adb->pquery($query, $params);
}
else
{
//Insert Block
$query = 'insert into leadcf ('.$columns.') values('. generateQuestionMarks($params) .')';
$adb->pquery($query, $params);
}
}
$log->debug("Exiting save_customfields method ...");
}
?>
@@ -0,0 +1,76 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
require_once('Smarty_setup.php');
global $mod_strings,$app_strings,$theme,$adb;
$smarty = new vtigerCRM_Smarty;
$module = vtlib_purify($_REQUEST['formodule']);
$menu_array = Array();
//if(layout editor is permitted)
$menu_array['LayoutEditor']['location'] = 'index.php?module=Settings&action=LayoutBlockList&parenttab=Settings&formodule='.$module;
$menu_array['LayoutEditor']['image_src'] = vtiger_imageurl('orgshar.gif', $theme);
$menu_array['LayoutEditor']['desc'] = getTranslatedString('LBL_LAYOUT_EDITOR_DESCRIPTION');
$menu_array['LayoutEditor']['label'] = getTranslatedString('LBL_LAYOUT_EDITOR');
if(vtlib_isModuleActive('FieldFormulas')) {
$sql_result = $adb->pquery("select * from vtiger_settings_field where name = ? and active=0",array('LBL_FIELDFORMULAS'));
if($adb->num_rows($sql_result) > 0) {
$menu_array['FieldFormulas']['location'] = $adb->query_result($sql_result, 0, 'linkto').'&formodule='.$module;
$menu_array['FieldFormulas']['image_src'] = $adb->query_result($sql_result, 0, 'iconpath');
$menu_array['FieldFormulas']['desc'] = getTranslatedString($adb->query_result($sql_result, 0, 'description'), 'FieldFormulas');
$menu_array['FieldFormulas']['label'] = getTranslatedString($adb->query_result($sql_result, 0, 'name'), 'FieldFormulas');
}
}
if(vtlib_isModuleActive('Tooltip')){
$sql_result = $adb->pquery("select * from vtiger_settings_field where name = ? and active=0",array('LBL_TOOLTIP_MANAGEMENT'));
if($adb->num_rows($sql_result) > 0) {
$menu_array['Tooltip']['location'] = $adb->query_result($sql_result, 0, 'linkto').'&formodule='.$module;
$menu_array['Tooltip']['image_src'] = vtiger_imageurl($adb->query_result($sql_result, 0, 'iconpath'), $theme);
$menu_array['Tooltip']['desc'] = getTranslatedString($adb->query_result($sql_result, 0, 'description'),'Tooltip');
$menu_array['Tooltip']['label'] = getTranslatedString($adb->query_result($sql_result, 0, 'name'),'Tooltip');
}
}
$menu_array['LeadsMapping']['location'] = 'index.php?module=Settings&action=CustomFieldList&parenttab=Settings&formodule='.$module;
$menu_array['LeadsMapping']['image_src'] = vtiger_imageurl('custom.gif', $theme);
$menu_array['LeadsMapping']['desc'] = getTranslatedString('LEADS_CUSTOM_FIELD_MAPPING_DESCRIPTION');
$menu_array['LeadsMapping']['label'] = getTranslatedString('LEADS_CUSTOM_FIELD_MAPPING');
$sql_result = $adb->pquery("SELECT * FROM vtiger_settings_field WHERE name = ? AND active=0",array('LBL_WORKFLOW_LIST'));
if($adb->num_rows($sql_result) > 0) {
$menu_array['Workflow']['location'] = $adb->query_result($sql_result, 0, 'linkto').'&list_module='.$module;
$menu_array['Workflow']['image_src'] = vtiger_imageurl($adb->query_result($sql_result, 0, 'iconpath'), $theme);
$menu_array['Workflow']['desc'] = getTranslatedString($adb->query_result($sql_result, 0, 'description'),'com_vtiger_workflow');
$menu_array['Workflow']['label'] = getTranslatedString($adb->query_result($sql_result, 0, 'name'),'com_vtiger_workflow');
}
//add blanks for 3-column layout
$count = count($menu_array)%3;
if($count>0) {
for($i=0;$i<3-$count;$i++) {
$menu_array[] = array();
}
}
$smarty->assign("MOD",$mod_strings);
$smarty->assign("APP",$app_strings);
$smarty->assign("IMAGE_PATH", "themes/$theme/images/");
$smarty->assign('MODULE',$module);
$smarty->assign('MODULE_LBL',getTranslatedString($module, $module));
$smarty->assign('MENU_ARRAY', $menu_array);
$smarty->display(vtlib_getModuleTemplate('Vtiger','Settings.tpl'));
?>
@@ -0,0 +1,12 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('include/Ajax/TagCloud.php')
?>
@@ -0,0 +1,11 @@
<?php
/*+*******************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
require_once 'modules/Home/UnifiedSearch.php';
?>
+21
View File
@@ -0,0 +1,21 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
include ('modules/Leads/ListView.php');
?>
@@ -0,0 +1,244 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
$mod_strings = Array(
'LBL_MODULE_NAME'=>'Leads',
'LBL_DIRECT_REPORTS_FORM_NAME'=>'Direct Reports',
'LBL_MODULE_TITLE'=>'Leads: Home',
'LBL_SEARCH_FORM_TITLE'=>'Lead Search',
'LBL_LIST_FORM_TITLE'=>'Lead List',
'LBL_NEW_FORM_TITLE'=>'New Lead',
'LBL_LEAD_OPP_FORM_TITLE'=>'Contact-Opportunity:',
'LBL_LEAD'=>'Lead:',
'LBL_ADDRESS_INFORMATION'=>'Address Information',
'LBL_CUSTOM_INFORMATION'=>'Custom Information',
'LBL_LIST_NAME'=>'Name',
'LBL_LIST_LAST_NAME'=>'Last Name',
'LBL_LIST_COMPANY'=>'Company',
'LBL_LIST_WEBSITE'=>'Website',
'LBL_LIST_LEAD_NAME'=>'Lead Name',
'LBL_LIST_EMAIL'=>'Email',
'LBL_LIST_PHONE'=>'Phone',
'LBL_LIST_LEAD_ROLE'=>'Role',
'LBL_NAME'=>'Name:',
'LBL_LEAD_NAME'=>'Lead Name:',
'LBL_LEAD_INFORMATION'=>'Lead Information',
'LBL_FIRST_NAME'=>'First Name:',
'LBL_PHONE'=>'Phone:',
'LBL_COMPANY'=>'Company:',
'LBL_DESIGNATION'=>'Designation:',
'LBL_PHONE'=>'Phone:',
'LBL_LAST_NAME'=>'Last Name:',
'LBL_MOBILE'=>'Mobile:',
'LBL_EMAIL'=>'Email:',
'LBL_LEAD_SOURCE'=>'Lead Source:',
'LBL_LEAD_STATUS'=>'Lead Status:',
'LBL_WEBSITE'=>'Website:',
'LBL_FAX'=>'Fax:',
'LBL_INDUSTRY'=>'Industry:',
'LBL_ANNUAL_REVENUE'=>'Annual Revenue:',
'LBL_RATING'=>'Rating:',
'LBL_LICENSE_KEY'=>'License Key:',
'LBL_NO_OF_EMPLOYEES'=>'No. of Employees:',
'LBL_YAHOO_ID'=>'Yahoo! ID:',
'LBL_ADDRESS_STREET'=>'Street:',
'LBL_ADDRESS_POSTAL_CODE'=>'Postal Code:',
'LBL_ADDRESS_CITY'=>'City:',
'LBL_ADDRESS_COUNTRY'=>'Country:',
'LBL_ADDRESS_STATE'=>'State:',
'LBL_ADDRESS'=>'Address:',
'LBL_DESCRIPTION_INFORMATION'=>'Description Information',
'LBL_DESCRIPTION'=>'Description:',
'LBL_CONVERT_LEAD'=>'Convert Lead:',
'LBL_CONVERT_LEAD_INFORMATION'=>'Convert Lead Information',
'LBL_ACCOUNT_NAME'=>'Account Name',
'LBL_POTENTIAL_NAME'=>'Potential Name',
'LBL_POTENTIAL_CLOSE_DATE'=>'Potential Close Date',
'LBL_POTENTIAL_AMOUNT'=>'Potential Amount',
'LBL_POTENTIAL_SALES_STAGE'=>'Potential Sales Stage',
'NTC_DELETE_CONFIRMATION'=>'Are you sure you want to delete this record?',
'NTC_REMOVE_CONFIRMATION'=>'Are you sure you want to remove this contact from this case?',
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'Are you sure you want to remove this record as a direct vtiger_report?',
'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?',
'ERR_DELETE_RECORD'=>"en_us A record number must be specified to delete the contact.",
'NTC_COPY_PRIMARY_ADDRESS'=>'Copy primary address to alternate address',
'NTC_COPY_ALTERNATE_ADDRESS'=>'Copy alternate address to primary address',
// Added vtiger_fields in fetchfile.php, import.php -- crm4-Beta
'LBL_COLON'=>' : ',
'LBL_IMPORT_LEADS'=>'Import Leads',
'LBL_LEADS_FILE_LIST'=>'Leads File List',
'LBL_INSTRUCTIONS'=>'Instructions',
'LBL_KINDLY_PROVIDE_AN_XLS_FILE'=>'Kindly provide an .xls file alone as input',
'LBL_PROVIDE_ATLEAST_ONE_FILE'=>'Please provide at least one file as input',
'LBL_NONE'=>'None',
'LBL_ASSIGNED_TO'=>'Assigned To:',
'LBL_SELECT_LEAD'=>'Select Lead',
'LBL_GENERAL_INFORMATION'=>'General Information',
'LBL_DO_NOT_CREATE_NEW_POTENTIAL'=>'Do not create a New Potential upon Conversion',
//for v4 release added
'LBL_NEW_POTENTIAL'=>'New Potential',
'LBL_POTENTIAL_TITLE'=>'Potentials',
'LBL_NEW_TASK'=>'New Task',
'LBL_TASK_TITLE'=>'Tasks',
'LBL_NEW_CALL'=>'New Call',
'LBL_CALL_TITLE'=>'Calls',
'LBL_NEW_MEETING'=>'New Meeting',
'LBL_MEETING_TITLE'=>'Meetings',
'LBL_NEW_EMAIL'=>'New Email',
'LBL_EMAIL_TITLE'=>'Emails',
'LBL_NEW_NOTE'=>'New Document',
'LBL_NOTE_TITLE'=>'Documents',
'LBL_NEW_ATTACHMENT'=>'New Attachment',
'LBL_ATTACHMENT_TITLE'=>'Attachments',
//Added vtiger_fields after RC1 - Release
'LBL_ALL'=>'All',
'LBL_CONTACTED'=>'Contacted',
'LBL_LOST'=>'Lost',
'LBL_HOT'=>'Hot',
'LBL_COLD'=>'Cold',
// Added for 4GA
'LBL_TOOL_FORM_TITLE'=>'Lead Tools',
'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE'=>'Select template to Mail Merge:',
//Added for 4GA
'Salutation'=>'Salutation',
'First Name'=>'First Name',
'Phone'=>'Phone',
'Last Name'=>'Last Name',
'Mobile'=>'Mobile',
'Company'=>'Company',
'Fax'=>'Fax',
'Email'=>'Email',
'Lead Source'=>'Lead Source',
'Website'=>'Website',
'Annual Revenue'=>'Annual Revenue',
'Lead Status'=>'Lead Status',
'Industry'=>'Industry',
'Rating'=>'Rating',
'No Of Employees'=>'No Of Employees',
'Assigned To'=>'Assigned To',
'Yahoo Id'=>'Yahoo Id',
'Created Time'=>'Created Time',
'Modified Time'=>'Modified Time',
'Street'=>'Street',
'Postal Code'=>'Postal Code',
'City'=>'City',
'Country'=>'Country',
'State'=>'State',
'Description'=>'Description',
'Po Box'=>'PO Box',
'Campaign Source'=>'Campaign Source',
//Added for CustomView 4.2 Release
'Name'=>'Name',
'LBL_NEW_LEADS'=>'My New Leads',
//Added for Existing Picklist Entries
'--None--'=>'--None--',
'Mr.'=>'Mr.',
'Ms.'=>'Ms.',
'Mrs.'=>'Mrs.',
'Dr.'=>'Dr.',
'Prof.'=>'Prof.',
'Acquired'=>'Acquired',
'Active'=>'Active',
'Market Failed'=>'Market Failed',
'Project Cancelled'=>'Project Cancelled',
'Shutdown'=>'Shutdown',
'Apparel'=>'Apparel',
'Banking'=>'Banking',
'Biotechnology'=>'Biotechnology',
'Chemicals'=>'Chemicals',
'Communications'=>'Communications',
'Construction'=>'Construction',
'Consulting'=>'Consulting',
'Education'=>'Education',
'Electronics'=>'Electronics',
'Energy'=>'Energy',
'Engineering'=>'Engineering',
'Entertainment'=>'Entertainment',
'Environmental'=>'Environmental',
'Finance'=>'Finance',
'Food & Beverage'=>'Food & Beverage',
'Government'=>'Government',
'Healthcare'=>'Healthcare',
'Hospitality'=>'Hospitality',
'Insurance'=>'Insurance',
'Machinery'=>'Machinery',
'Manufacturing'=>'Manufacturing',
'Media'=>'Media',
'Not For Profit'=>'Not For Profit',
'Recreation'=>'Recreation',
'Retail'=>'Retail',
'Shipping'=>'Shipping',
'Technology'=>'Technology',
'Telecommunications'=>'Telecommunications',
'Transportation'=>'Transportation',
'Utilities'=>'Utilities',
'Other'=>'Other',
'Cold Call'=>'Cold Call',
'Existing Customer'=>'Existing Customer',
'Self Generated'=>'Self Generated',
'Employee'=>'Employee',
'Partner'=>'Partner',
'Public Relations'=>'Public Relations',
'Direct Mail'=>'Direct Mail',
'Conference'=>'Conference',
'Trade Show'=>'Trade Show',
'Web Site'=>'Web Site',
'Word of mouth'=>'Word of mouth',
'Attempted to Contact'=>'Attempted to Contact',
'Cold'=>'Cold',
'Contact in Future'=>'Contact in Future',
'Contacted'=>'Contacted',
'Hot'=>'Hot',
'Junk Lead'=>'Junk Lead',
'Lost Lead'=>'Lost Lead',
'Not Contacted'=>'Not Contacted',
'Pre Qualified'=>'Pre Qualified',
'Qualified'=>'Qualified',
'Warm'=>'Warm',
// Added/Updated for vtiger CRM 5.0.4
'Designation'=>'Title',
// Added after 5.0.4 GA
//Module Sequence Numbering
'Lead No'=>'Lead No',
// END
);
?>

Some files were not shown because too many files have changed in this diff Show More