%@page pageEncoding="UTF-8" contentType="text/html" %> <%@ page import ="org.dbforms.config.DbFormsConfigRegistry,java.sql.Connection,java.sql.Statement,java.sql.ResultSet" %> <%if (request.getParameter("logoff") != null&&request.getSession()!=null) { request.getSession().invalidate(); }; StringBuffer LinkMandantID=new StringBuffer(""); //Spezieller Bericht gewünscht? StringBuffer defaultReport=new StringBuffer(); StringBuffer selectedReport=new StringBuffer(); defaultReport.append("?a=b"); String defaultTimeunit=request.getParameter("timeunit"); if(defaultTimeunit == null || defaultTimeunit.equals("")) defaultTimeunit = "S"; if(defaultTimeunit != null && !defaultTimeunit.toString().equals("")) defaultReport.append("&timeunit="+defaultTimeunit.toString()); String defaultReportParam=request.getParameter("report_id"); if(defaultReportParam != null && !defaultReportParam.toString().equals("")) { defaultReport.append("&report_id="+defaultReportParam.toString()); selectedReport.append(defaultReportParam.toString()); } String defaultMandantenIDParam=request.getParameter("MandantID"); String referrer=request.getParameter("referrer"); if(defaultMandantenIDParam != null && !defaultMandantenIDParam.toString().equals("")) { defaultReport.append("&MandantID="+defaultMandantenIDParam.toString()); LinkMandantID.append("/"+defaultMandantenIDParam.toString()); } if (request.getSession()!=null&&request.getSession().getAttribute("sessiontype")!=null&& request.getSession().getAttribute("sessiontype").equals("superx")) { Object mandantobject=request.getSession().getAttribute("MandantenID"); Object userid=request.getSession().getAttribute("UserID"); String mandantenid=""; if(mandantobject != null) mandantenid=mandantobject.toString(); else { if(defaultMandantenIDParam != null) mandantenid=defaultMandantenIDParam.toString(); } //der superx-Default-Mandant ist bei dbforms ein Leerstring if(mandantenid.equals("default")) mandantenid=""; Connection conmm=null; Statement st5; ResultSet l_rset5; try { conmm = DbFormsConfigRegistry.instance().lookup().getConnection(mandantenid); st5=conmm.createStatement(); String queryMaskenRechte = "--alle Abfragen für die die Gruppe über Sachgebiete berechtigt \n" + "select distinct M.tid,M.name \n" + " from maskeninfo M, sachgeb_maske_bez S, group_sachgeb_bez G, user_group_bez U \n" + " where M.tid = S.maskeninfo_id \n" + " and S.sachgebiete_id = G.sachgebiete_id \n" + " and G.groupinfo_id = U.groupinfo_id \n" + " and U.userinfo_id = " + userid + " \n" + " union \n" + " --alle Abfragen für die die Gruppe berechtigt (Einzelrechte) \n" + " select distinct M.tid,M.name \n" + " from maskeninfo M, group_masken_bez G, user_group_bez U \n" + " where M.tid = G.maskeninfo_id \n" + " and G.groupinfo_id = U.groupinfo_id \n" + " and U.userinfo_id = " + userid + " \n" + " union \n" + "--alle Abfragen aus Sachgebieten für die der Nutzer Rechte hat \n" + " select distinct M.tid,M.name \n" + " from maskeninfo M \n" + " where \n" + " (M.tid in (select maskeninfo_id from sachgeb_maske_bez S where S.sachgebiete_id in \n" + " (select sachgebiete_id from user_sachgeb_bez U where U.userinfo_id=" + userid + " ))) \n" + " union \n" + "--alle Abfragen für die Einzelrechte in user_masken_bez angegeben \n" + " select distinct M.tid,M.name \n" + " from maskeninfo M, user_masken_bez B \n" + " where \n" + " B.userinfo_id = " + userid + " \n" + " and (M.tid = B.maskeninfo_id \n" + " or B.maskeninfo_id = 0)"; l_rset5 = st5.executeQuery(queryMaskenRechte); StringBuffer maskRights=new StringBuffer(); while (l_rset5.next()) { maskRights.append(l_rset5.getObject(1)+","); } l_rset5.close(); st5.close(); //Semester ermitteln: st5=conmm.createStatement(); String semestersql = "select tid,eintrag,akad_jahr_absolv from man_semester where today() >= sem_beginn order by 1 desc"; l_rset5 = st5.executeQuery(semestersql); StringBuffer SemesterOptions=new StringBuffer(); StringBuffer SemesterArray=new StringBuffer(); int i=0; SemesterArray.append("semArray= new Array();\n"); while (l_rset5.next()) { i++; SemesterOptions.append(""); SemesterArray.append("semArray["+i+"] = new Array();"); SemesterArray.append("semArray["+i+"][1] = "+l_rset5.getObject(1)+";"); SemesterArray.append("semArray["+i+"][2] = "+l_rset5.getObject(3)+";\n"); } l_rset5.close(); st5.close(); //Jahr ermitteln: st5=conmm.createStatement(); String jahrsql2 = "select tid,tid from man_jahr where year(today()) >= tid order by 1 desc"; l_rset5 = st5.executeQuery(jahrsql2); StringBuffer SelectJahrOptions=new StringBuffer(); while (l_rset5.next()) { SelectJahrOptions.append(""); } l_rset5.close(); st5.close(); //maximales Jahr vor "heute" ermitteln st5=conmm.createStatement(); String jahrsql = "select tid from man_jahr where year(today()) >= tid order by 1 desc"; l_rset5 = st5.executeQuery(jahrsql); StringBuffer JahrOptions=new StringBuffer(); int jahre=0; while (l_rset5.next()) { jahre++; JahrOptions.append("validYear["+jahre+"]="+l_rset5.getObject(1)+";\n"); } l_rset5.close(); st5.close(); //Portlets holen //st5=conmm.createStatement(); //StringBuffer portlet=new StringBuffer(); //l_rset5 = st5.executeQuery("select name,class,icon,content from sx_portlet where today() between gueltig_von and gueltig_bis and type='IFRAME_MAN' and (visible != 'false' or visible is null) order by sortnr_initial,tid"); //while (l_rset5.next()) //{ // if(l_rset5.getObject(1) !=null && l_rset5.getObject(2) !=null && l_rset5.getObject(3) !=null && l_rset5.getObject(4) !=null) // portlet.append("
<%= sb_hs_name %>