hello
I need to hide a page on the rating if the value entered in the field Activated =0
and Page appears, if the value entered in the field Activated =1
Try this code but the page disappear with both values 0 and 1
function MenuItem_Adding(&$Item) {
//var_dump($Item);
// Return False if menu item not allowed
if (CurrentUserLevel() <> 3 && CurrentUserLevel() <> -1 && $Item->Url == "programslist.php") {
ew_AddFilter($filter, " Activated <> 0 ");
return FALSE;
} else {
return TRUE;
}
}
Try this code and disappeared all visitors:
Note that visitors : (userlevels =0 Default) and ( userlevels =-2 Anonymous)
function MenuItem_Adding(&$Item) {
//var_dump($Item);
// Return False if menu item not allowed
if (CurrentUserLevel() <> 3 && CurrentUserLevel() <> -1 && $Item->Url == "programslist.php") {
$a= "SELECT * FROM programs WHERE Activated = 0";
return FALSE;
} else {
return TRUE;
}
}