SuperX-Kernmodul
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

159 lines
3.9 KiB

<%@ page import ="org.dbforms.config.DbFormsConfigRegistry,java.sql.Connection,java.sql.Statement,java.sql.ResultSet" %>
<%
String mandantenid="default";
//Ermittlung der Mandantenid zuerst aus Session,
//wenn leer (d.h. User ist noch nicht angemeldet)
//dann über request-Parameter
Object mandantobject=request.getSession().getAttribute("MandantenID");
if(mandantobject != null)
mandantenid=mandantobject.toString();
String mandantparam=request.getParameter("MandantenID");
if(mandantparam !=null && !mandantenid.equals(""))
mandantenid=mandantparam;
String queryLogo = "select contents_short from sx_captions where id='REPORT_LOGO_FILE'";
String queryLink = "select contents_short from sx_captions where id='REPORT_HEADING_URL'";
String queryInst = "select contents_short from sx_captions where id='REPORT_HEADING_INSTITUTION'";
Connection conmm=null;
Statement st_Logo;
Statement st_Link;
Statement st_Inst;
ResultSet result_Logo;
ResultSet result_Link;
ResultSet result_Inst;
try {
conmm = DbFormsConfigRegistry.instance().lookup().getConnection(mandantenid);
st_Logo=conmm.createStatement();
st_Link=conmm.createStatement();
st_Inst=conmm.createStatement();
result_Logo = st_Logo.executeQuery(queryLogo);
result_Link = st_Link.executeQuery(queryLink);
result_Inst = st_Inst.executeQuery(queryInst);
String hs_logo="";
while (result_Logo.next())
{ if(result_Logo.getObject(1) !=null)
hs_logo=result_Logo.getObject(1).toString();
}
String hs_link="";
while (result_Link.next())
{ if(result_Link.getObject(1) !=null)
hs_link=result_Link.getObject(1).toString();
}
String hs_inst="";
while (result_Inst.next())
{ if(result_Inst.getObject(1) !=null)
hs_inst=result_Inst.getObject(1).toString();
}
result_Logo.close();
result_Link.close();
result_Inst.close();
st_Logo.close();
st_Link.close();
st_Inst.close();
conmm.close();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SuperX-Anmeldung</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<base target="_self"/>
<link rel="stylesheet" type="text/css" href="../style/superx.css"/>
<!-- <script type="text/javascript" src="/superx/xml/js/dojo/dojo.js"></script> -->
<script src="../xml/js/jquery/jquery-1.11.1.min.js"></script>
<script src="../xml/js/jquery/jquery.mobile-1.4.2.min.js"></script>
<script src="../xml/js/jquery-2.1.1.min.js" ></script>
<link rel="stylesheet" href="../xml/js/jquery/jquery.mobile.structure-1.4.2.dw.css" ></link>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h2>
<%if (request.getParameter("logoff") != null&&request.getSession()!=null) {
request.getSession().invalidate();
};
if (request.getSession()!=null&&request.getSession().getAttribute("sessiontype")!=null&&
request.getSession().getAttribute("sessiontype").equals("superx")) {
Object userid=request.getSession().getAttribute("UserID");
//der superx-Default-Mandant ist bei dbforms ein Leerstring
if(mandantenid.equals("default"))
mandantenid="";
%>
<jsp:forward page="/servlet/SuperXmlAnmeldung" >
<jsp:param name="kennung" value='<%= ((de.superx.common.SxUser)request.getSession().getAttribute(&quot;user&quot;)).getName() %>' />
</jsp:forward>
<%
}
else
{
if(request.getParameter("token") != null)
{
%>
<jsp:forward page="/servlet/SuperXmlAnmeldung" >
<jsp:param name="token" value="<%= request.getParameter(&quot;token&quot;) %>" />
</jsp:forward>
<%
}
else
{
%>
<jsp:forward page="../" >
<jsp:param name="kennung" value="" />
</jsp:forward>
<%
}
}
%>
</div><!-- /header -->
<div role="main" class="ui-content">
<div align="center" style="margin:40px;">
</body>
</html>
<%
}
catch (Exception e) {
out.print("<html><body>Fehler bei Datenverbindung: "+e+ " MandantID"+mandantenid);
}
%>