} elseif (!IS_MEMBER()) {
LOAD_URL("modules.php?module=index");
} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
- addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "order");
+ addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
return;
}
list($blist) = SQL_FETCHROW($result);
// Create redirect-URL
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_BLIST_URL')."&blist=".$blist;
+ $URL = "modules.php?module=login&what=order&msg=".constant('CODE_BLIST_URL')."&blist=".$blist;
} // END - if
// Free result
// Finally contruct the message
// @TODO Rewrite this old lost code to a template
- $MSG = "{!MEMBER_URL_TIME_LOCK!}<br />{!CONFIG_URL_TLOCK!} ".$STD."
- {!_HOURS!}, ".$MIN." {!_MINUTES!} {!_AND!} ".$SEC." {!_SECONDS!}<br />
- {!MEMBER_LAST_TLOCK!}: ".$LORDER;
+ $MSG = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD."
+ {--_HOURS--}, ".$MIN." {--_MINUTES--} {--_AND--} ".$SEC." {--_SECONDS--}<br />
+ {--MEMBER_LAST_TLOCK--}: ".$LORDER;
break;
case constant('CODE_OVERLENGTH'):
break;
case constant('CODE_BLIST_URL'):
- $MSG = "{!MEMBER_URL_BLACK_LISTED!}<br />\n{!MEMBER_BLIST_TIME!}: ".MAKE_DATETIME($_GET['blist'], "0");
+ $MSG = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".MAKE_DATETIME($_GET['blist'], "0");
break;
case constant('CODE_NO_RECS_LEFT'):
break;
case constant('CODE_MORE_RECEIVERS3'):
- $MSG = "{!MEMBER_ENTER_MORE_MIN_RECEIVERS_1!}".getConfig('order_min')."{!MEMBER_ENTER_MORE_MIN_RECEIVERS_2!}";
+ $MSG = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min'));
break;
case constant('CODE_INVALID_URL'):
default:
DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error code %s detected.", $_GET['msg']));
- $MSG = "{!UNKNOWN_CODE_1!}".$_GET['msg']."{!UNKNOWN_CODE_2!}";
+ $MSG = sprintf(getMessage('UNKNOWN_CODE'), $_GET['msg']);
break;
}
switch (getConfig('order_max_full'))
{
case "MAX": // He is allowed to send as much as possible
- define('ORDER_MAX_VALUE', getMessage('ORDER_ALLOED_MAX'));
+ define('ORDER_MAX_VALUE', getMessage('ORDER_ALLOWED_MAX'));
break;
case "ORDER": // He is allowed to send as much as he setup the receiving value
- define('ORDER_MAX_VALUE', ORDER_ALLOWED_RECEIVE_1.$ALLOWED.ORDER_ALLOWED_RECEIVE_2.$MAXI.ORDER_ALLOWED_RECEIVE_3);
+ define('ORDER_MAX_VALUE', sprintf(getMessage('ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI));
break;
default: // Unknown/invalid
DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full')));
- define('ORDER_MAX_VALUE', getMessage('ORDER_ALLOED_UNKNOWN'));
+ define('ORDER_MAX_VALUE', getMessage('ORDER_ALLOWED_UNKNOWN'));
break;
}
// Free result
SQL_FREERESULT($result);
- // 01 2 21 12 2 23 443 3 3210
- if ((!empty($_POST['data'])) || ((getConfig('order_multi_page') == "N") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE("html_mail"))))) {
+ // 01 2 21 12 2 23 443 3 3210
+ if ((!empty($_POST['data'])) || ((getConfig('order_multi_page') != "Y") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE("html_mail"))))) {
// Pre-output categories
$CAT = "";
foreach ($CATS['id'] as $key => $value) {
$CAT .= " <option value=\"".$value."\"";
if (($OLD_ORDER) && ($cat == $value)) $CAT .= " selected=\"selected\"";
- $CAT .= ">".$CATS['name'][$key]." (".$CATS['uids'][$key]." {!USER_IN_CAT!})</option>\n";
+ $CAT .= ">".$CATS['name'][$key]." (".$CATS['uids'][$key]." {--USER_IN_CAT--})</option>\n";
} // END - foreach
// Mail type
// Output option line
$type .= " <option value=\"".$typeS[$key][0]."\"";
if (($OLD_ORDER) && ($payment == $typeS[$key][0])) $type .= " selected=\"selected\"";
- $type .= ">".$P." {!PER_MAIL!} - ".$typeS[$key][3]." - ".round($typeS[$key][2])." {!PAYMENT!}</option>\n";
+ $type .= ">".$P." {--PER_MAIL--} - ".$typeS[$key][3]." - ".round($typeS[$key][2])." {--PAYMENT--}</option>\n";
} // END - if
} // END - foreach
}
} else {
// No mail types defined
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{!MEMBER_NO_PAYMENTS!}</span>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{--MEMBER_NO_PAYMENTS--}</span>");
}
} else {
- // No points left!
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{!MEMBER_NO_POINTS!}</span>");
+ // No points left
+ LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{--MEMBER_NO_POINTS--}</span>");
}
} else {
// No cateogries are defined yet
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{!MEMBER_NO_CATS!}</span>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{--MEMBER_NO_CATS--}</span>");
}
} elseif ($mmails == "0") {
- // Please set more than 0 mails per day!
+ // Please set more than 0 mails per day
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_HAS_ZERO_MMAILS'));
} else {
- // Please confirm some mails first!
- LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_LINKS_LEFT_1.$links.MEMBER_LINKS_LEFT_2.getConfig('unconfirmed').MEMBER_LINKS_LEFT_3);
+ // Please confirm some mails first
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('MEMBER_LINKS_LEFT'), $links, getConfig('unconfirmed')));
}
if (!empty($URL)) {