entityCondition(‘entity_type’, ‘node’, ‘=’)
->propertyCondition(‘type’, ‘company’, ‘=’)
->fieldCondition(‘field_code’, ‘value’, $companyId, ‘=’);
$session_ents = $query->execute();
if ($session_ents) {
$keys = array_keys($session_ents[‘node’]);
header(‘location:http://whoprofits.org/node/’.$keys[0]);
}
} elseif ($redirected_from == ‘/newsletter.php’) {
// http://whoprofits.org/Newsletter.php?nlid=80
// $newsletterId = substr($redirect_query,5);
$newsletterId = $_GET[‘nlid’];
$query = new EntityFieldQuery();
$query
->entityCondition(‘entity_type’, ‘node’, ‘=’)
->propertyCondition(‘type’, ‘newsletter’, ‘=’)
->fieldCondition(‘field_nlid’, ‘value’, $newsletterId, ‘=’);
$session_ents = $query->execute();
if ($session_ents) {
$keys = array_keys($session_ents[‘node’]);
header(‘location:http://whoprofits.org/node/’.$keys[0]);
}
}
}
?>
Dear visitor, unfortunately, the page you’re trying to open can’t be reached. This might occur as result of moving to the new website. We advise you to use the Google search in the website.
Find A Company