X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fforced_functions.php;h=011621f52e97865d6ebebc6d097dd8f178eac662;hb=262c3e87d0a80ec8a4435b2564d4b666fd329bf6;hp=84f57641e9623c4429b99289c9e57729f1686710;hpb=a636d6415605b148ba0989f51442145cd8361ee4;p=mailer.git diff --git a/inc/libs/forced_functions.php b/inc/libs/forced_functions.php index 84f57641e9..011621f52e 100644 --- a/inc/libs/forced_functions.php +++ b/inc/libs/forced_functions.php @@ -17,7 +17,7 @@ * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -53,17 +53,21 @@ function doTemplateForcedAdTypeSelectionBox ($templateName, $clear = false, $def } // Translate the status IN/OUT -function translateForcedAdType ($status) { - // Is the status empty? - if (empty($status)) { +function translateForcedAdsType ($status) { + // Is the status null or empty? + if (is_null($status)) { + // Is NULL + $status = 'NULL'; + } elseif (empty($status)) { + // Is empty (string) $status = 'EMPTY'; } // END - if // Default status is unknown - $return = '{%message,ADMIN_FORCED_AD_TYPE_UNKNOWN=' . $status . '%}'; + $return = '{%message,ADMIN_FORCED_ADS_TYPE_UNKNOWN=' . $status . '%}'; // Construct message id - $messageId = 'ADMIN_FORCED_AD_TYPE_' . $status; + $messageId = 'ADMIN_FORCED_ADS_TYPE_' . $status; // Is it there? if (isMessageIdValid($messageId)) { @@ -75,5 +79,34 @@ function translateForcedAdType ($status) { return $return; } +// "Getter" for an array of data from all Forced-PopUps +function getForcedPopupDataByEarningArray ($content) { + debug_report_bug(__FUNCTION__, __LINE__, 'content=' . print_r($content, true)); +} + +// Generator (somewhat getter) for network type options +function generateForcedAdsTypeOptions ($type = NULL) { + // Is this cached? + if (!isset($GLOBALS[__FUNCTION__][$type])) { + // Generate output and cache it + $GLOBALS[__FUNCTION__][$type] = generateOptionList( + '/ARRAY/', + array( + 'BANNER', + 'TEXTLINK', + 'POPUP', + ), + array(), + $type, + '', '', + array(), + 'translateForcedAdsType' + ); + } // END - if + + // Return content + return $GLOBALS[__FUNCTION__][$type]; +} + // [EOF] ?>