break;
default: // Do stuff when extension is loaded
- if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) {
+ if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == 'RESET')) {
// So let's check for points
ADD_INC_TO_POOL(sprintf("%sinc/doubler_send.php", constant('PATH')));
}
// Generates a HTML table based on given data
// @TODO Lame description
-function DOUBLER_GENERATE_TABLE ($uid = '0', $done='N', $ref='N', $sort="ASC") {
+function DOUBLER_GENERATE_TABLE ($uid = '0', $done = 'N', $ref = 'N', $sort = 'ASC') {
if (empty($cnt)) $cnt = 0;
$add = ''; $DT_MODE = 0;
if ($uid > 0) {
// Load entries only from a single user
$add = " AND `userid`='".bigintval($uid)."'";
- $mode = 'member'; $COLS = "4"; $DT_MODE = '2';
+ $mode = 'member'; $COLS = '4'; $DT_MODE = '2';
$NOT_FOUND = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND');
} else {
// Guest mode!
$NOT_FOUND = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND');
}
- if (($done == 'Y') && ($sort == "ASC")) {
+ if (($done == 'Y') && ($sort == 'ASC')) {
// Already payed out points (latest payouts first)
$limit = getConfig('doubler_display_old');
- } elseif ($sort == "ASC") {
+ } elseif ($sort == 'ASC') {
// List entries which will receive their payout soon
$limit = getConfig('doubler_display_pay');
- } elseif ($sort == "DESC") {
+ } elseif ($sort == 'DESC') {
// Newest entries
$limit = getConfig('doubler_display_new');
}
);
// Load template and switch color
- $OUT .= LOAD_TEMPLATE($mode."_doubler_list_rows", true, $content);
+ $OUT .= LOAD_TEMPLATE($mode . '_doubler_list_rows', true, $content);
$SW = 3 - $SW;
}
}
// Return template
- return LOAD_TEMPLATE($mode."_doubler_list", true, $OUT);
+ return LOAD_TEMPLATE($mode . '_doubler_list', true, $OUT);
}
//
if (getConfig('doubler_own') == 'Y') {
// Take points from doubler's own account
$points += getConfig('doubler_points') - getConfig('doubler_used');
- }
+ } // END - if
if (getConfig('doubler_jackpot') == 'Y') {
// Load jackpot
if (getConfig('doubler_uid') > 0) {
// Get user's points
- $user = GET_TOTAL_DATA(getConfig('doubler_uid'), "user_points", "points");
+ $user = GET_TOTAL_DATA(getConfig('doubler_uid'), 'user_points', 'points');
$points += $user;
}
}
// Load URL data by given search term and column
-function SURFBAR_GET_URL_DATA ($searchTerm, $column='id', $order='id', $sort="ASC", $group='id', $add = '') {
+function SURFBAR_GET_URL_DATA ($searchTerm, $column = 'id', $order = 'id', $sort = 'ASC', $group = 'id', $add = '') {
// By default nothing is found
$GLOBALS['last_url_data'] = array();
define('__DOUBLER_SEND_RESET' , '');
break;
- case "RESET":
+ case 'RESET':
define('__DOUBLER_SEND_DIRECT', '');
define('__DOUBLER_SEND_RESET' , ' checked="checked"');
break;
define('__LOCKED' , createTimeSelections(getConfig('holiday_lock') , "holiday_lock" , "WDh"));
switch (getConfig('holiday_mode')) {
- case "RESET":
+ case 'RESET':
define('__RESET_DEFAULT' , ' checked="checked"');
define('__DIRECT_DEFAULT', '');
break;
// Sorting mode (ascending / descending)
switch (getConfig('order_mode')) {
- case "ASC":
+ case 'ASC':
define('__ASC_DEFAULT' , ' selected="selected"');
define('__DESC_DEFAULT', '');
break;
- case "DESC":
+ case 'DESC':
define('__ASC_DEFAULT' , '');
define('__DESC_DEFAULT', ' selected="selected"');
break;
define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST(getConfig('order_select')));
// Load template
- LOAD_TEMPLATE("admin_config_order");
+ LOAD_TEMPLATE('admin_config_order');
}
//
define('__DOUBLER_COUNTER', getConfig('doubler_counter'));
// Which mail-send-mode did the admin setup?
-switch (getConfig('doubler_send_mode'))
-{
- case "DIRECT":
+switch (getConfig('doubler_send_mode')) {
+ case 'DIRECT':
define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
break;
- case "RESET":
+ case 'RESET':
define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET);
break;
}
// Generate table with already payed out doubles
-define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', "DESC"));
+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());
define('__LEFT_VALUE', DOUBLER_GET_TOTAL_POINTS_LEFT());
// Load template
-LOAD_TEMPLATE("guest_doubler");
+LOAD_TEMPLATE('guest_doubler');
//
?>
// Which mail-send-mode did the admin setup?
switch (getConfig('doubler_send_mode')) {
- case "DIRECT":
+ case 'DIRECT':
define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
break;
- case "RESET":
+ case 'RESET':
define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET'));
break;
}
// Generate table with already payed out doubles
-define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE(getUserId(), 'Y', 'N', "DESC"));
+define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE(getUserId(), 'Y', 'N', 'DESC'));
// Generate table with next-to-run payouts
define('__DOUBLER_PAYOUT_NEXT', DOUBLER_GENERATE_TABLE(getUserId()));
// Generate table with refferal payouts
-define('__DOUBLER_PAYOUT_REF', DOUBLER_GENERATE_TABLE(getUserId(), 'N', 'Y', "DESC"));
+define('__DOUBLER_PAYOUT_REF', DOUBLER_GENERATE_TABLE(getUserId(), 'N', 'Y', 'DESC'));
// Generate timemark
define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout')));
define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT()));
// Load template
-LOAD_TEMPLATE("member_doubler");
+LOAD_TEMPLATE('member_doubler');
//
?>
}
// Do not execute when script is in CSS mode or no daily reset
-if ((getOutputMode() == 1) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == "RESET"))) return;
+if ((getOutputMode() == 1) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) return;
//* DEBUG: */ echo basename(__FILE__)."<br />\n";
// Check for holidays we need to enable and send email to user