add opt-in bool for shiftinfo mails and remove icq from users

main
Philip Häusler 10 years ago
parent 191ba6e1b1
commit 57a92dbdcd

@ -1,3 +1,9 @@
/* cleanup */
ALTER TABLE `User` DROP `ICQ` ;
/* opt-in field for user shiftinfo mails */
ALTER TABLE `User` ADD `email_shiftinfo` BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'User wants to be informed by mail about changes in his shifts' AFTER `email` ;
/* fix questions */ /* fix questions */
ALTER TABLE `Questions` CHANGE `AID` `AID` INT( 11 ) NULL DEFAULT NULL ; ALTER TABLE `Questions` CHANGE `AID` `AID` INT( 11 ) NULL DEFAULT NULL ;

@ -63,7 +63,7 @@ getUser
id (integer) - User ID id (integer) - User ID
Return Example: Return Example:
[{"UID":"1"},{"UID":"23"},{"UID":"42"}] [{"UID":"1"},{"UID":"23"},{"UID":"42"}]
{"UID":"1","Nick":"admin","Name":"Gates","Vorname":"Bill","Telefon":"","DECT":"","Handy":"","email":"","ICQ":"","jabber":"","Avatar":"115"} {"UID":"1","Nick":"admin","Name":"Gates","Vorname":"Bill","Telefon":"","DECT":"","Handy":"","email":"","jabber":"","Avatar":"115"}
getShift getShift
Description: Description:

@ -132,7 +132,7 @@ function User($id) {
* @param $id UID * @param $id UID
*/ */
function mUser_Limit($id) { function mUser_Limit($id) {
$user_source = sql_select("SELECT `UID`, `Nick`, `Name`, `Vorname`, `Telefon`, `DECT`, `Handy`, `email`, `ICQ`, `jabber`, `Avatar` FROM `User` WHERE `UID`=" . sql_escape($id) . " LIMIT 1"); $user_source = sql_select("SELECT `UID`, `Nick`, `Name`, `Vorname`, `Telefon`, `DECT`, `Handy`, `email`, `jabber`, `Avatar` FROM `User` WHERE `UID`=" . sql_escape($id) . " LIMIT 1");
if ($user_source === false) if ($user_source === false)
return false; return false;
if (count($user_source) > 0) if (count($user_source) > 0)

@ -33,7 +33,6 @@ function admin_user() {
$html .= " <tr><td>Handy</td><td>" . "<input type=\"text\" size=\"40\" name=\"eHandy\" value=\"" . $user_source['Handy'] . "\"></td></tr>\n"; $html .= " <tr><td>Handy</td><td>" . "<input type=\"text\" size=\"40\" name=\"eHandy\" value=\"" . $user_source['Handy'] . "\"></td></tr>\n";
$html .= " <tr><td>DECT</td><td>" . "<input type=\"text\" size=\"4\" name=\"eDECT\" value=\"" . $user_source['DECT'] . "\"></td></tr>\n"; $html .= " <tr><td>DECT</td><td>" . "<input type=\"text\" size=\"4\" name=\"eDECT\" value=\"" . $user_source['DECT'] . "\"></td></tr>\n";
$html .= " <tr><td>email</td><td>" . "<input type=\"text\" size=\"40\" name=\"eemail\" value=\"" . $user_source['email'] . "\"></td></tr>\n"; $html .= " <tr><td>email</td><td>" . "<input type=\"text\" size=\"40\" name=\"eemail\" value=\"" . $user_source['email'] . "\"></td></tr>\n";
$html .= " <tr><td>ICQ</td><td>" . "<input type=\"text\" size=\"40\" name=\"eICQ\" value=\"" . $user_source['ICQ'] . "\"></td></tr>\n";
$html .= " <tr><td>jabber</td><td>" . "<input type=\"text\" size=\"40\" name=\"ejabber\" value=\"" . $user_source['jabber'] . "\"></td></tr>\n"; $html .= " <tr><td>jabber</td><td>" . "<input type=\"text\" size=\"40\" name=\"ejabber\" value=\"" . $user_source['jabber'] . "\"></td></tr>\n";
$html .= " <tr><td>Size</td><td>" . html_select_key('size', 'eSize', $tshirt_sizes, $user_source['Size']) . "</td></tr>\n"; $html .= " <tr><td>Size</td><td>" . html_select_key('size', 'eSize', $tshirt_sizes, $user_source['Size']) . "</td></tr>\n";
@ -236,7 +235,6 @@ function admin_user() {
`Alter` = '" . sql_escape($_POST["eAlter"]) . "', `Alter` = '" . sql_escape($_POST["eAlter"]) . "',
`DECT` = '" . sql_escape($_POST["eDECT"]) . "', `DECT` = '" . sql_escape($_POST["eDECT"]) . "',
`email` = '" . sql_escape($_POST["eemail"]) . "', `email` = '" . sql_escape($_POST["eemail"]) . "',
`ICQ` = '" . sql_escape($_POST["eICQ"]) . "',
`jabber` = '" . sql_escape($_POST["ejabber"]) . "', `jabber` = '" . sql_escape($_POST["ejabber"]) . "',
`Size` = '" . sql_escape($_POST["eSize"]) . "', `Size` = '" . sql_escape($_POST["eSize"]) . "',
`Gekommen`= '" . sql_escape($_POST["eGekommen"]) . "', `Gekommen`= '" . sql_escape($_POST["eGekommen"]) . "',

@ -25,7 +25,6 @@ function guest_register() {
$dect = ""; $dect = "";
$mobile = ""; $mobile = "";
$mail = ""; $mail = "";
$icq = "";
$jabber = ""; $jabber = "";
$hometown = ""; $hometown = "";
$comment = ""; $comment = "";
@ -66,8 +65,6 @@ function guest_register() {
$msg .= error(_("Please enter your e-mail."), true); $msg .= error(_("Please enter your e-mail."), true);
} }
if (isset($_REQUEST['icq']))
$icq = strip_request_item('icq');
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 +116,7 @@ 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) . "', `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();
@ -198,7 +195,6 @@ function guest_register() {
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"))
)) ))

@ -16,7 +16,6 @@ function user_settings() {
$dect = $user['DECT']; $dect = $user['DECT'];
$mobile = $user['Handy']; $mobile = $user['Handy'];
$mail = $user['email']; $mail = $user['email'];
$icq = $user['ICQ'];
$jabber = $user['jabber']; $jabber = $user['jabber'];
$hometown = $user['Hometown']; $hometown = $user['Hometown'];
$tshirt_size = $user['Size']; $tshirt_size = $user['Size'];
@ -59,8 +58,6 @@ function user_settings() {
$msg .= error(_("Please enter your e-mail."), true); $msg .= error(_("Please enter your e-mail."), true);
} }
if (isset($_REQUEST['icq']))
$icq = strip_request_item('icq');
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)) {
@ -97,7 +94,7 @@ function user_settings() {
$hometown = strip_request_item('hometown'); $hometown = strip_request_item('hometown');
if ($ok) { if ($ok) {
sql_query("UPDATE `User` SET `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) . "', `Hometown`='" . sql_escape($hometown) . "' WHERE `UID`=" . sql_escape($user['UID'])); sql_query("UPDATE `User` SET `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) . "', `jabber`='" . sql_escape($jabber) . "', `Size`='" . sql_escape($tshirt_size) . "', `Hometown`='" . sql_escape($hometown) . "' WHERE `UID`=" . sql_escape($user['UID']));
// Assign angel-types // Assign angel-types
$user_angel_type_info = array(); $user_angel_type_info = array();
@ -178,7 +175,6 @@ function user_settings() {
form_text('dect', _("DECT"), $dect), form_text('dect', _("DECT"), $dect),
form_text('mobile', _("Mobile"), $mobile), form_text('mobile', _("Mobile"), $mobile),
form_text('mail', _("E-Mail") . "*", $mail), form_text('mail', _("E-Mail") . "*", $mail),
form_text('icq', _("ICQ"), $icq),
form_text('jabber', _("Jabber"), $jabber), form_text('jabber', _("Jabber"), $jabber),
form_text('hometown', _("Hometown"), $hometown), form_text('hometown', _("Hometown"), $hometown),
$enable_tshirt_size ? form_select('tshirt_size', _("Shirt size"), $tshirt_sizes, $tshirt_size) : '', $enable_tshirt_size ? form_select('tshirt_size', _("Shirt size"), $tshirt_sizes, $tshirt_size) : '',

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Engelsystem 2.0\n" "Project-Id-Version: Engelsystem 2.0\n"
"POT-Creation-Date: 2014-09-28 14:25+0100\n" "POT-Creation-Date: 2014-09-28 14:25+0100\n"
"PO-Revision-Date: 2014-09-28 14:26+0100\n" "PO-Revision-Date: 2014-12-06 17:58+0100\n"
"Last-Translator: msquare <msquare@notrademark.de>\n" "Last-Translator: msquare <msquare@notrademark.de>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: de_DE\n" "Language: de_DE\n"
@ -1713,7 +1713,7 @@ msgstr "Summe:"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:152 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:152
msgid "User state" msgid "User state"
msgstr "Engel Zustand" msgstr "Engelzustand"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:155 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:155
msgid "Not arrived" msgid "Not arrived"

@ -1,5 +1,4 @@
<?php <?php
require_once realpath(__DIR__ . '/../includes/mysqli_provider.php'); require_once realpath(__DIR__ . '/../includes/mysqli_provider.php');
require_once realpath(__DIR__ . '/../includes/sys_auth.php'); require_once realpath(__DIR__ . '/../includes/sys_auth.php');
@ -61,7 +60,7 @@ require_once realpath(__DIR__ . '/../includes/pages/user_shifts.php');
require_once realpath(__DIR__ . '/../vendor/parsedown/Parsedown.php'); require_once realpath(__DIR__ . '/../vendor/parsedown/Parsedown.php');
session_lifetime(24*60, preg_replace("/[^a-z0-9-]/", '', md5(__DIR__))); session_lifetime(24 * 60, preg_replace("/[^a-z0-9-]/", '', md5(__DIR__)));
session_start(); session_start();
gettext_init(); gettext_init();

Loading…
Cancel
Save