$context->tproject_id = $args->tproject_id; $context->tplan_id = $args->tplan_id; $tplan_mgr = new testplan($db); $dmy = $tplan_mgr->get_by_id($context->tplan_id); $gui->buildInfoSet = $tplan_mgr->get_builds($gui->tplan_id); $report_plans = $tplan_mgr->report_get_plans($args->tproject_id); $report_suites = $tplan_mgr->report_get_suites($args->tproject_id); $report_builds = $tplan_mgr->report_get_builds(); $report_build_total = count($report_builds); $report_devices = $tplan_mgr->report_get_devices($args->tproject_id); $report_device_total = count($report_devices); unset($tplan_mgr); $context->apikey = $dmy['api_key']; // $context->apikey = $_SESSION['currentUser']->userApiKey; $context->imgSet = $smarty->getImages(); $gui->menuItems = $reports_mgr->get_list_reports($context, $gui->btsEnabled, $args->optReqs, $tlCfg->reports_formats[$args->format]); } $smarty->assign('gui', $gui); $smarty->assign('report_plans', $report_plans); $smarty->assign('report_suites', $report_suites); $smarty->assign('report_builds', json_encode($report_builds)); $smarty->assign('report_build_total', $report_build_total); $smarty->assign('report_devices', json_encode($report_devices)); $smarty->assign('report_device_total', $report_device_total); $smarty->assign('arrReportTypes', localize_array($tlCfg->reports_formats)); $smarty->assign('selectedReportType', $args->format); $smarty->display($templateCfg->template_dir . $templateCfg->default_template); /** * * */