%@ page import="de.superx.common.*" %> <%@ page import ="org.dbforms.config.DbFormsConfigRegistry,java.sql.Connection,java.sql.Statement,java.sql.ResultSet" %> <% HttpSession s=request.getSession(false); if (s!=null&&s.getAttribute("user")!=null) { String mandantenid=""; Object mandantobject=s.getAttribute("MandantenID"); if(mandantobject != null) mandantenid=mandantobject.toString(); //der superx-Default-Mandant ist bei dbforms ein Leerstring if(mandantenid.equals("default")) mandantenid=""; //mandantenid="";//TEST out.println("
sessiontype="+s.getAttribute("sessiontype")+" mandant:"+mandantobject+"
"); out.println("userid "+((SxUser)s.getAttribute("user")).getId()+""); out.println("username "+((SxUser)s.getAttribute("user")).getName()+""); out.println("admin "+((SxUser)s.getAttribute("user")).isAdmin()+"
"); Object userid=s.getAttribute("UserID"); out.println("userid in session "+userid+"
"); out.println("basicmap "+((SxUser)s.getAttribute("user")).getBasicMap()+"
"); SxFinRechte f=(SxFinRechte) ((SxUser)s.getAttribute("user")).getBasicMap().get("SxFinRechte"); Sichten sichten=((SxUser)s.getAttribute("user")).getSichten(); java.util.LinkedList l=new java.util.LinkedList(); l.add("");//kostenstellenrechte l.add("1.7.2024"); out.println("finrechte "+f.exec(l)+"
"); Connection conmm=null; Statement st5; ResultSet l_rset5; try { conmm = DbFormsConfigRegistry.instance().lookup().getConnection(mandantenid); st5=conmm.createStatement(); String sql = "select ch110_institut from user_institution where userid="+userid; l_rset5 = st5.executeQuery(sql); StringBuffer buf=new StringBuffer(); while (l_rset5.next()) { buf.append(l_rset5.getObject(1)+","); } l_rset5.close(); out.println("user_institution:"+buf); buf=new StringBuffer(); sql = "select * from fin_user_kam where userid="+userid; l_rset5 = st5.executeQuery(sql); String names[] ={"tid" , "userid ", "buchungsab_fb", "projnr_ins ", "kapitel ", "dr ", "titel ", "untertitel ", "kostenstellen ", "ins2 ", "ins3 ", "gueltig_von ", "gueltig_bis "}; buf=new StringBuffer("
"+names[i-1].trim()+" | "); buf.append("
"+l_rset5.getObject(i)+" | "); buf.append("
fin_user_kam:"+buf); st5.close(); conmm.close(); } catch (Exception e) { out.print("
Fehler bei Datenverbindung: "+e+ " MandantenID"+mandantenid); } out.println(" Session gesamt
");
for (java.util.Enumeration en=s.getAttributeNames();en.hasMoreElements();)
{
String n=(String)en.nextElement();
out.println(n+":"+s.getAttribute(n)+"
");
}
out.println("
Sichten
Erst bei Bedarf eingelesen
");
for (java.util.Iterator it=sichten.iterator();it.hasNext();)
{
AbstractSicht sicht=(AbstractSicht)it.next();
out.println(sicht.getArt()+" "+sicht.getName()+
"
");
out.println("");
}
}
else
{
out.println("