public function getmodulescounts_forgroups($groupids){
		if(!$db=BFactory::getDBO()){
			return array();
			}
		$qr='select count(pageid)as cnt,pageid from soft_modules_rules ';
		$qr.=' where pageid in ('.implode(',',$groupids).')';
		$qr.='group by pageid';
		$q=$db->Query($qr);
		$counts=array();
		while($l=$db->fetch($q)){
			$counts[$l['pageid']]=$l['cnt'];
			}
		return $counts;
		}