]> git.mxchange.org Git - mailer.git/commitdiff
Extension ext-booking is basicly finished
authorRoland Häder <roland@mxchange.org>
Sun, 21 Oct 2012 11:43:58 +0000 (11:43 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 21 Oct 2012 11:43:58 +0000 (11:43 +0000)
16 files changed:
.gitattributes
inc/extensions/ext-booking.php
inc/filter/booking_filter.php
inc/functions.php
inc/language/booking_de.php
inc/language/de.php
inc/libs/booking_functions.php
inc/modules/admin/what-list_booking.php [new file with mode: 0644]
inc/modules/member/what-booking.php
templates/de/html/admin/admin_list_booking.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_booking_row.tpl [new file with mode: 0644]
templates/de/html/member/member_list_booking.tpl [new file with mode: 0644]
templates/de/html/member/member_list_booking_row.tpl [new file with mode: 0644]
templates/xml/admin/admin_delete_do_booking.xml [new file with mode: 0644]
templates/xml/admin/admin_list_booking.xml [new file with mode: 0644]
templates/xml/member/member_list_booking.xml [new file with mode: 0644]

index 7828a72019919b3c73b3bc0a93fb84f5be2c1027..2f1d4fc96502af20e50702f832bd81a1642bf0f2 100644 (file)
@@ -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
index 827d4151bfcffea35a7e5f9a10c4650a5e5f07cf..ba0a3f21da1bbc925afdb545e12b2d74f207b240 100644 (file)
@@ -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,
index 73aad6d671cfc5a50aa0a38bfa6709f80ee77fea..1c760b402625d3c65037c306f17441c4a02af4c9 100644 (file)
@@ -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!');
index 7702331fc7ce559c380a422473a7917a616cdea1..6aecfae83a22d43bd0baf18a1d09335d5f0841f3 100644 (file)
@@ -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);
index 77e8fed9b76692b43bc050a081dea92ac62fefce..c7285a16803a8df04e68c6546a0b91bb0dc531fc 100644 (file)
@@ -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&auml;hlte Mitgliedaccount weist zur Zeit keine Kontobewegungen auf.",
+
+       // Admin titles
+       'ADMIN_LIST_BOOKING_RECORDS_TITLE'  => "Alle Buchungen des Mitgliedes <span class=\"data\">{%get,generateUserProfileLink=userid%}</span> 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&uuml;ge), die an Ihrem Konto durchgef&uuml;hrt worden sind.",
+
+       // Generic messages
+       'BOOKING_RECORDED' => "Durchgef&uuml;hrt",
+       'BOOKING_COMMENTS' => "Kommentar",
+
+       // Admin booking listing
+       'ADMIN_ACTION_DELETE_BOOKING_SUBMIT' => "Kontoauszug l&ouml;schen",
+       'ADMIN_LIST_BOOKING_NOTICE' => "<strong>Vorsicht:</strong> Mit Klick auf <strong>{--ADMIN_ACTION_DELETE_BOOKING_SUBMIT--}</strong> werden die Logbucheintr&auml;ge ohne Sicherheitsabfrage gel&ouml;scht. Die Buchungen selbst werden nicht r&uuml;ckg&auml;ngig gemacht.",
 ));
 
 // [EOF]
index f466ed30d57559d428728c2281d2d94e0295a5fb..29c3421af27e343ffb6b5708166bd021afe34183 100644 (file)
@@ -1228,6 +1228,7 @@ addMessages(array(
        'ADMIN_DELETE_POOL_MAIL_LINK' => "Klick-Mail l&ouml;schen",
 
        // Generic points subjects
+       'POINTS_SUBJECT'                      => "Verwendungszweck",
        'POINTS_SUBJECT_UNKNOWN'              => "??? (%s)",
        'POINTS_SUBJECT_ADMIN_ADD_ALL'        => "Gutschrift f&uuml;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&uuml;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 <span class=\"data\">%s</span> hat in dieser Referral-Ebene keine Mitglieder geworben.",
        'ADMIN_NO_REFERRAL_LEVELS' => "In Ihrem {?mt_word?} sind keine Referral-Ebenen eingerichtet! Ihre Mitglieder erhalten <u>keine</u> {?POINTS?} gutgeschrieben. Richten Sie mindestens Referral-Ebene 0 mit 100% Verg&uuml;tung ein.",
@@ -1286,6 +1293,7 @@ addMessages(array(
        'ADMIN_POINTS_DATA_CHANGE_SUBMIT' => "Guthabenkonten &auml;ndern",
 
        // Generic: points account types (in fact: column names)
+       'POINTS_ACCOUNT_TYPE'               => "Guthabenkonto",
        'POINTS_ACCOUNT_TYPE_UNKNOWN'       => "Unbekannter Guthabenkontotyp <span class=\"data\">%s</span> erkannt.",
        'POINTS_ACCOUNT_TYPE_POINTS'        => "Allgemeinguthaben",
        'POINTS_ACCOUNT_TYPE_LOCKED_POINTS' => "Gesperrtes Allgemeinguthaben",
index 9fc236d20866832d2fea5bc9408e8715e3a36183..9b7e78dc45e62e418191e3a1822b1a052847a250 100644 (file)
@@ -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 (file)
index 0000000..ad99c50
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 07/29/2011 *
+ * ===================                          Last change: 07/29/2011 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-list_booking.php                            *
+ * -------------------------------------------------------------------- *
+ * Short description : List per-user booking history                    *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Buchungs-Historie per Mitglied auflisten         *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+       die();
+} // END - if
+
+// Display only title when no form was submitted
+addYouAreHereLink('admin', __FILE__);
+
+// Check if 'userid' is set
+if (isGetRequestElementSet('userid')) {
+       // Delete entries?
+       if (isFormSent('do_delete')) {
+               // Remove entries from database
+               showEntriesByXmlCallback('admin_delete_do_booking');
+       } // END - if
+
+       // List all entries per user
+       showEntriesByXmlCallback('admin_list_booking', array(
+               'userid' => bigintval(getRequestElement('userid'))
+       ));
+} else {
+       // Output selection form with all confirmed user accounts listed
+       addMemberSelectionBox();
+}
+
+// [EOF]
+?>
index 7211ec693dbcde3d140542385f958db4ad9172e8..7bae72887b191e0504fc408c5c10a7b31eaba8d7 100644 (file)
@@ -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 (file)
index 0000000..79774d1
--- /dev/null
@@ -0,0 +1,45 @@
+<div align="center">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&amp;what=list_booking%}&amp;userid={%get,bigintval=userid%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+<tr>
+       <td colspan="7" class="table_header bottom" align="center">
+               <strong>{--ADMIN_LIST_BOOKING_RECORDS_TITLE--}</strong>
+       </td>
+</tr>
+<tr>
+       <td align="center" class="header_column bottom right">
+               <strong>{--ID_SELECT--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--POINTS_SUBJECT--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--POINTS_MODE--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--POINTS_ACCOUNT_TYPE--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{?POINTS?}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--BOOKING_RECORDED--}</strong>
+       </td>
+       <td align="center" class="header_column bottom">
+               <strong>{--BOOKING_COMMENTS--}</strong>
+       </td>
+</tr>
+$content
+<tr>
+       <td colspan="7" class="table_footer" align="center">
+               <input type="hidden" name="id[0]" value="1" />
+               <input type="hidden" name="userid" value="{%get,bigintval=userid%}" />
+               <input type="submit" class="form_delete" name="do_delete" value="{--ADMIN_ACTION_DELETE_BOOKING_SUBMIT--}" />
+       </td>
+</tr>
+</table>
+</div>
+
+<div class="notice">
+       {--ADMIN_LIST_BOOKING_NOTICE--}
+</div>
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 (file)
index 0000000..2a2f0d2
--- /dev/null
@@ -0,0 +1,23 @@
+<tr>
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               <strong>$content[id]</strong>
+       </td>
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               {%pipe,translatePointsSubject=$content[subject]%}
+       </td>
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               {%pipe,translatePointsMode=$content[points_mode]%}
+       </td>
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               {%pipe,translatePointsAccountType=$content[points_account_type]%}
+       </td>
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               {%pipe,translateComma=$content[points]%}
+       </td>
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               $content[recorded]
+       </td>
+       <td align="center" class="bottom {%template,ColorSwitch%}">
+               {%pipe,fixEmptyContentToDashes=$content[comments]%}
+       </td>
+</tr>
diff --git a/templates/de/html/member/member_list_booking.tpl b/templates/de/html/member/member_list_booking.tpl
new file mode 100644 (file)
index 0000000..58eb2c7
--- /dev/null
@@ -0,0 +1,35 @@
+<div align="center">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+<tr>
+       <td colspan="6" class="table_header bottom" align="center">
+               <strong>{--MEMBER_LIST_BOOKING_RECORDS_TITLE--}</strong>
+       </td>
+</tr>
+<tr>
+       <td align="center" class="header_column bottom right">
+               <strong>{--POINTS_SUBJECT--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--POINTS_MODE--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--POINTS_ACCOUNT_TYPE--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{?POINTS?}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--BOOKING_RECORDED--}</strong>
+       </td>
+       <td align="center" class="header_column bottom">
+               <strong>{--BOOKING_COMMENTS--}</strong>
+       </td>
+</tr>
+$content
+<tr>
+       <td colspan="6" class="table_footer" align="center">
+               <div class="tiny notice">{--MEMBER_LIST_BOOKING_RECORDS_NOTICE--}</div>
+       </td>
+</tr>
+</table>
+</div>
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 (file)
index 0000000..28e9d0c
--- /dev/null
@@ -0,0 +1,20 @@
+<tr>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               {%pipe,translatePointsSubject=$content[subject]%}
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               {%pipe,translatePointsMode=$content[points_mode]%}
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               {%pipe,translatePointsAccountType=$content[points_account_type]%}
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               {%pipe,translateComma=$content[points]%}
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               $content[recorded]
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom">
+               {%pipe,fixEmptyContentToDashes=$content[comments]%}
+       </td>
+</tr>
diff --git a/templates/xml/admin/admin_delete_do_booking.xml b/templates/xml/admin/admin_delete_do_booking.xml
new file mode 100644 (file)
index 0000000..ddde574
--- /dev/null
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+This template provides meta data for doing deletions on booking log.
+
+@author                Roland Haeder <webmaster@mxchange.org>
+@version       0.2.1-FINAL
+@copyright     (c) 2003 - 2009 by Roland Haeder
+@copyright     (c) 2009 - 2012 by Mailer Developer Team
+@license       GNU GPL 2.0 or any newer version
+@link          http://mxchange.org
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+MA  02110-1301  USA
+//-->
+<admin-entry-meta-data>
+       <!--
+       Call-back function which should all following parameter handled over
+       to. This will always be type of string but we like homogene XMLs.
+       //-->
+       <callback-function type="string" value="adminDeleteEntriesConfirm" />
+       <!--
+       Name of the database table where the entries should be read/write from/to.
+       //-->
+       <database-table name="" type="string" value="user_booking" />
+       <!--
+       The following three lists must have the same count of list entries, else an
+       error may occur.
+       //-->
+       <!--
+       And all column names to read/write, leave this list tag empty for all (*).
+       //-->
+       <database-column-list>
+       </database-column-list>
+       <!--
+       "Filter" call-back functions to call back for piping the fetched data
+       through (can be left empty, no call-back function will be called)
+       //-->
+       <callback-function-list>
+       </callback-function-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       Wether to 'edit/delete/change' (change) the entries (true) or just read them for displaying (false)
+       //-->
+       <enable-modify-entries name="" type="bool" value="true" />
+       <!--
+       The table column which should be taken for the ids (see first parameter).
+       This' type can again only be 'string' (remember why?).
+       //-->
+       <table-id-column name="" type="string" value="id" />
+       <!--
+       The table column which should be taken for user ids
+       This' type can again only be 'string' (remember why?).
+       //-->
+       <table-userid-column name="" type="string" value="userid" />
+       <!--
+       Raw userid column ($key) to skip which is always an invalid (?) entry
+       This' type can again only be 'string' (remember why?).
+       //-->
+       <raw-userid-column-key name="" type="string" value="userid" />
+       <!--
+       Cache file to delete
+       //-->
+       <cache-file name="" type="string" value="" />
+</admin-entry-meta-data>
diff --git a/templates/xml/admin/admin_list_booking.xml b/templates/xml/admin/admin_list_booking.xml
new file mode 100644 (file)
index 0000000..e754b13
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+This template provides meta data for listing member's booking
+
+@author                Roland Haeder <webmaster@mxchange.org>
+@version       0.2.1-FINAL
+@copyright     (c) 2003 - 2009 by Roland Haeder
+@copyright     (c) 2009 - 2012 by Mailer Developer Team
+@license       GNU GPL 2.0 or any newer version
+@link          http://mxchange.org
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+MA  02110-1301  USA
+//-->
+<member-list-data>
+       <!--
+       Call-back function, the extracted data from this XML will then be re-read
+       from that function. The most common function this XML uses is
+       doGenericListEntries() so mostly you can leave this alone unless you have JOINs.
+       //-->
+       <callback-function type="string" value="doGenericListEntries" />
+       <!--
+       Now we need information which template should be loaded and which functions
+       shall be called back. So lets start with the main list template. This mostly
+       requires no call-back function.
+       //-->
+       <list-template type="string" value="admin_list_booking" />
+       <!--
+       The template for all rows, mostly this name has a '_row' suffix and again,
+       no call-back function is usually required.
+       //-->
+       <list-row-template type="string" value="admin_list_booking_row" />
+       <!--
+       Message id to display if no entry could be found
+       //-->
+       <no-entry-found-message type="string" value="ADMIN_BOOKING_404" />
+       <!--
+       The table(s) we shall grab the data from, all as list.
+       //-->
+       <data-tables>
+               <!--
+               A single table entry, with alias and without the configurable
+               _MYSQL_PREFIX. You can specify the table's name or alias later on.
+               //-->
+               <data-table type="string" alias="" value="user_booking" />
+               <!--
+               Columns to perform the SELECT statement on, with alias and name plus which table.
+               //-->
+               <select-data-from-list>
+                       <!--
+                       A single entry with table name (can be left empty), value (must
+                       always be set), alias (again can be left empty) and SQL function
+                       (can also be left empty) which shall be applied on the column.
+                       //-->
+                       <select-data-from-list-entry type="string" table="" value="id" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="userid" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="subject" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="points_mode" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="points_account_type" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="points" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="comments" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="recorded" alias="recorded" function="UNIX_TIMESTAMP" />
+               </select-data-from-list>
+               <!--
+               And the column list to perform the WHERE statement on.
+               //-->
+               <where-select-from-list>
+                       <!--
+                       Search for current user's booking
+                       //-->
+                       <where-select-from-list-entry type="string" table="" value="userid" condition="EQUALS" look-for="$content[userid]" />
+               </where-select-from-list>
+               <!--
+               Columns to perform the ORDER BY statement (GROUP BY is not yet supported)
+               //-->
+               <order-by-list>
+                       <!--
+                       A single entry to perform the ORDER BY statement on, see above WHERE entry for details.
+                       //-->
+                       <order-by-list-entry type="string" table="" order="recorded" value="DESC" />
+               </order-by-list>
+       </data-tables>
+       <!--
+       List all column names from the 'select-data-from-list' node here, but now
+       with call-back informations. The list must only contain those entries where
+       a call-back function shall be called for.
+       //-->
+       <column-callback-list>
+               <!--
+               Another column, now we need a second parameter here because
+               generateDateTime() expects two parameters (first is always the data
+               from column).
+               //-->
+               <column-callback-list-entry>
+                       <!--
+                       The actual data, again.
+                       //-->
+                       <column-callback-data type="string" value="recorded" callback="generateDateTime" />
+                       <!--
+                       More parameters, remember that the first parameter is always given
+                       and that it is the data from column.
+                       //-->
+                       <callback-extra-parameter-list>
+                               <!--
+                               A single parameter, 'type' can be one of 'float', 'int',
+                               'bool', 'string'. 'array' is not yet supported.
+                               //-->
+                               <callback-extra-parameter-list-entry type="int" column="recorded" value="2" />
+                       </callback-extra-parameter-list>
+               </column-callback-list-entry>
+       </column-callback-list>
+</member-list-data>
diff --git a/templates/xml/member/member_list_booking.xml b/templates/xml/member/member_list_booking.xml
new file mode 100644 (file)
index 0000000..174ee59
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+This template provides meta data for listing member's booking
+
+@author                Roland Haeder <webmaster@mxchange.org>
+@version       0.2.1-FINAL
+@copyright     (c) 2003 - 2009 by Roland Haeder
+@copyright     (c) 2009 - 2012 by Mailer Developer Team
+@license       GNU GPL 2.0 or any newer version
+@link          http://mxchange.org
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+MA  02110-1301  USA
+//-->
+<member-list-data>
+       <!--
+       Call-back function, the extracted data from this XML will then be re-read
+       from that function. The most common function this XML uses is
+       doGenericListEntries() so mostly you can leave this alone unless you have JOINs.
+       //-->
+       <callback-function type="string" value="doGenericListEntries" />
+       <!--
+       Now we need information which template should be loaded and which functions
+       shall be called back. So lets start with the main list template. This mostly
+       requires no call-back function.
+       //-->
+       <list-template type="string" value="member_list_booking" />
+       <!--
+       The template for all rows, mostly this name has a '_row' suffix and again,
+       no call-back function is usually required.
+       //-->
+       <list-row-template type="string" value="member_list_booking_row" />
+       <!--
+       Message id to display if no entry could be found
+       //-->
+       <no-entry-found-message type="string" value="MEMBER_BOOKING_404" />
+       <!--
+       The table(s) we shall grab the data from, all as list.
+       //-->
+       <data-tables>
+               <!--
+               A single table entry, with alias and without the configurable
+               _MYSQL_PREFIX. You can specify the table's name or alias later on.
+               //-->
+               <data-table type="string" alias="" value="user_booking" />
+               <!--
+               Columns to perform the SELECT statement on, with alias and name plus which table.
+               //-->
+               <select-data-from-list>
+                       <!--
+                       A single entry with table name (can be left empty), value (must
+                       always be set), alias (again can be left empty) and SQL function
+                       (can also be left empty) which shall be applied on the column.
+                       //-->
+                       <select-data-from-list-entry type="string" table="" value="subject" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="points_mode" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="points_account_type" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="points" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="comments" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="recorded" alias="recorded" function="UNIX_TIMESTAMP" />
+               </select-data-from-list>
+               <!--
+               And the column list to perform the WHERE statement on.
+               //-->
+               <where-select-from-list>
+                       <!--
+                       Search for current user's booking
+                       //-->
+                       <where-select-from-list-entry type="string" table="" value="userid" condition="EQUALS" look-for="{%pipe,getMemberId%}" />
+               </where-select-from-list>
+               <!--
+               Columns to perform the ORDER BY statement (GROUP BY is not yet supported)
+               //-->
+               <order-by-list>
+                       <!--
+                       A single entry to perform the ORDER BY statement on, see above WHERE entry for details.
+                       //-->
+                       <order-by-list-entry type="string" table="" order="recorded" value="DESC" />
+               </order-by-list>
+       </data-tables>
+       <!--
+       List all column names from the 'select-data-from-list' node here, but now
+       with call-back informations. The list must only contain those entries where
+       a call-back function shall be called for.
+       //-->
+       <column-callback-list>
+               <!--
+               Another column, now we need a second parameter here because
+               generateDateTime() expects two parameters (first is always the data
+               from column).
+               //-->
+               <column-callback-list-entry>
+                       <!--
+                       The actual data, again.
+                       //-->
+                       <column-callback-data type="string" value="recorded" callback="generateDateTime" />
+                       <!--
+                       More parameters, remember that the first parameter is always given
+                       and that it is the data from column.
+                       //-->
+                       <callback-extra-parameter-list>
+                               <!--
+                               A single parameter, 'type' can be one of 'float', 'int',
+                               'bool', 'string'. 'array' is not yet supported.
+                               //-->
+                               <callback-extra-parameter-list-entry type="int" column="recorded" value="2" />
+                       </callback-extra-parameter-list>
+               </column-callback-list-entry>
+       </column-callback-list>
+</member-list-data>