mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
Incomingverwaltung
- Logo Pfad korrigiert - Capture bei Incoming Registrierung hinzugefügt - Mailtexte überarbeitet
This commit is contained in:
+520
-493
File diff suppressed because it is too large
Load Diff
@@ -19,31 +19,31 @@
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Karl Burkhart <burkhart@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
|
||||
require_once '../../../config/cis.config.inc.php';
|
||||
require_once '../../../include/phrasen.class.php';
|
||||
require_once '../../../include/person.class.php';
|
||||
require_once '../../../include/person.class.php';
|
||||
|
||||
if(isset($_GET['lang']))
|
||||
setSprache($_GET['lang']);
|
||||
|
||||
$sprache = getSprache();
|
||||
$p=new phrasen($sprache);
|
||||
$sprache = getSprache();
|
||||
$p=new phrasen($sprache);
|
||||
|
||||
if (isset($_POST['userid']))
|
||||
if (isset($_POST['userid']))
|
||||
{
|
||||
$login = $_REQUEST['userid'];
|
||||
$person = new person();
|
||||
|
||||
$login = $_REQUEST['userid'];
|
||||
$person = new person();
|
||||
|
||||
session_start();
|
||||
|
||||
$preincoming=$person->checkZugangscodeIncoming($login);
|
||||
|
||||
|
||||
$preincoming=$person->checkZugangscodeIncoming($login);
|
||||
|
||||
//Zugangscode wird überprüft
|
||||
if($preincoming != false)
|
||||
{
|
||||
$_SESSION['incoming/user'] = $login;
|
||||
$_SESSION['incoming/preincomingid'] = $preincoming;
|
||||
$_SESSION['incoming/preincomingid'] = $preincoming;
|
||||
|
||||
header('Location: incoming.php');
|
||||
exit;
|
||||
@@ -67,19 +67,19 @@ if (isset($_POST['userid']))
|
||||
<table width="100%" border="0">
|
||||
<tr>
|
||||
<td align="left"></td>
|
||||
<td align ="right"><?php
|
||||
<td align ="right"><?php
|
||||
echo $p->t("global/sprache")." ";
|
||||
echo '<a href="'.$_SERVER['PHP_SELF'].'?lang=English">'.$p->t("global/englisch").'</a> |
|
||||
echo '<a href="'.$_SERVER['PHP_SELF'].'?lang=English">'.$p->t("global/englisch").'</a> |
|
||||
<a href="'.$_SERVER['PHP_SELF'].'?lang=German">'.$p->t("global/deutsch").'</a><br>';?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<form action ="index.php" method="POST">
|
||||
<table border ="0" width ="100%" height="40%">
|
||||
<tr height="50%">
|
||||
<td align ="center" valign="center"><h3><?php echo $p->t('incoming/welcomeToUAS');?></h3><span style="font-size:1.2em"></span></td>
|
||||
<td align ="center" valign="center"><h3><?php echo $p->t('incoming/welcomeToUAS',array(CAMPUS_NAME));?></h3><span style="font-size:1.2em"></span></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td align="center" valign="bottom"> <img src="../../../skin/images/tw_logo_02.jpg"></td>
|
||||
<td align="center" valign="bottom"> <img src="../../../skin/styles/<?php echo DEFAULT_STYLE ?>/logo.png"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border ="0" width ="100%">
|
||||
@@ -110,7 +110,7 @@ if (isset($_POST['userid']))
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -26,25 +26,26 @@ require_once '../../../include/nation.class.php';
|
||||
require_once '../../../include/functions.inc.php';
|
||||
require_once '../../../include/phrasen.class.php';
|
||||
require_once '../../../include/adresse.class.php';
|
||||
require_once '../../../include/kontakt.class.php';
|
||||
require_once '../../../include/preincoming.class.php';
|
||||
require_once '../../../include/kontakt.class.php';
|
||||
require_once '../../../include/preincoming.class.php';
|
||||
require_once '../../../include/mail.class.php';
|
||||
require_once '../../../include/securimage/securimage.php';
|
||||
|
||||
|
||||
if(isset($_GET['lang']))
|
||||
setSprache($_GET['lang']);
|
||||
|
||||
$sprache = getSprache();
|
||||
$p=new phrasen($sprache);
|
||||
|
||||
$nation = new nation();
|
||||
$sprache = getSprache();
|
||||
$p=new phrasen($sprache);
|
||||
|
||||
$nation = new nation();
|
||||
if($sprache == "German")
|
||||
$nation->getAll($ohnesperre = true);
|
||||
$nation->getAll($ohnesperre = true);
|
||||
else if($sprache == "English")
|
||||
$nation->getAll($ohnesperre = true, $orderEnglish= true);
|
||||
|
||||
|
||||
$date = new datum();
|
||||
$date = new datum();
|
||||
|
||||
?>
|
||||
<html>
|
||||
@@ -54,34 +55,34 @@ $date = new datum();
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link href="../../../include/js/tablesort/table.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="F2F2F2">
|
||||
<?php
|
||||
<body>
|
||||
<?php
|
||||
|
||||
echo ' <table width="100%" border="0">
|
||||
<tr>
|
||||
<td align="left"><a href="index.php">Login</a> > Registration </td>
|
||||
<td align ="right">
|
||||
<td align ="right">
|
||||
'.$p->t("global/sprache").'
|
||||
<a href="'.$_SERVER['PHP_SELF'].'?lang=English">'.$p->t("global/englisch").'</a> |
|
||||
<a href="'.$_SERVER['PHP_SELF'].'?lang=English">'.$p->t("global/englisch").'</a> |
|
||||
<a href="'.$_SERVER['PHP_SELF'].'?lang=German">'.$p->t("global/deutsch").'</a><br> </td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>';
|
||||
|
||||
|
||||
if(!isset($_POST['submit']))
|
||||
{
|
||||
{
|
||||
echo ' <form action="registration.php" method="POST" name="RegistrationForm">
|
||||
<table border = "0" style="margin-left:40%; margin-top:5%;">
|
||||
<table border = "0" style="margin: auto; width: 60%; margin-top:5%;">
|
||||
<tr>
|
||||
<td>'.$p->t('global/titel').' Pre</td>
|
||||
<td><input type="text" size="20" maxlength="64" name="titel_pre"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('global/vorname').'</td>
|
||||
<td>'.$p->t('global/vorname').'*</td>
|
||||
<td><input type="text" size="40" maxlength="32" name="vorname"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('global/nachname').'</td>
|
||||
<td>'.$p->t('global/nachname').'*</td>
|
||||
<td><input type="text" size="40" maxlength="64" name="nachname"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -90,13 +91,13 @@ echo ' <form action="registration.php" method="POST" name="RegistrationForm">
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('global/geburtsdatum').'</td>
|
||||
<td><input type="text" size="20" name="geb_datum" value="" onfocus="this.value=""\"; > (dd.mm.yyyy)</td>
|
||||
<td><input type="text" size="20" name="geb_datum" value="" onfocus="this.value=\'\';" > (dd.mm.yyyy)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('global/staatsbuergerschaft').'</td>
|
||||
|
||||
<td><SELECT name="staatsbuerger">\n
|
||||
<option value="staat_auswahl">-- select --</option>\n';
|
||||
<td>'.$p->t('global/staatsbuergerschaft').'*</td>
|
||||
|
||||
<td><SELECT name="staatsbuerger">
|
||||
<option value="staat_auswahl">-- select --</option>';
|
||||
foreach ($nation->nation as $nat)
|
||||
{
|
||||
if($sprache == 'English')
|
||||
@@ -104,33 +105,36 @@ echo ' <form action="registration.php" method="POST" name="RegistrationForm">
|
||||
else
|
||||
echo '<option value="'.$nat->code.'" >'.$nat->langtext."</option>\n";
|
||||
}
|
||||
|
||||
echo' </tr>
|
||||
|
||||
echo' </select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('global/geschlecht').'</td>
|
||||
<td> <input type="radio" name="geschlecht" value="m" checked> '.$p->t('global/mann').'
|
||||
<input type="radio" name="geschlecht" value="w"> '.$p->t('global/frau').'
|
||||
<td>
|
||||
<input type="radio" name="geschlecht" value="m" checked> '.$p->t('global/mann').'
|
||||
<input type="radio" name="geschlecht" value="w"> '.$p->t('global/frau').'
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('global/strasse').'</td>
|
||||
<td><input type="text" size="40" maxlength="256" name="strasse"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('global/plz').'</td>
|
||||
<td><input type="text" size="20" maxlength="16" name="plz"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('global/ort').'</td>
|
||||
<td><input type="text" size="40" maxlength="256" name="ort"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('incoming/nation').'</td>
|
||||
<td><SELECT name="nation">\n
|
||||
<option value="nat_auswahl">-- select --</option>\n';
|
||||
<td><SELECT name="nation">
|
||||
<option value="nat_auswahl">-- select --</option>';
|
||||
foreach ($nation->nation as $nat)
|
||||
{
|
||||
if($sprache == 'English')
|
||||
@@ -138,49 +142,63 @@ echo ' <form action="registration.php" method="POST" name="RegistrationForm">
|
||||
else
|
||||
echo '<option value="'.$nat->code.'" >'.$nat->langtext."</option>\n";
|
||||
}
|
||||
|
||||
echo ' </tr>
|
||||
|
||||
echo ' </select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>E-Mail</td>
|
||||
<td>E-Mail*</td>
|
||||
<td><input type="text" size="40" maxlength="128" name="email"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('global/anmerkung').'</td>
|
||||
<td><textarea name="anmerkung" cols="31" rows="5"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align = "center"><input type="submit" name="submit" value="Registration" onclick="return checkRegistration()"></td>
|
||||
</tr>
|
||||
<tr><td><input type="hidden" name="zugangscode" value="'.uniqid().'"></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img id="captcha" class="center-block img-responsive" src="'.APP_ROOT.'include/securimage/securimage_show.php" alt="CAPTCHA Image" />
|
||||
<br>
|
||||
<a href="#" onclick="document.getElementById(\'captcha\').src = \''.APP_ROOT.'include/securimage/securimage_show.php?\' + Math.random(); return false;">
|
||||
'.$p->t('incoming/andereGrafik').'
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
'.$p->t('incoming/captcha').'<br>
|
||||
<input type="text" name="captcha_code" maxlength="6" id="captcha" class="form-control">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align = "center"><input type="submit" name="submit" value="Registration" onclick="return checkRegistration()"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function checkRegistration()
|
||||
{
|
||||
if(document.RegistrationForm.nachname.value == "")
|
||||
{
|
||||
alert("Kein Nachname angegeben.");
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.RegistrationForm.staatsbuerger.options[0].selected == true)
|
||||
|
||||
if(document.RegistrationForm.staatsbuerger.options[0].selected == true)
|
||||
{
|
||||
alert("Keine Staatsbürgerschaft ausgewählt.");
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.RegistrationForm.nation.options[0].selected == true)
|
||||
|
||||
if(document.RegistrationForm.nation.options[0].selected == true)
|
||||
{
|
||||
alert("Keine Nation ausgewählt.");
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
if(document.RegistrationForm.email.value == "")
|
||||
{
|
||||
alert("Keine E-Mail Adresse angegeben.");
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
</script>';
|
||||
}
|
||||
@@ -188,101 +206,109 @@ echo' </body>
|
||||
</html>';
|
||||
|
||||
if(isset($_REQUEST['submit']))
|
||||
{
|
||||
$person = new person();
|
||||
{
|
||||
$securimage = new Securimage();
|
||||
// Sicherheitscode wurde falsch eingegeben
|
||||
if ($securimage->check($_POST['captcha_code']) == false)
|
||||
{
|
||||
echo '<p class="bg-danger padding-10">'.$p->t('bewerbung/sicherheitscodeFalsch').'</p>';
|
||||
exit;
|
||||
}
|
||||
|
||||
$person = new person();
|
||||
$adresse = new adresse();
|
||||
$kontakt = new kontakt();
|
||||
$preincoming = new preincoming();
|
||||
|
||||
$preincoming = new preincoming();
|
||||
|
||||
$titel_pre = $_REQUEST['titel_pre'];
|
||||
$vorname = $_REQUEST['vorname'];
|
||||
$nachname =$_REQUEST['nachname'];
|
||||
$vorname = $_REQUEST['vorname'];
|
||||
$nachname =$_REQUEST['nachname'];
|
||||
$titel_post = $_REQUEST['titel_post'];
|
||||
$geb_datum = $date->formatDatum($_REQUEST['geb_datum'], 'Y-m-d');
|
||||
$staatsbuerger = $_REQUEST['staatsbuerger'];
|
||||
$geschlecht = $_REQUEST['geschlecht'];
|
||||
$strasse = $_REQUEST['strasse'];
|
||||
$plz = $_REQUEST['plz'];
|
||||
$ort = $_REQUEST['ort'];
|
||||
$nation_code = $_REQUEST['nation'];
|
||||
$email = $_REQUEST['email'];
|
||||
$anmerkung = $_REQUEST['anmerkung'];
|
||||
$zugangscode = uniqid();
|
||||
|
||||
$person->staatsbuergerschaft = $staatsbuerger;
|
||||
$person->titelpost = $titel_post;
|
||||
$person->titelpre = $titel_pre;
|
||||
$person->nachname = $nachname;
|
||||
$person->vorname = $vorname;
|
||||
$person->gebdatum = $geb_datum;
|
||||
$person->geschlecht = $geschlecht;
|
||||
$person->aktiv = true;
|
||||
$person->zugangscode = $zugangscode;
|
||||
$person->new = true;
|
||||
|
||||
$geb_datum = $date->formatDatum($_REQUEST['geb_datum'], 'Y-m-d');
|
||||
$staatsbuerger = $_REQUEST['staatsbuerger'];
|
||||
$geschlecht = $_REQUEST['geschlecht'];
|
||||
$strasse = $_REQUEST['strasse'];
|
||||
$plz = $_REQUEST['plz'];
|
||||
$ort = $_REQUEST['ort'];
|
||||
$nation_code = $_REQUEST['nation'];
|
||||
$email = $_REQUEST['email'];
|
||||
$anmerkung = $_REQUEST['anmerkung'];
|
||||
$zugangscode = substr(md5(openssl_random_pseudo_bytes(20)), 0, 15);
|
||||
|
||||
$person->staatsbuergerschaft = $staatsbuerger;
|
||||
$person->titelpost = $titel_post;
|
||||
$person->titelpre = $titel_pre;
|
||||
$person->nachname = $nachname;
|
||||
$person->vorname = $vorname;
|
||||
$person->gebdatum = $geb_datum;
|
||||
$person->geschlecht = $geschlecht;
|
||||
$person->aktiv = true;
|
||||
$person->zugangscode = $zugangscode;
|
||||
$person->new = true;
|
||||
|
||||
if(!$person->save())
|
||||
die('Fehler beim Anlegen der Person aufgetreten.');
|
||||
|
||||
$adresse->person_id = $person->person_id;
|
||||
$adresse->strasse = $strasse;
|
||||
$adresse->plz = $plz;
|
||||
$adresse->ort = $ort;
|
||||
$adresse->nation = $nation_code;
|
||||
die('Fehler beim Anlegen der Person aufgetreten.');
|
||||
|
||||
$adresse->person_id = $person->person_id;
|
||||
$adresse->strasse = $strasse;
|
||||
$adresse->plz = $plz;
|
||||
$adresse->ort = $ort;
|
||||
$adresse->nation = $nation_code;
|
||||
$adresse->typ = 'h';
|
||||
$adresse->heimatadresse = true;
|
||||
$adresse->zustelladresse = true;
|
||||
$adresse->new = true;
|
||||
$adresse->heimatadresse = true;
|
||||
$adresse->zustelladresse = true;
|
||||
$adresse->new = true;
|
||||
|
||||
if(!$adresse->save())
|
||||
die($p->t('incoming/fehlerAdresse'));
|
||||
die($p->t('incoming/fehlerAdresse'));
|
||||
|
||||
$kontakt->person_id = $person->person_id;
|
||||
$kontakt->kontakttyp = "email";
|
||||
$kontakt->kontakt = $email;
|
||||
$kontakt->new = true;
|
||||
|
||||
$kontakt->person_id = $person->person_id;
|
||||
$kontakt->kontakttyp = "email";
|
||||
$kontakt->kontakt = $email;
|
||||
$kontakt->new = true;
|
||||
|
||||
if(!$kontakt->save())
|
||||
die($p->t('incoming/fehlerKontakt'));
|
||||
|
||||
$preincoming->person_id = $person->person_id;
|
||||
$preincoming->anmerkung = $anmerkung;
|
||||
$preincoming->zweck_code = 1;
|
||||
$preincoming->aktiv = true;
|
||||
$preincoming->bachelorthesis = false;
|
||||
$preincoming->masterthesis = false;
|
||||
$preincoming->uebernommen = false;
|
||||
$preincoming->new = true;
|
||||
$preincoming->person_id = $person->person_id;
|
||||
$preincoming->anmerkung = $anmerkung;
|
||||
$preincoming->zweck_code = 1;
|
||||
$preincoming->aktiv = true;
|
||||
$preincoming->bachelorthesis = false;
|
||||
$preincoming->masterthesis = false;
|
||||
$preincoming->uebernommen = false;
|
||||
$preincoming->new = true;
|
||||
$preincoming->insertamum = date('Y-m-d H:i:s');
|
||||
$preincoming->updateamum = date('Y-m-d H:i:s');
|
||||
|
||||
if(!$preincoming->save())
|
||||
{
|
||||
echo $preincoming->errormsg;
|
||||
die($p->t('incoming/fehlerIncoming'));
|
||||
}
|
||||
echo sendMail($zugangscode, $email);
|
||||
echo $preincoming->errormsg;
|
||||
die($p->t('incoming/fehlerIncoming'));
|
||||
}
|
||||
echo sendMail($zugangscode, $email);
|
||||
}
|
||||
|
||||
function sendMail($zugangscode, $email)
|
||||
{
|
||||
global $p, $vorname, $nachname;
|
||||
|
||||
$emailtext= $p->t('incoming/registrationEmail', array($zugangscode));
|
||||
global $p, $vorname, $nachname;
|
||||
|
||||
$emailtext= $p->t('mail/incomingRegistrationEmail', array($zugangscode));
|
||||
$mail = new mail($email, 'no-reply', 'Incoming-Registration', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.');
|
||||
$mail->setHTMLContent($emailtext);
|
||||
$mail->setHTMLContent($emailtext);
|
||||
if(!$mail->send())
|
||||
$msg= '<span class="error">Fehler beim Senden des Mails</span><br />';
|
||||
else
|
||||
$msg= $p->t('global/emailgesendetan')." $email!<br>";
|
||||
|
||||
// sende Nachricht an Assistenz
|
||||
$emailtext= "Dies ist eine automatisch generierte E-Mail.<br><br>";
|
||||
$emailtext.= "Es hat sich ein neuer Incoming am Campus International registriert.<br><br>Name: ".$vorname.' '.$nachname.'<br>E-Mail: '.$email;
|
||||
$mail = new mail(MAIL_INTERNATIONAL, 'no-reply', 'New Incoming', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.');
|
||||
$mail->setHTMLContent($emailtext);
|
||||
$mail->send();
|
||||
|
||||
return $msg;
|
||||
// sende Nachricht an Assistenz
|
||||
$emailtext= "Dies ist eine automatisch generierte E-Mail.<br><br>";
|
||||
$emailtext.= "Es hat sich ein neuer Incoming registriert.<br><br>Name: ".$vorname.' '.$nachname.'<br>E-Mail: '.$email;
|
||||
$mail = new mail(MAIL_INTERNATIONAL, 'no-reply', 'New Incoming', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.');
|
||||
$mail->setHTMLContent($emailtext);
|
||||
$mail->send();
|
||||
|
||||
return $msg;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user