diff --git a/cis/public/bildupload.php b/cis/public/bildupload.php new file mode 100644 index 000000000..feaa06c62 --- /dev/null +++ b/cis/public/bildupload.php @@ -0,0 +1,203 @@ +, + * Andreas Oesterreicher and + * Rudolf Hangl < rudolf.hangl@technikum-wien.at > + * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > + * + */ + +// Oberflaeche zum Upload von Bildern +session_start(); +require_once('../../config/cis.config.inc.php'); +require_once('../../include/functions.inc.php'); +require_once('../../include/person.class.php'); +require_once('../../include/benutzer.class.php'); +require_once('../../include/akte.class.php'); +require_once('../../include/phrasen.class.php'); + +//$user = get_uid(); Besitzt noch keine uid +$user = ''; +$sprache = getSprache(); +$p = new phrasen($sprache); + +echo ' + + + + + '.$p->t('profil/Bildupload').' + + +

'.$p->t('profil/Bildupload').'

'; + + +if(!isset($_SESSION['prestudent/user']) || $_SESSION['prestudent/user']=='') + exit('Keine Berechtigung zum Bildupload.'); + +function resize($filename, $width, $height) +{ + $ext = explode('.',$_FILES['bild']['name']); + $ext = 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; + + imagejpeg($image_p, $filename, 80); + + @imagedestroy($image_p); + @imagedestroy($image); +} + +if(!isset($_GET['person_id'])) + die($p->t('global/fehlerBeiDerParameteruebergabe')); + +//Bei Upload des Bildes +if(isset($_POST['submitbild'])) +{ + if(isset($_FILES['bild']['tmp_name'])) + { + //Extension herausfiltern + $ext = explode('.',$_FILES['bild']['name']); + $ext = mb_strtolower($ext[count($ext)-1]); + + $width=101; + $height=130; + + //--check that it's a jpeg + if ($ext=='jpg' || $ext=='jpeg') + { + $filename = $_FILES['bild']['tmp_name']; + + //groesse auf maximal 827x1063 begrenzen + resize($filename, 827, 1063); + + $fp = fopen($filename,'r'); + //auslesen + $content = fread($fp, filesize($filename)); + fclose($fp); + + $akte = new akte(); + + if($akte->getAkten($_GET['person_id'], 'Lichtbil')) + { + if(count($akte->result)>0) + { + $akte = $akte->result[0]; + $akte->new = false; + } + else + $akte->new = true; + } + else + { + $akte->new = true; + } + + $akte->dokument_kurzbz = 'Lichtbil'; + $akte->person_id = $_GET['person_id']; + $akte->inhalt = base64_encode($content); + $akte->mimetype = "image/jpg"; + $akte->erstelltam = date('Y-m-d H:i:s'); + $akte->gedruckt = false; + $akte->titel = "Lichtbild_".$_GET['person_id'].".jpg"; + $akte->bezeichnung = "Lichtbild gross"; + $akte->updateamum = date('Y-m-d H:i:s'); + $akte->updatevon = $user; + $akte->insertamum = date('Y-m-d H:i:s'); + $akte->insertvon = $user; + $akte->uid = ''; + + if(!$akte->save()) + { + echo "Fehler: $akte->errormsg"; + } + + //groesse auf maximal 101x130 begrenzen + resize($filename, 101, 130); + + //in DB speichern + //File oeffnen + $fp = fopen($filename,'r'); + //auslesen + $content = fread($fp, filesize($filename)); + fclose($fp); + //in base64-Werte umrechnen + $content = base64_encode($content); + + $person = new person(); + if($person->load($_GET['person_id'])) + { + //base64 Wert in die Datenbank speichern + $person->foto = $content; + $person->new = false; + if($person->save()) + echo "Bild wurde erfolgreich gespeichert +
"; + else + echo ''.$person->errormsg.'
'; + } + else + echo ''.$person->errormsg.'
'; + } + else + echo ''.$p->t('profil/nurJPGBilder').'
'; + } +} + +echo '
'; +echo $p->t('profil/BilduploadInfotext',array($p->t('dms_link/bildRichtlinien'))).'

+
+ '.$p->t('profil/Bild').': + +
+ '; + +?> + + diff --git a/cis/public/prestudententool/auth.php b/cis/public/prestudententool/auth.php new file mode 100755 index 000000000..026a0f691 --- /dev/null +++ b/cis/public/prestudententool/auth.php @@ -0,0 +1,32 @@ + + * + */ + session_cache_limiter('none'); //muss gesetzt werden sonst funktioniert der Download mit IE8 nicht + session_start(); + + if (!isset($_SESSION['prestudent/user']) || $_SESSION['prestudent/user']=='') + { + $_SESSION['request_uri']=$_SERVER['REQUEST_URI']; + + header('Location: index.php'); + exit; + } +?> diff --git a/cis/public/prestudententool/index.php b/cis/public/prestudententool/index.php new file mode 100755 index 000000000..f12a23d51 --- /dev/null +++ b/cis/public/prestudententool/index.php @@ -0,0 +1,115 @@ + + * + */ + +require_once('../../../config/cis.config.inc.php'); +require_once('../../../include/phrasen.class.php'); +require_once('../../../include/person.class.php'); + +if(isset($_GET['lang'])) + setSprache($_GET['lang']); + +$sprache = getSprache(); +$p=new phrasen($sprache); + +if (isset($_POST['userid'])) +{ + $login = $_REQUEST['userid']; + $person = new person(); + + session_start(); + + $person_id=$person->checkZugangscode($login); + + //Zugangscode wird überprüft + if($person_id != false) + { + $_SESSION['prestudent/user'] = $login; + $_SESSION['prestudent/person_id'] = $person_id; + + header('Location: prestudent.php'); + exit; + } + else + { + $errormsg= $p->t('incoming/ungueltigerbenutzer'); + } +} + +?> + + + + Prestudenten-Tool + + + + + + + + + + + +
t("global/sprache")." "; + echo ''.$p->t("global/englisch").' | + '.$p->t("global/deutsch").'
';?> +
+
+ + + + + + + +

Willkommen an der Fachhochschule Technikum Wien.
Bitte geben Sie Ihren Zugangscode ein:

+ + + + + + + + + + + + + + + + + + + + + + + + +
 
 
 
 
 
+
+
+ + \ No newline at end of file diff --git a/cis/public/prestudententool/logout.php b/cis/public/prestudententool/logout.php new file mode 100644 index 000000000..bc58252c1 --- /dev/null +++ b/cis/public/prestudententool/logout.php @@ -0,0 +1,63 @@ +, + * Andreas Oesterreicher and + * Karl Burkhart . + */ +?> + + + + + Logout + + + + + +
+
+ Sie wurden erfolgreich ausgeloggt!!
Sie werden sofort weitergeleitet!
+
+ + '; + } +?> +
+Sollten Sie nicht weitergeleitet werden klicken Sie bitte hier + + + diff --git a/cis/public/prestudententool/prestudent.php b/cis/public/prestudententool/prestudent.php new file mode 100755 index 000000000..77814f47d --- /dev/null +++ b/cis/public/prestudententool/prestudent.php @@ -0,0 +1,137 @@ + + * + */ + +require_once('../../../config/cis.config.inc.php'); +require_once('auth.php'); +require_once('../../../include/phrasen.class.php'); +require_once('../../../include/person.class.php'); +require_once('../../../include/datum.class.php'); +require_once('../../../include/prestudent.class.php'); +require_once('../../../include/studiengang.class.php'); + +if(isset($_GET['lang'])) + setSprache($_GET['lang']); + +$sprache = getSprache(); +$p = new phrasen($sprache); + +$person_id = $_SESSION['prestudent/person_id']; + +$person = new person(); +$person->load($person_id); + +$datum = new datum(); + +$prestudent = new prestudent(); +$prestudent->getPrestudenten($person->person_id); +if(isset($prestudent->result[0]->studiengang_kz )) + $studiengang_kz = $prestudent->result[0]->studiengang_kz; +else + $studiengang_kz = ''; + +$studiengang = new studiengang(); +$studiengang->load($studiengang_kz); + +$method = (isset($_GET['method'])?$_GET['method']:''); +$mail = ($studiengang->email!='')?$studiengang->email:MAIL_ADMIN; + +?> + + + + + + Prestudententool + + + + + + + + + + +
Administrationtitelpre." ".$person->vorname." ".$person->nachname." ".$person->titelpost?> + t("global/sprache")." "; + echo ''.$p->t("global/englisch").' | + '.$p->t("global/deutsch").'
';?>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
'.$p->t('global/vorname').':'.$person->vorname.''.$person->person_id.'
'.$p->t('global/nachname').':'.$person->nachname.'
'.$p->t('global/geburtsdatum').':'.$datum->formatDatum($person->gebdatum, 'd.m.Y').'
'.$p->t('global/titel').' Pre'.$person->titelpre.'
'.$p->t('global/titel').' Post'.$person->titelpost.'
 
'.$p->t('global/emailAnAssistenz').'
+ '; + } + else // Hauptmenü anzeigen + { + echo ' +



+
+ + + + + '; + echo ""; + echo' +
1. '.$p->t('incoming/profil').'
2. ".$p->t('profil/bildHochladen')."
+ + + + +
'.$p->t('global/abmelden').'
+
'; + } + ?> + + \ No newline at end of file