Live News:

While waiting, KVD threw out a line in a likely looking spot of the new pool.

db->select($selects) ->join("exp_channels", "exp_channel_data.channel_id = exp_channels.channel_id", "INNER") ->join("exp_channel_titles", "exp_channel_data.entry_id = exp_channel_titles.entry_id", "INNER") ->where(array( "exp_channel_titles.status" => "open", "exp_channels.channel_name" => "advertisements", "exp_channel_data.field_id_149 <=" => $todays_time, "exp_channel_data.field_id_150 >=" => $todays_time, )) ->order_by('RAND()') //->limit(1) ->get("exp_channel_data"); $locations = array(); $results = $results->result_object(); foreach($results as $idx => $r): $locs = explode("|", $r->locations); foreach($locs as $loc): if ( ! isset ( $locations[$loc] ) ): $locations[$loc] = array(); endif; $locations[$loc][] = $r; endforeach; $results[$idx]->impression_js = str_replace('[timestamp]', time(), $results[$idx]->impression_js); $results[$idx]->ad_image = str_replace('{filedir_15}', '/assets/img/ads/', $results[$idx]->ad_image); endforeach; return ( isset($locations[$location]) ? $locations[$location] : array() ); } endif; ?>