WUZZ Line 1-800-397-9633

Contests

Submitted Fri, 10/26/2012 - 11:13am by Admin

entityCondition('entity_type', 'node') ->propertyCondition('type', 'station') ->propertyCondition('title',$domain_site) ->execute(); if ($result && $result['node']){ $nodes = entity_load('node', array_keys($result['node'])); $station = current($nodes); } if ($station){ if ($station->field_alt_contest_page != NULL){ //Don't redirect if cron if(!is_cron()){ drupal_goto($station->field_alt_contest_page['und']['0']['url']); } //end if(!is_cron()) } if ($station->field_contest_rules != NULL){ if ($station->field_contest_rules['und']['0']['description']){ print 'Click here to download ' . $station->title . ' Contest Rules'; } else{ print 'Click here to download ' . $station->title . ' Contest Rules

'; } } if ($station->field_contest_rules_body){ print '

' . $station->title . ' Rules

'; print render(field_view_field('node', $station, 'field_contest_rules_body', array('label'=>'hidden'))); } if ($station->field_market != NULL){ $stationmarkets = array_values($station->field_market['und']); foreach ( $stationmarkets as $currentmarket){ $cmarketnode = node_load($currentmarket['nid']); if ($cmarketnode->field_contest_rules != NULL){ if ($cmarketnode->field_contest_rules['und']['0']['description']){ print '
Click here to download ' .$cmarketnode->field_contest_rules['und']['0']['description'] . '
'; } else { print '
Click here to download ' . $cmarketnode->title . ' Contest Rules
'; } } if ($cmarketnode->field_contest_rules_body != NULL){ print '

' . $cmarketnode->title . ' Rules

'; print render(field_view_field('node', $cmarketnode, 'field_contest_rules_body', array('label'=>'hidden'))); } } } } else{ print 'Contest Rules Vary per market, station, and contest. Please see the station site or contest page for more info.'; } ?>