include_once('/var/www/staging/themes/supernova/template.php');
//drupal_add_js(drupal_get_path('module','liveblog') . '/liveblog-remote.js');
/************************************
* Enter values here
************************************/
$last_update = "9:51 p.m.; final results.";
$dems = array(
'Clinton' => 68,
‘Obama’ => 188,
‘Other’ => 4
);
$gop = array(
‘McCain’ => 27,
‘Romney’ => 9,
‘Paul’ => 10,
‘Huckabee’ => 2,
‘Other’ => 1,
);
$del_last_update = “Feb. 19, 2008 at 10:22 p.m.”;
$dems_delegates = array(
‘Obama’ => 1294,
‘Clinton’ => 1218,
‘Edwards’ => 26,
‘Uncommitted’ => 64
);
$gop_delegates = array(
‘McCain’ => 921,
‘Romney’ => 253,
‘Huckabee’ => 245,
‘Paul’ => 14,
‘Uncommitted’ => 26
);
$dems_tompkins = array(
‘Clinton’ => 6593,
‘Obama’ => 4647,
‘Other’ => 303,
);
$gop_tompkins = array(
‘McCain’ => 1927,
‘Romney’ => 1093,
‘Huckabee’ => 540,
‘Paul’ => 337,
‘Other’ => 151,
);
/***********************************
* End configuration stuff
***********************************/
$dems_colors = array(‘0000FF’, ‘4169FF’, ‘4682B4′, ’87CEEB’, ‘B0E0E6’, ‘AFEEEE’, ’48D1CC’);
$gop_colors = array(‘FF0000’, ‘FF6347’, ‘FF4500’, ‘F08080’, ‘CD5C5C’, ‘B22222’, ‘DC143C’);
/**********************
* UPDATE THESE VARIABLES
*/
$ad_fullbanner_unit_num = 418; //UPDATE THIS with the proper taxonomy ID for the full banner group
$ad_medrect_top_unit_num = 420; //UPDATE THIS with the proper taxonomy ID for the top med rect group
$ad_medrect_bot_unit_num = 419; //UPDATE THIS with the proper taxonomy ID for the bottom med rect group
$adsense_unit = 1; //UPDATE THIS with the proper unit ID from the AdSense module
$adsense_channel = 2; //UPDATE THIS with the proper channel ID for this section from the AdSense module
global $user;
$mustrun_tid = variable_get(‘mustrun_term’, 0);
$exclusion_list = array(704, $mustrun_tid);
$elections_tid = array(61, 724, 578, 560,843);
$liveblog_nid = 27296;
$result = db_query_range(“SELECT DISTINCT n.nid
FROM term_node t
JOIN node n ON t.nid = n.nid
LEFT JOIN sunweight s ON n.nid = s.nid
WHERE tid IN (%s)
AND t.nid NOT IN (SELECT nid FROM {term_node} WHERE tid IN (%s))
AND n.status=1
ORDER BY n.created DESC, s.weight ASC”,
implode(‘,’,$elections_tid), implode(‘,’,$exclusion_list), 0, 9);
$stories = array();
while($info = db_fetch_object($result)) {
$stories[] = node_load($info->nid);
}
//build the charts for the delegate count here
$dems_del_names = array();
foreach($dems_delegates as $candidate => $tally) {
$dems_del_names[] = $candidate . “: ” . $tally;
}
$dems_delegate_chart = array(
‘#chart_id’ => ‘election08_delegates_dems’,
‘#type’ => CHART_TYPE_PIE,
‘#labels’ => $dems_del_names,
‘#data_colors’ => $dems_colors,
‘#size’ => chart_size(335,137),
‘#data’ => $dems_delegates
);
$gop_del_names = array();
foreach($gop_delegates as $candidate => $tally) {
$gop_del_names[] = $candidate . “: ” . $tally;
}
$gop_delegate_chart = array(
‘#chart_id’ => ‘election08_delegates_gop’,
‘#type’ => CHART_TYPE_PIE,
‘#labels’ => $gop_del_names,
‘#data_colors’ => $gop_colors,
‘#size’ => chart_size(335,137),
‘#data’ => $gop_delegates
);
?>
Super Tuesday Results
State
|
Democrats | Republicans |
Ala.
|
Obama
|
Huckabee
|
Alaska
|
Obama
|
Romney
|
Ariz.
|
Clinton
|
McCain
|
Ark.
|
Clinton
|
Huckabee
|
Calif.
|
Clinton
|
McCain
|
Colo.
|
Obama
|
Romney
|
Conn.
|
Obama
|
McCain
|
Del.
|
Obama
|
McCain
|
Ga.
|
Obama
|
Huckabee
|
Idaho
|
Obama
|
–
|
Ill.
|
Obama
|
McCain
|
Kan.
|
Obama
|
–
|
Mass.
|
Clinton
|
Romney
|
Minn.
|
Obama
|
Romney
|
Mo.
|
Obama
|
McCain
|
Mont.
|
–
|
Romney
|
N.J.
|
Clinton
|
McCain
|
N.M.
|
–
|
|
N.Y.
|
Clinton
|
McCain
|
N.D.
|
Obama
|
Romney
|
Okla.
|
Clinton
|
McCain
|
Tenn.
|
Clinton
|
Huckabee
|
Utah
|
Obama
|
Romney
|
W.Va.
|
–
|
Huckabee
|
Sun Exit Poll Results
$tally) {
$dems_total += $tally;
$dems_names[] = $candidate;
}
if($dems_total > 0) {
foreach($dems as $candidate => $tally)
$dems[$candidate] = $tally / $dems_total;
}
$gop_names = array();
$gop_total = 0;
foreach($gop as $candidate => $tally) {
$gop_total += $tally;
$gop_names[] = $candidate;
}
if($gop_total > 0) {
foreach($gop as $candidate => $tally)
$gop[$candidate] = $tally / $gop_total;
}
if($dems_total > 0 && $gop_total > 0) {
$chart = array(
‘#chart_id’ => ‘election08_exitpoll_dems’,
‘#type’ => CHART_TYPE_PIE,
‘#labels’ => $dems_names,
‘#data_colors’ => $dems_colors,
‘#data’ => $dems
);
echo chart_render($chart) . ‘
‘;
$chart = array(
‘#chart_id’ => ‘election08_exitpoll_gop’,
‘#type’ => CHART_TYPE_PIE,
‘#labels’ => $gop_names,
‘#data_colors’ => $gop_colors,
‘#data’ => $gop
);
echo chart_render($chart);
}
?>
Last Update: =$last_update;?> These results are from voter responses at four polling locations at or near Cornell, and are not scientific.
Tompkins County Returns
Democrats | |
---|---|
Obama | 6,593 |
Clinton | 4,647 |
Republicans | |
McCain | 1,927 |
Romney | 1,093 |
Huckabee | 540 |
Paul | 337 |
//upper medium rectangle ad unit
if(!module_exists('ad') || supernova_num_ads($ad_medrect_top_unit_num) <= 0) {
print adsense_display('300x250', $adsense_unit, $adsense_channel);
} else {
print ad($ad_medrect_top_unit_num,1);
}
echo '
‘;
//popular stories block
$block = module_invoke(‘views’, ‘block’, ‘view’, ‘popular_election08’);
echo ‘
‘ . $block[‘subject’] . ‘
‘;
echo $block[‘content’] . ‘
‘;
//lower medium rectangle ad unit
if(!module_exists(‘ad’) || supernova_num_ads($ad_medrect_bot_unit_num) <= 0) {
print adsense_display('300x250', $adsense_unit, $adsense_channel);
} else {
print ad($ad_medrect_bot_unit_num,1);
}
?>
The Candidates on the Issues
2008 Primary and Caucus Results
Delegate Counts
=chart_render($dems_delegate_chart);?> | =chart_render($gop_delegate_chart);?> |
Needed to Win: 2,025 | Needed to Win: 1,191 |
Results from the Associated Press. Last updated: =$del_last_update;?>.
Election 2008 Coverage
=l(filter_xss($stories[0]->title), ‘node/’.$stories[0]->nid);?>
if($stories[0]->uid != 0) { ?>
} ?>
if(!module_exists('ad') || supernova_num_ads($ad_fullbanner_unit_num) <= 0) { print adsense_display('468x60', $adsense_unit, $adsense_channel); } else { print ad($ad_fullbanner_unit_num,1); } ?>
for($i = 1; $i < count($stories); $i++) { ?>
=l(filter_xss($stories[$i]->title), ‘node/’.$stories[$i]->nid);?>
if($stories[$i]->uid != 0) { ?>
} ?>
} ?>
=l('See all Election 2008 Coverage in The Sun', 'specials/election2008/all');?>…