From: Roland Häder Date: Tue, 26 Jan 2010 13:20:13 +0000 (+0000) Subject: Several fixes/cleanups X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d0db163274524c1ac548146db60d4543abcec4a9;p=mailer.git Several fixes/cleanups --- diff --git a/inc/databases.php b/inc/databases.php index c70b12d0d8..35a86969aa 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -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); diff --git a/inc/functions.php b/inc/functions.php index c1293681ce..2da1f61362 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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; diff --git a/inc/language/order_de.php b/inc/language/order_de.php index 9ccb4619b6..a257194b90 100644 --- a/inc/language/order_de.php +++ b/inc/language/order_de.php @@ -65,16 +65,17 @@ addMessages(array( 'MEMBER_ORDER_MAX_ALLOWED' => "Maximale Mailbuchungen", 'MEMBER_ORDER_ALLOWED_EXHAUSTED' => "Sie können keine weiteren Mails mehr versenden, oder stellen Sie bitte den Empfang höher ein.", 'MEMBER_ENTER_INVALID_URL' => "Ungütige URL eingegeben.", + 'MEMBER_NO_MAIL_TYPE_SELECTED' => "Bitte wä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.", diff --git a/inc/libs/holiday_functions.php b/inc/libs/holiday_functions.php index 014d4f70bb..0b07bf1a30 100644 --- a/inc/libs/holiday_functions.php +++ b/inc/libs/holiday_functions.php @@ -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] ?> diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index a950b0993d..dd091081ae 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -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&what=order&code=' . getCode('NO_MAIL_TYPE'); + } // END - if } elseif (!isAdmin()) { // He has already sent a mail within a specific time $URL = 'modules.php?module=login&what=order&code=' . getCode('URL_TLOCK') . '&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 diff --git a/inc/reset/reset_birthday.php b/inc/reset/reset_birthday.php index 5b6ccb8106..e793ee1ab5 100644 --- a/inc/reset/reset_birthday.php +++ b/inc/reset/reset_birthday.php @@ -117,7 +117,7 @@ if (SQL_NUMROWS($result_birthday) > 0) { } // END - while // Free memory - SQL_FREERESULT($result); + SQL_FREERESULT($result_birthday); } // [EOF] diff --git a/templates/de/html/member/member_header.tpl b/templates/de/html/member/member_header.tpl index 666381efa1..9b0ba9e4c4 100644 --- a/templates/de/html/member/member_header.tpl +++ b/templates/de/html/member/member_header.tpl @@ -1,7 +1,7 @@ -
+ - - + diff --git a/templates/de/html/member/member_order_page1.tpl b/templates/de/html/member/member_order_page1.tpl index a693eaa6b4..3ecb1864f3 100644 --- a/templates/de/html/member/member_order_page1.tpl +++ b/templates/de/html/member/member_order_page1.tpl @@ -4,7 +4,7 @@ $content[zip_content] $content[html_extension] - diff --git a/templates/de/html/member/member_order_page2.tpl b/templates/de/html/member/member_order_page2.tpl index 30713e0545..fdbf2e28c6 100644 --- a/templates/de/html/member/member_order_page2.tpl +++ b/templates/de/html/member/member_order_page2.tpl @@ -4,7 +4,7 @@ $content[zip_content] - diff --git a/templates/de/html/member/member_order_points.tpl b/templates/de/html/member/member_order_points.tpl index 93178dc4da..8972f35e10 100644 --- a/templates/de/html/member/member_order_points.tpl +++ b/templates/de/html/member/member_order_points.tpl @@ -1,5 +1,6 @@
-
+
+
{--MEMBER_POINTS_LEFT--}: $content[total] {?POINTS?} diff --git a/theme/business/css/general.css b/theme/business/css/general.css index 34f868c143..1d84ce3146 100644 --- a/theme/business/css/general.css +++ b/theme/business/css/general.css @@ -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 { diff --git a/theme/default/css/general.css b/theme/default/css/general.css index 6220473a63..0fe7b0f66c 100644 --- a/theme/default/css/general.css +++ b/theme/default/css/general.css @@ -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 { diff --git a/theme/desert/css/general.css b/theme/desert/css/general.css index 9f64ed8750..c80abffe05 100644 --- a/theme/desert/css/general.css +++ b/theme/desert/css/general.css @@ -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;
diff --git a/templates/de/html/member/member_order-zip1.tpl b/templates/de/html/member/member_order-zip1.tpl index b4a87a6ecb..44966aafd7 100644 --- a/templates/de/html/member/member_order-zip1.tpl +++ b/templates/de/html/member/member_order-zip1.tpl @@ -25,8 +25,8 @@
{--MEMBER_ENTER_ZIP_CODE--}: + {--MEMBER_ENTER_ZIP_CODE--}:
{--SELECT_MAIL_TYPE--}: