Sindbad~EG File Manager

Current Path : /usr/home/beeson/public_html/helpwithmath/
Upload File :
Current File : /usr/home/beeson/public_html/helpwithmath/normalize.php

<?php  
function normalizeYear($Year)
// make $Year be a 4-digit year between 1910 and 2009
// if $Year has 0,4, or more than 4 digits, return "".
{ $Year = trim($Year);
  if(strlen($Year) == 4)
    return $Year;
  if(strlen($Year) == 1)
     return "200" . $Year;
  if(strlen($Year) != 2)
     return "";
  if($Year[0] == '0' && strlen($Year) == 2)
     return "20" . $Year;
  else 
     return "19" . $Year;
}	 
  
function normalizeCountry($Country)
// fix up country names;
{ $Country = ucfirst(strtolower(trim($Country)));
  if($Country == 'Usa' || $Country == 'Us')
     return "US";
  else if($Country == 'United states')
     return "US";
  if($Country == 'England' || $Country == 'Britain' || $Country == 'Great britain')
     return "England";
  return $Country;
}	 

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists