X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Forder_functions.php;h=cbdff252a2187034bd4a6e9f7cb123f53c227927;hb=f888a0bda52e7dd2ea799837ed2991c263864e9f;hp=a05f2f345a20affb81d6ce6cf9d3bab38391f4ec;hpb=75ad748a68473ace540251427a74fb781b1145e9;p=mailer.git diff --git a/inc/libs/order_functions.php b/inc/libs/order_functions.php index a05f2f345a..cbdff252a2 100644 --- a/inc/libs/order_functions.php +++ b/inc/libs/order_functions.php @@ -1,7 +1,7 @@ {--ORDER_SELECT_COLUMN_".strtoupper($item)."--}\n"; - } + // @TODO Move this array into a filter + $LIST = array('userid', 'zip', 'country', 'email', 'birth_year', 'last_online', 'ref_clicks', 'total_logins', 'mail_orders'); + $OUT = ''; + foreach ($LIST as $item) { + // Defaul selection + $selected = ''; + if ($item == $default) { + $selected = ' selected="selected"'; + } // END - if + + // 'ref_clicks' needs to be rewritten to 'referral_clicks' + if ($item == 'ref_clicks') { + $item = 'referral_clicks'; + } // END - if + + // Add option line + $OUT .= ''; + } // END - foreach + + // Return the output return $OUT; } -// +//----------------------------------------------------------------------------- +// Wrapper functions for configuration entries +//----------------------------------------------------------------------------- + +// Getter for 'order_multi_page' config entry +function getOrderMultiPage () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('order_multi_page'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Determines whether 'order_multi_page' is set to 'Y' +function isOrderMultiPageEnabled () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getOrderMultiPage() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'autosend_member_mails' config entry +function getAutosendMemberMails () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('autosend_member_mails'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Determines whether 'autosend_member_mails' is set to 'Y' +function isAutosendMemberMailsEnabled () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getAutosendMemberMails() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'order_max_full' config entry +function getOrderMaxFull () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('order_max_full'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'order_mode' config entry +function getOrderMode () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('order_mode'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'order_select' config entry +function getOrderSelect () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('order_select'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'max_unconfirmed' config entry +function getMaxUnconfirmed () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('max_unconfirmed'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'max_text_length' config entry +function getMaxTextLenngth () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('max_text_length'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// [EOF] ?>