Sindbad~EG File Manager
<?
/*
Authors: Michael Shiau, Sang Soo Kim
This code is available for public use with no legal restriction
*/
require_once("dbAccess.php");
?>
<?
$table = array();
$table[1] = "1. To draw an equilateral triangle";
$table[2] = "2. To move a line";
$table[3] = "3. To move a line onto a line";
$table[4] = "4. To bisect an angle";
$table[5] = "5. To bisect a line";
$table[6] = "6. To draw a perp at a point";
$table[7] = "7. To drop a perp from a point";
$table[8] = "8. To make a triangle of three lines";
$table[9] = "9. To move an angle onto a line at a point";
$table[10] = "10. To draw a parallel through a point";
$table[11] = "11. To draw a parallelogram equal to a triangle";
$table[12] = "12. Same, but with a given width";
$table[13] = "13. To draw a parallelogram equal to a figure";
$table[14] = "14. To draw a square on a given side";
$table[15] = "15. To cut a line in golden section";
$table[16] = "16. To construct a square equal to a figure";
$table[17] = "17. To find the center of a circle";
$table[18] = "18. To draw a line touching a circle";
$table[19] = "19. To draw a complete circle given a segment";
$table[20] = "20. To bisect a circumference";
$table[21] = "21. To draw a segment with a given angle, on a given line";
$table[22] = "22. To draw a segment with a given angle, in a given circle";
$table[23] = "23. To fit a line in a circle";
$table[24] = "24. To inscribe a triangle in a circle";
$table[25] = "25. To circumscribe a triangle around a circle";
$table[26] = "26. To inscribe a circle in a triangle";
$table[27] = "27. To circumscribe a circle around a triangle";
$table[28] = "28. To inscribe a square in a circle";
$table[29] = "29. To circumscribe a square around a circle";
$table[30] = "30. To inscribe a circle in a square";
$table[31] = "31. To circumscribe a circle around a square";
$table[32] = "32. To construct a golden triangle";
$table[33] = "33. To inscribe a pentagon in a circle";
$table[34] = "34. To circumscribe a pentagon around a circle";
$table[35] = "35. To inscribe a circle in a pentagon";
$table[36] = "36. To circumscribe a circle around a pentagon";
$table[37] = "37. To inscribe a hexagon in a circle";
$table[38] = "38. To inscribe a 15-gon in a circle";
$table[39] = "39. To cut a prescribed piece from a line";
$table[40] = "40. To cut a line similar to another cut line";
$table[41] = "41. To find a third proprotional";
$table[42] = "42. To find a fourth proportional";
$table[43] = "43. To find a mean proportional";
$table[44] = "44. To describe a figure similar to a given figure";
$table[45] = "45. To describe a figure similar to one and equal to another";
$table[46] = "46. To apply a parallelogram to a line, given area and defect";
$table[47] = "47. To apply a parallelogram to a line, given area and excess";
$table[48] = "48. To divide in extreme and mean ratio (DEMR)";
?>
<div style="padding-top: 5px; padding-left: 10px; padding-right: 10px; padding-bottom: 30px">
<? /*
<table width="750" align="center" border="0" cellspacing="1" cellpadding="0">
<tr>
<td>
<h1>To view your progress, please select a lesson:</h1></td>
</tr>
<tr>
<td><select name="test_select">
<option>1. To draw an equilateral triangle</option>
<option>4. To bisect an angle</option>
<option>5. To bisect a line</option>
<option>6. To draw a perp at a point</option>
<option>7. To drop a perp from a point</option>
<option>8. To make a triangle of three lines</option>
<option>38. To inscribe a 15-gon in a circle</option>
<option>39. To cut a prescribed piece from a line</option>
<option>40. To cut a line similar to another cut line</option>
</select> <input name="Input" value="Submit" type="submit" /></td>
</tr>
</table>
*/ ?>
<br>
<table width="750" border="1" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<? /*
<tr>
<td>8. To make a triangle of three lines</td>
<td>4</td>
<td>10/18/06 05:43 PM </td>
</tr>
<tr>
<td>...</td>
<td>...</td>
<td> </td>
</tr>
<tr>
<td>...</td>
<td>...</td>
<td> </td>
</tr>
<tr>
<td>...</td>
<td>...</td>
<td> </td>
</tr>
*/ ?>
<?
if ($_SESSION['UserType'] == student){
?>
<tr bgcolor="#333333">
<td><div align="center"><span style="color: #FFFFFF; font-weight: bold">Lesson</span></div></td>
<td><div align="center"><span style="color: #FFFFFF; font-weight: bold">Completion Date </span></div></td>
</tr>
<?
$UID = $_SESSION['UID'];
$sql = "SELECT StudentNumber, LessonNumber, Date FROM Work WHERE StudentNumber = '$UID' ORDER BY Date;";
$q = Query($sql);
while($q->fetchInto($row)){
printf ("<tr>\n");
//printf ("<td> %d </td>\n", $row[0]);
// printf ("<td><div align=\"center\"> %d </div></td>\n", $row[1]);
printf ("<td><div align=\"center\"> %s </div></td>\n", $table[$row[1]]);
printf ("<td><div align=\"center\"> %s </div></td>\n", $row[2]);
printf ("</tr>\n");
}
}
if ($_SESSION['UserType'] == teacher){
?>
<tr bgcolor="#333333">
<td><div align="center"><span style="color: #FFFFFF; font-weight: bold">Student Name</span></div></td>
<td><div align="center"><span style="color: #FFFFFF; font-weight: bold">Lesson</span></div></td>
<td><div align="center"><span style="color: #FFFFFF; font-weight: bold">Completion Date </span></div></td>
</tr>
<?
$UID = $_SESSION['UID'];
$sql = "SELECT StudentNumber, FirstName FROM Students WHERE TeacherNumber = '$UID';";
$q = Query($sql);
while($q->fetchInto($row)){
$sql2 = "SELECT StudentNumber, LessonNumber, Date FROM Work WHERE StudentNumber = '$row[0]' ORDER BY Date;";
$q2 = Query($sql2);
while($q2->fetchInto($row2)){
printf ("<tr>\n");
printf ("<td><div align=\"center\"> %s </div></td>\n", $row[1]);
printf ("<td><div align=\"center\"> %s </div></td>\n", $table[$row2[1]]);
printf ("<td><div align=\"center\"> %s </div></td>\n", $row2[2]);
printf ("</tr>\n");
}
}
}
?>
</table>
</div>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists