/** function used to show the error message occured during import process * @param string $message - Error message to display in the screen, where the passed error message will be displayed in screen using Importerror.tpl file */ function show_error_import($message) { global $import_mod_strings; global $theme; global $log; global $mod_strings; global $app_strings; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; $log->info("Upload Error"); $smarty = new vtigerCRM_Smarty(); $smarty->assign("MOD", $mod_strings); $smarty->assign("APP", $app_strings); 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'])); } $smarty->assign("THEME", $theme); $category = getParenttab(); $smarty->assign("CATEGORY", $category); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . $GLOBALS['request_string']); $smarty->assign("MODULE", vtlib_purify($_REQUEST['module'])); $smarty->assign("MESSAGE", $message); $smarty->display('Importerror.tpl'); }
function vtDisplayTaskList($adb, $requestUrl, $current_language) { global $theme, $app_strings; $image_path = "themes/{$theme}/images/"; $util = new VTWorkflowUtils(); $module = new VTWorkflowApplication("tasklist"); $mod = return_module_language($current_language, $module->name); if (!$util->checkAdminAccess()) { $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); return; } $smarty = new vtigerCRM_Smarty(); $tm = new VTTaskManager($adb); $smarty->assign("tasks", $tm->getTasks()); $smarty->assign("moduleNames", array("Contacts", "Applications")); $smarty->assign("taskTypes", array("VTEmailTask", "VTDummyTask")); $smarty->assign("returnUrl", $requestUrl); $smarty->assign("MOD", return_module_language($current_language, 'Settings')); $smarty->assign("APP", $app_strings); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("MODULE_NAME", $module->label); $smarty->assign("PAGE_NAME", 'Task List'); $smarty->assign("PAGE_TITLE", 'List available tasks'); $smarty->assign("moduleName", $moduleName); $smarty->display("{$module->name}/ListTasks.tpl"); }
function vtDisplayWorkflowList($adb, $request, $requestUrl, $app_strings, $current_language) { global $theme; $image_path = "themes/{$theme}/images/"; $module = new VTWorkflowApplication("workflowlist"); $util = new VTWorkflowUtils(); $mod = return_module_language($current_language, $module->name); if (!$util->checkAdminAccess()) { $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); return; } $smarty = new vtigerCRM_Smarty(); $wfs = new VTWorkflowManager($adb); $smarty->assign("moduleNames", $util->vtGetModules($adb)); $smarty->assign("returnUrl", $requestUrl); $listModule = $request['list_module']; $smarty->assign("listModule", $listModule); if ($listModule == null || strtolower($listModule) == "all") { $smarty->assign("workflows", $wfs->getWorkflows()); } else { $smarty->assign("workflows", $wfs->getWorkflowsForModule($listModule)); } $smarty->assign("MOD", array_merge(return_module_language($current_language, 'Settings'), return_module_language($current_language, $module->name))); $smarty->assign("APP", $app_strings); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("MODULE_NAME", $module->label); $smarty->assign("PAGE_NAME", $mod['LBL_WORKFLOW_LIST']); $smarty->assign("PAGE_TITLE", $mod['LBL_AVAILABLE_WORKLIST_LIST']); $smarty->assign("module", $module); $smarty->assign('MODULE', $module->name); $smarty->assign("CRON_TASK", Vtiger_Cron::getInstance('Workflow')); $smarty->display("{$module->name}/ListWorkflows.tpl"); }
function vtEditExpressions($adb, $appStrings, $current_language, $theme, $formodule = '') { $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; $smarty = new vtigerCRM_Smarty(); $smarty->assign('APP', $appStrings); $mod = array_merge(return_module_language($current_language, 'FieldFormulas'), return_module_language($current_language, 'Settings')); $jsStrings = array('NEED_TO_ADD_A' => $mod['NEED_TO_ADD_A'], 'CUSTOM_FIELD' => $mod['LBL_CUSTOM_FIELD'], 'LBL_USE_FUNCTION_DASHDASH' => $mod['LBL_USE_FUNCTION_DASHDASH'], 'LBL_USE_FIELD_VALUE_DASHDASH' => $mod['LBL_USE_FIELD_VALUE_DASHDASH'], 'LBL_DELETE_EXPRESSION_CONFIRM' => $mod['LBL_DELETE_EXPRESSION_CONFIRM']); $smarty->assign("JS_STRINGS", Zend_Json::encode($jsStrings)); $smarty->assign("MOD", $mod); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("MODULE_NAME", 'FieldFormulas'); $smarty->assign("PAGE_NAME", 'LBL_FIELDFORMULAS'); $smarty->assign("PAGE_TITLE", 'LBL_FIELDFORMULAS'); $smarty->assign("PAGE_DESC", 'LBL_FIELDFORMULAS_DESCRIPTION'); $smarty->assign("FORMODULE", $formodule); if (file_exists("modules/{$formodule}/{$formodule}.php")) { $focus = CRMEntity::getInstance($formodule); $validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, getTabid($formodule))); $smarty->assign('VALIDATION_DATA_FIELDNAME', $validationArray['fieldname']); $smarty->assign('VALIDATION_DATA_FIELDDATATYPE', $validationArray['datatype']); $smarty->assign('VALIDATION_DATA_FIELDLABEL', $validationArray['fieldlabel']); } $smarty->display(vtlib_getModuleTemplate('FieldFormulas', 'EditExpressions.tpl')); }
function vtWorkflowEdit($adb, $request, $requestUrl, $current_language, $app_strings) { global $theme; $util = new VTWorkflowUtils(); $image_path = "themes/{$theme}/images/"; $module = new VTWorkflowApplication("editworkflow"); $mod = return_module_language($current_language, $module->name); if (!$util->checkAdminAccess()) { $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); return; } $smarty = new vtigerCRM_Smarty(); if ($request['source'] == 'from_template') { $tm = new VTWorkflowTemplateManager($adb); $template = $tm->retrieveTemplate($request['template_id']); $workflow = $tm->createWorkflow($template); } else { $wfs = new VTWorkflowManager($adb); if (isset($request["workflow_id"])) { $workflow = $wfs->retrieve($request["workflow_id"]); } else { $moduleName = $request["module_name"]; $workflow = $wfs->newWorkflow($moduleName); } } if ($workflow == null) { $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NO_WORKFLOW']); $util->redirectTo($errorUrl, $mod['LBL_ERROR_NO_WORKFLOW']); return; } $workflow->test = addslashes($workflow->test); $tm = new VTTaskManager($adb); $tasks = $tm->getTasksForWorkflow($workflow->id); $smarty->assign("tasks", $tasks); $taskTypes = $tm->getTaskTypes($workflow->moduleName); $smarty->assign("taskTypes", $taskTypes); $smarty->assign("newTaskReturnUrl", vtlib_purify($requestUrl)); $smarty->assign("returnUrl", vtlib_purify($request["return_url"])); $smarty->assign("APP", $app_strings); $smarty->assign("MOD", array_merge(return_module_language($current_language, 'Settings'), return_module_language($current_language, $module->name))); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("MODULE_NAME", $module->label); $smarty->assign("PAGE_NAME", $mod['LBL_EDIT_WORKFLOW']); $smarty->assign("PAGE_TITLE", $mod['LBL_EDIT_WORKFLOW_TITLE']); $smarty->assign("workflow", $workflow); $smarty->assign("saveType", isset($workflow->id) ? "edit" : "new"); $smarty->assign("module", $module); $smarty->assign("WORKFLOW_TRIGGER_TYPES_HELP_LINK", WORKFLOW_TRIGGER_TYPES); $smarty->display("{$module->name}/EditWorkflow.tpl"); }
$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 $picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($currentModule); $smarty->assign("PICKIST_DEPENDENCY_DATASOURCE", Zend_Json::encode($picklistDependencyDatasource)); // Gather the help information associated with fields $smarty->assign('FIELDHELPINFO', vtlib_getFieldHelpInfo($currentModule)); // END if ($focus->mode == 'edit') { $smarty->display('Inventory/InventoryEditView.tpl'); } else { $smarty->display('Inventory/InventoryCreateView.tpl'); }
$smarty->assign("MODULESORCES", $ModuleSorces); } $smarty->assign("MODULE_BLOCKS", $Convert_ModuleBlocks); $smarty->assign("RELATED_MODULE_FIELDS", $Convert_RelatedModuleFields); $smarty->assign("MODULE_FIELDS", $Convert_ModuleFields); // ITS4YOU-CR VlZa // Product bloc templates $sql = "SELECT * FROM vtiger_pdfmaker_productbloc_tpl"; $result = $adb->query($sql); $Productbloc_tpl[""] = $mod_strings["LBL_PLS_SELECT"]; while ($row = $adb->fetchByAssoc($result)) { $Productbloc_tpl[$row["body"]] = $row["name"]; } $smarty->assign("PRODUCT_BLOC_TPL", $Productbloc_tpl); $smarty->assign("PRODUCTS_FIELDS", $SelectModuleFields["Products"]); $smarty->assign("SERVICES_FIELDS", $SelectModuleFields["Services"]); // ITS4YOU-END if ($templateid != "" || $select_module != "") { $smarty->assign("SELECT_MODULE_FIELD", $SelectModuleFields[$select_module]); $smf_filename = $SelectModuleFields[$select_module]; if ($select_module == "Invoice" || $select_module == "Quotes" || $select_module == "SalesOrder" || $select_module == "PurchaseOrder" || $select_module == "Issuecards" || $select_module == "Receiptcards" || $select_module == "Creditnote" || $select_module == "StornoInvoice") { unset($smf_filename["Details"]); } $smarty->assign("SELECT_MODULE_FIELD_FILENAME", $smf_filename); } include_once "version.php"; $smarty->assign("VERSION", $version); $category = getParentTab(); $smarty->assign("CATEGORY", $category); $smarty->display('modules/PDFMaker/EditPDFTemplate.tpl');
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'); }
if ($mod_seq_field != null) { $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; } else { $mod_seq_id = $focus->id; } $smarty->assign('MOD_SEQ_ID', $mod_seq_id); // END $smarty->assign("ID", $focus->id); $smarty->assign("NAME", $focus->lastname . ' ' . $focus->firstname); $smarty->assign("EMAIL", $focus->column_fields['email']); $smarty->assign("SECONDARY_EMAIL", $focus->column_fields['secondaryemail']); $related_array = getRelatedLists($currentModule, $focus); $smarty->assign("RELATEDLISTS", $related_array); require_once 'include/ListView/RelatedListViewSession.php'; if (!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { $relationId = vtlib_purify($_REQUEST['relation_id']); RelatedListViewSession::addRelatedModuleToSession($relationId, vtlib_purify($_REQUEST['selected_header'])); } $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); $smarty->assign("SELECTEDHEADERS", $open_related_modules); $smarty->assign("SINGLE_MOD", $app_strings['Lead']); $smarty->assign("MODULE", $currentmodule); $smarty->assign("UPDATEINFO", updateInfo($focus->id)); $smarty->assign("MOD", $mod_strings); $smarty->assign("APP", $app_strings); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", $image_path); $check_button = Button_Check($module); $smarty->assign("CHECK", $check_button); $smarty->display("RelatedLists.tpl"); }
$mapTemplate->assign("seldelimiter", $seldelimiter); $mapTemplate->assign('maptype', $maptype); } else { $viewmode = "create"; } $mapTemplate->assign("MOD", $mod_strings); $mapTemplate->assign("APP", $app_strings); $mapTemplate->assign("module_list", json_encode($mapInstance->module_list)); $mapTemplate->assign("related_modules", json_encode($mapInstance->related_modules)); $mapTemplate->assign("rel_fields", json_encode($mapInstance->rel_fields)); $mapTemplate->assign("delimiters", $delimiters); $mapTemplate->assign("mapid", $mapid); $mapTemplate->assign("mode", $viewmode); $mapTemplate->assign("module_id", $mapInstance->module_id); switch (strtolower($maptype)) { case 'block access': $blockids = explode(',', $blocks); $mapTemplate->assign('blocks', json_encode($mapInstance->module_list[$originname])); $mapTemplate->assign('blockid', $mapInstance->module_list[$originname]); $mapTemplate->assign("targetID", $blockids[0]); $mapTemplate->display('modules/cbMap/blockaccess.tpl'); break; case 'metadata': $mapTemplate->display('modules/cbMap/metadataWindow.tpl'); break; case 'search and update': $mapTemplate->display('modules/cbMap/SearchUpdateMap.tpl'); break; default: $mapTemplate->display('modules/cbMap/mapWindow.tpl'); }
} else { $cron_end = ''; } $out['cronname'] = getTranslatedString($cron_mod, $cronTask->getModule()); $out['hours'] = str_pad((int) ($cron_freq / (60 * 60)), 2, 0, STR_PAD_LEFT); $out['mins'] = str_pad((int) ($cron_freq % (60 * 60) / 60), 2, 0, STR_PAD_LEFT); $out['id'] = $cron_id; $out['status'] = $cron_st; $out['laststart'] = $cron_started; $out['lastend'] = $cron_end; if ($out['status'] == Vtiger_Cron::$STATUS_DISABLED) { $out['status'] = $mod_strings['LBL_INACTIVE']; } elseif ($out['status'] == Vtiger_Cron::$STATUS_ENABLED) { $out['status'] = $mod_strings['LBL_ACTIVE']; } else { $out['status'] = $mod_strings['LBL_RUNNING']; } $output[] = $out; } $smarty->assign('CRON', $output); $smarty->assign('MOD', return_module_language($current_language, 'CronTasks')); $smarty->assign('MIN_CRON_FREQUENCY', getMinimumCronFrequency()); $smarty->assign('THEME', $theme); $smarty->assign('IMAGE_PATH', $image_path); $smarty->assign('APP', $app_strings); $smarty->assign('CMOD', $mod_strings); if ($_REQUEST['directmode'] != '') { $smarty->display('modules/CronTasks/CronContents.tpl'); } else { $smarty->display('modules/CronTasks/Cron.tpl'); }
$smarty->assign("CFENTRIES", getFieldListEntries($fld_module)); $smarty->assign("RELATEDLIST", getRelatedListInfo($fld_module)); if (isset($_REQUEST["duplicate"]) && $_REQUEST["duplicate"] == "yes" || $duplicate == 'yes') { echo "ERROR"; exit; } if ($duplicate == 'LENGTH_ERROR') { echo "LENGTH_ERROR"; exit; } if ($_REQUEST['mode'] != '') { $mode = vtlib_purify($_REQUEST['mode']); } $smarty->assign("MODE", $mode); if ($_REQUEST['ajax'] != 'true') { $smarty->display('Settings/LayoutBlockList.tpl'); } elseif (($subMode == 'getRelatedInfoOrder' || $subMode == 'changeRelatedInfoOrder') && $_REQUEST['ajax'] == 'true') { $smarty->display('Settings/OrderRelatedList.tpl'); } else { $smarty->display('Settings/LayoutBlockEntries.tpl'); } function InStrCount($String, $Find, $CaseSensitive = false) { global $log; $i = 0; $x = 0; $substring = ''; while (strlen($String) >= $i) { unset($substring); if ($CaseSensitive) { $Find = strtolower($Find);
$numrows = $adb->num_rows($res); $version = $adb->query_result($res, 0, "version"); $smarty->assign('MODULE_VERSION', $version); $sql = "select * from vtiger_currency_info where deleted=0"; $result = $adb->pquery($sql, array()); $temprow = $adb->fetch_array($result); $cnt = 1; $currency = array(); $currencies = array(); $currency_default = ''; do { $currency_element = array(); $currency_element['name'] = $temprow["currency_name"]; $currency_element['code'] = $temprow["currency_code"]; $currency_element['symbol'] = $temprow["currency_symbol"]; $currency_element['crate'] = $temprow["conversion_rate"]; $currency_element['status'] = $temprow["currency_status"]; if ($temprow["defaultid"] != '-11') { array_push($currencies, $temprow["currency_code"]); $currency_element['default'] = 'false'; } else { $currency_element['default'] = 'true'; $currency_default = $currency_element['code']; } $currency[] = $currency_element; $cnt++; } while ($temprow = $adb->fetch_array($result)); $smarty->assign('CURRENCIES', rtrim($currency_default . "," . implode(",", $currencies), ",")); $smarty->assign('RECORD_CURRENCY', $config["defaultcurrency"]); $smarty->display(vtlib_getModuleTemplate($currentModule, 'AccountingSettings.tpl'));
$smarty->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']); $smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']); $smarty->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']); $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 // Gather the help information associated with fields $smarty->assign('FIELDHELPINFO', vtlib_getFieldHelpInfo($currentModule)); // END $picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($currentModule); $smarty->assign("PICKIST_DEPENDENCY_DATASOURCE", Zend_Json::encode($picklistDependencyDatasource)); if ($focus->mode == 'edit') { $smarty->display("salesEditView.tpl"); } else { $smarty->display("CreateView.tpl"); }
global $currentModule, $moduleList, $adb, $vtiger_current_version; $image_path = "include/images/"; $app_strings = return_application_language('en_us'); $smarty = new vtigerCRM_Smarty(); $smarty->assign("APP", $app_strings); if (isset($app_strings['LBL_CHARSET'])) { $smarty->assign("LBL_CHARSET", $app_strings['LBL_CHARSET']); } else { $smarty->assign("LBL_CHARSET", $default_charset); } $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . (isset($GLOBALS['request_string']) ? $GLOBALS['request_string'] : '')); $smarty->assign("VTIGER_VERSION", $vtiger_current_version); // We check if we have the two new logo fields > if not we create them $cnorg = $adb->getColumnNames('vtiger_organizationdetails'); if (!in_array('faviconlogo', $cnorg)) { $adb->query('ALTER TABLE `vtiger_organizationdetails` ADD `frontlogo` VARCHAR(150) NOT NULL, ADD `faviconlogo` VARCHAR(150) NOT NULL'); } $sql = "select * from vtiger_organizationdetails"; $result = $adb->pquery($sql, array()); //Handle for allowed organation logo/logoname likes UTF-8 Character $companyDetails = array(); $companyDetails['name'] = $adb->query_result($result, 0, 'organizationname'); $companyDetails['website'] = $adb->query_result($result, 0, 'website'); $companyDetails['logo'] = decode_html($adb->query_result($result, 0, 'logoname')); $smarty->assign("COMPANY_DETAILS", $companyDetails); if (isset($login_error) && $login_error != "") { $smarty->assign("LOGIN_ERROR", $login_error); } $smarty->display('Login.tpl');
$smarty->assign("ALPHABETICAL", $alphabetical); $smarty->assign("NUMBER_MODULES", $noofrows); $smarty->assign("MODULE_NAME", $module_name); $smarty->assign("SELECTED_MODULE", $select_module); $smarty->assign("MODULE_DATA", $rb_listview_header); $smarty->assign("MOD", $mod_strings); $smarty->assign("MODULE", $currentModule); $smarty->assign("CATEGORY", $category); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("APP", $app_strings); $smarty->assign("CMOD", return_module_language($current_language, $select_module)); $smarty->assign("lvEntries", $lvEntries); $smarty->assign("IS_ADMIN", $is_admin); if ($_REQUEST['mode'] != 'ajax') { $smarty->display(vtlib_getModuleTemplate($currentModule, 'RecycleBin.tpl')); } else { $smarty->display(vtlib_getModuleTemplate($currentModule, 'RecycleBinContents.tpl')); } function show_error_msg($error_type = 'permission_denied') { global $theme; if ($error_type == 'permission_denied') { echo "<link rel='stylesheet' type='text/css' href='themes/{$theme}/style.css'>"; 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;'>\n\t\n\t\t\t<table border='0' cellpadding='5' cellspacing='0' width='98%'>\n\t\t\t<tbody><tr>\n\t\t\t<td rowspan='2' width='11%'><img src='" . vtiger_imageurl('denied.gif', $theme) . "' ></td>\n\t\t\t<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='70%'><span class='genHeaderSmall'>" . getTranslatedString('LBL_PERMISSION') . "</span></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td class='small' align='right' nowrap='nowrap'>\t\t\t \t\n\t\t\t<a href='javascript:window.history.back();'>" . getTranslatedString('LBL_GO_BACK') . "</a><br>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</tbody></table> \n\t\t\t</div>"; echo "</td></tr></table>"; die; } else { if ($error_type == 'no_permitted_modules') { echo "<link rel='stylesheet' type='text/css' href='themes/{$theme}/style.css'>";
global $ogReport; global $app_list_strings, $app_strings; global $current_language; if ($module != "") { $secmodule = explode(":", $module); for ($i = 0; $i < count($secmodule); $i++) { $mod_strings = return_module_language($current_language, $secmodule[$i]); if (vtlib_isModuleActive($secmodule[$i])) { $block_listed = array(); foreach ($ogReport->module_list[$secmodule[$i]] as $key => $value) { if (isset($ogReport->sec_module_columnslist[$secmodule[$i]][$value]) && !$block_listed[$value]) { $block_listed[$value] = true; $shtml .= "<optgroup label=\"" . $app_list_strings['moduleList'][$secmodule[$i]] . " " . getTranslatedString($value) . "\" class=\"select\" style=\"border:none\">"; foreach ($ogReport->sec_module_columnslist[$secmodule[$i]][$value] as $field => $fieldlabel) { if (isset($mod_strings[$fieldlabel])) { $shtml .= "<option value=\"" . $field . "\">" . $mod_strings[$fieldlabel] . "</option>"; } else { $shtml .= "<option value=\"" . $field . "\">" . $fieldlabel . "</option>"; } } } } } } } return $shtml; } $report_column->display("ReportColumns.tpl"); ?>
$field_name = $entity_id . "_listprice"; $unit_price_array[] = '"' . CurrencyField::convertToUserFormat($unit_price, null, true) . '"'; $field_name_array[] = "'" . $field_name . "'"; $list_body .= '<td><INPUT type=checkbox NAME="selected_id" id="check_' . $entity_id . '" value= ' . $entity_id . ' onClick=\'toggleSelectAll(this.name,"selectall");updateListPriceForField("' . $field_name . '",this)\'></td>'; $list_body .= '<td>' . $adb->query_result($list_result, $entity_id_array[$entity_id], "productname") . '</td>'; if (getFieldVisibilityPermission('Products', $current_user->id, 'productcode') == '0') { $list_body .= '<td>' . $adb->query_result($list_result, $entity_id_array[$entity_id], "productcode") . '</td>'; } if (getFieldVisibilityPermission('Products', $current_user->id, 'unit_price') == '0') { $list_body .= '<td>' . CurrencyField::convertToUserFormat($unit_price, null, true) . '</td>'; } $list_body .= '<td>'; if (isPermitted("PriceBooks", "EditView", "") == 'yes') { $list_body .= '<input type="text" name="' . $field_name . '" style="visibility:hidden;" id="' . $field_name . '">'; } else { $list_body .= '<input type="text" name="' . $field_name . '" style="visibility:hidden;" readonly id="' . $field_name . '">'; } $list_body .= '</td></tr>'; } $smarty->assign("UNIT_PRICE_ARRAY", implode(",", $unit_price_array)); $smarty->assign("FIELD_NAME_ARRAY", implode(",", $field_name_array)); if ($order_by != '') { $url_string .= "&order_by=" . $order_by; } if ($sorder != '') { $url_string .= "&sorder=" . $sorder; } $smarty->assign("LISTENTITY", $list_body); $smarty->assign("CATEGORY", $parenttab); $smarty->display("AddProductsToPriceBook.tpl");
<?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/Settings/MailScanner/core/MailScannerInfo.php'; require_once 'Smarty_setup.php'; require_once 'vtlib/Vtiger/Cron.php'; global $app_strings, $mod_strings, $currentModule, $theme, $current_language; global $application_unique_key; // defined in config.inc.php $smarty = new vtigerCRM_Smarty(); $smarty->assign("MOD", return_module_language($current_language, 'Settings')); $smarty->assign("CMOD", $mod_strings); $smarty->assign("APP", $app_strings); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", "themes/{$theme}/images/"); $scanners = Vtiger_MailScannerInfo::listAll(); $smarty->assign("SCANNERS", $scanners); $smarty->assign("APP_KEY", $application_unique_key); $smarty->assign("CRON_TASK", Vtiger_Cron::getInstance('MailScanner')); $smarty->display('MailScanner/MailScannerInfo.tpl');
* Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. ********************************************************************************/ require_once 'Smarty_setup.php'; require_once "include/utils/utils.php"; require_once "modules/com_vtiger_workflow/VTWorkflowUtils.php"; global $mod_strings, $app_strings, $theme, $adb; $smarty = new vtigerCRM_Smarty(); $smarty->assign("MOD", $mod_strings); $smarty->assign("APP", $app_strings); $smarty->assign("THEME", "{$theme}"); $smarty->assign("IMAGE_PATH", "themes/{$theme}/images/"); // Operation to be restricted for non-admin users. global $current_user; if (!is_admin($current_user)) { $smarty->display(vtlib_getModuleTemplate('Vtiger', 'OperationNotPermitted.tpl')); } else { $module = vtlib_purify($_REQUEST['formodule']); $menu_array = array(); // Few more configuration $menu_array['CONFIGURATION']['location'] = 'index.php?module=ModTracker&action=BasicSettings&parenttab=Settings&formodule=ModTracker'; $menu_array['CONFIGURATION']['image_src'] = 'themes/images/audit.gif'; $menu_array['CONFIGURATION']['desc'] = getTranslatedString('LBL_CONFIGURATION_DESCRIPTION', $module); $menu_array['CONFIGURATION']['label'] = getTranslatedString('LBL_CONFIGURATION', 'Settings'); //add blanks for 3-column layout $count = count($menu_array) % 3; if ($count > 0) { for ($i = 0; $i < 3 - $count; $i++) { $menu_array[] = array(); } }
} $listview_header = getListViewHeader($focus, "SalesOrder", $url_string, $sorder, $order_by, "", $oCustomView); $smarty->assign("LISTHEADER", $listview_header); $listview_header_search = getSearchListHeaderValues($focus, "SalesOrder", $url_string, $sorder, $order_by, "", $oCustomView); $smarty->assign("SEARCHLISTHEADER", $listview_header_search); $listview_entries = getListViewEntries($focus, "SalesOrder", $list_result, $navigation_array, '', '&return_module=SalesOrder&return_action=index', 'EditView', 'Delete', $oCustomView); $smarty->assign("LISTENTITY", $listview_entries); $smarty->assign("SELECT_SCRIPT", $view_script); //Added to select Multiple records in multiple pages $smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs'])); $smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs'])); $smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries), ";")); $navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, "SalesOrder", 'index', $viewid); $alphabetical = AlphabeticalSearch($currentModule, 'index', 'subject', 'true', 'basic', "", "", "", "", $viewid); $fieldnames = getAdvSearchfields($module); $criteria = getcriteria_options(); $smarty->assign("CRITERIA", $criteria); $smarty->assign("FIELDNAMES", $fieldnames); $smarty->assign("ALPHABETICAL", $alphabetical); $smarty->assign("NAVIGATION", $navigationOutput); $smarty->assign("CUSTOMVIEW_OPTION", $customviewcombo_html); $smarty->assign("VIEWID", $viewid); $smarty->assign("BUTTONS", $other_text); $check_button = Button_Check($module); $smarty->assign("CHECK", $check_button); $_SESSION[$currentModule . '_listquery'] = $list_query; if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') { $smarty->display("ListViewEntries.tpl"); } else { $smarty->display("ListView.tpl"); }
require_once 'modules/Webmails/MailBox.php'; $smarty->assign("RET_ERROR", $ret_error); if ($ret_parentid != '') { $smarty->assign("IDLISTS", $ret_parentid); } if ($ret_toadd != '') { $smarty->assign("TO_MAIL", $ret_toadd); } $ret_toadd = ''; if ($ret_subject != '') { $smarty->assign("SUBJECT", $ret_subject); } if ($ret_ccaddress != '') { $smarty->assign("CC_MAIL", $ret_ccaddress); } if ($ret_bccaddress != '') { $smarty->assign("BCC_MAIL", $ret_bccaddress); } if ($ret_description != '') { $smarty->assign("DESCRIPTION", $ret_description); } $temp_obj = new MailBox($mailbox); $temp_id = $temp_obj->boxinfo['mail_id']; if ($temp_id != '') { $smarty->assign('from_add', $temp_id); } } $check_button = Button_Check($module); $smarty->assign("CHECK", $check_button); $smarty->display("ComposeEmail.tpl");
if ($_REQUEST['order_by'] != '') { $order_by = $adb->sql_escape_string($_REQUEST['order_by']); } elseif ($_SESSION['user_orderby'] != '') { $order_by = $adb->sql_escape_string($_SESSION['user_orderby']); } else { $order_by = 'last_name'; } $_SESSION['user_orderby'] = $orderby; $list_query .= ' ORDER BY ' . $order_by . ' ' . $sorder; $list_result = $adb->query($list_query); //Retreive the Navigation array $navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); $navigationOutput = getTableHeaderNavigation($navigation_array, $url_string, "Administration", "index", ''); $smarty->assign("MOD", return_module_language($current_language, 'Settings')); $smarty->assign("CMOD", $mod_strings); $smarty->assign("APP", $app_strings); $smarty->assign("CURRENT_USERID", $current_user->id); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("CATEGORY", $category); $smarty->assign("LIST_HEADER", getListViewHeader($focus, "Users", $url_string, $sorder, $order_by, "", "")); $smarty->assign("LIST_ENTRIES", getListViewEntries($focus, "Users", $list_result, $navigation_array, "", "", "EditView", "Delete", "")); $smarty->assign("USER_COUNT", $no_of_users); $smarty->assign("RECORD_COUNTS", $record_string); $smarty->assign("NAVIGATION", $navigationOutput); $smarty->assign("USER_IMAGES", getUserImageNames()); if ($_REQUEST['ajax'] != '') { $smarty->display("UserListViewContents.tpl"); } else { $smarty->display("UserListView.tpl"); }
$url_string .= '&select=enable'; } if (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != '') { $url_string .= '&return_module=' . vtlib_purify($_REQUEST['return_module']); } if ($popuptype == 'set_return_emails') { $tabid = getTabid($currentModule); $mail_arr = getMailFields($tabid); if (!empty($mail_arr)) { $tablename = str_replace("vtiger_", "", $mail_arr['tablename']); $fieldname = $mail_arr['fieldname']; $fieldlabel = $mail_arr['fieldlabel']; $focus->search_fields[$fieldlabel] = array($tablename => $fieldname); $focus->search_fields_name[$fieldlabel] = $fieldname; } } $listview_header = getSearchListViewHeader($focus, "{$currentModule}", $url_string, $sorder, $order_by); $smarty->assign("LISTHEADER", $listview_header); $smarty->assign("HEADERCOUNT", count($listview_header) + 1); $listview_entries = getSearchListViewEntries($focus, "{$currentModule}", $list_result, $navigation_array, $form); $smarty->assign("LISTENTITY", $listview_entries); $navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, $currentModule, "Popup"); $smarty->assign("NAVIGATION", $navigationOutput); $smarty->assign("RECORD_COUNTS", $record_string); $smarty->assign("POPUPTYPE", $popuptype); $smarty->assign("PARENT_MODULE", vtlib_purify($_REQUEST['parent_module'])); if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') { $smarty->display("PopupContents.tpl"); } else { $smarty->display("Popup.tpl"); }
$smarty->assign("MODULE", $fld_module); if ($fld_module == 'Calendar') { $smarty->assign("CFENTRIES", getCFListEntries($fld_module)); } else { $smarty->assign("CFENTRIES", getCFLeadMapping($fld_module)); } if (isset($_REQUEST["duplicate"]) && $_REQUEST["duplicate"] == "yes") { $error = getTranslatedString('ERR_CUSTOM_FIELD_WITH_NAME', 'Settings') . vtlib_purify($_REQUEST["fldlabel"]) . ' ' . getTranslatedString('ERR_ALREADY_EXISTS', 'Settings') . ' ' . getTranslatedString('ERR_SPECIFY_DIFFERENT_LABEL', 'Settings'); $smarty->assign("DUPLICATE_ERROR", $error); } if ($_REQUEST['mode'] != '') { $mode = vtlib_purify($_REQUEST['mode']); } $smarty->assign("MODE", $mode); if ($_REQUEST['ajax'] != 'true') { $smarty->display(vtlib_getModuleTemplate('Vtiger', 'CustomFieldList.tpl')); } else { $smarty->display(vtlib_getModuleTemplate('Vtiger', 'CustomFieldEntries.tpl')); } /** * Function to get customfield entries * @param string $module - Module name * return array $cflist - customfield entries */ function getCFListEntries($module) { global $adb, $app_strings, $theme, $smarty, $log; $tabid = getTabid($module); if ($module == 'Calendar') { $tabid = array(9, 16); }
require_once 'include/utils/utils.php'; require_once "modules/Calendar/Calendar.php"; require_once 'include/logging.php'; $cal_log =& LoggerManager::getLogger('calendar'); $cal_log->debug("In CalendarAjax file"); $mysel = vtlib_purify($_REQUEST['view']); if ($_REQUEST['file'] == 'OpenListView') { require_once 'Smarty_setup.php'; $smarty = new vtigerCRM_Smarty(); require_once "modules/Calendar/OpenListView.php"; $smarty->assign("APP", $app_strings); $smarty->assign("IMAGE_PATH", $image_path); if ($_REQUEST['mode'] == '0') { $activities[0] = getPendingActivities(0); $smarty->assign("ACTIVITIES", $activities); $smarty->display("upcomingActivities.tpl"); } else { if ($_REQUEST['mode'] == '1') { $activities[1] = getPendingActivities(1); $smarty->assign("ACTIVITIES", $activities); $smarty->display("pendingActivities.tpl"); } } die; } $calendar_arr = array(); $calendar_arr['IMAGE_PATH'] = $image_path; $date_data = array(); if (isset($_REQUEST['day'])) { $date_data['day'] = $_REQUEST['day']; }
$sql = "INSERT INTO its4you_calendar4you_profilespermissions (profileid, operation, permissions) VALUES(?, ?, ?)"; $adb->pquery($sql, $params); } } echo '<meta http-equiv="refresh" content="0; url=index.php?module=Settings&action=ModuleManager&module_settings=true&formodule=Calendar4You&parenttab=Settings">'; } else { $permissionNames = array(); foreach ($permissions as $profileid => $subArr) { $permissionNames[$profileid] = array(); $profileName = getProfileName($profileid); foreach ($subArr as $actionid => $perm) { $permStr = $perm == "0" ? 'checked="checked"' : ""; switch ($actionid) { case $actionEDIT: $permissionNames[$profileid][$profileName]["EDIT"]["name"] = 'priv_chk_' . $profileid . '_' . $actionEDIT; $permissionNames[$profileid][$profileName]["EDIT"]["checked"] = $permStr; break; case $actionDETAIL: $permissionNames[$profileid][$profileName]["DETAIL"]["name"] = 'priv_chk_' . $profileid . '_' . $actionDETAIL; $permissionNames[$profileid][$profileName]["DETAIL"]["checked"] = $permStr; break; case $actionDELETE: $permissionNames[$profileid][$profileName]["DELETE"]["name"] = 'priv_chk_' . $profileid . '_' . $actionDELETE; $permissionNames[$profileid][$profileName]["DELETE"]["checked"] = $permStr; break; } } } $smarty->assign("PERMISSIONS", $permissionNames); $smarty->display(vtlib_getModuleTemplate($currentModule, 'ProfilesPrivilegies.tpl')); }
$smarty->assign("PARENT_PROFILE", vtlib_purify($_REQUEST['parent_profile'])); } if (isset($_REQUEST['radio_button']) && $_REQUEST['radio_button'] != '') { $smarty->assign("RADIO_BUTTON", vtlib_purify($_REQUEST['radio_button'])); } if (isset($_REQUEST['profile_name']) && $_REQUEST['profile_name'] != '') { $smarty->assign("PROFILE_NAME", vtlib_purify($_REQUEST['profile_name'])); } if (isset($_REQUEST['profile_description']) && $_REQUEST['profile_description'] != '') { $smarty->assign("PROFILE_DESCRIPTION", vtlib_purify($_REQUEST['profile_description'])); } if (isset($_REQUEST['mode']) && $_REQUEST['mode'] != '') { $smarty->assign("MODE", vtlib_purify($_REQUEST['mode'])); } $smarty->assign("MOD", return_module_language($current_language, 'Settings')); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", $image_path); $smarty->assign("APP", $app_strings); $smarty->assign("CMOD", $mod_strings); $sql = "select * from vtiger_profile"; $result = $adb->pquery($sql, array()); $profilelist = array(); $temprow = $adb->fetch_array($result); do { $name = $temprow["profilename"]; $profileid = $temprow["profileid"]; $profilelist[] = array($name, $profileid); } while ($temprow = $adb->fetch_array($result)); $smarty->assign("PROFILE_LISTS", $profilelist); $smarty->display("CreateProfile.tpl");
* The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. *********************************************************************************/ require_once 'Smarty_setup.php'; global $mod_strings, $app_strings, $theme, $adb; $smarty = new vtigerCRM_Smarty(); $module = vtlib_purify($_REQUEST['formodule']); $menu_array = array(); $menu_array['CustomFields']['location'] = 'index.php?module=Settings&action=CustomFieldList&parenttab=Settings&formodule=' . $module; $menu_array['CustomFields']['image_src'] = vtiger_imageurl('orgshar.gif', $theme); $menu_array['CustomFields']['desc'] = getTranslatedString('LBL_USER_CUSTOMFIELDS_DESCRIPTION', 'Users'); $menu_array['CustomFields']['label'] = getTranslatedString('LBL_USER_CUSTOMFIELDS', 'Users'); //add blanks for 3-column layout $count = count($menu_array) % 3; if ($count > 0) { for ($i = 0; $i < 3 - $count; $i++) { $menu_array[] = array(); } } $smarty->assign("MOD", $mod_strings); $smarty->assign("APP", $app_strings); $smarty->assign("IMAGE_PATH", "themes/{$theme}/images/"); $smarty->assign('MODULE', $module); $smarty->assign('MODULE_LBL', getTranslatedString($module)); $smarty->assign('MENU_ARRAY', $menu_array); $smarty->display(vtlib_getModuleTemplate('Vtiger', 'Settings.tpl'));
$disp_view = getView($focus->mode); $smarty->assign("IMAGENAME", $focus->imagename); $smarty->assign("BLOCKS", getBlocks($currentModule, $disp_view, $mode, $focus->column_fields)); $smarty->assign("MODULE", 'Settings'); $smarty->assign("MODE", $focus->mode); $smarty->assign("HOUR_FORMAT", $focus->hour_format); $smarty->assign("START_HOUR", $focus->start_hour); if ($_REQUEST['Edit'] == ' Edit ') { $smarty->assign("READONLY", "readonly"); $smarty->assign("USERNAME_READONLY", "readonly"); } if (isset($_REQUEST['record']) && $_REQUEST['isDuplicate'] != 'true') { $smarty->assign("USERNAME_READONLY", "readonly"); } $HomeValues = $focus->getHomeStuffOrder($focus->id); $smarty->assign("TAGCLOUDVIEW", $HomeValues['Tag Cloud']); $smarty->assign("SHOWTAGAS", $HomeValues['showtagas']); unset($HomeValues['Tag Cloud']); unset($HomeValues['showtagas']); $smarty->assign("HOMEORDER", $HomeValues); $smarty->assign("tagshow_options", array("flat" => $mod_strings['flat'], "hring" => $mod_strings['hring'], "vring" => $mod_strings['vring'], "hcylinder" => $mod_strings['hcylinder'], "vcylinder" => $mod_strings['vcylinder'])); $smarty->assign("DUPLICATE", vtlib_purify($_REQUEST['isDuplicate'])); $smarty->assign("USER_MODE", $mode); $smarty->assign('PARENTTAB', getParentTab()); $_SESSION['Users_FORM_TOKEN'] = rand(5, 2000) * rand(2, 7); $smarty->assign('FORM_TOKEN', $_SESSION['Users_FORM_TOKEN']); // Gather the help information associated with fields $smarty->assign('FIELDHELPINFO', vtlib_getFieldHelpInfo($currentModule)); // END $smarty->display('UserEditView.tpl');