templates/de/html/admin/admin_surfbar_url_stats.tpl -text
templates/de/html/admin/admin_surfbar_url_stats_row.tpl -text
templates/de/html/admin/admin_task_holiday.tpl -text
+templates/de/html/admin/admin_task_order.tpl -text
templates/de/html/admin/admin_theme_edit.tpl -text
templates/de/html/admin/admin_theme_edit_row.tpl -text
templates/de/html/admin/admin_theme_import.tpl -text
// Now let's check for stats entries as well;
$result_mails = SQL_QUERY("SELECT
- `sender`
+ `userid` AS sender
FROM
`{?_MYSQL_PREFIX?}_user_stats`
WHERE
// Reset query (to prevent possible errors) ...
$result_mails = SQL_QUERY("SELECT
- `sender`
+ `userid` AS sender
FROM
`{?_MYSQL_PREFIX?}_user_stats`
WHERE
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
- addAdminMenuSql('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.');
+ addAdminMenuSql('email','send_bonus','Bonusmail senden','Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.', 5);
addMemberMenuSql('main','bonus','Bonuspunkte','N','Y',7);
addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus`");
addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bonus` (
case '0.0.1': // SQL queries for v0.0.1
addAdminMenuSql('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, usw.', 3);
addAdminMenuSql('newsletter','config_newsletter','Einstellungen','Einstellungen am Newsletter vornehmen.', 3);
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1");
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='newsletter' LIMIT 1");
addMemberMenuSql('main','newsletter','Newsletter-Empfang','N','Y', 10);
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `nl_receive` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
// Was that eval okay?
if (empty($newContent)) {
// Something went wrong!
- debug_report_bug('Evaluation error:<pre>' . htmlentities($eval) . '</pre>');
+ debug_report_bug('Evaluation error:<pre>' . linenumberCode($eval) . '</pre>');
} // END - if
$GLOBALS['output'] = $newContent;
unset($DATA);
// Compile the code and eval it
- $eval = '$newContent = "' . compileCode(addSmartSlashes($newContent)) . '";';
+ $eval = '$newContent = "' . compileCode(smartAddSlashes($newContent)) . '";';
eval($eval);
// Return content
shutdown();
}
+// Print code with line numbers
+function linenumberCode ($code) {
+ if (!is_array($code)) $codeE = explode("\n", $code); else $codeE = $code;
+ $count_lines = count($codeE);
+
+ $r = "Line | Code:<br />";
+ foreach($codeE as $line => $c) {
+ $r .= "<div class=\"line\"><span class=\"linenum\">";
+ if ($count_lines == 1) {
+ $r .= '1';
+ } else {
+ $r .= ($line == ($count_lines - 1)) ? '' : ($line+1);
+ }
+ $r .= "</span>|";
+
+ // Add code
+ $r .= "<span class=\"linetext\">" . htmlentities($c) . "</span></div>";
+ }
+
+ return "<div class=\"code\">" . $r . "</div>\n";
+}
+
//////////////////////////////////////////////////
// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
//////////////////////////////////////////////////
} // END - if
// Add BODY tag or not?
-if ((getOutputMode() != '1') && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) {
+if ((getOutputMode() != 1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) {
loadTemplate('page_body');
$GLOBALS['header_sent'] = 2;
} // END - if
'ADMIN_NO_MAILS_IN_POOL' => "Es wurden noch keine Mailbuchungen aufgegeben, kann somit keine Mails anzeigen!",
'ADMIN_POOL_CONTENT' => "Mailbuchungen im Sende-Pool",
'POOL_TYPE_UNKNOWN' => "Unbekannt (%s)",
+ 'POOL_TYPE_DELETED' => "Bereinigt",
'POOL_TYPE_TEMP' => "Neuer Auftrag",
'POOL_TYPE_SEND' => "Gesendet",
'POOL_TYPE_NEW' => "Wartet auf Versand",
'ADMIN_EDIT' => "Ändern",
'ADMIN_EDIT_EXTENSIONS' => "Ändern von Erweiterungen",
'POOL_DELETED' => "Bereinigt",
-// @TODO Are these constants still used?
- 'ONLINE_TIMEOUT_IS_1' => "Die Liste zeigt die Besucher der letzten <strong>",
- 'ONLINE_TIMEOUT_IS_2' => "</strong> an.",
+ 'ONLINE_TIMEOUT_IS' => "Die Liste zeigt die Besucher der letzten <strong>%s</strong> an.",
'ADMIN_CONFIG_EXTENSIONS_SETTINGS' => "Erweiterungs-Management konfigurieren",
'ADMIN_VERBOSE_SQL' => "SQL-Anweisungen beim Registrieren/Updates/Entfernen ausgeben",
'ADMIN_REMOVING_THESE_EXTENSIONS' => "Diese Erweiterungen werden deinstalliert",
'ADMIN_CFG_REPAY_POINTS_JACKPOT' => "In den Jackpot legen",
'ADMIN_CFG_REPAY_POINTS_SHRED' => "Nicht gutschreiben (verfällt dann)",
'ADMIN_REPAY_ON_DELETE_MODE' => "Wie sollen {?POINTS?} von gelöschten Mails verbucht werden?",
+
+ 'ADMIN_TASK_IS_MEMBER_ORDER' => "Mailbuchung vom Mitglied",
+ 'ADMIN_UNLOCK_EMAIL_LINK' => "Mailbuchung ansehen",
));
// [EOF]
if (getConfig('bonus_active') != 'Y') return false;
// Init variables
- $sql = ''; $bonys = 0; $mail = 0; $column = '';
+ $sql = ''; $bonus = 0; $mail = 0; $column = '';
// Select SQL command
- switch ($type)
- {
+ switch ($type) {
case 'bonusid':
$column = 'bonus_id';
$bonus = $mid;
//
function addBonusRanks ($data, $type, $userid) {
// Init variables
- $self = false; $OUT = ''; $content = array();
+ $self = false; $OUT = ''; $GLOBALS['ranking_content'] = array();
// Clear rankings by default
- setConfigEntry('__rankings', '');
+ $GLOBALS['ranking_content']['rankings'] = '';
// How many ranks do we have?
$ranks = count(explode(';', getConfig('turbo_rates'))) + 1;
array($type, $data, $userid), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
- $content = merge_array($content, SQL_FETCHARRAY($result));
+ $GLOBALS['ranking_content'] = merge_array($GLOBALS['ranking_content'], SQL_FETCHARRAY($result));
// Remember all values for later use
$self = true;
// Transfer data to template
- $content['yr_level'] = $content['level'];
- $content['yr_points'] = translateComma($content['points']);
- $content['yr_tmark'] = generateDateTime($content['timemark'], '1');
+ $GLOBALS['ranking_content']['yr_level'] = $GLOBALS['ranking_content']['level'];
+ $GLOBALS['ranking_content']['yr_points'] = translateComma($GLOBALS['ranking_content']['points']);
+ $GLOBALS['ranking_content']['yr_tmark'] = generateDateTime($GLOBALS['ranking_content']['timemark'], '1');
// Load template
- setConfigEntry('__rankings', loadTemplate('show_bonus_yr', true, $content));
+ $GLOBALS['ranking_content']['rankings'] = loadTemplate('show_bonus_yr', true, $GLOBALS['ranking_content']);
} // END - if
// Load rankings
$max = SQL_NUMROWS($result);
// Init variables
- $SW = 2; $content = array();
+ $SW = 2;
// Output all ranks (levels)
for ($rank = 1; $rank <= $max; $rank++) {
array($type, $data, $rank), __FUNCTION__, __LINE__);
// Nothing found by default
- $content['userid'] = '---'; $content['points'] = '---';
+ $GLOBALS['ranking_content']['userid'] = '---';
+ $GLOBALS['ranking_content']['points'] = '---';
// Are you one of them?
if (SQL_NUMROWS($result_users) == 1) {
// Load data
- $content = merge_array($content, SQL_FETCHARRAY($result_users));
+ $GLOBALS['ranking_content'] = merge_array($GLOBALS['ranking_content'], SQL_FETCHARRAY($result_users));
// Translate comma
- $content['points'] = translateComma($content['points']);
+ $GLOBALS['ranking_content']['points'] = translateComma($GLOBALS['ranking_content']['points']);
} // END - if
// Add more
- $content['rank'] = $rank;
- $content['sw'] = $SW;
+ $GLOBALS['ranking_content']['rank'] = $rank;
+ $GLOBALS['ranking_content']['sw'] = $SW;
// Output row
$OUT .= "<tr>
- <td class=\"bonus_rank_".$content['level']." bottom2 switch_sw".$content['sw']."\"> ".$content['level'].".</td>
- <td class=\"bonus_rank_".$content['level']." bottom2 switch_sw".$content['sw']."\" align=\"center\">".$content['userid']."</td>
- <td class=\"bonus_rank_".$content['level']." bottom2 switch_sw".$content['sw']."\" align=\"center\">".$content['points']."</td>
+ <td class=\"bonus_rank_".$GLOBALS['ranking_content']['rank']." bottom2 switch_sw".$GLOBALS['ranking_content']['sw']."\"> ".$GLOBALS['ranking_content']['rank'].".</td>
+ <td class=\"bonus_rank_".$GLOBALS['ranking_content']['rank']." bottom2 switch_sw".$GLOBALS['ranking_content']['sw']."\" align=\"center\">".$GLOBALS['ranking_content']['userid']."</td>
+ <td class=\"bonus_rank_".$GLOBALS['ranking_content']['rank']." bottom2 switch_sw".$GLOBALS['ranking_content']['sw']."\" align=\"center\">".$GLOBALS['ranking_content']['points']."</td>
</tr>\n";
// Switch color
if ($self === false) {
// If current user was not found set constant
// @TODO Try to find a way for rewriting this constant
- setConfigEntry('__rankings', getMessage('BONUS_RANK_YOU_ARE_404'));
+ $GLOBALS['ranking_content']['rankings'] = getMessage('BONUS_RANK_YOU_ARE_404');
} // END - if
} else {
// No entries found!
$OUT .= loadTemplate('admin_task_holiday', true, $userid);
break;
+ case 'MEMBER_ORDER': // Member mail orders
+ $OUT .= loadTemplate('admin_task_order', true, $id);
+ break;
+
default: // Unknown task type
logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type));
$OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $type, $id)."</div>\n";
ON
s.pool_id=p.id
WHERE
- s.pool_id=%s
+ s.`pool_id`=%s
LIMIT 1",
array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_pool) == 1) {
$WHO = getMessage('USER_ID').": ".getRequestElement('userid');
}
-if ((isExtensionActive('bonus')) && ($WHO == _ALL)) {
+if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
// Bonus mails sent by you
// 0 1 2 3 4 5 6 7 8 9 10 11 12
$SQL2 = "SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, clicks
// Run SQL query for normal mails
$result_list = SQL_QUERY($sql, __FILE__, __LINE__);
-if ((!empty($SQL2)) && ($WHO == _ALL)) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
+if ((!empty($SQL2)) && ($WHO == getMessage('_ALL'))) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
// Calculate pages
$PAGES = 0;
// Walk through all entries
while ($pool = SQL_FETCHARRAY($result_list)) {
// Unconfirmed mails and sent mails
- $result_uncon = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE pool_id=%s LIMIT 1",
+ $result_uncon = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
array(bigintval($pool['id'])), __FILE__, __LINE__);
list($pool['sent_email'], $pool['clicks']) = SQL_FETCHROW($result_uncon);
SQL_FREERESULT($result_uncon);
loadTemplate('admin_list_emails', false, $content);
$MAIL = true;
- if ((isExtensionActive('bonus')) && ($WHO == _ALL)) {
+ if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
// Check only if bonus extension is active
if (SQL_NUMROWS($result_bonus) > 0) outputHtml('<br /><br />');
}
}
-if ((isExtensionActive('bonus')) && ($WHO == _ALL)) {
+if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
// Load bonus mails only when extension is active
if (SQL_NUMROWS($result_bonus) > 0) {
// Calculate pages
$content['members_online'] = countSumTotalData('N', 'online', 'id', 'is_admin', true);
// Load template
- loadTemplate('admin_mini_online');
+ loadTemplate('admin_mini_online', false, $content);
// Check for online users
$result = SQL_QUERY("SELECT `id`, `ip`, `userid`, `refid`, `module`, `action`, `what`, `is_member`, `is_admin`, `timestamp` FROM `{?_MYSQL_PREFIX?}_online` ORDER by `timestamp` DESC",
if (SQL_NUMROWS($result) > 0) {
// List all online users
$OUT = ''; $SW = 2;
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($row = SQL_FETCHARRAY($result)) {
// Fix empty action/what
- if (empty($content['action'])) $content['action'] = '---';
- if (empty($content['what'])) $content['what'] = '---';
+ if (empty($row['action'])) $row['action'] = '---';
+ if (empty($row['what'])) $row['what'] = '---';
- if ($content['is_admin'] == 'Y') {
+ if ($row['is_admin'] == 'Y') {
// Is an administrator
- $content['userid'] = getMessage('_IS_ADMIN');
- } elseif (($content['is_member'] != 'Y') && ($content['is_admin'] != 'Y')) {
+ $row['userid'] = getMessage('_IS_ADMIN');
+ } elseif (($row['is_member'] != 'Y') && ($row['is_admin'] != 'Y')) {
// Is a guest
- $content['userid'] = getMessage('_IS_GUEST');
- } elseif ($content['userid'] > 0) {
+ $row['userid'] = getMessage('_IS_GUEST');
+ } elseif ($row['userid'] > 0) {
// Add profile link to userid
- $content['userid'] = generateUserProfileLink($content['userid']);
+ $row['userid'] = generateUserProfileLink($row['userid']);
} // END - if
// Is the refid set?
- if ($content['refid'] > 0) {
+ if ($row['refid'] > 0) {
// Add profile link to referer id
- $content['refid'] = generateUserProfileLink($content['refid']);
+ $row['refid'] = generateUserProfileLink($row['refid']);
} // END - if
// Add more content
- $content['sw'] = $SW;
- $content['timestamp'] = generateDateTime($content['timestamp'], '2');
+ $row['sw'] = $SW;
+ $row['timestamp'] = generateDateTime($row['timestamp'], '2');
// Load row template and switch color
- $OUT .= loadTemplate('admin_list_online_row', true, $content);
+ $OUT .= loadTemplate('admin_list_online_row', true, $row);
$SW = 3 - $SW;
} // END - while
// Remember rows and fancy time in array
$content['rows'] = $OUT;
- $content['online_timeout'] = createFancyTime(getConfig('online_timeout'));
+ $content['online_timeout'] = sprintf(getMessage('ONLINE_TIMEOUT_IS'), createFancyTime(getConfig('online_timeout')));
// Load footer template
loadTemplate('admin_list_online', false, $content);
if (!defined('__SECURITY')) {
die();
} elseif (!isBlockModeEnabled()) {
- // Block mode detected
+ // Non-block mode detected
return;
}
die();
} elseif (!isMember()) {
redirectToIndexMemberOnlyModule();
+} elseif (!isBlockModeEnabled()) {
+ // Non-block mode detected
+ return;
}
-// Add description as navigation point
-addMenuDescription('member', __FILE__);
-
if ((!isExtensionActive('theme')) && (!isAdmin())) {
loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme'));
return;
// Notify admins about this
sendAdminNotification(getMessage('ADMIN_NEW_QUEUE'), 'order-admin', $content, getUserId());
+ // Create new task
+ createNewTask(
+ '{--ADMIN_NEW_QUEUE--}',
+ '<pre>'.loadEmailTemplate('order-admin', $content, getUserId()).'</pre>',
+ 'MEMBER_ORDER',
+ getUserId(),
+ 0,
+ false
+ );
+
// Output back bottom
- loadTemplate('member_order-back', false);
+ loadTemplate('member_order-back');
} else {
// Matching line not found or already 'placed' in send queue
redirectToUrl('modules.php?module=login');
SQL_FREERESULT($result_user);
// Do we have a stats entry?
- $result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE pool_id=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
+ $result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
array($DATA['id'], $DATA['sender'], $DATA['timestamp']), __FILE__, __LINE__);
// If there's no stats entry add it!
//* DEBUG: */ outputHtml("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />");
if (SQL_NUMROWS($result_stats) == 0) {
// No entry was found, so we add him!
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (pool_id , userid, cat_id, payment_id, subject, url , max_rec , timestamp_ordered, timestamp_sstart) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (`pool_id` , `userid`, `cat_id`, `payment_id`, `subject`, `url` , `max_rec` , `timestamp_ordered`, `timestamp_sstart`) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['cat_id']), bigintval($DATA['payment_id']), $DATA['subject'], $DATA['url'], $DATA['target_send'], bigintval($DATA['timestamp'])), __FILE__, __LINE__);
// Receive it's ID for the links table
- $result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE pool_id=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
+ $result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['timestamp'])), __FILE__, __LINE__);
} // END - if
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email',NULL,'Email-Management','Gebuchte Mails umleiten, Details zu den Buchungen anzeigen, Emails freigeben, registrierte Email-Adress auf Verfügbarkeit testen (Mass-Mailing!), Newsletter versenden, Email-Adressen sperren (Email-Backlist), gebuchte URLs sperren (URL-Blacklist)',4);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup',NULL,'Einstellungen','Interessen ändern, News schreiben, allgmeine Einstellungen (Auto-Versand usw.). Auto-Lock Funktion einrichten, manueller Lock des Versandes einrichten, Teile der Homepage sperren (wegen Wartungsarbeiten)',5);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc',NULL,'Verschiedenes','Verschiedene Einstellungen / Info-Seiten, die sonst nirgenswo reinpassten...',6);
-INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','newsletter','Newsletter versenden','Text- oder HTML-Newsletter verschicken.',5);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_stats','Email-Statistiken','Schauen Sie sich detailierte Statistiken zu den bereits versanden Mails an.',5);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','edit_emails','Email-Daten ändern','Hier können Sie u.a. die gebuchte URL der Emails umändern, usw.',5);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','unlock_emails','Emails freigeben','Geben Sie bei manuellem Versand gebuchte Mails hier frei.',5);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email',NULL,'Email-Management','Gebuchte Mails umleiten, Details zu den Buchungen anzeigen, Emails freigeben, registrierte Email-Adress auf Verfügbarkeit testen (Mass-Mailing!), Newsletter versenden, Email-Adressen sperren (Email-Backlist), gebuchte URLs sperren (URL-Blacklist)',4);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup',NULL,'Einstellungen','Interessen ändern, News schreiben, allgmeine Einstellungen (Auto-Versand usw.). Auto-Lock Funktion einrichten, manueller Lock des Versandes einrichten, Teile der Homepage sperren (wegen Wartungsarbeiten)',5);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc',NULL,'Verschiedenes','Verschiedene Einstellungen / Info-Seiten, die sonst nirgenswo reinpassten...',6);
-INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','newsletter','Newsletter versenden','Text- oder HTML-Newsletter verschicken.',5);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_stats','Email-Statistiken','Schauen Sie sich detailierte Statistiken zu den bereits versanden Mails an.',5);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','edit_emails','Email-Daten ändern','Hier können Sie u.a. die gebuchte URL der Emails umändern, usw.',5);
INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','unlock_emails','Emails freigeben','Geben Sie bei manuellem Versand gebuchte Mails hier frei.',5);
// Tell everyone we are in this module
$GLOBALS['module'] = 'mailid';
-$GLOBALS['output_mode'] = -1;
+$GLOBALS['output_mode'] = 1;
$errorCode = '';
// Load the required file(s)
setExtraTitle($title);
// Is the user's ID unlocked?
- $result = SQL_QUERY_ESC("SELECT `status`, `gender`, `surname`,` family` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `status`, `gender`, `surname`, `family` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1",
array($url_userid), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
list($status, $gender, $surname, $family) = SQL_FETCHROW($result);
switch ($ltype)
{
case 'NORMAL':
- $result = SQL_QUERY_ESC("SELECT payment_id FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE pool_id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT payment_id FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
array(bigintval($pool)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
list($pay) = SQL_FETCHROW($result);
);
// Load template
- loadTemplate('mailid_frames');
+ loadTemplate('mailid_frames', false, $content);
} else {
$errorCode = getCode('DATA_INVALID');
}
redirectOnUninstalledExtension('mailid');
// Secure all data
-$url_userid = 0; $url_bid = 0; $url_mid = 0; $code = 0; $mode = '';
-if (isGetRequestElementSet('userid')) $url_userid = bigintval(getRequestElement('userid'));
-if (isGetRequestElementSet('mailid')) $url_mid = bigintval(getRequestElement('mailid'));
-if (isGetRequestElementSet('bonusid')) $url_bid = bigintval(getRequestElement('bonusid'));
-if (isGetRequestElementSet('code')) $code = bigintval(getRequestElement('code'));
-if (isGetRequestElementSet('mode')) $mode = getRequestElement('mode');
+$url_userid = 0;
+$url_bid = 0;
+$url_mid = 0;
+$code = 0;
+$mode = '';
+
+if (isGetRequestElementSet('userid')) $url_userid = bigintval(getRequestElement('userid'));
+if (isGetRequestElementSet('mailid')) $url_mid = bigintval(getRequestElement('mailid'));
+if (isGetRequestElementSet('bonusid')) $url_bid = bigintval(getRequestElement('bonusid'));
+if (isGetRequestElementSet('code')) $code = bigintval(getRequestElement('code'));
+if (isGetRequestElementSet('mode')) $mode = getRequestElement('mode');
// 01 1 12 2 2 21 1 22 10
if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
// Maybe he wants to confirm an email?
if ($url_mid > 0) {
$result = SQL_QUERY_ESC("SELECT `id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1",
- array($url_mid, $url_userid), __FILE__, __LINE__);
+ array($url_mid, $url_userid), __FILE__, __LINE__);
$type = 'mailid'; $urlId = $url_mid;
} elseif ($url_bid > 0) {
$result = SQL_QUERY_ESC("SELECT `id`, link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1",
if ($ltype == 'BONUS') $sender = 0;
// Is the user's ID unlocked?
- $result = SQL_QUERY_ESC("SELECT status, gender, surname, family, ref_payout FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1",
- array($url_userid), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `status`, `gender`, `surname`, `family`, `ref_payout` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1",
+ array($url_userid), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list($status, $gender, $surname, $family, $ref_pay) = SQL_FETCHROW($result);
}
// Is this entry valid?
- if ($isValid) {
+ if ($isValid === true) {
if (($time == '0') && ($payment > 0)) $time = '1';
if (($time > 0) && ($payment > 0)) {
+ $img_code = 0;
if (!empty($code)) {
// Generate code
$img_code = generateRandomCode(getConfig('code_length'), $code, $url_userid, $urlId);
// Shall I exclude the webmaster's own userid from the active-rallye?
if ((((getConfig('bonus_userid') == $url_userid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_userid') != $url_userid)) && (getConfig('def_refid') != $url_userid)) {
// Add points and remember ranking are done in this function....
- addTurboBonus($payment, $url_userid, $type);
+ addTurboBonus($urlId, $url_userid, $type);
// Set template to mailid_points_done2 which contains a link to the ranking list
$template = 'mailid_points_done2';
if ($locked) $template = 'mailid_points_locked2';
$content['userid'] = $url_userid;
- $content['type'] = $type;
- $content['data'] = translateComma($payment);
+ $content['type'] = $type;
+ $content['data'] = $urlId;
} // END - if
} // END - if
} // END - if
case 'confirm':
if ($code > 0) {
// Export data into constants for the template
- $content['code'] = $code;
- $content['userid'] = $url_userid;
- $content['type'] = $type;
+ $content['code'] = $code;
+ $content['userid'] = $url_userid;
+ $content['type'] = $type;
$content['data'] = $urlId;
$content['banner'] = loadTemplate('mailid_banner', true);
if (getConfig('code_length') > 0) {
WHERE
d.`status`='CONFIRMED' AND d.userid=%s AND b.%s=%s
LIMIT 1",
- array(bigintval(getRequestElement('userid')), $t, bigintval(getRequestElement('d'))), __FILE__, __LINE__);
+ array(
+ bigintval(getRequestElement('userid')),
+ $t,
+ bigintval(getRequestElement('d'))
+ ), __FILE__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
$content['mailid'] = bigintval(getRequestElement('d'));
$content['rows'] = addBonusRanks(bigintval(getRequestElement('d')), $t, bigintval(getRequestElement('userid')));
+ // Get some prepared content
+ $content = merge_array($content, $GLOBALS['ranking_content']);
+
// Load pre-template
$content['message'] = loadTemplate('show_bonus_msg', true, $content);
} else {
// Load show_bonus footer template (for your banners, e.g.?)
$content['footer'] = loadTemplate('show_bonus_footer', true);
-// Total ranks who can win
-$content['total_ranks'] = getConfig('bonus_ranks');
-
// Load final template
loadTemplate('show_bonus', false, $content);
</tr>
$content[rows]
<tr>
- <td colspan="8" class="admin_footer">$content</td>
+ <td colspan="8" class="admin_footer">$content[online_timeout]</td>
</tr>
</table>
+<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="170" class="admin_table dashed">
<tr>
<td colspan="3" class="admin_title bottom2" align="center" height="30">
<td><strong>$content[admins_online]</strong></td>
</tr>
</table>
+</div>
+<br />
\ No newline at end of file
--- /dev/null
+<a href="{?URL?}/modules.php?module=admin&what=unlock_emails&task_id=$content">{--ADMIN_UNLOCK_EMAIL_LINK--}</a>
<td width="10" class="seperator"> </td>
<td width="220" align="center">
<form accept-charset="utf-8"
- action="{?URL?}/mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&mode=add&code={--_CODE_VALUE!}"
+ action="{?URL?}/mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&mode=add&code=$content[code]"
method="post" style="margin-bottom: 0px">{--ENTER_CODE--}:
$content[image]<br />
<input type="text" name="gfx_check" class="member_normal" size="5"
{--HELLO--} $content[gender] $content[surname] $content[family]!
<br />
<br />
-{--BONUS_SHOW_HEADER_LINE_1--}<strong>{?POINTS?}</strong>{--BONUS_SHOW_HEADER_LINE_2--}<strong>$content[mailid]</strong>{--BONUS_SHOW_HEADER_LINE_3--}:
+{--BONUS_SHOW_HEADER_LINE_1--} <strong>{?POINTS?}</strong> {--BONUS_SHOW_HEADER_LINE_2--} <strong>$content[mailid]</strong> {--BONUS_SHOW_HEADER_LINE_3--}:
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0" width="300" class="member_table dashed">
</tr>
</table>
-<div>{?__rankings?}</div>
+<div>
+ $content[rankings]
+</div>
<div class="member_note">
Wir wünschen allen Gewinnern viel Glück bei der monatlichen Aktiv-Rallye!<br />
- Es können nur die ersten <u>$content[total_ranks]</u> die Aktiv-Rallye gewinnen. Der Rechtsweg ist ausgeschlossen.
+ Es können nur die ersten <u>{?bonus_ranks?}</u> die Aktiv-Rallye gewinnen. Der Rechtsweg ist ausgeschlossen.
</div>
<td align="center">
{--BONUS_SHOW_YOU_HAVE_CONFIRMED--} <strong class="nobr">$content[yr_tmark]</strong>
{--_ON--} <strong>$content[yr_level].</strong>
- {--BONUS_SHOW_CONFIRMED_BONUS_IS--}: <strong class="nobr">$content[yr_points] ?POINTS?}</strong>
+ {--BONUS_SHOW_CONFIRMED_BONUS_IS--}: <strong class="nobr">$content[yr_points] {?POINTS?}</strong>
</td>
</tr>
</table>