- if (!empty($_POST['menu']))
- {
- SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')",
- array(
- $_POST['menu'],
- $_POST['name'],
- $_POST['title'],
- bigintval($_POST['sort']),
- $_POST['visible'],
- $_POST['active'],
-), __FILE__, __LINE__);
+ if (isPostRequestElementSet(('menu'))) {
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')",
+ array(
+ postRequestElement('menu'),
+ postRequestElement('name'),
+ postRequestElement('title'),
+ bigintval(postRequestElement('sort')),
+ postRequestElement('visible'),
+ postRequestElement('active'),
+ ), __FILE__, __LINE__);
+ } else {
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')",
+ array(
+ postRequestElement('name'),
+ postRequestElement('title'),
+ bigintval(postRequestElement('sort')),
+ postRequestElement('visible'),
+ postRequestElement('active'),
+ ), __FILE__, __LINE__);