/** * This function exports all the data for a given module * Param $type - module name * Return type text */ function export($type) { global $log, $list_max_entries_per_page; $log->debug("Entering export(" . $type . ") method ..."); $adb = PearDatabase::getInstance(); $focus = 0; $content = ''; if ($type != "") { // vtlib customization: Hook to dynamically include required module file. // Refer to the logic in setting $currentModule in index.php $focus = CRMEntity::getInstance($type); } $log = LoggerManager::getLogger('export_' . $type); $db = PearDatabase::getInstance(); $oCustomView = new CustomView("{$type}"); $viewid = $oCustomView->getViewId("{$type}"); $sorder = $focus->getSortOrder(); $order_by = $focus->getOrderBy(); $search_type = vtlib_purify($_REQUEST['search_type']); $export_data = vtlib_purify($_REQUEST['export_data']); if (isset($_SESSION['export_where']) && $_SESSION['export_where'] != '' && $search_type == 'includesearch') { $where = $_SESSION['export_where']; } $query = $focus->create_export_query($where); if ($search_type != 'includesearch' && $type != 'Calendar') { $stdfiltersql = $oCustomView->getCVStdFilterSQL($viewid); $advfiltersql = $oCustomView->getCVAdvFilterSQL($viewid); if (isset($stdfiltersql) && $stdfiltersql != '') { $query .= ' and ' . $stdfiltersql; } if (isset($advfiltersql) && $advfiltersql != '') { $query .= ' and ' . $advfiltersql; } } $params = array(); list($idstring, $export_data) = split("#@@#", getExportRecordIds($type, $viewid, $_REQUEST)); if (($search_type == 'withoutsearch' || $search_type == 'includesearch') && $export_data == 'selecteddata') { $idstring = getSelectedRecords($_REQUEST, $type, $idstring, vtlib_purify($_REQUEST['excludedRecords'])); if ($type == 'Accounts' && count($idstring) > 0) { $query .= ' and vtiger_account.accountid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'Contacts' && count($idstring) > 0) { $query .= ' and vtiger_contactdetails.contactid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'Potentials' && count($idstring) > 0) { $query .= ' and vtiger_potential.potentialid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'Leads' && count($idstring) > 0) { $query .= ' and vtiger_leaddetails.leadid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'Products' && count($idstring) > 0) { $query .= ' and vtiger_products.productid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'Documents' && count($idstring) > 0) { $query .= ' and vtiger_notes.notesid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'HelpDesk' && count($idstring) > 0) { $query .= ' and vtiger_troubletickets.ticketid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'Vendors' && count($idstring) > 0) { $query .= ' and vtiger_vendor.vendorid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'Invoice' && count($idstring) > 0) { $query .= ' and vtiger_invoice.invoiceid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'Quotes' && count($idstring) > 0) { $query .= ' and vtiger_quotes.quoteid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'SalesOrder' && count($idstring) > 0) { $query .= ' and vtiger_salesorder.salesorderid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } elseif ($type == 'PurchaseOrder' && count($idstring) > 0) { $query .= ' and vtiger_purchaseorder.purchaseorderid in (' . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); } else { if (count($idstring) > 0) { // vtlib customization: Hook to make the export feature available for custom modules. $query .= " and {$focus->table_name}.{$focus->table_index} in (" . generateQuestionMarks($idstring) . ')'; array_push($params, $idstring); // END } } } if (isset($order_by) && $order_by != '') { if ($order_by == 'smownerid') { $query .= ' ORDER BY user_name ' . $sorder; } elseif ($order_by == 'lastname' && $type == 'Documents') { $query .= ' ORDER BY vtiger_contactdetails.lastname ' . $sorder; } elseif ($order_by == 'crmid' && $type == 'HelpDesk') { $query .= ' ORDER BY vtiger_troubletickets.ticketid ' . $sorder; } else { $tablename = getTableNameForField($type, $order_by); $tablename = $tablename != '' ? $tablename . "." : ''; if ($adb->isPostgres()) { $query .= ' GROUP BY ' . $tablename . $order_by; } $query .= ' ORDER BY ' . $tablename . $order_by . ' ' . $sorder; } } if ($export_data == 'currentpage') { $current_page = ListViewSession::getCurrentPage($type, $viewid); $limit_start_rec = ($current_page - 1) * $list_max_entries_per_page; if ($limit_start_rec < 0) { $limit_start_rec = 0; } $query .= ' LIMIT ' . $limit_start_rec . ',' . $list_max_entries_per_page; } $result = $adb->pquery($query, $params, true, "Error exporting {$type}: " . "<BR>{$query}"); $fields_array = $adb->getFieldsArray($result); $fields_array = array_diff($fields_array, array("user_name")); $__processor = new ExportUtils($type, $fields_array); // Translated the field names based on the language used. $translated_fields_array = array(); for ($i = 0; $i < count($fields_array); $i++) { $translated_fields_array[$i] = getTranslatedString($fields_array[$i], $type); } $header = implode("\",\"", array_values($translated_fields_array)); $header = "\"" . $header; $header .= "\"\r\n"; /** Output header information */ echo $header; $column_list = implode(",", array_values($fields_array)); while ($val = $adb->fetchByAssoc($result, -1, false)) { $new_arr = array(); $val = $__processor->sanitizeValues($val); foreach ($val as $key => $value) { if ($type == 'Documents' && $key == 'description') { $value = strip_tags($value); $value = str_replace(' ', '', $value); array_push($new_arr, $value); } elseif ($key != "user_name") { // Let us provide the module to transform the value before we save it to CSV file $value = $focus->transform_export_value($key, $value); array_push($new_arr, preg_replace("/\"/", "\"\"", $value)); } } $line = implode("\",\"", $new_arr); $line = "\"" . $line; $line .= "\"\r\n"; /** Output each row information */ echo $line; } $log->debug("Exiting export method ..."); return true; }
* 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'; $excludedRecords = vtlib_purify($_REQUEST['excludedRecords']); $focus = CRMEntity::getInstance($currentModule); $focus->mode = ''; $mode = 'mass_edit'; $disp_view = getView($focus->mode); $idstring = vtlib_purify($_REQUEST['idstring']); $smarty = new vtigerCRM_Smarty(); $smarty->assign('MODULE', $currentModule); $smarty->assign('APP', $app_strings); $smarty->assign('THEME', $theme); $smarty->assign('IMAGE_PATH', "themes/{$theme}/images/"); $storearray = getSelectedRecords($_REQUEST, $currentModule, $_REQUEST['idstring'], $excludedRecords); $idstringval = implode(';', $storearray); $smarty->assign("IDS", $idstringval); $smarty->assign('MASS_EDIT', '1'); $smarty->assign('BLOCKS', getBlocks($currentModule, $disp_view, $mode, $focus->column_fields)); $smarty->assign("CATEGORY", getParentTab()); // 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');
* Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. ********************************************************************************/ require_once 'include/database/PearDatabase.php'; require_once 'include/utils/UserInfoUtil.php'; require_once 'include/utils/CommonUtils.php'; $idlist = vtlib_purify($_REQUEST['idlist']); $viewid = vtlib_purify($_REQUEST['viewname']); $returnmodule = vtlib_purify($_REQUEST['return_module']); $return_action = vtlib_purify($_REQUEST['return_action']); $excludedRecords = vtlib_purify($_REQUEST['excludedRecords']); $rstart = ''; //Added to fix 4600 $url = getBasic_Advance_SearchURL(); //split the string and store in an array $storearray = getSelectedRecords($_REQUEST, $returnmodule, $idlist, $excludedRecords); $storearray = array_filter($storearray); $ids_list = array(); $errormsg = ''; foreach ($storearray as $id) { if (isPermitted($returnmodule, 'Delete', $id) == 'yes') { $focus = CRMEntity::getInstance($returnmodule); DeleteEntity($returnmodule, $returnmodule, $focus, $id, ''); } else { $ids_list[] = $id; } } if (count($ids_list) > 0) { $ret = getEntityName($returnmodule, $ids_list); if (count($ret) > 0) { $errormsg = implode(',', $ret);
/** Function to get the emailids for the given ids form the request parameters * It returns an array which contains the mailids and the parentidlists */ function get_to_emailids($module) { global $adb, $current_user, $log; require_once 'include/Webservices/Query.php'; //$idlists1 = ""; $mailds = ''; if (empty($_REQUEST['field_lists'])) { switch ($module) { case 'Accounts': $_REQUEST["field_lists"] = 9; break; case 'Contacts': $_REQUEST["field_lists"] = 80; break; case 'Vendors': $_REQUEST["field_lists"] = 292; break; } } $fieldids = explode(":", vtlib_purify($_REQUEST['field_lists'])); if ($_REQUEST['idlist'] == 'all' || $_REQUEST['idlist'] == 'relatedListSelectAll') { $idlist = getSelectedRecords($_REQUEST, vtlib_purify($_REQUEST['pmodule']), vtlib_purify($_REQUEST['idlist']), vtlib_purify($_REQUEST['excludedRecords'])); } else { $idlist = explode(":", str_replace("undefined", "", vtlib_purify($_REQUEST['idlist']))); } $entityids = array(); foreach ($idlist as $key => $id) { $entityids[] = vtws_getWebserviceEntityId($module, $id); } $vtwsObject = VtigerWebserviceObject::fromName($adb, $module); $vtwsCRMObjectMeta = new VtigerCRMObjectMeta($vtwsObject, $current_user); $emailFields = $vtwsCRMObjectMeta->getEmailFields(); foreach ($emailFields as $key => $fieldname) { $fieldid = $vtwsCRMObjectMeta->getFieldIdFromFieldName($fieldname); if (!in_array($fieldid, $fieldids)) { unset($emailFields[$key]); } } if (empty($emailFields)) { return false; } if ($module == 'Leads') { $query = 'SELECT firstname,lastname,' . implode(",", $emailFields) . ',vtiger_leaddetails.leadid as id FROM vtiger_leaddetails INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_leaddetails.leadid LEFT JOIN vtiger_leadscf ON vtiger_leaddetails.leadid = vtiger_leadscf.leadid WHERE vtiger_crmentity.deleted=0 AND vtiger_leaddetails.leadid IN (' . generateQuestionMarks($idlist) . ')'; } else { if ($module == 'Contacts') { $query = 'SELECT firstname,lastname,' . implode(",", $emailFields) . ',vtiger_contactdetails.contactid as id FROM vtiger_contactdetails INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_contactdetails.contactid LEFT JOIN vtiger_contactscf ON vtiger_contactdetails.contactid = vtiger_contactscf.contactid WHERE vtiger_crmentity.deleted=0 AND vtiger_contactdetails.contactid IN (' . generateQuestionMarks($idlist) . ') AND vtiger_contactdetails.emailoptout=0'; } else { if ($module == 'Accounts') { $query = 'SELECT vtiger_account.accountname, ' . implode(",", $emailFields) . ',vtiger_account.accountid as id FROM vtiger_account INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_account.accountid LEFT JOIN vtiger_accountscf ON vtiger_accountscf.accountid= vtiger_account.accountid WHERE vtiger_crmentity.deleted=0 AND vtiger_account.accountid IN (' . generateQuestionMarks($idlist) . ') AND vtiger_account.emailoptout=0'; } else { if ($module == 'Project') { $query = 'SELECT projectname,' . implode(",", $emailFields) . ',vtiger_project.projectid as id FROM vtiger_project INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_project.projectid LEFT JOIN vtiger_projectcf ON vtiger_projectcf.projectid = vtiger_project.projectid WHERE vtiger_crmentity.deleted=0 AND vtiger_project.projectid IN (' . generateQuestionMarks($idlist) . ')'; } else { if ($module == 'ProjectTask') { $query = 'SELECT projecttaskname,' . implode(",", $emailFields) . ',vtiger_projecttask.projecttaskid as id FROM vtiger_projecttask INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_projecttask.projecttaskid LEFT JOIN vtiger_projecttaskcf ON vtiger_projecttaskcf.projecttaskid = vtiger_projecttask.projecttaskid WHERE vtiger_crmentity.deleted=0 AND vtiger_projecttask.projecttaskid IN (' . generateQuestionMarks($idlist) . ')'; } else { if ($module == 'Potentials') { $query = 'SELECT potentialname,' . implode(",", $emailFields) . ',vtiger_potential.potentialid as id FROM vtiger_potential INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_potential.potentialid LEFT JOIN vtiger_potentialscf ON vtiger_potentialscf.potentialid = vtiger_potential.potentialid WHERE vtiger_crmentity.deleted=0 AND vtiger_potential.potentialid IN (' . generateQuestionMarks($idlist) . ')'; } else { if ($module == 'HelpDesk') { $query = 'SELECT title,' . implode(",", $emailFields) . ',vtiger_troubletickets.ticketid as id FROM vtiger_troubletickets INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_troubletickets.ticketid LEFT JOIN vtiger_ticketcf ON vtiger_ticketcf.ticketid = vtiger_troubletickets.ticketid WHERE vtiger_crmentity.deleted=0 AND vtiger_troubletickets.ticketid IN (' . generateQuestionMarks($idlist) . ')'; } else { // vendors $query = 'SELECT vtiger_vendor.vendorname, ' . implode(",", $emailFields) . ',vtiger_vendor.vendorid as id FROM vtiger_vendor INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_vendor.vendorid LEFT JOIN vtiger_vendorcf ON vtiger_vendorcf.vendorid= vtiger_vendor.vendorid WHERE vtiger_crmentity.deleted=0 AND vtiger_vendor.vendorid IN (' . generateQuestionMarks($idlist) . ')'; } } } } } } } $result = $adb->pquery($query, $idlist); if ($adb->num_rows($result) > 0) { while ($entityvalue = $adb->fetchByAssoc($result)) { $vtwsid = $entityvalue['id']; foreach ($emailFields as $i => $emailFieldName) { if ($entityvalue[$emailFieldName] != NULL || $entityvalue[$emailFieldName] != '') { $idlists .= $vtwsid . '@' . $vtwsCRMObjectMeta->getFieldIdFromFieldName($emailFieldName) . '|'; if ($module == 'Leads' || $module == 'Contacts') { $mailids .= $entityvalue['lastname'] . " " . $entityvalue['firstname'] . "<" . $entityvalue[$emailFieldName] . ">,"; } else { if ($module == "Project") { $mailids .= $entityvalue['projectname'] . "<" . $entityvalue[$emailFieldName] . ">,"; } else { if ($module == "ProjectTask") { $mailids .= $entityvalue['projecttaskname'] . "<" . $entityvalue[$emailFieldName] . ">,"; } else { if ($module == "Potentials") { $mailids .= $entityvalue['potentialname'] . "<" . $entityvalue[$emailFieldName] . ">,"; } else { if ($module == "HelpDesk") { $mailids .= $entityvalue['title'] . "<" . $entityvalue[$emailFieldName] . ">,"; } else { $mailids .= $entityvalue['accountname'] . "<" . $entityvalue[$emailFieldName] . ">,"; } } } } } } } } } $return_data = array('idlists' => $idlists, 'mailds' => $mailids); return $return_data; }
* Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. ********************************************************************************/ require_once 'include/logging.php'; require_once 'include/database/PearDatabase.php'; global $current_user; if ($current_user->is_admin != 'on') { echo 'NOT_PERMITTED'; die; } else { $new_folderid = $_REQUEST['folderid']; $idlist = vtlib_purify($_REQUEST['idlist']); $excludedRecords = vtlib_purify($_REQUEST['excludedRecords']); if (isset($_REQUEST['idlist']) && $_REQUEST['idlist'] != '') { $id_array = array(); $id_array = getSelectedRecords($_REQUEST, 'Documents', $idlist, $excludedRecords); //explode(';',$_REQUEST['idlist']); $id_array = array_filter($id_array); for ($i = 0; $i < count($id_array); $i++) { ChangeFolder($id_array[$i], $new_folderid); } header("Location: index.php?action=DocumentsAjax&file=ListView&mode=ajax&module=Documents"); } } /** To Change the Documents to another folder * @param $recordid -- The file id * @param $new_folderid -- The folderid to which the file to be moved * @returns nothing */ function ChangeFolder($recordid, $new_folderid) {
* 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'; $excludedRecords = vtlib_purify($_REQUEST['excludedRecords']); $focus = CRMEntity::getInstance($currentModule); $focus->mode = ''; $mode = 'mass_edit'; $disp_view = getView($focus->mode); $idstring = vtlib_purify($_REQUEST['idstring']); $smarty = new vtigerCRM_Smarty(); $smarty->assign('MODULE', $currentModule); $smarty->assign('APP', $app_strings); $smarty->assign('THEME', $theme); $smarty->assign('IMAGE_PATH', "themes/{$theme}/images/"); $storearray = getSelectedRecords($_REQUEST, $currentModule, vtlib_purify($_REQUEST['idstring']), $excludedRecords); $idstringval = implode(';', $storearray); $smarty->assign("IDS", $idstringval); $smarty->assign('MASS_EDIT', '1'); $smarty->assign('BLOCKS', getBlocks($currentModule, $disp_view, $mode, $focus->column_fields)); $smarty->assign("CATEGORY", getParentTab()); // 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');
require_once 'Smarty_setup.php'; include_once dirname(__FILE__) . '/SMSNotifier.php'; global $theme, $currentModule, $mod_strings, $app_strings, $current_user, $adb; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; $smarty = new vtigerCRM_Smarty(); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("APP", $app_strings); $smarty->assign("MOD", $mod_strings); $smarty->assign("MODULE", $currentModule); $smarty->assign("IS_ADMIN", is_admin($current_user)); if (SMSNotifier::checkServer()) { $excludedRecords = vtlib_purify($_REQUEST['excludedRecords']); $idstring = vtlib_purify($_REQUEST['idstring']); $idstring = trim($idstring, ';'); $idlist = getSelectedRecords($_REQUEST, $_REQUEST['sourcemodule'], $idstring, $excludedRecords); //explode(';', $idstring); $sourcemodule = vtlib_purify($_REQUEST['sourcemodule']); $capturedFieldInfo = array(); $capturedFieldNames = array(); // Analyze the phone fields for the selected module. $phoneTypeFieldsResult = $adb->pquery("SELECT fieldid,fieldname,fieldlabel FROM vtiger_field WHERE uitype=11 AND tabid=? AND presence in (0,2)", array(getTabid($sourcemodule))); if ($phoneTypeFieldsResult && $adb->num_rows($phoneTypeFieldsResult)) { while ($resultrow = $adb->fetch_array($phoneTypeFieldsResult)) { $checkFieldPermission = getFieldVisibilityPermission($sourcemodule, $current_user->id, $resultrow['fieldname']); if ($checkFieldPermission == '0') { $fieldlabel = getTranslatedString($resultrow['fieldlabel'], $sourcemodule); $capturedFieldNames[] = $resultrow['fieldname']; $capturedFieldInfo[$resultrow['fieldid']] = array($fieldlabel => $resultrow['fieldname']); } }
* ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. ********************************************************************************/ require_once 'include/database/PearDatabase.php'; require_once 'Smarty_setup.php'; require_once 'include/utils/utils.php'; global $app_strings, $mod_strings, $list_max_entries_per_page, $currentModule, $theme, $current_language, $current_user; $smarty = new vtigerCRM_Smarty(); $category = getParentTab(); $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once 'modules/Vtiger/layout_utils.php'; $idstring = getSelectedRecords($_REQUEST, $currentModule, $_REQUEST['idstring'], $_REQUEST['excludedRecords']); $idstring = join(';', $idstring); $smarty->assign("SESSION_WHERE", $_SESSION['export_where']); $smarty->assign('APP', $app_strings); $smarty->assign('MOD', $mod_strings); $smarty->assign("THEME", $theme_path); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("CATEGORY", $category); $smarty->assign("MODULE", $currentModule); $smarty->assign("MODULELABEL", getTranslatedString($currentModule)); $smarty->assign("IDSTRING", $idstring); $smarty->assign("PERPAGE", $list_max_entries_per_page); if (!is_admin($current_user) && isPermitted($currentModule, 'Export') != 'yes') { $smarty->display(vtlib_getModuleTemplate('Vtiger', 'OperationNotPermitted.tpl')); } else { $smarty->display('ExportRecords.tpl');
* ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. ********************************************************************************/ require_once 'include/database/PearDatabase.php'; require_once 'Smarty_setup.php'; require_once 'include/utils/utils.php'; global $app_strings, $mod_strings, $list_max_entries_per_page, $currentModule, $theme, $current_language, $current_user; $smarty = new vtigerCRM_Smarty(); $category = getParentTab(); $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once 'modules/Vtiger/layout_utils.php'; $idstring = getSelectedRecords($_REQUEST, $currentModule, isset($_REQUEST['idstring']) ? $_REQUEST['idstring'] : '', isset($_REQUEST['excludedRecords']) ? $_REQUEST['excludedRecords'] : ''); $idstring = join(';', $idstring); $smarty->assign("SESSION_WHERE", isset($_SESSION['export_where']) ? $_SESSION['export_where'] : ''); $smarty->assign('APP', $app_strings); $smarty->assign('MOD', $mod_strings); $smarty->assign("THEME", $theme_path); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("CATEGORY", $category); $smarty->assign("MODULE", $currentModule); $smarty->assign("MODULELABEL", getTranslatedString($currentModule)); $smarty->assign("IDSTRING", $idstring); $smarty->assign("PERPAGE", $list_max_entries_per_page); if (!is_admin($current_user) && isPermitted($currentModule, 'Export') != 'yes') { $smarty->display(vtlib_getModuleTemplate('Vtiger', 'OperationNotPermitted.tpl')); } else { $smarty->display('ExportRecords.tpl');