// Get category name back
function GET_CATEGORY ($cid) {
// Default is not found
- $ret = _CATEGORY_404;
+ $ret = getMessage('_CATEGORY_404');
// Is the category id set?
if ($cid == "0") {
// No category
- $ret = _CATEGORY_NONE;
+ $ret = getMessage('_CATEGORY_NONE');
} elseif ($cid > 0) {
// Lookup the category in database
$result = SQL_QUERY_ESC("SELECT cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE id=%s LIMIT 1",
// Get a string of "mail title" and price back
function GET_PAYMENT ($pid, $full=false) {
// Default is not found
- $ret = _PAYMENT_404;
+ $ret = getMessage('_PAYMENT_404');
// Load payment data
$result = SQL_QUERY_ESC("SELECT mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1",
} else {
// Return title and price
list($t, $p) = SQL_FETCHROW($result);
- $ret = $t." / ".TRANSLATE_COMMA($p)." ".POINTS;
+ $ret = $t." / ".TRANSLATE_COMMA($p)." {!POINTS!}";
}
}
}
// Get (basicly) the price of given payment id
-function GET_PAY_POINTS($pid, $lookFor="price")
-{
+function GET_PAY_POINTS ($pid, $lookFor = "price") {
$ret = "-1";
$result = SQL_QUERY_ESC("SELECT %s FROM `{!_MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1",
array($lookFor, $pid), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
+ if (SQL_NUMROWS($result) == 1) {
// Payment type found... :-)
list($ret) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
// Remove a receiver's ID from $ARRAY and add a link for him to confirm
-function REMOVE_RECEIVER (&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=false)
-{
+function REMOVE_RECEIVER (&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=false) {
$ret = "failed";
if ($uid > 0)
{