// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-global $link;
$ACTIONs = array();
// First fix all main menus (what="")...
$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$ACTIONs[] = $act;
// Fix weight
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='%s' WHERE id=%d LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='%s' WHERE id=%s LIMIT 1",
array($cnt, bigintval($id)), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
while (list($id) = SQL_FETCHROW($result_fix))
{
// Fix weight
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='%s' WHERE id=%d LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='%s' WHERE id=%s LIMIT 1",
array($cnt, bigintval($id)), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();