]> git.mxchange.org Git - mailer.git/commitdiff
Fixes for POST setter, template and others
authorRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 21:48:07 +0000 (21:48 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 21:48:07 +0000 (21:48 +0000)
inc/functions.php
inc/header.php
inc/js/js-order_send.php
inc/modules/frametester.php
inc/modules/order.php
inc/request-functions.php
templates/de/emails/order-admin.tpl
templates/de/html/member/member_order_send.tpl

index de59b2e8e42fc420fb9e402b63ae5f7db49db69d..c55b421dd3eb12a381c5c75e3caaea541276aa23 100644 (file)
@@ -889,7 +889,7 @@ function generateDerefererUrl ($URL) {
        // Don't de-refer our own links!
        if (substr($URL, 0, strlen(getConfig('URL'))) != getConfig('URL')) {
                // De-refer this link
-               $URL = 'modules.php?module=loader&amp;url=' . encodeString(compileUriCode($URL));
+               $URL = '{?URL?}/modules.php?module=loader&amp;url=' . encodeString(compileUriCode($URL));
        } // END - if
 
        // Return link
index cd22a87054acce3f2e7d37ab4998be2f7ca7bbe5..3ea5b4acfbc8529cb3d6adb484d65981fd8234e3 100644 (file)
@@ -46,12 +46,12 @@ if (!defined('__SECURITY')) {
 // Is the header already sent?
 if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
        // If not in CSS mode generate the header
-       if ((getOutputMode() != '1')) {
-               // Generate header
-               $TITLE = '';
-
+       if (getOutputMode() != '1') {
                // Config and database connection valid?
                if ((isConfigLocalLoaded()) && (isConfigLoaded()) && (SQL_IS_LINK_UP()) && (isExtensionActive('sql_patches'))) {
+                       // Init title
+                       $TITLE = '';
+
                        // Title decoration enabled?
                        if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != '')) $TITLE .= trim(getConfig('title_left'))." ";
 
@@ -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)) {
+if ((getOutputMode() != '1') && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) {
        loadTemplate('page_body');
        $GLOBALS['header_sent'] = 2;
 } // END - if
index 916faaba6008abca21ff5897a7a9352180cacaff..18981108fc3c22e014cd4d39b389a13a35b30e7b 100644 (file)
@@ -35,7 +35,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
  * MA  02110-1301  USA                                                  *
  ************************************************************************/
-
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
@@ -44,7 +43,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Simply load the JavaScript here
-loadTemplate('js_order_sent');
+loadTemplate('js_order_send');
 
 // [EOF]
 ?>
index 5779deb1bf8ca5b422ba05281994a6e2d8a3ae7f..6bf21086fcb7c664995396f67341579e50fdf74a 100644 (file)
@@ -77,20 +77,21 @@ if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (isGe
        // Default URL is ours
        $url = getConfig('URL');
 
-       // Decode URL if set in GET parameters
-       if (isGetRequestElementSet('url'))  $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url')))));
-
-       // Use URL from POST data if set
-       if (isPostRequestElementSet('url')) $url = postRequestElement('url');
+       // Use URL from POST or GET data if set
+       if (isPostRequestElementSet('url')) {
+               // POST data comes first
+               $url = postRequestElement('url');
+       } elseif (isGetRequestElementSet('url')) {
+               // Then GET data
+               $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url')))));
+       }
 
        // Add missing element
        $frame = '';
        if (isGetRequestElementSet('frame')) $frame = getRequestElement('frame');
-       switch ($frame)
-       {
+       switch ($frame) {
                case '':
-                       switch ($mode)
-                       {
+                       switch ($mode) {
                                case 'member':
                                        // Build frameset
                                        $content['order'] = bigintval(getRequestElement('order'));
@@ -102,24 +103,25 @@ if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (isGe
                                        $content['url']   = generateDerefererUrl($url);
                                        loadTemplate('guest_frametester', false, $content);
                                        break;
-                       }
+                       } // END - switch
                        break;
 
-                               case 'test_top':
-                                       loadTemplate('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>');
-                                       break;
+               case 'test_top':
+                       loadTemplate('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>');
+                       break;
 
-                               case 'back': // Back buttom
-                                       loadTemplate('member_order_back', false, getRequestElement('order'));
-                                       break;
+               case 'back': // Back buttom
+                       loadTemplate('member_order_back', false, getRequestElement('order'));
+                       break;
 
-                               case 'send': // Send mail away
-                                       loadTemplate('member_order_send', false, getRequestElement('order'));
-                                       break;
-       }
+               case 'send': // Send mail away
+                       loadTemplate('member_order_send', false, getRequestElement('order'));
+                       break;
+       } // END - switch
 } else {
        // Go away...
        redirectToUrl('modules.php?module=login');
 }
-//
+
+// [EOF]
 ?>
index 6fca97ea81416b9ec68112df594fb375f5f30a70..b82fb34b9dfc3c4a0e20ba20a5f6407b7ffda2cc 100644 (file)
@@ -74,7 +74,7 @@ if (empty($URL)) {
        if (SQL_AFFECTEDROWS() == 1) {
                // @TODO Unused: 2,4
                // Load mail again...              0         1          2             3            4         5       6            7
-               $result = SQL_QUERY_ESC("SELECT `subject`, `text`, `receivers`, `payment_id`, `timestamp`, `url`, cat_id`, `target_send` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s AND `sender`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT `subject`, `text`, `receivers`, `payment_id`, `timestamp`, `url`, `cat_id`, `target_send` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s AND `sender`=%s LIMIT 1",
                        array(bigintval(getRequestElement('order')), getUserId()), __FILE__, __LINE__);
                $content = merge_array($content, SQL_FETCHARRAY($result));
                SQL_FREERESULT($result);
@@ -89,7 +89,6 @@ if (empty($URL)) {
                subtractPoints('order', getUserId(), $usedPoints);
 
                // Compile content
-               $content['block']    = getConfig('max_send');
                $content['payment']  = getPaymentTitlePrice($content['payment_id']);
                $content['category'] = getCategory($content['cat_id']);
 
index f67df00b8ae12eac7e554431917f01e5f4f9104b..f4486a5c6fbfaa4eca461cf2794c16238306ca67 100644 (file)
@@ -114,7 +114,7 @@ function setRequestGetElement ($element, $value) {
        $GLOBALS['raw_request']['get'][$element] = $value;
 
        // Update cache
-       $GLOBALS['cache_request']['request_get'][$element] = $value;
+       $GLOBALS['cache_request']['request_get'][$element][null] = $value;
 }
 
 // Wrapper for elements in $_POST
@@ -219,7 +219,7 @@ function setRequestPostElement ($element, $value) {
        }
 
        // Update cache
-       $GLOBALS['cache_request']['request_post'][$element] = $value;
+       $GLOBALS['cache_request']['request_post'][$element][null] = $value;
 }
 
 // Checks wether a form was sent. If so, the $_POST['ok'] element must be set
index b122222b3d406f8434f865b74d2ebd62501914cc..339358fdca852dde81bea7ff6fa3cd925b69f707 100644 (file)
@@ -2,7 +2,7 @@ Hallo Administrator
 
 Ein Mitglied hat soeben eine Mailbuchung durchgef&uuml;hrt!
 
-Seine Buchung befindet sich nun im Sende-Pool und wird automatisch in $content[blocks] Mail-Bloecken versand.
+Seine Buchung befindet sich nun im Sende-Pool und wird automatisch in {?max_send?} Mail-Bloecken versand.
 
 Hier sind nochmals seine Daten, gebuchter Text und URL zur Verifizierung:
 ------------------------------------------------
index aa2f86f91d0c8410be44c4c948c6d69acb7e07bd..08dadaf0bc4cb8a0549c057ab8e59c8d6d597ba0 100644 (file)
@@ -2,5 +2,5 @@
 {--MEMBER_ORDER_PLEASE_WAIT_1--}<span id="counter" style="font-weight:bold">10</span>{--MEMBER_ORDER_PLEASE_WAIT_2--}<br />
 <input type="submit" class="member_submit" id="ok" name="ok" value="{--MEMBER_DO_ORDER--}" />
 <script type="text/javascript"
- src="{?URL?}/js.php?js=member_order_send{%version=order%}"></script>
+ src="{?URL?}/js.php?js=order_send{%version=order%}"></script>
 </form>