<?php
/************************************************************************
- * MXChange v0.2.1 Start: 02/17/2005 *
- * ================ Last change: 02/18/2005 *
+ * Mailer v0.2.1-FINAL Start: 02/17/2005 *
+ * =================== Last change: 02/18/2005 *
* *
* -------------------------------------------------------------------- *
* File : what-doubler.php *
* 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 *
+ * 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('doubler')) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'doubler');
- return;
-}
+ die();
+} // END - if
// Add description as navigation point
-ADD_DESCR('guest', __FILE__);
-
-// Percent values etc.
-define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('doubler_charge') * 100));
-define('__REF_VALUE' , TRANSLATE_COMMA(getConfig('doubler_ref') * 100));
-define('__TOTAL_VALUE' , TRANSLATE_COMMA(getConfig('doubler_points')));
-define('__MIN_VALUE' , TRANSLATE_COMMA(getConfig('doubler_min')));
-define('__MAX_VALUE' , TRANSLATE_COMMA(getConfig('doubler_max')));
+addMenuDescription('guest', __FILE__);
-// Transfer referal ID
-define('__REFID', $GLOBALS['refid']);
-
-// Usage counter
-define('__DOUBLER_COUNTER', getConfig('doubler_counter'));
+if ((!isExtensionActive('doubler')) && (!isAdmin())) {
+ loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('doubler'));
+ return;
+} // END - if
// Which mail-send-mode did the admin setup?
-switch (getConfig('doubler_send_mode'))
-{
-case "DIRECT":
- define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
- break;
-
-case "RESET":
- define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET);
- break;
-}
+$content['payout_time'] = '{--DOUBLER_PAYOUT_TIME_{?doubler_send_mode?}--}';
// Generate table with already payed out doubles
-define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE("0", "Y", "N", "DESC"));
-
-// Generate table with next-to-run payouts
-define('__DOUBLER_PAYOUT_NEXT', DOUBLER_GENERATE_TABLE());
-
-// Generate timemark
-define('__TIMEOUT_MARK', CREATE_FANCY_TIME(getConfig('doubler_timeout')));
-
-// Points left to double
-define('__LEFT_VALUE', DOUBLER_GET_TOTAL_POINTS_LEFT());
+$content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC');
// Load template
-LOAD_TEMPLATE("guest_doubler");
+loadTemplate('guest_doubler', false, $content);
-//
+// [EOF]
?>