更新到 5.2 正式版后第一次 SVN 提交。
yuchenghu@hawebs.net git-svn-id: https://svn.code.sf.net/p/hawebs/svn@586 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
@@ -1,110 +0,0 @@
|
||||
<?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->name=$focus->column_fields['firstname'].' '.$focus->column_fields['lastname'];
|
||||
$log->debug("id is ".$focus->id);
|
||||
$log->debug("name is ".$focus->name);
|
||||
}
|
||||
|
||||
global $adb;
|
||||
$sql = $adb->pquery('select accountid from vtiger_contactdetails where contactid=?', array($focus->id));
|
||||
$accountid = $adb->query_result($sql,0,'accountid');
|
||||
if($accountid == 0) $accountid='';
|
||||
|
||||
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;
|
||||
$smarty->assign("accountid",$accountid);
|
||||
|
||||
|
||||
if(isset($_request['isduplicate']) && $_request['isduplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
}
|
||||
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
|
||||
$smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode']));
|
||||
}
|
||||
$parent_email = getEmailParentsList('Contacts',$_REQUEST['record'], $focus);
|
||||
$smarty->assign("HIDDEN_PARENTS_LIST",$parent_email);
|
||||
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record']!='') {
|
||||
$userid = $current_user->id;
|
||||
$sql = "select fieldname from vtiger_field where uitype = '13' and tabid = 4 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("Contacts",$userid,$fieldname);
|
||||
}
|
||||
}
|
||||
$smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar'));
|
||||
$smarty->assign("CONTACT_PERMISSION",CheckFieldPermission('contact_id','Calendar'));
|
||||
$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events'));
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
$smarty->assign("ID",$focus->id);
|
||||
$smarty->assign("NAME",$focus->name);
|
||||
$smarty->assign("EMAIL",$focus->column_fields['email']);
|
||||
$smarty->assign("YAHOO",$focus->column_fields['yahooid']);
|
||||
|
||||
// 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
|
||||
|
||||
$related_array = getRelatedLists($currentModule,$focus);
|
||||
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("RELATEDLISTS", $related_array);
|
||||
$smarty->assign("MODULE",$currentmodule);
|
||||
$smarty->assign("SINGLE_MOD",$app_strings['Contact']);
|
||||
$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");
|
||||
}
|
||||
?>
|
||||
@@ -1,250 +0,0 @@
|
||||
/*********************************************************************************
|
||||
|
||||
** 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 copyAddressRight(form) {
|
||||
|
||||
if(typeof(form.otherstreet) != 'undefined' && typeof(form.mailingstreet) != 'undefined')
|
||||
form.otherstreet.value = form.mailingstreet.value;
|
||||
|
||||
if(typeof(form.othercity) != 'undefined' && typeof(form.mailingcity) != 'undefined')
|
||||
form.othercity.value = form.mailingcity.value;
|
||||
|
||||
if(typeof(form.otherstate) != 'undefined' && typeof(form.mailingstate) != 'undefined')
|
||||
form.otherstate.value = form.mailingstate.value;
|
||||
|
||||
if(typeof(form.otherzip) != 'undefined' && typeof(form.mailingzip) != 'undefined')
|
||||
form.otherzip.value = form.mailingzip.value;
|
||||
|
||||
if(typeof(form.othercountry) != 'undefined' && typeof(form.mailingcountry) != 'undefined')
|
||||
form.othercountry.value = form.mailingcountry.value;
|
||||
|
||||
if(typeof(form.otherpobox) != 'undefined' && typeof(form.mailingpobox) != 'undefined')
|
||||
form.otherpobox.value = form.mailingpobox.value;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
function copyAddressLeft(form) {
|
||||
|
||||
if(typeof(form.otherstreet) != 'undefined' && typeof(form.mailingstreet) != 'undefined')
|
||||
form.mailingstreet.value = form.otherstreet.value;
|
||||
|
||||
if(typeof(form.othercity) != 'undefined' && typeof(form.mailingcity) != 'undefined')
|
||||
form.mailingcity.value = form.othercity.value;
|
||||
|
||||
if(typeof(form.otherstate) != 'undefined' && typeof(form.mailingstate) != 'undefined')
|
||||
form.mailingstate.value = form.otherstate.value;
|
||||
|
||||
if(typeof(form.otherzip) != 'undefined' && typeof(form.mailingzip) != 'undefined')
|
||||
form.mailingzip.value = form.otherzip.value;
|
||||
|
||||
if(typeof(form.othercountry) != 'undefined' && typeof(form.mailingcountry) != 'undefined')
|
||||
form.mailingcountry.value = form.othercountry.value;
|
||||
|
||||
if(typeof(form.otherpobox) != 'undefined' && typeof(form.mailingpobox) != 'undefined')
|
||||
form.mailingpobox.value = form.otherpobox.value;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function toggleDisplay(id){
|
||||
|
||||
if(this.document.getElementById( id).style.display=='none'){
|
||||
this.document.getElementById( id).style.display='inline'
|
||||
this.document.getElementById(id+"link").style.display='none';
|
||||
|
||||
}else{
|
||||
this.document.getElementById( id).style.display='none'
|
||||
this.document.getElementById(id+"link").style.display='none';
|
||||
}
|
||||
}
|
||||
|
||||
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 add_data_to_relatedlist_incal(id,name)
|
||||
{
|
||||
var idval = window.opener.document.EditView.contactidlist.value;
|
||||
var nameval = window.opener.document.EditView.contactlist.value;
|
||||
if(idval != '')
|
||||
{
|
||||
if(idval.indexOf(id) != -1)
|
||||
{
|
||||
window.opener.document.EditView.contactidlist.value = idval;
|
||||
window.opener.document.EditView.contactlist.value = nameval;
|
||||
}
|
||||
else
|
||||
{
|
||||
window.opener.document.EditView.contactidlist.value = idval+';'+id;
|
||||
if(name != '')
|
||||
{
|
||||
// this has been modified to provide delete option for Contacts in Calendar
|
||||
//this function is defined in script.js ------- Jeri
|
||||
window.opener.addOption(id,name);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
window.opener.document.EditView.contactidlist.value = id;
|
||||
if(name != '')
|
||||
{
|
||||
window.opener.addOption(id,name);
|
||||
}
|
||||
//end
|
||||
}
|
||||
}
|
||||
function set_return_specific(product_id, product_name) {
|
||||
//Used for DetailView, Removed 'EditView' formname hardcoding
|
||||
var fldName = getOpenerObj("contact_name");
|
||||
var fldId = getOpenerObj("contact_id");
|
||||
fldName.value = product_name;
|
||||
fldId.value = product_id;
|
||||
}
|
||||
//only for Todo
|
||||
function set_return_toDospecific(product_id, product_name) {
|
||||
var fldName = getOpenerObj("task_contact_name");
|
||||
var fldId = getOpenerObj("task_contact_id");
|
||||
fldName.value = product_name;
|
||||
fldId.value = product_id;
|
||||
}
|
||||
|
||||
function submitform(id){
|
||||
document.massdelete.entityid.value=id;
|
||||
document.massdelete.submit();
|
||||
}
|
||||
|
||||
function searchMapLocation(addressType)
|
||||
{
|
||||
var mapParameter = '';
|
||||
if (addressType == 'Main')
|
||||
{
|
||||
if(fieldname.indexOf('mailingstreet') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingstreet')]))
|
||||
mapParameter = document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingstreet')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('mailingpobox') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingpobox')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingpobox')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('mailingcity') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingcity')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingcity')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('mailingstate') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingstate')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingstate')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('mailingcountry') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingcountry')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingcountry')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('mailingzip') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingzip')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingzip')]).innerHTML;
|
||||
}
|
||||
}
|
||||
else if (addressType == 'Other')
|
||||
{
|
||||
if(fieldname.indexOf('otherstreet') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherstreet')]))
|
||||
mapParameter = document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherstreet')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('otherpobox') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherpobox')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherpobox')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('othercity') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('othercity')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('othercity')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('otherstate') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherstate')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherstate')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('othercountry') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('othercountry')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('othercountry')]).innerHTML+' ';
|
||||
}
|
||||
if(fieldname.indexOf('otherzip') > -1)
|
||||
{
|
||||
if(document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherzip')]))
|
||||
mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherzip')]).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');
|
||||
}
|
||||
|
||||
function set_return_contact_address(contact_id,contact_name, mailingstreet, otherstreet, mailingcity, othercity, mailingstate, otherstate, mailingcode, othercode, mailingcountry, othercountry,mailingpobox,otherpobox,formName) {
|
||||
if (formName == null || formName == '') formName = 'EditView';
|
||||
else {
|
||||
// In case formName is specified but does not exists then revert to EditView form
|
||||
if(window.opener.document.forms[formName] == null) formName = 'EditView';
|
||||
}
|
||||
var form = window.opener.document.forms[formName];
|
||||
form.contact_name.value = contact_name;
|
||||
form.contact_id.value = contact_id;
|
||||
if(typeof(form.bill_street) != 'undefined')
|
||||
if(confirm(alert_arr.OVERWRITE_EXISTING_CONTACT1+contact_name+alert_arr.OVERWRITE_EXISTING_CONTACT2))
|
||||
{
|
||||
//made changes to avoid js error -- ref : hidding fields causes js error(ticket#4017)
|
||||
if(typeof(form.bill_street) != 'undefined')
|
||||
form.bill_street.value = mailingstreet;
|
||||
if(typeof(form.ship_street) != 'undefined')
|
||||
form.ship_street.value = otherstreet;
|
||||
if(typeof(form.bill_city) != 'undefined')
|
||||
form.bill_city.value = mailingcity;
|
||||
if(typeof(form.ship_city) != 'undefined')
|
||||
form.ship_city.value = othercity;
|
||||
if(typeof(form.bill_state) != 'undefined')
|
||||
form.bill_state.value = mailingstate;
|
||||
if(typeof(form.ship_state) != 'undefined')
|
||||
form.ship_state.value = otherstate;
|
||||
if(typeof(form.bill_code) != 'undefined')
|
||||
form.bill_code.value = mailingcode;
|
||||
if(typeof(form.ship_code) != 'undefined')
|
||||
form.ship_code.value = othercode;
|
||||
if(typeof(form.bill_country) != 'undefined')
|
||||
form.bill_country.value = mailingcountry;
|
||||
if(typeof(form.ship_country) != 'undefined')
|
||||
form.ship_country.value = othercountry;
|
||||
if(typeof(form.bill_pobox) != 'undefined')
|
||||
form.bill_pobox.value = mailingpobox;
|
||||
if(typeof(form.ship_pobox) != 'undefined')
|
||||
form.ship_pobox.value = otherpobox;
|
||||
//end
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<?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');
|
||||
?>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?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');
|
||||
?>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?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');
|
||||
|
||||
?>
|
||||
@@ -1,52 +0,0 @@
|
||||
<?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.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
function DelImage($id)
|
||||
{
|
||||
global $adb;
|
||||
$query= "select vtiger_seattachmentsrel.attachmentsid from vtiger_seattachmentsrel inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_seattachmentsrel.attachmentsid where vtiger_crmentity.setype='Contacts Image' and vtiger_seattachmentsrel.crmid=?";
|
||||
$result = $adb->pquery($query, array($id));
|
||||
$attachmentsid = $adb->query_result($result,$i,"attachmentsid");
|
||||
|
||||
$rel_delquery='delete from vtiger_seattachmentsrel where crmid=? and attachmentsid=?';
|
||||
$adb->pquery($rel_delquery, array($id, $attachmentsid));
|
||||
|
||||
$crm_delquery="delete from vtiger_crmentity where crmid=?";
|
||||
$adb->pquery($crm_delquery, array($attachmentsid));
|
||||
|
||||
$base_query="update vtiger_contactdetails set imagename='' where contactid=?";
|
||||
$adb->pquery($base_query, array($id));
|
||||
}
|
||||
|
||||
function DelAttachment($id)
|
||||
{
|
||||
global $adb;
|
||||
$selresult = $adb->pquery("select name,path from vtiger_attachments where attachmentsid=?", array($id));
|
||||
unlink($adb->query_result($selresult,0,'path').$id."_".$adb->query_result($selresult,0,'name'));
|
||||
$query="delete from vtiger_seattachmentsrel where attachmentsid=?";
|
||||
$adb->pquery($query, array($id));
|
||||
$query="delete from vtiger_attachments where attachmentsid=?";
|
||||
$adb->pquery($query, array($id));
|
||||
|
||||
}
|
||||
$id = $_REQUEST["recordid"];
|
||||
if(isset($_REQUEST["attachmodule"]) && $_REQUEST["attachmodule"]=='Emails')
|
||||
{
|
||||
DelAttachment($id);
|
||||
}
|
||||
else
|
||||
{
|
||||
DelImage($id);
|
||||
}
|
||||
echo 'SUCCESS';
|
||||
?>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?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/Contacts/Delete.php,v 1.9 2005/04/18 10:37:49 samk Exp $
|
||||
* Description: TODO: To be written.
|
||||
********************************************************************************/
|
||||
|
||||
global $currentModule;
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
require_once('include/logging.php');
|
||||
$log = LoggerManager::getLogger('contact_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'])."&parenttab=$parenttab&activity_mode=".vtlib_purify($_REQUEST['activity_mode'])."&record=".vtlib_purify($_REQUEST['return_id'])."&relmodule=".vtlib_purify($_REQUEST['module']).$url);
|
||||
?>
|
||||
@@ -1,190 +0,0 @@
|
||||
<?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/Contacts/DetailView.php,v 1.38 2005/04/25 05:04:46 rank Exp $
|
||||
* Description: TODO: To be written.
|
||||
* 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('user_privileges/default_module_view.php');
|
||||
|
||||
global $log;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule, $singlepane_view;
|
||||
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record']!='') {
|
||||
//Display the error message
|
||||
if($_SESSION['image_type_error'] != '')
|
||||
{
|
||||
echo '<font color="red">'.$_SESSION['image_type_error'].'</font>';
|
||||
session_unregister('image_type_error');
|
||||
}
|
||||
|
||||
$focus->id=$_REQUEST['record'];
|
||||
$focus->retrieve_entity_info($_REQUEST['record'],'Contacts');
|
||||
$log->info("Entity info successfully retrieved for Contact DetailView.");
|
||||
$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("Contact 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("UPDATEINFO",updateInfo($focus->id));
|
||||
|
||||
if(useInternalMailer() == 1)
|
||||
$smarty->assign("INT_MAILER","true");
|
||||
|
||||
$contact_name = $focus->lastname;
|
||||
if (getFieldVisibilityPermission($currentModule, $current_user->id,'firstname') == '0') {
|
||||
$contact_name .= ' '.$focus->firstname;
|
||||
}
|
||||
$smarty->assign("NAME",$contact_name);
|
||||
|
||||
$log->info("Detail Block Informations successfully retrieved.");
|
||||
$smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields));
|
||||
$smarty->assign("CUSTOMFIELD", $cust_fld);
|
||||
$smarty->assign("SINGLE_MOD", 'Contact');
|
||||
|
||||
// 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", $_REQUEST['record']);
|
||||
if(isPermitted("Contacts","EditView",$_REQUEST['record']) == 'yes')
|
||||
$smarty->assign("EDIT_DUPLICATE","permitted");
|
||||
|
||||
if(isPermitted("Contacts","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('Contacts',$_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("Contacts","Merge",'') == 'yes')
|
||||
{
|
||||
global $current_user;
|
||||
require("user_privileges/user_privileges_".$current_user->id.".php");
|
||||
|
||||
require_once('include/utils/UserInfoUtil.php');
|
||||
$wordTemplateResult = fetchWordTemplateList("Contacts");
|
||||
$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);
|
||||
}
|
||||
|
||||
//Security check for related list
|
||||
$category = getParentTab();
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
|
||||
$check_button = Button_Check($module);
|
||||
$smarty->assign("CHECK", $check_button);
|
||||
|
||||
$tabid = getTabid("Contacts");
|
||||
$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']);
|
||||
|
||||
$smarty->assign("MODULE",$currentModule);
|
||||
$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record']));
|
||||
$smarty->assign("IS_REL_LIST",isPresentRelatedLists($currentModule));
|
||||
$smarty->assign("USE_ASTERISK", get_use_asterisk($current_user->id));
|
||||
|
||||
$sql = $adb->pquery('select accountid from vtiger_contactdetails where contactid=?', array($focus->id));
|
||||
$accountid = $adb->query_result($sql,0,'accountid');
|
||||
if($accountid == 0) $accountid='';
|
||||
$smarty->assign("accountid",$accountid);
|
||||
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['relation_id'])) {
|
||||
RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']),
|
||||
vtlib_purify($_REQUEST['selected_header']));
|
||||
}
|
||||
$open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
|
||||
$smarty->assign("SELECTEDHEADERS", $open_related_modules);
|
||||
}
|
||||
$smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar'));
|
||||
$smarty->assign("CONTACT_PERMISSION",CheckFieldPermission('contact_id','Calendar'));
|
||||
$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events'));
|
||||
$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");
|
||||
?>
|
||||
@@ -1,107 +0,0 @@
|
||||
<?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('ContactsAjax');
|
||||
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,"Contacts");
|
||||
$modObj->column_fields[$fieldname] = $fieldvalue;
|
||||
$modObj->id = $crmid;
|
||||
$modObj->mode = "edit";
|
||||
$modObj->save("Contacts");
|
||||
$email_res = $adb->pquery("select email from vtiger_contactdetails where contactid=?", array($modObj->id));
|
||||
$email = $adb->query_result($email_res,0,'email');
|
||||
|
||||
$check_available = $adb->pquery("select * from vtiger_portalinfo where id=?", array($modObj->id));
|
||||
$update = '';
|
||||
if($fieldname =='email')
|
||||
{
|
||||
$active = $adb->query_result($check_available,0,'isactive');
|
||||
$update = false;
|
||||
if($active != '' && $active == 1)
|
||||
{
|
||||
$sql = "update vtiger_portalinfo set user_name=?,isactive=? where id=?";
|
||||
$adb->pquery($sql, array($fieldvalue, $active, $crmid));
|
||||
$email = $fieldvalue;
|
||||
$result = $adb->pquery("select user_password from vtiger_portalinfo where id=?", array($modObj->id));
|
||||
$password = $adb->query_result($result,0,'user_password');
|
||||
$update = true;
|
||||
}
|
||||
}
|
||||
|
||||
if($fieldname == "portal")
|
||||
{
|
||||
if($email != '')
|
||||
{
|
||||
$confirm = $adb->query_result($check_available,0,'isactive');
|
||||
if($confirm == '' && $fieldvalue == 1)
|
||||
{
|
||||
$password = makeRandomPassword();
|
||||
$sql = "insert into vtiger_portalinfo (id,user_name,user_password,type,isactive) values(?,?,?,?,?)";
|
||||
$params = array($modObj->id, $email, $password, 'C', 1);
|
||||
$adb->pquery($sql, $params);
|
||||
$insert = true;
|
||||
|
||||
}
|
||||
elseif($confirm == 0 && $fieldvalue == 1)
|
||||
{
|
||||
$sql = "update vtiger_portalinfo set user_name=?, isactive=1 where id=?";
|
||||
$params = array($email, $modObj->id);
|
||||
$adb->pquery($sql, $params);
|
||||
|
||||
$result = $adb->pquery("select user_password from vtiger_portalinfo where id=?", array($modObj->id));
|
||||
$password = $adb->query_result($result,0,'user_password');
|
||||
$update = true;
|
||||
|
||||
}
|
||||
elseif($confirm == 1 && $fieldvalue == 0)
|
||||
{
|
||||
$sql = "update vtiger_portalinfo set isactive=0 where id=?";
|
||||
$adb->pquery($sql, array($modObj->id));
|
||||
}
|
||||
}
|
||||
}
|
||||
require_once("modules/Emails/mail.php");
|
||||
global $current_user;
|
||||
$data_array = Array();
|
||||
$data_array['first_name'] = $modObj->column_fields['firstname'];
|
||||
$data_array['last_name'] = $modObj->column_fields['lastname'];
|
||||
$data_array['email'] = $email;
|
||||
$data_array['portal_url'] = "<a href=".$PORTAL_URL."/login.php>".$mod_strings['Please Login Here']."</a>";
|
||||
$contents = getmail_contents_portalUser($data_array,$password);
|
||||
if($modObj->id != "")
|
||||
{
|
||||
echo ":#:SUCCESS";
|
||||
}else
|
||||
{
|
||||
echo ":#:FAILURE";
|
||||
}
|
||||
}else
|
||||
{
|
||||
echo ":#:FAILURE";
|
||||
}
|
||||
} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){
|
||||
require_once 'include/ListView/RelatedListViewContents.php';
|
||||
}
|
||||
?>
|
||||
@@ -1,239 +0,0 @@
|
||||
<?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/Contacts/EditView.php,v 1.21 2005/03/24 16:18:38 samk Exp $
|
||||
* Description: TODO: To be written.
|
||||
* 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 $log,$mod_strings,$app_strings,$theme,$currentModule,$current_user;
|
||||
|
||||
//added for contact image
|
||||
$encode_val=vtlib_purify($_REQUEST['encode_val']);
|
||||
$decode_val=base64_decode($encode_val);
|
||||
|
||||
$saveimage=isset($_REQUEST['saveimage'])?vtlib_purify($_REQUEST['saveimage']):"false";
|
||||
$errormessage=isset($_REQUEST['error_msg'])?vtlib_purify($_REQUEST['error_msg']):"false";
|
||||
$image_error=isset($_REQUEST['image_error'])?vtlib_purify($_REQUEST['image_error']):"false";
|
||||
//end
|
||||
|
||||
$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']) && $_REQUEST['record'] != '')
|
||||
{
|
||||
$focus->id = $_REQUEST['record'];
|
||||
$focus->mode = 'edit';
|
||||
$focus->retrieve_entity_info($_REQUEST['record'],"Contacts");
|
||||
$log->info("Entity info successfully retrieved for EditView.");
|
||||
$focus->firstname=$focus->column_fields['firstname'];
|
||||
$focus->lastname=$focus->column_fields['lastname'];
|
||||
|
||||
}
|
||||
|
||||
if($image_error=="true")
|
||||
{
|
||||
$explode_decode_val=explode("&",$decode_val);
|
||||
for($i=1;$i<count($explode_decode_val);$i++)
|
||||
{
|
||||
$test=$explode_decode_val[$i];
|
||||
$values=explode("=",$test);
|
||||
$field_name_val=$values[0];
|
||||
$field_value=$values[1];
|
||||
$focus->column_fields[$field_name_val]=$field_value;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['account_id']) && $_REQUEST['account_id']!='' && $_REQUEST['record']=='')
|
||||
{
|
||||
require_once('modules/Accounts/Accounts.php');
|
||||
$focus->column_fields['account_id'] = $_REQUEST['account_id'];
|
||||
$acct_focus = new Accounts();
|
||||
$acct_focus->retrieve_entity_info($_REQUEST['account_id'],"Accounts");
|
||||
$focus->column_fields['fax']=$acct_focus->column_fields['fax'];
|
||||
$focus->column_fields['otherphone']=$acct_focus->column_fields['phone'];
|
||||
$focus->column_fields['mailingcity']=$acct_focus->column_fields['bill_city'];
|
||||
$focus->column_fields['othercity']=$acct_focus->column_fields['ship_city'];
|
||||
$focus->column_fields['mailingstreet']=$acct_focus->column_fields['bill_street'];
|
||||
$focus->column_fields['otherstreet']=$acct_focus->column_fields['ship_street'];
|
||||
$focus->column_fields['mailingstate']=$acct_focus->column_fields['bill_state'];
|
||||
$focus->column_fields['otherstate']=$acct_focus->column_fields['ship_state'];
|
||||
$focus->column_fields['mailingzip']=$acct_focus->column_fields['bill_code'];
|
||||
$focus->column_fields['otherzip']=$acct_focus->column_fields['ship_code'];
|
||||
$focus->column_fields['mailingcountry']=$acct_focus->column_fields['bill_country'];
|
||||
$focus->column_fields['othercountry']=$acct_focus->column_fields['ship_country'];
|
||||
$focus->column_fields['mailingpobox']=$acct_focus->column_fields['bill_pobox'];
|
||||
$focus->column_fields['otherpobox']=$acct_focus->column_fields['ship_pobox'];
|
||||
|
||||
$log->debug("Accountid Id from the request is ".$_REQUEST['account_id']);
|
||||
|
||||
}
|
||||
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);
|
||||
|
||||
//needed when creating a new contact with a default vtiger_account value passed in
|
||||
if (isset($_REQUEST['account_name']) && is_null($focus->account_name)) {
|
||||
$focus->account_name = $_REQUEST['account_name'];
|
||||
|
||||
|
||||
}
|
||||
if (isset($_REQUEST['account_id']) && is_null($focus->account_id)) {
|
||||
$focus->account_id = $_REQUEST['account_id'];
|
||||
}
|
||||
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
$log->info("Contact detail view");
|
||||
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("APP", $app_strings);
|
||||
$contact_name = $focus->lastname;
|
||||
if (getFieldVisibilityPermission($currentModule, $current_user->id,'firstname') == '0') {
|
||||
$contact_name .= ' '.$focus->firstname;
|
||||
}
|
||||
$smarty->assign("NAME",$contact_name);
|
||||
if(isset($cust_fld))
|
||||
{
|
||||
$smarty->assign("CUSTOMFIELD", $cust_fld);
|
||||
}
|
||||
$smarty->assign("ID", $focus->id);
|
||||
$smarty->assign("MODULE",$currentModule);
|
||||
$smarty->assign("SINGLE_MOD",'Contact');
|
||||
|
||||
if($focus->mode == 'edit')
|
||||
{
|
||||
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
|
||||
$smarty->assign("MODE", $focus->mode);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['activity_mode']) && $_REQUEST['activity_mode'] !='')
|
||||
$smarty->assign("ACTIVITYMODE",vtlib_purify($_REQUEST['activity_mode']));
|
||||
|
||||
// Unimplemented until jscalendar language vtiger_files are fixed
|
||||
$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
|
||||
$smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
|
||||
|
||||
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']));
|
||||
if (isset($_REQUEST['return_action']))
|
||||
$smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action']));
|
||||
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().$GLOBALS['request_string']);
|
||||
|
||||
$tabid = getTabid("Contacts");
|
||||
$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']);
|
||||
$category = getParentTab();
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
|
||||
if($errormessage==2)
|
||||
{
|
||||
$msg =$mod_strings['LBL_MAXIMUM_LIMIT_ERROR'];
|
||||
$errormessage ="<B><font color='red'>".$msg."</font></B> <br><br>";
|
||||
}
|
||||
else if($errormessage==3)
|
||||
{
|
||||
$msg = $mod_strings['LBL_UPLOAD_ERROR'];
|
||||
$errormessage ="<B><font color='red'>".$msg."</font></B> <br><br>";
|
||||
|
||||
}
|
||||
else if($errormessage=="image")
|
||||
{
|
||||
$msg = $mod_strings['LBL_IMAGE_ERROR'];
|
||||
$errormessage ="<B><font color='red'>".$msg."</font></B> <br><br>";
|
||||
}
|
||||
else if($errormessage =="invalid")
|
||||
{
|
||||
$msg = $mod_strings['LBL_INVALID_IMAGE'];
|
||||
$errormessage ="<B><font color='red'>".$msg."</font></B> <br><br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$errormessage="";
|
||||
}
|
||||
if($errormessage!="")
|
||||
{
|
||||
$smarty->assign("ERROR_MESSAGE",$errormessage);
|
||||
}
|
||||
|
||||
$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 || $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');
|
||||
|
||||
?>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?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');
|
||||
?>
|
||||
@@ -1,106 +0,0 @@
|
||||
<?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');
|
||||
|
||||
?>
|
||||
@@ -1,45 +0,0 @@
|
||||
<?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: TODO: To be written.
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
include('modules/Import/index.php');
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,312 +0,0 @@
|
||||
<?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/Contacts/ListView.php,v 1.25 2005/04/18 10:37:49 samk Exp $
|
||||
* Description: TODO: To be written.
|
||||
* 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('modules/Contacts/Contacts.php');
|
||||
require_once('include/logging.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
require_once('include/utils/utils.php');
|
||||
require_once('modules/CustomView/CustomView.php');
|
||||
require_once('include/database/Postgres8.php');
|
||||
|
||||
global $app_strings;
|
||||
global $list_max_entries_per_page;
|
||||
|
||||
$log = LoggerManager::getLogger('contact_list');
|
||||
|
||||
global $currentModule,$theme;
|
||||
|
||||
$focus = new Contacts();
|
||||
// Initialize sort by fields
|
||||
$focus->initSortbyField('Contacts');
|
||||
// END
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
$other_text = Array();
|
||||
|
||||
if(!$_SESSION['lvs'][$currentModule])
|
||||
{
|
||||
unset($_SESSION['lvs']);
|
||||
$modObj = new ListViewSession();
|
||||
$modObj->sorder = $sorder;
|
||||
$modObj->sortby = $order_by;
|
||||
$_SESSION['lvs'][$currentModule] = get_object_vars($modObj);
|
||||
}
|
||||
|
||||
if($_REQUEST['errormsg'] != '')
|
||||
{
|
||||
$errormsg = vtlib_purify($_REQUEST['errormsg']);
|
||||
$smarty->assign("ERROR","The User does not have permission to Change/Delete ".$errormsg." ".$currentModule);
|
||||
}else
|
||||
{
|
||||
$smarty->assign("ERROR","");
|
||||
}
|
||||
//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>>
|
||||
$sorder = $focus->getSortOrder();
|
||||
$order_by = $focus->getOrderBy();
|
||||
|
||||
$_SESSION['CONTACTS_ORDER_BY'] = $order_by;
|
||||
$_SESSION['CONTACTS_SORT_ORDER'] = $sorder;
|
||||
//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
//<<<<cutomview>>>>>>>
|
||||
$oCustomView = new CustomView("Contacts");
|
||||
$viewid = $oCustomView->getViewId($currentModule);
|
||||
$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
|
||||
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
|
||||
|
||||
//Added to handle approving or denying status-public by the admin in CustomView
|
||||
$statusdetails = $oCustomView->isPermittedChangeStatus($viewnamedesc['status']);
|
||||
$smarty->assign("CUSTOMVIEW_PERMISSION",$statusdetails);
|
||||
|
||||
//To check if a user is able to edit/delete a customview
|
||||
$edit_permit = $oCustomView->isPermittedCustomView($viewid,'EditView',$currentModule);
|
||||
$delete_permit = $oCustomView->isPermittedCustomView($viewid,'Delete',$currentModule);
|
||||
$smarty->assign("CV_EDIT_PERMIT",$edit_permit);
|
||||
$smarty->assign("CV_DELETE_PERMIT",$delete_permit);
|
||||
|
||||
//<<<<<customview>>>>>
|
||||
$smarty->assign("CHANGE_OWNER",getUserslist());
|
||||
$smarty->assign("CHANGE_GROUP_OWNER",getGroupslist());
|
||||
// Buttons and View options
|
||||
if($viewid != 0)
|
||||
{
|
||||
$CActionDtls = $oCustomView->getCustomActionDetails($viewid);
|
||||
}
|
||||
elseif($viewid ==0)
|
||||
{
|
||||
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_PERMISSION]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='small' align='right' nowrap='nowrap'>
|
||||
<a href='javascript:window.history.back();'>$app_strings[LBL_GO_BACK]</a><br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</div>";
|
||||
echo "</td></tr></table>";
|
||||
exit;
|
||||
}
|
||||
if(isPermitted('Contacts','Delete','') == 'yes')
|
||||
{
|
||||
$other_text['del'] = $app_strings[LBL_MASS_DELETE];
|
||||
}
|
||||
if(isPermitted('Contacts','EditView','') == 'yes')
|
||||
{
|
||||
$other_text['mass_edit'] = $app_strings[LBL_MASS_EDIT];
|
||||
$other_text['c_owner'] = $app_strings[LBL_CHANGE_OWNER];
|
||||
}
|
||||
if(isPermitted('Emails','EditView','') == 'yes')
|
||||
$other_text['s_mail'] = $app_strings[LBL_SEND_MAIL_BUTTON];
|
||||
|
||||
if(isset($CActionDtls))
|
||||
{
|
||||
$other_text['s_cmail'] = $app_strings[LBL_SEND_CUSTOM_MAIL_BUTTON];
|
||||
}
|
||||
if($viewnamedesc['viewname'] == 'All')
|
||||
{
|
||||
$smarty->assign("ALL", 'All');
|
||||
}
|
||||
|
||||
//Retreive the list from Database
|
||||
//<<<<<<<<<customview>>>>>>>>>
|
||||
global $current_user;
|
||||
$queryGenerator = new QueryGenerator($currentModule, $current_user);
|
||||
if ($viewid != "0") {
|
||||
$queryGenerator->initForCustomViewById($viewid);
|
||||
} else {
|
||||
$queryGenerator->initForDefaultCustomView();
|
||||
}
|
||||
//<<<<<<<<customview>>>>>>>>>
|
||||
|
||||
if (!isset($where)) $where = "";
|
||||
|
||||
$url_string = ''; // assigning http url string
|
||||
if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true') {
|
||||
$queryGenerator->addUserSearchConditions($_REQUEST);
|
||||
$ustring = getSearchURL($_REQUEST);
|
||||
// we have a query
|
||||
$url_string .="&query=true".$ustring;
|
||||
$smarty->assign("SEARCH_URL",$url_string);
|
||||
|
||||
}
|
||||
$list_query = $queryGenerator->getQuery();
|
||||
$where = $queryGenerator->getConditionalWhere();
|
||||
if(isset($where) && $where != '') {
|
||||
$_SESSION['export_where'] = $where;
|
||||
} else {
|
||||
unset($_SESSION['export_where']);
|
||||
}
|
||||
|
||||
if(isset($order_by) && $order_by != '')
|
||||
{
|
||||
if($order_by == 'smownerid')
|
||||
{
|
||||
if( $adb->dbType == "pgsql")
|
||||
$list_query .= ' GROUP BY user_name';
|
||||
$list_query .= ' ORDER BY user_name '.$sorder;
|
||||
}
|
||||
else
|
||||
{
|
||||
$tablename = getTableNameForField('Contacts',$order_by);
|
||||
$tablename = (($tablename != '')?($tablename."."):'');
|
||||
if( $adb->dbType == "pgsql")
|
||||
$list_query .= ' GROUP BY '.$tablename.$order_by;
|
||||
|
||||
$list_query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder;
|
||||
}
|
||||
}
|
||||
|
||||
//Constructing the list view
|
||||
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("APP", $app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
$smarty->assign("BUTTONS",$other_text);
|
||||
$category = getParentTab();
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
$smarty->assign("CUSTOMVIEW_OPTION",$customviewcombo_html);
|
||||
$smarty->assign("VIEWID", $viewid);
|
||||
|
||||
//Postgres 8 fixes
|
||||
if( $adb->dbType == "pgsql")
|
||||
$list_query = fixPostgresQuery( $list_query, $log, 0);
|
||||
|
||||
if(PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false) === true){
|
||||
$count_result = $adb->query( mkCountQuery( $list_query));
|
||||
$noofrows = $adb->query_result($count_result,0,"count");
|
||||
}else{
|
||||
$noofrows = null;
|
||||
}
|
||||
|
||||
$queryMode = (isset($_REQUEST['query']) && $_REQUEST['query'] == 'true');
|
||||
$start = ListViewSession::getRequestCurrentPage($currentModule, $list_query, $viewid, $queryMode);
|
||||
|
||||
$navigation_array = VT_getSimpleNavigationValues($start,$list_max_entries_per_page,$noofrows);
|
||||
|
||||
$limit_start_rec = ($start-1) * $list_max_entries_per_page;
|
||||
|
||||
if( $adb->dbType == "pgsql")
|
||||
$list_result = $adb->pquery($list_query. " OFFSET $limit_start_rec LIMIT $list_max_entries_per_page", array());
|
||||
else
|
||||
$list_result = $adb->pquery($list_query. " LIMIT $limit_start_rec, $list_max_entries_per_page", array());
|
||||
|
||||
$recordListRangeMsg = getRecordRangeMessage($list_result, $limit_start_rec,$noofrows);
|
||||
$smarty->assign('recordListRange',$recordListRangeMsg);
|
||||
|
||||
//mass merge for word templates -- *Raj*17/11
|
||||
while($row = $adb->fetch_array($list_result))
|
||||
{
|
||||
$ids[] = $row[$focus->table_index];
|
||||
}
|
||||
if(isset($ids))
|
||||
{
|
||||
$smarty->assign("ALLIDS", implode($ids,";"));
|
||||
}
|
||||
if(isPermitted("Contacts","Merge") == 'yes')
|
||||
{
|
||||
$wordTemplateResult = fetchWordTemplateList("Contacts");
|
||||
$tempCount = $adb->num_rows($wordTemplateResult);
|
||||
$tempVal = $adb->fetch_array($wordTemplateResult);
|
||||
for($templateCount=0;$templateCount<$tempCount;$templateCount++)
|
||||
{
|
||||
$optionString .="<option value=\"".$tempVal["templateid"]."\">" .$tempVal["filename"] ."</option>";
|
||||
$tempVal = $adb->fetch_array($wordTemplateResult);
|
||||
}
|
||||
if($tempCount > 0)
|
||||
{
|
||||
$smarty->assign("WORDTEMPLATEOPTIONS","<td>".$app_strings['LBL_SELECT_TEMPLATE_TO_MAIL_MERGE']."</td><td style=\"padding-left:5px;padding-right:5px\"><select class=\"small\" name=\"mergefile\">".$optionString."</select></td>");
|
||||
|
||||
$smarty->assign("MERGEBUTTON","<td><input title=\"$app_strings[LBL_MERGE_BUTTON_TITLE]\" accessKey=\"$app_strings[LBL_MERGE_BUTTON_KEY]\" class=\"crmbutton small create\" onclick=\"return massMerge('Contacts')\" type=\"submit\" name=\"Merge\" value=\" $app_strings[LBL_MERGE_BUTTON_LABEL]\"></td>");
|
||||
}
|
||||
else
|
||||
{
|
||||
require("user_privileges/user_privileges_".$current_user->id.".php");
|
||||
if($is_admin == true)
|
||||
{
|
||||
$smarty->assign("MERGEBUTTON","<td><a href=index.php?module=Settings&action=upload&tempModule=".$currentModule."&parenttab=Settings>". $app_strings['LBL_CREATE_MERGE_TEMPLATE']."</td>");
|
||||
}
|
||||
}
|
||||
}
|
||||
//mass merge for word templates
|
||||
|
||||
//Retreive the List View Table Header
|
||||
if(!empty($viewid))
|
||||
$url_string .="&viewname=".$viewid;
|
||||
|
||||
$controller = new ListViewController($adb, $current_user, $queryGenerator);
|
||||
$listview_header = $controller->getListViewHeader($focus,$currentModule,$url_string,$sorder,
|
||||
$order_by);
|
||||
$smarty->assign("LISTHEADER", $listview_header);
|
||||
|
||||
$listview_header_search = $controller->getBasicSearchFieldInfoList();
|
||||
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
|
||||
|
||||
$listview_entries = $controller->getListViewEntries($focus,$currentModule,$list_result,
|
||||
$navigation_array);
|
||||
$smarty->assign("LISTENTITY", $listview_entries);
|
||||
$smarty->assign("SELECT_SCRIPT", $view_script);
|
||||
|
||||
$smarty->assign("AVALABLE_FIELDS", getMergeFields($currentModule,"available_fields"));
|
||||
$smarty->assign("FIELDS_TO_MERGE", getMergeFields($currentModule,"fileds_to_merge"));
|
||||
|
||||
//Added to select Multiple records in multiple pages
|
||||
$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs']));
|
||||
$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs']));
|
||||
$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries),";"));
|
||||
|
||||
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string,"Contacts","index",$viewid);
|
||||
$alphabetical = AlphabeticalSearch($currentModule,'index','lastname','true','basic',"","","","",$viewid);
|
||||
$fieldnames = $controller->getAdvancedSearchOptionString();
|
||||
$criteria = getcriteria_options();
|
||||
$smarty->assign("CRITERIA", $criteria);
|
||||
$smarty->assign("FIELDNAMES", $fieldnames);
|
||||
$smarty->assign("NAVIGATION", $navigationOutput);
|
||||
$smarty->assign("ALPHABETICAL", $alphabetical);
|
||||
$smarty->assign("MODULE", $currentModule);
|
||||
$smarty->assign("SINGLE_MOD", 'Contact');
|
||||
|
||||
$check_button = Button_Check($currentModule);
|
||||
$smarty->assign("CHECK", $check_button);
|
||||
|
||||
$_SESSION[$currentModule.'_listquery'] = $list_query;
|
||||
|
||||
// Gather the custom link information to display
|
||||
include_once('vtlib/Vtiger/Link.php');
|
||||
$customlink_params = Array('MODULE'=>$currentModule, 'ACTION'=>vtlib_purify($_REQUEST['action']), 'CATEGORY'=> $category);
|
||||
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('LISTVIEWBASIC','LISTVIEW'), $customlink_params));
|
||||
// END
|
||||
|
||||
if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
|
||||
$smarty->display("ListViewEntries.tpl");
|
||||
else
|
||||
$smarty->display("ListView.tpl");
|
||||
|
||||
?>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?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';
|
||||
?>
|
||||
@@ -1,45 +0,0 @@
|
||||
<?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');
|
||||
|
||||
?>
|
||||
@@ -1,67 +0,0 @@
|
||||
<?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");
|
||||
?>
|
||||
@@ -1,282 +0,0 @@
|
||||
<?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);
|
||||
$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, cannot merge the document");
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<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 vtiger_tab.name,vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid where vtiger_field.tabid in (4,6) and vtiger_field.block <> 75 order by vtiger_field.tablename and vtiger_field.presence in (0,2)";
|
||||
$params1 = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$profileList = getCurrentUserProfileList();
|
||||
$query1="select vtiger_tab.name,vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid 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 (4,6) and vtiger_field.block <> 75 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");
|
||||
$modulename = $adb->query_result($result,$x,"name");
|
||||
|
||||
if($tablename == "crmentity")
|
||||
{
|
||||
if($modulename == "Accounts")
|
||||
{
|
||||
$tablename = "crmentityAccounts";
|
||||
}
|
||||
}
|
||||
$querycolumns[$x] = $tablename.".".$columnname;
|
||||
if($columnname == "smownerid")
|
||||
{
|
||||
if($modulename == "Accounts")
|
||||
{
|
||||
$querycolumns[$x]="case when (usersAccounts.user_name not like '') then concat(usersAccounts.last_name,' ',usersAccounts.first_name) else groupsAccounts.groupname end as username";
|
||||
}
|
||||
if($modulename == "Contacts")
|
||||
{
|
||||
$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 usercname,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";
|
||||
}
|
||||
}
|
||||
if($columnname == "parentid")
|
||||
{
|
||||
$querycolumns[$x] = "accountAccounts.accountname";
|
||||
}
|
||||
if($columnname == "accountid")
|
||||
{
|
||||
$querycolumns[$x] = "accountContacts.accountname";
|
||||
}
|
||||
if($columnname == "reportsto")
|
||||
{
|
||||
$querycolumns[$x] = "contactdetailsContacts.lastname";
|
||||
}
|
||||
|
||||
|
||||
if($modulename == "Accounts")
|
||||
{
|
||||
$field_label[$x] = "ACCOUNT_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel")));
|
||||
}
|
||||
|
||||
if($modulename == "Contacts")
|
||||
{
|
||||
$field_label[$x] = "CONTACT_".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);
|
||||
//echo $csvheader;
|
||||
//<<<<<<<<<<<<<<<<End>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
if(count($querycolumns) > 0)
|
||||
{
|
||||
$selectcolumns = implode($querycolumns,",");
|
||||
|
||||
|
||||
$query = "select $selectcolumns from vtiger_contactdetails
|
||||
inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid
|
||||
inner join vtiger_contactaddress on vtiger_contactdetails.contactid = vtiger_contactaddress.contactaddressid
|
||||
inner join vtiger_contactsubdetails on vtiger_contactdetails.contactid = vtiger_contactsubdetails.contactsubscriptionid
|
||||
inner join vtiger_contactscf on vtiger_contactdetails.contactid = vtiger_contactscf.contactid
|
||||
inner join vtiger_customerdetails on vtiger_contactdetails.contactid = vtiger_customerdetails.customerid
|
||||
left join vtiger_contactdetails as contactdetailsContacts on contactdetailsContacts.contactid = vtiger_contactdetails.reportsto
|
||||
left join vtiger_account as accountContacts on accountContacts.accountid = vtiger_contactdetails.accountid
|
||||
left join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid
|
||||
LEFT JOIN vtiger_groups
|
||||
ON vtiger_groups.groupid = vtiger_crmentity.smownerid
|
||||
left join vtiger_account on vtiger_account.accountid = vtiger_contactdetails.accountid
|
||||
left join vtiger_crmentity as crmentityAccounts on crmentityAccounts.crmid=vtiger_account.accountid
|
||||
left join vtiger_accountbillads on vtiger_account.accountid=vtiger_accountbillads.accountaddressid
|
||||
left join vtiger_accountshipads on vtiger_account.accountid=vtiger_accountshipads.accountaddressid
|
||||
left join vtiger_accountscf on vtiger_account.accountid = vtiger_accountscf.accountid
|
||||
left join vtiger_account as accountAccounts on accountAccounts.accountid = vtiger_account.parentid
|
||||
left join vtiger_users as usersAccounts on usersAccounts.id = crmentityAccounts.smownerid
|
||||
LEFT JOIN vtiger_groups as groupsAccounts
|
||||
ON groupsAccounts.groupid = vtiger_crmentity.smownerid
|
||||
where vtiger_crmentity.deleted=0 and (crmentityAccounts.deleted is NULL or crmentityAccounts.deleted <> 1) and vtiger_contactdetails.contactid in(". generateQuestionMarks($mass_merge) .")";
|
||||
|
||||
|
||||
$result = $adb->pquery($query, array($mass_merge));
|
||||
$avail_pick_arr = getAccessPickListValues('Contacts');
|
||||
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 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>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?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/Contacts/Popup.php,v 1.15 2005/04/19 15:33:44 rank Exp $
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
require_once('Popup.php');
|
||||
?>
|
||||
@@ -1,133 +0,0 @@
|
||||
<?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 = vtlib_purify($_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");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?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');
|
||||
?>
|
||||
@@ -1,227 +0,0 @@
|
||||
<?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/Contacts/Save.php,v 1.9 2005/03/15 09:58:21 shaw Exp $
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('modules/Contacts/Contacts.php');
|
||||
require_once('include/logging.php');
|
||||
require_once('include/database/PearDatabase.php');
|
||||
require_once("modules/Emails/mail.php");
|
||||
|
||||
$local_log =& LoggerManager::getLogger('index');
|
||||
|
||||
global $log,$adb;
|
||||
$focus = new Contacts();
|
||||
//added to fix 4600
|
||||
$search=vtlib_purify($_REQUEST['search_url']);
|
||||
|
||||
setObjectValuesFromRequest($focus);
|
||||
|
||||
if($_REQUEST['salutation'] == '--None--') $_REQUEST['salutation'] = '';
|
||||
if (!isset($_REQUEST['email_opt_out'])) $focus->email_opt_out = 'off';
|
||||
if (!isset($_REQUEST['do_not_call'])) $focus->do_not_call = 'off';
|
||||
|
||||
//Checking If image is given or not
|
||||
//$image_upload_array=SaveImage($_FILES,'contact',$focus->id,$focus->mode);
|
||||
$image_name_val=$image_upload_array['imagename'];
|
||||
$image_error="false";
|
||||
$errormessage=$image_upload_array['errormessage'];
|
||||
$saveimage=$image_upload_array['saveimage'];
|
||||
|
||||
//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($image_error=="true") //If there is any error in the file upload then moving all the data to EditView.
|
||||
{
|
||||
//re diverting the page and reassigning the same values as image error occurs
|
||||
if($_REQUEST['activity_mode'] != '')$activity_mode=vtlib_purify($_REQUEST['activity_mode']);
|
||||
if($_REQUEST['return_module'] != '')$return_module=vtlib_purify($_REQUEST['return_module']);
|
||||
if($_REQUEST['return_action'] != '')$return_action=vtlib_purify($_REQUEST['return_action']);
|
||||
if($_REQUEST['return_id'] != '')$return_id=vtlib_purify($_REQUEST['return_id']);
|
||||
|
||||
$log->debug("There is an error during the upload of contact image.");
|
||||
$field_values_passed.="";
|
||||
foreach($focus->column_fields as $fieldname => $val)
|
||||
{
|
||||
if(isset($_REQUEST[$fieldname]))
|
||||
{
|
||||
$log->debug("Assigning the previous values given for the contact to respective vtiger_fields ");
|
||||
$field_values_passed.="&";
|
||||
$value = $_REQUEST[$fieldname];
|
||||
$focus->column_fields[$fieldname] = $value;
|
||||
$field_values_passed.=$fieldname."=".$value;
|
||||
|
||||
}
|
||||
}
|
||||
$values_pass=$field_values_passed;
|
||||
$encode_field_values=base64_encode($values_pass);
|
||||
|
||||
$error_module = "Contacts";
|
||||
$error_action = "EditView";
|
||||
|
||||
$return_action .= '&activity_mode='.vtlib_purify($_request['activity_mode']);
|
||||
|
||||
if($mode=="edit") {
|
||||
$return_id=vtlib_purify($_REQUEST['record']);
|
||||
}
|
||||
header("location: index.php?action=$error_action&module=$error_module&record=$return_id&return_id=$return_id&return_action=$return_action&return_module=$return_module&activity_mode=$activity_mode&return_viewname=$return_viewname".$search."&saveimage=$saveimage&error_msg=$errormessage&image_error=$image_error&encode_val=$encode_field_values");
|
||||
}
|
||||
if($saveimage=="true")
|
||||
{
|
||||
$focus->column_fields['imagename']=$image_name_val;
|
||||
$log->debug("Assign the Image name to the vtiger_field name ");
|
||||
}
|
||||
|
||||
//if image added then we have to set that $_FILES['name'] in imagename field then only the image will be displayed
|
||||
if($_FILES['imagename']['name'] != '')
|
||||
{
|
||||
if(isset($_REQUEST['imagename_hidden'])) {
|
||||
$focus->column_fields['imagename'] = vtlib_purify($_REQUEST['imagename_hidden']);
|
||||
} else {
|
||||
$focus->column_fields['imagename'] = $_FILES['imagename']['name'];
|
||||
}
|
||||
}
|
||||
elseif($focus->id != '')
|
||||
{
|
||||
$result = $adb->pquery("select imagename from vtiger_contactdetails where contactid = ?", array($focus->id));
|
||||
$focus->column_fields['imagename'] = $adb->query_result($result,0,'imagename');
|
||||
}
|
||||
|
||||
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'];
|
||||
}
|
||||
//Saving the contact
|
||||
if($image_error=="false")
|
||||
{
|
||||
$focus->save("Contacts");
|
||||
$return_id = $focus->id;
|
||||
|
||||
if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']);
|
||||
else $return_module = "Contacts";
|
||||
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']);
|
||||
|
||||
if(isset($_REQUEST['activity_mode']) && $_REQUEST['activity_mode'] != '') $activitymode = vtlib_purify($_REQUEST['activity_mode']);
|
||||
|
||||
$local_log->debug("Saved record with id of ".$return_id);
|
||||
if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == "Campaigns")
|
||||
{
|
||||
if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "")
|
||||
{
|
||||
$campContStatusResult = $adb->pquery("select campaignrelstatusid from vtiger_campaigncontrel where campaignid=? AND contactid=?",array($_REQUEST['return_id'], $focus->id));
|
||||
$contactStatus = $adb->query_result($campContStatusResult,0,'campaignrelstatusid');
|
||||
$sql = "delete from vtiger_campaigncontrel where contactid = ?";
|
||||
$adb->pquery($sql, array($focus->id));
|
||||
if(isset($contactStatus) && $contactStatus!=''){
|
||||
$sql = "insert into vtiger_campaigncontrel values (?,?,?)";
|
||||
$adb->pquery($sql, array($_REQUEST['return_id'], $focus->id,$contactStatus));
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "insert into vtiger_campaigncontrel values (?,?,1)";
|
||||
$adb->pquery($sql, array($_REQUEST['return_id'], $focus->id));
|
||||
}
|
||||
}
|
||||
}
|
||||
//BEGIN -- Code for Create Customer Portal Users password and Send Mail
|
||||
if($_REQUEST['portal'] == '' && $_REQUEST['mode'] == 'edit')
|
||||
{
|
||||
$sql = "update vtiger_portalinfo set user_name=?,isactive=0 where id=?";
|
||||
$adb->pquery($sql, array($_REQUEST['email'], $_REQUEST['record']));
|
||||
}
|
||||
elseif($_REQUEST['portal'] != '' && $_REQUEST['email'] != '')// && $_REQUEST['mode'] != 'edit')
|
||||
{
|
||||
$id = $_REQUEST['record'];
|
||||
$username = $_REQUEST['email'];
|
||||
|
||||
if($_REQUEST['mode'] != 'edit')
|
||||
$insert = 'true';
|
||||
|
||||
$sql = "select id,user_name,user_password,isactive from vtiger_portalinfo";
|
||||
$result = $adb->pquery($sql, array());
|
||||
|
||||
for($i=0;$i<$adb->num_rows($result);$i++)
|
||||
{
|
||||
if($id == $adb->query_result($result,$i,'id'))
|
||||
{
|
||||
$dbusername = $adb->query_result($result,$i,'user_name');
|
||||
$isactive = $adb->query_result($result,$i,'isactive');
|
||||
|
||||
if($username == $dbusername && $isactive == 1)
|
||||
$flag = 'true';
|
||||
else
|
||||
{
|
||||
$sql = "update vtiger_portalinfo set user_name=?, isactive=1 where id=?";
|
||||
$adb->pquery($sql, array($username, $id));
|
||||
$update = 'true';
|
||||
$flag = 'true';
|
||||
$password = $adb->query_result($result,$i,'user_password');
|
||||
}
|
||||
}
|
||||
}
|
||||
if($flag != 'true')
|
||||
$insert = 'true';
|
||||
else
|
||||
$insert = 'false';
|
||||
|
||||
if($insert == 'true')
|
||||
{
|
||||
$password = makeRandomPassword();
|
||||
$sql = "insert into vtiger_portalinfo values(?,?,?,?,?,?,?,?)";
|
||||
$params = array($focus->id, $username, $password, 'C', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1);
|
||||
$adb->pquery($sql, $params);
|
||||
}
|
||||
|
||||
//changes made to send mail to portal user when we use ajax edit
|
||||
$data_array = Array();
|
||||
$data_array['first_name'] = $_REQUEST['firstname'];
|
||||
$data_array['last_name'] = $_REQUEST['lastname'];
|
||||
$data_array['email'] = $_REQUEST['email'];
|
||||
$data_array['portal_url'] = '<a href="'.$PORTAL_URL.'" style="font-family:Arial, Helvetica, sans-serif;font-size:12px; font-weight:bolder;text-decoration:none;color: #4242FD;">'.$mod_strings['Please Login Here'].'</a>';
|
||||
|
||||
$value = getmail_contents_portalUser($data_array,$password,"LoginDetails");
|
||||
$contents=$value["body"]; $subject=$value["subject"];
|
||||
|
||||
$log->info("Customer Portal Information Updated in database and details are going to send => '".$_REQUEST['email']."'");
|
||||
if($insert == 'true' || $update == 'true')
|
||||
{
|
||||
$mail_status = send_mail('Support',$_REQUEST['email'],$current_user->user_name,'',$subject,$contents);
|
||||
}
|
||||
$log->info("After return from the SendMailToCustomer function. Now control will go to the header.");
|
||||
}
|
||||
//END -- Code for Create Customer Portal Users password and Send Mail
|
||||
|
||||
$log->info("This Page is redirected to : ".$return_module." / ".$return_action."& return id =".$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']);
|
||||
|
||||
$parenttab = getParentTab();
|
||||
|
||||
|
||||
header("Location: index.php?action=$return_action&module=$return_module&parenttab=$parenttab&record=$return_id&activity_mode=$activitymode&viewname=$return_viewname&start=".vtlib_purify($_REQUEST['pagenumber']));
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?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/Vtiger/Settings.php');
|
||||
|
||||
?>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?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')
|
||||
?>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?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';
|
||||
?>
|
||||
|
Before Width: | Height: | Size: 718 B |
|
Before Width: | Height: | Size: 742 B |
|
Before Width: | Height: | Size: 608 B |
|
Before Width: | Height: | Size: 609 B |
|
Before Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 55 B |
|
Before Width: | Height: | Size: 63 B |
|
Before Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 305 B |
|
Before Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 236 B |
|
Before Width: | Height: | Size: 305 B |
|
Before Width: | Height: | Size: 165 B |
|
Before Width: | Height: | Size: 400 B |
|
Before Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 288 B |
|
Before Width: | Height: | Size: 252 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,27 +0,0 @@
|
||||
<?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/Contacts/index.php,v 1.5 2005/03/25 13:37:45 samk Exp $
|
||||
* Description: TODO: To be written.
|
||||
********************************************************************************/
|
||||
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
global $mod_strings;
|
||||
|
||||
include ('modules/Contacts/ListView.php');
|
||||
|
||||
?>
|
||||
@@ -1,249 +0,0 @@
|
||||
<?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/Contacts/language/en_us.lang.php,v 1.14 2005/03/24 17:47:43 rank Exp $
|
||||
* Description: Defines the English language pack
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = Array(
|
||||
// Mike Crowe Mod --------------------------------------------------------Added for general search
|
||||
'LBL_MODULE_NAME'=>'Contacts',
|
||||
'LBL_INVITEE'=>'Direct Reports',
|
||||
'LBL_MODULE_TITLE'=>'Contacts: Home',
|
||||
'LBL_SEARCH_FORM_TITLE'=>'Contact Search',
|
||||
'LBL_LIST_FORM_TITLE'=>'Contact List',
|
||||
'LBL_NEW_FORM_TITLE'=>'New Contact',
|
||||
'LBL_CONTACT_OPP_FORM_TITLE'=>'Contact-Opportunity:',
|
||||
'LBL_CONTACT'=>'Contact:',
|
||||
|
||||
'LBL_LIST_NAME'=>'Name',
|
||||
'LBL_LIST_LAST_NAME'=>'Last Name',
|
||||
'LBL_LIST_FIRST_NAME'=>'First Name',
|
||||
'LBL_LIST_CONTACT_NAME'=>'Contact Name',
|
||||
'LBL_LIST_TITLE'=>'Title',
|
||||
'LBL_LIST_ACCOUNT_NAME'=>'Account Name',
|
||||
'LBL_LIST_EMAIL_ADDRESS'=>'Email',
|
||||
'LBL_LIST_PHONE'=>'Phone',
|
||||
'LBL_LIST_CONTACT_ROLE'=>'Role',
|
||||
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_last_name' => 'LBL_LIST_LAST_NAME',
|
||||
'db_first_name' => 'LBL_LIST_FIRST_NAME',
|
||||
'db_title' => 'LBL_LIST_TITLE',
|
||||
'db_email1' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'db_email2' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
//END DON'T CONVERT
|
||||
|
||||
'LBL_EXISTING_CONTACT' => 'Used an existing contact',
|
||||
'LBL_CREATED_CONTACT' => 'Created a new contact',
|
||||
'LBL_EXISTING_ACCOUNT' => 'Used an existing vtiger_account',
|
||||
'LBL_CREATED_ACCOUNT' => 'Created a new vtiger_account',
|
||||
'LBL_CREATED_CALL' => 'Created a new call',
|
||||
'LBL_CREATED_MEETING' => 'Created a new meeting',
|
||||
'LBL_ADDMORE_BUSINESSCARD' =>'Add another business card',
|
||||
|
||||
'LBL_BUSINESSCARD' => 'Business Card',
|
||||
|
||||
'LBL_NAME'=>'Name:',
|
||||
'LBL_CONTACT_NAME'=>'Contact Name:',
|
||||
'LBL_CONTACT_INFORMATION'=>'Contact Information',
|
||||
'LBL_CUSTOM_INFORMATION'=>'Custom Information',
|
||||
'LBL_FIRST_NAME'=>'First Name:',
|
||||
'LBL_OFFICE_PHONE'=>'Office Phone:',
|
||||
'LBL_ACCOUNT_NAME'=>'Account Name:',
|
||||
'LBL_ANY_PHONE'=>'Any Phone:',
|
||||
'LBL_PHONE'=>'Phone:',
|
||||
'LBL_LAST_NAME'=>'Last Name:',
|
||||
'LBL_MOBILE_PHONE'=>'Mobile:',
|
||||
'LBL_HOME_PHONE'=>'Home:',
|
||||
'LBL_LEAD_SOURCE'=>'Lead Source:',
|
||||
'LBL_OTHER_PHONE'=>'Other Phone:',
|
||||
'LBL_FAX_PHONE'=>'Fax:',
|
||||
'LBL_TITLE'=>'Title:',
|
||||
'LBL_DEPARTMENT'=>'Department:',
|
||||
'LBL_BIRTHDATE'=>'Birthdate:',
|
||||
'LBL_EMAIL_ADDRESS'=>'Email:',
|
||||
'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:',
|
||||
'LBL_ANY_EMAIL'=>'Any Email:',
|
||||
'LBL_REPORTS_TO'=>'Reports To:',
|
||||
'LBL_ASSISTANT'=>'Assistant:',
|
||||
'LBL_YAHOO_ID'=>'Yahoo! ID:',
|
||||
'LBL_ASSISTANT_PHONE'=>'Assistant Phone:',
|
||||
'LBL_DO_NOT_CALL'=>'Do Not Call:',
|
||||
'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:',
|
||||
'LBL_PRIMARY_ADDRESS'=>'Primary Address:',
|
||||
'LBL_ALTERNATE_ADDRESS'=>'Other Address:',
|
||||
'LBL_ANY_ADDRESS'=>'Any Address:',
|
||||
'LBL_CITY'=>'City:',
|
||||
'LBL_STATE'=>'State:',
|
||||
'LBL_POSTAL_CODE'=>'Postal Code:',
|
||||
'LBL_COUNTRY'=>'Country:',
|
||||
'LBL_DESCRIPTION_INFORMATION'=>'Description Information',
|
||||
'LBL_IMAGE_INFORMATION'=>'Contact Image Information:',
|
||||
'LBL_ADDRESS_INFORMATION'=>'Address Information',
|
||||
'LBL_DESCRIPTION'=>'Description:',
|
||||
'LBL_CONTACT_ROLE'=>'Role:',
|
||||
'LBL_OPP_NAME'=>'Opportunity Name:',
|
||||
'LBL_DUPLICATE'=>'Potential Duplicate Contacts',
|
||||
'MSG_DUPLICATE' => 'Creating this contact may vtiger_potentialy create a duplicate contact. You may either select a contact from the list below or you may click on Create New Contact to continue creating a new contact with the previously entered data.',
|
||||
|
||||
'LNK_NEW_APPOINTMENT' => 'New Appointment',
|
||||
'LBL_ADD_BUSINESSCARD' => 'Add Business Card',
|
||||
'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?',
|
||||
'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',
|
||||
|
||||
'LBL_SELECT_CONTACT'=>'Select Contact',
|
||||
//Added for search heading
|
||||
'LBL_GENERAL_INFORMATION'=>'General Information',
|
||||
|
||||
|
||||
|
||||
//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',
|
||||
|
||||
// Added for 4GA
|
||||
'LBL_TOOL_FORM_TITLE'=>'Contact Tools',
|
||||
|
||||
'Salutation'=>'Salutation',
|
||||
'First Name'=>'First Name',
|
||||
'Office Phone'=>'Office Phone',
|
||||
'Last Name'=>'Last Name',
|
||||
'Mobile'=>'Mobile',
|
||||
'Account Name'=>'Account Name',
|
||||
'Home Phone'=>'Home Phone',
|
||||
'Lead Source'=>'Lead Source',
|
||||
'Other Phone'=>'Other Phone',
|
||||
'Title'=>'Title',
|
||||
'Fax'=>'Fax',
|
||||
'Department'=>'Department',
|
||||
'Birthdate'=>'Birthdate',
|
||||
'Email'=>'Email',
|
||||
'Reports To'=>'Reports To',
|
||||
'Assistant'=>'Assistant',
|
||||
'Yahoo Id'=>'Yahoo Id',
|
||||
'Assistant Phone'=>'Assistant Phone',
|
||||
'Do Not Call'=>'Do Not Call',
|
||||
'Email Opt Out'=>'Email Opt Out',
|
||||
'Assigned To'=>'Assigned To',
|
||||
'Campaign Source'=>'Campaign Source',
|
||||
'Reference' =>'Reference',
|
||||
'Created Time'=>'Created Time',
|
||||
'Modified Time'=>'Modified Time',
|
||||
'Mailing Street'=>'Mailing Street',
|
||||
'Other Street'=>'Other Street',
|
||||
'Mailing City'=>'Mailing City',
|
||||
'Mailing State'=>'Mailing State',
|
||||
'Mailing Zip'=>'Mailing Postal Code',
|
||||
'Mailing Country'=>'Mailing Country',
|
||||
'Mailing Po Box'=>'Mailing PO Box',
|
||||
'Other Po Box'=>'Other PO Box',
|
||||
'Other City'=>'Other City',
|
||||
'Other State'=>'Other State',
|
||||
'Other Zip'=>'Other Postal Code',
|
||||
'Other Country'=>'Other Country',
|
||||
'Contact Image'=>'Contact Image',
|
||||
'Description'=>'Description',
|
||||
|
||||
// Added vtiger_fields for Add Business Card
|
||||
'LBL_NEW_CONTACT'=>'New Contact',
|
||||
'LBL_NEW_ACCOUNT'=>'New Account',
|
||||
'LBL_NOTE_SUBJECT'=>'Document Subject:',
|
||||
'LBL_NOTE'=>'Note:',
|
||||
'LBL_WEBSITE'=>'Website:',
|
||||
'LBL_NEW_APPOINTMENT'=>'New Appointment',
|
||||
'LBL_SUBJECT'=>'Subject:',
|
||||
'LBL_START_DATE'=>'Start Date:',
|
||||
'LBL_START_TIME'=>'Start Time:',
|
||||
|
||||
//Added vtiger_field after 4_0_1
|
||||
'Portal User'=>'Portal User',
|
||||
'LBL_CUSTOMER_PORTAL_INFORMATION'=>'Customer Portal Information',
|
||||
'Support Start Date'=>'Support Start Date',
|
||||
'Support End Date'=>'Support End Date',
|
||||
//Added for 4.2 Release -- CustomView
|
||||
'Name'=>'Name',
|
||||
'LBL_ALL'=>'All',
|
||||
'LBL_MAXIMUM_LIMIT_ERROR'=>'Sorry, the uploaded file exceeds the maximum vtiger_filesize limit. Please try a file smaller than 800000 bytes',
|
||||
'LBL_UPLOAD_ERROR'=>'Problems in file upload. Please try again!',
|
||||
'LBL_IMAGE_ERROR'=>'The given file is not of type image(.gif/.jpg/.png)',
|
||||
'LBL_INVALID_IMAGE'=>'Invalid file OR File has no data',
|
||||
|
||||
//Added after 5Alpha5
|
||||
'Notify Owner'=>'Notify Owner',
|
||||
|
||||
//Added for Picklist Values
|
||||
'--None--'=>'--None--',
|
||||
|
||||
'Mr.'=>'Mr.',
|
||||
'Ms.'=>'Ms.',
|
||||
'Mrs.'=>'Mrs.',
|
||||
'Dr.'=>'Dr.',
|
||||
'Prof.'=>'Prof.',
|
||||
|
||||
'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',
|
||||
'Other'=>'Other',
|
||||
'User List'=>'User List',
|
||||
|
||||
//Added for 5.0.3
|
||||
'Customer Portal Login Details'=>'Customer Portal Login Details',
|
||||
'Dear'=>'Dear',
|
||||
'Your Customer Portal Login details are given below:'=>'Your Customer Portal Login details are given below:',
|
||||
'User Id :'=>'User Id :',
|
||||
'Password :'=>'Password :',
|
||||
'Please Login Here'=>'Please Login Here',
|
||||
'Note :'=>'Note :',
|
||||
'We suggest you to change your password after logging in first time'=>'We suggest you to change your password after logging in first time.',
|
||||
'Support Team'=>'Support Team',
|
||||
|
||||
'TITLE_AJAX_CSS_POPUP_CHAT'=>'Ajax Css-Popup chat',
|
||||
|
||||
// Added after 5.0.4 GA
|
||||
|
||||
// Module Sequence Numbering
|
||||
'Contact Id' => 'Contact Id',
|
||||
// END
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -1,249 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2006-2010 YUCHENG HU
|
||||
*
|
||||
* ---------------------------------------------
|
||||
* HA WEBSYSTEMS
|
||||
* http://www.hawebs.net
|
||||
* https://www.hawebs.org/forums/computer/
|
||||
*
|
||||
* CONTACT
|
||||
* huyuchengus@gmail.com / yuchenghu@hawebs.net
|
||||
*
|
||||
* ---------------------------------------------
|
||||
* [A] GNU GENERAL PUBLIC LICENSE GNU/LGPL
|
||||
* [B] Apache License, Version 2.0
|
||||
*
|
||||
* ---------------------------------------------
|
||||
* NOTE
|
||||
* 1. 所有的语言配置文件请采用 UTF-8 编码
|
||||
*
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
$mod_strings=Array(
|
||||
//MikeCroweMod--------------------------------------------------------Addedforgeneralsearch
|
||||
'LBL_MODULE_NAME'=>'联系人',
|
||||
'LBL_INVITEE'=>'针对报告',
|
||||
'LBL_MODULE_TITLE'=>'联系人:首页',
|
||||
'LBL_SEARCH_FORM_TITLE'=>'搜寻联系人',
|
||||
'LBL_LIST_FORM_TITLE'=>'联系人列表',
|
||||
'LBL_NEW_FORM_TITLE'=>'新增联系人',
|
||||
'LBL_CONTACT_OPP_FORM_TITLE'=>'联系人-机会:',
|
||||
'LBL_CONTACT'=>'联系人:',
|
||||
|
||||
'LBL_LIST_NAME'=>'名称',
|
||||
'LBL_LIST_LAST_NAME'=>'姓名',
|
||||
'LBL_LIST_FIRST_NAME'=>'英文名',
|
||||
'LBL_LIST_CONTACT_NAME'=>'联系人名称',
|
||||
'LBL_LIST_TITLE'=>'在线IM',
|
||||
'LBL_LIST_ACCOUNT_NAME'=>'客户名称',
|
||||
'LBL_LIST_EMAIL_ADDRESS'=>'电子邮件',
|
||||
'LBL_LIST_PHONE'=>'电话',
|
||||
'LBL_LIST_CONTACT_ROLE'=>'职位',
|
||||
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_last_name'=>'LBL_LIST_LAST_NAME',
|
||||
'db_first_name'=>'LBL_LIST_FIRST_NAME',
|
||||
'db_title'=>'LBL_LIST_TITLE',
|
||||
'db_email1'=>'LBL_LIST_EMAIL_ADDRESS',
|
||||
'db_email2'=>'LBL_LIST_EMAIL_ADDRESS',
|
||||
//ENDDON'TCONVERT
|
||||
|
||||
'LBL_EXISTING_CONTACT'=>'使用现有的联系人',
|
||||
'LBL_CREATED_CONTACT'=>'建立新的联系人',
|
||||
'LBL_EXISTING_ACCOUNT'=>'使用现有的客户',
|
||||
'LBL_CREATED_ACCOUNT'=>'建立新的客户',
|
||||
'LBL_CREATED_CALL'=>'建立新的电话记录l',
|
||||
'LBL_CREATED_MEETING'=>'建立新的会议',
|
||||
'LBL_ADDMORE_BUSINESSCARD'=>'增加其它的商业名片',
|
||||
|
||||
'LBL_BUSINESSCARD'=>'商业名片',
|
||||
|
||||
'LBL_NAME'=>'名称:',
|
||||
'LBL_CONTACT_NAME'=>'联系人名称:',
|
||||
'LBL_CONTACT_INFORMATION'=>'联系人信息',
|
||||
'LBL_CUSTOM_INFORMATION'=>'客户信息',
|
||||
'LBL_FIRST_NAME'=>'英文名:',
|
||||
'LBL_OFFICE_PHONE'=>'办公室电话:',
|
||||
'LBL_ACCOUNT_NAME'=>'客户名称:',
|
||||
'LBL_ANY_PHONE'=>'其它电话:',
|
||||
'LBL_PHONE'=>'电话:',
|
||||
'LBL_LAST_NAME'=>'姓名:',
|
||||
'LBL_MOBILE_PHONE'=>'手机:',
|
||||
'LBL_HOME_PHONE'=>'首页:',
|
||||
'LBL_LEAD_SOURCE'=>'接触来源:',
|
||||
'LBL_OTHER_PHONE'=>'其它电话:',
|
||||
'LBL_FAX_PHONE'=>'传真:',
|
||||
'LBL_TITLE'=>'在线IM:',
|
||||
'LBL_DEPARTMENT'=>'部门:',
|
||||
'LBL_BIRTHDATE'=>'生日:',
|
||||
'LBL_EMAIL_ADDRESS'=>'电子邮件:',
|
||||
'LBL_OTHER_EMAIL_ADDRESS'=>'其它电子邮件:',
|
||||
'LBL_ANY_EMAIL'=>'其它电子邮件:',
|
||||
'LBL_REPORTS_TO'=>'报告给:',
|
||||
'LBL_ASSISTANT'=>'助理:',
|
||||
'LBL_YAHOO_ID'=>'Yahoo账号:',
|
||||
'LBL_ASSISTANT_PHONE'=>'助理电话:',
|
||||
'LBL_DO_NOT_CALL'=>'请勿来电:',
|
||||
'LBL_EMAIL_OPT_OUT'=>'请勿寄电子邮件:',
|
||||
'LBL_PRIMARY_ADDRESS'=>'主要地址:',
|
||||
'LBL_ALTERNATE_ADDRESS'=>'其它地址:',
|
||||
'LBL_ANY_ADDRESS'=>'其它地址:',
|
||||
'LBL_CITY'=>'乡镇市区:',
|
||||
'LBL_STATE'=>'市(县):',
|
||||
'LBL_POSTAL_CODE'=>'邮政编码:',
|
||||
'LBL_COUNTRY'=>'省(市/自治区):',
|
||||
'LBL_DESCRIPTION_INFORMATION'=>'描述信息',
|
||||
'LBL_IMAGE_INFORMATION'=>'联系人照片:',
|
||||
'LBL_ADDRESS_INFORMATION'=>'地址信息',
|
||||
'LBL_DESCRIPTION'=>'描述:',
|
||||
'LBL_CONTACT_ROLE'=>'职位:',
|
||||
'LBL_OPP_NAME'=>'机会名称:',
|
||||
'LBL_DUPLICATE'=>'接触到潜在案件',
|
||||
'MSG_DUPLICATE'=>'建立这个联系人可能造成重复,您可以点选建立联系人来透过已存在的数据建立新的联系人或是点选取消。',
|
||||
|
||||
'LNK_NEW_APPOINTMENT'=>'新增行程',
|
||||
'LBL_ADD_BUSINESSCARD'=>'新增商业名片',
|
||||
'NTC_DELETE_CONFIRMATION'=>'您确定要删除这笔记录?',
|
||||
'NTC_REMOVE_CONFIRMATION'=>'您确定要从这个案件中移除这位联系人?',
|
||||
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'您确定要将此记录从直接报告人处删除吗?',
|
||||
'ERR_DELETE_RECORD'=>'在删除联系人前必须输入正确的记录编号.',
|
||||
'NTC_COPY_PRIMARY_ADDRESS'=>'复制主要地址到替代地址',
|
||||
'NTC_COPY_ALTERNATE_ADDRESS'=>'复制替代地址到替代地址',
|
||||
|
||||
'LBL_SELECT_CONTACT'=>'选择联系人',
|
||||
//Added for search heading
|
||||
'LBL_GENERAL_INFORMATION'=>'一般信息',
|
||||
|
||||
|
||||
|
||||
//for v4 release added
|
||||
'LBL_NEW_POTENTIAL'=>'新增潜在',
|
||||
'LBL_POTENTIAL_TITLE'=>'潜在',
|
||||
|
||||
'LBL_NEW_TASK'=>'新增任务',
|
||||
'LBL_TASK_TITLE'=>'任务',
|
||||
'LBL_NEW_CALL'=>'新增电话记录',
|
||||
'LBL_CALL_TITLE'=>'电话记录',
|
||||
'LBL_NEW_MEETING'=>'新增会议',
|
||||
'LBL_MEETING_TITLE'=>'会议',
|
||||
'LBL_NEW_EMAIL'=>'新增电子邮件',
|
||||
'LBL_EMAIL_TITLE'=>'电子邮件',
|
||||
'LBL_NEW_NOTE'=>'新增备忘录',
|
||||
'LBL_NOTE_TITLE'=>'备忘录',
|
||||
|
||||
// Added for 4GA
|
||||
'LBL_TOOL_FORM_TITLE'=>'联系人编辑区',
|
||||
|
||||
'Salutation'=>'问候',
|
||||
'FirstName'=>'英文名',
|
||||
'OfficePhone'=>'办公室电话',
|
||||
'LastName'=>'姓名',
|
||||
'Mobile'=>'手机',
|
||||
'AccountName'=>'客户名称',
|
||||
'HomePhone'=>'家用电话',
|
||||
'LeadSource'=>'客户来源',
|
||||
'Phone'=>'电话',
|
||||
'Title'=>'在线QQ',
|
||||
'Fax'=>'传真',
|
||||
'Department'=>'部门',
|
||||
'Birthdate'=>'生日',
|
||||
'Email'=>'电子邮件',
|
||||
'ReportsTo'=>'报告给',
|
||||
'Assistant'=>'助理',
|
||||
'YahooId'=>'Yahoo账号',
|
||||
'AssistantPhone'=>'助理电话',
|
||||
'DoNotCall'=>'拒绝来电',
|
||||
'EmailOptOut'=>'拒绝电子邮件',
|
||||
'AssignedTo'=>'负责人',
|
||||
'CampaignSource'=>'活动来源',
|
||||
'Reference'=>'参考',
|
||||
'CreatedTime'=>'建立时间',
|
||||
'ModifiedTime'=>'修改时间',
|
||||
'MailingStreet'=>'邮寄地址',
|
||||
'OtherStreet'=>'其它地址',
|
||||
'MailingCity'=>'乡镇市区',
|
||||
'MailingState'=>'市(县)',
|
||||
'MailingZip'=>'邮政编码',
|
||||
'MailingCountry'=>'省(市/自治区)',
|
||||
'MailingPoBox'=>'采购订单信箱',
|
||||
'OtherPoBox'=>'其它采购订单信箱',
|
||||
'OtherCity'=>'乡镇市区',
|
||||
'OtherState'=>'市(县)',
|
||||
'OtherZip'=>'邮政编码',
|
||||
'OtherCountry'=>'省(市/自治区)',
|
||||
'ContactImage'=>'照片',
|
||||
'Description'=>'描述',
|
||||
|
||||
// Added vtiger_fields for Add Business Card
|
||||
'LBL_NEW_CONTACT'=>'新增联系人',
|
||||
'LBL_NEW_ACCOUNT'=>'新增客户',
|
||||
'LBL_NOTE_SUBJECT'=>'备忘录标题:',
|
||||
'LBL_NOTE'=>'备忘录:',
|
||||
'LBL_WEBSITE'=>'网站:',
|
||||
'LBL_NEW_APPOINTMENT'=>'新增行程',
|
||||
'LBL_SUBJECT'=>'在线IM:',
|
||||
'LBL_START_DATE'=>'开始日期:',
|
||||
'LBL_START_TIME'=>'开始时间:',
|
||||
|
||||
//Added vtiger_field after 4_0_1
|
||||
'PortalUser'=>'网站账号',
|
||||
'LBL_CUSTOMER_PORTAL_INFORMATION'=>'网站客户信息',
|
||||
'SupportStartDate'=>'支持开始日期',
|
||||
'SupportEndDate'=>'支持结束日期',
|
||||
//Addedfor4.2Release--CustomView
|
||||
'Name'=>'名称',
|
||||
'LBL_ALL'=>'全部',
|
||||
'LBL_MAXIMUM_LIMIT_ERROR'=>'抱歉,文件超过系统限制,请保持上传文件在800000bytes以下',
|
||||
'LBL_UPLOAD_ERROR'=>'上传失败,请重试!',
|
||||
'LBL_IMAGE_ERROR'=>'提供的文件不是图片格式(.gif/.jpg/.png)',
|
||||
'LBL_INVALID_IMAGE'=>'文件有误或是没有数据',
|
||||
|
||||
//Added after 5Alpha5
|
||||
'Notify Owner'=>'提醒负责人',
|
||||
|
||||
//Added for Picklist Values
|
||||
'--None--'=>'--None--',
|
||||
|
||||
'Mr.'=>'先生',
|
||||
'Ms.'=>'小姐',
|
||||
'Mrs.'=>'太太',
|
||||
'Dr.'=>'博士',
|
||||
'Prof.'=>'专家',
|
||||
|
||||
'ColdCall'=>'陌生拜访',
|
||||
'ExistingCustomer'=>'既有客户',
|
||||
'SelfGenerated'=>'自动产生',
|
||||
'Employee'=>'员工',
|
||||
'Partner'=>'伙伴',
|
||||
'PublicRelations'=>'公众关系',
|
||||
'DirectMail'=>'邮件营销',
|
||||
'Conference'=>'研讨会',
|
||||
'TradeShow'=>'贸易展览',
|
||||
'WebSite'=>'网站',
|
||||
'Wordofmouth'=>'口耳相传',
|
||||
'Other'=>'其它',
|
||||
'UserList'=>'使用者清单',
|
||||
|
||||
//Addedfor5.0.3
|
||||
'CustomerPortalLoginDetails'=>'顾客注册细节',
|
||||
'Dear'=>'亲爱的',
|
||||
'YourCustomerPortalLogindetailsaregivenbelow:'=>'您的顾客提供了以下注册细节:',
|
||||
'UserId:'=>'用户号:',
|
||||
'Password:'=>'密码:',
|
||||
'PleaseLoginHere'=>'请在这里登录',
|
||||
'Note:'=>'笔记:',
|
||||
'Wesuggestyoutochangeyourpasswordafterlogginginfirsttime'=>'请您在第一次登录时修改密码以保证安全.',
|
||||
'SupportTeam'=>'项目团队',
|
||||
|
||||
'TITLE_AJAX_CSS_POPUP_CHAT'=>'Ajax Css-Popup chat',
|
||||
|
||||
// Added after 5.0.4 GA
|
||||
|
||||
// Module Sequence Numbering
|
||||
'ContactId'=>'编号',
|
||||
//END
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -1,55 +0,0 @@
|
||||
<?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/database/PearDatabase.php');
|
||||
require_once('user_privileges/default_module_view.php');
|
||||
global $adb, $singlepane_view, $currentModule;
|
||||
$idlist = vtlib_purify($_REQUEST['idlist']);
|
||||
$dest_mod = vtlib_purify($_REQUEST['destination_module']);
|
||||
$record = vtlib_purify($_REQUEST['record']);
|
||||
$parenttab = getParentTab();
|
||||
|
||||
$forCRMRecord = vtlib_purify($_REQUEST['parentid']);
|
||||
|
||||
if($singlepane_view == 'true')
|
||||
$action = "DetailView";
|
||||
else
|
||||
$action = "CallRelatedList";
|
||||
|
||||
$storearray = array();
|
||||
if(!empty($_REQUEST['idlist'])) {
|
||||
// Split the string of ids
|
||||
$storearray = explode (";",trim($idlist,";"));
|
||||
} else if(!empty($_REQUEST['entityid'])){
|
||||
$storearray = array($_REQUEST['entityid']);
|
||||
}elseif(!empty($_REQUEST['pot_id'])) {
|
||||
$forCRMRecord = $record;
|
||||
$sql = "insert into vtiger_contpotentialrel values(?,?)";
|
||||
$adb->pquery($sql, array($forCRMRecord, $_REQUEST["pot_id"]));
|
||||
}
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
foreach($storearray as $id)
|
||||
{
|
||||
if($id != '')
|
||||
{
|
||||
if($dest_mod == 'Products')
|
||||
$adb->pquery("insert into vtiger_seproductsrel values (?,?,?)", array($forCRMRecord, $id, 'Contacts'));
|
||||
elseif($dest_mod == 'Campaigns')
|
||||
$adb->pquery("insert into vtiger_campaigncontrel values(?,?,1)", array($id, $forCRMRecord));
|
||||
elseif($dest_mod == 'Documents')
|
||||
$adb->pquery("insert into vtiger_senotesrel values(?,?)", array($forCRMRecord,$id));
|
||||
else {
|
||||
$focus->save_related_module($currentModule, $forCRMRecord, $dest_mod, $id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header("Location: index.php?action=$action&module=$currentModule&record=".$forCRMRecord."&parenttab=".$parenttab);
|
||||
|
||||
?>
|
||||