win32 to unix line delimiters changed
[mailer.git] / 0.2.1 / inc / modules / admin / what-list_bank_package.php
index 053fe1e7674e310063b4d422d321b2dd25d58db7..c4105ef928b3c8861053bb4dfeefde77a74bf21f 100644 (file)
@@ -1,99 +1,99 @@
-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1                                    Start: 02/12/2004 *\r
- * ================                             Last change: 02/12/2004 *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * File              : what-list_bank_package.php                       *\r
- * -------------------------------------------------------------------- *\r
- * Short description : List packages                                    *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung  : Listet Angebotspakete auf                        *\r
- * -------------------------------------------------------------------- *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *\r
- * For more information visit: http://www.mxchange.org                  *\r
- *                                                                      *\r
- * This program is free software; you can redistribute it and/or modify *\r
- * it under the terms of the GNU General Public License as published by *\r
- * the Free Software Foundation; either version 2 of the License, or    *\r
- * (at your option) any later version.                                  *\r
- *                                                                      *\r
- * This program is distributed in the hope that it will be useful,      *\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *\r
- * GNU General Public License for more details.                         *\r
- *                                                                      *\r
- * You should have received a copy of the GNU General Public License    *\r
- * along with this program; if not, write to the Free Software          *\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *\r
- * MA  02110-1301  USA                                                  *\r
- ************************************************************************/\r
-\r
-// Some security stuff...\r
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {\r
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
-       require($INC);\r
-}\r
-\r
-// Add description as navigation point\r
-ADD_DESCR("admin", basename(__FILE__));\r
-\r
-// Check if there is enougth selected\r
-$show = true;\r
-if ((isset($_POST['id'])) && (is_array($_POST['id'])) && (count($_POST['id']) > 0)) {\r
-       // Okay, which button was pressed?\r
-       if (isset($_POST['change'])) {\r
-               // Change permissions\r
-               ADMIN_CHANGE_ACTIVATION_STATUS($_POST['id'], "bank_packages", "package_active");\r
-       } elseif (isset($_POST['delete'])) {\r
-               // Delete entries (with confirmation)\r
-               ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "bank_packages", "package_active", array("id", "title", "description", "account_fee"), array("bigintval", "", "", "TRANSLATE_COMMA"));\r
-               $show = false;\r
-       } elseif (isset($_POST['remove'])) {\r
-               // Delete entries (with confirmation)\r
-               ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "bank_packages", "package_active", array(), array(), true);\r
-       }\r
-}\r
-\r
-// Skip showing old entries?\r
-if (!$show) return;\r
-\r
-// Load all banking packages from DB\r
-$result = SQL_QUERY("SELECT id, title, description, account_fee AS 'fee', package_active AS 'active', interest_plus AS 'plus', interest_minus AS 'minus'\r
-FROM "._MYSQL_PREFIX."_bank_packages\r
-ORDER BY id", __FILE__, __LINE__);\r
-\r
-// Is there at lease one package?\r
-if (SQL_NUMROWS($result) > 0) {\r
-       // List all packages\r
-       $OUT = ""; $SW = 2;\r
-       while ($content = SQL_FETCHARRAY($result)) {\r
-               // "Translate" some data\r
-               $content['active'] = TRANSLATE_YESNO($content['active']);\r
-               $content['fee']    = TRANSLATE_COMMA($content['fee']);\r
-               $content['plus']   = TRANSLATE_COMMA($content['plus']);\r
-               $content['minus']  = TRANSLATE_COMMA($content['minus']);\r
-               $content['sw']     = $SW;\r
-\r
-               // Load row template\r
-               $OUT .= LOAD_TEMPLATE("admin_list_bank_package_row", true, $content);\r
-               $SW = 3 - $SW;\r
-       }\r
-\r
-       // Prepare row(s) for output to template\r
-       define('__BANK_PACKAGE_ROWS', $OUT);\r
-\r
-       // Load main template\r
-       LOAD_TEMPLATE("admin_list_bank_package");\r
-} else {\r
-       // No packages found!\r
-       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BANK_NO_PACKAGES_FOUND);\r
-}\r
-\r
-// Free the result\r
-SQL_FREERESULT($result);\r
-\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 02/12/2004 *
+ * ================                             Last change: 02/12/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-list_bank_package.php                       *
+ * -------------------------------------------------------------------- *
+ * Short description : List packages                                    *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Listet Angebotspakete auf                        *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.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 *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+// Check if there is enougth selected
+$show = true;
+if ((isset($_POST['id'])) && (is_array($_POST['id'])) && (count($_POST['id']) > 0)) {
+       // Okay, which button was pressed?
+       if (isset($_POST['change'])) {
+               // Change permissions
+               ADMIN_CHANGE_ACTIVATION_STATUS($_POST['id'], "bank_packages", "package_active");
+       } 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"));
+               $show = false;
+       } elseif (isset($_POST['remove'])) {
+               // Delete entries (with confirmation)
+               ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "bank_packages", "package_active", array(), array(), true);
+       }
+}
+
+// Skip showing old entries?
+if (!$show) return;
+
+// Load all banking packages from DB
+$result = SQL_QUERY("SELECT id, title, description, account_fee AS 'fee', package_active AS 'active', interest_plus AS 'plus', interest_minus AS 'minus'
+FROM "._MYSQL_PREFIX."_bank_packages
+ORDER BY id", __FILE__, __LINE__);
+
+// Is there at lease one package?
+if (SQL_NUMROWS($result) > 0) {
+       // List all packages
+       $OUT = ""; $SW = 2;
+       while ($content = SQL_FETCHARRAY($result)) {
+               // "Translate" some data
+               $content['active'] = TRANSLATE_YESNO($content['active']);
+               $content['fee']    = TRANSLATE_COMMA($content['fee']);
+               $content['plus']   = TRANSLATE_COMMA($content['plus']);
+               $content['minus']  = TRANSLATE_COMMA($content['minus']);
+               $content['sw']     = $SW;
+
+               // Load row template
+               $OUT .= LOAD_TEMPLATE("admin_list_bank_package_row", true, $content);
+               $SW = 3 - $SW;
+       }
+
+       // Prepare row(s) for output to template
+       define('__BANK_PACKAGE_ROWS', $OUT);
+
+       // Load main template
+       LOAD_TEMPLATE("admin_list_bank_package");
+} else {
+       // No packages found!
+       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BANK_NO_PACKAGES_FOUND);
+}
+
+// Free the result
+SQL_FREERESULT($result);
+
+//
+?>