inc/extensions/ext-cache.php svneol=native#text/plain
inc/extensions/ext-clickbanner.php svneol=native#text/plain
inc/extensions/ext-country.php svneol=native#text/plain
+inc/extensions/ext-coupon.php svneol=native#text/plain
inc/extensions/ext-debug.php svneol=native#text/plain
inc/extensions/ext-demo.php svneol=native#text/plain
inc/extensions/ext-doubler.php svneol=native#text/plain
templates/de/html/ext/ext_cache.tpl svneol=native#text/plain
templates/de/html/ext/ext_clickbanner.tpl svneol=native#text/plain
templates/de/html/ext/ext_country.tpl svneol=native#text/plain
+templates/de/html/ext/ext_coupon.tpl svneol=native#text/plain
templates/de/html/ext/ext_debug.tpl svneol=native#text/plain
templates/de/html/ext/ext_demo.tpl svneol=native#text/plain
templates/de/html/ext/ext_doubler.tpl svneol=native#text/plain
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer-Project 0.2.1-FINAL Start: 01/07/2005 *
+ * ========================== Last change: 01/07/2005 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : ext-coupon.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Coupon system *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Coupon-System *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.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')) {
+ die();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0');
+
+// Version history array (add more with , '0.1' and so on)
+setExtensionVersionHistory(array('0.0'));
+
+switch (getExtensionMode()) {
+ case 'register': // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ addExtensionSql('');
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ addExtensionSql('');
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ addExtensionSql('');
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ addExtensionSql('');
+ break;
+
+ case 'update': // Update an extension
+ switch (getCurrentExtensionVersion()) {
+ case '0.0.1': // SQL queries for v0.0.1
+ addExtensionSql('');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes('');
+ break;
+ } // END - switch
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes
+ break;
+
+ case 'init': // Do stuff when extension is initialized
+ break;
+
+ default: // Unknown extension mode
+ logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+ break;
+} // END - switch
+
+// [EOF]
+?>
// Add userid and his ref count to table
$result_ref = SQL_QUERY_ESC("SELECT
- SUM(p.points) AS points
+ SUM(p.points) AS `points`
FROM
`{?_MYSQL_PREFIX?}_user_points` AS p
LEFT JOIN
// Points of ref's
$result_ref = SQL_QUERY_ESC("SELECT
- SUM(p.points) AS points
+ SUM(p.points) AS `points`
FROM
`{?_MYSQL_PREFIX?}_user_points` AS p
LEFT JOIN
} // END - if
addSql("SELECT
- " . $USE . " AS points
+ " . $USE . " AS `points`
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
// Check if at least one is in the active rallye
$result = SQL_QUERY_ESC("SELECT
- `userid`, `email`, `gender`, `surname`, `family`, ".$USE." AS points, `last_online`
+ `userid`, `email`, `gender`, `surname`, `family`, ".$USE." AS `points`, `last_online`
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
// Load referal's data
$result = SQL_QUERY_ESC("SELECT
`id`, `gender`, `surname`, `family`, `email`,
- (`points_amount` - `points_used`) AS points,
+ (`points_amount` - `points_used`) AS `points`,
`receive_warnings`, `ref_count` AS refs
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
if (isExtensionActive('transfer')) {
// Statistics for points transfers
$result = SQL_QUERY("SELECT
- COUNT(t.id) AS cnt, SUM(t.points) AS points
+ COUNT(t.id) AS cnt, SUM(t.points) AS `points`
FROM
`{?_MYSQL_PREFIX?}_user_transfers_in` AS t
LEFT JOIN
`id`, `status`, `gender`, `surname`, `family`,
`company`, `position`, `tax_ident`,
`street_nr1`, `street_nr2`, `country`, `zip`, `city`, `email`, `phone`, `fax`, `cell`,
- `points_amount` AS points, `last_payment`, `last_currency`
+ `points_amount` AS `points`, `last_payment`, `last_currency`
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
WHERE
// Calulate points
$result = SQL_QUERY_ESC("SELECT
- (`pay_rate` * `pay_min_count`) AS points, `pay_min_count` AS pay, `pay_currency` AS curr
+ (`pay_rate` * `pay_min_count`) AS `points`, `pay_min_count`, `pay_currency`
FROM
`{?_MYSQL_PREFIX?}_sponsor_paytypes`
WHERE
//// TOP earners
$result = SQL_QUERY("SELECT
d.userid,
- (SUM(p.points) - d.used_points) AS points,
+ (SUM(p.points) - d.used_points) AS `points`,
d.last_online
FROM
`{?_MYSQL_PREFIX?}_user_data` AS d
// Let's check if there are some points left we can pay...
$result = SQL_QUERY_ESC("SELECT
- `userid`, `beg_points` AS points, `last_online`
+ `userid`, `beg_points`, `last_online`
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
$count = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
+ // @TODO points->beg_points
$content = array(
'cnt' => $count,
'userid' => $content['userid'],
- 'points' => $content['points'],
+ 'points' => $content['beg_points'],
'last_online' => generateDateTime($content['last_online'], 2),
);
// Let's check if there are some points left we can 'pay'...
$result = SQL_QUERY_ESC("SELECT
- `userid`, ".$USE." AS points, `last_online`
+ `userid`, ".$USE." AS `points`, `last_online`
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
} elseif (isGetRequestParameterSet('mailid')) {
// Display regular member mail by loading its full data
$result_data = SQL_QUERY_ESC("SELECT
- s.id, s.subject, p.text, s.timestamp_ordered AS `timestamp`, s.cat_id, pay.price AS points, p.sender, pay.time, p.data_type
+ s.id, s.subject, p.text, s.timestamp_ordered AS `timestamp`,
+ s.cat_id, pay.price AS `points`, p.sender, pay.time, p.data_type
FROM
`{?_MYSQL_PREFIX?}_user_stats` AS s
LEFT JOIN
// Load some data
$result = SQL_QUERY_ESC("SELECT
- `id`, `gender`, `surname`, `family`, (`points_amount` - `points_used`) AS points
+ `id`, `gender`, `surname`, `family`, (`points_amount` - `points_used`) AS `points`
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
WHERE
// SQL string to check for accounts
$result_main = SQL_QUERY("SELECT
- `userid`, `email`, `gender`, `surname`, `family`, `beg_points` AS points
+ `userid`, `email`, `gender`, `surname`, `family`, `beg_points` AS `points`
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
// Run SQL string to check for accounts
$result_main = SQL_QUERY('SELECT
- `userid`, `email`, `gender`, `surname`, `family`, (0' . $add . ') AS points
+ `userid`, `email`, `gender`, `surname`, `family`, (0' . $add . ') AS `points`
FROM
`{?_MYSQL_PREFIX?}_user_data`
' . $whereStatement1 . '
--- /dev/null
+<div class="para">
+ Stellen Sie Ihren neuen Mitgliedern Bonus-Coupons aus, mit denen sie an
+ Sonderaktionen, Bonus-Aktionen usw. dran teilnehmen lassen können! Es
+ können auch einfach nur Gutscheine versendet werden, die die Mitglieder
+ im Mitgliedsbereich einlösen und dafür {?POINTS?} erhalten.
+</div>
+
+<div class="para">
+ Für alle Gutscheine kann eine Ablaufzeit eingestellt werden, nach der
+ der Gutschein wieder verfällt.
+</div>