From: Roland Häder Date: Sun, 21 Oct 2012 11:43:58 +0000 (+0000) Subject: Extension ext-booking is basicly finished X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=def76e23a31c57bce0737f1c645cff93cf9ccef2;p=mailer.git Extension ext-booking is basicly finished --- diff --git a/.gitattributes b/.gitattributes index 7828a72019..2f1d4fc965 100644 --- a/.gitattributes +++ b/.gitattributes @@ -571,6 +571,7 @@ inc/modules/admin/what-list_autopurge.php svneol=native#text/plain inc/modules/admin/what-list_bank_package.php svneol=native#text/plain inc/modules/admin/what-list_beg.php svneol=native#text/plain inc/modules/admin/what-list_bonus.php svneol=native#text/plain +inc/modules/admin/what-list_booking.php svneol=native#text/plain inc/modules/admin/what-list_cats.php svneol=native#text/plain inc/modules/admin/what-list_country.php svneol=native#text/plain inc/modules/admin/what-list_coupon.php svneol=native#text/plain @@ -1466,6 +1467,8 @@ templates/de/html/admin/admin_list_bonus_emails.tpl svneol=native#text/plain templates/de/html/admin/admin_list_bonus_emails_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_bonus_form.tpl svneol=native#text/plain templates/de/html/admin/admin_list_bonus_rows.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_booking.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_booking_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_cats.tpl svneol=native#text/plain templates/de/html/admin/admin_list_cats_404.tpl svneol=native#text/plain templates/de/html/admin/admin_list_cats_row.tpl svneol=native#text/plain @@ -1987,6 +1990,8 @@ templates/de/html/member/member_holiday_form.tpl svneol=native#text/plain templates/de/html/member/member_html_mail_settings.tpl svneol=native#text/plain templates/de/html/member/member_list_beg.tpl svneol=native#text/plain templates/de/html/member/member_list_beg_row.tpl svneol=native#text/plain +templates/de/html/member/member_list_booking.tpl svneol=native#text/plain +templates/de/html/member/member_list_booking_row.tpl svneol=native#text/plain templates/de/html/member/member_list_coupon.tpl svneol=native#text/plain templates/de/html/member/member_list_coupon_row.tpl svneol=native#text/plain templates/de/html/member/member_list_rallye.tpl svneol=native#text/plain diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 827d4151bf..ba0a3f21da 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -62,6 +62,7 @@ switch (getExtensionMode()) { `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `subject` VARCHAR(255) NOT NULL DEFAULT 'missing', `points_mode` ENUM('ADD','SUB') NOT NULL DEFAULT 'ADD', +`points_account_type` VARCHAR(255) NOT NULL DEFAULT 'INVALID', `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.0000, `comments` TINYTEXT NULL DEFAULT NULL, `recorded` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, diff --git a/inc/filter/booking_filter.php b/inc/filter/booking_filter.php index 73aad6d671..1c760b4026 100644 --- a/inc/filter/booking_filter.php +++ b/inc/filter/booking_filter.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function FILTER_ADD_BOOKING_RECORD ($filterData) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); // Add a record - addBookingRecord($filterData['subject'], $filterData['userid'], $filterData['points'], $filterData['points_mode']); + addBookingRecord($filterData['subject'], $filterData['userid'], $filterData['points'], $filterData['points_mode'], $filterData['column']); // Return data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); diff --git a/inc/functions.php b/inc/functions.php index 7702331fc7..6aecfae83a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2157,7 +2157,7 @@ function detectMultiBytePrefix ($str) { return $mbPrefix; } -// Searches the given array for a sub-string match and returns all found keys in an array +// Searches given array for a sub-string match and returns all found keys in an array function getArrayKeysFromSubStrArray ($heystack, $needles, $offset = 0) { // Init array for all found keys $keys = array(); @@ -2449,37 +2449,43 @@ function translatePointsSubject ($subject) { return translateGeneric('POINTS_SUBJECT', $subject); } -// "Translates" the given points account type +// "Translates" given points account type function translatePointsAccountType ($accountType) { // Return it return translateGeneric('POINTS_ACCOUNT_TYPE', $accountType); } -// "Translates" the given points "locked mode" +// "Translates" given points "locked mode" function translatePointsLockedMode ($lockedMode) { // Return it return translateGeneric('POINTS_LOCKED_MODE', $lockedMode); } -// "Translates" the given points payment method +// "Translates" given points payment method function translatePointsPaymentMethod ($paymentMethod) { // Return it return translateGeneric('POINTS_PAYMENT_METHOD', $paymentMethod); } -// "Translates" the given points account provider +// "Translates" given points account provider function translatePointsAccountProvider ($accountProvider) { // Return it return translateGeneric('POINTS_ACCOUNT_PROVIDER', $accountProvider); } -// "Translates" the given points notify recipient +// "Translates" given points notify recipient function translatePointsNotifyRecipient ($notifyRecipient) { // Return it return translateGeneric('POINTS_NOTIFY_RECIPIENT', $notifyRecipient); } -// Translates task type to a human-readable version +// "Translates" given mode to a human-readable version +function translatePointsMode ($pointsMode) { + // Return it + return translateGeneric('POINTS_MODE', $pointsMode); +} + +// "Translates" task type to a human-readable version function translateTaskType ($taskType) { // Return it return translateGeneric('ADMIN_TASK_TYPE', $taskType); diff --git a/inc/language/booking_de.php b/inc/language/booking_de.php index 77e8fed9b7..c7285a1680 100644 --- a/inc/language/booking_de.php +++ b/inc/language/booking_de.php @@ -45,6 +45,29 @@ addMessages(array( // Admin member 'action' links 'ADMIN_USER_ACTION_LINK_LIST_BOOKING' => "Kontoauszug anzeigen", 'ADMIN_USER_ACTION_LINK_LIST_BOOKING_TITLE' => "Zeigt den Kontoauszug des Mitgliedes an.", + + // Admin - error messages + 'ADMIN_BOOKING_404' => "Das ausgewählte Mitgliedaccount weist zur Zeit keine Kontobewegungen auf.", + + // Admin titles + 'ADMIN_LIST_BOOKING_RECORDS_TITLE' => "Alle Buchungen des Mitgliedes {%get,generateUserProfileLink=userid%} auflisten", + + // Member error messages + 'MEMBER_BOOKING_404' => "Ihr Benutyerkonto weist noch keine Buchungen auf.", + + // Member titles + 'MEMBER_LIST_BOOKING_RECORDS_TITLE' => "Alle Ihre Guthabenbewegungen", + + // Member notices + 'MEMBER_LIST_BOOKING_RECORDS_NOTICE' => "Dies sind alle Ihre Guthabenbewebungen (Gutschriften, Abzüge), die an Ihrem Konto durchgeführt worden sind.", + + // Generic messages + 'BOOKING_RECORDED' => "Durchgeführt", + 'BOOKING_COMMENTS' => "Kommentar", + + // Admin booking listing + 'ADMIN_ACTION_DELETE_BOOKING_SUBMIT' => "Kontoauszug löschen", + 'ADMIN_LIST_BOOKING_NOTICE' => "Vorsicht: Mit Klick auf {--ADMIN_ACTION_DELETE_BOOKING_SUBMIT--} werden die Logbucheinträge ohne Sicherheitsabfrage gelöscht. Die Buchungen selbst werden nicht rückgängig gemacht.", )); // [EOF] diff --git a/inc/language/de.php b/inc/language/de.php index f466ed30d5..29c3421af2 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -1228,6 +1228,7 @@ addMessages(array( 'ADMIN_DELETE_POOL_MAIL_LINK' => "Klick-Mail löschen", // Generic points subjects + 'POINTS_SUBJECT' => "Verwendungszweck", 'POINTS_SUBJECT_UNKNOWN' => "??? (%s)", 'POINTS_SUBJECT_ADMIN_ADD_ALL' => "Gutschrift für alle durch den Administrator", 'POINTS_SUBJECT_ADMIN_ADD_SINGLE' => "Einzelgutschrift durch den Administrator", @@ -1238,6 +1239,12 @@ addMessages(array( 'POINTS_SUBJECT_ADMIN_ADD_ALL_REF' => "Anteilige Gutschrift für alle durch den Administrator", 'POINTS_SUBJECT_ADMIN_ADD_SINGLE_REF' => "Anteilige Einzelgutschrift durch den Administrator", + // Points modes + 'POINTS_MODE' => "Art", + 'POINTS_MODE_UNKNOWN' => "??? (%s)", + 'POINTS_MODE_ADD' => "Gutschrift", + 'POINTS_MODE_SUB' => "Abzug", + // Admin - List referrals 'ADMIN_LIST_USER_NO_REFERRALS' => "Das Mitglied %s hat in dieser Referral-Ebene keine Mitglieder geworben.", 'ADMIN_NO_REFERRAL_LEVELS' => "In Ihrem {?mt_word?} sind keine Referral-Ebenen eingerichtet! Ihre Mitglieder erhalten keine {?POINTS?} gutgeschrieben. Richten Sie mindestens Referral-Ebene 0 mit 100% Vergütung ein.", @@ -1286,6 +1293,7 @@ addMessages(array( 'ADMIN_POINTS_DATA_CHANGE_SUBMIT' => "Guthabenkonten ändern", // Generic: points account types (in fact: column names) + 'POINTS_ACCOUNT_TYPE' => "Guthabenkonto", 'POINTS_ACCOUNT_TYPE_UNKNOWN' => "Unbekannter Guthabenkontotyp %s erkannt.", 'POINTS_ACCOUNT_TYPE_POINTS' => "Allgemeinguthaben", 'POINTS_ACCOUNT_TYPE_LOCKED_POINTS' => "Gesperrtes Allgemeinguthaben", diff --git a/inc/libs/booking_functions.php b/inc/libs/booking_functions.php index 9fc236d208..9b7e78dc45 100644 --- a/inc/libs/booking_functions.php +++ b/inc/libs/booking_functions.php @@ -41,7 +41,7 @@ if (!defined('__SECURITY')) { } // END - if // Add a record entry ('pointsMode' can be add/sub!) -function addBookingRecord ($subject, $userid, $points, $pointsMode) { +function addBookingRecord ($subject, $userid, $points, $pointsMode, $accountType) { // Is the ext-sql_patches updated? if (isExtensionInstalledAndOlder('sql_patches', '0.5.7')) { // Abort here @@ -49,11 +49,12 @@ function addBookingRecord ($subject, $userid, $points, $pointsMode) { } // END - if // Add record entry here - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_booking` (`userid`, `subject`, `points_mode`, `points`) VALUES (%s,'%s','%s',%s)", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_booking` (`userid`, `subject`, `points_mode`, `points_account_type`, `points`) VALUES (%s, '%s', '%s', '%s', %s)", array( bigintval($userid), $subject, strtoupper($pointsMode), + strtoupper($accountType), $points ), __FUNCTION__, __LINE__); } diff --git a/inc/modules/admin/what-list_booking.php b/inc/modules/admin/what-list_booking.php new file mode 100644 index 0000000000..ad99c5009b --- /dev/null +++ b/inc/modules/admin/what-list_booking.php @@ -0,0 +1,64 @@ + bigintval(getRequestElement('userid')) + )); +} else { + // Output selection form with all confirmed user accounts listed + addMemberSelectionBox(); +} + +// [EOF] +?> diff --git a/inc/modules/member/what-booking.php b/inc/modules/member/what-booking.php index 7211ec693d..7bae72887b 100644 --- a/inc/modules/member/what-booking.php +++ b/inc/modules/member/what-booking.php @@ -51,5 +51,8 @@ if ((!isExtensionActive('booking')) && (!isAdmin())) { return; } // END - if +// Load XML template +showEntriesByXmlCallback('member_list_booking'); + // [EOF] ?> diff --git a/templates/de/html/admin/admin_list_booking.tpl b/templates/de/html/admin/admin_list_booking.tpl new file mode 100644 index 0000000000..79774d102a --- /dev/null +++ b/templates/de/html/admin/admin_list_booking.tpl @@ -0,0 +1,45 @@ +
+
+ + + + + + + + + + + + + +$content + + + +
+ {--ADMIN_LIST_BOOKING_RECORDS_TITLE--} +
+ {--ID_SELECT--} + + {--POINTS_SUBJECT--} + + {--POINTS_MODE--} + + {--POINTS_ACCOUNT_TYPE--} + + {?POINTS?} + + {--BOOKING_RECORDED--} + + {--BOOKING_COMMENTS--} +
+
+ +
+ {--ADMIN_LIST_BOOKING_NOTICE--} +
diff --git a/templates/de/html/admin/admin_list_booking_row.tpl b/templates/de/html/admin/admin_list_booking_row.tpl new file mode 100644 index 0000000000..2a2f0d2765 --- /dev/null +++ b/templates/de/html/admin/admin_list_booking_row.tpl @@ -0,0 +1,23 @@ + + + $content[id] + + + {%pipe,translatePointsSubject=$content[subject]%} + + + {%pipe,translatePointsMode=$content[points_mode]%} + + + {%pipe,translatePointsAccountType=$content[points_account_type]%} + + + {%pipe,translateComma=$content[points]%} + + + $content[recorded] + + + {%pipe,fixEmptyContentToDashes=$content[comments]%} + + diff --git a/templates/de/html/member/member_list_booking.tpl b/templates/de/html/member/member_list_booking.tpl new file mode 100644 index 0000000000..58eb2c79b3 --- /dev/null +++ b/templates/de/html/member/member_list_booking.tpl @@ -0,0 +1,35 @@ +
+ + + + + + + + + + + + +$content + + + +
+ {--MEMBER_LIST_BOOKING_RECORDS_TITLE--} +
+ {--POINTS_SUBJECT--} + + {--POINTS_MODE--} + + {--POINTS_ACCOUNT_TYPE--} + + {?POINTS?} + + {--BOOKING_RECORDED--} + + {--BOOKING_COMMENTS--} +
+
diff --git a/templates/de/html/member/member_list_booking_row.tpl b/templates/de/html/member/member_list_booking_row.tpl new file mode 100644 index 0000000000..28e9d0c7c2 --- /dev/null +++ b/templates/de/html/member/member_list_booking_row.tpl @@ -0,0 +1,20 @@ + + + {%pipe,translatePointsSubject=$content[subject]%} + + + {%pipe,translatePointsMode=$content[points_mode]%} + + + {%pipe,translatePointsAccountType=$content[points_account_type]%} + + + {%pipe,translateComma=$content[points]%} + + + $content[recorded] + + + {%pipe,fixEmptyContentToDashes=$content[comments]%} + + diff --git a/templates/xml/admin/admin_delete_do_booking.xml b/templates/xml/admin/admin_delete_do_booking.xml new file mode 100644 index 0000000000..ddde574d43 --- /dev/null +++ b/templates/xml/admin/admin_delete_do_booking.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_list_booking.xml b/templates/xml/admin/admin_list_booking.xml new file mode 100644 index 0000000000..e754b13aa2 --- /dev/null +++ b/templates/xml/admin/admin_list_booking.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/member/member_list_booking.xml b/templates/xml/member/member_list_booking.xml new file mode 100644 index 0000000000..174ee598f7 --- /dev/null +++ b/templates/xml/member/member_list_booking.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +