foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$count++;
- $result = SQL_QUERY_ESC("SELECT `title`, `action`, `what` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+ $result = sqlQueryEscaped("SELECT `title`, `action`, `what` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
+ if (sqlNumRows($result) == 1) {
// Entry found so we load the stuff...
- $content = SQL_FETCHARRAY($result);
+ $content = sqlFetchArray($result);
// Prepapre content
$content = array(
}
// Free result and switch color
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
} // END - if
} // END - foreach
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$count++;
- $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+ $result = sqlQueryEscaped("SELECT `title` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
+ if (sqlNumRows($result) == 1) {
// Entry found so we load the stuff...
- $content = SQL_FETCHARRAY($result);
+ $content = sqlFetchArray($result);
$content = array(
'count' => $count,
'menu' => $content['title'],
);
$OUT .= loadTemplate('admin_menu_404_row', TRUE, $content);
}
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
} // END - if
} // END - foreach
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$count++;
- $result = SQL_QUERY_ESC("SELECT `title`, `visible`, `locked` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+ $result = sqlQueryEscaped("SELECT `title`, `visible`, `locked` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
+ if (sqlNumRows($result) == 1) {
// Entry found so we load the stuff...
- $content = SQL_FETCHARRAY($result);
+ $content = sqlFetchArray($result);
$content = array(
'count' => $count,
'menu' => $content['title'],
$OUT .= loadTemplate('admin_menu_404_row', TRUE, $content);
}
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
} // END - if
} // END - foreach
// By default list menus
if (empty($subMenu)) {
// List only main menus
- $result = SQL_QUERY("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
+ $result = sqlQuery("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
} else {
// List sub menus
- $result = SQL_QUERY_ESC("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
+ $result = sqlQueryEscaped("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
array($subMenu), __FILE__, __LINE__);
}
// Are there entries?
- if (!SQL_HASZERONUMS($result)) {
+ if (!ifSqlHasZeroNums($result)) {
// Init variables
$count = '0';
$OUT = '';
// Process all menu entries
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($content = sqlFetchArray($result)) {
// Set sub value
$content['sub'] = $subMenu;
if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
$NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']+1) . '&fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
- } elseif (SQL_NUMROWS($result) == $count) {
+ } elseif (sqlNumRows($result) == $count) {
// Is lowest position
$NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']-1) . '&fid=' . $content['sort'] . '%}">{--HIGHER--}</a>';
} elseif ($content['sort'] > 0) {
$content['sub'] = $subMenu;
// Free memory
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
// Load template
loadTemplate('admin_edit_guest_menu', FALSE, $content);