*/ require_once ('../../config/cis.config.inc.php'); require_once ('../../config/global.config.inc.php'); require_once ('../../include/functions.inc.php'); require_once ('../../include/person.class.php'); require_once ('../../include/prestudent.class.php'); require_once ('../../include/benutzerberechtigung.class.php'); require_once ('../../include/akte.class.php'); require_once ('../../include/dokument.class.php'); require_once ('../../include/mail.class.php'); require_once ('../../include/phrasen.class.php'); require_once ('../../include/dms.class.php'); require_once ('../../include/fotostatus.class.php'); require_once ('../../include/studiensemester.class.php'); require_once ('../../include/nation.class.php'); require_once ('../../include/personlog.class.php'); //require_once ('../bewerbung.config.inc.php'); //require_once ('../include/functions.inc.php'); header("Content-Type: text/html; charset=utf-8"); // session_cache_limiter('none'); //muss gesetzt werden sonst funktioniert der Download mit IE8 nicht // session_start(); $sprache = getSprache(); $p = new phrasen($sprache); $log = new personlog(); $db = new basis_db(); if (isset($_GET['lang'])) setSprache($_GET['lang']); $person_id = isset($_GET['person_id']) ? $_GET['person_id'] : ''; $typ = isset($_GET['typ']) ? $_GET['typ'] : 'akte'; // Parameter ob das Bild aus der Akte oder der Person geladen werden soll $uid = get_uid(); $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($uid); if(!$rechte->isBerechtigt('basis/fhausweis','suid')) { die($rechte->errormsg); } $dokumenttyp = 'Lichtbil'; $error = ''; $message = ''; $dokumenttyp_upload = ''; $PHP_SELF = $_SERVER['PHP_SELF']; ?> <?php echo $p->t('bewerbung/fileUpload'); ?> '; if ($error === false) { echo '
'.$message.'
'; } elseif ($error === true) { echo '
'.$p->t('global/fehleraufgetreten').' '.$message.'
'; } echo ''; if ($person_id != '') { echo '

Upload Image
'; // Container für Bildzuschnitt echo '
'; echo'

'; } else { echo $p->t('bewerbung/fehlerKeinePersonId'); } function resize($filename, $width, $height) { $ext = explode('.', $_FILES['file']['name']); $ext = mb_strtolower($ext[count($ext) - 1]); // Hoehe und Breite neu berechnen list ($width_orig, $height_orig) = getimagesize($filename); if ($width && ($width_orig < $height_orig)) { $width = ($height / $height_orig) * $width_orig; } else { $height = ($width / $width_orig) * $height_orig; } $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); // Bild nur verkleinern aber nicht vergroessern if ($width_orig > $width || $height_orig > $height) imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); else $image_p = $image; $tmpfname = tempnam(sys_get_temp_dir(), 'FHC'); imagejpeg($image_p, $tmpfname, 80); imagedestroy($image_p); @imagedestroy($image); return $tmpfname; } ?>