//SLIDEjax.php
/* + Slurps the contents of the referring URL,
* + Extracts everything between
* and
* + Treats each
,
,
as the beginning of
* of a
(leaves
and beyond alone)
* + Adds class="show incremental" to all of the tags below if
* they have no class.
* + Wraps S5 slide show classes and javascript around everything
*/
$ref = $_SERVER['HTTP_REFERER'];
$toppieces = split("/",$ref);
$mysite = $toppieces[3]."/".$toppieces[4]."/";
//$pieces = split('physix/302/',$ref);
$pieces = split($mysite,$ref);
if ($pieces[1] == ''){
die ("called from bad URL!");
}
$morepieces = split('/',$pieces[1]);
$thedir = $morepieces[0] ."/";
// Works on local machine
//$fcontents = join('',file('http://localhost/'.$mysite.$pieces[1]));
// Works at GC
//$fcontents = join('',file('http://www-old.goshen.edu/'.$mysite.$pieces[1]));
$fcontents = join('',file('../../'.$mysite.$pieces[1]));
print $fcontents;
exit();
preg_match('/slide begin-->(.*)