From ab8ac9f4fb61a2622a3b8dd68c6b9db0bc61e98f Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Wed, 11 Jun 2014 14:51:37 +0000 Subject: [PATCH] =?UTF-8?q?=C3=84nderungen=20Bewerbertool=20-=20neue=20Fel?= =?UTF-8?q?der=20Geburtsnation,=20Geburtsort,=20SNR=20Pflichtfeld=20bei=20?= =?UTF-8?q?AT=20Staatsb=C3=BCrger=20-=20Telefonnr=20-=20ZGV=20geschl=C3=B6?= =?UTF-8?q?scht=20-=20Info=20f=C3=BCr=20welchen=20Studiengang=20Dokument?= =?UTF-8?q?=20ben=C3=B6tigt=20wird?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/public/bewerbung.php | 213 ++++++++++++++++++++++++++++++++------- include/person.class.php | 14 +++ skin/images/info.png | Bin 0 -> 286 bytes 3 files changed, 193 insertions(+), 34 deletions(-) create mode 100755 skin/images/info.png diff --git a/cis/public/bewerbung.php b/cis/public/bewerbung.php index 7e5a4640d..e272ff8f5 100755 --- a/cis/public/bewerbung.php +++ b/cis/public/bewerbung.php @@ -50,6 +50,7 @@ require_once('../../include/akte.class.php'); require_once('../../include/mail.class.php'); require_once('../../include/studiensemester.class.php'); require_once('../../include/studienplan.class.php'); +require_once('../../include/basis_db.class.php'); $person_id = $_SESSION['bewerbung/personId']; $akte_id = isset($_GET['akte_id'])?$_GET['akte_id']:''; @@ -178,10 +179,15 @@ if(isset($_POST['btn_person'])) $person->staatsbuergerschaft = $_POST['staatsbuergerschaft']; $person->geschlecht = $_POST['geschlecht']; $person->svnr = $_POST['svnr']; - + $person->gebort = $_POST['gebort']; + $person->geburtsnation = $_POST['geburtsnation']; + $person->new = false; if(!$person->save()) $message=('Fehler beim Speichern der Person aufgetreten'); + + if($person->checkSvnr($person->svnr)) + $message = "SVNR bereits vorhanden"; } // Kontaktdaten speichern @@ -223,7 +229,44 @@ if(isset($_POST['btn_kontakt'])) $kontakt->save(); } - + + $kontakt_t = new kontakt(); + $kontakt_t->load_persKontakttyp($person->person_id, 'telefon'); + // gibt es schon kontakte von user + if(count($kontakt_t->result)>0) + { + // Es gibt bereits einen Emailkontakt + $kontakt_id = $kontakt_t->result[0]->kontakt_id; + + if($_POST['telefonnummer'] == '') + { + // löschen + $kontakt_t->delete($kontakt_id); + } + else + { + $kontakt_t->person_id = $person->person_id; + $kontakt_t->kontakt_id = $kontakt_id; + $kontakt_t->zustellung = true; + $kontakt_t->kontakttyp = 'telefon'; + $kontakt_t->kontakt = $_POST['telefonnummer']; + $kontakt_t->new = false; + + $kontakt_t->save(); + } + } + else + { + // neuen Kontakt anlegen + $kontakt_t->person_id = $person->person_id; + $kontakt_t->zustellung = true; + $kontakt_t->kontakttyp = 'telefon'; + $kontakt_t->kontakt = $_POST['telefonnummer']; + $kontakt_t->new = true; + + $kontakt_t->save(); + } + // Adresse Speichern if($_POST['strasse']!='' && $_POST['plz']!='' && $_POST['ort']!='') { @@ -425,6 +468,41 @@ function activeTab(tab_nr) $( "#tabs" ).tabs({ active: tab_nr }); } +function checkKontakt() +{ + if($("#telefonnummer").val() == '') + { + alert("Telefonnummer darf nicht leer sein!"); + return false; + } + + if($("#email").val() == '') + { + alert("Email-Adresse darf nicht leer sein!"); + return false; + } + + if($("#strasse").val() == '') + { + alert("Strasse darf nicht leer sein!"); + return false; + } + + if($("#plz").val() == '') + { + alert("Postleitzahl darf nicht leer sein!"); + return false; + } + + if($("#ort").val() == '') + { + alert("Ort darf nicht leer sein!"); + return false; + } + + return true; +} + function checkPerson() { if($("#nachname").val() == '') @@ -453,14 +531,27 @@ function checkPerson() return false; } } - - if($("#svnr").val() != '') + + // Berechnung der Sozialversicherungsnummer wenn AT + if($("#staatsbuergerschaft").val() == 'A') { - if($("#svnr").val().length != '10') + if($("#svnr").val().length != '10') { - alert("Ungültiger Sozialversicherungsnummer!"); + alert("Ungültige Sozialversicherungsnummer!"); return false; } + + var checksum = 0; + var soz_nr = $("#svnr").val(); + + checksum = (3*soz_nr[0])+(7*soz_nr[1])+(9*soz_nr[2])+(5*soz_nr[4])+(8*soz_nr[5])+(4*soz_nr[6])+(2*soz_nr[7])+(1*soz_nr[8])+(6*soz_nr[9]) + checksum = checksum%11; + + if(checksum != soz_nr[3]) + { + alert("Ungültige Sozialversicherungsnummer!"); + return false; + } } return true; @@ -564,11 +655,11 @@ padding: 5px;
@@ -632,6 +723,8 @@ padding: 5px; $nachname = ($person->nachname != '')?$person->nachname:''; $titelpost = ($person->titelpost != '')?$person->titelpost:''; $geburtstag = ($person->gebdatum != '')?$datum->formatDatum($person->gebdatum, 'd.m.Y'):''; + $gebort = ($person->gebort != '')?$person->gebort:''; + $svnr = ($person->svnr != '')?$person->svnr:''; echo " @@ -652,6 +745,22 @@ padding: 5px; Geburtsdatum* (dd.mm.yyyy): + + Geburtsort: + + + Geburtsnation: + + Sozialversicherungsnr.: @@ -681,20 +790,24 @@ padding: 5px; "; + echo $message; ?>
-
+ + + + +

Kontaktinformationen

load_persKontakttyp($person->person_id, 'email'); $email = isset($kontakt->result[0]->kontakt)?$kontakt->result[0]->kontakt:''; - + + $kontakt_t = new kontakt(); + $kontakt_t->load_persKontakttyp($person->person_id, 'telefon'); + $telefon = isset($kontakt_t->result[0]->kontakt)?$kontakt_t->result[0]->kontakt:''; + $adresse = new adresse(); $adresse->load_pers($person->person_id); $strasse = isset($adresse->result[0]->strasse)?$adresse->result[0]->strasse:''; $plz = isset($adresse->result[0]->plz)?$adresse->result[0]->plz:''; $ort = isset($adresse->result[0]->ort)?$adresse->result[0]->ort:''; $adr_nation = isset($adresse->result[0]->nation)?$adresse->result[0]->nation:''; + + echo " -
+ - + + + + + - + - + - + @@ -898,7 +1024,7 @@ $studiengang = new studiengang(); - +
Email*:
Email*:
Telefonnummer*:
 
Straße*: Straße*:
Postleitzahl*: Postleitzahl*:
Ort*: Ort*:
Nation*:  
   
"; @@ -917,7 +1043,7 @@ $studiengang = new studiengang(); echo ' -  '; +  '; foreach($dokumente_person->result as $dok) { @@ -934,8 +1060,8 @@ $studiengang = new studiengang(); // wird nachgereicht $status = ''; $nachgereicht_help = 'checked'; - $div = "".$akte->result[0]->anmerkung.""; - $aktion = ''; + $div = "".$akte->result[0]->anmerkung.""; + $aktion = ''; } else { @@ -945,7 +1071,7 @@ $studiengang = new studiengang(); // Dokument wurde bereits überprüft $status = ''; $nachgereicht_help = ''; - $div = ""; + $div = ""; $aktion = ''; } else @@ -953,8 +1079,8 @@ $studiengang = new studiengang(); // Dokument hochgeladen ohne überprüfung der Assistenz $status = ''; $nachgereicht_help = ''; - $div = ""; - $aktion = ''; + $div = ""; + $aktion = ''; } } @@ -964,11 +1090,30 @@ $studiengang = new studiengang(); // Dokument fehlt noch $status = ''; $aktion = ''; - $div = ""; + $div = ""; } - echo ""; + $ben_stg = new basis_db(); + $qry = "SELECT studiengang_kz FROM public.tbl_dokumentstudiengang + JOIN public.tbl_prestudent using (studiengang_kz) + JOIN public.tbl_dokument using (dokument_kurzbz) + WHERE dokument_kurzbz = ".$ben_stg->db_add_param($dok->dokument_kurzbz)." and person_id =".$ben_stg->db_add_param($person_id, FHC_INTEGER); + + $ben = "Benötigt für: \n"; + if($result = $ben_stg->db_query($qry)) + { + while($row = $ben_stg->db_fetch_object($result)) + { + $stg = new studiengang(); + $stg->load($row->studiengang_kz); + + $ben .= $stg->bezeichnung."\n"; + } + } + + + echo ""; } echo '
NameStatusAktion
NameStatusAktionInfo
".$dok->bezeichnung."".$status."".$aktion."".$div."
".$dok->bezeichnung."".$status."".$aktion."".$div."

@@ -1118,7 +1263,7 @@ $studiengang = new studiengang(); \ No newline at end of file +?> diff --git a/include/person.class.php b/include/person.class.php index e2478dff6..09b5e2e4a 100644 --- a/include/person.class.php +++ b/include/person.class.php @@ -833,5 +833,19 @@ class person extends basis_db return true; } + public function checkSvnr($svnr) + { + $qry = "Select 1 from public.tbl_person where svnr =".$this->db_add_param($svnr).";"; + + if($result = $this->db_query($qry)) + { + if($this->db_num_rows($result)>0) + return true; + else + return false; + } + + } + } ?> diff --git a/skin/images/info.png b/skin/images/info.png new file mode 100755 index 0000000000000000000000000000000000000000..cfe3ef02d7aa6d98a9ff0a1de32c4acef4bd3f1d GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3&Vd9T(EcfWT41pPZ!4! zi{7`BH)b(83bgJ2AFdd-adX!XgUUvQN8XvzK{s!)y>{kc`Dl14GV12Jr8}9KXIp>Q zOSPMkmiB#i-#wo?X!uRu?_nasxwK=Pk}3C!~&lGyAx!v?leW z*0KXZmsAyP$_1GeUe3|ZxqUe2U#tBL#%7ngfU8EkZp?18)lr?g?fS~yE9X17h-{lb iYnGeKMAOvpeT;MbtX^Dc-Czgw9)qW=pUXO@geCw))_Iu# literal 0 HcmV?d00001