![]() |
||
| Home | Vision | Mission | History | Projects | Events | Executive Board | Representatives | Organizations | Contact Us | ||
|
function writeRandomImage()
{
$path = "/ws1b/dd/www.nhmast.us/htdocs/images/random";
$url = "/images/random";
global $usedImages;
if(!isset($usedImages))
{
$usedImages = array();
}
if ($handle = opendir($path))
{
# Build a list of all the image files in the directory
$files = array();
while (false !== ($file = readdir($handle)))
{
if (substr($file, -4) == ".jpg" || substr($file, -4) == ".gif" ||
substr($file, -4) == ".png" || substr($file, -4) == ".bmp" ||
substr($file, -4) == ".tif")
{
array_push($files, $file);
}
}
}
# Get a random filename (make sure it isnt the same as one already used)
$idx = rand(0, count($files) - 1);
while (count($usedImages) < count($files) && in_array($files[$idx], $usedImages))
{
$idx = rand(0, count($files) - 1);
}
# Display the image
echo " writeRandomImage(); ?> writeRandomImage(); ?> |
The NH Mathematics, Science & Technology Coalition was founded in 1988 and incorporated as NH Nonprofit Corporation in 1992. It's current constitution and by-laws were adopted in 1996. |
"Schools Slow In Closing Gaps Between Races" “Study Reveals Dropout Risks ” Report: Bright Students Should Skip Grades “Long Breaks Lower Likelihood of Finishing College, Study Says” Are Parents and Students Ready for More Math and Science? Find It Fast
|