require_once "VTWorkflowUtils.php"; 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"); } vtDisplayTaskList($adb, $_SERVER["REQUEST_URI"], $current_language);
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"); } $returl = 'index.php?' . $_SERVER['QUERY_STRING']; vtDisplayTaskList($adb, $returl, $current_language);