X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-beg.php;h=6037ea142225502cab61d5c084a9181561ea71bd;hb=227a6e77e84e10541d9ac1c8ba5f636c40afb617;hp=36ba9831d5f937ccd372a441ac589675b84a4b62;hpb=db9da972dbe9dcd68b7f937f1c6474e680c7386b;p=mailer.git diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index 36ba9831d5..6037ea1422 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Mit uns Punkte erbetteln! * * -------------------------------------------------------------------- * - * * + * $Revision:: 856 $ * + * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: stelzi $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -35,8 +40,8 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("beg")) - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); +} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg"); return; } @@ -44,23 +49,19 @@ if (!defined('__SECURITY')) { ADD_DESCR("guest", __FILE__); // Prepare constants -define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points'])); -define('__BEG_POINTS_MAX', TRANSLATE_COMMA($_CONFIG['beg_points_max'])); +define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points'))); +define('__BEG_POINTS_MAX', TRANSLATE_COMMA(getConfig('beg_points_max'))); if ($GLOBALS['refid'] > 0) { // Take referal ID from URL/Cookie define('__BEG_UID' , $GLOBALS['refid']); } else { // Take default referal ID - define('__BEG_UID' , $_CONFIG['def_refid']); + define('__BEG_UID' , getConfig('def_refid')); } -if (function_exists('CREATE_FANCY_TIME')) { - define('__BEG_TIMEOUT' , CREATE_FANCY_TIME($_CONFIG['beg_timeout'])); - define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME($_CONFIG['beg_uid_timeout'])); -} else { - define('__BEG_TIMEOUT ' , round($_CONFIG['beg_timeout'] / 60)." ".MINUTES); - define('__BEG_UID_TIMEOUT', round($_CONFIG['beg_uid_timeout'] / 60)." ".MINUTES); -} +// Selection boxes are now the default +define('__BEG_TIMEOUT' , CREATE_FANCY_TIME(getConfig('beg_timeout'))); +define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME(getConfig('beg_uid_timeout'))); // Load final template LOAD_TEMPLATE("guest_".substr(basename(__FILE__), 5, -4));