Get("NewsRel_View"); if(!is_numeric($RelView)) { $RelView = $Rel_AllValue; } else { $RelTypes = array(); if($RelView & $Bit_Categories) $RelTypes[] = 1; if($RelView & $Bit_Links) $RelTypes[] = 4; if($RelView & $Bit_News) $RelTypes[] = 2; if($RelView & $Bit_Topics) $RelTypes[] = 3; $RelFilters = array(); if(count($RelTypes)) { $TypeFilter = "rel.TargetType IN (".implode(",",$RelTypes).")"; } $RelTypes = array(); if($RelView & $Bit_OneWay) $RelTypes[] = 0; if($RelView & $Bit_Recip) $RelTypes[] = 1; if(count($RelTypes)) $RelFilters[] = "rel.Type IN (".implode(",",$RelTypes).")"; if($RelView & $Bit_Enabled) $RelFilters[] = "rel.Enabled=1"; if($RelView & $Bit_Disabled) $RelFilters[] = "rel.Enabled=0"; if(count($RelFilters)) { $RelFilter = $TypeFilter." AND (". implode(" OR ",$RelFilters).")"; } else $RelFilter = $TypeFilter; } $Perpage_Relations = (int)$objConfig->Get("Perpage_Relations"); if(!$Perpage_Relations) $PerPage_Relations = 20; $SortOrder = $objConfig->Get("NewsRelation_LV_Sortorder"); if(!strlen($SortOrder)) $SortOrder = "desc"; $SortField = $objConfig->Get("NewsRelation_LV_Sortfield"); if(!strlen($SortField)) $SortField = "ItemName"; $lang_Links = admin_language("la_Text_Links"); $lang_Articles = admin_language("la_Text_Articles"); $lang_Topics = admin_language("la_Text_Topics"); $lang_OneWay = admin_language("la_Text_OneWay"); $lang_Recip = admin_language("la_Text_Reciprocal"); $lang_ItemName = admin_language("la_ColHeader_Item"); $lang_ItemType = admin_language("la_ColHeader_ItemType"); $lang_RelType = admin_language("la_prompt_RelationType"); $lang_Relations = admin_language("la_Text_Relations"); $lang_Categories = admin_language("la_ItemTab_Categories"); print<< END; ?>