mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
Infoscreen Anpassungen
This commit is contained in:
@@ -30,7 +30,13 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
||||
if(isset($_GET['ipadresse']))
|
||||
$ip = $_GET['ipadresse'];
|
||||
else
|
||||
$ip = $_SERVER["REMOTE_ADDR"];
|
||||
{
|
||||
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
else
|
||||
$ip = $_SERVER["REMOTE_ADDR"];
|
||||
}
|
||||
|
||||
$infoscreen = new infoscreen();
|
||||
$i=0;
|
||||
$refreshzeit = 40; // Default Refreshzeit
|
||||
@@ -87,8 +93,7 @@ if(isset($refreshzeiten[$aktuellerContentIdx]) && $refreshzeiten[$aktuellerConte
|
||||
// Cookie enthaelt die zuletzt angezeigte Seite
|
||||
setcookie($cookie,$infoscreen_content[$aktuellerContentIdx],time()+3600*24);
|
||||
|
||||
echo '
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
@@ -104,7 +109,7 @@ var speed=1 <!--Zeilensprung in px. Wert aendern um Geschwindigkeit zu steuern.
|
||||
var currentpos=0,alt=1,curpos1=0,curpos2=-1
|
||||
function initialize()
|
||||
{
|
||||
startit()
|
||||
//startit()
|
||||
}
|
||||
|
||||
function scrollwindow()
|
||||
@@ -164,8 +169,7 @@ window.onload=initialize
|
||||
</style>
|
||||
</head>
|
||||
<body>';
|
||||
|
||||
echo '<!-- Last content:'.$lastinfoscreencontent.' Infoscreen-ID:'.$infoscreen_id.'-->';
|
||||
echo '<!-- Last content:'.$lastinfoscreencontent.' Infoscreen-ID:'.$infoscreen_id.' IP:'.$ip.'-->';
|
||||
if($aktuellerContentIdx!=0)
|
||||
{
|
||||
|
||||
|
||||
+20
-3
@@ -53,6 +53,7 @@ $db = new basis_db();
|
||||
$studiengang_kz = (isset($_GET['studiengang_kz'])?$_GET['studiengang_kz']:0);
|
||||
$semester = (isset($_GET['semester'])?$_GET['semester']:null);
|
||||
|
||||
$infoscreen = isset($_GET['infoscreen']);
|
||||
$editable = isset($_GET['edit']);
|
||||
$news = new news();
|
||||
$all=false;
|
||||
@@ -86,9 +87,16 @@ foreach($news->result as $row)
|
||||
//$xml .= $content->content;
|
||||
}
|
||||
|
||||
if($studiengang_kz!=0 && $studiengang_kz!=10006 && !$editable)
|
||||
if($studiengang_kz!=0 && !$editable && !$infoscreen)
|
||||
$xml.=getStgContent($studiengang_kz, $semester, $sprache);
|
||||
|
||||
if($studiengang_kz!=0)
|
||||
{
|
||||
$stg_obj = new studiengang();
|
||||
$stg_obj->load($studiengang_kz);
|
||||
$xml.='<studiengang_bezeichnung>'.$stg_obj->bezeichnung.'</studiengang_bezeichnung>';
|
||||
}
|
||||
|
||||
$xml .= '</content>';
|
||||
|
||||
$doc = new DOMDocument();
|
||||
@@ -96,8 +104,17 @@ $doc->loadXML($xml);
|
||||
|
||||
//XSLT Vorlage laden
|
||||
$template = new template();
|
||||
if(!$template->load('news'))
|
||||
die($template->errormsg);
|
||||
|
||||
if($infoscreen)
|
||||
{
|
||||
if(!$template->load('news_infoscreen'))
|
||||
die($template->errormsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$template->load('news'))
|
||||
die($template->errormsg);
|
||||
}
|
||||
|
||||
$xsltemplate = new DOMDocument();
|
||||
$xsltemplate->loadXML($template->xslt_xhtml);
|
||||
|
||||
+10
-2
@@ -93,12 +93,14 @@ address,pre /* Adresse, Rohdaten */
|
||||
}
|
||||
h1 /* Überschrift 1 */
|
||||
{
|
||||
background-color: #CCCCCC; /*mittel-grau */
|
||||
color: #ffffff;
|
||||
background-color: #008381; /*gruen*/
|
||||
font-weight: bold;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 4px;
|
||||
font-size: 16px;
|
||||
font-size: 1.8em;
|
||||
text-align: center;
|
||||
}
|
||||
h2 /* Überschrift 2 */
|
||||
{
|
||||
@@ -152,6 +154,12 @@ h5, h6 /* Überschrift 5,6 - Werden nicht speziell formatiert, sondern dem norma
|
||||
white-space: nowrap;
|
||||
background-color: #C6C6C6;
|
||||
}
|
||||
#news .news .titel table
|
||||
{
|
||||
font-weight: bold;
|
||||
padding: 0px 10px 0px 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#news .news .text
|
||||
{
|
||||
background-color: #FCFCFC;
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="news">
|
||||
<xs:element name="verfasser" type="xs:string"/>
|
||||
<xs:element name="betreff" type="xs:string"/>
|
||||
<xs:element name="text" type="wysiwyg"/>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="../skin/infoscreen.css" type="text/css" />
|
||||
<title>News</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="tabcontent">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<h1>News <xsl:value-of select="content/studiengang_bezeichnung" /></h1>
|
||||
<div id="news">
|
||||
<xsl:choose>
|
||||
<xsl:when test="content/news">
|
||||
<xsl:apply-templates select="content/news" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="news" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</td>
|
||||
<xsl:if test="content/stg_extras" >
|
||||
<td></td>
|
||||
<td class="tdvertical" valign="top" width="20%">
|
||||
<xsl:apply-templates select="content/stg_extras" />
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
<xsl:template match="news">
|
||||
<div class="news">
|
||||
<div class="titel">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="60%" align="left"><xsl:value-of select="betreff"/></td>
|
||||
<td width="40%" align="right">
|
||||
<xsl:value-of select="verfasser"/>
|
||||
<span style="font-weight: normal"> ( <xsl:value-of select="datum"/> )</span>
|
||||
<xsl:if test="news_id">
|
||||
<xsl:variable name="news_id" select="news_id"></xsl:variable>
|
||||
<xsl:text> </xsl:text><a href="newsverwaltung.php?news_id={news_id}" target="content">edit</a>
|
||||
<xsl:text> </xsl:text><a href="newsverwaltung.php?news_id={news_id}&action=delete" target="content" onclick="return confdel();">delete</a>
|
||||
<script type="text/javascript">
|
||||
function confdel()
|
||||
{
|
||||
return confirm('Soll dieser Eintrag wirklich gelöscht werden?');
|
||||
}
|
||||
</script>
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="text">
|
||||
<xsl:value-of select="text" disable-output-escaping="yes" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</xsl:template>
|
||||
<xsl:template match="stg_extras">
|
||||
<h2><b><xsl:value-of select="stg_header" /></b></h2>
|
||||
<font face='Arial, Helvetica, sans-serif' size='2'>
|
||||
<br />
|
||||
<xsl:value-of select="stg_ltg_name" /><br />
|
||||
<xsl:apply-templates select="stg_ltg" />
|
||||
<br />
|
||||
<xsl:if test="gf_ltg">
|
||||
<xsl:value-of select="gf_ltg_name" /><br />
|
||||
<xsl:apply-templates select="gf_ltg" />
|
||||
<br />
|
||||
</xsl:if>
|
||||
<xsl:if test="stv_ltg">
|
||||
<xsl:value-of select="stv_ltg_name" /><br />
|
||||
<xsl:apply-templates select="stv_ltg" />
|
||||
<br />
|
||||
</xsl:if>
|
||||
<xsl:if test="ass">
|
||||
<xsl:value-of select="ass_name" /><br />
|
||||
<xsl:apply-templates select="ass" />
|
||||
<br />
|
||||
</xsl:if>
|
||||
<xsl:value-of select="zusatzinfo" disable-output-escaping="yes"/>
|
||||
<xsl:if test="stdv">
|
||||
<br />
|
||||
<xsl:value-of select="stdv_name" /><br />
|
||||
<xsl:apply-templates select="stdv" />
|
||||
<br />
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="cis_ext_menu" />
|
||||
</font>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="stg_ltg">
|
||||
<b><xsl:value-of select="name" /></b><br />
|
||||
<xsl:variable name="mail" select="email"></xsl:variable>
|
||||
<a href="mailto:{$mail}"><xsl:value-of select="email" /></a><br />
|
||||
Tel.:<xsl:value-of select="telefon" />
|
||||
<br />
|
||||
</xsl:template>
|
||||
<xsl:template match="gf_ltg">
|
||||
<b><xsl:value-of select="name" /></b><br />
|
||||
<xsl:variable name="mail" select="email"></xsl:variable>
|
||||
<a href="mailto:{$mail}"><xsl:value-of select="email" /></a><br />
|
||||
Tel.:<xsl:value-of select="telefon" />
|
||||
<br />
|
||||
</xsl:template>
|
||||
<xsl:template match="stv_ltg">
|
||||
<b><xsl:value-of select="name" /></b><br />
|
||||
<xsl:variable name="mail" select="email"></xsl:variable>
|
||||
<a href="mailto:{$mail}"><xsl:value-of select="email" /></a><br />
|
||||
Tel.:<xsl:value-of select="telefon" />
|
||||
<br />
|
||||
</xsl:template>
|
||||
<xsl:template match="ass">
|
||||
<b><xsl:value-of select="name" /></b><br />
|
||||
<xsl:variable name="mail" select="email"></xsl:variable>
|
||||
<a href="mailto:{$mail}"><xsl:value-of select="email" /></a><br />
|
||||
Tel.:<xsl:value-of select="telefon" />
|
||||
<br />
|
||||
</xsl:template>
|
||||
<xsl:template match="stdv">
|
||||
<xsl:variable name="mail" select="email"></xsl:variable>
|
||||
<a href="mailto:{$mail}"><xsl:value-of select="name" /></a><br />
|
||||
</xsl:template>
|
||||
<xsl:template match="cis_ext_menu">
|
||||
<xsl:variable name="kurzbz" select="kurzbz"></xsl:variable>
|
||||
<xsl:variable name="kurzbzlang" select="kurzbzlang"></xsl:variable>
|
||||
<img src="../skin/images/seperator.gif" /><xsl:text> </xsl:text><a href="../documents/{kurzbz}/lehrziele/" class="Item" target="_blank"><xsl:value-of select="lehrziele_name" /></a><br />
|
||||
<img src="../skin/images/seperator.gif" /><xsl:text> </xsl:text><a href="../documents/{kurzbz}/download/" class="Item" target="_blank"><xsl:value-of select="download_name" /></a><br />
|
||||
<img src="../skin/images/seperator.gif" /><xsl:text> </xsl:text><a href="news://news.technikum-wien.at/{kurzbzlang}" class="Item" target="_blank"><xsl:value-of select="newsgroup_name" /></a><br />
|
||||
</xsl:template>
|
||||
</xsl:stylesheet >
|
||||
|
||||
Reference in New Issue
Block a user