X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=0.2.1%2Finc%2Fmodules%2Fmember%2Fwhat-unconfirmed.php;h=8afceaa162f3696e0ae6115e7cc1f5bb084e4708;hb=7bc25dd08431c94ce9edca131d56c1a36b13c28a;hp=2b21858f159ec262444da7db84bd20ab6b6c628e;hpb=985d79f06163e5957c3f40b5a71ce85be9048f8e;p=mailer.git diff --git a/0.2.1/inc/modules/member/what-unconfirmed.php b/0.2.1/inc/modules/member/what-unconfirmed.php index 2b21858f15..8afceaa162 100644 --- a/0.2.1/inc/modules/member/what-unconfirmed.php +++ b/0.2.1/inc/modules/member/what-unconfirmed.php @@ -1,153 +1,153 @@ - 0) -{ - // Please confirm these mails! - $sum = "0"; $SW = 2; $OUT = ""; - while (list($id, $id2, $type) = SQL_FETCHROW($result)) - { - // Load data from stats table... - $cat = ""; - switch ($type) - { - case "NORMAL": - $result_data = SQL_QUERY_ESC("SELECT subject, subject, timestamp_ordered, cat_id, payment_id, pool_id FROM "._MYSQL_PREFIX."_user_stats WHERE id=%d LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - $TYPE = "mailid"; $DATA = $id; $PROBLEM = NORMAL_MAIL_PROBLEM; - break; - - case "BONUS": - $result_data = SQL_QUERY_ESC("SELECT subject, text, timestamp, cat_id, points, id FROM "._MYSQL_PREFIX."_bonus WHERE id=%d LIMIT 1", - array(bigintval($id2)), __FILE__, __LINE__); - $TYPE = "bonusid"; $DATA = $id2; $PROBLEM = BONUS_MAIL_PROBLEM; - break; - } - - if (SQL_NUMROWS($result_data) == 1) - { - // Mail was found! - list($subject, $text, $timestamp, $cat, $pay, $pool) = SQL_FETCHROW($result_data); - SQL_FREERESULT($result_data); - if ($type == "NORMAL") - { - $pay = GET_PAY_POINTS($pay, "payment"); - $result_text = SQL_QUERY_ESC("SELECT text FROM "._MYSQL_PREFIX."_pool WHERE id=%d LIMIT 1", - array(bigintval($pool)), __FILE__, __LINE__); - list($text) = SQL_FETCHROW($result_text); - SQL_FREERESULT($result_text); - } - if (empty($subject)) $subject = DEFAULT_SUBJECT_LINE; - if (empty($text)) $text = "---"; - $subject = COMPILE_CODE($subject); - - // Prepare data for template - $content = array( - 'sw' => $SW, - 'uid' => $GLOBALS['userid'], - 'data' => $DATA, - 'type' => $TYPE, - 'subj' => $subject, - 'text' => COMPILE_CODE($text), - 'stamp' => MAKE_DATETIME($timestamp, "0"), - 'cat' => GET_CATEGORY($cat), - 'points' => TRANSLATE_COMMA($pay), - ); - - // Load row template and count points - $OUT .= LOAD_TEMPLATE("member_unconfirmed_row", true, $content); - $sum += $pay; - } - else - { - // Prepare data for template - $content = array( - 'sw' => $SW, - 'data' => $DATA, - 'probl' => $PROBLEM, - ); - - // Problem with mail detected - $OUT .= LOAD_TEMPLATE("member_unconfirmed_404", true, $content); - } - $SW = 3 - $SW; - } - - // Free memory - SQL_FREERESULT($result); - - // Remember total points - define('__TOTAL_POINTS', TRANSLATE_COMMA($sum)); - - // Remember all generated rows in constant for the template - define('__UNCONFIRMED_ROWS', $OUT); - - // Load main template - LOAD_TEMPLATE("member_unconfirmed_table"); -} - else -{ - // No mails left to confirm... :) - LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_NO_MAILS_TO_CONFIRM); -} -CLOSE_TABLE(); -// -?> + 0) +{ + // Please confirm these mails! + $sum = "0"; $SW = 2; $OUT = ""; + while (list($id, $id2, $type) = SQL_FETCHROW($result)) + { + // Load data from stats table... + $cat = ""; + switch ($type) + { + case "NORMAL": + $result_data = SQL_QUERY_ESC("SELECT subject, subject, timestamp_ordered, cat_id, payment_id, pool_id FROM "._MYSQL_PREFIX."_user_stats WHERE id=%d LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + $TYPE = "mailid"; $DATA = $id; $PROBLEM = NORMAL_MAIL_PROBLEM; + break; + + case "BONUS": + $result_data = SQL_QUERY_ESC("SELECT subject, text, timestamp, cat_id, points, id FROM "._MYSQL_PREFIX."_bonus WHERE id=%d LIMIT 1", + array(bigintval($id2)), __FILE__, __LINE__); + $TYPE = "bonusid"; $DATA = $id2; $PROBLEM = BONUS_MAIL_PROBLEM; + break; + } + + if (SQL_NUMROWS($result_data) == 1) + { + // Mail was found! + list($subject, $text, $timestamp, $cat, $pay, $pool) = SQL_FETCHROW($result_data); + SQL_FREERESULT($result_data); + if ($type == "NORMAL") + { + $pay = GET_PAY_POINTS($pay, "payment"); + $result_text = SQL_QUERY_ESC("SELECT text FROM "._MYSQL_PREFIX."_pool WHERE id=%d LIMIT 1", + array(bigintval($pool)), __FILE__, __LINE__); + list($text) = SQL_FETCHROW($result_text); + SQL_FREERESULT($result_text); + } + if (empty($subject)) $subject = DEFAULT_SUBJECT_LINE; + if (empty($text)) $text = "---"; + $subject = COMPILE_CODE($subject); + + // Prepare data for template + $content = array( + 'sw' => $SW, + 'uid' => $GLOBALS['userid'], + 'data' => $DATA, + 'type' => $TYPE, + 'subj' => $subject, + 'text' => COMPILE_CODE($text), + 'stamp' => MAKE_DATETIME($timestamp, "0"), + 'cat' => GET_CATEGORY($cat), + 'points' => TRANSLATE_COMMA($pay), + ); + + // Load row template and count points + $OUT .= LOAD_TEMPLATE("member_unconfirmed_row", true, $content); + $sum += $pay; + } + else + { + // Prepare data for template + $content = array( + 'sw' => $SW, + 'data' => $DATA, + 'probl' => $PROBLEM, + ); + + // Problem with mail detected + $OUT .= LOAD_TEMPLATE("member_unconfirmed_404", true, $content); + } + $SW = 3 - $SW; + } + + // Free memory + SQL_FREERESULT($result); + + // Remember total points + define('__TOTAL_POINTS', TRANSLATE_COMMA($sum)); + + // Remember all generated rows in constant for the template + define('__UNCONFIRMED_ROWS', $OUT); + + // Load main template + LOAD_TEMPLATE("member_unconfirmed_table"); +} + else +{ + // No mails left to confirm... :) + LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_NO_MAILS_TO_CONFIRM); +} +CLOSE_TABLE(); +// +?>