* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * 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 *
array(postRequestElement('pay_name')), __FILE__, __LINE__);
if (SQL_HASZERONUMS($result)) {
// No entry found so add this line
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_rate`,`pay_min_count`,`pay_currency`) VALUES ('%s','%s','%s','%s')",
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')",
array(
postRequestElement('pay_name'),
convertCommaToDot(postRequestElement('pay_rate')),
$OUT = '';
foreach (postRequestElement('id') as $id => $sel) {
// Load entry
- $result = SQL_QUERY_ESC("SELECT `id`,`pay_name`,`pay_rate`,`pay_min_count`,`pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `id`, `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
if (isFormSent('edit')) {
// Edit entry
- $OUT .= loadTemplate('admin_list_sponsor_pay_edit_row', true, $content);
+ $OUT .= loadTemplate('admin_list_sponsor_pay_edit_row', TRUE, $content);
} else {
// Delete entry
- $OUT .= loadTemplate('admin_list_sponsor_pay_del_row', true, $content);
+ $OUT .= loadTemplate('admin_list_sponsor_pay_del_row', TRUE, $content);
}
} else {
// Entry invalid
- $OUT .= loadTemplate('admin_list_sponsor_pay_404', true, $id);
+ $OUT .= loadTemplate('admin_list_sponsor_pay_404', TRUE, $id);
}
// Free result
// Load main template depending on mode (edit/delete)
if (isFormSent('edit')) {
// Load main edit template
- loadTemplate('admin_list_sponsor_pay_edit', false, $OUT);
+ loadTemplate('admin_list_sponsor_pay_edit', FALSE, $OUT);
} else {
// Load main delete template
- loadTemplate('admin_list_sponsor_pay_del', false, $OUT);
+ loadTemplate('admin_list_sponsor_pay_del', FALSE, $OUT);
}
} else {
// Load all payment types
$result = SQL_QUERY("SELECT
- `id`,`pay_name`,`pay_rate`,`pay_min_count`,`pay_currency`
+ `id`,
+ `pay_name`,
+ `pay_rate`,
+ `pay_min_count`,
+ `pay_currency`
FROM
`{?_MYSQL_PREFIX?}_sponsor_paytypes`
ORDER BY
`pay_name` ASC",
__FILE__, __LINE__);
- // Do we have some paytypes setup?
+ // Are there some payment types setup?
if (!SQL_HASZERONUMS($result)) {
// Prepare variables for listing
$OUT = '';
// List alle found payment types
while ($content = SQL_FETCHARRAY($result)) {
// Add row
- $OUT .= loadTemplate('admin_list_sponsor_pay_row', true, $content);
+ $OUT .= loadTemplate('admin_list_sponsor_pay_row', TRUE, $content);
} // END - while
// Load list template
- $content['list_out'] = loadTemplate('admin_list_sponsor_pay', true, $OUT);
+ $content['list_out'] = loadTemplate('admin_list_sponsor_pay', TRUE, $OUT);
} else {
// Noting setup so far!
- $content['list_out'] = displayMessage('{--ADMIN_SPONSOR_NO_PAYTYPES--}', true);
+ $content['list_out'] = displayMessage('{--ADMIN_SPONSOR_NO_PAYTYPES--}', TRUE);
}
// Free memory
SQL_FREERESULT($result);
// Add new payment types here
- $content['add_out'] = loadTemplate('admin_add_sponsor_paytype', true);
+ $content['add_out'] = loadTemplate('admin_add_sponsor_paytype', TRUE);
// Load final template
- loadTemplate('admin_sponsor_paytypes', false, $content);
+ loadTemplate('admin_sponsor_paytypes', FALSE, $content);
}
// [EOF]