mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-05 06:09:27 +00:00
This commit is contained in:
@@ -39,7 +39,12 @@ require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/mail.class.php');
|
||||
if (!$db = new basis_db())
|
||||
$db=false;
|
||||
|
||||
$aktion='';
|
||||
if(isset($_REQUEST['aktion']))
|
||||
{
|
||||
$aktion=$_REQUEST['aktion'];
|
||||
}
|
||||
$zipfile='';
|
||||
$stg_kz=(isset($_REQUEST['stg_kz'])?$_REQUEST['stg_kz']:0);
|
||||
$abgabetyp=(isset($_REQUEST['abgabetyp'])?$_REQUEST['abgabetyp']:'');
|
||||
if(!is_numeric($stg_kz) && $stg_kz!='')
|
||||
@@ -50,6 +55,7 @@ $user = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
$berechtigung_kurzbz = 'lehre/abgabetool:download';
|
||||
|
||||
if(isset($_GET['id']) && isset($_GET['uid']))
|
||||
{
|
||||
if($rechte->isBerechtigt($berechtigung_kurzbz))
|
||||
@@ -67,39 +73,42 @@ if(isset($_GET['id']) && isset($_GET['uid']))
|
||||
{
|
||||
die("Sie haben hierzu keine Berechtigung!");
|
||||
}
|
||||
exit;
|
||||
exit();
|
||||
}
|
||||
$s = new studiengang();
|
||||
$s->loadArray($rechte->getStgKz($berechtigung_kurzbz),'studiengang_kz');
|
||||
|
||||
echo'<form method="GET" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
|
||||
echo " Studiengang: <SELECT name='stg_kz'>";
|
||||
foreach ($s->result as $stg)
|
||||
if($aktion!='zip')
|
||||
{
|
||||
if($stg->studiengang_kz==$stg_kz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
echo '<option value="'.$stg->studiengang_kz.'" '.$selected.'>'.$stg->kuerzel.'</option>';
|
||||
}
|
||||
echo "</SELECT>";
|
||||
echo " Abgabetyp: <SELECT name='abgabetyp'>";
|
||||
$qry_atyp="SELECT * FROM campus.tbl_paabgabetyp";
|
||||
if($result_atyp=$db->db_query($qry_atyp))
|
||||
{
|
||||
while($row_atyp=$db->db_fetch_object($result_atyp))
|
||||
$s = new studiengang();
|
||||
$s->loadArray($rechte->getStgKz($berechtigung_kurzbz),'typ,kurzbz');
|
||||
|
||||
echo'<form method="GET" action="'.$_SERVER['PHP_SELF'].'" name="abgabeFrm">';
|
||||
|
||||
echo " Studiengang: <SELECT name='stg_kz'>";
|
||||
foreach ($s->result as $stg)
|
||||
{
|
||||
if($row_atyp->paabgabetyp_kurzbz==$abgabetyp)
|
||||
if($stg->studiengang_kz==$stg_kz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
echo '<option value="'.$row_atyp->paabgabetyp_kurzbz.'" '.$selected.'>'.$row_atyp->bezeichnung.'</option>';
|
||||
echo '<option value="'.$stg->studiengang_kz.'" '.$selected.'>'.$stg->kuerzel.'</option>';
|
||||
}
|
||||
echo "</SELECT><input type=hidden name=aktion value=\"\">";
|
||||
echo " Abgabetyp: <SELECT name='abgabetyp'>";
|
||||
$qry_atyp="SELECT * FROM campus.tbl_paabgabetyp";
|
||||
if($result_atyp=$db->db_query($qry_atyp))
|
||||
{
|
||||
while($row_atyp=$db->db_fetch_object($result_atyp))
|
||||
{
|
||||
if($row_atyp->paabgabetyp_kurzbz==$abgabetyp)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
echo '<option value="'.$row_atyp->paabgabetyp_kurzbz.'" '.$selected.'>'.$row_atyp->bezeichnung.'</option>';
|
||||
}
|
||||
}
|
||||
echo "</SELECT>";
|
||||
|
||||
echo " <INPUT type='submit' value='OK'> <INPUT type='button' value='ZIP' onclick=\"f=document.abgabeFrm;f.aktion.value='zip';f.submit();\"></FORM>";
|
||||
}
|
||||
}
|
||||
echo "</SELECT>";
|
||||
|
||||
echo " <INPUT type='submit' value='OK'></FORM>";
|
||||
if($stg_kz!='')
|
||||
{
|
||||
$s=new studiengang();
|
||||
@@ -159,8 +168,18 @@ if($stg_kz!='')
|
||||
$htmlstr .= "<td>".$row->nachname."</td>\n";
|
||||
$htmlstr .= "<td>".$row->projekttyp_kurzbz."</td>\n";
|
||||
$htmlstr .= "<td>".$row->titel."</td>\n";
|
||||
if($aktion=='zip')
|
||||
{
|
||||
if($zipfile=='')
|
||||
{
|
||||
$zipfile = $row->paabgabe_id.'_'.$row->uid.'.pdf';
|
||||
}
|
||||
else
|
||||
{
|
||||
$zipfile .= " ".$row->paabgabe_id.'_'.$row->uid.'.pdf';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -168,19 +187,41 @@ if($stg_kz!='')
|
||||
die("Keine Zugriffsberechtigung!");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Projektabgabe</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../include/js/tablesort/table.css" type="text/css">
|
||||
<script src="../../include/js/tablesort/table.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body class="background_main">
|
||||
<?php
|
||||
echo $htmlstr;
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
if($zipfile=='')
|
||||
{
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Projektabgabe</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../include/js/tablesort/table.css" type="text/css">
|
||||
<script src="../../include/js/tablesort/table.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body class="background_main">
|
||||
<?php
|
||||
echo $htmlstr;
|
||||
echo "</body>
|
||||
</html>";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Zip File erstellen
|
||||
chdir(PAABGABE_PATH);
|
||||
$zipausgabe=tempnam("/tmp", "PAA").".zip";
|
||||
exec("zip ".$zipausgabe." ".$zipfile);
|
||||
//echo $zipausgabe;
|
||||
//echo "<br>zip -r ".$zipausgabe." ".$zipfile;
|
||||
if(file_exists($zipausgabe))
|
||||
{
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-disposition: attachment; filename="Abgabe_'.$s->kuerzel.'.zip"');
|
||||
echo file_get_contents($zipausgabe);
|
||||
unlink($zipausgabe);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br>Fehler bei der Dateierstellung!";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -571,15 +571,34 @@ if(isset($_POST["enda"]))
|
||||
abgabedatum = now(),
|
||||
updatevon = '".$user."',
|
||||
updateamum = now()
|
||||
WHERE paabgabe_id='".$paabgabe_id."' AND insertvon='$user'";
|
||||
WHERE paabgabe_id='".$paabgabe_id."'";
|
||||
//echo $qry;
|
||||
if(!$result=$db->db_query($qry))
|
||||
{
|
||||
echo "<font color=\"#FF0000\">Terminänderung konnte nicht eingetragen werden!</font><br> ";
|
||||
echo "<font color=\"#FF0000\">Terminbestätigung konnte nicht eingetragen werden!</font><br> ";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Endabgabedatum wurde eingetragen.";
|
||||
echo "Endabgabe-Bestätigungsdatum wurde eingetragen.";
|
||||
}
|
||||
}
|
||||
//Bestätigen einer Benotung - erfolgt in Sekretariat
|
||||
if(isset($_POST["note"]))
|
||||
{
|
||||
//Abgabetermin mit akt. Datum speichern
|
||||
$qry="UPDATE campus.tbl_paabgabe SET
|
||||
abgabedatum = now(),
|
||||
updatevon = '".$user."',
|
||||
updateamum = now()
|
||||
WHERE paabgabe_id='".$paabgabe_id."'";
|
||||
//echo $qry;
|
||||
if(!$result=$db->db_query($qry))
|
||||
{
|
||||
echo "<font color=\"#FF0000\">Terminbestätigung konnte nicht eingetragen werden!</font><br> ";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Benotung-Bestätigungsdatum wurde eingetragen.";
|
||||
}
|
||||
}
|
||||
$studentenname='';
|
||||
@@ -690,10 +709,14 @@ $htmlstr .= "<tr><td>fix</td><td>Datum</td><td>Abgabetyp</td><td>Kurzbeschreibun
|
||||
{
|
||||
$htmlstr .= " <td> </td><td> </td>";
|
||||
}
|
||||
if($row->paabgabetyp_kurzbz=='enda')
|
||||
if($row->paabgabetyp_kurzbz=='enda' && $row->abgabedatum==NULL)
|
||||
{
|
||||
$htmlstr .= " <td width=50px><input type='submit' name='enda' value='bestätigen' title='Endabgabe bestätigen'></td>";
|
||||
}
|
||||
elseif($row->paabgabetyp_kurzbz=='note' && $row->abgabedatum==NULL)
|
||||
{
|
||||
$htmlstr .= " <td width=50px><input type='submit' name='note' value='bestätigen' title='Notenabgabe bestätigen'></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf'))
|
||||
@@ -777,20 +800,17 @@ function Test($arr=constLeer,$lfd=0,$displayShow=true,$onlyRoot=false )
|
||||
$tmpAnzeigeStufe.="=>";
|
||||
|
||||
while (list( $tmp_key, $tmp_value ) = each($arr) )
|
||||
|
||||
{
|
||||
|
||||
if (!$onlyRoot && (is_array($tmp_value) || is_object($tmp_value)) && count($tmp_value) >0)
|
||||
|
||||
{
|
||||
|
||||
$tmpArrayString.="<br>$tmpAnzeigeStufe <b>$tmp_key</b>".Test($tmp_value,$lfdnr);
|
||||
|
||||
} else if ( (is_array($tmp_value) || is_object($tmp_value)) )
|
||||
|
||||
{
|
||||
|
||||
$tmpArrayString.="<br>$tmpAnzeigeStufe <b>$tmp_key -- 0 Records</b>";
|
||||
$tmpArrayString.="<br>$tmpAnzeigeStufe <b>$tmp_key -- 0 Records</b>";
|
||||
|
||||
} else if ($tmp_value!='')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user