More misc fixes and rewrites (sorry, lame description)
[mailer.git] / inc / modules / guest / what-beg.php
index 9e5ee35fcb1aa35011bcc94a4303c7e46d9493cf..6a224c3c0bbc815ba9ffda42fd9366e3bd4dc165 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Mit uns Punkte erbetteln!                        *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * 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                  *
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
-       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
+} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) {
+       addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('beg'));
        return;
 }
 
 // Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+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'    , translateComma(getConfig('beg_points')));
+define('__BEG_POINTS_MAX', translateComma(getConfig('beg_points_max')));
 if ($GLOBALS['refid'] > 0) {
-       // Take referral ID from URL/Cookie
+       // Take referal ID from URL/Cookie
        define('__BEG_UID'       , $GLOBALS['refid']);
 } else {
-       // Take default referral ID
-       define('__BEG_UID'       , $_CONFIG['def_refid']);
+       // Take default referal ID
+       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'    , createFancyTime(getConfig('beg_timeout')));
+define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_uid_timeout')));
 
 // Load final template
 LOAD_TEMPLATE("guest_".substr(basename(__FILE__), 5, -4));