- case "member":
- // Members are allowed to set to zero mails per day (we will change this soon!)
- $result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value", __FUNCTION__, __LINE__);
- if (SQL_NUMROWS($result) > 0) {
- $OUT = "";
- while (list($value, $comment) = SQL_FETCHROW($result)) {
- $OUT .= " <option value=\"".$value."\"";
- if ($default == $value) $OUT .= " selected=\"selected\"";
- $OUT .= ">".$value." {--PER_DAY--}";
- if (!empty($comment)) $OUT .= " (".$comment.")";
- $OUT .= "</option>\n";
- }
- define('__MAX_RECEIVE_OPTIONS', $OUT);
- SQL_FREERESULT($result);
- $OUT = LOAD_TEMPLATE("member_receive_table", true);
- } else {
- // Maybe the admin has to setup some maximum values?
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('NO_MAX_VALUES'));
+ default: // Invalid!
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid mode %s detected.", $MODE));
+ break;
+ }
+
+ // Some entries are found?
+ if (SQL_NUMROWS($result) > 0) {
+ $OUT = "";
+ while ($content = SQL_FETCHARRAY($result)) {
+ $OUT .= " <option value=\"".$content['value']."\"";
+ if (REQUEST_POST('max_mails') == $content['value']) $OUT .= " selected=\"selected\"";
+ $OUT .= ">".$content['value']." {--PER_DAY--}";
+ if (!empty($content['comment'])) $OUT .= " (".$content['comment'].")";
+ $OUT .= "</option>\n";