projects
/
mailer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git]
/
inc
/
modules
/
admin
/
what-list_bank_package.php
diff --git
a/inc/modules/admin/what-list_bank_package.php
b/inc/modules/admin/what-list_bank_package.php
index bb2fa1fbb1d76aee1f895375d1abe16a6a7f8b18..ed1427960b498126b2dfdb4485d4516709547add 100644
(file)
--- a/
inc/modules/admin/what-list_bank_package.php
+++ b/
inc/modules/admin/what-list_bank_package.php
@@
-16,8
+16,8
@@
* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 201
1
by Mailer Developer Team *
- * For more information visit: http://
www.mxchange.org
*
+ * Copyright (c) 2009 - 201
5
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 *
* *
* 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 *
@@
-44,17
+44,18
@@
if ((!defined('__SECURITY')) || (!isAdmin())) {
addYouAreHereLink('admin', __FILE__);
// Check if there is enougth selected
addYouAreHereLink('admin', __FILE__);
// Check if there is enougth selected
-$show =
true
;
-if (
(isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) && (count(postRequestParameter('id')) > 0
)) {
+$show =
TRUE
;
+if (
ifPostContainsSelections('id'
)) {
// Okay, which button was pressed?
if (isFormSent('change')) {
// Change permissions
// Okay, which button was pressed?
if (isFormSent('change')) {
// Change permissions
- adminChangeActivationStatus(postRequest
Parameter
('id'), 'bank_packages', 'package_active');
+ adminChangeActivationStatus(postRequest
Element
('id'), 'bank_packages', 'package_active');
} elseif (isFormSent('edit')) {
// Delete entries (with confirmation)
adminEditEntriesConfirm(
} elseif (isFormSent('edit')) {
// Delete entries (with confirmation)
adminEditEntriesConfirm(
- postRequestParameter('id'),
- 'bank_packages',
+ array('id'),
+ array('bank_packages'),
+ postRequestElement('id'),
array(
'id',
'title',
array(
'id',
'title',
@@
-107,22
+108,24
@@
if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id')))
''
)
);
''
)
);
- $show =
false
;
+ $show =
FALSE
;
} elseif (isFormSent('do_edit')) {
// Delete entries (with confirmation)
adminEditEntriesConfirm(
} elseif (isFormSent('do_edit')) {
// Delete entries (with confirmation)
adminEditEntriesConfirm(
- postRequestParameter('id'),
- 'bank_packages',
+ array('id'),
+ array('bank_packages'),
+ postRequestElement('id'),
array(),
array(),
array(),
array(),
array(),
array(),
- true
+ array(TRUE)
);
} elseif (isFormSent('delete')) {
// Delete entries (with confirmation)
adminDeleteEntriesConfirm(
);
} elseif (isFormSent('delete')) {
// Delete entries (with confirmation)
adminDeleteEntriesConfirm(
- postRequestParameter('id'),
- 'bank_packages',
+ array('id'),
+ array('bank_packages'),
+ postRequestElement('id'),
array(
'id',
'title',
array(
'id',
'title',
@@
-142,49
+145,56
@@
if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id')))
''
)
);
''
)
);
- $show =
false
;
+ $show =
FALSE
;
} elseif (isFormSent('do_delete')) {
// Delete entries (with confirmation)
adminDeleteEntriesConfirm(
} elseif (isFormSent('do_delete')) {
// Delete entries (with confirmation)
adminDeleteEntriesConfirm(
- postRequestParameter('id'),
- 'bank_packages',
+ array('id'),
+ array('bank_packages'),
+ postRequestElement('id'),
array(),
array(),
array(),
array(),
array(),
array(),
- true
+ array(TRUE)
);
}
} // END - if
// Skip showing old entries?
);
}
} // END - if
// Skip showing old entries?
-if ($show ===
false
) return;
+if ($show ===
FALSE
) return;
// Load all banking packages from DB
// Load all banking packages from DB
-$result = SQL_QUERY("SELECT
- `id`, `title`, `description`, `account_fee`, `package_active`, `interest_plus`, `interest_minus`
+$result = sqlQuery('SELECT
+ `id`,
+ `title`,
+ `description`,
+ `account_fee`,
+ `package_active`,
+ `interest_plus`,
+ `interest_minus`
FROM
`{?_MYSQL_PREFIX?}_bank_packages`
ORDER BY
FROM
`{?_MYSQL_PREFIX?}_bank_packages`
ORDER BY
- `id` ASC
"
, __FILE__, __LINE__);
+ `id` ASC
'
, __FILE__, __LINE__);
// Is there at lease one package?
// Is there at lease one package?
-if (!
SQL_HASZERONUMS
($result)) {
+if (!
ifSqlHasZeroNumRows
($result)) {
// List all packages
$OUT = '';
// List all packages
$OUT = '';
- while ($content =
SQL_FETCHARRAY
($result)) {
+ while ($content =
sqlFetchArray
($result)) {
// Load row template
// Load row template
- $OUT .= loadTemplate('admin_list_bank_package_row',
true
, $content);
+ $OUT .= loadTemplate('admin_list_bank_package_row',
TRUE
, $content);
} // END - while
// Load main template
} // END - while
// Load main template
- loadTemplate('admin_list_bank_package',
false
, $OUT);
+ loadTemplate('admin_list_bank_package',
FALSE
, $OUT);
} else {
// No packages found
displayMessage('{--ADMIN_BANK_NO_PACKAGES_FOUND--}');
}
// Free the result
} else {
// No packages found
displayMessage('{--ADMIN_BANK_NO_PACKAGES_FOUND--}');
}
// Free the result
-
SQL_FREERESULT
($result);
+
sqlFreeResult
($result);
// [EOF]
?>
// [EOF]
?>