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 "
-
";
@@ -917,7 +1043,7 @@ $studiengang = new studiengang();
echo '
- | Name | Status | Aktion | |
';
+ | Name | Status | Aktion | | Info |
';
foreach($dokumente_person->result as $dok)
{
@@ -934,8 +1060,8 @@ $studiengang = new studiengang();
// wird nachgereicht
$status = '
';
$nachgereicht_help = 'checked';
- $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 "| ".$dok->bezeichnung." | ".$status." | ".$aktion." | ".$div." |
";
+ $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 "| ".$dok->bezeichnung." | ".$status." | ".$aktion." | ".$div." |  |
";
}
echo '
@@ -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 000000000..cfe3ef02d
Binary files /dev/null and b/skin/images/info.png differ