}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-if (!REQUEST_ISSET_GET(('sub'))) REQUEST_SET_GET('sub', "");
-$message = "";
+if (!REQUEST_ISSET_GET('sub')) REQUEST_SET_GET('sub', '');
+$message = '';
// Quick actions on a rallye
if (REQUEST_ISSET_GET(('rallye'))) {
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
// Make all selected and deactivated rallyes editable
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $selected) {
// Load rallye basic data
$result = SQL_QUERY_ESC("SELECT title, descr, template, start_time, end_time, min_users, min_prices
LOAD_TEMPLATE("admin_edit_rallyes");
} else {
// Nothing selected to edit
- LOAD_TEMPLATE("admin_settings_saved", false, LOAD_TEMPLATE("admin_list_rallye_noselect", true));
+ LOAD_TEMPLATE('admin_settings_saved', false, LOAD_TEMPLATE("admin_list_rallye_noselect", true));
}
} elseif ((REQUEST_GET('sub') == "users") && (REQUEST_GET('rallye') > 0)) {
// List users and their refs before start and current
$result = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY userid",
array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// @TODO Rewrite this constant
define('__RALLYE_VALUE', REQUEST_GET('rallye'));
while ($content = SQL_FETCHARRAY($result)) {
$cnt = RALLYE_GET_REFCOUNT($content['userid'], $content['refs']);
// Init variables
- $bl = "";
- $br = "";
+ $bl = '';
+ $br = '';
// Output row
if (($content['curr_points'] > 0) && ($cnt > 0)) { $bl = "<strong>"; $br = "</strong>"; }
} // END - if
// Get user points
- $points = GET_TOTAL_DATA($content['userid'], "user_points", "points", "userid", false, " AND ref_depth=1 LIMIT 1");
+ $points = GET_TOTAL_DATA($content['userid'], "user_points", "points", 'userid', false, " AND ref_depth=1 LIMIT 1");
//* DEBUG: */ echo basename(__FILE__).":uid={$content['userid']},points={$points},opoints={$content['curr_points']}<br />\n";
// Prepare content
LOAD_TEMPLATE("admin_list_rallye_usr");
} else {
// No entries found?
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ADMIN_USERS_404'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ADMIN_USERS_404'));
}
} else {
// Start listing rallyes
__FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List found rallyes
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Load admin login
$content['alogin'] = GET_ADMIN_LOGIN($content['admin_id']);
// Is the rallye active or not?
switch ($content['is_active'])
{
- case "Y":
+ case 'Y':
// Rallye is active so do not edit it!
$content['select'] = "<div class=\"big\">".$content['id']."</div>";
$content['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW');
$content['active'] = 0;
break;
- case "N":
+ case 'N':
$content['active_title'] = getMessage('RALLYE_ACTIVATE_NOW');
$content['active'] = "1";
break;
// Notification to members?
switch ($content['send_notify'])
{
- case "Y":
+ case 'Y':
$content['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW');
$content['notify'] = 0;
break;
- case "N":
+ case 'N':
$content['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW');
$content['notify'] = "1";
break;
// Auto-add of new joined members?
switch ($content['auto_add_new_user'])
{
- case "Y":
+ case 'Y':
$content['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW');
$content['auto'] = 0;
break;
- case "N":
+ case 'N':
$content['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW');
$content['auto'] = "1";
break;
LOAD_TEMPLATE("admin_list_rallyes");
} else {
// No rallyes setup so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_NO_RALLYES_SETUP'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_NO_RALLYES_SETUP'));
}
}