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.
		
		
		
		
		
			
		
			
				
					
					
						
							317 lines
						
					
					
						
							11 KiB
						
					
					
				
			
		
		
	
	
							317 lines
						
					
					
						
							11 KiB
						
					
					
				<%@page pageEncoding="utf-8" contentType="text/html; charset=UTF-8" %> | 
						|
<%@ 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; | 
						|
 | 
						|
 | 
						|
 | 
						|
StringBuffer defaultReport=new StringBuffer(); | 
						|
String defaultReportParam=request.getParameter("report_id"); | 
						|
String defaultMandantenIDParam=request.getParameter("MandantID"); | 
						|
StringBuffer LinkMandantenID=new StringBuffer(""); | 
						|
String MandantenID_Login=mandantenid; | 
						|
LinkMandantenID.append(""); | 
						|
defaultReport.append("?a=b"); | 
						|
if(defaultReportParam != null && !defaultReportParam.toString().equals("")) | 
						|
	defaultReport.append("&report_id="+defaultReportParam.toString()); | 
						|
if((defaultMandantenIDParam == null || defaultMandantenIDParam.toString().equals("")) && !mandantenid.equals("default")) { | 
						|
        defaultMandantenIDParam=mandantenid; | 
						|
} | 
						|
if(defaultMandantenIDParam != null && !defaultMandantenIDParam.toString().equals("")) { | 
						|
	defaultReport.append("&MandantID="+defaultMandantenIDParam.toString()); | 
						|
	LinkMandantenID.append("");//"/"+defaultMandantenIDParam.toString()); | 
						|
	MandantenID_Login=defaultMandantenIDParam.toString(); | 
						|
} | 
						|
 | 
						|
//Daten aus Datenbank werden in Variablen gespeichert | 
						|
Connection conmm=null;  | 
						|
//out.println("Getting  Connection for mandantenid="+mandantenid); | 
						|
try {  | 
						|
  | 
						|
conmm = DbFormsConfigRegistry.instance().lookup().getConnection(mandantenid);  | 
						|
//System.out.println("Got Connection"); | 
						|
Statement st; | 
						|
 | 
						|
st=conmm.createStatement(); | 
						|
 | 
						|
ResultSet rs; | 
						|
 | 
						|
String hs_logo=""; | 
						|
rs = st.executeQuery("select trim(contents_short) from sx_captions where id='REPORT_LOGO_FILE' and contents_short is not null and trim(contents_short) != '' "); | 
						|
while (rs.next()) | 
						|
{ if(rs.getObject(1) !=null) | 
						|
	hs_logo=rs.getObject(1).toString(); | 
						|
} | 
						|
//System.out.println("hs_logo="+hs_logo); | 
						|
String hs_link=""; | 
						|
rs = st.executeQuery("select contents_short from sx_captions where id='REPORT_HEADING_URL'"); | 
						|
while (rs.next()) | 
						|
{ if(rs.getObject(1) !=null) | 
						|
	hs_link=rs.getObject(1).toString(); | 
						|
} | 
						|
//System.out.println("hs_link="+hs_link); | 
						|
String hs_inst=""; | 
						|
rs = st.executeQuery("select contents_short from sx_captions where id='REPORT_HEADING_INSTITUTION'"); | 
						|
while (rs.next()) | 
						|
{ if(rs.getObject(1) !=null) | 
						|
	hs_inst=rs.getObject(1).toString(); | 
						|
} | 
						|
//System.out.println("hs_inst="+hs_inst); | 
						|
 | 
						|
StringBuffer portlet=new StringBuffer(); | 
						|
rs = st.executeQuery("select name,class,icon,content,sortnr_initial,tid from sx_portlet where today() between gueltig_von and gueltig_bis and type='HTML' and (visible != 'false' or visible is null) order by sortnr_initial,tid"); | 
						|
while (rs.next()) | 
						|
{  | 
						|
	if(rs.getObject(1) !=null && rs.getObject(2) !=null && rs.getObject(3) !=null && rs.getObject(4) !=null) | 
						|
		portlet.append("<div class=\"article "+ rs.getObject(2) +"\"> <div class=\"article-inner\"><div class=\"i icon-portlet "+ rs.getObject(3) +"\"></div><div class=\"holder-section\"><h2>"+ rs.getObject(1) +"</h2><div class=\"holder-section-inner\">"+ rs.getString(4) +"</div></div></div></div>"); | 
						|
} | 
						|
//System.out.println("portlet="+portlet.toString()); | 
						|
 | 
						|
StringBuffer portletall=new StringBuffer(); | 
						|
rs = st.executeQuery("select name,class,icon,content,visible,sortnr_initial,tid from sx_portlet where today() between gueltig_von and gueltig_bis and type='HTML' and visible='all' order by sortnr_initial,tid"); | 
						|
while (rs.next()) | 
						|
{  | 
						|
	if(rs.getObject(1) !=null && rs.getObject(2) !=null && rs.getObject(3) !=null && rs.getObject(4) !=null) | 
						|
		portletall.append("<div class=\"article "+ rs.getObject(2) +"\"> <div class=\"article-inner\"><div class=\"i icon-portlet "+ rs.getObject(3) +"\"></div><div class=\"holder-section\"><h2>"+ rs.getObject(1) +"</h2><div class=\"holder-section-inner\">"+ rs.getString(4) +"</div></div></div></div>"); | 
						|
} | 
						|
//System.out.println("portletall="+portletall.toString()); | 
						|
 | 
						|
StringBuffer menu=new StringBuffer(); | 
						|
rs = st.executeQuery("select caption,content,comment from sx_repository where art='WELCOME_LINK' and today() between gueltig_seit and gueltig_bis and aktiv=1 order by sort1"); | 
						|
while (rs.next()) | 
						|
{  | 
						|
	if(rs.getObject(1) !=null && rs.getObject(2) !=null && rs.getObject(3) !=null) { | 
						|
		if (mandantenid.toString().equals("default")) { | 
						|
			menu.append("<li><div class=\"nav-element\"><a href=\"/superx"+ LinkMandantenID + "/" +rs.getString(2) +"\" class=\"icon "+ rs.getString(3) +"\">"+ rs.getObject(1) +"</a></div></li>"); | 
						|
		} else { | 
						|
			String welcome_link=rs.getString(2); | 
						|
			if(welcome_link.indexOf("?") >-1) | 
						|
				welcome_link+="&MandantID="+ mandantenid.toString(); | 
						|
			else | 
						|
				welcome_link+="?MandantID="+ mandantenid.toString(); | 
						|
			menu.append("<li><div class=\"nav-element\"><a href=\"/superx"+ LinkMandantenID + "/" +rs.getString(2) +"?MandantID="+ mandantenid.toString() +"\" class=\"icon "+ rs.getString(3) +"\">"+ rs.getObject(1) +"</a></div></li>"); | 
						|
		} | 
						|
	} | 
						|
		 | 
						|
				//menu.append("<li><div class=\"nav-element\"><div class=\"i "+ rs.getString(3) +"\"></div><a href=\""+ rs.getString(2) +"\">"+ rs.getObject(1) +"</a></div></li>"); | 
						|
} | 
						|
//System.out.println("menu="+menu.toString()); | 
						|
 | 
						|
String custom_css=""; | 
						|
rs = st.executeQuery("select content from sx_repository where id='CUSTOM_CSS' and today() between gueltig_seit and gueltig_bis and aktiv=1"); | 
						|
while (rs.next()) | 
						|
{ if(rs.getObject(1) !=null) | 
						|
	custom_css=rs.getString(1); | 
						|
} | 
						|
 | 
						|
 | 
						|
rs.close(); | 
						|
st.close(); | 
						|
conmm.close(); | 
						|
 | 
						|
 | 
						|
%> | 
						|
 | 
						|
 | 
						|
<!DOCTYPE html> | 
						|
<html xmlns="http://www.w3.org/1999/xhtml"> | 
						|
<head> | 
						|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | 
						|
<title>SuperX</title> | 
						|
<meta name="viewport" content="width=device-width, initial-scale=1"> | 
						|
<meta name="description" content="SuperX - Free datawarehouse and statistics for colleges" /> | 
						|
<meta name="keywords" content="SuperX, datawarehouse, statistics, colleges, FH, Uni" /> | 
						|
<meta name="author" content="SuperX" /> | 
						|
<!-- <link rel="stylesheet" type="text/css" href="style/superx.css"/> --> | 
						|
<link rel="stylesheet" type="text/css" href="/superx/xml/css/start_portlet.css"/> | 
						|
<link rel="stylesheet" type="text/css" href="/superx/xml/css/fontello-codes.css"/> | 
						|
<!--[if lte IE 8]> | 
						|
	<link rel="stylesheet" type="text/css" href="/superx/xml/css/fontello-ie7-codes.css" /> | 
						|
<![endif]--> | 
						|
 | 
						|
<link rel="stylesheet" type="text/css" href="/superx/xml/css/welcome.css"/> | 
						|
<!-- <script type="text/javascript" src="/superx/xml/js/dojo/dojo.js"></script> | 
						|
<script src="xml/js/jquery/jquery-1.12.4.min.js"></script> | 
						|
<script> | 
						|
 | 
						|
jQuery.ajaxPrefilter( function( s ) { | 
						|
    if ( s.crossDomain ) { | 
						|
        s.contents.script = false; | 
						|
    } | 
						|
} ); | 
						|
 | 
						|
</script> | 
						|
<script src="xml/js/jquery/jquery.mobile-1.4.2.min.js"></script> | 
						|
<script  src="/superx/xml/js/jquery-2.1.1.min.js" ></script> | 
						|
<link rel="stylesheet" href="/js/jquery/jquery.mobile.structure-1.4.2.dw.css" ></link> --> | 
						|
 | 
						|
<style> | 
						|
<%= custom_css.toString() %> | 
						|
</style> | 
						|
 | 
						|
</head> | 
						|
 | 
						|
<body> | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<% | 
						|
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") | 
						|
&& request.getSession().getAttribute("user")!=null) { | 
						|
%> | 
						|
<!-- Inhalt wenn angemeldet --> | 
						|
 | 
						|
<div class="header"> | 
						|
	<div class="header-left"> | 
						|
		<% | 
						|
		if (hs_logo.toString()==null || hs_logo.toString()=="") { %> | 
						|
                    <img class="logo" src="/superx/images/superx_logo.svg"/> | 
						|
		<% }else { %> | 
						|
		<img class="logo" src="/superx/xml/<%= hs_logo.toString() %>"/> | 
						|
		<% } | 
						|
		if (hs_inst.toString()==null || hs_inst.toString()=="") { %> | 
						|
		<h1>Informationssystem der Hochschule</h1> | 
						|
		<% }else { %> | 
						|
		<h1><%= hs_inst.toString() %></h1> | 
						|
		<% } %> | 
						|
	</div> | 
						|
	<div class="header-right"> | 
						|
		<ul> | 
						|
			<li><a target="_parent" href="/superx/edit/kern/show_html_content.jsp?output=IMPRINT">Impressum</a></li> | 
						|
			<li><a target="_parent" href="/superx/edit/kern/show_html_content.jsp?output=PRIVACY">Datenschutz</a></li> | 
						|
			<li><a href="http://www.superx-projekt.de/doku/kern_modul/benutzer/main.htm" target="_blank">Hilfe</a></li> | 
						|
<% | 
						|
String username=""; | 
						|
de.superx.common.SxUser user= (de.superx.common.SxUser) request.getSession().getAttribute("user"); | 
						|
if(user != null) | 
						|
{ | 
						|
//username=(de.superx.common.SxUser) user.getName(); | 
						|
//System.out.println(user.toString()); | 
						|
username= user.toString(); | 
						|
} | 
						|
else | 
						|
{ | 
						|
System.out.println("No user found"); | 
						|
} | 
						|
%> | 
						|
 | 
						|
 | 
						|
			<li><a class="icon icon-logout" href="/superx/servlet/SuperXmlAbmeldung">Abmelden</a> (User: <%=username %>)</li> | 
						|
		</ul> | 
						|
	</div> | 
						|
	 | 
						|
	<div class="nav"> | 
						|
		<ul> | 
						|
			<%= menu.toString() %> | 
						|
 | 
						|
		</ul> | 
						|
	</div> | 
						|
	<div class="clear"></div> | 
						|
</div> | 
						|
 | 
						|
<%= portlet.toString() %> | 
						|
 | 
						|
<div class="footer"> <a href="http://www.superx-projekt.de/">SuperX</a> | 
						|
	<p></p> | 
						|
</div> | 
						|
 | 
						|
<% }else {%> | 
						|
<!-- Inhalt wenn nicht angemeldet--> | 
						|
 | 
						|
<% | 
						|
if(request.getRemoteUser() != null) | 
						|
{ | 
						|
String username=request.getRemoteUser(); | 
						|
//int ende=username.indexOf("@"); | 
						|
//if(ende >-1) | 
						|
//  username=username.substring(0,ende); | 
						|
%> | 
						|
<jsp:forward page="servlet/SuperXmlAnmeldung" > | 
						|
<jsp:param name="kennung" value="<%= username %>" /> | 
						|
<jsp:param name="requestedServlet" value="../index.jsp"/> | 
						|
<jsp:param name="alt_redirect_url" value="../index.jsp" /> | 
						|
</jsp:forward> | 
						|
<% | 
						|
} %> | 
						|
 | 
						|
 | 
						|
<div class="header"> | 
						|
	<div class="header-left"> | 
						|
		<% | 
						|
		if (hs_logo.toString()==null || hs_logo.toString()=="") { %> | 
						|
                    <img class="logo" src="/superx/images/superx_logo.svg"/> | 
						|
		<% }else { %> | 
						|
		<img class="logo" src="/superx/xml/<%= hs_logo.toString() %>"/> | 
						|
		<% } | 
						|
		if (hs_inst.toString()==null || hs_inst.toString()=="") { %> | 
						|
		<h1>Informationssystem der Hochschule</h1> | 
						|
		<% }else { %> | 
						|
		<h1><%= hs_inst.toString() %></h1> | 
						|
		<% } %> | 
						|
	</div> | 
						|
	<div class="header-right"> | 
						|
		<ul> | 
						|
			<li><a target="_parent" href="<%="/superx/edit/kern/show_html_content.jsp?output=IMPRINT&MandantID="+ mandantenid.toString() %>">Impressum</a></li> | 
						|
			<li><a target="_parent" href="<%="/superx/edit/kern/show_html_content.jsp?output=PRIVACY&MandantID="+ mandantenid.toString() %>">Datenschutz</a></li> | 
						|
			<li><a href="http://www.superx-projekt.de/doku/kern_modul/benutzer/main.htm" target="_blank">Hilfe</a></li> | 
						|
			<li>Abmelden</li> | 
						|
		</ul> | 
						|
	</div> | 
						|
	<div class="clear"></div> | 
						|
</div> | 
						|
 | 
						|
<div  class="article green"> | 
						|
<div class="article-inner"> | 
						|
	<div class="i icon-portlet icon-key"></div> | 
						|
	<div class="holder-section"> | 
						|
		<FORM id="login" ACTION="/superx/servlet/SuperXmlAnmeldung" METHOD="post"> | 
						|
			<p>Kennung: <br /><INPUT TYPE="Text" NAME="kennung" VALUE=""></p> | 
						|
			<p>Passwort: <br /><INPUT TYPE="Password" NAME="passwort" value=""> | 
						|
			<INPUT TYPE="hidden" NAME="MandantenID" value="<%= MandantenID_Login.toString() %>"></p><br> | 
						|
			<input type="hidden" Name="requestedServlet" value="..<%= LinkMandantenID.toString() %>/index.jsp<%= defaultReport.toString() %>"/> | 
						|
			<input type="hidden" Name="alt_redirect_url" value="/superx<%= LinkMandantenID.toString() %>/index.jsp"/>  | 
						|
			<INPUT TYPE="Submit" NAME="Abschicken" VALUE="Anmelden"  class="clsButtonStyle"> | 
						|
		</FORM> | 
						|
	</div> | 
						|
</div> | 
						|
</div> | 
						|
 | 
						|
<%= portletall.toString() %> | 
						|
 | 
						|
<div class="footer"> <a href="http://www.superx-projekt.de/">SuperX</a> | 
						|
	<p></p> | 
						|
</div> | 
						|
 | 
						|
 | 
						|
<%}%> | 
						|
 | 
						|
 | 
						|
</body> | 
						|
</html> | 
						|
 | 
						|
 | 
						|
 | 
						|
<% | 
						|
}  //Check DB connection | 
						|
catch (Exception e) {  | 
						|
out.print("<html><body>Fehler bei Datenverbindung: "+e+ " MandantID"+mandantenid); | 
						|
}  | 
						|
   | 
						|
%> | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 |