Cannot update semesters before 2000"; print ""; //print ""; exit(); } //edit the current semester $csemester=$semester; //$semester=strtoupper($semester); if ($semester=="WINTER") $semester="WT"; print $semester; //get the current semester diretory path if ($cyear<10) $dir="../../".$semester."0".$cyear; else $dir="../../".$semester.$cyear; print $dir."
"; /****************************************************************************** * print out link to semester update script on ******************************************************************************/ print "
"; print "
"; print $csemester." ".$year." "; print ""; print "Update Segue"; print "
"; print "
"; //exit(); //open the directory $handle=opendir($dir); //$index_courses contains the codes of the courses that have index pages $index_courses = array (); //$other_courses contains the codes of the courses that do not have index pages $other_courses = array (); /* Loop over the directory */ $skip_root=0; $total=0; $totalcourses=0; while (false !== ($file = readdir($handle))) { if ($skip_root > 2){ $subdir=$dir."/".$file; if (is_dir($subdir)){ $total++; $newcourse = substr($file, 0, 5); //print $newcourse; if ($newcourse == $currcourse) { $totalcourses++; } $currcourse = substr($file, 0, 5); //print $currcourse; //get the path to course PUBLIC_HTML directory $public_html=$subdir."/PUBLIC_HTML"; if (is_dir($public_html)){ //open the course PUBLIC_HTML directory $web_handle=opendir($public_html); $count=0; $has_index=0; while (false !== ($html_file = readdir($web_handle))){ $count++; if (("$html_file"=="index.html") || ("$html_file"=="index.htm")){ $has_index=1;} } closedir($web_handle); if ($count>3){ if ($has_index == 1){ array_push ($index_courses,$file); }else{ array_push ($other_courses,$file); } } } } }else{ $skip_root+=1; } } closedir($handle); if ($total == 0) $total = "no course folders found!"; if ($totalcourses == 0) $total = "no courses found!"; ?> Course Folder Website Information...
Total courses and sections:
Total courses:
The following courses do not have index pages
(If updated "no title" will be put into the title field):
"; } ?>
The following course index pages have been found:

"; } ?>
Total:
directories without index pages
directories with index pages
> > > > > > Update all listed courses?
"; print $csemester." ".$year." "; print ""; print "Update Segue"; print "
"; ?>