]> git.mxchange.org Git - mailer.git/commitdiff
Several fixes/cleanups
authorRoland Häder <roland@mxchange.org>
Tue, 26 Jan 2010 13:20:13 +0000 (13:20 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 26 Jan 2010 13:20:13 +0000 (13:20 +0000)
14 files changed:
inc/databases.php
inc/functions.php
inc/language/order_de.php
inc/libs/holiday_functions.php
inc/modules/member/what-order.php
inc/reset/reset_birthday.php
templates/de/html/member/member_header.tpl
templates/de/html/member/member_order-zip1.tpl
templates/de/html/member/member_order_page1.tpl
templates/de/html/member/member_order_page2.tpl
templates/de/html/member/member_order_points.tpl
theme/business/css/general.css
theme/default/css/general.css
theme/desert/css/general.css

index c70b12d0d85e6309b2a6c73818f539769ce053e2..35a86969aae4351aa2aff8ecd28f5e378a8b1dff 100644 (file)
@@ -48,6 +48,7 @@ addCode('WRONG_ID'           , 0x002);
 addCode('ACCOUNT_LOCKED'     , 0x003);
 addCode('ACCOUNT_UNCONFIRMED', 0x004);
 addCode('UNKNOWN_STATUS'     , 0x005);
+addCode('NO_MAIL_TYPE'       , 0x006);
 addCode('CNTR_FAILED'        , 0x008);
 addCode('LOGOUT_DONE'        , 0x008);
 addCode('LOGOUT_FAILED'      , 0x009);
index c1293681cef302da6f78545014bd5c7152985f6e..2da1f613620bcc3f94dab889d6e94d41d1f20dc4 100644 (file)
@@ -2548,6 +2548,7 @@ function getMessageFromErrorCode ($code) {
                case getCode('MORE_RECEIVERS2')    : $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND'); break;
                case getCode('MORE_RECEIVERS3')    : $message = getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'); break;
                case getCode('INVALID_URL')        : $message = getMessage('MEMBER_ENTER_INVALID_URL'); break;
+               case getCode('NO_MAIL_TYPE')       : $message = getMessage('MEMBER_NO_MAIL_TYPE_SELECTED'); break;
                case getCode('UNKNOWN_ERROR')      : $message = getMessage('LOGIN_UNKNOWN_ERROR'); break;
                case getCode('UNKNOWN_STATUS')     : $message = getMessage('LOGIN_UNKNOWN_STATUS'); break;
 
index 9ccb4619b66aa78df290683d2c3cc4d18dbe2a1d..a257194b904dd8570f0cbae6dfd0eca74a263b02 100644 (file)
@@ -65,16 +65,17 @@ addMessages(array(
        'MEMBER_ORDER_MAX_ALLOWED' => "Maximale Mailbuchungen",
        'MEMBER_ORDER_ALLOWED_EXHAUSTED' => "Sie k&ouml;nnen keine weiteren Mails mehr versenden, oder stellen Sie bitte den Empfang h&ouml;her ein.",
        'MEMBER_ENTER_INVALID_URL' => "Ung&uuml;tige URL eingegeben.",
+       'MEMBER_NO_MAIL_TYPE_SELECTED' => "Bitte w&auml;hlen Sie eine Mailart aus.",
 
-       'ORDER_SELECT_COLUMN_USERID' => "Mitgliedsnummer",
-       'ORDER_SELECT_COLUMN_ZIP' => "Postleitzahl",
-       'ORDER_SELECT_COLUMN_COUNTRY' => "Land",
-       'ORDER_SELECT_COLUMN_EMAIL' => "EMail-Adresse",
-       'ORDER_SELECT_COLUMN_BIRTH_YEAR' => "Geburtsjahr",
-       'ORDER_SELECT_COLUMN_LAST_ONLINE' => "Als letztes Online",
-       'ORDER_SELECT_COLUMN_REF_CLICKS' => "Klicks auf Ref-Link",
+       'ORDER_SELECT_COLUMN_USERID'       => "Mitgliedsnummer",
+       'ORDER_SELECT_COLUMN_ZIP'          => "Postleitzahl",
+       'ORDER_SELECT_COLUMN_COUNTRY'      => "Land",
+       'ORDER_SELECT_COLUMN_EMAIL'        => "EMail-Adresse",
+       'ORDER_SELECT_COLUMN_BIRTH_YEAR'   => "Geburtsjahr",
+       'ORDER_SELECT_COLUMN_LAST_ONLINE'  => "Als letztes Online",
+       'ORDER_SELECT_COLUMN_REF_CLICKS'   => "Klicks auf Ref-Link",
        'ORDER_SELECT_COLUMN_TOTAL_LOGINS' => "Gesamtlogins",
-       'ORDER_SELECT_COLUMN_MAIL_ORDERS' => "Heutige Mailbuchungen",
+       'ORDER_SELECT_COLUMN_MAIL_ORDERS'  => "Heutige Mailbuchungen",
 
        'ORDER_DEFAULT_SUBJECT' => "Betreffzeile in allen Mails",
        'ORDER_DEFAULT_TEXT'    => "Geben Sie hier Ihren Werbetext ein.",
index 014d4f70bb6ec61102a170a773597a3ca7d85dfc..0b07bf1a30863cde01c1b1bb40f966f3532f0a62 100644 (file)
@@ -56,6 +56,7 @@ ORDER BY
        if (SQL_NUMROWS($result_stop) > 0) {
                // We foud at least one
                $admin = '';
+
                // Init SQLs
                initSqls();
 
@@ -76,11 +77,11 @@ LIMIT 1",
                                array(bigintval($content['userid'])), __FUNCTION__, __LINE__, false));
 
                        // Prepare array
-                       $content = array(
+                       $content = merge_array($content, array(
                                'holiday_end'      => generateDateTime($content['holiday_end']  , 3),
                                'holiday_start'    => generateDateTime($content['holiday_start'], 3),
                                'holiday_comments' => $content['comments']
-                       );
+                       ));
 
                        // Send mail to user
                        $message = loadEmailTemplate('member_holiday_unlock', $content, $content['userid']);
@@ -101,5 +102,5 @@ LIMIT 1",
        SQL_FREERESULT($result_stop);
 }
 
-//
+// [EOF]
 ?>
index a950b0993d6cc2efe11e1f082a8f6dab1d99960d..dd091081aed2373835e2e78dcb0a91be4ea80377 100644 (file)
@@ -198,7 +198,13 @@ LIMIT 1",
                                // Remove any HTML code
                                setPostRequestParameter('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestParameter('text'))));
                        }
-               }
+               } // END - if
+
+               // Is mail type set?
+               if ((!isPostRequestParameterSet('mail_type')) || (postRequestParameter('mail_type') < 1)) {
+                       // Not correctly set
+                       $URL = 'modules.php?module=login&amp;what=order&amp;code=' . getCode('NO_MAIL_TYPE');
+               } // END - if
        } elseif (!isAdmin()) {
                // He has already sent a mail within a specific time
                $URL = 'modules.php?module=login&amp;what=order&amp;code=' . getCode('URL_TLOCK') . '&amp;id=' . $id;
@@ -223,7 +229,11 @@ LEFT JOIN
 ON
        c.userid=d.userid
 WHERE
-       c.cat_id=%s AND c.userid != '%s' AND d.`status`='CONFIRMED' AND d.receive_mails > 0".$add."
+       c.cat_id=%s AND
+       c.userid != '%s' AND
+       d.`status`='CONFIRMED' AND
+       d.receive_mails > 0
+       ".$add."
 ORDER BY
        d.%s %s",
                        array(
@@ -278,7 +288,7 @@ LIMIT 1",
                        if ($content['target_send'] > postRequestParameter('receiver')) $content['target_send'] = bigintval(postRequestParameter('receiver'));
 
                        // Calculate used points
-                       $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestParameter('type')));
+                       $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestParameter('mail_type')));
 
                        // Fix empty zip code
                        if (!isPostRequestParameterSet('zip')) setPostRequestParameter('zip', 0);
@@ -292,13 +302,13 @@ LIMIT 1",
                                        if (isExtensionActive('html_mail')) {
                                                // HTML extension is active
                                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_pool` (`sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `zip`, `html_msg`)
- VALUES ('%s','%s','%s','%s','%s','TEMP',UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s')",
+VALUES (%s,'%s','%s','%s','%s','TEMP',UNIX_TIMESTAMP(),'%s',%s,%s,%s,'%s')",
                                                        array(
                                                                getMemberId(),
                                                                postRequestParameter('subject'),
                                                                postRequestParameter('text'),
                                                                $receiver,
-                                                               bigintval(postRequestParameter('type')),
+                                                               bigintval(postRequestParameter('mail_type')),
                                                                postRequestParameter('url'),
                                                                bigintval(postRequestParameter('cat')),
                                                                $content['target_send'],
@@ -308,13 +318,13 @@ LIMIT 1",
                                        } else {
                                                // No HTML extension is active
                                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_pool` (`sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `zip`)
- VALUES ('%s','%s','%s','%s','%s','TEMP',UNIX_TIMESTAMP(),'%s','%s','%s','%s')",
+VALUES (%s,'%s','%s','%s','%s','TEMP',UNIX_TIMESTAMP(),'%s',%s,%s,%s)",
                                                        array(
                                                                getMemberId(),
                                                                postRequestParameter('subject'),
                                                                postRequestParameter('text'),
                                                                $receiver,
-                                                               bigintval(postRequestParameter('type')),
+                                                               bigintval(postRequestParameter('mail_type')),
                                                                postRequestParameter('url'),
                                                                bigintval(postRequestParameter('cat')),
                                                                $content['target_send'],
@@ -345,7 +355,7 @@ LIMIT 1",
                                                                postRequestParameter('subject'),
                                                                postRequestParameter('text'),
                                                                $receiver,
-                                                               bigintval(postRequestParameter('type')),
+                                                               bigintval(postRequestParameter('mail_type')),
                                                                postRequestParameter('url'),
                                                                bigintval(postRequestParameter('cat')),
                                                                $content['target_send'],
@@ -374,7 +384,7 @@ LIMIT 1",
                                                                postRequestParameter('subject'),
                                                                postRequestParameter('text'),
                                                                $receiver,
-                                                               bigintval(postRequestParameter('type')),
+                                                               bigintval(postRequestParameter('mail_type')),
                                                                postRequestParameter('url'),
                                                                bigintval(postRequestParameter('cat')),
                                                                $content['target_send'],
@@ -391,7 +401,7 @@ LIMIT 1",
                                                array(
                                                        getMemberId(),
                                                        postRequestParameter('subject'),
-                                                       bigintval(postRequestParameter('type'))
+                                                       bigintval(postRequestParameter('mail_type'))
                                                ), __FILE__, __LINE__);
 
                                        // Get pool id
@@ -443,7 +453,7 @@ ORDER BY
                        // @TODO Rewrite this to a filter
                        $HTML = ''; $HOL_STRING = '';
                        if ((isExtensionActive('html_mail')) && (postRequestParameter('html') == 'Y')) $HTML = " AND `html`='Y'";
-                       if (getExtensionVersion('holiday') >= '0.1.3') {
+                       if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
                                // Extension's version is fine
                                $HOL_STRING = " AND `holiday_active`='N'";
                        } // END - if
index 5b6ccb8106183a9b41a3e167030273ee9a8020ab..e793ee1ab5b2625779e9349cf390a92dfbdabb57 100644 (file)
@@ -117,7 +117,7 @@ if (SQL_NUMROWS($result_birthday) > 0) {
        } // END - while
 
        // Free memory
-       SQL_FREERESULT($result);
+       SQL_FREERESULT($result_birthday);
 }
 
 // [EOF]
index 666381efa1a69b7ff5876bac4c3f2383e6e810b6..9b0ba9e4c407e84688c0c6e3fcca29598eb96fe2 100644 (file)
@@ -1,7 +1,7 @@
 <a name="TOP"></a>
 <table border="0" cellspacing="0" cellpadding="0" width="100%" class="member_main">
 <tr>
-       <td colspan="3" align="center" valign="top" class="member_title">
+       <td colspan="3" align="center" valign="top" class="member_header">
                <table border="0" cellspacing="0" cellpadding="0" width="100%" class="guest">
                <tr>
                        <td colspan="3" align="center">
index b4a87a6ecbac93aee2adaa726b5bf02ab95aa8a2..44966aafd7e81efb3b22332f6dc854638d961441 100644 (file)
@@ -25,8 +25,8 @@
        </td>
 </tr>
 <tr>
-       <td class="bottom" align="right">{--MEMBER_ENTER_ZIP_CODE--}:</td>
-       <td class="bottom">
+       <td align="right">{--MEMBER_ENTER_ZIP_CODE--}:</td>
+       <td>
                <input type="text" name="zip" class="member_normal" size="5" maxlength="6" value="$content[zip]" />
        </td>
 </tr>
index a693eaa6b4bf26ad0b269d67ce63d16c9f898211..3ecb1864f385c5963266f2e885bc64765d6c78c3 100644 (file)
@@ -4,7 +4,7 @@
        $content[zip_content]
        $content[html_extension]
        <tr>
-               <td colspan="2" align="center" class="member_footer">
+               <td colspan="2" align="center" class="member_footer top">
                        <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" />
                        <input type="submit" name="data" class="member_submit" value="{--ORDER_PAGE_2--}" />
                </td>
index 30713e05459d5eb509c4e8cd399eb8b51680a97c..fdbf2e28c6d2508e6a22dc2d5ea79c31abc3755d 100644 (file)
@@ -4,7 +4,7 @@
        $content[zip_content]
        <tr>
                <td align="right">{--SELECT_MAIL_TYPE--}:</td>
-               <td><select name="type" size="1" class="member_select">
+               <td><select name="mail_type" size="1" class="member_select">
                        <option value="X" disabled="disabled">{--PLEASE_SELECT--}</option>
                        $content[type_selection]
                </select></td>
index 93178dc4da94e7dbd1a5aff43e17b5ffbb20ce2b..8972f35e1017fd11d0257d7e8006e64b9f569ad1 100644 (file)
@@ -1,5 +1,6 @@
 <div class="para">
-<div align="center" class="member_table dashed">
+<div align="center">
+<div class="member_table dashed">
        <div align="center">
                {--MEMBER_POINTS_LEFT--}:
                <strong>$content[total] {?POINTS?}</strong>
index 34f868c143f60a1da0c7ab110b50a0b0589d4434..1d84ce3146d7f6656918963a18e0667761c91b7b 100644 (file)
@@ -200,8 +200,10 @@ a.admin_logout {
 
 .member_header {
        text-align: center;
-       height: 28px;
+       color: #000000;
+       vertical-align: middle;
        background-color: #eeeeff;
+       height: 60px;
 }
 
 .admin_failed, .guest_failed, .member_failed, .member_note {
@@ -267,7 +269,7 @@ a.admin_logout {
        color: #000000;
        vertical-align: middle;
        background-color: #eeeeff;
-       height: 60px;
+       height: 28px;
 }
 
 .guest_login_header {
index 6220473a631e1008b2bdd1f2bf2f7b39c2317ee3..0fe7b0f66c31fa87fb93ad2f38c33b37abe92adb 100644 (file)
@@ -245,8 +245,10 @@ a.admin_logout {
 
 .member_header {
        text-align: center;
-       height: 28px;
+       color: #009900;
+       vertical-align: middle;
        background-color: #ddeedd;
+       height: 60px;
 }
 
 .admin_failed, .guest_failed, .member_failed, .member_note {
@@ -299,7 +301,7 @@ a.admin_logout {
        color: #009900;
        vertical-align: middle;
        background-color: #ddeedd;
-       height: 60px;
+       height: 28px;
 }
 
 .guest_login_header {
index 9f64ed87508ba02b543def24175a6b1daaf4304c..c80abffe05a2eb8bf1ce3840be43200294897760 100644 (file)
@@ -200,8 +200,10 @@ a.admin_logout {
 
 .member_header {
        text-align: center;
-       height: 28px;
+       color: #880000;
+       vertical-align: middle;
        background-color: #ddddaa;
+       height: 60px;
 }
 
 .admin_failed, .guest_failed, .member_failed, .member_note {
@@ -255,7 +257,7 @@ a.admin_logout {
        color: #880000;
        vertical-align: middle;
        background-color: #ddddaa;
-       height: 60px;
+       height: 28px;
 }
 
 .guest_login_header {
@@ -278,8 +280,7 @@ a.admin_logout {
        border: 1px solid #880000;
 }
 
-.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom
-       {
+.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom {
        border: 1px solid #880000;
        border-top: 0px;
        background-color: #ffffcc;