]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-beg.php
Renamed function so it might be more understandable
[mailer.git] / inc / modules / guest / what-beg.php
index f636cdb1739b8f906e32b6a5f1a7e5db00842d42..049c2ee0c1a3784fd45a723448928ab3ca528a3f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 01/09/2005 *
- * ================                             Last change: 01/09/2005 *
+ * Mailer v0.2.1-FINAL                                Start: 01/09/2005 *
+ * ===================                          Last change: 01/09/2005 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-beg.php                                     *
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Mit uns Punkte erbetteln!                        *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $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");
-       return;
-}
+       die();
+} // END - if
 
 // Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+addYouAreHereLink('guest', __FILE__);
 
-// Prepare constants
-define('__BEG_POINTS'    , TRANSLATE_COMMA($_CONFIG['beg_points']));
-define('__BEG_POINTS_MAX', TRANSLATE_COMMA($_CONFIG['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']);
-}
+if ((!isExtensionActive('beg')) && (!isAdmin())) {
+       loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg'));
+       return;
+} // END - if
 
-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);
-}
+// @TODO No more needed? define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_userid_timeout')));
 
 // Load final template
-LOAD_TEMPLATE("guest_".substr(basename(__FILE__), 5, -4));
+loadTemplate('guest_beg');
 
-//
+// [EOF]
 ?>