// Init variable to avoid a notice
$CATS = '';
-if (isPostRequestElementSet('add')) {
+if (isPostRequestParameterSet('add')) {
// Add a new category
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `cat`='%s' LIMIT 1",
- array(postRequestElement('catname')), __FILE__, __LINE__);
+ array(postRequestParameter('catname')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == '0') {
// Category does not exists, we simply add it...
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (`cat`, `visible`, `sort`) VALUES ('%s','%s','%s')",
array(
- postRequestElement('catname'),
- postRequestElement('visible'),
- bigintval(postRequestElement('parent') + 1)
+ postRequestParameter('catname'),
+ postRequestParameter('visible'),
+ bigintval(postRequestParameter('parent') + 1)
), __FILE__, __LINE__);
$content = getMessage('CATEGORY_ADDED');
} else {
// Display message
loadTemplate('admin_settings_saved', false, $content);
-} elseif ((isFormSent()) && (isPostRequestElementSet('id')) && (is_array(postRequestElement('id')))) {
+} elseif ((isFormSent()) && (isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id')))) {
// Change or delete categories...
$TEXT = '';
- foreach (postRequestElement('id') as $id => $cat) {
+ foreach (postRequestParameter('id') as $id => $cat) {
// Secure id
$id = bigintval($id);
// Is the entry set?
if (!empty($cat)) {
- switch (getRequestElement('do')) {
+ 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,
- postRequestElement('vis', $id),
- postRequestElement('sort', $id),
+ postRequestParameter('vis', $id),
+ postRequestParameter('sort', $id),
$id
), __FILE__, __LINE__);
$TEXT = getMessage('CATEGORIES_SAVED');
// Display message
loadTemplate('admin_settings_saved', false, $TEXT);
} // END - if
-} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) {
+} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0)) {
// Delete categories
$OUT = ''; $SW = 2;
- foreach (postRequestElement('sel') as $id => $value) {
+ foreach (postRequestParameter('sel') as $id => $value) {
// Load data of category
$result = SQL_QUERY_ESC("SELECT `cat` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
// Load main template
loadTemplate('admin_del_cats', false, $OUT);
-} elseif ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) {
+} elseif ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) {
// Edit categories
$OUT = ''; $SW = 2;
- foreach (postRequestElement('sel') as $id => $value) {
+ foreach (postRequestParameter('sel') as $id => $value) {
// Load data from the category
$result = SQL_QUERY_ESC("SELECT cat, visible, sort FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);