%! /********************************************************************** ** ** SAP AG Walldorf ** (C) Copyright SAP AG 1999-2008 ** ***********************************************************************/ #include "publicincl/tools.inc" struct wdisp_url_type { string prefix; string virt_host; string logon_group; string stack; int flags; }; %> <% int i, nr, url_count, dir, max; string browser, sstr, systemID, systemID_show; struct wdisp_url_type wdisp_url_map[]; struct icm_sort_type sort_tab[]; const string ssort = "../public/images/sort.gif"; const string sasc = "../public/images/sortasc.gif"; const string sdesc = "../public/images/sortdesc.gif"; sort_tab[0].header = "URL Prefix"; sort_tab[0].tool = "Sort by URL prefix"; sort_tab[0].ffield = "prefix"; sort_tab[1].header = "Logon Group"; sort_tab[1].tool = "Sort by Logon Group"; sort_tab[1].ffield = "logon_group"; sort_tab[2].header = "Virtual Host"; sort_tab[2].tool = "Sort by virtual host"; sort_tab[2].ffield = "virt_host"; sort_tab[3].header = "Stack"; sort_tab[3].tool = "Sort by Application Server Stack"; sort_tab[3].ffield = "stack"; max = arraylen(sort_tab); for (i=0; i < max; i++){ sort_tab[i].url = ssort; sort_tab[i].dir = 0; } browser = __icm_get_browser_type(); systemID = htmlenc(__icm_get_form_field ("systemID")); if (systemID != "000") { systemID_show = " (" + systemID + ")"; } url_count = __wdisp_get_url_map (wdisp_url_map, systemID); dir = __icm_get_form_field ("dir"); sstr = __icm_get_form_field ("sstr"); if (sstr != "") sort (wdisp_url_map, dir, sstr); for (i=0; i < max; i++){ if (sstr == sort_tab[i].ffield){ if (dir == 1) { sort_tab[i].url = sdesc; sort_tab[i].dir = -1; } else if (dir == -1) { sort_tab[i].url = sasc; sort_tab[i].dir = 1; } else sort_tab[i].dir = 1; } else sort_tab[i].dir = 1; } %>