More misc fixes and rewrites (sorry, lame description)
[mailer.git] / inc / modules / sponsor.php
index 1067b35..4f88a06 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Sponsorenbereich                                 *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $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("sponsor"))
-       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE);
+} elseif ((!EXT_IS_ACTIVE('sponsor'))) {
+       addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor'));
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       ADD_FATAL(SPONSOR_ONLY_AREA_ENTERED);
+       addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
-} elseif (empty($GLOBALS['what'])) {
+} elseif (!isWhatSet()) {
        // Empty what value detected!
-       $GLOBALS['what'] = "welcome";
+       setWhat('welcome');
 }
 
 // A valid sponsor login and we are allowed to enter this module so let's
@@ -51,22 +56,22 @@ if (!defined('__SECURITY')) {
 UPDATE_SPONSOR_LOGIN();
 
 // Generate menu
-define('__SPONSOR_MENU', GENERATE_SPONSOR_MENU($GLOBALS['what']));
+define('__SPONSOR_MENU', GENERATE_SPONSOR_MENU(getWhat()));
 
 // Generate right-side output
-define('__SPONSOR_CONTENT', GENERATE_SPONSOR_CONTENT($GLOBALS['what']));
+define('__SPONSOR_CONTENT', GENERATE_SPONSOR_CONTENT(getWhat()));
 
 // Load header template
-define('__SPONSOR_HEADER', LOAD_TEMPLATE("sponsor_header", true));
+define('__SPONSOR_HEADER', LOAD_TEMPLATE('sponsor_header', true));
 
 // Load footer template
-define('__SPONSOR_FOOTER', LOAD_TEMPLATE("sponsor_footer", true));
+define('__SPONSOR_FOOTER', LOAD_TEMPLATE('sponsor_footer', true));
 
-// "You are here" navigation
-define('__SPONSOR_YOURE_HERE', ADD_DESCR("sponsor", $GLOBALS['what'], false, false));
+// 'You are here' navigation
+define('__SPONSOR_YOURE_HERE', ADD_DESCR('sponsor', getWhat(), false, false));
 
 // Load main sponsor template
-LOAD_TEMPLATE("sponsor_main");
+LOAD_TEMPLATE('sponsor_main');
 
 //
 ?>