// Some security stuff...
if ((!defined('__SECURITY')) || (!isAdmin())) {
die();
-}
+} // END - if
// Add description as navigation point
addMenuDescription('admin', __FILE__);
if (((!isPostRequestElementSet(('t_wait'))) || (!isPostRequestElementSet(('payment')))) && (isGetRequestElementSet('do')) && (getRequestElement('do') == 'add')) {
unsetPostRequestElement('ok');
-}
+} // END - if
if (isFormSent()) {
switch (getRequestElement('do')) {
addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`='".$id."' LIMIT 1");
}
break;
- }
+ } // END - switch
// Save settings
if (countSqls() > 0) {
// Run all queries
runFilterChain('run_sqls');
- $content = "<span class=\"admin_failed\">".SETTINGS_SAVED."</span>";
+ $content = "<span class=\"admin_failed\">{--SETTINGS_SAVED--}</span>";
} else {
// Nothing has changed!
$content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
loadTemplate('admin_edit_payments', false, $OUT);
} else {
// Referal levels
- $result = SQL_QUERY("SELECT id, time, payment, mail_title, price FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY time", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT `id`, `time`, `payment`, `mail_title`, `price` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `time` ASC", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Make referal levels editable and deletable
$OUT = ''; $SW = 2;
// Load row template and switch colors
$OUT .= loadTemplate('admin_payments_list_row', true, $content);
$SW = 3 - $SW;
- }
+ } // END - switch
// Free memory
SQL_FREERESULT($result);
// Load main template
loadTemplate('admin_list_payments', false, $OUT);
- }
+ } // END - if
// Form for adding new referal levels
loadTemplate('admin_add_payment');