X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fsponsor.php;h=409fcc0de07fc4d0702339d43f6179eec755da90;hb=4f2414a0134da82027fce8a6c98696a207c8c8cc;hp=4f88a06f9e8cf12615970ee256d8109b0a77a95f;hpb=03f62d0b89aa9276ac37f4d616d940fae184d850;p=mailer.git diff --git a/inc/modules/sponsor.php b/inc/modules/sponsor.php index 4f88a06f9e..409fcc0de0 100644 --- a/inc/modules/sponsor.php +++ b/inc/modules/sponsor.php @@ -17,7 +17,7 @@ * 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 * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software. You can redistribute it and/or modify * @@ -37,12 +37,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('sponsor'))) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); + die(); +} elseif ((!isExtensionActive('sponsor'))) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); return; -} elseif (!IS_SPONSOR()) { +} elseif (!isSponsor()) { // No sponsor! addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED')); return; @@ -53,25 +52,25 @@ if (!defined('__SECURITY')) { // A valid sponsor login and we are allowed to enter this module so let's // update his cookies and online time -UPDATE_SPONSOR_LOGIN(); +updateSponsorLogin(); // Generate menu -define('__SPONSOR_MENU', GENERATE_SPONSOR_MENU(getWhat())); +$content['menu'] = addSponsorMenu(getWhat()); // Generate right-side output -define('__SPONSOR_CONTENT', GENERATE_SPONSOR_CONTENT(getWhat())); +$content['content'] = addSponsorContent(getWhat()); // Load header template -define('__SPONSOR_HEADER', LOAD_TEMPLATE('sponsor_header', true)); +$content['header'] = loadTemplate('sponsor_header', true); // Load footer template -define('__SPONSOR_FOOTER', LOAD_TEMPLATE('sponsor_footer', true)); +$content['footer'] = loadTemplate('sponsor_footer', true); // 'You are here' navigation -define('__SPONSOR_YOURE_HERE', ADD_DESCR('sponsor', getWhat(), false, false)); +$content['you_are_here'] = addMenuDescription('sponsor', getWhat(), false, false); // Load main sponsor template -LOAD_TEMPLATE('sponsor_main'); +loadTemplate('sponsor_main', false, $content); -// +// [EOF] ?>