@ -25,7 +25,7 @@ function guest_register() {
$dect = "";
$dect = "";
$mobile = "";
$mobile = "";
$mail = "";
$mail = "";
$icq = "" ;
$email_shiftinfo = false ;
$jabber = "";
$jabber = "";
$hometown = "";
$hometown = "";
$comment = "";
$comment = "";
@ -66,8 +66,9 @@ function guest_register() {
$msg .= error(_("Please enter your e-mail."), true);
$msg .= error(_("Please enter your e-mail."), true);
}
}
if (isset($_REQUEST['icq']))
if (isset($_REQUEST['email_shiftinfo']))
$icq = strip_request_item('icq');
$email_shiftinfo = true;
if (isset($_REQUEST['jabber']) & & strlen(strip_request_item('jabber')) > 0) {
if (isset($_REQUEST['jabber']) & & strlen(strip_request_item('jabber')) > 0) {
$jabber = strip_request_item('jabber');
$jabber = strip_request_item('jabber');
if (! check_email($jabber)) {
if (! check_email($jabber)) {
@ -119,7 +120,25 @@ function guest_register() {
$comment = strip_request_item_nl('comment');
$comment = strip_request_item_nl('comment');
if ($ok) {
if ($ok) {
sql_query("INSERT INTO `User` SET `color`=" . sql_escape($default_theme) . ", `Nick`='" . sql_escape($nick) . "', `Vorname`='" . sql_escape($prename) . "', `Name`='" . sql_escape($lastname) . "', `Alter`='" . sql_escape($age) . "', `Telefon`='" . sql_escape($tel) . "', `DECT`='" . sql_escape($dect) . "', `Handy`='" . sql_escape($mobile) . "', `email`='" . sql_escape($mail) . "', `ICQ`='" . sql_escape($icq) . "', `jabber`='" . sql_escape($jabber) . "', `Size`='" . sql_escape($tshirt_size) . "', `Passwort`='" . sql_escape($password_hash) . "', `kommentar`='" . sql_escape($comment) . "', `Hometown`='" . sql_escape($hometown) . "', `CreateDate`=NOW(), `Sprache`='" . sql_escape($_SESSION["locale"]) . "'");
sql_query("
INSERT INTO `User` SET
`color`=" . sql_escape($default_theme) . ",
`Nick`='" . sql_escape($nick) . "',
`Vorname`='" . sql_escape($prename) . "',
`Name`='" . sql_escape($lastname) . "',
`Alter`='" . sql_escape($age) . "',
`Telefon`='" . sql_escape($tel) . "',
`DECT`='" . sql_escape($dect) . "',
`Handy`='" . sql_escape($mobile) . "',
`email`='" . sql_escape($mail) . "',
`email_shiftinfo`=" . sql_escape($email_shiftinfo ? 'TRUE' : 'FALSE') . ",
`jabber`='" . sql_escape($jabber) . "',
`Size`='" . sql_escape($tshirt_size) . "',
`Passwort`='" . sql_escape($password_hash) . "',
`kommentar`='" . sql_escape($comment) . "',
`Hometown`='" . sql_escape($hometown) . "',
`CreateDate`=NOW(),
`Sprache`='" . sql_escape($_SESSION["locale"]) . "'");
// Assign user-group and set password
// Assign user-group and set password
$user_id = sql_id();
$user_id = sql_id();
@ -147,19 +166,20 @@ function guest_register() {
div('row', array(
div('row', array(
div('col-md-6', array(
div('col-md-6', array(
div('row', array(
div('row', array(
div('col-md -4', array(
div('col-s m-4', array(
form_text('nick', _("Nick") . ' ' . entry_required(), $nick)
form_text('nick', _("Nick") . ' ' . entry_required(), $nick)
)),
)),
div('col-md-8', array(
div('col-sm-8', array(
form_text('mail', _("E-Mail") . ' ' . entry_required(), $mail)
form_text('mail', _("E-Mail") . ' ' . entry_required(), $mail),
form_checkbox('email_shiftinfo', _("Please send me an email if my shifts change"), $email_shiftinfo)
))
))
)),
)),
$enable_tshirt_size ? form_select('tshirt_size', _("Shirt size") . ' ' . entry_required(), $tshirt_sizes, $tshirt_size) : '',
$enable_tshirt_size ? form_select('tshirt_size', _("Shirt size") . ' ' . entry_required(), $tshirt_sizes, $tshirt_size) : '',
div('row', array(
div('row', array(
div('col-md -6', array(
div('col-s m-6', array(
form_password('password', _("Password") . ' ' . entry_required())
form_password('password', _("Password") . ' ' . entry_required())
)),
)),
div('col-md -6', array(
div('col-s m-6', array(
form_password('password2', _("Confirm password") . ' ' . entry_required())
form_password('password2', _("Confirm password") . ' ' . entry_required())
))
))
)),
)),
@ -168,37 +188,36 @@ function guest_register() {
)),
)),
div('col-md-6', array(
div('col-md-6', array(
div('row', array(
div('row', array(
div('col-md -4', array(
div('col-s m-4', array(
form_text('dect', _("DECT"), $dect)
form_text('dect', _("DECT"), $dect)
)),
)),
div('col-md -4', array(
div('col-s m-4', array(
form_text('mobile', _("Mobile"), $mobile)
form_text('mobile', _("Mobile"), $mobile)
)),
)),
div('col-md -4', array(
div('col-s m-4', array(
form_text('tel', _("Phone"), $tel)
form_text('tel', _("Phone"), $tel)
))
))
)),
)),
form_text('jabber', _("Jabber"), $jabber),
form_text('jabber', _("Jabber"), $jabber),
div('row', array(
div('row', array(
div('col-md -6', array(
div('col-s m-6', array(
form_text('prename', _("First name"), $prename)
form_text('prename', _("First name"), $prename)
)),
)),
div('col-md -6', array(
div('col-s m-6', array(
form_text('lastname', _("Last name"), $lastname)
form_text('lastname', _("Last name"), $lastname)
))
))
)),
)),
div('row', array(
div('row', array(
div('col-md -3', array(
div('col-s m-3', array(
form_text('age', _("Age"), $age)
form_text('age', _("Age"), $age)
)),
)),
div('col-md -9', array(
div('col-s m-9', array(
form_text('hometown', _("Hometown"), $hometown)
form_text('hometown', _("Hometown"), $hometown)
))
))
)),
)),
form_info(entry_required() . ' = ' . _("Entry required!"))
form_info(entry_required() . ' = ' . _("Entry required!"))
))
))
)),
)),
// form_text('icq', _("ICQ"), $icq),
// form_textarea('comment', _("Did you help at former CCC events and which tasks have you performed then?"), $comment),
// form_textarea('comment', _("Did you help at former CCC events and which tasks have you performed then?"), $comment),
form_submit('submit', _("Register"))
form_submit('submit', _("Register"))
))
))