}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Init variables
-$message = "";
+$message = '';
// Is the 'sub' parameter set?
-if (REQUEST_ISSET_GET(('sub'))) {
+if (REQUEST_ISSET_GET('sub')) {
// Yes, then do some sanity-checks
switch (REQUEST_GET('sub'))
{
case "ref":
if (REQUEST_ISSET_GET('do')) {
- if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == "add")) {
+ if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == 'add')) {
REQUEST_UNSET_POST('ok');
}
}
case "ref":
switch (REQUEST_GET('do'))
{
- case "add":
+ case 'add':
ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_refdepths` (level, percents) VALUES ('".REQUEST_POST('lvl')."','".REQUEST_POST('perc')."')");
break;
}
// Update cache file
- if (GET_EXT_VERSION("cache") >= "0.1.2") {
+ if (GET_EXT_VERSION('cache') >= '0.1.2') {
if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile();
}
break;
// Shall we display a message?
if (!empty($message)) {
// When do so...
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
} elseif (REQUEST_GET('sub') == "settings") {
// Setup some settings like direct pay and so on
// Including new add-mode for one-time referal bonus
switch (getConfig('allow_direct_pay')) {
- case "Y":
- define('__DIRECT_Y', " checked=\"checked\"");
- define('__DIRECT_N', "");
+ case 'Y':
+ define('__DIRECT_Y', ' chkecked="checked"');
+ define('__DIRECT_N', '');
break;
- case "N":
- define('__DIRECT_Y', "");
- define('__DIRECT_N', " checked=\"checked\"");
+ case 'N':
+ define('__DIRECT_Y', '');
+ define('__DIRECT_N', ' chkecked="checked"');
break;
}
// One-time referal bonus add-mode
switch (getConfig('reg_points_mode')) {
- case "ref" : define('__MODE_REF', " checked=\"checked\""); define('__MODE_DIRECT', ""); break;
- case "direct": define('__MODE_REF', ""); define('__MODE_DIRECT', " checked=\"checked\""); break;
+ case "ref" : define('__MODE_REF', ' chkecked="checked"'); define('__MODE_DIRECT', ''); break;
+ case "direct": define('__MODE_REF', ''); define('__MODE_DIRECT', ' chkecked="checked"'); break;
}
// Referal payout value
// 12 3 32 2 3 32 2 3 4 43 21
if ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST('sel')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete entries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value) {
$result = SQL_QUERY_ESC("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
LOAD_TEMPLATE("admin_points_del");
} elseif ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST('sel')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit entries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value) {
$result = SQL_QUERY_ESC("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
$result = SQL_QUERY("SELECT id, level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Make referal levels editable and deletable
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// List already existing categories for editing
while ($content = SQL_FETCHARRAY($result)) {