//get dues info and set background color to green for current year, yellow last year, violet 2 years back
$memberstatus = ” “;
$id = $myrow[“contact_id”];
$result1 = mysql_query(“SELECT *, dues_year FROM dues, contact WHERE dues_id=$id ORDER BY dues_year DESC LIMIT 1”,$db) or die (“Query failed, error message = ” . mysql_error ());
if ($myrow1 = mysql_fetch_array($result1)) {
if ($myrow1[“dues_amount”] > 0) {
if ($myrow[“contact_type_of”] == “OW” || $myrow[“contact_type_of”] == “CO”) $memberstatus = $myrow1[“dues_year”];
if ($myrow[“contact_type_of”] == “AM”) $memberstatus = $myrow1[“dues_year”];
}
}
$bgcolor=”#ffffff”;
if ($memberstatus==$this_yr ) {$bgcolor=”#C2FFC2″;}
if ($memberstatus==$this_yr-1 ) {$bgcolor=”#ffff99″;}
if ($memberstatus==$this_yr-2 ) {$bgcolor=”#ffccff”;}
// echo “
” . ($myrow[“contact_hullno”]==’999′?” “:$hullnumber).” |
” ;
if (!$myrow[contact_email] | $myrow[contact_email]==”None” | !$authorized) {
echo “
” . $myrow[“contact_first”] . ” ” . $myrow[“contact_last”];
} else {
echo “
| “.$myrow[“contact_first”].” “.$myrow[“contact_last”].” “.$myrow[“contact_phone”].” |
“;
}
echo “
“.$myrow[“contact_type_of”].” |
“;
// This gets PO boat name from contact list, else use the hull list name
if ($myrow[‘contact_boatname’]) {
echo “
“.$myrow[“contact_boatname”].” |
“;
} else {
echo “
“.$myrow[“hull_boatname”].” Shirt Size: “.$myrow[“contact_2015nashirt”].” |
“; }
// This gets PO sail number from contact list, else use the hull list name
if ($myrow[‘contact_sailno’]) {
echo “
“.$myrow[“contact_sailno”].” |
“;
} else {
echo “
“.$myrow[“hull_sailno”].” |
“; }
// echo “
“.$myrow[“hull_sailno”].” |
“;
echo “
“;
echo $myrow[“contact_city”];
echo ” |
“;
echo “
“;
$ContactState=$myrow[“contact_state”];
echo $ContactState;
echo ” |
“;
$ContactCountry=$myrow[“contact_country”];
if ($ContactCountry==”” || $ContactCountry==”00″ || $ContactCountry==”UNITED STATES” || $ContactCountry==” ” || $ContactCountry==”USA”) { $ContactCountry=”USA”;
}
if ($ContactCountry==”ITL” || $ContactCountry==”ITALY”) { $ContactCountry=”ITL”;
}
if ($ContactCountry==”IRL” || $ContactCountry==”IRELAND”) { $ContactCountry=”IRL”;
}
if ($ContactCountry==”NOR” || $ContactCountry==”NORWAY”) { $ContactCountry=”NOR”;
}
if ($ContactCountry==”GBR” || $ContactCountry==”UNITED KINGDOM”) { $ContactCountry=”GBR”;
}
if ($ContactCountry==”FRA” || $ContactCountry==”FRANCE”) { $ContactCountry=”FRA”;
}
if ($ContactCountry==”NLD” || $ContactCountry==”NETHERLANDS” || $ContactCountry==”NED”) { $ContactCountry=”NED”;
}
if ($ContactCountry==”SUI” || $ContactCountry==”SWITZERLAND”) { $ContactCountry=”SUI”;
}
if ($ContactCountry==”CAN” || $ContactCountry==”CANADA”) { $ContactCountry=”CAN”;
}
if ($ContactCountry==”ESP” || $ContactCountry==”SPAIN”) { $ContactCountry=”ESP”;
}
if ($ContactCountry==”PHL” || $ContactCountry==”PHILIPPINES”) { $ContactCountry=”PHL”;
}
if ($ContactCountry==”HKG” || $ContactCountry==”HONG KONG”) { $ContactCountry=”HKG”;
}
if ($ContactCountry==”AUS” || $ContactCountry==”AUSTRALIA”) { $ContactCountry=”AUS”;
}
if ($ContactCountry==”SWE” || $ContactCountry==”SWEDEN”) { $ContactCountry=”SWE”;
}
if ($ContactCountry==”FIN” || $ContactCountry==”FINLAND”) { $ContactCountry=”FIN”;
}
if ($ContactCountry==”DEU” || $ContactCountry==”GERMANY”) { $ContactCountry=”DEU”;
}
if ($ContactCountry==”MLT” || $ContactCountry==”MALTA”) { $ContactCountry=”MLT”;
}
if ($ContactCountry==”BLG” || $ContactCountry==”BELGIUM”) { $ContactCountry=”BLG”;
}
if ($ContactCountry==”BER” || $ContactCountry==”BERMUDA”) { $ContactCountry=”BER”;
}
if ($ContactCountry==”PRI” || $ContactCountry==”PUERTO RICO”) { $ContactCountry=”PRI”;
}
if ($ContactCountry==”CHL” || $ContactCountry==”CHILE”) { $ContactCountry=”CHL”;
}
if ($ContactCountry==”MEX” || $ContactCountry==”MEXICO”) { $ContactCountry=”MEX”;
}
if ($ContactCountry==”JPN” || $ContactCountry==”JAPAN”) { $ContactCountry=”JPN”;
}
echo “
$ContactCountry |
“;
// This gets PO homeport from contact list, else use the hull list name
if ($myrow[“contact_type_of”] == “PO” && $myrow[‘contact_homeport’]) {
echo “
“.$myrow[“contact_homeport”].” |
“;
} else {
echo “
“.$myrow[“hull_homeport”].” |
“; }
// echo “
“.$myrow[“hull_homeport”].” |
“;
// This gets PO fleet from contact list, else leave field blank
if ($myrow[“contact_type_of”] == “PO”) {
echo “
|
“;
} else {
echo “
“.$myrow[“hull_fleet”].” – “.$myrow[“fleet_descr”].” |
“; }
// echo “
“.$myrow[“hull_fleet”].” – “.$myrow[“fleet_descr”].” |
“;
}
}
echo “