define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "334");
+define('CURR_SVN_REVISION', "335");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
{
// Load sub menus
$result_sub = SQL_QUERY_ESC("SELECT what, title FROM "._MYSQL_PREFIX."_sponsor_menu
-WHERE action='%s' AND what != '' ".$WHERE."
+WHERE action='%s' AND what != '' AND what IS NOT NULL ".$WHERE."
ORDER BY sort", array($action), __FILE__, __LINE__);
if (SQL_NUMROWS($result_sub) > 0)
{
}
$OUT .= "</NOBR></TD>
</TR>\n";
- $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' ORDER BY sort, id DESC",
+ $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort, id DESC",
array($menu), __FILE__, __LINE__);
if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu))
{
// Load sub menus :)
foreach ($menus as $key_main => $value_main)
{
- $result = SQL_QUERY_ESC("SELECT what, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' ORDER BY sort",
+ $result = SQL_QUERY_ESC("SELECT what, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
array($value_main), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
if (!empty($SUB))
{
// Sub menus of a main menu
- $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' ORDER BY sort ASC",
+ $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort ASC",
array($SUB), __FILE__, __LINE__);
}
else
// Load all what menu points
$result = SQL_QUERY("SELECT id, what, title
FROM "._MYSQL_PREFIX."_guest_menu
- WHERE action='main' AND what != '' AND locked='N'
+ WHERE action='main' AND what != '' AND what IS NOT NULL AND locked='N'
ORDER BY sort", __FILE__, __LINE__);
$SW = 2; $OUT = ""; $atitle = "";
{
$result = SQL_QUERY_ESC("SELECT what, title, sort
FROM "._MYSQL_PREFIX."_guest_menu
-WHERE action='%s' AND what != '' ORDER BY sort",
+WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
array(bigintval($value_main)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
else
{
// List sub menus
- $query = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_guest_menu WHERE action='%s' AND what != '' ORDER BY sort ASC",
+ $query = 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",
array($SUB), __FILE__, __LINE__);
}
if (!empty($SUB))
{
// Edit sub menus
- $result = SQL_QUERY("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND what != '' ORDER BY sort ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND what != '' AND what IS NOT NULL ORDER BY sort ASC", __FILE__, __LINE__);
}
else
{
// Now sort every each menu
foreach ($ACTIONS as $act)
{
- $result_fix = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE act='".$act."' AND what != '' ORDER BY sort", __FILE__, __LINE__);
+ $result_fix = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE act='".$act."' AND what != '' AND what IS NOT NULL ORDER BY sort", __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix))
{
// Now sort every each menu
foreach ($ACTIONs as $act)
{
- $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' ORDER BY sort",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
array($act), __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix))
// Now sort every each menu
foreach ($ACTIONS as $act)
{
- $result_fix = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_guest_menu WHERE act='".$act."' AND what != '' ORDER BY sort", __FILE__, __LINE__);
+ $result_fix = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_guest_menu WHERE act='".$act."' AND what != '' AND what IS NOT NULL ORDER BY sort", __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix))
{
// Now sort every each menu
foreach ($ACTIONS as $act)
{
- $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_guest_menu WHERE action='%s' AND what != '' ORDER BY sort",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_guest_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
array($act), __FILE__, __LINE__);
$cnt = 1;
// Now sort every each menu
foreach ($ACTIONS as $act)
{
- $result_fix = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE action='".$act."' AND what != '' ORDER BY sort", __FILE__, __LINE__);
+ $result_fix = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE action='".$act."' AND what != '' AND what IS NOT NULL ORDER BY sort", __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix))
{
// Now sort every each menu
foreach ($ACTIONS as $act)
{
- $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE action='%s' AND what != '' ORDER BY sort",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
array($act), __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix))
// Load menu header template
LOAD_TEMPLATE($MODE."_menu_title", false, $content);
- $result_sub = SQL_QUERY_ESC("SELECT title, what FROM "._MYSQL_PREFIX."_%s_menu WHERE action='%s' AND what != '' ".$AND." ORDER BY sort",
+ $result_sub = SQL_QUERY_ESC("SELECT title, what FROM "._MYSQL_PREFIX."_%s_menu WHERE action='%s' AND what != '' AND what IS NOT NULL".$AND." ORDER BY sort",
array($MODE, $main_action), __FILE__, __LINE__);
$ctl = SQL_NUMROWS($result_sub);
if ($ctl > 0) {