"illustrations.php", "posters" => "posters.php", "characters" => "characters.php", "artists" => "artists.php", "index" => "index.php" ); static function HtmlOpen( $strPage ) { echo ""; echo ""; echo "CS Illustrated: $strPage"; echo ""; echo ""; echo ""; echo ""; // end navbar div echo "
"; echo "
"; $imgSrc = "images/" .CsIllus::GetCurrentPage(). ".png"; echo ""; echo "
"; // end title div echo "
"; if (isset($_GET['msg'])) { echo CsIllus::$astrMsgs[$_GET['msg']]; } } static function HtmlNavBar() { foreach ( CsIllus::$pages_array as $key => $value ) { $imgSrc = "images/tab_" .$key. ".png"; if ( $key != CsIllus::GetCurrentPage() ) { echo "
"; } elseif ( $key != "index" ) { echo "" ."
"; } } } static function GetCurrentPage() { $url = $_SERVER['PHP_SELF']; $info = pathinfo($url); return basename($url, '.' .$info['extension']); } static function HtmlClose() { echo "
"; // end main div echo "
"; // end wrapper div echo ""; //end copyright div echo ""; echo ""; } // This function populates the gallery with thumbnail images // $type is either 'handout' or 'poster' static function CreateGallery( $thumbDir, $type ) { $bigDir = "PDFs/" .$type ."s/"; // Location of big versions if ($handle = opendir($thumbDir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && strpos( $file, '.') != 0) { $files[] = $file; } } closedir($handle); } // echo "size: " . count($files); echo ""; // end gallery div } static function getThumbs($dir, $type){ if ($handle = opendir($dir)) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { $printOut = ""; if ($type == 'handout') { $printOut = "

Handouts for $entry

\n"; } else if ($type == 'poster') { $printOut = "

Posters for $entry

\n"; } echo "
"; $printOut = ucwords($printOut); echo $printOut; $lessonDir = $dir.$entry; if ($lessonHandle = opendir($lessonDir)){ while (false !== ($lesson = readdir($lessonHandle))) { if (strpos($lesson, ".jpg") or strpos($lesson, ".jpeg")) { echo "

Other posters

"; echo "
"; CsIllus::CreateGallery($lessonDir."/", $type); echo "
"; } else if ($lesson != "." && $lesson != "..") { echo "

$lesson

"; echo "
"; $thumbDir = $lessonDir.'/'.$lesson.'/'; if (file_exists($thumbDir)){ CsIllus::CreateGallery($thumbDir, $type); } echo "
"; } } } closedir($lessonHandle); echo "
"; } } closedir($handle); } } } ?>