if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
+} // END - if
// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
if (isset($_POST['change'])) {
// Change permissions
ADMIN_CHANGE_ACTIVATION_STATUS($_POST['id'], "bank_packages", "package_active");
+ } elseif (isset($_POST['edit'])) {
+ // Delete entries (with confirmation)
+ ADMIN_EDIT_ENTRIES_CONFIRM(
+ $_POST['id'],
+ "bank_packages",
+ "package_active",
+ array("id", "title", "description", "account_fee", "free_transfers", "transfer_fee", "output_system_mode", "package_active", "free_months_no_fee", "interest_plus", "interest_minus", "first_payment", "free_account_income", "free_account_stuff", "tan_lock"),
+ array("bigintval", "", "", "TRANSLATE_COMMA", "bigintval", "TRANSLATE_COMMA", "", "", "bigintval", "TRANSLATE_COMMA", "TRANSLATE_COMMA", "TRANSLATE_COMMA", "TRANSLATE_COMMA", "", "bigintval")
+ );
+ $show = false;
+ } elseif (isset($_POST['do_edit'])) {
+ // Delete entries (with confirmation)
+ ADMIN_EDIT_ENTRIES_CONFIRM($_POST['id'], "bank_packages", "package_active", array(), array(), true);
} elseif (isset($_POST['delete'])) {
// Delete entries (with confirmation)
ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "bank_packages", "package_active", array("id", "title", "description", "account_fee"), array("bigintval", "", "", "TRANSLATE_COMMA"));
// Delete entries (with confirmation)
ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "bank_packages", "package_active", array(), array(), true);
}
-}
+} // END - if
// Skip showing old entries?
if (!$show) return;
// Load row template
$OUT .= LOAD_TEMPLATE("admin_list_bank_package_row", true, $content);
$SW = 3 - $SW;
- }
+ } // END - while
// Prepare row(s) for output to template
define('__BANK_PACKAGE_ROWS', $OUT);