mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 01:42:17 +00:00
Merge branch 'master' of https://github.com/FH-Complete/FHC-Core
# Conflicts: # include/lehreinheitmitarbeiter.class.php
This commit is contained in:
+32
-31
@@ -38,7 +38,7 @@ require_once('../../include/studiengang.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||
|
||||
|
||||
$user = get_uid();
|
||||
loadVariables($user);
|
||||
|
||||
@@ -61,9 +61,9 @@ else
|
||||
|
||||
if(isset($_GET['version']) && is_numeric($_GET['version']))
|
||||
$version = $_GET['version'];
|
||||
else
|
||||
else
|
||||
$version ='';
|
||||
|
||||
|
||||
if(isset($_GET['xsl_oe_kurzbz']))
|
||||
$xsl_oe_kurzbz=$_GET['xsl_oe_kurzbz'];
|
||||
else
|
||||
@@ -132,11 +132,12 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
$buchungstypen = unserialize (CIS_DOKUMENTE_STUDIENBEITRAG_TYPEN);
|
||||
}
|
||||
|
||||
$stsem_zahlung = $konto->getLastStSemBuchungstypen($user, $buchungstypen);
|
||||
|
||||
if(isset($_GET['ss']))
|
||||
$stsem_zahlung = $konto->getLastStSemBuchungstypen($user, $buchungstypen, $_GET['ss']);
|
||||
|
||||
if((($xsl=='Inskription') || ($xsl == 'Studienblatt')) && ($_GET["ss"] != $stsem_zahlung))
|
||||
{
|
||||
die('Der Studienbeitrag wurde noch nicht bezahlt');
|
||||
die('Der Studienbeitrag wurde noch nicht bezahlt');
|
||||
}
|
||||
if(isset($_GET['buchungsnummern']))
|
||||
{
|
||||
@@ -160,11 +161,11 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
//echo $xml_url;
|
||||
// Load the XML source
|
||||
$xml_doc = new DOMDocument;
|
||||
|
||||
|
||||
if(!$xml_doc->load($xml_url))
|
||||
die('unable to load xml');
|
||||
//echo ':'.$xml_doc->saveXML().':';
|
||||
|
||||
|
||||
//XSL aus der DB holen
|
||||
$vorlage = new vorlage();
|
||||
if($xsl_oe_kurzbz!='')
|
||||
@@ -175,7 +176,7 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
{
|
||||
if($xsl_stg_kz=='')
|
||||
$xsl_stg_kz='0';
|
||||
|
||||
|
||||
$vorlage->getAktuelleVorlage($xsl_stg_kz, $xsl, $version);
|
||||
}
|
||||
|
||||
@@ -185,12 +186,12 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
{
|
||||
case 'application/vnd.oasis.opendocument.text':
|
||||
$endung = 'odt';
|
||||
break;
|
||||
break;
|
||||
case 'application/vnd.oasis.opendocument.spreadsheet':
|
||||
$endung = 'ods';
|
||||
break;
|
||||
$endung = 'ods';
|
||||
break;
|
||||
default:
|
||||
$endung = 'pdf';
|
||||
$endung = 'pdf';
|
||||
}
|
||||
|
||||
// Load the XSL source
|
||||
@@ -198,11 +199,11 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
|
||||
if(!$xsl_doc->loadXML($vorlage->text))
|
||||
die('unable to load xsl');
|
||||
|
||||
|
||||
// Configure the transformer
|
||||
$proc = new XSLTProcessor;
|
||||
$proc->importStyleSheet($xsl_doc); // attach the xsl rules
|
||||
|
||||
|
||||
$buffer = $proc->transformToXml($xml_doc);
|
||||
//echo $buffer;
|
||||
//exit;
|
||||
@@ -212,7 +213,7 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
file_put_contents('content.xml', $buffer);
|
||||
|
||||
// Wenn ein Style XSL uebergeben wurde wird ein zweites XML File erstellt mit den
|
||||
// Styleanweisungen und ebenfalls zum Zip hinzugefuegt
|
||||
// Styleanweisungen und ebenfalls zum Zip hinzugefuegt
|
||||
if(isset($_GET['style_xsl']))
|
||||
{
|
||||
$style_xsl=$_GET['style_xsl'];
|
||||
@@ -246,8 +247,8 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
}
|
||||
if(!$vorlage_found)
|
||||
$zipfile = DOC_ROOT.'/system/vorlage_zip/'.$vorlage->vorlage_kurzbz.'.'.$endung;
|
||||
|
||||
|
||||
|
||||
|
||||
$tempname_zip = 'out.zip';
|
||||
if(copy($zipfile, $tempname_zip))
|
||||
{
|
||||
@@ -255,10 +256,10 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
if(isset($_GET['style_xsl']))
|
||||
exec("zip $tempname_zip styles.xml");
|
||||
|
||||
clearstatcache();
|
||||
clearstatcache();
|
||||
if($vorlage->bezeichnung!='')
|
||||
$filename = $vorlage->bezeichnung;
|
||||
else
|
||||
else
|
||||
$filename = $vorlage->vorlage_kurzbz;
|
||||
if($output == 'pdf')
|
||||
{
|
||||
@@ -287,12 +288,12 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
$filename = $filename.'.pdf';
|
||||
}
|
||||
exec("unoconv -e IsSkipEmptyPages=false --stdout -f pdf $tempname_zip > $tempPdfName");
|
||||
|
||||
$fsize = filesize($tempPdfName);
|
||||
|
||||
$fsize = filesize($tempPdfName);
|
||||
$handle = fopen($tempPdfName,'r');
|
||||
header('Content-type: application/pdf');
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
header('Content-Length: '.$fsize);
|
||||
header('Content-Length: '.$fsize);
|
||||
}
|
||||
else if($output =='odt')
|
||||
{
|
||||
@@ -306,8 +307,8 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
$handle = fopen($tempname_zip,'r');
|
||||
header('Content-type: '.$vorlage->mimetype);
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'.'.$endung.'"');
|
||||
header('Content-Length: '.$fsize);
|
||||
}
|
||||
header('Content-Length: '.$fsize);
|
||||
}
|
||||
else if($output =='doc')
|
||||
{
|
||||
$tempPdfName = $vorlage->vorlage_kurzbz.'.doc';
|
||||
@@ -317,19 +318,19 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
$studienordnung->loadStudienordnung($_GET['studienordnung_id']);
|
||||
$filename = $filename.'_'.$studienordnung->studiengangkurzbzlang.'.doc';
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$filename = $filename.'.doc';
|
||||
}
|
||||
exec("unoconv -e IsSkipEmptyPages=false --stdout -f doc $tempname_zip > $tempPdfName");
|
||||
|
||||
$fsize = filesize($tempPdfName);
|
||||
|
||||
$fsize = filesize($tempPdfName);
|
||||
$handle = fopen($tempPdfName,'r');
|
||||
header('Content-type: application/vnd.ms-word');
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
header('Content-Length: '.$fsize);
|
||||
header('Content-Length: '.$fsize);
|
||||
}
|
||||
while (!feof($handle))
|
||||
while (!feof($handle))
|
||||
{
|
||||
echo fread($handle, 8192);
|
||||
}
|
||||
@@ -365,7 +366,7 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
|
||||
//wenn uid gefunden wird, dann den Nachnamen zum Dateinamen dazuhaengen
|
||||
$nachname='';
|
||||
|
||||
|
||||
|
||||
if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user