添加到 trunk
+YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@127 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
<?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('user_privileges/default_module_view.php');
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
|
||||
global $mod_strings, $app_strings, $currentModule, $current_user, $theme, $singlepane_view;
|
||||
|
||||
$category = getParentTab();
|
||||
$action = $_REQUEST['action'];
|
||||
$record = $_REQUEST['record'];
|
||||
$isduplicate = $_REQUEST['isDuplicate'];
|
||||
$parenttab = $_REQUEST['parenttab'];
|
||||
|
||||
if($singlepane_view == 'true' && $action == 'CallRelatedList') {
|
||||
header("Location:index.php?action=DetailView&module=$currentModule&record=$record&parenttab=$parenttab");
|
||||
} else {
|
||||
|
||||
$tool_buttons = Button_Check($currentModule);
|
||||
|
||||
$focus = new $currentModule();
|
||||
if($record != '') {
|
||||
$focus->retrieve_entity_info($record, $currentModule);
|
||||
$focus->id = $record;
|
||||
}
|
||||
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
|
||||
if($isduplicate == 'true') $focus->id = '';
|
||||
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') $smarty->assign("OP_MODE",$_REQUEST['mode']);
|
||||
if(!$_SESSION['rlvs'][$currentModule]) unset($_SESSION['rlvs']);
|
||||
|
||||
// Identify this module as custom module.
|
||||
$smarty->assign('CUSTOM_MODULE', true);
|
||||
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('MODULE', $currentModule);
|
||||
// TODO: Update Single Module Instance name here.
|
||||
$smarty->assign('SINGLE_MOD', $currentModule);
|
||||
$smarty->assign('CATEGORY', $category);
|
||||
$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
|
||||
$smarty->assign('THEME', $theme);
|
||||
$smarty->assign('ID', $focus->id);
|
||||
$smarty->assign('MODE', $focus->mode);
|
||||
$smarty->assign('CHECK', $tool_buttons);
|
||||
|
||||
$smarty->assign('NAME', $focus->column_fields[$focus->def_detailview_recname]);
|
||||
$smarty->assign('UPDATEINFO',updateInfo($focus->id));
|
||||
|
||||
$related_array = getRelatedLists($currentModule, $focus);
|
||||
|
||||
$smarty->assign('RELATEDLISTS', $related_array);
|
||||
$smarty->display('RelatedLists.tpl');
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
include('modules/CustomView/index.php');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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;
|
||||
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
|
||||
$focus = new $currentModule();
|
||||
|
||||
$record = $_REQUEST['record'];
|
||||
$module = $_REQUEST['module'];
|
||||
$return_module = $_REQUEST['return_module'];
|
||||
$return_action = $_REQUEST['return_action'];
|
||||
$parenttab = $_REQUEST['parenttab'];
|
||||
$return_id = $_REQUEST['return_id'];
|
||||
|
||||
DeleteEntity($currentModule, $return_module, $focus, $record, $return_id);
|
||||
|
||||
if($_REQUEST['parenttab']) $parenttab = $_REQUEST['parenttab'];
|
||||
|
||||
header("Location: index.php?module=$return_module&action=$return_action&record=$return_id&parenttab=$parenttab&relmodule=$module");
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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('user_privileges/default_module_view.php');
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
|
||||
global $mod_strings, $app_strings, $currentModule, $current_user, $theme, $singlepane_view;
|
||||
|
||||
$tool_buttons = Button_Check($currentModule);
|
||||
|
||||
$focus = new $currentModule();
|
||||
$smarty = new vtigerCRM_Smarty();
|
||||
|
||||
$record = $_REQUEST['record'];
|
||||
$isduplicate = $_REQUEST['isDuplicate'];
|
||||
$tabid = getTabid($currentModule);
|
||||
|
||||
if($record != '') {
|
||||
$focus->id = $record;
|
||||
$focus->retrieve_entity_info($record, $currentModule);
|
||||
}
|
||||
if($isduplicate == 'true') $focus->id = '';
|
||||
|
||||
// Identify this module as custom module.
|
||||
$smarty->assign('CUSTOM_MODULE', true);
|
||||
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('MODULE', $currentModule);
|
||||
// TODO: Update Single Module Instance name here.
|
||||
$smarty->assign('SINGLE_MOD', $currentModule);
|
||||
$smarty->assign('CATEGORY', $category);
|
||||
$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
|
||||
$smarty->assign('THEME', $theme);
|
||||
$smarty->assign('ID', $focus->id);
|
||||
$smarty->assign('MODE', $focus->mode);
|
||||
|
||||
$recordName = array_values(getEntityName($currentModule, $focus->id));
|
||||
$recordName = $recordName[0];
|
||||
$smarty->assign('NAME', $recordName);
|
||||
$smarty->assign('UPDATEINFO',updateInfo($focus->id));
|
||||
|
||||
$smarty->assign('IS_REL_LIST',isPresentRelatedLists($currentModule));
|
||||
|
||||
$validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, $tabid));
|
||||
$smarty->assign('VALIDATION_DATA_FIELDNAME',$validationArray['fieldname']);
|
||||
$smarty->assign('VALIDATION_DATA_FIELDDATATYPE',$validationArray['datatype']);
|
||||
$smarty->assign('VALIDATION_DATA_FIELDLABEL',$validationArray['fieldlabel']);
|
||||
|
||||
$smarty->assign('EDIT_PERMISSION', isPermitted($currentModule, 'EditView', $record));
|
||||
$smarty->assign('CHECK', $tool_buttons);
|
||||
|
||||
$smarty->assign('IS_REL_LIST', isPresentRelatedLists($currentModule));
|
||||
$smarty->assign('SinglePane_View', $singlepane_view);
|
||||
|
||||
if($singlepane_view == 'true') {
|
||||
$related_array = getRelatedLists($currentModule,$focus);
|
||||
$smarty->assign("RELATEDLISTS", $related_array);
|
||||
}
|
||||
|
||||
if(isPermitted($currentModule, 'EditView', $record) == 'yes')
|
||||
$smarty->assign('EDIT_DUPLICATE', 'permitted');
|
||||
if(isPermitted($currentModule, 'Delete', $record) == 'yes')
|
||||
$smarty->assign('DELETE', 'permitted');
|
||||
|
||||
$smarty->assign('BLOCKS', getBlocks($currentModule,'detail_view','',$focus->column_fields));
|
||||
|
||||
// Gather the custom link information to display
|
||||
include_once('vtlib/Vtiger/Link.php');
|
||||
$customlink_params = Array('MODULE'=>$currentModule, 'RECORD'=>$focus->id, 'ACTION'=>$_REQUEST['action']);
|
||||
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC','DETAILVIEW'), $customlink_params));
|
||||
// END
|
||||
|
||||
$smarty->display('DetailView.tpl');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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;
|
||||
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
|
||||
$ajaxaction = $_REQUEST['ajxaction'];
|
||||
if($ajaxaction == 'DETAILVIEW')
|
||||
{
|
||||
$crmid = $_REQUEST['recordid'];
|
||||
$tablename = $_REQUEST['tableName'];
|
||||
$fieldname = $_REQUEST['fldName'];
|
||||
$fieldvalue = utf8RawUrlDecode($_REQUEST['fieldValue']);
|
||||
if($crmid != '')
|
||||
{
|
||||
$modObj = new $currentModule();
|
||||
$modObj->retrieve_entity_info($crmid, $currentModule);
|
||||
$modObj->column_fields[$fieldname] = $fieldvalue;
|
||||
$modObj->id = $crmid;
|
||||
$modObj->mode = 'edit';
|
||||
$modObj->save($currentModule);
|
||||
if($modObj->id != '')
|
||||
{
|
||||
echo ':#:SUCCESS';
|
||||
}else
|
||||
{
|
||||
echo ':#:FAILURE';
|
||||
}
|
||||
}else
|
||||
{
|
||||
echo ':#:FAILURE';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?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 $app_strings, $mod_strings, $current_language, $currentModule, $theme;
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
|
||||
$focus = new $currentModule();
|
||||
$smarty = new vtigerCRM_Smarty();
|
||||
|
||||
$category = getParentTab($currentModule);
|
||||
$record = $_REQUEST['record'];
|
||||
$isduplicate = $_REQUEST['isDuplicate'];
|
||||
|
||||
if($record) {
|
||||
$focus->id = $record;
|
||||
$focus->mode = 'edit';
|
||||
$focus->retrieve_entity_info($record, $currentModule);
|
||||
}
|
||||
if($isduplicate == 'true') {
|
||||
$focus->id = '';
|
||||
$focus->mode = '';
|
||||
}
|
||||
|
||||
$disp_view = getView($focus->mode);
|
||||
if($disp_view == 'edit_view')
|
||||
$smarty->assign('BLOCKS', getBlocks($currentModule, $disp_view, $focus->mode, $focus->column_fields));
|
||||
else
|
||||
$smarty->assign('BASBLOCKS', getBlocks($currentModule, $disp_view, $focus->mode, $focus->column_fields, 'BAS'));
|
||||
|
||||
$smarty->assign('OP_MODE',$disp_view);
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('MODULE', $currentModule);
|
||||
// TODO: Update Single Module Instance name here.
|
||||
$smarty->assign('SINGLE_MOD', $currentModule);
|
||||
$smarty->assign('CATEGORY', $category);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
|
||||
$smarty->assign('ID', $focus->id);
|
||||
$smarty->assign('MODE', $focus->mode);
|
||||
|
||||
$smarty->assign('CHECK', Button_Check($currentModule));
|
||||
$smarty->assign('DUPLICATE', $isduplicate);
|
||||
|
||||
if($focus->mode == 'edit') {
|
||||
$recordName = array_values(getEntityName($currentModule, $focus->id));
|
||||
$recordName = $recordName[0];
|
||||
$smarty->assign('NAME', $recordName);
|
||||
$smarty->assign('UPDATEINFO',updateInfo($focus->id));
|
||||
} else if($isduplicate) {
|
||||
$recordName = array_values(getEntityName($currentModule, $record));
|
||||
$recordName = $recordName[0];
|
||||
$smarty->assign('NAME', $recordName);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['return_module'])) $smarty->assign("RETURN_MODULE", $_REQUEST['return_module']);
|
||||
if(isset($_REQUEST['return_action'])) $smarty->assign("RETURN_ACTION", $_REQUEST['return_action']);
|
||||
if(isset($_REQUEST['return_id'])) $smarty->assign("RETURN_ID", $_REQUEST['return_id']);
|
||||
if (isset($_REQUEST['return_viewname'])) $smarty->assign("RETURN_VIEWNAME", $_REQUEST['return_viewname']);
|
||||
|
||||
// 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']);
|
||||
|
||||
// In case you have a date field
|
||||
$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
|
||||
|
||||
// Gather the help information associated with fields
|
||||
$smarty->assign('FIELDHELPINFO', vtlib_getFieldHelpInfo($currentModule));
|
||||
// END
|
||||
|
||||
if($focus->mode == 'edit') $smarty->display('salesEditView.tpl');
|
||||
else $smarty->display('CreateView.tpl');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
require_once('include/utils/ExportRecords.php');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
require_once('modules/Import/index.php');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,154 @@
|
||||
<?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 $app_strings, $mod_strings, $current_language, $currentModule, $theme;
|
||||
global $list_max_entries_per_page;
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
require_once('modules/CustomView/CustomView.php');
|
||||
require_once('include/DatabaseUtil.php');
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
|
||||
$category = getParentTab();
|
||||
$url_string = '';
|
||||
|
||||
$tool_buttons = Button_Check($currentModule);
|
||||
$list_buttons = Array();
|
||||
|
||||
if(isPermitted($currentModule,'Delete','') == 'yes') $list_buttons['del'] = $app_strings[LBL_MASS_DELETE];
|
||||
if(isPermitted($currentModule,'EditView','') == 'yes') {
|
||||
$list_buttons['mass_edit'] = $app_strings[LBL_MASS_EDIT];
|
||||
// Mass Edit could be used to change the owner as well!
|
||||
//$list_buttons['c_owner'] = $app_strings[LBL_CHANGE_OWNER];
|
||||
}
|
||||
|
||||
$focus = new $currentModule();
|
||||
$sorder = $focus->getSortOrder();
|
||||
$order_by = $focus->getOrderBy();
|
||||
|
||||
$_SESSION[$currentModule."_Order_by"] = $order_by;
|
||||
$_SESSION[$currentModule."_Sort_Order"]=$sorder;
|
||||
|
||||
$smarty = new vtigerCRM_Smarty();
|
||||
|
||||
// Identify this module as custom module.
|
||||
$smarty->assign('CUSTOM_MODULE', true);
|
||||
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('MODULE', $currentModule);
|
||||
$smarty->assign('SINGLE_MOD', $currentModule);
|
||||
$smarty->assign('CATEGORY', $category);
|
||||
$smarty->assign('BUTTONS', $list_buttons);
|
||||
$smarty->assign('CHECK', $tool_buttons);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
|
||||
|
||||
$smarty->assign('CHANGE_OWNER', getUserslist());
|
||||
$smarty->assign('CHANGE_GROUP_OWNER', getGroupslist());
|
||||
|
||||
// Enabling Module Search
|
||||
$url_string = '';
|
||||
if($_REQUEST['query'] == 'true') {
|
||||
list($where, $ustring) = split('#@@#', getWhereCondition($currentModule));
|
||||
$url_string .= "&query=true$ustring";
|
||||
$smarty->assign('SEARCH_URL', $url_string);
|
||||
}
|
||||
|
||||
// Custom View
|
||||
$customView = new CustomView($currentModule);
|
||||
$viewid = $customView->getViewId($currentModule);
|
||||
$customview_html = $customView->getCustomViewCombo($viewid);
|
||||
$viewinfo = $customView->getCustomViewByCvid($viewid);
|
||||
|
||||
$smarty->assign("VIEWID", $viewid);
|
||||
|
||||
if($viewinfo['viewname'] == 'All') $smarty->assign('ALL', 'All');
|
||||
|
||||
if($viewid != '0') {
|
||||
$listquery = getListQuery($currentModule);
|
||||
$list_query= $customView->getModifiedCvListQuery($viewid, $listquery, $currentModule);
|
||||
} else {
|
||||
$list_query= getListQuery($currentModule);
|
||||
}
|
||||
|
||||
if($where != '') {
|
||||
$list_query = "$list_query AND $where";
|
||||
}
|
||||
|
||||
// Sorting
|
||||
if($order_by) {
|
||||
if($order_by == 'smownerid') $list_query .= ' ORDER BY user_name '.$sorder;
|
||||
else {
|
||||
$tablename = getTableNameForField($currentModule, $order_by);
|
||||
$tablename = ($tablename != '')? ($tablename . '.') : '';
|
||||
$list_query .= ' ORDER BY ' . $tablename . $order_by . ' ' . $sorder;
|
||||
}
|
||||
}
|
||||
|
||||
$countQuery = $adb->query( mkCountQuery($list_query) );
|
||||
$recordCount= $adb->query_result($countQuery,0,'count');
|
||||
|
||||
// Set paging start value.
|
||||
$start = 1;
|
||||
if(isset($_REQUEST['start'])) { $start = $_REQUEST['start']; }
|
||||
else { $start = $_SESSION['lvs'][$currentModule]['start']; }
|
||||
// Total records is less than a page now.
|
||||
if($recordCount <= $list_max_entries_per_page) $start = 1;
|
||||
|
||||
// Save in session
|
||||
if(empty($start)) $start = 1; // Reset to proper state
|
||||
$_SESSION['lvs'][$currentModule]['start'] = $start;
|
||||
|
||||
$navigation_array = getNavigationValues($start, $recordCount, $list_max_entries_per_page);
|
||||
|
||||
$start_rec = $navigation_array['start'];
|
||||
$end_rec = $navigation_array['end_val'];
|
||||
$_SESSION['nav_start']=$start_rec;
|
||||
$_SESSION['nav_end']=$end_rec;
|
||||
|
||||
if ($start_rec ==0) $limit_start_rec = 0;
|
||||
else $limit_start_rec = $start_rec -1;
|
||||
|
||||
$list_result = $adb->query( $list_query . " LIMIT $limit_start_rec, $list_max_entries_per_page" );
|
||||
|
||||
$record_string= $app_strings['LBL_SHOWING']." $start_rec - $end_rec " . $app_strings['LBL_LIST_OF'] ." ".$recordCount;
|
||||
|
||||
$smarty->assign('RECORD_COUNTS', $record_string);
|
||||
$smarty->assign("CUSTOMVIEW_OPTION",$customview_html);
|
||||
|
||||
// Navigation
|
||||
$start = $_SESSION['lvs'][$currentModule]['start'];
|
||||
$navigation_array = getNavigationValues($start, $recordCount, $list_max_entries_per_page);
|
||||
$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string, $currentModule, 'index', $viewid);
|
||||
$smarty->assign("NAVIGATION", $navigationOutput);
|
||||
|
||||
$listview_header = getListViewHeader($focus,$currentModule,$url_string,$sorder,$order_by,'',$customView);
|
||||
$listview_entries = getListViewEntries($focus,$currentModule,$list_result,$navigation_array,'','','EditView','Delete',$customView);
|
||||
$listview_header_search = getSearchListHeaderValues($focus,$currentModule,$url_string,$sorder,$order_by,'',$customView);
|
||||
|
||||
$smarty->assign('LISTHEADER', $listview_header);
|
||||
$smarty->assign('LISTENTITY', $listview_entries);
|
||||
$smarty->assign('SEARCHLISTHEADER',$listview_header_search);
|
||||
|
||||
// Module Search
|
||||
$alphabetical = AlphabeticalSearch($currentModule,'index',$focus->def_basicsearch_col,'true','basic','','','','',$viewid);
|
||||
$fieldnames = getAdvSearchfields($currentModule);
|
||||
$criteria = getcriteria_options();
|
||||
$smarty->assign("ALPHABETICAL", $alphabetical);
|
||||
$smarty->assign("FIELDNAMES", $fieldnames);
|
||||
$smarty->assign("CRITERIA", $criteria);
|
||||
|
||||
if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
|
||||
$smarty->display("ListViewEntries.tpl");
|
||||
else
|
||||
$smarty->display('ListView.tpl');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,8 @@
|
||||
/*+**********************************************************************************
|
||||
* 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.
|
||||
************************************************************************************/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
require_once('include/Ajax/CommonAjax.php');
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
require_once('Popup.php');
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
require_once('include/quickcreate.php');
|
||||
?>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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 $current_user, $currentModule;
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
|
||||
$focus = new $currentModule();
|
||||
setObjectValuesFromRequest($focus);
|
||||
|
||||
$mode = $_REQUEST['mode'];
|
||||
$record=$_REQUEST['record'];
|
||||
if($mode) $focus->mode = $mode;
|
||||
if($record)$focus->id = $record;
|
||||
|
||||
$focus->save($currentModule);
|
||||
$return_id = $focus->id;
|
||||
|
||||
if($_REQUEST['parenttab'] != '') $parenttab = $_REQUEST['parenttab'];
|
||||
if($_REQUEST['return_module'] != '') $return_module = $_REQUEST['return_module'];
|
||||
else $return_module = $currentModule;
|
||||
|
||||
if($_REQUEST['return_action'] != '') $return_action = $_REQUEST['return_action'];
|
||||
else $return_action = "DetailView";
|
||||
|
||||
if($_REQUEST['return_id'] != '') $return_id = $_REQUEST['return_id'];
|
||||
|
||||
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab&start=".$_REQUEST['pagenumber'].$search);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
require_once('include/Ajax/TagCloud.php');
|
||||
?>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
global $currentModule;
|
||||
include_once("modules/$currentModule/ListView.php");
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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.
|
||||
************************************************************************************/
|
||||
$mod_strings = Array(
|
||||
'ModuleName' => 'Module Name',
|
||||
|
||||
'LBL_CUSTOM_INFORMATION' => 'Custom Information',
|
||||
'LBL_MODULEBLOCK_INFORMATION' => 'ModuleBlock Information',
|
||||
|
||||
'ModuleFieldLabel' => 'ModuleFieldLabel Text',
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?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');
|
||||
@include_once('user_privileges/default_module_view.php');
|
||||
|
||||
global $adb, $singlepane_view, $currentModule;
|
||||
$idlist = $_REQUEST['idlist'];
|
||||
$destinationModule = $_REQUEST['destination_module'];
|
||||
$parenttab = $_REQUEST['parenttab'];
|
||||
|
||||
$forCRMRecord = $_REQUEST['parentid'];
|
||||
$mode = $_REQUEST['mode'];
|
||||
|
||||
// Split the string of ids
|
||||
if($mode == 'delete') {
|
||||
$ids = explode (";",trim($idlist,";"));
|
||||
if(function_exists('checkFileAccess')) {
|
||||
checkFileAccess("modules/$currentModule/$currentModule.php");
|
||||
}
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
$focus = new $currentModule();
|
||||
if(method_exists($focus, 'delete_related_module')) {
|
||||
$focus->delete_related_module($currentModule, $forCRMRecord, $destinationModule, $ids);
|
||||
}
|
||||
if($singlepane_view == 'true') {
|
||||
header("Location: index.php?module=$currentModule&record=$forCRMRecord&action=DetailView&parenttab=$parenttab");
|
||||
} else {
|
||||
header("Location: index.php?module=$currentModule&record=$forCRMRecord&action=CallRelatedList&parenttab=$parenttab");
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['idlist'])) {
|
||||
$ids = explode (";",trim($idlist,";"));
|
||||
if(function_exists('checkFileAccess')) {
|
||||
checkFileAccess("modules/$currentModule/$currentModule.php");
|
||||
}
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
$focus = new $currentModule();
|
||||
if(method_exists($focus, 'save_related_module')) {
|
||||
$focus->save_related_module($currentModule, $forCRMRecord, $destinationModule, $ids);
|
||||
}
|
||||
if($singlepane_view == 'true') {
|
||||
header("Location: index.php?module=$currentModule&record=$forCRMRecord&action=DetailView&parenttab=$parenttab");
|
||||
} else {
|
||||
header("Location: index.php?module=$currentModule&record=$forCRMRecord&action=CallRelatedList&parenttab=$parenttab");
|
||||
}
|
||||
} else if(!empty($_REQUEST['entityid'])){
|
||||
// TODO: Handle this case
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?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('user_privileges/default_module_view.php');
|
||||
|
||||
global $mod_strings, $app_strings, $currentModule, $current_user, $theme, $singlepane_view;
|
||||
|
||||
$category = getParentTab();
|
||||
$action = vtlib_purify($_REQUEST['action']);
|
||||
$record = vtlib_purify($_REQUEST['record']);
|
||||
$isduplicate = vtlib_purify($_REQUEST['isDuplicate']);
|
||||
|
||||
if($singlepane_view == 'true' && $action == 'CallRelatedList') {
|
||||
header("Location:index.php?action=DetailView&module=$currentModule&record=$record&parenttab=$category");
|
||||
} else {
|
||||
|
||||
$tool_buttons = Button_Check($currentModule);
|
||||
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
if($record != '') {
|
||||
$focus->retrieve_entity_info($record, $currentModule);
|
||||
$focus->id = $record;
|
||||
}
|
||||
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
|
||||
if($isduplicate == 'true') $focus->id = '';
|
||||
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') $smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode']));
|
||||
if(!$_SESSION['rlvs'][$currentModule]) unset($_SESSION['rlvs']);
|
||||
|
||||
// Identify this module as custom module.
|
||||
$smarty->assign('CUSTOM_MODULE', true);
|
||||
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('MODULE', $currentModule);
|
||||
// TODO: Update Single Module Instance name here.
|
||||
$smarty->assign('SINGLE_MOD', getTranslatedString($currentModule));
|
||||
$smarty->assign('CATEGORY', $category);
|
||||
$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
|
||||
$smarty->assign('THEME', $theme);
|
||||
$smarty->assign('ID', $focus->id);
|
||||
$smarty->assign('MODE', $focus->mode);
|
||||
$smarty->assign('CHECK', $tool_buttons);
|
||||
|
||||
$smarty->assign('NAME', $focus->column_fields[$focus->def_detailview_recname]);
|
||||
$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
|
||||
|
||||
$related_array = getRelatedLists($currentModule, $focus);
|
||||
|
||||
$smarty->assign('RELATEDLISTS', $related_array);
|
||||
$smarty->display('RelatedLists.tpl');
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
include('modules/CustomView/index.php');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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);
|
||||
|
||||
$record = vtlib_purify($_REQUEST['record']);
|
||||
$module = vtlib_purify($_REQUEST['module']);
|
||||
$return_module = vtlib_purify($_REQUEST['return_module']);
|
||||
$return_action = vtlib_purify($_REQUEST['return_action']);
|
||||
$return_id = vtlib_purify($_REQUEST['return_id']);
|
||||
$parenttab = getParentTab();
|
||||
|
||||
//Added to fix 4600
|
||||
$url = getBasic_Advance_SearchURL();
|
||||
|
||||
DeleteEntity($currentModule, $return_module, $focus, $record, $return_id);
|
||||
|
||||
header("Location: index.php?module=$return_module&action=$return_action&record=$return_id&parenttab=$parenttab&relmodule=$module".$url);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?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('user_privileges/default_module_view.php');
|
||||
|
||||
global $mod_strings, $app_strings, $currentModule, $current_user, $theme, $singlepane_view;
|
||||
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
|
||||
$tool_buttons = Button_Check($currentModule);
|
||||
$smarty = new vtigerCRM_Smarty();
|
||||
|
||||
$record = $_REQUEST['record'];
|
||||
$isduplicate = vtlib_purify($_REQUEST['isDuplicate']);
|
||||
$tabid = getTabid($currentModule);
|
||||
$category = getParentTab($currentModule);
|
||||
|
||||
if($record != '') {
|
||||
$focus->id = $record;
|
||||
$focus->retrieve_entity_info($record, $currentModule);
|
||||
}
|
||||
if($isduplicate == 'true') $focus->id = '';
|
||||
|
||||
// Identify this module as custom module.
|
||||
$smarty->assign('CUSTOM_MODULE', true);
|
||||
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('MODULE', $currentModule);
|
||||
// TODO: Update Single Module Instance name here.
|
||||
$smarty->assign('SINGLE_MOD', 'SINGLE_'.$currentModule);
|
||||
$smarty->assign('CATEGORY', $category);
|
||||
$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
|
||||
$smarty->assign('THEME', $theme);
|
||||
$smarty->assign('ID', $focus->id);
|
||||
$smarty->assign('MODE', $focus->mode);
|
||||
|
||||
$recordName = array_values(getEntityName($currentModule, $focus->id));
|
||||
$recordName = $recordName[0];
|
||||
$smarty->assign('NAME', $recordName);
|
||||
$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
|
||||
|
||||
$validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, $tabid));
|
||||
$smarty->assign('VALIDATION_DATA_FIELDNAME',$validationArray['fieldname']);
|
||||
$smarty->assign('VALIDATION_DATA_FIELDDATATYPE',$validationArray['datatype']);
|
||||
$smarty->assign('VALIDATION_DATA_FIELDLABEL',$validationArray['fieldlabel']);
|
||||
|
||||
$smarty->assign('EDIT_PERMISSION', isPermitted($currentModule, 'EditView', $record));
|
||||
$smarty->assign('CHECK', $tool_buttons);
|
||||
|
||||
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('SinglePane_View', $singlepane_view);
|
||||
|
||||
if($singlepane_view == 'true') {
|
||||
$related_array = getRelatedLists($currentModule,$focus);
|
||||
$smarty->assign("RELATEDLISTS", $related_array);
|
||||
}
|
||||
|
||||
if(isPermitted($currentModule, 'EditView', $record) == 'yes')
|
||||
$smarty->assign('EDIT_DUPLICATE', 'permitted');
|
||||
if(isPermitted($currentModule, 'Delete', $record) == 'yes')
|
||||
$smarty->assign('DELETE', 'permitted');
|
||||
|
||||
$smarty->assign('BLOCKS', getBlocks($currentModule,'detail_view','',$focus->column_fields));
|
||||
|
||||
// Gather the custom link information to display
|
||||
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'), $customlink_params));
|
||||
// END
|
||||
|
||||
// Record Change Notification
|
||||
$focus->markAsViewed($current_user->id);
|
||||
// END
|
||||
|
||||
$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true));
|
||||
|
||||
$smarty->display('DetailView.tpl');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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;
|
||||
$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, $currentModule);
|
||||
$modObj->column_fields[$fieldname] = $fieldvalue;
|
||||
$modObj->id = $crmid;
|
||||
$modObj->mode = 'edit';
|
||||
$modObj->save($currentModule);
|
||||
if($modObj->id != '')
|
||||
{
|
||||
echo ':#:SUCCESS';
|
||||
}else
|
||||
{
|
||||
echo ':#:FAILURE';
|
||||
}
|
||||
}else
|
||||
{
|
||||
echo ':#:FAILURE';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
global $app_strings, $mod_strings, $current_language, $currentModule, $theme;
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
$smarty = new vtigerCRM_Smarty();
|
||||
|
||||
$category = getParentTab($currentModule);
|
||||
$record = $_REQUEST['record'];
|
||||
$isduplicate = vtlib_purify($_REQUEST['isDuplicate']);
|
||||
|
||||
//added to fix the issue4600
|
||||
$searchurl = getBasic_Advance_SearchURL();
|
||||
$smarty->assign("SEARCH", $searchurl);
|
||||
//4600 ends
|
||||
|
||||
if($record) {
|
||||
$focus->id = $record;
|
||||
$focus->mode = 'edit';
|
||||
$focus->retrieve_entity_info($record, $currentModule);
|
||||
}
|
||||
if($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, $focus->mode, $focus->column_fields));
|
||||
else
|
||||
$smarty->assign('BASBLOCKS', getBlocks($currentModule, $disp_view, $focus->mode, $focus->column_fields, 'BAS'));
|
||||
|
||||
$smarty->assign('OP_MODE',$disp_view);
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('MODULE', $currentModule);
|
||||
// TODO: Update Single Module Instance name here.
|
||||
$smarty->assign('SINGLE_MOD', getTranslatedString('SINGLE_'.$currentModule));
|
||||
$smarty->assign('CATEGORY', $category);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
|
||||
$smarty->assign('ID', $focus->id);
|
||||
$smarty->assign('MODE', $focus->mode);
|
||||
|
||||
$smarty->assign('CHECK', Button_Check($currentModule));
|
||||
$smarty->assign('DUPLICATE', $isduplicate);
|
||||
|
||||
if($focus->mode == 'edit' || $isduplicate) {
|
||||
$recordName = array_values(getEntityName($currentModule, $record));
|
||||
$recordName = $recordName[0];
|
||||
$smarty->assign('NAME', $recordName);
|
||||
$smarty->assign('UPDATEINFO',updateInfo($record));
|
||||
}
|
||||
|
||||
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']));
|
||||
|
||||
// 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']);
|
||||
|
||||
// In case you have a date field
|
||||
$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
|
||||
|
||||
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
|
||||
|
||||
// Gather the help information associated with fields
|
||||
$smarty->assign('FIELDHELPINFO', vtlib_getFieldHelpInfo($currentModule));
|
||||
// END
|
||||
|
||||
if($focus->mode == 'edit') {
|
||||
$smarty->display('salesEditView.tpl');
|
||||
} else {
|
||||
$smarty->display('CreateView.tpl');
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
require_once('include/utils/ExportRecords.php');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?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='themes/$theme/images/denied.gif' ></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');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
require_once('modules/Import/index.php');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?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 $app_strings, $mod_strings, $current_language, $currentModule, $theme;
|
||||
global $list_max_entries_per_page;
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
require_once('modules/CustomView/CustomView.php');
|
||||
require_once('include/DatabaseUtil.php');
|
||||
|
||||
checkFileAccess("modules/$currentModule/$currentModule.php");
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
|
||||
$category = getParentTab();
|
||||
$url_string = '';
|
||||
|
||||
$tool_buttons = Button_Check($currentModule);
|
||||
$list_buttons = Array();
|
||||
|
||||
if(isPermitted($currentModule,'Delete','') == 'yes') $list_buttons['del'] = $app_strings[LBL_MASS_DELETE];
|
||||
if(isPermitted($currentModule,'EditView','') == 'yes') {
|
||||
$list_buttons['mass_edit'] = $app_strings[LBL_MASS_EDIT];
|
||||
// Mass Edit could be used to change the owner as well!
|
||||
//$list_buttons['c_owner'] = $app_strings[LBL_CHANGE_OWNER];
|
||||
}
|
||||
|
||||
$focus = new $currentModule();
|
||||
$focus->initSortbyField($currentModule);
|
||||
$sorder = $focus->getSortOrder();
|
||||
$order_by = $focus->getOrderBy();
|
||||
|
||||
$_SESSION[$currentModule."_Order_by"] = $order_by;
|
||||
$_SESSION[$currentModule."_Sort_Order"]=$sorder;
|
||||
|
||||
$smarty = new vtigerCRM_Smarty();
|
||||
|
||||
// Identify this module as custom module.
|
||||
$smarty->assign('CUSTOM_MODULE', true);
|
||||
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('MODULE', $currentModule);
|
||||
$smarty->assign('SINGLE_MOD', getTranslatedString('SINGLE_'.$currentModule));
|
||||
$smarty->assign('CATEGORY', $category);
|
||||
$smarty->assign('BUTTONS', $list_buttons);
|
||||
$smarty->assign('CHECK', $tool_buttons);
|
||||
$smarty->assign('THEME', $theme);
|
||||
$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
|
||||
|
||||
$smarty->assign('CHANGE_OWNER', getUserslist());
|
||||
$smarty->assign('CHANGE_GROUP_OWNER', getGroupslist());
|
||||
|
||||
// Enabling Module Search
|
||||
$url_string = '';
|
||||
if($_REQUEST['query'] == 'true') {
|
||||
list($where, $ustring) = split('#@@#', getWhereCondition($currentModule));
|
||||
$url_string .= "&query=true$ustring";
|
||||
$smarty->assign('SEARCH_URL', $url_string);
|
||||
}
|
||||
|
||||
// Custom View
|
||||
$customView = new CustomView($currentModule);
|
||||
$viewid = $customView->getViewId($currentModule);
|
||||
$customview_html = $customView->getCustomViewCombo($viewid);
|
||||
$viewinfo = $customView->getCustomViewByCvid($viewid);
|
||||
|
||||
// Feature available from 5.1
|
||||
if(method_exists($customView, 'isPermittedChangeStatus')) {
|
||||
// Approving or Denying status-public by the admin in CustomView
|
||||
$statusdetails = $customView->isPermittedChangeStatus($viewinfo['status']);
|
||||
|
||||
// To check if a user is able to edit/delete a CustomView
|
||||
$edit_permit = $customView->isPermittedCustomView($viewid,'EditView',$currentModule);
|
||||
$delete_permit = $customView->isPermittedCustomView($viewid,'Delete',$currentModule);
|
||||
|
||||
$smarty->assign("CUSTOMVIEW_PERMISSION",$statusdetails);
|
||||
$smarty->assign("CV_EDIT_PERMIT",$edit_permit);
|
||||
$smarty->assign("CV_DELETE_PERMIT",$delete_permit);
|
||||
}
|
||||
// END
|
||||
|
||||
$smarty->assign("VIEWID", $viewid);
|
||||
|
||||
if($viewinfo['viewname'] == 'All') $smarty->assign('ALL', 'All');
|
||||
|
||||
if($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 clas
|
||||
s='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;
|
||||
}
|
||||
|
||||
$listquery = getListQuery($currentModule);
|
||||
$list_query= $customView->getModifiedCvListQuery($viewid, $listquery, $currentModule);
|
||||
|
||||
if($where != '') {
|
||||
$list_query = "$list_query AND $where";
|
||||
}
|
||||
|
||||
// Sorting
|
||||
if(!empty($order_by)) {
|
||||
if($order_by == 'smownerid') $list_query .= ' ORDER BY user_name '.$sorder;
|
||||
else {
|
||||
$tablename = getTableNameForField($currentModule, $order_by);
|
||||
$tablename = ($tablename != '')? ($tablename . '.') : '';
|
||||
$list_query .= ' ORDER BY ' . $tablename . $order_by . ' ' . $sorder;
|
||||
}
|
||||
}
|
||||
|
||||
//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);
|
||||
$smarty->assign('recordListRange',$recordListRangeMsg);
|
||||
|
||||
$smarty->assign("CUSTOMVIEW_OPTION",$customview_html);
|
||||
|
||||
// Navigation
|
||||
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, $currentModule, 'index', $viewid);
|
||||
$smarty->assign("NAVIGATION", $navigationOutput);
|
||||
|
||||
$listview_header = getListViewHeader($focus,$currentModule,$url_string,$sorder,$order_by,'',$customView);
|
||||
$listview_entries = getListViewEntries($focus,$currentModule,$list_result,$navigation_array,'','','EditView','Delete',$customView);
|
||||
$listview_header_search = getSearchListHeaderValues($focus,$currentModule,$url_string,$sorder,$order_by,'',$customView);
|
||||
|
||||
$smarty->assign('LISTHEADER', $listview_header);
|
||||
$smarty->assign('LISTENTITY', $listview_entries);
|
||||
$smarty->assign('SEARCHLISTHEADER',$listview_header_search);
|
||||
|
||||
// Module Search
|
||||
$alphabetical = AlphabeticalSearch($currentModule,'index',$focus->def_basicsearch_col,'true','basic','','','','',$viewid);
|
||||
$fieldnames = getAdvSearchfields($currentModule);
|
||||
$criteria = getcriteria_options();
|
||||
$smarty->assign("ALPHABETICAL", $alphabetical);
|
||||
$smarty->assign("FIELDNAMES", $fieldnames);
|
||||
$smarty->assign("CRITERIA", $criteria);
|
||||
|
||||
$smarty->assign("AVALABLE_FIELDS", getMergeFields($currentModule,"available_fields"));
|
||||
$smarty->assign("FIELDS_TO_MERGE", getMergeFields($currentModule,"fileds_to_merge"));
|
||||
|
||||
$_SESSION[$currentModule.'_listquery'] = $list_query;
|
||||
|
||||
if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
|
||||
$smarty->display("ListViewEntries.tpl");
|
||||
else
|
||||
$smarty->display('ListView.tpl');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/*+*******************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*********************************************************************************/
|
||||
require_once 'include/ListView/ListViewPagging.php';
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user