]> git.mxchange.org Git - mailer.git/commitdiff
Several fixes for broken actions (sorry for lame text)
authorRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 23:11:25 +0000 (23:11 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 23:11:25 +0000 (23:11 +0000)
28 files changed:
.gitattributes
inc/autopurge/purge-mails.php
inc/extensions/ext-bonus.php
inc/extensions/ext-newsletter.php
inc/functions.php
inc/header.php
inc/language/de.php
inc/language/order_de.php
inc/libs/bonus_functions.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-del_email.php
inc/modules/admin/what-email_details.php
inc/modules/admin/what-usr_online.php
inc/modules/guest/action-themes.php
inc/modules/member/action-themes.php
inc/modules/order.php
inc/pool/pool-user.php
install/menu-de.sql
install/menu-en.sql
mailid.php
mailid_top.php
show_bonus.php
templates/de/html/admin/admin_list_online.tpl
templates/de/html/admin/admin_mini_online.tpl
templates/de/html/admin/admin_task_order.tpl [new file with mode: 0644]
templates/de/html/mailid/mailid_enter_code.tpl
templates/de/html/show_bonus_msg.tpl
templates/de/html/show_bonus_yr.tpl

index 9c5e4f2bdd1e7a05f5e89c3b8d1a8e2f427c7e6e..ed65ee1c84d2e3bd638a5d16ed13005ed5fe21e7 100644 (file)
@@ -1196,6 +1196,7 @@ templates/de/html/admin/admin_surfbar_stats_row.tpl -text
 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
index 1528fc2ebeb34eaba5de36e7e25babc3383f80a4..5741d36d2032c81a316543534454de481347a98d 100644 (file)
@@ -93,7 +93,7 @@ ORDER BY
 
        // Now let's check for stats entries as well;
        $result_mails = SQL_QUERY("SELECT
-       `sender`
+       `userid` AS sender
 FROM
        `{?_MYSQL_PREFIX?}_user_stats`
 WHERE
@@ -116,7 +116,7 @@ ORDER BY
 
                                // Reset query (to prevent possible errors) ...
                                $result_mails = SQL_QUERY("SELECT
-       `sender`
+       `userid` AS sender
 FROM
        `{?_MYSQL_PREFIX?}_user_stats`
 WHERE
index a74f7e0f867865a6786a226fcd92f8b0974fb80e..822c154a5dfedebdba5977942b5f74f5a3187c07 100644 (file)
@@ -50,7 +50,7 @@ setExtensionVersionHistory(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2
 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&ouml;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&ouml;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` (
index 7ff6a385474e355218e25f6aee0e547ba9ad7251..6e6d0174b12fd4a4ee61c5b06144b732bc6da71b 100644 (file)
@@ -77,7 +77,7 @@ switch (getExtensionMode()) {
                        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'");
 
index e32114a46e717753adf5828f7992b5bba29a0e9f..9cd97a5890e348df795c823a58f6095aad5697a6 100644 (file)
@@ -136,7 +136,7 @@ function outputHtml ($htmlCode, $newLine = true) {
                        // 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;
 
@@ -561,7 +561,7 @@ function loadEmailTemplate ($template, $content = array(), $UID = '0') {
        unset($DATA);
 
        // Compile the code and eval it
-       $eval = '$newContent = "' . compileCode(addSmartSlashes($newContent)) . '";';
+       $eval = '$newContent = "' . compileCode(smartAddSlashes($newContent)) . '";';
        eval($eval);
 
        // Return content
@@ -3599,6 +3599,28 @@ function handleFatalErrors () {
        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 //
 //////////////////////////////////////////////////
index 3ea5b4acfbc8529cb3d6adb484d65981fd8234e3..9cff89dd5818d3a84b81ec12badfec54a94d5ce7 100644 (file)
@@ -128,7 +128,7 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
 } // 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
index 8762613836335ef1a12f87c4e18bc8119e0ff656..f82881b93745d28532008852ffc9bff79db7bc55 100644 (file)
@@ -423,6 +423,7 @@ addMessages(array(
        '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",
@@ -829,9 +830,7 @@ addMessages(array(
        'ADMIN_EDIT' => "&Auml;ndern",
        'ADMIN_EDIT_EXTENSIONS' => "&Auml;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",
index ec3c5673c747636d97763c3b8223b7f2e4b3edbc..59b7ec91f2da52b3916e14c3bcf1408a1437c8f7 100644 (file)
@@ -82,6 +82,9 @@ addMessages(array(
        'ADMIN_CFG_REPAY_POINTS_JACKPOT' => "In den Jackpot legen",
        'ADMIN_CFG_REPAY_POINTS_SHRED' => "Nicht gutschreiben (verf&auml;llt dann)",
        'ADMIN_REPAY_ON_DELETE_MODE' => "Wie sollen {?POINTS?} von gel&ouml;schten Mails verbucht werden?",
+
+       'ADMIN_TASK_IS_MEMBER_ORDER' => "Mailbuchung vom Mitglied",
+       'ADMIN_UNLOCK_EMAIL_LINK' => "Mailbuchung ansehen",
 ));
 
 // [EOF]
index 445857c6ae8c92ab7b7a8f78ff2df560af52232f..9cbf52d1ffb2ec2129d88b429ef04a2b499c3035 100644 (file)
@@ -47,11 +47,10 @@ function addTurboBonus ($mid, $userid, $type) {
        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;
@@ -112,10 +111,10 @@ function addTurboBonus ($mid, $userid, $type) {
 //
 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;
@@ -125,18 +124,18 @@ function addBonusRanks ($data, $type, $userid) {
                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
@@ -147,7 +146,7 @@ function addBonusRanks ($data, $type, $userid) {
                $max = SQL_NUMROWS($result);
 
                // Init variables
-               $SW = 2; $content = array();
+               $SW = 2;
 
                // Output all ranks (levels)
                for ($rank = 1; $rank <= $max; $rank++) {
@@ -156,26 +155,27 @@ function addBonusRanks ($data, $type, $userid) {
                                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']."\">&nbsp;".$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']."\">&nbsp;".$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
@@ -185,7 +185,7 @@ function addBonusRanks ($data, $type, $userid) {
                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!
index 97679cc87bc51d8c332a4131d6cedc76529d2a68..957e8365868bca5ad2ccee29a209dfe741de4992 100644 (file)
@@ -373,6 +373,10 @@ LIMIT 1",
                                                $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";
index d87a5109640e64b96bf023bcb36e4c02cf054ea2..48ec07db39fa1ea46bfecb5799eeac9c1850e1b4 100644 (file)
@@ -86,7 +86,7 @@ LEFT JOIN
 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) {
index a71abbac3a4310215734e548f823e6821402a4b8..dada51d2cb9a6c7df79a35286a06f64bdf213be2 100644 (file)
@@ -82,7 +82,7 @@ ORDER by timestamp DESC";
        $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
@@ -124,7 +124,7 @@ if (!isGetRequestElementSet(('mid'))) {
 
 // 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;
@@ -143,7 +143,7 @@ if (SQL_NUMROWS($result_list) > 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);
@@ -187,13 +187,13 @@ if (SQL_NUMROWS($result_list) > 0) {
        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
index eb9e1dbb9364c81bbc73ba8fe3c2be2cd5b15e8d..fc8b6e782c3a727ff6c5e13d7007689eebfce358 100644 (file)
@@ -53,7 +53,7 @@ if (isExtensionActive('online')) {
        $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",
@@ -61,34 +61,34 @@ if (isExtensionActive('online')) {
        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
 
@@ -97,7 +97,7 @@ if (isExtensionActive('online')) {
 
                // 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);
index b239377473165473b8fbdc69e15c49a67c125ff1..8b95657478d323b5b0392aa87bf0a8132d66e67d 100644 (file)
@@ -40,7 +40,7 @@
 if (!defined('__SECURITY')) {
        die();
 } elseif (!isBlockModeEnabled()) {
-       // Block mode detected
+       // Non-block mode detected
        return;
 }
 
index 22a22725ce689e01582105319a2daabe5a464118..ba9ab29a93984b4940d0262cf9440fc3fdcbfd2d 100644 (file)
@@ -41,11 +41,11 @@ if (!defined('__SECURITY')) {
        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;
index b82fb34b9dfc3c4a0e20ba20a5f6407b7ffda2cc..d26647bff32841bc7670dcb4f6053d50a268d982 100644 (file)
@@ -99,8 +99,18 @@ if (empty($URL)) {
                // 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');
index 49e4913d07cfeff1c58dd2672b563b10d3327fa5..f5afc02e4cc8d043291fb4029c9f566a64a89e84 100644 (file)
@@ -105,18 +105,18 @@ if (SQL_NUMROWS($result_main) > 0) {
                                        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
 
index e2332fd269ec165296b8ec2b9c30e0ce5a628b32..8c8de9191093108abc4db35be3a6049c939bb5aa 100644 (file)
@@ -3,7 +3,6 @@ INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sor
 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&uuml;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 &auml;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 &auml;ndern','Hier k&ouml;nnen Sie u.a. die gebuchte URL der Emails um&auml;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);
index e2332fd269ec165296b8ec2b9c30e0ce5a628b32..8c8de9191093108abc4db35be3a6049c939bb5aa 100644 (file)
@@ -3,7 +3,6 @@ INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sor
 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&uuml;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 &auml;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 &auml;ndern','Hier k&ouml;nnen Sie u.a. die gebuchte URL der Emails um&auml;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);
index a573a245ff2cb018b2cf62dd7b51a8a55e9cd8ab..f87ef349eb2d3af583f74408fe55c7c8a6cd8d11 100644 (file)
@@ -44,7 +44,7 @@ $GLOBALS['startTime'] = microtime(true);
 
 // Tell everyone we are in this module
 $GLOBALS['module'] = 'mailid';
-$GLOBALS['output_mode'] = -1;
+$GLOBALS['output_mode'] = 1;
 $errorCode = '';
 
 // Load the required file(s)
@@ -125,7 +125,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                        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);
@@ -136,7 +136,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                        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);
@@ -184,7 +184,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                                        );
 
                                                        // Load template
-                                                       loadTemplate('mailid_frames');
+                                                       loadTemplate('mailid_frames', false, $content);
                                                } else {
                                                        $errorCode = getCode('DATA_INVALID');
                                                }
index fa10da86cb92a5d280d8f62dbc8438d128904dad..f1e83132d403e9ebae7a440ad436634c13b538b0 100644 (file)
@@ -56,12 +56,17 @@ setContentType('text/html');
 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)) {
@@ -71,7 +76,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
        // 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",
@@ -116,8 +121,8 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                        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);
@@ -170,9 +175,10 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                        }
 
                                        // 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);
@@ -267,14 +273,14 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                                                                                // 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
@@ -307,9 +313,9 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                                                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) {
index 616973e472e963980e22c4b17cb680da29beb87e..cf45a31fe1723037bf90ecb2ee90bebf753778c6 100644 (file)
@@ -88,7 +88,11 @@ ON
 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) {
@@ -101,6 +105,9 @@ LIMIT 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 {
@@ -125,9 +132,6 @@ $content['header'] = loadTemplate('show_bonus_header', true);
 // 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);
 
index 928f5f0047faa3706df157be8047d97bbb0b197e..9d58095771c914bb0b0d8bfe6746d785a2c88b49 100644 (file)
@@ -27,6 +27,6 @@
 </tr>
 $content[rows]
 <tr>
-       <td colspan="8" class="admin_footer">$content</td>
+       <td colspan="8" class="admin_footer">$content[online_timeout]</td>
 </tr>
 </table>
index 9ac55c4adc44e21c3840bce119cb7676fd5826ef..ea05588636df4d4a63b7df67724cd228a2dd72bb 100644 (file)
@@ -1,3 +1,4 @@
+<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">
@@ -20,3 +21,5 @@
                <td><strong>$content[admins_online]</strong></td>
        </tr>
 </table>
+</div>
+<br />
\ No newline at end of file
diff --git a/templates/de/html/admin/admin_task_order.tpl b/templates/de/html/admin/admin_task_order.tpl
new file mode 100644 (file)
index 0000000..8e42838
--- /dev/null
@@ -0,0 +1 @@
+<a href="{?URL?}/modules.php?module=admin&amp;what=unlock_emails&amp;task_id=$content">{--ADMIN_UNLOCK_EMAIL_LINK--}</a>
index 6d09c4879f2b191e7269d034a99262798fa6c48b..b688bf7620c81b980f41fdd68e9a67131a53ea45 100644 (file)
@@ -4,7 +4,7 @@
                <td width="10" class="seperator">&nbsp;</td>
                <td width="220" align="center">
                <form accept-charset="utf-8"
-                       action="{?URL?}/mailid_top.php?userid=$content[userid]&amp;$content[type]=$content[data]&amp;mode=add&amp;code={--_CODE_VALUE!}"
+                       action="{?URL?}/mailid_top.php?userid=$content[userid]&amp;$content[type]=$content[data]&amp;mode=add&amp;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"
index 7d9bcd41e7b3ea94bb1da09686e284df1be0b674..2f8e57ef2251ae8a16a734ae334e531e30cb7423 100644 (file)
@@ -1,7 +1,7 @@
 {--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&uuml;nschen allen Gewinnern viel Gl&uuml;ck bei der monatlichen Aktiv-Rallye!<br />
-       Es k&ouml;nnen nur die ersten <u>$content[total_ranks]</u> die Aktiv-Rallye gewinnen. Der Rechtsweg ist ausgeschlossen.
+       Es k&ouml;nnen nur die ersten <u>{?bonus_ranks?}</u> die Aktiv-Rallye gewinnen. Der Rechtsweg ist ausgeschlossen.
 </div>
index 0f7238870b14415c9c397f988d31e7d268335352..1143e3c8c593eca026030715e9c6f34a8aadc565 100644 (file)
@@ -3,7 +3,7 @@
        <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--}:&nbsp;<strong class="nobr">$content[yr_points] ?POINTS?}</strong>
+               {--BONUS_SHOW_CONFIRMED_BONUS_IS--}:&nbsp;<strong class="nobr">$content[yr_points] {?POINTS?}</strong>
        </td>
 </tr>
 </table>