<?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 *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Allgemeine Informationen zum Verdoppen *
* -------------------------------------------------------------------- *
- * *
+ * $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 *
+ * 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 (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
-}
- elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN()))
-{
- ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler");
- return;
-}
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
-
-// Percent values etc.
-define('__CHARGE_VALUE', TRANSLATE_COMMA($CONFIG['doubler_charge'] * 100));
-define('__REF_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_ref'] * 100));
-define('__TOTAL_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_points']));
-define('__MIN_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_min']));
-define('__MAX_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_max']));
+addMenuDescription('guest', __FILE__);
-// Transfer referral ID
-define('__REFID', $GLOBALS['refid']);
-
-// Usage counter
-define('__DOUBLER_COUNTER', $CONFIG['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 ($CONFIG['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($CONFIG['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]
?>