Dokumentenakt

- Neue Vorlage für Bewerberakt
- Abfrage, ob Mimetype von Akte und DMS ident
- Diverse neue Attribute für DataArray (Adresse, Kontakt, ...)
This commit is contained in:
kindlm
2016-11-23 17:05:25 +01:00
parent 07556cc78d
commit ca09e22c09
4 changed files with 1162 additions and 73 deletions
+16 -1
View File
@@ -305,7 +305,20 @@ class notiz extends basis_db
* @param $anrechnung_id
* @return boolean
*/
public function getNotiz($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $stundenplandev_id=null, $anrechnung_id=null)
public function getNotiz(
$erledigt=null,
$projekt_kurzbz=null,
$projektphase_id=null,
$projekttask_id=null,
$uid=null,
$person_id=null,
$prestudent_id=null,
$bestellung_id=null,
$user=null,
$lehreinheit_id=null,
$stundenplandev_id=null,
$anrechnung_id=null,
$titel=null)
{
$qry = "SELECT
*
@@ -341,6 +354,8 @@ class notiz extends basis_db
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
if($anrechnung_id!='')
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
if($titel!='')
$qry.=" AND titel=".$this->db_add_param($titel);
$qry.=' ORDER BY start, ende, titel';
+22 -7
View File
@@ -76,24 +76,39 @@ class Pdf
}
$s = getimagesize($image);
$margin_left_right = 18;
$margin_bottom = 18;
/*
* längere Seite ermitteln
* Hochformat wenn die Seiten gleich lang sind.
* Hochformat wenn die Seiten gleich lang sind oder das Bild schmäler ist als die Seitenbreite
*/
if($s[0] > $s[1])
if($s[0] > $s[1] && $s[0] > 595)
{
$height = 595;
$width = 842;
$page_height = 595;
$page_width = 842;
//Wenn Bild kleiner oder gleich Seitenbreite, dann margin erhoehen
if ($s[0] <= $page_width)
{
$margin_left_right = ($page_width - $s[0]) / 2;
$margin_bottom = ($page_height - $s[1]);
}
}
else
{
$height = 842;
$width = 595;
$page_height = 842;
$page_width = 595;
//Wenn Bild kleiner oder gleich Seitenbreite, dann margin erhoehen
if ($s[0] <= $page_width)
{
$margin_left_right = ($page_width - $s[0]) / 2;
$margin_bottom = ($page_height - $s[1]);
}
}
// -r300 = 300 ppi
$cmd = 'gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -r100 -o '.$outFile.' viewjpeg.ps -c "('.$image.') << /PageSize [' . $width . ' ' . $height .'] /.HWMargins [18 18 18 13.5] /countspaces { [ exch { dup 32 ne { pop } if } forall ] length } bind def >> setpagedevice viewJPEG"';
$cmd = 'gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -r100 -o '.$outFile.' viewjpeg.ps -c "('.$image.') << /PageSize [' . $page_width . ' ' . $page_height .'] /.HWMargins ['.$margin_left_right.' '.$margin_bottom.' '.$margin_left_right.' 18] /countspaces { [ exch { dup 32 ne { pop } if } forall ] length } bind def >> setpagedevice viewJPEG"';
exec($cmd, $out, $ret);
if($ret!=0)