X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-beg.php;h=557f9ae292da1a85922f0c219466ea3ba04d9b13;hb=d3c4fdd9bfab35389e1a5ff48f3952d527c7b4bb;hp=887c393f1e5c51d272f1518da28d84ad3924d613;hpb=addbb8351784d33ba1c7ebc52771defd09ddf2f0;p=mailer.git diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index 887c393f1e..557f9ae292 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -10,9 +10,14 @@ * -------------------------------------------------------------------- * * 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 * + * 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 * @@ -32,38 +37,29 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { - $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; -} +if (!defined('__SECURITY')) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR("guest", basename(__FILE__)); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('beg')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg')); + return; +} // END - if // 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 referral ID from URL/Cookie - define('__BEG_UID' , $ref); -} else { - // Take default referral ID - define('__BEG_UID' , $CONFIG['def_refid']); -} +$content['points'] = translateComma(getConfig('beg_points')); +$content['points_max'] = translateComma(getConfig('beg_points_max')); +$content['userid'] = determineReferalId(); -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 +$content['timeout'] = createFancyTime(getConfig('beg_timeout')); +// @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', false, $content); -// +// [EOF] ?>