![]() |
||
| 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(); ?> |
Welcome to the New Hampshire Mathematics Science Technology Coalition! Our efforts are dedicated towards advancing science, technology, engineering, and mathematics (STEM) education for all students in New Hampshire. Our members work to improve and enhance opportunities for schools, teachers, and students. We invite you to share your ideas and ambitions with us for a concerted push for more successful STEM initiatives in New Hampshire! Please join our efforts and deepen our impact! A dynamic weather workshop for teachers of all grade levels!
|
January 25, 2007
"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
|