更新到 5.2 正式版后第一次 SVN 提交。
[email protected] git-svn-id: https://svn.code.sf.net/p/hawebs/svn@571 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
@@ -1,43 +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/utils.php');
|
||||
|
||||
global $app_strings, $default_charset, $currentModule, $current_user, $theme;
|
||||
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
if (!isset($where)) $where = "";
|
||||
|
||||
$parent_tab=getParentTab();
|
||||
$smarty->assign("CATEGORY",$parent_tab);
|
||||
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("APP", $app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
$smarty->assign("MODULE",$currentModule);
|
||||
|
||||
$check_button = Button_Check($currentModule);
|
||||
$check_button['Import'] = 'no';
|
||||
$check_button['Export'] = 'no';
|
||||
$check_button['moduleSettings'] = 'no';
|
||||
$smarty->assign("CHECK", $check_button);
|
||||
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
$accountid = vtlib_purify($_REQUEST['accountid']);
|
||||
if (!empty($accountid)) {
|
||||
$hierarchy = $focus->getAccountHierarchy($accountid);
|
||||
}
|
||||
$smarty->assign("ACCOUNT_HIERARCHY",$hierarchy);
|
||||
$smarty->display("AccountHierarchy.tpl");
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
require_once('include/Ajax/CommonAjax.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.
|
||||
********************************************************************************/
|
||||
require_once('modules/Accounts/Accounts.php');
|
||||
require_once('modules/Contacts/Contacts.php');
|
||||
require_once('include/utils/utils.php');
|
||||
require_once('user_privileges/default_module_view.php');
|
||||
global $adb;
|
||||
global $log;
|
||||
//When changing the Account Address Information it should also change the related contact address --Dinakaran
|
||||
$record = $_REQUEST['record'];
|
||||
$sql ="select vtiger_account.accountid,vtiger_accountbillads.bill_street as billingstreet, vtiger_accountbillads.bill_city as billingcity,vtiger_accountbillads.bill_code as billingcode,vtiger_accountbillads.bill_country as billingcountry,vtiger_accountbillads.bill_state as billingstate,vtiger_accountbillads.bill_pobox as billingpobox ,vtiger_accountshipads.* from vtiger_account inner join vtiger_accountbillads on vtiger_accountbillads.accountaddressid=vtiger_account.accountid inner join vtiger_accountshipads on vtiger_accountshipads.accountaddressid = vtiger_account.accountid where accountid=?";
|
||||
//$sql ="select vtiger_account.accountid,vtiger_accountbillads.* ,vtiger_accountshipads.* from vtiger_accountbillads,vtiger_accountshipads,vtiger_account where accountid =".$record;
|
||||
$result = $adb->pquery($sql, array($record));
|
||||
$value = $adb->fetch_row($result);
|
||||
|
||||
if(($_REQUEST['bill_city'] != $value['billingcity'] && isset($_REQUEST['bill_city'])) ||
|
||||
($_REQUEST['bill_street'] != $value['billingstreet'] && isset($_REQUEST['bill_street'])) ||
|
||||
($_REQUEST['bill_country']!=$value['billingcountry'] && isset($_REQUEST['bill_country']))||
|
||||
($_REQUEST['bill_code']!=$value['billingcode'] && isset($_REQUEST['bill_code']))||
|
||||
($_REQUEST['bill_pobox']!=$value['billingpobox'] && isset($_REQUEST['bill_pobox'])) ||
|
||||
($_REQUEST['bill_state']!=$value['billingstate'] && isset($_REQUEST['bill_state']))||
|
||||
($_REQUEST['ship_country']!=$value['ship_country'] && isset($_REQUEST['ship_country']))||
|
||||
($_REQUEST['ship_city']!=$value['ship_city'] && isset($_REQUEST['ship_city']))||
|
||||
($_REQUEST['ship_state']!=$value['ship_state'] && isset($_REQUEST['ship_state']))||
|
||||
($_REQUEST['ship_code']!=$value['ship_code'] && isset($_REQUEST['ship_code']))||
|
||||
($_REQUEST['ship_street']!=$value['ship_street'] && isset($_REQUEST['ship_street']))||
|
||||
($_REQUEST['ship_pobox']!=$value['ship_pobox'] && isset($_REQUEST['ship_pobox'])))
|
||||
{
|
||||
$sql1="select contactid from vtiger_contactdetails where accountid=?";
|
||||
$result1 = $adb->pquery($sql1, array($record));
|
||||
if($adb->num_rows($result1) > 0)
|
||||
{
|
||||
echo 'address_change';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'No Changes';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'No Changes';
|
||||
}
|
||||
?>
|
||||
@@ -1,87 +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['accountname'];
|
||||
$log->debug("id is ".$focus->id);
|
||||
$log->debug("name is ".$focus->name);
|
||||
}
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $theme, $currentModule;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
}
|
||||
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
|
||||
$smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode']));
|
||||
}
|
||||
if(!$_SESSION['rlvs'][$module]) {
|
||||
unset($_SESSION['rlvs']);
|
||||
}
|
||||
|
||||
// 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("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar'));
|
||||
$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events'));
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
|
||||
if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
|
||||
$related_array=getRelatedLists("Accounts",$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("ID",$focus->id);
|
||||
$smarty->assign("MODULE",$currentmodule);
|
||||
$smarty->assign("SINGLE_MOD",$app_strings['Account']);
|
||||
$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,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,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/Accounts/Delete.php,v 1.5 2005/03/10 09:28:34 shaw Exp $
|
||||
* Description: Deletes an Account record and then redirects the browser to the
|
||||
* defined return URL.
|
||||
********************************************************************************/
|
||||
|
||||
global $currentModule;
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
require_once('include/logging.php');
|
||||
$log = LoggerManager::getLogger('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'])."&record=".vtlib_purify($_REQUEST['return_id'])."&parenttab=".$parenttab."&relmodule=".vtlib_purify($_REQUEST['module']).$url);
|
||||
?>
|
||||
@@ -1,172 +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/Accounts/DetailView.php,v 1.37 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('include/CustomFieldUtil.php');
|
||||
require_once('include/utils/utils.php');
|
||||
require_once('user_privileges/default_module_view.php');
|
||||
require_once 'modules/CustomView/CustomView.php';
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $log, $currentModule, $singlepane_view;
|
||||
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) {
|
||||
$focus->retrieve_entity_info($_REQUEST['record'],"Accounts");
|
||||
$focus->id = $_REQUEST['record'];
|
||||
$focus->name=$focus->column_fields['accountname'];
|
||||
$log->debug("id is ".$focus->id);
|
||||
$log->debug("name is ".$focus->name);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
}
|
||||
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
$log->info("Account 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']);
|
||||
|
||||
if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
|
||||
else $smarty->assign("NAME", "");
|
||||
$smarty->assign("BLOCKS", getBlocks("Accounts","detail_view",'',$focus->column_fields));
|
||||
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
|
||||
|
||||
// Module Sequence Numbering
|
||||
$mod_seq_field = getModuleSequenceField($currentModule);
|
||||
if ($mod_seq_field != null) {
|
||||
$mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
|
||||
} else {
|
||||
$mod_seq_id = $focus->id;
|
||||
}
|
||||
$smarty->assign('MOD_SEQ_ID', $mod_seq_id);
|
||||
// END
|
||||
|
||||
$smarty->assign("CUSTOMFIELD", $cust_fld);
|
||||
$smarty->assign("ID", $_REQUEST['record']);
|
||||
$smarty->assign("SINGLE_MOD",'Account');
|
||||
$category = getParentTab();
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
|
||||
if(useInternalMailer() == 1)
|
||||
$smarty->assign("INT_MAILER","true");
|
||||
|
||||
|
||||
if(isPermitted("Accounts","EditView",$_REQUEST['record']) == 'yes')
|
||||
$smarty->assign("EDIT_DUPLICATE","permitted");
|
||||
|
||||
if(isPermitted("Accounts","Delete",$_REQUEST['record']) == 'yes')
|
||||
$smarty->assign("DELETE","permitted");
|
||||
|
||||
if(isPermitted("Emails","EditView",'') == 'yes')
|
||||
{
|
||||
$smarty->assign("SENDMAILBUTTON","permitted");
|
||||
$smarty->assign("EMAIL1", $focus->column_fields['email1']);
|
||||
$smarty->assign("EMAIL2", $focus->column_fields['email2']);
|
||||
}
|
||||
|
||||
if(isPermitted("Accounts","Merge",'') == 'yes')
|
||||
{
|
||||
global $current_user;
|
||||
require("user_privileges/user_privileges_".$current_user->id.".php");
|
||||
require_once('include/utils/UserInfoUtil.php');
|
||||
$wordTemplateResult = fetchWordTemplateList("Accounts");
|
||||
$tempCount = $adb->num_rows($wordTemplateResult);
|
||||
$tempVal = $adb->fetch_array($wordTemplateResult);
|
||||
for($templateCount=0;$templateCount<$tempCount;$templateCount++)
|
||||
{
|
||||
$optionString[$tempVal["templateid"]]=$tempVal["filename"];
|
||||
$tempVal = $adb->fetch_array($wordTemplateResult);
|
||||
}
|
||||
if($is_admin)
|
||||
$smarty->assign("MERGEBUTTON","permitted");
|
||||
elseif($tempCount >0)
|
||||
$smarty->assign("MERGEBUTTON","permitted");
|
||||
$smarty->assign("TEMPLATECOUNT",$tempCount);
|
||||
$smarty->assign("WORDTEMPLATEOPTIONS",$app_strings['LBL_SELECT_TEMPLATE_TO_MAIL_MERGE']);
|
||||
$smarty->assign("TOPTIONS",$optionString);
|
||||
}
|
||||
|
||||
$tabid = getTabid("Accounts");
|
||||
$validationData = getDBValidationData($focus->tab_name,$tabid);
|
||||
$data = split_validationdataArray($validationData);
|
||||
|
||||
$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
|
||||
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
|
||||
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
|
||||
|
||||
|
||||
$check_button = Button_Check($module);
|
||||
$smarty->assign("CHECK", $check_button);
|
||||
|
||||
$smarty->assign("MODULE",$currentModule);
|
||||
$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record']));
|
||||
|
||||
if(PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule.'_listquery'])){
|
||||
$recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id);
|
||||
VT_detailViewNavigation($smarty,$recordNavigationInfo,$focus->id);
|
||||
}
|
||||
|
||||
$smarty->assign("IS_REL_LIST",isPresentRelatedLists($currentModule));
|
||||
$smarty->assign("USE_ASTERISK", get_use_asterisk($current_user->id));
|
||||
|
||||
if($singlepane_view == 'true')
|
||||
{
|
||||
$related_array = getRelatedLists($currentModule,$focus);
|
||||
$smarty->assign("RELATEDLISTS", $related_array);
|
||||
require_once('include/ListView/RelatedListViewSession.php');
|
||||
if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['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("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events'));
|
||||
|
||||
$smarty->assign("SinglePane_View", $singlepane_view);
|
||||
|
||||
// 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,83 +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,$mod_strings;
|
||||
|
||||
$local_log =& LoggerManager::getLogger('AccountsAjax');
|
||||
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,"Accounts");
|
||||
$modObj->column_fields[$fieldname] = $fieldvalue;
|
||||
if($fieldname=='accountname'){
|
||||
$value = $fieldvalue;
|
||||
$query = "SELECT accountname FROM vtiger_account,vtiger_crmentity WHERE accountname =? and vtiger_account.accountid = vtiger_crmentity.crmid and vtiger_crmentity.deleted != 1";
|
||||
$params = array($value);
|
||||
if(isset($crmid) && $crmid !='') {
|
||||
$query .= " and vtiger_account.accountid != ?";
|
||||
array_push($params, $crmid);
|
||||
}
|
||||
$result = $adb->pquery($query, $params);
|
||||
if($adb->num_rows($result) > 0)
|
||||
{
|
||||
echo ":#:ERR".$mod_strings['LBL_ACCOUNT_EXIST'];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if($fieldname=='accountname'){
|
||||
$value = $fieldvalue;
|
||||
$query = "SELECT accountname FROM vtiger_account,vtiger_crmentity WHERE accountname =? and vtiger_account.accountid = vtiger_crmentity.crmid and vtiger_crmentity.deleted != 1";
|
||||
$params = array($value);
|
||||
if(isset($crmid) && $crmid !='') {
|
||||
$query .= " and vtiger_account.accountid != ?";
|
||||
array_push($params, $crmid);
|
||||
}
|
||||
$result = $adb->pquery($query, $params);
|
||||
if($adb->num_rows($result) > 0)
|
||||
{
|
||||
echo ":#:ERR".$mod_strings['LBL_ACCOUNT_EXIST'];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving
|
||||
{
|
||||
$modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue);
|
||||
}
|
||||
$modObj->id = $crmid;
|
||||
$modObj->mode = "edit";
|
||||
$modObj->save("Accounts");
|
||||
|
||||
if($modObj->id != "")
|
||||
{
|
||||
echo ":#:SUCCESS";
|
||||
}else
|
||||
{
|
||||
echo ":#:FAILURE";
|
||||
}
|
||||
}else
|
||||
{
|
||||
echo ":#:FAILURE";
|
||||
}
|
||||
}elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){
|
||||
require_once 'include/ListView/RelatedListViewContents.php';
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,134 +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/Accounts/EditView.php,v 1.19 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 $app_strings,$mod_strings,$currentModule,$theme;
|
||||
$smarty=new vtigerCRM_Smarty;
|
||||
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
|
||||
//added to fix the issue4600
|
||||
$searchurl = getBasic_Advance_SearchURL();
|
||||
$smarty->assign("SEARCH", $searchurl);
|
||||
//ends 4600
|
||||
if(isset($_REQUEST['record']))
|
||||
{
|
||||
$focus->id = $_REQUEST['record'];
|
||||
$focus->mode = 'edit';
|
||||
$focus->retrieve_entity_info($_REQUEST['record'],"Accounts");
|
||||
$focus->name=$focus->column_fields['accountname'];
|
||||
}
|
||||
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("Accounts",$disp_view,$mode,$focus->column_fields));
|
||||
else
|
||||
{
|
||||
$smarty->assign("BASBLOCKS",getBlocks("Accounts",$disp_view,$mode,$focus->column_fields,'BAS'));
|
||||
$smarty->assign("ADVBLOCKS",getBlocks("Accounts",$disp_view,$mode,$focus->column_fields,'ADV'));
|
||||
}
|
||||
|
||||
$smarty->assign("OP_MODE",$disp_view);
|
||||
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
$log->info("Account detail view");
|
||||
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("APP", $app_strings);
|
||||
|
||||
if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
|
||||
else $smarty->assign("NAME", "");
|
||||
if(isset($cust_fld))
|
||||
{
|
||||
$smarty->assign("CUSTOMFIELD", $cust_fld);
|
||||
}
|
||||
if($focus->mode == 'edit')
|
||||
{
|
||||
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
|
||||
$smarty->assign("MODE", $focus->mode);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['return_module'])) $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module']));
|
||||
else $smarty->assign("RETURN_MODULE","Accounts");
|
||||
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']));
|
||||
$category = getParentTab();
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH", $image_path);$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
|
||||
$smarty->assign("ID", $focus->id);
|
||||
$smarty->assign("MODULE",$currentModule);
|
||||
$smarty->assign("SINGLE_MOD",'Account');
|
||||
|
||||
$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
|
||||
$smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
|
||||
|
||||
$tabid = getTabid("Accounts");
|
||||
$validationData = getDBValidationData($focus->tab_name,$tabid);
|
||||
$data = split_validationdataArray($validationData);
|
||||
|
||||
$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
|
||||
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
|
||||
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
|
||||
|
||||
$check_button = Button_Check($module);
|
||||
$smarty->assign("CHECK", $check_button);
|
||||
$smarty->assign("DUPLICATE",vtlib_purify($_REQUEST['isDuplicate']));
|
||||
|
||||
global $adb;
|
||||
// Module Sequence Numbering
|
||||
$mod_seq_field = getModuleSequenceField($currentModule);
|
||||
if($focus->mode != 'edit' && $mod_seq_field != null) {
|
||||
$autostr = getTranslatedString('MSG_AUTO_GEN_ON_SAVE');
|
||||
$mod_seq_string = $adb->pquery("SELECT prefix, cur_id from vtiger_modentity_num where semodule = ? and active=1",array($currentModule));
|
||||
$mod_seq_prefix = $adb->query_result($mod_seq_string,0,'prefix');
|
||||
$mod_seq_no = $adb->query_result($mod_seq_string,0,'cur_id');
|
||||
if($adb->num_rows($mod_seq_string) == 0 || $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,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.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
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');
|
||||
|
||||
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=$_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');
|
||||
|
||||
?>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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,110 +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): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
/**Function to get the top 5 Accounts order by Amount in Descending Order
|
||||
*return array $values - array with the title, header and entries like Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries
|
||||
*/
|
||||
function getTopAccounts($maxval,$calCnt)
|
||||
{
|
||||
$log = LoggerManager::getLogger('top accounts_list');
|
||||
$log->debug("Entering getTopAccounts() method ...");
|
||||
require_once("data/Tracker.php");
|
||||
require_once('modules/Potentials/Potentials.php');
|
||||
require_once('include/logging.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
global $app_strings;
|
||||
global $adb;
|
||||
global $current_language;
|
||||
global $current_user;
|
||||
$current_module_strings = return_module_language($current_language, "Accounts");
|
||||
|
||||
require('user_privileges/user_privileges_'.$current_user->id.'.php');
|
||||
require('user_privileges/sharing_privileges_'.$current_user->id.'.php');
|
||||
|
||||
$list_query = "select vtiger_potential.potentialname,vtiger_account.accountid, vtiger_account.accountname, ".
|
||||
"vtiger_account.tickersymbol, sum(vtiger_potential.amount) as amount from vtiger_potential ".
|
||||
"inner join vtiger_crmentity on (vtiger_potential.potentialid=vtiger_crmentity.crmid) ".
|
||||
"left join vtiger_account on (vtiger_potential.related_to=vtiger_account.accountid) ";
|
||||
$list_query .= " WHERE vtiger_crmentity.deleted = 0 ".$where.
|
||||
" AND vtiger_potential.potentialid>0";
|
||||
$list_query .= " AND vtiger_crmentity.smownerid='".$current_user->id."' ".
|
||||
"and vtiger_potential.sales_stage not in ('Closed Won', 'Closed Lost','".
|
||||
$app_strings['LBL_CLOSE_WON']."','".$app_strings['LBL_CLOSE_LOST']."')";
|
||||
$list_query .= " group by vtiger_account.accountid, vtiger_account.tickersymbol order by amount desc";
|
||||
|
||||
$list_query .= " LIMIT 0," . $adb->sql_escape_string($maxval);
|
||||
|
||||
if($calCnt == 'calculateCnt') {
|
||||
$list_result_rows = $adb->query(mkCountQuery($list_query));
|
||||
return $adb->query_result($list_result_rows, 0, 'count');
|
||||
}
|
||||
|
||||
$list_result=$adb->query($list_query);
|
||||
$open_accounts_list = array();
|
||||
$noofrows = $adb->num_rows($list_result);
|
||||
|
||||
if ($noofrows) {
|
||||
for($i=0;$i<$noofrows;$i++)
|
||||
{
|
||||
$open_accounts_list[] = Array('accountid' => $adb->query_result($list_result,$i,'accountid'),
|
||||
'accountname' => $adb->query_result($list_result,$i,'accountname'),
|
||||
'amount' => $adb->query_result($list_result,$i,'amount'),
|
||||
'tickersymbol' => $adb->query_result($list_result,$i,'tickersymbol'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$title=array();
|
||||
$title[]='myTopAccounts.gif';
|
||||
$title[]=$current_module_strings['LBL_TOP_ACCOUNTS'];
|
||||
$title[]='home_myaccount';
|
||||
|
||||
$header=array();
|
||||
$header[]=$current_module_strings['LBL_LIST_ACCOUNT_NAME'];
|
||||
$currencyid=fetchCurrency($current_user->id);
|
||||
$rate_symbol = getCurrencySymbolandCRate($currencyid);
|
||||
$rate = $rate_symbol['rate'];
|
||||
$curr_symbol = $rate_symbol['symbol'];
|
||||
$header[]=$current_module_strings['LBL_LIST_AMOUNT'].'('.$curr_symbol.')';
|
||||
$header[] = $current_module_strings['LBL_POTENTIAL_TITLE'];
|
||||
|
||||
$entries=array();
|
||||
foreach($open_accounts_list as $account)
|
||||
{
|
||||
$value=array();
|
||||
$account_fields = array(
|
||||
'ACCOUNT_ID' => $account['accountid'],
|
||||
'ACCOUNT_NAME' => $account['accountname'],
|
||||
'AMOUNT' => ($account['amount']),
|
||||
);
|
||||
|
||||
$Top_Accounts = (strlen($account['accountname']) > 20) ? (substr($account['accountname'],0,20).'...') : $account['accountname'];
|
||||
$value[]='<a href="index.php?action=DetailView&module=Accounts&record='.$account['accountid'].'">'.$Top_Accounts.'</a>';
|
||||
$value[]=convertFromDollar($account['amount'],$rate);
|
||||
$entries[$account['accountid']]=$value;
|
||||
}
|
||||
$values=Array('ModuleName'=>'Accounts','Title'=>$title,'Header'=>$header,'Entries'=>$entries);
|
||||
$log->debug("Exiting getTopAccounts method ...");
|
||||
if (($display_empty_home_blocks && count($entries) == 0 ) || (count($entries)>0))
|
||||
return $values;
|
||||
}
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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,298 +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");
|
||||
}
|
||||
|
||||
//echo $mass_merge;
|
||||
//die;
|
||||
//for setting vtiger_accountid=0 for the contacts which are deleted
|
||||
$ct_query = "select crmid from vtiger_crmentity where setype='Contacts' and deleted=1";
|
||||
$result = $adb->pquery($ct_query, array());
|
||||
|
||||
while($row = $adb->fetch_array($result))
|
||||
{
|
||||
$deleted_id[] = $row['crmid'];
|
||||
}
|
||||
|
||||
if(count($deleted_id) > 0)
|
||||
{
|
||||
$update_query = "update vtiger_contactdetails set accountid = 0 where contactid in (". generateQuestionMarks($deleted_id) .")";
|
||||
$result = $adb->pquery($update_query, array($deleted_id));
|
||||
}
|
||||
//End setting vtiger_accountid=0 for the contacts which are deleted
|
||||
|
||||
//<<<<<<<<<<<<<<<<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 and vtiger_field.presence in (0,2) order by vtiger_field.tablename";
|
||||
$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 == "Contacts")
|
||||
{
|
||||
$tablename = "vtiger_crmentityContacts";
|
||||
}
|
||||
}
|
||||
$querycolumns[$x] = $tablename.".".$columnname;
|
||||
if($columnname == "smownerid")
|
||||
{
|
||||
if($modulename == "Accounts")
|
||||
{
|
||||
$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 userjoinname,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($modulename == "Contacts")
|
||||
{
|
||||
$querycolumns[$x] = "case when (usersContacts.user_name not like '') then concat(usersContacts.last_name,' ',usersContacts.first_name) else groupsContacts.groupname end as userjoincname";
|
||||
}
|
||||
}
|
||||
if($columnname == "parentid")
|
||||
{
|
||||
$querycolumns[$x] = "vtiger_accountAccount.accountname";
|
||||
}
|
||||
if($columnname == "accountid")
|
||||
{
|
||||
$querycolumns[$x] = "vtiger_accountContacts.accountname";
|
||||
}
|
||||
if($columnname == "reportsto")
|
||||
{
|
||||
$querycolumns[$x] = "vtiger_contactdetailsContacts.lastname";
|
||||
}
|
||||
|
||||
if($modulename == "Accounts")
|
||||
{
|
||||
$field_label[$x] = "ACCOUNT_".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";
|
||||
}
|
||||
}
|
||||
|
||||
if($modulename == "Contacts")
|
||||
{
|
||||
$field_label[$x] = "CONTACT_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$csvheader = implode(",",$field_label);
|
||||
//<<<<<<<<<<<<<<<<End>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
if(count($querycolumns) > 0)
|
||||
{
|
||||
$selectcolumns = implode($querycolumns,",");
|
||||
|
||||
$query = "select $selectcolumns from vtiger_account
|
||||
inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_account.accountid
|
||||
inner join vtiger_accountbillads on vtiger_account.accountid=vtiger_accountbillads.accountaddressid
|
||||
inner join vtiger_accountshipads on vtiger_account.accountid=vtiger_accountshipads.accountaddressid
|
||||
inner join vtiger_accountscf on vtiger_account.accountid = vtiger_accountscf.accountid
|
||||
left join vtiger_account as vtiger_accountAccount on vtiger_accountAccount.accountid = vtiger_account.parentid
|
||||
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_contactdetails on vtiger_contactdetails.accountid=vtiger_account.accountid
|
||||
left join vtiger_crmentity as vtiger_crmentityContacts on vtiger_crmentityContacts.crmid = vtiger_contactdetails.contactid
|
||||
left join vtiger_contactaddress on vtiger_contactdetails.contactid = vtiger_contactaddress.contactaddressid
|
||||
left join vtiger_contactsubdetails on vtiger_contactdetails.contactid = vtiger_contactsubdetails.contactsubscriptionid
|
||||
left join vtiger_contactscf on vtiger_contactdetails.contactid = vtiger_contactscf.contactid
|
||||
left join vtiger_customerdetails on vtiger_contactdetails.contactid = vtiger_customerdetails.customerid
|
||||
left join vtiger_contactdetails as vtiger_contactdetailsContacts on vtiger_contactdetailsContacts.contactid = vtiger_contactdetails.reportsto
|
||||
left join vtiger_account as vtiger_accountContacts on vtiger_accountContacts.accountid = vtiger_contactdetails.accountid
|
||||
left join vtiger_users as usersContacts on usersContacts.id = vtiger_crmentityContacts.smownerid
|
||||
LEFT JOIN vtiger_groups as groupsContacts
|
||||
ON groupsContacts.groupid = vtiger_crmentity.smownerid
|
||||
where vtiger_crmentity.deleted=0 and (vtiger_crmentityContacts.deleted=0 || vtiger_crmentityContacts.deleted is null) and vtiger_account.accountid in(". generateQuestionMarks($mass_merge) .")";
|
||||
//echo $query;
|
||||
//die;
|
||||
$result = $adb->pquery($query, array($mass_merge));
|
||||
$avail_pick_arr = getAccessPickListValues('Accounts');
|
||||
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 modifing default values>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
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,16 +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): ______________________________________.
|
||||
********************************************************************************/
|
||||
require_once('Popup.php');
|
||||
?>
|
||||
@@ -1,134 +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 = $_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,231 +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/Accounts/Save.php,v 1.7 2005/03/15 09:55:31 shaw Exp $
|
||||
* Description: Saves an Account record and then redirects the browser to the
|
||||
* defined return URL.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('modules/Accounts/Accounts.php');
|
||||
require_once('include/logging.php');
|
||||
require_once('include/database/PearDatabase.php');
|
||||
|
||||
//added to fix 4600
|
||||
$search=vtlib_purify($_REQUEST['search_url']);
|
||||
if(isset($_REQUEST['dup_check']) && $_REQUEST['dup_check'] != '')
|
||||
{
|
||||
//started
|
||||
$value = $_REQUEST['accountname'];
|
||||
$query = "SELECT accountname FROM vtiger_account,vtiger_crmentity WHERE accountname =? and vtiger_account.accountid = vtiger_crmentity.crmid and vtiger_crmentity.deleted != 1";
|
||||
$params = array($value);
|
||||
$id = $_REQUEST['record'];
|
||||
if(isset($id) && $id !='') {
|
||||
$query .= " and vtiger_account.accountid != ?";
|
||||
array_push($params, $id);
|
||||
}
|
||||
$result = $adb->pquery($query, $params);
|
||||
if($adb->num_rows($result) > 0)
|
||||
{
|
||||
echo $mod_strings['LBL_ACCOUNT_EXIST'];
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'SUCCESS';
|
||||
}
|
||||
die;
|
||||
}
|
||||
//Ended
|
||||
|
||||
$local_log =& LoggerManager::getLogger('index');
|
||||
global $log;
|
||||
$focus = new Accounts();
|
||||
global $current_user;
|
||||
$currencyid=fetchCurrency($current_user->id);
|
||||
$rate_symbol = getCurrencySymbolandCRate($currencyid);
|
||||
$rate = $rate_symbol['rate'];
|
||||
$curr_symbol = $rate_symbol['symbol'];
|
||||
if(isset($_REQUEST['record']))
|
||||
{
|
||||
$focus->id = $_REQUEST['record'];
|
||||
$log->info("id is ".$focus->id);
|
||||
}
|
||||
if(isset($_REQUEST['mode']))
|
||||
{
|
||||
$focus->mode = $_REQUEST['mode'];
|
||||
}
|
||||
|
||||
foreach($focus->column_fields as $fieldname => $val)
|
||||
{
|
||||
if(isset($_REQUEST[$fieldname]))
|
||||
{
|
||||
if(is_array($_REQUEST[$fieldname]))
|
||||
$value = $_REQUEST[$fieldname];
|
||||
else
|
||||
$value = trim($_REQUEST[$fieldname]);
|
||||
$log->DEBUG($fieldname."=Field Name &first& Value =".$value);
|
||||
$focus->column_fields[$fieldname] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['annual_revenue']))
|
||||
{
|
||||
$value = convertToDollar($_REQUEST['annual_revenue'],$rate);
|
||||
$focus->column_fields['annual_revenue'] = $value;
|
||||
}
|
||||
|
||||
if($_REQUEST['assigntype'] == 'U') {
|
||||
$focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id'];
|
||||
} elseif($_REQUEST['assigntype'] == 'T') {
|
||||
$focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id'];
|
||||
}
|
||||
|
||||
//When changing the Account Address Information it should also change the related contact address - dina
|
||||
if($focus->mode == 'edit' && $_REQUEST['address_change'] == 'yes')
|
||||
{
|
||||
$query = "update vtiger_contactaddress set mailingcity=?,mailingstreet=?,mailingcountry=?,mailingzip=?,mailingpobox=?,mailingstate=?,othercountry=?,othercity=?,otherstate=?,otherzip=?,otherstreet=?,otherpobox=? where contactaddressid in (select contactid from vtiger_contactdetails where accountid=?)" ;
|
||||
$params = array($focus->column_fields['bill_city'], $focus->column_fields['bill_street'], $focus->column_fields['bill_country'],
|
||||
$focus->column_fields['bill_code'], $focus->column_fields['bill_pobox'], $focus->column_fields['bill_state'], $focus->column_fields['ship_country'],
|
||||
$focus->column_fields['ship_city'], $focus->column_fields['ship_state'], $focus->column_fields['ship_code'], $focus->column_fields['ship_street'],
|
||||
$focus->column_fields['ship_pobox'], $focus->id);
|
||||
$adb->pquery($query, $params);
|
||||
}
|
||||
//Changing account address - Ends
|
||||
|
||||
$focus->save("Accounts");
|
||||
if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == "Campaigns")
|
||||
{
|
||||
if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "")
|
||||
{
|
||||
$campAccStatusResult = $adb->pquery("select campaignrelstatusid from vtiger_campaignaccountrel where campaignid=? AND accountid=?",array($_REQUEST['return_id'], $focus->id));
|
||||
$accountStatus = $adb->query_result($campAccStatusResult,0,'campaignrelstatusid');
|
||||
$sql = "delete from vtiger_campaignaccountrel where accountid = ?";
|
||||
$adb->pquery($sql, array($focus->id));
|
||||
if(isset($accountStatus) && $accountStatus!=''){
|
||||
$sql = "insert into vtiger_campaignaccountrel values (?,?,?)";
|
||||
$adb->pquery($sql, array($_REQUEST['return_id'], $focus->id,$accountStatus));
|
||||
}
|
||||
else{
|
||||
$sql = "insert into vtiger_campaignaccountrel values (?,?,1)";
|
||||
$adb->pquery($sql, array($_REQUEST['return_id'], $focus->id));
|
||||
}
|
||||
}
|
||||
}
|
||||
$return_id = $focus->id;
|
||||
|
||||
$parenttab = getParentTab();
|
||||
if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']);
|
||||
else $return_module = "Accounts";
|
||||
if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']);
|
||||
else $return_action = "DetailView";
|
||||
if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']);
|
||||
|
||||
$local_log->debug("Saved record with id of ".$return_id);
|
||||
|
||||
//code added for returning back to the current view after edit from list view
|
||||
if($_REQUEST['return_viewname'] == '') $return_viewname='0';
|
||||
if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']);
|
||||
|
||||
header("Location: index.php?action=$return_action&module=$return_module&parenttab=$parenttab&record=$return_id&viewname=$return_viewname&start=".vtlib_purify($_REQUEST['pagenumber']).$search);
|
||||
/** Function to save Accounts custom field info into database
|
||||
* @param integer $entity_id - accountid
|
||||
*/
|
||||
function save_customfields($entity_id)
|
||||
{
|
||||
global $log;
|
||||
$log->debug("Entering save_customfields(".$entity_id.") method ...");
|
||||
$log->info("save customfields invoked");
|
||||
global $adb;
|
||||
$dbquery = "SELECT * FROM customfields WHERE module = 'Accounts'";
|
||||
$result = $adb->pquery($dbquery, array());
|
||||
|
||||
$custquery = "SELECT * FROM vtiger_accountcf WHERE vtiger_accountid = ?";
|
||||
$cust_result = $adb->pquery($custquery, array($entity_id));
|
||||
if($adb->num_rows($result) != 0)
|
||||
{
|
||||
|
||||
$columns='';
|
||||
$values='';
|
||||
$ins_params = array();
|
||||
$update='';
|
||||
$upd_params = array();
|
||||
|
||||
$noofrows = $adb->num_rows($result);
|
||||
for($i=0; $i<$noofrows; $i++)
|
||||
{
|
||||
$fldName=$adb->query_result($result,$i,"fieldlabel");
|
||||
$colName=$adb->query_result($result,$i,"column_name");
|
||||
if(isset($_REQUEST[$colName]))
|
||||
{
|
||||
$fldvalue=$_REQUEST[$colName];
|
||||
if(get_magic_quotes_gpc() == 1)
|
||||
{
|
||||
$fldvalue = stripslashes($fldvalue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$fldvalue = '';
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $adb->num_rows($cust_result) !=0)
|
||||
{
|
||||
//Update Block
|
||||
if($i == 0)
|
||||
{
|
||||
$update = $colName."=?";
|
||||
array_push($upd_params, $fldvalue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$update .= ', '.$colName."=?";
|
||||
array_push($upd_params, $fldvalue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Insert Block
|
||||
if($i == 0)
|
||||
{
|
||||
$columns='accountid, '.$colName;
|
||||
array_push($ins_params, $entity_id, $fldvalue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$columns .= ', '.$colName;
|
||||
array_push($ins_params, $fldvalue);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $adb->num_rows($cust_result) !=0)
|
||||
{
|
||||
//Update Block
|
||||
$query = "UPDATE vtiger_accountcf SET $update WHERE vtiger_accountid=?";
|
||||
array_push($upd_params, $entity_id);
|
||||
$adb->pquery($query, $upd_params);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Insert Block
|
||||
$query = "INSERT INTO vtiger_accountcf ($columns) VALUES(" . generateQuestionMarks($ins_params) .")";
|
||||
$adb->pquery($query, $ins_params);
|
||||
}
|
||||
|
||||
}
|
||||
$log->debug("Exiting save_customfields method ...");
|
||||
}
|
||||
?>
|
||||
@@ -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,100 +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/Accounts/Accounts.php");
|
||||
require_once("getCompanyProfile.php");
|
||||
$variable = vtlib_purify($_REQUEST['tickersymbol']);
|
||||
$url = "http://moneycentral.msn.com/investor/research/profile.asp?Symbol=".trim($variable);
|
||||
$data = getComdata($url,trim($variable));
|
||||
if(is_array($data))
|
||||
{
|
||||
$summary = array_shift($data);
|
||||
list($comp, $address, $phone, $fax, $site, $industry, $emp,$desc1,$desc2) = explode(":", $summary);
|
||||
$address = str_replace("Company Report","",$address);
|
||||
$address = str_replace("Phone","",$address);
|
||||
$phone = str_replace("Fax","",$phone);
|
||||
$fax = str_replace("http","",$fax);
|
||||
$site = str_replace("Industry","",$site);
|
||||
$site = str_replace("//","",$site);
|
||||
$industry = str_replace("Employees","",$industry);
|
||||
$emp = str_replace("Exchange","",$emp);
|
||||
$first_array =array_slice($data,0, 8);
|
||||
$second_array = array_slice($data,8);
|
||||
$output='';
|
||||
$output .= '<table border="0" cellpadding="0" cellspacing="0" width="80%" align=center>
|
||||
<tr><td class="detailedViewHeader" style="cursor:pointer;" onclick=\'just();\'><b>Company Report</b></td></tr>
|
||||
<tr><td>
|
||||
<div id="company">
|
||||
<div id="innerLayer">
|
||||
<input type="hidden" name="address" value="'.trim($address).'">
|
||||
<input type="hidden" name="Phone" value="'.trim($phone).'">
|
||||
<input type="hidden" name="Fax" value="'.trim($fax).'">
|
||||
<input type="hidden" name="site" value="'.trim($site).'">
|
||||
<input type="hidden" name="emp" value="'.trim($emp).'">
|
||||
<table class="small" border="0" cellpadding="0" cellspacing="0" width="60%" align="center">
|
||||
<tr>
|
||||
<td colspan="2" class="detailedViewHeader"><b>'.$comp.'</b></td>
|
||||
</tr>';
|
||||
$output .='<tr><td><table><tr><td><table width="185">';
|
||||
foreach($first_array as $arr => $val)
|
||||
{
|
||||
$output .= '<tr>';
|
||||
for($j=0;$j<count($val);$j+=2)
|
||||
{
|
||||
$output .= '<td class="dvtCellLabel" align="right" width="20%">'.$val[$j].'</td>
|
||||
<td width="30%" align="left" class="dvtCellInfo">'.$val[$j+1].'</td>';
|
||||
}
|
||||
$output .= '</tr>';
|
||||
}
|
||||
$output .='</table></td>';
|
||||
$output .='<td><table width="185">';
|
||||
array_shift($second_array[0]);
|
||||
array_shift($second_array[0]);
|
||||
foreach($second_array as $arr => $val)
|
||||
{
|
||||
$output .= '<tr>';
|
||||
for($j=0;$j<count($val);$j+=2)
|
||||
{
|
||||
$output .= '<td lass="dvtCellLabel" align="right" width="20%">'.$val[$j].'</td>
|
||||
<td width="30%" align="left" class="dvtCellInfo">'.$val[$j+1].'</td>';
|
||||
}
|
||||
$output .= '</tr>';
|
||||
}
|
||||
$output .='</table></td><td align=left><a href="http://finance.yahoo.com/q/bc?s='.trim($variable).'&t=1d" target="_blank"><img src="http://ichart.finance.yahoo.com/t?s='.trim($variable).'" width="192" height="96" alt="[Chart]" border="0"></a></td></tr></table></td></tr>';
|
||||
$output .= '<tr style="height: 25px;">
|
||||
<td colspan="2" style="border-top:1px solid #eaeaea;"> </td>
|
||||
</tr></table>';
|
||||
$output .= '<table class="small" border="0" cellpadding="0" cellspacing="0" width="60%" align="center" id="conf">
|
||||
<tr>
|
||||
<td colspan="2" class="detailedViewHeader"><b>BUSINESS SUMMARY</b></td>
|
||||
</tr>
|
||||
<td width="30%" align="left" class="dvtCellInfo"><textarea id="summary" cols=80 rows=5 readonly>'.$desc1.' '.$desc2.'</textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="padding: 5px;border-top:1px solid #eaeaea;">
|
||||
<div align="center">
|
||||
<input title="Save [Alt+S]" accesskey="S" class="small" name="button" value="Yes" style="width: 70px;" type="button" onclick=\'fnDown("conf");\' />
|
||||
<input title="Cancel [Alt+X]" accesskey="X" class="small" name="button" value="No" style="width: 70px;" type="button" onclick=\'just();\'/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></div>
|
||||
</td></tr></table>';
|
||||
echo $output;
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = '';
|
||||
$output .= "<div style='display:block'>";
|
||||
$output .= "<b><font color='red'>".$data."</font>";
|
||||
$output .= "</div>";
|
||||
echo $output;
|
||||
}
|
||||
?>
|
||||
@@ -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';
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user