* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
// Add description as navigation point
addYouAreHereLink('admin', __FILE__);
-// Convert 'rate' if set
-if (isPostRequestElementSet('rate')) {
- convertCommaToDotInPostData('rate');
-} // END - if
-
+// Do we add an entry?
if ((isFormSent('add')) && (isPostRequestElementSet('title')) && (postRequestElement('rate') > 0)) {
// Add new payout type
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1",
SQL_FREERESULT($result);
// Does already exist
- $message = '<div class="notice">{--ADMIN_PAYOUT_TYPE_ALREADY--}</div>';
+ $message = '<div class="bad">{--ADMIN_PAYOUT_TYPE_ALREADY--}</div>';
}
}
$id = bigintval($id);
// Edit only if something is entered
- if ((isPostRequestElementSet('title', $id)) && (postRequestElement('rate', $id) > 0)) {
+ if ((isPostRequestElementSet('type', $id)) && (postRequestElement('rate', $id) > 0)) {
// Update entry
addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_payout_types` SET
`type`='%s',
convertCommaToDot(postRequestElement('rate', $id)),
convertCommaToDot(postRequestElement('min_points' , $id)),
postRequestElement('allow_url', $id),
- bigintval($id)
+ $id
),__FILE__, __LINE__, false));
}
}
// Add new payout type
if ($display === true) {
- loadTemplate('admin_payout_add_new');
+ loadTemplate('admin_add_payout');
} // END - if
// [EOF]