%! /********************************************************************** ** ** SAP AG Walldorf ** (C) Copyright SAP AG 1999-2010 ** ***********************************************************************/ #include "publicincl/tools.inc" struct wdisp_url_type { int no; string prefix; string virt_host; string logon_group; string perm; int flags; }; %> <% int i, nr, url_count, dir, max; string browser,perm,prefix,sstr; 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 = "Index"; sort_tab[0].tool = "Sort by execution order"; sort_tab[0].ffield = "no"; sort_tab[1].header = "URL Prefix"; sort_tab[1].tool = "Sort by URL prefix"; sort_tab[1].ffield = "prefix"; sort_tab[2].header = "Permissions"; sort_tab[2].tool = "Sort by permissions"; sort_tab[2].ffield = "perm"; 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(); url_count = __wdisp_get_perm_map (wdisp_url_map); for (nr = 0; nr < url_count; nr++) { wdisp_url_map[nr].no = nr; if ((wdisp_url_map[nr].flags & 3) == 1) wdisp_url_map[nr].perm = "Permit"; if ((wdisp_url_map[nr].flags & 3) == 2) wdisp_url_map[nr].perm = "Deny"; if ((wdisp_url_map[nr].flags & 3) == 3) wdisp_url_map[nr].perm = "Secure"; } dir = __icm_get_form_field ("dir"); sstr = __icm_get_form_field ("sstr"); if (sstr != "") sort (wdisp_url_map, dir, sstr); max = arraylen(sort_tab); 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; } %>