Esempio n. 1
0
$reportModules = array();
foreach ($ACLAllowedModules as $key => $module) {
    $reportModules[$key] = isset($app_list_strings['moduleList'][$key]) ? $app_list_strings['moduleList'][$key] : $key;
}
asort($reportModules);
if (!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only']) {
    // handle ajax requests for search forms only
    switch ($_REQUEST['search_form_view']) {
        case 'basic_search':
            $searchForm->setup();
            $searchForm->xtpl->assign('MODULES', get_select_options_with_id($reportModules, empty($_REQUEST['report_module']) ? '' : $_REQUEST['report_module']));
            $searchForm->xtpl->assign('USER_FILTER', get_select_options_with_id(get_user_array(FALSE), empty($_REQUEST['assigned_user_id']) ? '' : $_REQUEST['assigned_user_id']));
            $searchForm->xtpl->assign('TEAM_FILTER', get_select_options_with_id(get_team_array(FALSE), empty($_REQUEST['team_id']) ? '' : $_REQUEST['team_id']));
            $searchForm->xtpl->assign('REPORT_TYPES', get_select_options_with_id($app_list_strings['dom_report_types'], empty($_REQUEST['report_type']) ? '' : $_REQUEST['report_type']));
            $searchForm->xtpl->assign('FAVORITE', isset($_REQUEST['favorite']) ? 'checked' : '');
            $searchForm->displayBasic(false);
            break;
        case 'advanced_search':
            $searchForm->setup();
            $searchForm->xtpl->assign('MODULES', get_select_options_with_id($reportModules, empty($_REQUEST['report_module']) ? '' : $_REQUEST['report_module']));
            $searchForm->xtpl->assign('USER_FILTER', get_select_options_with_id(get_user_array(FALSE), empty($_REQUEST['assigned_user_id']) ? '' : $_REQUEST['assigned_user_id']));
            $searchForm->xtpl->assign('TEAM_FILTER', get_select_options_with_id(get_team_array(FALSE), empty($_REQUEST['team_id']) ? '' : $_REQUEST['team_id']));
            $searchForm->xtpl->assign('REPORT_TYPES', get_select_options_with_id($app_list_strings['dom_report_types'], empty($_REQUEST['report_type']) ? '' : $_REQUEST['report_type']));
            $searchForm->xtpl->assign('FAVORITE', isset($_REQUEST['favorite']) ? 'checked' : '');
            $searchForm->displayAdvanced(false, false, $listViewDefsNewArray, $lv);
            echo "<script>if(typeof(loadSSL_Scripts)=='function'){\n\t\tloadSSL_Scripts();\n\t}</script>";
            break;
        case 'saved_views':
            echo $searchForm->displaySavedViews($listViewDefsNewArray, $lv, false);
            break;
    }