コード例 #1
0
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", 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->display("{$module->name}/ListWorkflows.tpl");
}
コード例 #2
0
    $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'));
}
$modules = vtGetModules($adb);
if (vtlib_isModuleActive('FieldFormulas') && in_array(getTranslatedString($_REQUEST['formodule']), $modules)) {
    vtEditExpressions($adb, $app_strings, $current_language, $theme, $_REQUEST['formodule']);
} else {
    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: 80%; position: relative; z-index: 10000000;'>\n\n\t<table border='0' cellpadding='5' cellspacing='0' width='98%'>\n\t<tbody><tr>\n\t<td rowspan='2' width='11%'><img src='" . vtiger_imageurl('denied.gif', $theme) . "' ></td>\n\t<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='70%'><span class='genHeaderSmall'>" . $app_strings['LBL_PERMISSION'] . " </span></td>\n\t</tr>\n\t<tr>\n\t<td class='small' align='right' nowrap='nowrap'>\n\t<a href='javascript:window.history.back();'>{$app_strings['LBL_BACK']}</a><br></td>\n\t</tr>\n\t</tbody></table>\n\t</div>";
    echo "</td></tr></table>";
    die;
}