<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <%@page contentType="text/html; charset=UTF-8"%> <%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*"%> <%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%> <%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*" %> <jsp:useBean id="CO022_2" class="com.csc.library.system.Task" scope="page" /> <jsp:useBean id="CO022" class="com.csc.library.system.Task" scope="page" /> <% CO022_2.setChannel(request, response); CO022.setChannel(request, response); UIManager screen = (UIManager) CO022_2.process("SingleEntry","CO022_2"); CheckNull ck = new CheckNull(); HelpEntry screen1 = (HelpEntry) CO022.process("HelpEntry", "CO022"); //String fixcon=""; /*if((request.getParameter("__fixCon")!=null)&&(request.getParameter("__fixCon").length()>0)){ fixcon=request.getParameter("__fixCon")+"and profiletype ='3'"; screen1.inq.setFilter(fixcon); }else { screen1.inq.setFilter("profiletype ='3' and companyid='"+screen.getUProfile().get("companyid")+"'"); }*/ /*String childFilter=""; if((request.getParameter("__childFilter")!=null)&&(request.getParameter("__childFilter").length()>0)){ childFilter=request.getParameter("__childFilter"); screen1.inq.setFilter(childFilter); } */ screen1.inq.setAllRequiredFound(true); if((ck.chkNullString(request.getParameter("__cmd")).equals("search"))){ screen1.process(); } %> <html> <head> <title><%=screen1.getInquiry().getCurrentDbRecord().getDescription()%></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="../CSS/TISCO.css" rel="stylesheet" type="text/css"> <script language="JavaScript" src="../JS/SCREEN.js"></script> <script language='javascript' src="../JS/DATEINPUT.js"></script> <script src="../JS/VIEWCALENDAR.js"></script> <script language="javascript">setLang('<%=screen.getUProfile().get("lang")%>');</script> <script language='javascript' src='./JS/SWAPLANG.js'></script> <script language="JavaScript" type="text/JavaScript"> <!-- <!-- function goPages(profileid,pages){ with(document.cscform){ //__help.value="__profileid#"+profileid+";__companyid#"+__companyid.value; /*action=pages+".jsp"; target="_blank"; submit();*/ window.open(pages+".jsp?__profileidsearch="+profileid+"&__cmd=search","","width=700,height=600"); } } function addButton(pages){ with(document.cscform){ //CO022_1.jsp?clean=clean window.open(pages+".jsp?clean=clean","","width=700,height=600,toolbar=no,status=yes,scrollbars=yes,resizable=yes"); } } function checkChk(){ x=document.getElementsByName("same"); tem=""; for(i=0;i<x.length;i++){ if(x[i].checked) tem=tem+","+x[i].value; } document.cscform.keyDelGrp.value=tem; //alert(document.cscform.keyDelGrp.value); } function GoSave() { with(document.cscform) { checkChk(); confirmSave(); } } function GoUpdate() { with(document.cscform) { if(chk_Time()&&chk_Email()) { update(); } } } function GoDelete(){ edelete(); } function GoSearch(){ search(); } function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } function chkDateTime1(valueSearch){ var tmpval=""; with(document.cscform){ var valueSearch1=valueSearch.split("-"); if(valueSearch1.length==3){ if(valueSearch1[1].length==1){ valueSearch1[1]="0"+valueSearch1[1]; } if(valueSearch1[0].length==1){ valueSearch1[0]="0"+valueSearch1[0]; } valueSearch1[2]=parseInt(valueSearch1[2]); return valueSearch=valueSearch1[2]+"-"+valueSearch1[1]+"-"+valueSearch1[0]; } } } function search(){ with(document.cscform){ var a=chkDateTime1(__startDateSearch.value); var b=chkDateTime1(__endDateSearch.value); __childFilter.value=""; if(potype.value!=""||__startDateSearch.value!=""||__endDateSearch.value!=""){ __childFilter.value="mcom_profile: "; if(potype.value!=""){ __childFilter.value += "proceduretypeid ='"+potype.value+"'"; }else{ __childFilter.value += "proceduretypeid like'%' "; } if(__startDateSearch.value!=""&&__endDateSearch.value!=""){ __childFilter.value += " and (announcedate between '"+a+"' and '"+b+"')"; }else{ if(__startDateSearch.value!=""){ __childFilter.value += " and announcedate = '"+a+"'"; }else{ __childFilter.value += " and announcedate like '%' "; } if(__endDateSearch.value!=""){ __childFilter.value += " and announcedate = '"+b+"'"; }else{ __childFilter.value += " and announcedate like '%' "; } } } //alert(__childFilter.value); __cmd.value="search"; //potype.value=potype.options[potype.selectedIndex].value; submit(); //__childFilter.value=""; //__startDateSearch.value=""; //__endDateSearch.value=""; //potype.value=""; } } function checkedType(){ with(document.cscform){ for (var i = 0; i < potype.options.length; ++i){ if (potype.options[i].value == "<%=ck.chkNullString(request.getParameter("potype"))%>"){ potype.selectedIndex = i; } } } } //--> </script> </head> <% String helpReturn=""; if(request.getParameter("__helpReturn")!=null){ //helpReturn=request.getParameter("__helpReturn"); } %> <body leftmargin="0" topmargin="0" onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif')"> <form name="cscform" method="post" action="CO022.jsp"> <!----------BEGIN CSC INITIAL ZONE ------------------------> <%=screen.InitialVariable()%> <!----------END CSC INITIAL ZONE --------------------------> <input type="hidden" name="__cmd" value=""> <input type="hidden" name="__help" value=""> <input type="hidden" name="__notNull" value="<%=screen.getRequire()%>"> <input type="hidden" name="__confirm" value="3"> <input type="hidden" name="__goPage" value=""> <input type="hidden" name="__orderBy" value="<%=request.getParameter("__orderBy")%>"> <input type="hidden" name="__helpReturn" value="<%=helpReturn%>"> <input type="hidden" name="__helpName" value="<%=request.getParameter("__helpName")%>"> <input type="hidden" name="__pageCall" value="<%=request.getParameter("__screen")%>"> <input type="hidden" name="__fixCon" value="<%=ck.chkNullString(request.getParameter("__fixCon"))%>"> <input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>"> <input type="hidden" name="__currentDate" value="<%=new CscCalendar().getEngYYYY()%>"> <input type="hidden" name="__calendar" > <input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>"> <input type="hidden" name="__childFilter" value=""> <input type="hidden" name="__screen" value="CO022"> <input type="hidden" name="__isloadparam" value="true"> <script language="javascript">getInputFormatDate();</script> <br> <div align="center"> <table align="center" cellpadding="0" cellspacing="0" class="medium"> <tr bgcolor="#3366CC"> <td height="20" colspan="4" class="header">CO022, <script language="javaScript">swapLang('Regulation Order Notice Table')</script> </td> </tr> <tr> <td colspan="4" class="blankspace"> </td> </tr> <tr> <td width="14%"><div align="right"> <script language="javascript">swapLang('Type')</script> </div></td> <td width="34%"><select name="potype"> <option value=""><script language="javascript">swapLang("Select")</script></option> <% DbInquiry posType=new InitialInquiry(screen.getUProfile()).getDbInquiry(); posType.initMyTable("Mproceduretype","",""); posType.setColumn("proceduretypeid,edesc,tdesc,companyid"); posType.referLangOn(); posType.refresh(); while(posType.next()){ %> <option value="<%=posType.getString("proceduretypeid")%>"><%=posType.getString("edesc")%></option> <%}%> </select> </td> <td width="11%" ><div align="right"></div></td> <td width="41%" > </td> </tr> <tr> <td><div align="right"> <script language="javascript">swapLang('Notice Date')</script> </div></td> <td colspan="3" ><input name="__startDateSearch" type="text" size="10" maxlength="8" value="<%=ck.chkNullString(request.getParameter("__startDateSearch"))%>" onFocus = "this.select()" onKeyup = "formatDate(this)" onBlur = "chkInputDate2(this,__endDateSearch)" onKeypress = "chkIntegerOfDate(this.value)"> <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)" onClick="viewCal('__startDateSearch');"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image2" width="20" height="20" border="0" align="absmiddle" id="Image2"></a> - <input name="__endDateSearch" type="text" size="10" maxlength="8" value="<%=ck.chkNullString(request.getParameter("__endDateSearch"))%>" onFocus = "this.select()" onKeyup = "formatDate(this)" onBlur = "chkInputDate2(__startDateSearch,this)" onKeypress = "chkInteger()"> <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)" onClick="viewCal('__endDateSearch');"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image1" width="20" height="20" border="0" align="absmiddle" id="Image1"></a> <div align="right"></div></td> </tr> <tr> <td><div align="right"> <script language="javascript">swapLang('Order By');</script> </div></td> <td><%=screen1.getTagOrder()%></td> <td><div align="right"> <script language="javascript">swapLang('Search By');</script> </div></td> <td><%=screen1.getTagSearchBy()%> </td> </tr> <tr> <td><div align="right"> <script language="javascript">swapLang('Condition');</script> </div></td> <td><%=screen1.getTagConSearch()%> </td> <td><div align="right"> <script language="javascript">swapLang('Key Value');</script> </div></td> <td><%=screen1.getTagValueSearch()%> <a href="javascript:search();"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" width="20" height="20" border="0" align="absmiddle"></a></td> </tr> <tr> <td colspan="4" class="blankspace"> </td> </tr> <tr> <td colspan="4"><table width="356" cellpadding="0" cellspacing="1" bgcolor="#333333" class="maxsize"> <tr> <td colspan="2" width="80" align="center" class="row3"><script language='javascript'>swapLang('No.');</script></td> <td width="284" align="center" class="row3"><%=screen1.getLabel("Mcom_profile","topictdesc")%> </td> <td width="139" align="center" class="row3"><%=screen1.getLabel("Mcom_profile","announcer")%> </td> <td width="88" align="center" class="row3"><%=screen1.getLabel("Mcom_profile","announcedate")%> </td> <td width="61" align="center" class="row3"><%=screen1.getLabel("Mcom_profile","status")%> </td> </tr> <% if((ck.chkNullString(request.getParameter("__cmd")).equals("search"))){ int i=0; String typeChk=""; DbInquiry dbi=null; while(screen1.nextRec()){ %> <tr> <td colspan="6"class="inframe"><div align="left"><strong> <%=screen1.getLabel("Mcom_profile_grp","procgrpid")%> <%=screen1.getString("tdesc")%></strong></div></td> </tr> <% //((DbInquiry) screen1.getInquiry().getChild("Mcom_profile_grp")).setOrderBy("procgrpid,profileid"); //screen1.getInquiry().refreshChild(); //((DbInquiry) screen1.getInquiry().getChild("Mcom_profile_grp")).next(); do{ i++; if(!screen1.getString("Mcom_profile_grp","proceduretypeid").equals(typeChk)){ typeChk=screen1.getString("Mcom_profile_grp","proceduretypeid"); %> <tr> <td colspan="6" align="center" class="inframe"><div align="left"><strong> <%=screen1.getLabel("Mcom_profile","proceduretypeid")%> <%=screen1.getString("Mproceduretype","tdesc")%></strong></div></td> </tr> <%}%> <tr> <td width="23" align="center" class="inframe"><input type="checkbox" name="same" value="<%=screen1.getString("Mcom_profile","profileid")%>#<%=screen1.getDataLabel("Mcom_profile_grp","procgrpid")%>"></td> <td width="21" align="center" class="inframe"><%=i%></td> <td class="inframe" align="center"><div align="left"> <a href="javascript:goPages('<%=screen1.getString("Mcom_profile","profileid")%>','CO022_1');"><%=screen1.getString("Mcom_profile","topictdesc")%></a></div></td> <td class="inframe" align="center"><%=screen1.getString("Mcom_profile","announcename")%></td> <td class="inframe" align="center"><%=screen1.getString("Mcom_profile","announcedate")%></td> <td class="inframe" align="center"><%=screen1.getInquiry().getCurrentDbRecord().getSystemCode("Mcom_profile","status")%></td> </tr> <% }while(((DbInquiry) screen1.getInquiry().getChild("Mcom_profile_grp")).next()); %> <% i=0; typeChk=""; } } %> </table></td> </tr> <tr> <td colspan="4" class="blankspace" ><input type="hidden" name="keyDelGrp" value=""></td> </tr> <tr> <td colspan="4" ><div align="center"><a href="#" onClick="checkAll()"><img src="../IMAGES/BUTTON/SELECTALL.gif" border="0"></a> <a href="#" onClick="decheckAll()"><img src="../IMAGES/BUTTON/DESELECTALL.gif" border="0"></a> <a href="javascript:addButton('CO022_1');"><img src="../IMAGES/BUTTON/ADD.gif" border="0"></a> <a href="javascript:GoSave();"><img src="../IMAGES/BUTTON/DELETE.gif" border="0"></a></div></td> </tr> <tr> <td colspan="4" class="blankspace" ></td> </tr> <tr> <td colspan="4" class="bottom"></td> </tr> </table> </div> <script language="javascript">checkedType(); </script> </form> </body> </html>