// Activate / deactivate
switch (getRequestElement('activate'))
{
- case '1': // Activate
+ case 1: // Activate
addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET is_active='Y' WHERE `id`=%s AND is_active='N' LIMIT 1");
break;
- case '0': // Deactivate
+ case 0: // Deactivate
addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET is_active='N' WHERE `id`=%s AND is_active='Y' LIMIT 1");
break;
}
// Automatic notification
switch (getRequestElement('notify'))
{
- case '1': // Activate
+ case 1: // Activate
addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET send_notify='Y' WHERE `id`=%s AND send_notify='N' LIMIT 1");
break;
- case '0': // Deactivate
+ case 0: // Deactivate
addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET send_notify='N' WHERE `id`=%s AND send_notify='Y' LIMIT 1");
break;
}
// Automatic adding of new members
switch (getRequestElement('auto'))
{
- case '1': // Activate
+ case 1: // Activate
addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET auto_add_new_user='Y' WHERE `id`=%s AND auto_add_new_user='N' LIMIT 1");
break;
- case '0': // Deactivate
+ case 0: // Deactivate
addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET auto_add_new_user='N' WHERE `id`=%s AND auto_add_new_user='Y' LIMIT 1");
break;
}
'title' => $row['title'],
'template' => $row['template'],
'joined' => $joined,
- 'start_date' => generateDateTime($row['start_time'], '2'),
- 'end_date' => generateDateTime($row['end_time'] , '2'),
+ 'start_date' => generateDateTime($row['start_time'], 2),
+ 'end_date' => generateDateTime($row['end_time'] , 2),
'active_lnk' => translateYesNo($row['is_active']),
'notify_lnk' => translateYesNo($row['send_notify']),
'auto_lnk' => translateYesNo($row['auto_add_new_user']),
case 'N':
$row['active_title'] = getMessage('RALLYE_ACTIVATE_NOW');
- $row['active'] = '1';
+ $row['active'] = 1;
break;
}
case 'N':
$row['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW');
- $row['notify'] = '1';
+ $row['notify'] = 1;
break;
}
case 'N':
$row['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW');
- $row['auto'] = '1';
+ $row['auto'] = 1;
break;
}