- $result = SQL_QUERY("SELECT id, price, payment, mail_title FROM `{!_MYSQL_PREFIX!}_payments` ORDER BY payment", __FILE__, __LINE__);
-
- $typeS = array();
- if (SQL_NUMROWS($result) > 0) {
- // Check for message ID in URL
- $message = '';
- switch (REQUEST_GET('msg'))
- {
- case getCode('URL_TLOCK'):
- $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
-
- // Load timestamp from last order
- list($LORDER) = SQL_FETCHROW($result);
- $LORDER = generateDateTime($LORDER, "1");
-
- // Free memory
- SQL_FREERESULT($result);
-
- // Calculate hours...
- $STD = round(getConfig('url_tlock') / 60 / 60);
-
- // Minutes...
- $MIN = round((getConfig('url_tlock') - $STD * 60 * 60) / 60);
-
- // And seconds
- $SEC = getConfig('url_tlock') - $STD * 60 * 60 - $MIN * 60;
-
- // Finally contruct the message
- // @TODO Rewrite this old lost code to a template
- $message = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD."
- {--_HOURS--}, ".$MIN." {--_MINUTES--} {--_AND--} ".$SEC." {--_SECONDS--}<br />
- {--MEMBER_LAST_TLOCK--}: ".$LORDER;
- break;
-
- case getCode('OVERLENGTH'):
- $message = getMessage('MEMBER_TEXT_OVERLENGTH');
- break;
-
- case getCode('URL_FOUND'):
- $message = getMessage('MEMBER_TEXT_CONTAINS_URL');
- break;
-
- case getCode('SUBJ_URL'):
- $message = getMessage('MEMBER_SUBJ_CONTAINS_URL');
- break;
-
- case getCode('BLIST_URL'):
- $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(REQUEST_GET('blist'), '0');
- break;
-
- case getCode('NO_RECS_LEFT'):
- $message = getMessage('MEMBER_SELECTED_MORE_RECS');
- break;
-
- case getCode('INVALID_TAGS'):
- $message = getMessage('MEMBER_HTML_INVALID_TAGS');
- break;
-
- case getCode('MORE_POINTS'):
- $message = getMessage('MEMBER_MORE_POINTS_NEEDED');
- break;
-
- case getCode('MORE_RECEIVERS1'):
- $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS');
- break;
-
- case getCode('MORE_RECEIVERS2'):
- $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND');
- break;
-
- case getCode('MORE_RECEIVERS3'):
- $message = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min'));
- break;