- switch ($_GET['do'])
- {
- case "edit": // Change categories
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_cats SET cat='%s', visible='%s', sort=%s WHERE id=%s LIMIT 1",
- array($cat, $_POST['vis'][$id], $_POST['sort'][$id], $id), __FILE__, __LINE__);
- $TEXT = CATEGORIES_SAVED;
- break;
-
- case "del": // Delete categories
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",
- array($id), __FILE__, __LINE__);
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s",
- array($id), __FILE__, __LINE__);
- $TEXT = CATEGORIES_DELETED;
- break;
- }
+ switch (getRequestParameter('do')) {
+ case 'edit': // Change categories
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_cats` SET `cat`='%s', `visible`='%s', `sort`=%s WHERE `id`=%s LIMIT 1",
+ array(
+ $cat,
+ postRequestParameter('visible', $id),
+ postRequestParameter('sort', $id),
+ $id
+ ), __FILE__, __LINE__);
+ $TEXT = '{--ADMIN_CATEGORIES_SAVED--}';
+ break;
+
+ case 'delete': // Delete categories
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1",
+ array($id), __FILE__, __LINE__);
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s",
+ array($id), __FILE__, __LINE__);
+ $TEXT = '{--ADMIN_CATEGORIES_DELETED--}';
+ break;
+ } // END - switch