Location: PHPKode > projects > K-12 OSS Web Software Project > equest_0.1/teacher/view.php
<?php
include("../config.php");

session_start();
if (!(isset($_SESSION['teacher']))) {
       header("Location: ../index.php");
       exit();
   }
?>
<html>
<head>
<title>Web Quest</title>
</head>

<body bgcolor="#ffffff">
<?php 
$query = "SELECT quest_title,quest_teacher,quest_image,quest_intro,quest_task,quest_process,quest_resource,quest_eval,quest_conclusion FROM quests WHERE quest_unique='{$_REQUEST["quest"]}'"; 
$result = mysql_query($query) or die(mysql_error());
$res = mysql_fetch_array($result);
?>
<?php 
$query = "SELECT teacher_prefix,teacher_surname FROM teachers WHERE teacherid='{$res["quest_teacher"]}'"; 
$result = mysql_query($query) or die(mysql_error());
$teacher = mysql_fetch_array($result);
?>

<center><h3><?php echo $res["quest_title"]; ?></h3></center>

<center>
<table border="0" cellpadding="4" cellspacing="4">
<tr>
<td align="center">
<img src="../images/<?php echo $res["quest_image"]; ?>" alt="WebQuest"></td>
<td>
<b>Name:</b>____________________<br><br>
<b>Date:</b>_____________________<br><br>
<b>Teacher: <?php echo $teacher["teacher_prefix"]; ?> <?php echo $teacher["teacher_surname"]; ?></b>
</td>
</tr>
</table>
</center>

<br />
<center>
<table border="0" cellspacing="8">
<tr>
<td bgcolor="#cccccc" align="right" valign="top"><b>Introduction:</b></td>
<td><?php
$quest_intro = nl2br($res["quest_intro"]);
echo $quest_intro;
?></td>
</tr>

<tr>
<td bgcolor="#cccccc" align="right" valign="top"><b>Task:</b></td>
<td><?php
$quest_task = nl2br($res["quest_task"]);
echo $quest_task;
?></td>
</tr>

<tr>
<td bgcolor="#cccccc" align="right" valign="top"><b>Process:</b></td>
<td><?php
$quest_process = nl2br($res["quest_process"]);
echo $quest_process;
?></td>
</tr>

<tr>
<td bgcolor="#cccccc" align="right" valign="top"><b>Resources:</b></td>
<td><?php
$quest_resource = nl2br($res["quest_resource"]);
echo $quest_resource;
?>


<?php 
$query = "SELECT link_title,link_url FROM links WHERE link_quest='{$_REQUEST["quest"]}'"; 
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))	
{
print "<p><a href=\"{$row["link_url"]}\" target=\"_new\" title=\"resource link\">{$row["link_url"]}</a><br />{$row["link_title"]}<br /></p>";
}
$numrows=mysql_num_rows($result);
if ($numrows == 0)
{}
?>
</td>
</tr>

<tr>
<td bgcolor="#cccccc" align="right" valign="top"><b>Evaluation:</b></td>
<td><?php
$quest_eval = nl2br($res["quest_eval"]);
echo $quest_eval;
?></td>
</tr>

<tr>
<td bgcolor="#cccccc" align="right" valign="top"><b>Conclusion:</b></td>
<td><?php
$quest_conclusion = nl2br($res["quest_conclusion"]);
echo $quest_conclusion;
?></td>
</tr>

</table>
</center>
</body></html>
Return current item: K-12 OSS Web Software Project