📄 advancedfiltermodehtml.jsp
字号:
<% TreeMap endentityprofileids = ejbcawebbean.getInformationMemory().getViewAuthorizedEndEntityProfileNames(); TreeMap certificateprofileids = ejbcawebbean.getInformationMemory().getAuthorizedEndEntityCertificateProfileNames(); TreeMap caids = ejbcawebbean.getInformationMemory().getCANames(); String[] connectorreferences = {"AND","OR","ANDNOT","ORNOT"}; String[] monthreferences = {"MONTHJAN","MONTHFEB","MONTHMAR","MONTHAPR","MONTHMAY","MONTHJUN","MONTHJUL","MONTHAUG","MONTHSEP" ,"MONTHOCT","MONTHNOV","MONTHDEC"}; int[] matchwithfields = {UserMatch.MATCH_WITH_USERNAME, UserMatch.MATCH_WITH_CA, UserMatch.MATCH_WITH_UID, UserMatch.MATCH_WITH_COMMONNAME, UserMatch.MATCH_WITH_DNSERIALNUMBER, UserMatch.MATCH_WITH_GIVENNAME,UserMatch.MATCH_WITH_INITIALS, UserMatch.MATCH_WITH_SURNAME, UserMatch.MATCH_WITH_TITLE, UserMatch.MATCH_WITH_ORGANIZATIONUNIT, UserMatch.MATCH_WITH_ORGANIZATION , UserMatch.MATCH_WITH_LOCALE, UserMatch.MATCH_WITH_STATE, UserMatch.MATCH_WITH_DOMAINCOMPONENT, UserMatch.MATCH_WITH_COUNTRY, UserMatch.MATCH_WITH_EMAIL, UserMatch.MATCH_WITH_STATUS, UserMatch.MATCH_WITH_ENDENTITYPROFILE, UserMatch.MATCH_WITH_CERTIFICATEPROFILE}; String[] matchwithtexts = {"MATCHUSERNAME", "MATCHCA", "MATCHUID", "MATCHCOMMONNAME", "MATCHDNSERIALNUMBER", "MATCHGIVENNAME", "MATCHINITIALS", "MATCHSURNAME", "MATCHTITLE", "MATCHORGANIZATIONUNIT", "MATCHORGANIZATION", "MATCHLOCALE", "MATCHSTATE", "MATCHDOMAINCOMPONENT", "MATCHCOUNTRY", "MATCHEMAIL", "MATCHSTATUS", "MATCHENDENTITYPROFILE", "MATCHCERTIFICATEPROFILE"}; Calendar calendar = Calendar.getInstance(); int dayofmonth = calendar.get(Calendar.DAY_OF_MONTH); int month = calendar.get(Calendar.MONTH); int year = calendar.get(Calendar.YEAR); int hour = calendar.get(Calendar.HOUR_OF_DAY); hour++; if(hour >= 24) hour =0;%> <script language=javascript><!-- var ID = 0; var NAME = 1; var profilenames = new Array(<%= endentityprofileids.keySet().size() %>); <% Iterator iter = endentityprofileids.keySet().iterator(); int index = 0; while(iter.hasNext()){ String next = (String) iter.next(); %> profilenames[<%=index %>] = new Array(2); profilenames[<%=index %>][ID] = <%= ((Integer) endentityprofileids.get(next)).intValue() %>; profilenames[<%=index %>][NAME] = "<%= next %>"; <% index++; } %> var certificateprofilenames = new Array(<%= certificateprofileids.keySet().size() %>); <% iter = certificateprofileids.keySet().iterator(); index = 0; while(iter.hasNext()){ String next = (String) iter.next(); %> certificateprofilenames[<%=index %>] = new Array(2); certificateprofilenames[<%=index %>][ID] = <%= ((Integer) certificateprofileids.get(next)).intValue() %>; certificateprofilenames[<%=index %>][NAME] = "<%= next %>"; <% index++; } %> var cas = new Array(<%= caids.keySet().size() %>); <% iter = caids.keySet().iterator(); index = 0; while(iter.hasNext()){ String next = (String) iter.next(); %> cas[<%=index %>] = new Array(2); cas[<%=index %>][ID] = <%= ((Integer) caids.get(next)).intValue() %>; cas[<%=index %>][NAME] = "<%= next %>"; <% index++; } %> var matchtypefields = new Array(2) matchtypefields[ID] = new Array(2); matchtypefields[ID][0]= <%= BasicMatch.MATCH_TYPE_EQUALS %>; matchtypefields[ID][1] = <%= BasicMatch.MATCH_TYPE_BEGINSWITH %>; matchtypefields[NAME] = new Array(2); matchtypefields[NAME][0] = "<%= ejbcawebbean.getText("EQUALS") %>"; matchtypefields[NAME][1] = "<%= ejbcawebbean.getText("BEGINSWITH") %>"; statusfields = new Array(2); statusfields[ID] = new Array(<%=availablestatuses.length%>); statusfields[NAME] = new Array(<%=availablestatuses.length%>); <% for(int i=0; i < availablestatuses.length; i++){ %> statusfields[ID][<%=i%>] = <%= availablestatuses[i] %>; statusfields[NAME][<%=i%>] ="<%= ejbcawebbean.getText(availablestatustexts[i]) %>"; <% } %>function changematchfields(row){ // check value on matchwith matchwith = eval("document.form.selectmatchwithrow" + row); matchtype = eval("document.form.selectmatchtyperow" + row); textmatchvalue = eval("document.form.textfieldmatchvaluerow" + row); menumatchvalue = eval("document.form.selectmatchvaluerow" + row); var index = matchwith.selectedIndex; var numofvalues; matchwithvalue = matchwith[index].value; var i; // if dn field remove equals and a textfield if(matchwithvalue >= 100){ var numoftypes = matchtype.length; for( i=numoftypes-1; i >= 0; i-- ){ matchtype.options[i]=null; } matchtype.options[0]= new Option(matchtypefields[NAME][1],matchtypefields[ID][1]); numofvalues = menumatchvalue.length; for(i=numofvalues-1; i >= 0; i--){ menumatchvalue.options[i]=null; } menumatchvalue.disabled = true; textmatchvalue.disabled = false; textmatchvalue.size=40; } // if profile remove beginswith and menu else{ if(matchwithvalue == <%= UserMatch.MATCH_WITH_ENDENTITYPROFILE %> ){ menumatchvalue.disabled = false; textmatchvalue.disabled = true; textmatchvalue.value= ""; textmatchvalue.size=1; var numoftypes = matchtype.length; for( i=numoftypes-1; i >= 0; i-- ){ matchtype.options[i]=null; } matchtype.options[0]= new Option(matchtypefields[NAME][0],matchtypefields[ID][0]); numofvalues = menumatchvalue.length; for(i=numofvalues-1; i >= 0; i--){ menumatchvalue.options[i]=null; } for( i = 0; i < profilenames.length; i++){ menumatchvalue.options[i]= new Option(profilenames[i][NAME],profilenames[i][ID]); } } else{ if(matchwithvalue == <%= UserMatch.MATCH_WITH_CERTIFICATEPROFILE %> ){ menumatchvalue.disabled = false; textmatchvalue.disabled = true; textmatchvalue.value= ""; textmatchvalue.size=1; var numoftypes = matchtype.length; for( i=numoftypes-1; i >= 0; i-- ){ matchtype.options[i]=null; } matchtype.options[0]= new Option(matchtypefields[NAME][0],matchtypefields[ID][0]); numofvalues = menumatchvalue.length; for(i=numofvalues-1; i >= 0; i--){ menumatchvalue.options[i]=null; } for( i = 0; i < certificateprofilenames.length; i++){ menumatchvalue.options[i]= new Option(certificateprofilenames[i][NAME],certificateprofilenames[i][ID]); } } else{ if(matchwithvalue == <%= UserMatch.MATCH_WITH_CA %> ){ menumatchvalue.disabled = false; textmatchvalue.disabled = true; textmatchvalue.value= ""; textmatchvalue.size=1; var numoftypes = matchtype.length; for( i=numoftypes-1; i >= 0; i-- ){ matchtype.options[i]=null; } matchtype.options[0]= new Option(matchtypefields[NAME][0],matchtypefields[ID][0]); numofvalues = menumatchvalue.length; for(i=numofvalues-1; i >= 0; i--){ menumatchvalue.options[i]=null; } for( i = 0; i < cas.length; i++){ menumatchvalue.options[i]= new Option(cas[i][NAME],cas[i][ID]); } } else{ // if status remove beginswith and menu if(matchwithvalue == <%= UserMatch.MATCH_WITH_STATUS %> ){ menumatchvalue.disabled = false; textmatchvalue.disabled = true; textmatchvalue.value= ""; textmatchvalue.size=1; numoftypes = matchtype.length; for( i=numoftypes-1; i >= 0; i-- ){ matchtype.options[i]=null; } matchtype.options[0]= new Option(matchtypefields[NAME][0],matchtypefields[ID][0]); numofvalues = menumatchvalue.length; for( i=numofvalues-1; i >= 0; i--){ menumatchvalue.options[i]=null; } for( i = 0; i < statusfields[ID].length ; i++){ menumatchvalue.options[i]= new Option(statusfields[NAME][i],statusfields[ID][i]); } } // else equals and beginswith and textfield. else{ var numoftypes = matchtype.length; for(i=numoftypes-1; i >= 0; i-- ){ matchtype.options[i]=null; } matchtype.options[0]= new Option(matchtypefields[NAME][0],matchtypefields[ID][0]); matchtype.options[1]= new Option(matchtypefields[NAME][1],matchtypefields[ID][1]); numofvalues = menumatchvalue.length; for(i=numofvalues-1; i >= 0; i--){ menumatchvalue.options[i]=null; } menumatchvalue.disabled = true; textmatchvalue.disabled = false; textmatchvalue.size=40; } } } } }} --></script><table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td width="2%"> </td> <td width="5%" align="left"> </td> <td width="93%" align="left"> <% int tempval = -1; if(oldmatchwithrow1!= null) tempval= Integer.parseInt(oldmatchwithrow1); %> <select name="<%=SELECT_MATCHWITH_ROW1 %>" onchange='changematchfields(1)' > <option value='<%= VALUE_NONE %>'><%= ejbcawebbean.getText("NONE") %> </option> <% for(int i =0; i < matchwithfields.length;i++){ %> <option <% if(tempval == matchwithfields[i]) out.write(" selected "); %> value='<%= matchwithfields[i] %>'><%= ejbcawebbean.getText(matchwithtexts[i]) %> </option> <% } %> </select> <% tempval = -1; if(oldmatchtyperow1!= null) tempval= Integer.parseInt(oldmatchtyperow1); %> <select name="<%=SELECT_MATCHTYPE_ROW1 %>"> <% if(oldmatchwithrow1 != null){ if(Integer.parseInt(oldmatchwithrow1) < 100){ %> <option <% if(tempval == BasicMatch.MATCH_TYPE_EQUALS){ out.write(" selected "); } %> value='<%= Integer.toString(BasicMatch.MATCH_TYPE_EQUALS) %>'><%= ejbcawebbean.getText("EQUALS") %> </option> <% } }else{ %> <option <% if(tempval == BasicMatch.MATCH_TYPE_EQUALS){ out.write(" selected "); } %> value='<%= Integer.toString(BasicMatch.MATCH_TYPE_EQUALS) %>'><%= ejbcawebbean.getText("EQUALS") %> </option> <% }%> <% if(oldmatchwithrow1 != null){ if( Integer.parseInt(oldmatchwithrow1) != UserMatch.MATCH_WITH_STATUS && Integer.parseInt(oldmatchwithrow1) != UserMatch.MATCH_WITH_ENDENTITYPROFILE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -