include_once("server.php");
$schs=array(
"306"=>"Bogue Sound Elementary",
"308"=>"Beaufort Elementary",
"316"=>"Harkers Island Elementary School",
"322"=>"Morehead City Primary",
"324"=>"Newport Elementary School",
"332"=>"Smyrna Elementary",
"3322"=>"Smyrna Middle",
"352"=>"White Oak Elementary School",
"304"=>"Atlantic Elementary School",
"3042"=>"Atlantic Middle School",
"317"=>"Morehead Elementary School",
"310"=>"Beaufort Middle School",
"311"=>"Broad Creek Middle School",
"313"=>"East Carteret High School",
"314"=>"Croatan High School",
"318"=>"Morehead City Middle School",
"326"=>"Newport Middle School",
"344"=>"West Carteret High School",
"160"=>"Bridges Alternative"
);
if($_POST[school_num]){
$nnm=$_POST[school_num];
$title="$schs[$nnm] Results";
}
else{ $title="County Wide"; }
function get_results($race){
if($_POST[school_num]){
$votes="sch_$_POST[school_num]";
}
else { $votes="votes"; }
$re=mysql_query("select * from vote where race='$race' order by votes desc");
if(mysql_errno()=="0"){
$bg=false;
for ($i=mysql_num_rows($re)-1; $i>=0; $i--){
if(!($row=mysql_fetch_assoc($re)))
continue;
if($bg){
print "
| |
 |
2004
Election Results |
|
| print $title; ?> |
| |
|
|
| |
|
| Presidential Race |
|
| Candidate |
Votes |
get_results("pres"); ?>
| |
|
|
| |
|
|
| US Senate |
|
| Candidate |
Votes |
get_results("senate"); ?>
|
|
| US House |
|
| Candidate |
Votes |
get_results("congress"); ?>
|
| |
|
|
| Govenor |
|
| Candidate |
Votes |
get_results("gov"); ?>
|
|
| Lieutenant
Governor |
|
| Candidate |
Votes |
get_results("ltgov"); ?>
|
| |
|
|
| NC
Senate |
|
| Candidate |
Votes |
get_results("ncsenate"); ?>
|
|
| NC House |
|
| Candidate |
Votes |
get_results("nchouse"); ?>
|
| |
|
|
| Secretary of State |
|
| Candidate |
Votes |
get_results("sos"); ?>
|
|
| Attorney
General |
|
| Candidate |
Votes |
get_results("attgen"); ?>
|
| |
|
|
| State Auditor |
|
| Candidate |
Votes |
get_results("audit"); ?>
|
|
| Commissioner of Insurance |
|
| Candidate |
Votes |
get_results("comins"); ?>
|
| |
|
|
| State Treasurer |
|
| Candidate |
Votes |
get_results("treas"); ?>
|
|
| Commissioner of Labor |
|
| Candidate |
Votes |
get_results("labor"); ?>
|
| |
|
|
| County
Commissioners District 3 |
|
| Candidate |
Votes |
get_results("county"); ?>
|
|
| County
Commissioners District 4 |
|
| Candidate |
Votes |
get_results("d4"); ?>
|
| |
|
|
| County
Commissioners District 5 |
|
| Candidate |
Votes |
get_results("d5"); ?>
|
|
| Superintendent of Public
Instruction |
|
| Candidate |
Votes |
get_results("spi"); ?>
|
| |
|
|
| Commissioner of Agriculture
and Consumer Services |
|
| Candidate |
Votes |
get_results("agra"); ?>
|
|
| Soil
and Water Conservation Board |
|
| Candidate |
Votes |
get_results("swcb"); ?>
|
| |
|
|
| NC
Supreme Court |
|
| Candidate |
Votes |
get_results("ncsc"); ?>
|
|
| Court
of Appeals |
|
| Candidate |
Votes |
get_results("ncsc1"); ?>
|
| |
|
| |
| Court
of Appeals |
|
| Candidate |
Votes |
get_results("ncsc2"); ?>
|
| |
|
|
| Court
of Appeals |
|
| Candidate |
Votes |
get_results("ncoa3"); ?>
|
|
| Court
of Appeals |
|
| Candidate |
Votes |
get_results("ncoa"); ?>
|
| |
|
|
| District 3 Judge |
|
| Candidate |
Votes |
get_results("ncoa5"); ?>
|
|
| District 3 Judge |
|
| Candidate |
Votes |
get_results("ncoa4"); ?>
|
| |
|
|
| District 3 Judge |
|
| Candidate |
Votes |
get_results("ncoa7"); ?>
|
|
| District 3 Judge |
|
| Candidate |
Votes |
get_results("ncoa6"); ?>
|
| |
|
|
| District 3 Judge |
|
| Candidate |
Votes |
get_results("ncoa8"); ?>
|
|
| BOND
REFERENDUM 1 |
|
| Candidate |
Votes |
get_results("bd1"); ?>
|
| |
|
|
| BOND
REFERENDUM 2 |
|
| Candidate |
Votes |
get_results("bd2"); ?>
|
|
| BOND
REFERENDUM 3 |
|
| Candidate |
Votes |
get_results("bd3"); ?>
|
| |
|
|
 |
| |
|
|