Sindbad~EG File Manager

Current Path : /usr/home/beeson/public_html/dynamicgeometry/temp/dynamicgeometry/junk/includes/
Upload File :
Current File : /usr/home/beeson/public_html/dynamicgeometry/temp/dynamicgeometry/junk/includes/welcome.php

<?
/*
	Author: Michael Shiau 
	This code is available for public use with no legal restriction
*/

function open_external_url($url, $method = "curl")
{
   $data = '';
   if(strtolower($method) == "curl")
   {
       $ch = curl_init($url);
       ob_start();
       curl_exec($ch);
       curl_close($ch);
       $data = ob_get_contents();
       ob_end_clean();
   }
   else if(strtolower($method) == "fopen")
   {
       $file = fopen($url, "r");
       while(!feof($file)) {
           $data = $data . fgets($file, 4096);
       }
       fclose ($file);
   }
   return $data;
}

$include = $_GET['include'];
if(!isset($include))
   $include = "start";
$web = $_GET['web'];
$title = $_GET['title'];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Euclid's Constructions</title>
<link href="stylesheets/index.css" rel="stylesheet" type="text/css" />
<link href="stylesheets/start.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="stylesheets/niftyCorners.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/niftyPrint.css" media="print" />
<script type="text/javascript" src="javascripts/nifty.js"></script>
<script type="text/javascript">
window.onload=function(){
if(!NiftyCheck())
    return;
Rounded("div#footer","#FFF","#E4E7F2");
}
</script>
<link rel="icon" href="images/geo.ico" />
<link rel="shortcut icon" href="images/geo.ico" />

<? if ($include == "tutor") { ?>
<link href="stylesheets/welcome.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<style type="text/css">
a.gallery span {display:block; position:absolute; width:552px; height:450px; top:100px; left:-99999px; padding:5px; color:#000; background:#fff; z-index:100; 

font-size:14px;}
a.gallery span img {border:1px solid #000;}
a.gallery:hover {white-space:normal; border:1px solid #fff;}
a.gallery:hover img {border:1px solid #000; z-index:100;}
a.gallery:active img, a.gallery:focus img {border:1px solid #000; z-index:50;}
a.gallery:hover span {left:70px; z-indx:100;}
a.gallery:hover span img {border:1px solid #000;}
a.gallery:active span, a.gallery:focus span {left:70px; z-index:50;}
</style>
<![endif]-->

<? } ?>
</head>
<body>
<div id="container">

<? include('includes/header.php'); 
   disp_head($include)
?>

<div id="content4">

<?
//   echo "Loading for include=$include\n";
   if ($include == "start") { include('includes/start.php'); }
   if ($include == "tutor") { 
	   if ($web == "") {
			include('includes/tutor.php');
	   }
	   else {
		    print "<div style='padding:10px;'>";
			print "<h2>Lesson $title</h2>\n";
	   		$data = open_external_url($web);
			$aa = extractit($data, "<BODY ", "</BODY>");
			$aa = str_replace("BODY BGCOLOR=\"black\" TEXT=\"red\" VLINK=\"yellow\" LINK=\"blue\"", "", $aa);
			$aa = str_replace("ALINK=\"green\">","",$aa);
			$aa = str_replace("HREF=\"", "HREF = '#' onclick=\"document.getElementById('imgdiv').innerHTML='&lt;img src=http://www.visual-euclid.org/vce/CONSTRUCTIONS/C$title/HTML.FRAMES/", $aa);
			$aa = str_replace("HREF = \"", "HREF = '#' onclick=\"document.getElementById('imgdiv').innerHTML='&lt;img src=http://www.visual-euclid.org/vce/CONSTRUCTIONS/C$title/HTML.FRAMES/", $aa);
			
			$aa = str_replace(".gif\" TARGET=\"text\"",".gif&gt;&lt;/img&gt;'\"", $aa);
			$aa = str_replace(".gif\" TARGET = \"text\"", ".gif&gt;&lt;/img&gt;'\"", $aa);

			print "<div id='imgdiv'></div>" . $aa;
			print "</div>";
	   }
    }
   if ($include == "construction") { include('includes/construction.php'); }
   if ($include == "diagram") { include('includes/diagram.php'); }
   if ($include == "learning") { include('includes/learning.php');   }
   if ($include == "progress") { include('includes/progress.php'); }
   if ($include == "help") { include('includes/help.php'); }
   if ($include == "credits") { include('includes/credits.php'); }
?>
</div>

<? include('includes/footer.php'); ?>

</div>

</body>
</html>

<? 

function extractit($string, $s, $e) {
       if ($start=strpos($string, $s)) {
          if ($end=strpos(substr($string,$start+1), $e)) { 
            return substr($string, $start+1, $end-1);
          }
          else  {
            return false;
          }
       }
       return false;
}  

?>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists