<?php
require('admin/config.php');
require('admin/connect.php');
if ($id) {
// query the DB for School Name & District Name
$sql = "select * from teacher, school, district where teacher.teacher_id = $id and school.school_id = teacher.school_id and district.district_id = teacher.district_id";
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
// query the DB for Latest News Item
//$sql2 = "select * from teacher, news where teacher.teacher_id = $id ORDER BY news.news_id";
//$result2 = mysql_query($sql2);
// query the DB for Class Schedule
$sql3 = "select * from periods where periods.teacher_id = $id ORDER BY periodorder";
$result3 = mysql_query($sql3);
// query the DB for Links
$sql4 = "select * from links where links.teacher_id = $id ORDER BY links.links_id";
$result4 = mysql_query($sql4);
// query the DB for Theme Information
$sql5 = "SELECT topname, topaddress, toprow, classrow, linksrow, contentrow, bottomrow, sidemenu FROM teacher, theme WHERE teacher.teacher_id = $id and teacher.theme_id = theme.theme_id";
$result5 = mysql_query($sql5);
$myrow5 = mysql_fetch_array($result5);
// query the DB for Links
$sql6 = "select * from links where links.teacher_id = $id ORDER BY links.links_id";
$result6 = mysql_query($sql6);
?>
<HEAD>
<? INCLUDE("portalxp.php")?>
<STYLE>
A:hover
{
COLOR: #ff3333;
TEXT-DECORATION: none
}
</STYLE>
</HEAD>
<? INCLUDE("includes/backend_top.php")?>
<!-- Content Area -->
<table width='425px' BORDER="0" CELLSPACING="0" CELLPADDING="0">
<tr>
<td bgcolor='<?php echo $myrow5["contentrow"] ?>'>
<div class='fontwhite'>
Links & Descriptions:<br>
</div>
</td>
</tr>
<tr>
<td>
<?php
while ($myrow6 = mysql_fetch_array($result6)) {
printf("<li><a target='new' href='http://%s'>%s</a> - %s<br>\n", $myrow6["website"], $myrow6["displayname"], $myrow6["link_description"]);
}
?>
</td>
</tr>
</table>
<? INCLUDE("includes/backend_bottom.php")?>
<?php
} else {
// Display PortalXP front page
?>
Here is the front page.
<?php
}
?>