Sindbad~EG File Manager
<?
/*
Author: Michael Shiau
This code is available for public use with no legal restriction
5.1.2012, Beeson removed "codebase"
*/
if(isset($_POST['whichConstruction']))
$construct = $_POST['whichConstruction'];
else
$construct="EquilateralTriangle";
$euclid = array("EquilateralTriangle" => "Equilateral Triangle" ,
"CopySegment" => "Copy Segment" ,
"CopySegmentOntoLine" => "Copy Line Segment" ,
"CopySegmentOntoLine2" => "Copy Line Segment 2" ,
"BisectAngle" => "Bisect Angle using Bisect Segment" ,
"BisectAngle2" => "Bisect Angle Euclid's way",
"BisectSegment" => "Bisect Segment" ,
"BisectSegment2" => "Bisect Segment 2" ,
"ErectPerpendicular" => "Erect Perpendicular" ,
"DropPerpendicular" => "Drop Perpendicular" ,
"TriangleFromSegments" => "Triangle from Segments" ,
"CircleFromCenterAndRadius" => "Circle from Circle" ,
"CopyTriangle" => "Copy Triangle" ,
"CopyAngleToSegment" => "Copy Angle to Segment" ,
"ParallelThroughPoint" => "Parallel Through Point" ,
"ParallelogramEqualToTriangle" => "Parallelogram Equal to Triangle",
"ParallelogramOfGivenWidthEqualToTriangle" => "Parallelogram Width Equal to Triangle",
"Parallelogram2OfGivenWidthEqualToTriangle" => "Parallelogram Width Equal to Triangle 2",
"ParallelogramEqualToConvexPolygon" => "Parallelogram Equal to Convex Polygon",
"SquareOnGivenSide" => "Square on Given Side",
"SquareOnGivenSide2" => "Square on Given Side 2",
"CutSegmentInGoldenSection" => "Cut Segment Into Golden Section",
"SquareEqualToConvexPolygon" => "Square Equal to Convex Polygon",
"TangentToCircle" => "Tangent to Circle",
"CircleFromArc" => "Circle from Arc",
"BisectCircumference" => "Bisect Circumference",
"GivenSegmentAndAngleConstructCircle" => "Given Segment and Angle Construct Circle",
"GivenCircleAndAngleConstructArc" => "Given Circle And Angle Construct Arc",
"FitSegmentInCircle" => "Fit Segment In Circle",
"TriangleInCircle" => "Triangle In Circle",
"TriangleAroundCircle" => "Triangle Around Circle",
"CircleInTriangle" => "Circle in Triangle",
"CircleAroundTriangle" => "Circle Around Triangle",
"SquareInCircle" => "Square in Circle",
"SquareAroundCircle" => "Square Around Circle",
"CircleInSquare" => "Circle In Square",
"CircleAroundSquare" => "Circle Around Square",
"ConstructGoldenTriangle" => "Construct Golden Triangle",
"PentagonInCircle" => "Pentagon In Circle",
"PentagonAroundCircle" => "Pentagon Around Circle",
"CircleInPentagon" => "Circle In Pentagon",
"CircleAroundPentagon" => "Circle Around Pentagon",
"HexagonInCircle" => "Hexagon In Circle",
"FifteenGonInCircle" => "15-Gon In Circle",
"DivideSegmentIntoParts" => "Divide Segment Into Parts",
"SegmentOnLine" => "Segment On Line",
"ThirdProportional" => "Third Proportion",
"FourthProportional" => "Fourth Proportion",
"MeanProportional" => "Mean Proportion",
"SimilarConvexPolygonWithGivenSide" => "Similar Convex Polygon With Given Side",
"SimilarConvexPolygonWithGivenArea" => "Similar Convex Polygon With Given Area",
"ParallelogramWithGivenSideAndAreaFallingShortByGivenParallelogram" => "Paralleogram with Area Falling Short by Given Parallelogram",
"ParallelogramWithGivenSideAndAreaExceedingByGivenParallelogram" => "Parallelogram with Area Exceeding by Given Parallelogram",
"CutSegmentInExtremeAndMeanRatio" => "Cut a Segment in Extreme and Mean Ratio"
);
$purpose = array("EquilateralTriangle" => "Construct an equilateral triangle ABC on a given segment AB" ,
"CopySegment" => "Construct a point D such that AD = BC" ,
"CopySegmentOntoLine" => "Construct a point C on AB such that AC = PQ and C is on the same side of A as B" ,
"CopySegmentOntoLine2" => "Construct a point C on AB such that AC = PQ and C is on the same side of A as B",
"BisectAngle" => "Bisect angle BAC using Bisect Segment 2" ,
"BisectAngle2" => "Bisect angle BAC Euclid's way, using Equilateral Triangle",
"BisectSegment" => "Bisect segment AB Euclid's way" ,
"BisectSegment2" => "Bisect Segment AB using two circles" ,
"ErectPerpendicular" => "Erect a perpendicular to line AB at point C" ,
"DropPerpendicular" => "Drop a perpendicular to line AB from point C" ,
"TriangleFromSegments" => "Construct a triangle with three given sides AX, BY, CZ, having one side (equal to BY) on line DE",
"CircleFromCenterAndRadius" => "Circle from Circle" ,
"CopyTriangle" => "Copy Triangle" ,
"CopyAngleToSegment" => "Copy Angle to Segment" ,
"ParallelThroughPoint" => "Parallel Through Point" ,
"ParallelogramEqualToTriangle" => "Parallelogram Equal to Triangle",
"ParallelogramOfGivenWidthEqualToTriangle" => "Parallelogram Width Equal to Triangle",
"Parallelogram2OfGivenWidthEqualToTriangle" => "Parallelogram Width Equal to Triangle 2",
"ParallelogramEqualToConvexPolygon" => "Parallelogram Equal to Convex Polygon",
"SquareOnGivenSide" => "Square on Given Side",
"SquareOnGivenSide2" => "Square on Given Side 2",
"CutSegmentInGoldenSection" => "Cut Segment Into Golden Section",
"SquareEqualToConvexPolygon" => "Square Equal to Convex Polygon",
"TangentToCircle" => "Tanget to Circle",
"CircleFromArc" => "Circle from Arc",
"BisectCircumference" => "Bisect Circumference",
"GivenSegmentAndAngleConstructCircle" => "Given Segment and Angle Construct Circle",
"GivenCircleAndAngleConstructArc" => "Given Circle And Angle Construct Arc",
"FitSegmentInCircle" => "Fit Segment In Circle",
"TriangleInCircle" => "Triangle In Circle",
"TriangleAroundCircle" => "Triangle Around Circle",
"CircleInTriangle" => "Circle in Triangle",
"CircleAroundTriangle" => "Circle Around Triangle",
"SquareInCircle" => "Square in Circle",
"SquareAroundCircle" => "Square Around Circle",
"CircleInSquare" => "Circle In Square",
"CircleAroundSquare" => "Circle Around Square",
"ConstructGoldenTriangle" => "Construct Golden Triangle",
"PentagonInCircle" => "Pentagon Around Circle",
"PentagonAroundCircle" => "Pentagon Around Circle",
"CircleInPentagon" => "Circle In Pentagon",
"CircleAroundPentagon" => "Circle Around Pentagon",
"HexagonInCircle" => "Hexagon Inn Circle",
"FifteenGonInCircle" => "15-Gon In Circle",
"DivideSegmentIntoParts" => "Divide Segment Into Parts",
"SegmentOnLine" => "Segment On Line",
"ThirdProportional" => "Third Proportion",
"FourthProportional" => "Fourth Proportion",
"MeanProportional" => "Mean Proportion",
"SimilarConvexPolygonWithGivenSide" => "Similar Convex Polygon With Given Side",
"SimilarConvexPolygonWithGivenArea" => "Book VI, Prop. 25",
"ParallelogramWithGivenSideAndAreaFallingShortByGivenParallelogram" => "Book VI, Prop. 28",
"ParallelogramWithGivenSideAndAreaExceedingByGivenParallelogram" => "Book VI, Prop. 29",
"CutSegmentInExtremeAndMeanRatio" => "Book VI, Prop. 30"
);
$reference = array("EquilateralTriangle" => "Book I, Prop. 1" ,
"CopySegment" => "Book I, Prop. 2" ,
"CopySegmentOntoLine" => "Book I, Prop. 3" ,
"CopySegmentOntoLine2" => "Book I, Prop. 3 alternate" ,
"BisectAngle" => "Book I, Prop. 9 alternate" ,
"BisectAngle2" => "Book I, Prop. 9",
"BisectSegment" => "Book I, Prop. 10" ,
"BisectSegment2" => "Book I, Prop. 10 alternate" ,
"ErectPerpendicular" => "Book I, Prop. 11" ,
"DropPerpendicular" => "Book I, Prop. 12" ,
"TriangleFromSegments" => "Book I, Prop. 22" ,
"CircleFromCenterAndRadius" => "Circle from Circle" ,
"CopyTriangle" => "Copy Triangle" ,
"CopyAngleToSegment" => "Book I, Prop. 23" ,
"ParallelThroughPoint" => "Book I, Prop. 31" ,
"ParallelogramEqualToTriangle" => "Book I, Prop. 42",
"ParallelogramOfGivenWidthEqualToTriangle" => "Book I, Prop. 44",
"Parallelogram2OfGivenWidthEqualToTriangle" => "Book I, Prop. 44 alternate",
"ParallelogramEqualToConvexPolygon" => "Book I, Prop. 45",
"SquareOnGivenSide" => "Book I, Prop. 46",
"SquareOnGivenSide2" => "Book I, Prop. 46 alternate",
"CutSegmentInGoldenSection" => "Book II, Prop. 11",
"SquareEqualToConvexPolygon" => "Book II, Prop. 14",
"TangentToCircle" => "Book III, Prop. 17",
"CircleFromArc" => "Book III, Prop. 25",
"BisectCircumference" => "Book III, Prop. 30",
"GivenSegmentAndAngleConstructCircle" => "Book IiI, Prop. 33",
"GivenCircleAndAngleConstructArc" => "Book I, Prop. 34",
"FitSegmentInCircle" => "Book IV, Prop. 1",
"TriangleInCircle" => "Book IV, Prop. 2",
"TriangleAroundCircle" => "Book IV, Prop. 3",
"CircleInTriangle" => "Book IV, Prop. 4",
"CircleAroundTriangle" => "Book IV, Prop. 5",
"SquareInCircle" => "Book IV, Prop. 6",
"SquareAroundCircle" => "Book IV, Prop. 7",
"CircleInSquare" => "Book IV, Prop. 8",
"CircleAroundSquare" => "Book IV, Prop. 9",
"ConstructGoldenTriangle" => "Book IV, Prop. 10",
"PentagonInCircle" => "Book IV, Prop. 11",
"PentagonAroundCircle" => "Book IV, Prop. 12",
"CircleInPentagon" => "Book IV, Prop. 13",
"CircleAroundPentagon" => "Book IV, Prop. 14",
"HexagonInCircle" => "Book IV, Prop. 15",
"FifteenGonInCircle" => "Book IV, Prop. 16",
"DivideSegmentIntoParts" => "Book VI, Prop. 9",
"SegmentOnLine" => "Book VI, Prop. 10",
"ThirdProportional" => "Book VI, Prop. 11",
"FourthProportional" => "Book VI, Prop. 12",
"MeanProportional" => "Book VI, Prop. 13",
"SimilarConvexPolygonWithGivenSide" => "Book VI, Prop. 18",
"SimilarConvexPolygonWithGivenArea" => "Book VI, Prop. 25",
"ParallelogramWithGivenSideAndAreaFallingShortByGivenParallelogram" => "Book VI, Prop. 28",
"ParallelogramWithGivenSideAndAreaExceedingByGivenParallelogram" => "Book VI, Prop. 29",
"CutSegmentInExtremeAndMeanRatio" => "Book VI, Prop. 30"
/* books VII, VIII, and IX are number theory, but book X takes up geometry again. */
);
?>
<div style="padding-top: 5px; padding-left: 10px; padding-right: 10px; padding-bottom: 30px">
<form action="../index.php?include=construction" method="post" id="form1">
<table width="900" align="center" border="0" cellspacing="1" cellpadding="0">
<tr>
<td colspan="2">
<h1>Choose the construction that you want to study from the list:</h1></td>
</tr>
<tr>
<td width="388">
<select name="whichConstruction" onChange="jumpto(this)">
<?
foreach($euclid as $key => $value){
if ($construct == $key) {
print "<option value='$key' SELECTED>$value</option>\n";
}
else {
print "<option value='$key'>$value</option>\n";
}
}
?>
</select>
</td>
</tr>
<tr>
<td> <?php
if(isset($construct))
{ echo "Euclid, " ;
echo $reference[$construct];
}
?>
</td>
<td> <?php
if(isset($construct))
{ echo $purpose[$construct];
}
?>
</td>
</tr>
</table>
</form>
<div style="padding-top: 15px">
<table width="900" align="center" border="0" cellspacing="1" cellpadding="0">
<tr>
<td>
<div id="applet_container">
<applet code="org/dynamicgeometry/constructor/Constructor.class" width="350" height="350" name="Constructor">No support for applet tag.
<? if ($construct != "") {
print "<PARAM NAME='whichConstruction' VALUE='$construct'>";
}
else {
print "<PARAM NAME='whichConstruction' VALUE='EquilateralTriangle'>";
}
?>
</applet>
</div>
</td>
<td> </td>
<td>
<div id="applet_container2">
<applet code="org/dynamicgeometry/diagrammer/Diagrammer.class" width="550" height="350" name="Diagrammer">No support for applet tag.
<? if ($construct != "") {
print "<PARAM NAME='testMode' VALUE='true'>";
print "<PARAM NAME='whichConstruction' VALUE='$construct'>";
}
else {
print "<PARAM NAME='testMode' VALUE='EquilateralTriangle'>";
print "<PARAM NAME='whichConstruction' VALUE='EquilateralTriangle'>";
}
?>
</applet>
</div>
</td>
</tr>
</table>
</div>
</div>
<script>
function jumpto(me)
{
form1.submit();
}
</script>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists